main.js 748 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId]) {
  10. /******/ return installedModules[moduleId].exports;
  11. /******/ }
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // identity function for calling harmony imports with the correct context
  37. /******/ __webpack_require__.i = function(value) { return value; };
  38. /******/
  39. /******/ // define getter function for harmony exports
  40. /******/ __webpack_require__.d = function(exports, name, getter) {
  41. /******/ if(!__webpack_require__.o(exports, name)) {
  42. /******/ Object.defineProperty(exports, name, {
  43. /******/ configurable: false,
  44. /******/ enumerable: true,
  45. /******/ get: getter
  46. /******/ });
  47. /******/ }
  48. /******/ };
  49. /******/
  50. /******/ // getDefaultExport function for compatibility with non-harmony modules
  51. /******/ __webpack_require__.n = function(module) {
  52. /******/ var getter = module && module.__esModule ?
  53. /******/ function getDefault() { return module['default']; } :
  54. /******/ function getModuleExports() { return module; };
  55. /******/ __webpack_require__.d(getter, 'a', getter);
  56. /******/ return getter;
  57. /******/ };
  58. /******/
  59. /******/ // Object.prototype.hasOwnProperty.call
  60. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  61. /******/
  62. /******/ // __webpack_public_path__
  63. /******/ __webpack_require__.p = "";
  64. /******/
  65. /******/ // Load entry module and return exports
  66. /******/ return __webpack_require__(__webpack_require__.s = 85);
  67. /******/ })
  68. /************************************************************************/
  69. /******/ ([
  70. /* 0 */
  71. /***/ (function(module, exports) {
  72. // shim for using process in browser
  73. var process = module.exports = {};
  74. // cached from whatever global is present so that test runners that stub it
  75. // don't break things. But we need to wrap it in a try catch in case it is
  76. // wrapped in strict mode code which doesn't define any globals. It's inside a
  77. // function because try/catches deoptimize in certain engines.
  78. var cachedSetTimeout;
  79. var cachedClearTimeout;
  80. function defaultSetTimout() {
  81. throw new Error('setTimeout has not been defined');
  82. }
  83. function defaultClearTimeout () {
  84. throw new Error('clearTimeout has not been defined');
  85. }
  86. (function () {
  87. try {
  88. if (typeof setTimeout === 'function') {
  89. cachedSetTimeout = setTimeout;
  90. } else {
  91. cachedSetTimeout = defaultSetTimout;
  92. }
  93. } catch (e) {
  94. cachedSetTimeout = defaultSetTimout;
  95. }
  96. try {
  97. if (typeof clearTimeout === 'function') {
  98. cachedClearTimeout = clearTimeout;
  99. } else {
  100. cachedClearTimeout = defaultClearTimeout;
  101. }
  102. } catch (e) {
  103. cachedClearTimeout = defaultClearTimeout;
  104. }
  105. } ())
  106. function runTimeout(fun) {
  107. if (cachedSetTimeout === setTimeout) {
  108. //normal enviroments in sane situations
  109. return setTimeout(fun, 0);
  110. }
  111. // if setTimeout wasn't available but was latter defined
  112. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  113. cachedSetTimeout = setTimeout;
  114. return setTimeout(fun, 0);
  115. }
  116. try {
  117. // when when somebody has screwed with setTimeout but no I.E. maddness
  118. return cachedSetTimeout(fun, 0);
  119. } catch(e){
  120. try {
  121. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  122. return cachedSetTimeout.call(null, fun, 0);
  123. } catch(e){
  124. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  125. return cachedSetTimeout.call(this, fun, 0);
  126. }
  127. }
  128. }
  129. function runClearTimeout(marker) {
  130. if (cachedClearTimeout === clearTimeout) {
  131. //normal enviroments in sane situations
  132. return clearTimeout(marker);
  133. }
  134. // if clearTimeout wasn't available but was latter defined
  135. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  136. cachedClearTimeout = clearTimeout;
  137. return clearTimeout(marker);
  138. }
  139. try {
  140. // when when somebody has screwed with setTimeout but no I.E. maddness
  141. return cachedClearTimeout(marker);
  142. } catch (e){
  143. try {
  144. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  145. return cachedClearTimeout.call(null, marker);
  146. } catch (e){
  147. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  148. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  149. return cachedClearTimeout.call(this, marker);
  150. }
  151. }
  152. }
  153. var queue = [];
  154. var draining = false;
  155. var currentQueue;
  156. var queueIndex = -1;
  157. function cleanUpNextTick() {
  158. if (!draining || !currentQueue) {
  159. return;
  160. }
  161. draining = false;
  162. if (currentQueue.length) {
  163. queue = currentQueue.concat(queue);
  164. } else {
  165. queueIndex = -1;
  166. }
  167. if (queue.length) {
  168. drainQueue();
  169. }
  170. }
  171. function drainQueue() {
  172. if (draining) {
  173. return;
  174. }
  175. var timeout = runTimeout(cleanUpNextTick);
  176. draining = true;
  177. var len = queue.length;
  178. while(len) {
  179. currentQueue = queue;
  180. queue = [];
  181. while (++queueIndex < len) {
  182. if (currentQueue) {
  183. currentQueue[queueIndex].run();
  184. }
  185. }
  186. queueIndex = -1;
  187. len = queue.length;
  188. }
  189. currentQueue = null;
  190. draining = false;
  191. runClearTimeout(timeout);
  192. }
  193. process.nextTick = function (fun) {
  194. var args = new Array(arguments.length - 1);
  195. if (arguments.length > 1) {
  196. for (var i = 1; i < arguments.length; i++) {
  197. args[i - 1] = arguments[i];
  198. }
  199. }
  200. queue.push(new Item(fun, args));
  201. if (queue.length === 1 && !draining) {
  202. runTimeout(drainQueue);
  203. }
  204. };
  205. // v8 likes predictible objects
  206. function Item(fun, array) {
  207. this.fun = fun;
  208. this.array = array;
  209. }
  210. Item.prototype.run = function () {
  211. this.fun.apply(null, this.array);
  212. };
  213. process.title = 'browser';
  214. process.browser = true;
  215. process.env = {};
  216. process.argv = [];
  217. process.version = ''; // empty string to avoid regexp issues
  218. process.versions = {};
  219. function noop() {}
  220. process.on = noop;
  221. process.addListener = noop;
  222. process.once = noop;
  223. process.off = noop;
  224. process.removeListener = noop;
  225. process.removeAllListeners = noop;
  226. process.emit = noop;
  227. process.binding = function (name) {
  228. throw new Error('process.binding is not supported');
  229. };
  230. process.cwd = function () { return '/' };
  231. process.chdir = function (dir) {
  232. throw new Error('process.chdir is not supported');
  233. };
  234. process.umask = function() { return 0; };
  235. /***/ }),
  236. /* 1 */
  237. /***/ (function(module, exports, __webpack_require__) {
  238. "use strict";
  239. /* WEBPACK VAR INJECTION */(function(process) {/**
  240. * Copyright (c) 2013-present, Facebook, Inc.
  241. * All rights reserved.
  242. *
  243. * This source code is licensed under the BSD-style license found in the
  244. * LICENSE file in the root directory of this source tree. An additional grant
  245. * of patent rights can be found in the PATENTS file in the same directory.
  246. *
  247. */
  248. /**
  249. * Use invariant() to assert state which your program assumes to be true.
  250. *
  251. * Provide sprintf-style format (only %s is supported) and arguments
  252. * to provide information about what broke and what you were
  253. * expecting.
  254. *
  255. * The invariant message will be stripped in production, but the invariant
  256. * will remain to ensure logic does not differ in production.
  257. */
  258. var validateFormat = function validateFormat(format) {};
  259. if (process.env.NODE_ENV !== 'production') {
  260. validateFormat = function validateFormat(format) {
  261. if (format === undefined) {
  262. throw new Error('invariant requires an error message argument');
  263. }
  264. };
  265. }
  266. function invariant(condition, format, a, b, c, d, e, f) {
  267. validateFormat(format);
  268. if (!condition) {
  269. var error;
  270. if (format === undefined) {
  271. error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
  272. } else {
  273. var args = [a, b, c, d, e, f];
  274. var argIndex = 0;
  275. error = new Error(format.replace(/%s/g, function () {
  276. return args[argIndex++];
  277. }));
  278. error.name = 'Invariant Violation';
  279. }
  280. error.framesToPop = 1; // we don't care about invariant's own frame
  281. throw error;
  282. }
  283. }
  284. module.exports = invariant;
  285. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  286. /***/ }),
  287. /* 2 */
  288. /***/ (function(module, exports, __webpack_require__) {
  289. "use strict";
  290. /* WEBPACK VAR INJECTION */(function(process) {/**
  291. * Copyright 2014-2015, Facebook, Inc.
  292. * All rights reserved.
  293. *
  294. * This source code is licensed under the BSD-style license found in the
  295. * LICENSE file in the root directory of this source tree. An additional grant
  296. * of patent rights can be found in the PATENTS file in the same directory.
  297. *
  298. */
  299. var emptyFunction = __webpack_require__(9);
  300. /**
  301. * Similar to invariant but only logs a warning if the condition is not met.
  302. * This can be used to log issues in development environments in critical
  303. * paths. Removing the logging code for production environments will keep the
  304. * same logic and follow the same code paths.
  305. */
  306. var warning = emptyFunction;
  307. if (process.env.NODE_ENV !== 'production') {
  308. (function () {
  309. var printWarning = function printWarning(format) {
  310. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  311. args[_key - 1] = arguments[_key];
  312. }
  313. var argIndex = 0;
  314. var message = 'Warning: ' + format.replace(/%s/g, function () {
  315. return args[argIndex++];
  316. });
  317. if (typeof console !== 'undefined') {
  318. console.error(message);
  319. }
  320. try {
  321. // --- Welcome to debugging React ---
  322. // This error was thrown as a convenience so that you can use this stack
  323. // to find the callsite that caused this warning to fire.
  324. throw new Error(message);
  325. } catch (x) {}
  326. };
  327. warning = function warning(condition, format) {
  328. if (format === undefined) {
  329. throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
  330. }
  331. if (format.indexOf('Failed Composite propType: ') === 0) {
  332. return; // Ignore CompositeComponent proptype check.
  333. }
  334. if (!condition) {
  335. for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  336. args[_key2 - 2] = arguments[_key2];
  337. }
  338. printWarning.apply(undefined, [format].concat(args));
  339. }
  340. };
  341. })();
  342. }
  343. module.exports = warning;
  344. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  345. /***/ }),
  346. /* 3 */
  347. /***/ (function(module, exports, __webpack_require__) {
  348. "use strict";
  349. /**
  350. * Copyright (c) 2013-present, Facebook, Inc.
  351. * All rights reserved.
  352. *
  353. * This source code is licensed under the BSD-style license found in the
  354. * LICENSE file in the root directory of this source tree. An additional grant
  355. * of patent rights can be found in the PATENTS file in the same directory.
  356. *
  357. *
  358. */
  359. /**
  360. * WARNING: DO NOT manually require this module.
  361. * This is a replacement for `invariant(...)` used by the error code system
  362. * and will _only_ be required by the corresponding babel pass.
  363. * It always throws.
  364. */
  365. function reactProdInvariant(code) {
  366. var argCount = arguments.length - 1;
  367. var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
  368. for (var argIdx = 0; argIdx < argCount; argIdx++) {
  369. message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
  370. }
  371. message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
  372. var error = new Error(message);
  373. error.name = 'Invariant Violation';
  374. error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
  375. throw error;
  376. }
  377. module.exports = reactProdInvariant;
  378. /***/ }),
  379. /* 4 */
  380. /***/ (function(module, exports, __webpack_require__) {
  381. "use strict";
  382. /*
  383. object-assign
  384. (c) Sindre Sorhus
  385. @license MIT
  386. */
  387. /* eslint-disable no-unused-vars */
  388. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  389. var hasOwnProperty = Object.prototype.hasOwnProperty;
  390. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  391. function toObject(val) {
  392. if (val === null || val === undefined) {
  393. throw new TypeError('Object.assign cannot be called with null or undefined');
  394. }
  395. return Object(val);
  396. }
  397. function shouldUseNative() {
  398. try {
  399. if (!Object.assign) {
  400. return false;
  401. }
  402. // Detect buggy property enumeration order in older V8 versions.
  403. // https://bugs.chromium.org/p/v8/issues/detail?id=4118
  404. var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
  405. test1[5] = 'de';
  406. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  407. return false;
  408. }
  409. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  410. var test2 = {};
  411. for (var i = 0; i < 10; i++) {
  412. test2['_' + String.fromCharCode(i)] = i;
  413. }
  414. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  415. return test2[n];
  416. });
  417. if (order2.join('') !== '0123456789') {
  418. return false;
  419. }
  420. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  421. var test3 = {};
  422. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  423. test3[letter] = letter;
  424. });
  425. if (Object.keys(Object.assign({}, test3)).join('') !==
  426. 'abcdefghijklmnopqrst') {
  427. return false;
  428. }
  429. return true;
  430. } catch (err) {
  431. // We don't expect any of the above to throw, but better to be safe.
  432. return false;
  433. }
  434. }
  435. module.exports = shouldUseNative() ? Object.assign : function (target, source) {
  436. var from;
  437. var to = toObject(target);
  438. var symbols;
  439. for (var s = 1; s < arguments.length; s++) {
  440. from = Object(arguments[s]);
  441. for (var key in from) {
  442. if (hasOwnProperty.call(from, key)) {
  443. to[key] = from[key];
  444. }
  445. }
  446. if (getOwnPropertySymbols) {
  447. symbols = getOwnPropertySymbols(from);
  448. for (var i = 0; i < symbols.length; i++) {
  449. if (propIsEnumerable.call(from, symbols[i])) {
  450. to[symbols[i]] = from[symbols[i]];
  451. }
  452. }
  453. }
  454. }
  455. return to;
  456. };
  457. /***/ }),
  458. /* 5 */
  459. /***/ (function(module, exports, __webpack_require__) {
  460. "use strict";
  461. /* WEBPACK VAR INJECTION */(function(process) {/**
  462. * Copyright 2013-present, Facebook, Inc.
  463. * All rights reserved.
  464. *
  465. * This source code is licensed under the BSD-style license found in the
  466. * LICENSE file in the root directory of this source tree. An additional grant
  467. * of patent rights can be found in the PATENTS file in the same directory.
  468. *
  469. */
  470. var _prodInvariant = __webpack_require__(3);
  471. var DOMProperty = __webpack_require__(13);
  472. var ReactDOMComponentFlags = __webpack_require__(59);
  473. var invariant = __webpack_require__(1);
  474. var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
  475. var Flags = ReactDOMComponentFlags;
  476. var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
  477. /**
  478. * Check if a given node should be cached.
  479. */
  480. function shouldPrecacheNode(node, nodeID) {
  481. return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
  482. }
  483. /**
  484. * Drill down (through composites and empty components) until we get a host or
  485. * host text component.
  486. *
  487. * This is pretty polymorphic but unavoidable with the current structure we have
  488. * for `_renderedChildren`.
  489. */
  490. function getRenderedHostOrTextFromComponent(component) {
  491. var rendered;
  492. while (rendered = component._renderedComponent) {
  493. component = rendered;
  494. }
  495. return component;
  496. }
  497. /**
  498. * Populate `_hostNode` on the rendered host/text component with the given
  499. * DOM node. The passed `inst` can be a composite.
  500. */
  501. function precacheNode(inst, node) {
  502. var hostInst = getRenderedHostOrTextFromComponent(inst);
  503. hostInst._hostNode = node;
  504. node[internalInstanceKey] = hostInst;
  505. }
  506. function uncacheNode(inst) {
  507. var node = inst._hostNode;
  508. if (node) {
  509. delete node[internalInstanceKey];
  510. inst._hostNode = null;
  511. }
  512. }
  513. /**
  514. * Populate `_hostNode` on each child of `inst`, assuming that the children
  515. * match up with the DOM (element) children of `node`.
  516. *
  517. * We cache entire levels at once to avoid an n^2 problem where we access the
  518. * children of a node sequentially and have to walk from the start to our target
  519. * node every time.
  520. *
  521. * Since we update `_renderedChildren` and the actual DOM at (slightly)
  522. * different times, we could race here and see a newer `_renderedChildren` than
  523. * the DOM nodes we see. To avoid this, ReactMultiChild calls
  524. * `prepareToManageChildren` before we change `_renderedChildren`, at which
  525. * time the container's child nodes are always cached (until it unmounts).
  526. */
  527. function precacheChildNodes(inst, node) {
  528. if (inst._flags & Flags.hasCachedChildNodes) {
  529. return;
  530. }
  531. var children = inst._renderedChildren;
  532. var childNode = node.firstChild;
  533. outer: for (var name in children) {
  534. if (!children.hasOwnProperty(name)) {
  535. continue;
  536. }
  537. var childInst = children[name];
  538. var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
  539. if (childID === 0) {
  540. // We're currently unmounting this child in ReactMultiChild; skip it.
  541. continue;
  542. }
  543. // We assume the child nodes are in the same order as the child instances.
  544. for (; childNode !== null; childNode = childNode.nextSibling) {
  545. if (shouldPrecacheNode(childNode, childID)) {
  546. precacheNode(childInst, childNode);
  547. continue outer;
  548. }
  549. }
  550. // We reached the end of the DOM children without finding an ID match.
  551. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
  552. }
  553. inst._flags |= Flags.hasCachedChildNodes;
  554. }
  555. /**
  556. * Given a DOM node, return the closest ReactDOMComponent or
  557. * ReactDOMTextComponent instance ancestor.
  558. */
  559. function getClosestInstanceFromNode(node) {
  560. if (node[internalInstanceKey]) {
  561. return node[internalInstanceKey];
  562. }
  563. // Walk up the tree until we find an ancestor whose instance we have cached.
  564. var parents = [];
  565. while (!node[internalInstanceKey]) {
  566. parents.push(node);
  567. if (node.parentNode) {
  568. node = node.parentNode;
  569. } else {
  570. // Top of the tree. This node must not be part of a React tree (or is
  571. // unmounted, potentially).
  572. return null;
  573. }
  574. }
  575. var closest;
  576. var inst;
  577. for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
  578. closest = inst;
  579. if (parents.length) {
  580. precacheChildNodes(inst, node);
  581. }
  582. }
  583. return closest;
  584. }
  585. /**
  586. * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
  587. * instance, or null if the node was not rendered by this React.
  588. */
  589. function getInstanceFromNode(node) {
  590. var inst = getClosestInstanceFromNode(node);
  591. if (inst != null && inst._hostNode === node) {
  592. return inst;
  593. } else {
  594. return null;
  595. }
  596. }
  597. /**
  598. * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
  599. * DOM node.
  600. */
  601. function getNodeFromInstance(inst) {
  602. // Without this first invariant, passing a non-DOM-component triggers the next
  603. // invariant for a missing parent, which is super confusing.
  604. !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
  605. if (inst._hostNode) {
  606. return inst._hostNode;
  607. }
  608. // Walk up the tree until we find an ancestor whose DOM node we have cached.
  609. var parents = [];
  610. while (!inst._hostNode) {
  611. parents.push(inst);
  612. !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
  613. inst = inst._hostParent;
  614. }
  615. // Now parents contains each ancestor that does *not* have a cached native
  616. // node, and `inst` is the deepest ancestor that does.
  617. for (; parents.length; inst = parents.pop()) {
  618. precacheChildNodes(inst, inst._hostNode);
  619. }
  620. return inst._hostNode;
  621. }
  622. var ReactDOMComponentTree = {
  623. getClosestInstanceFromNode: getClosestInstanceFromNode,
  624. getInstanceFromNode: getInstanceFromNode,
  625. getNodeFromInstance: getNodeFromInstance,
  626. precacheChildNodes: precacheChildNodes,
  627. precacheNode: precacheNode,
  628. uncacheNode: uncacheNode
  629. };
  630. module.exports = ReactDOMComponentTree;
  631. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  632. /***/ }),
  633. /* 6 */
  634. /***/ (function(module, exports, __webpack_require__) {
  635. "use strict";
  636. /**
  637. * Copyright (c) 2013-present, Facebook, Inc.
  638. * All rights reserved.
  639. *
  640. * This source code is licensed under the BSD-style license found in the
  641. * LICENSE file in the root directory of this source tree. An additional grant
  642. * of patent rights can be found in the PATENTS file in the same directory.
  643. *
  644. */
  645. var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
  646. /**
  647. * Simple, lightweight module assisting with the detection and context of
  648. * Worker. Helps avoid circular dependencies and allows code to reason about
  649. * whether or not they are in a Worker, even if they never include the main
  650. * `ReactWorker` dependency.
  651. */
  652. var ExecutionEnvironment = {
  653. canUseDOM: canUseDOM,
  654. canUseWorkers: typeof Worker !== 'undefined',
  655. canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
  656. canUseViewport: canUseDOM && !!window.screen,
  657. isInWorker: !canUseDOM // For now, this is true - might change in the future.
  658. };
  659. module.exports = ExecutionEnvironment;
  660. /***/ }),
  661. /* 7 */
  662. /***/ (function(module, exports, __webpack_require__) {
  663. "use strict";
  664. /* WEBPACK VAR INJECTION */(function(process) {/**
  665. * Copyright 2016-present, Facebook, Inc.
  666. * All rights reserved.
  667. *
  668. * This source code is licensed under the BSD-style license found in the
  669. * LICENSE file in the root directory of this source tree. An additional grant
  670. * of patent rights can be found in the PATENTS file in the same directory.
  671. *
  672. *
  673. */
  674. var _prodInvariant = __webpack_require__(16);
  675. var ReactCurrentOwner = __webpack_require__(11);
  676. var invariant = __webpack_require__(1);
  677. var warning = __webpack_require__(2);
  678. function isNative(fn) {
  679. // Based on isNative() from Lodash
  680. var funcToString = Function.prototype.toString;
  681. var hasOwnProperty = Object.prototype.hasOwnProperty;
  682. var reIsNative = RegExp('^' + funcToString
  683. // Take an example native function source for comparison
  684. .call(hasOwnProperty)
  685. // Strip regex characters so we can use it for regex
  686. .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
  687. // Remove hasOwnProperty from the template to make it generic
  688. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
  689. try {
  690. var source = funcToString.call(fn);
  691. return reIsNative.test(source);
  692. } catch (err) {
  693. return false;
  694. }
  695. }
  696. var canUseCollections =
  697. // Array.from
  698. typeof Array.from === 'function' &&
  699. // Map
  700. typeof Map === 'function' && isNative(Map) &&
  701. // Map.prototype.keys
  702. Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
  703. // Set
  704. typeof Set === 'function' && isNative(Set) &&
  705. // Set.prototype.keys
  706. Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
  707. var setItem;
  708. var getItem;
  709. var removeItem;
  710. var getItemIDs;
  711. var addRoot;
  712. var removeRoot;
  713. var getRootIDs;
  714. if (canUseCollections) {
  715. var itemMap = new Map();
  716. var rootIDSet = new Set();
  717. setItem = function (id, item) {
  718. itemMap.set(id, item);
  719. };
  720. getItem = function (id) {
  721. return itemMap.get(id);
  722. };
  723. removeItem = function (id) {
  724. itemMap['delete'](id);
  725. };
  726. getItemIDs = function () {
  727. return Array.from(itemMap.keys());
  728. };
  729. addRoot = function (id) {
  730. rootIDSet.add(id);
  731. };
  732. removeRoot = function (id) {
  733. rootIDSet['delete'](id);
  734. };
  735. getRootIDs = function () {
  736. return Array.from(rootIDSet.keys());
  737. };
  738. } else {
  739. var itemByKey = {};
  740. var rootByKey = {};
  741. // Use non-numeric keys to prevent V8 performance issues:
  742. // https://github.com/facebook/react/pull/7232
  743. var getKeyFromID = function (id) {
  744. return '.' + id;
  745. };
  746. var getIDFromKey = function (key) {
  747. return parseInt(key.substr(1), 10);
  748. };
  749. setItem = function (id, item) {
  750. var key = getKeyFromID(id);
  751. itemByKey[key] = item;
  752. };
  753. getItem = function (id) {
  754. var key = getKeyFromID(id);
  755. return itemByKey[key];
  756. };
  757. removeItem = function (id) {
  758. var key = getKeyFromID(id);
  759. delete itemByKey[key];
  760. };
  761. getItemIDs = function () {
  762. return Object.keys(itemByKey).map(getIDFromKey);
  763. };
  764. addRoot = function (id) {
  765. var key = getKeyFromID(id);
  766. rootByKey[key] = true;
  767. };
  768. removeRoot = function (id) {
  769. var key = getKeyFromID(id);
  770. delete rootByKey[key];
  771. };
  772. getRootIDs = function () {
  773. return Object.keys(rootByKey).map(getIDFromKey);
  774. };
  775. }
  776. var unmountedIDs = [];
  777. function purgeDeep(id) {
  778. var item = getItem(id);
  779. if (item) {
  780. var childIDs = item.childIDs;
  781. removeItem(id);
  782. childIDs.forEach(purgeDeep);
  783. }
  784. }
  785. function describeComponentFrame(name, source, ownerName) {
  786. return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
  787. }
  788. function getDisplayName(element) {
  789. if (element == null) {
  790. return '#empty';
  791. } else if (typeof element === 'string' || typeof element === 'number') {
  792. return '#text';
  793. } else if (typeof element.type === 'string') {
  794. return element.type;
  795. } else {
  796. return element.type.displayName || element.type.name || 'Unknown';
  797. }
  798. }
  799. function describeID(id) {
  800. var name = ReactComponentTreeHook.getDisplayName(id);
  801. var element = ReactComponentTreeHook.getElement(id);
  802. var ownerID = ReactComponentTreeHook.getOwnerID(id);
  803. var ownerName;
  804. if (ownerID) {
  805. ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
  806. }
  807. process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
  808. return describeComponentFrame(name, element && element._source, ownerName);
  809. }
  810. var ReactComponentTreeHook = {
  811. onSetChildren: function (id, nextChildIDs) {
  812. var item = getItem(id);
  813. !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
  814. item.childIDs = nextChildIDs;
  815. for (var i = 0; i < nextChildIDs.length; i++) {
  816. var nextChildID = nextChildIDs[i];
  817. var nextChild = getItem(nextChildID);
  818. !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
  819. !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
  820. !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
  821. if (nextChild.parentID == null) {
  822. nextChild.parentID = id;
  823. // TODO: This shouldn't be necessary but mounting a new root during in
  824. // componentWillMount currently causes not-yet-mounted components to
  825. // be purged from our tree data so their parent id is missing.
  826. }
  827. !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
  828. }
  829. },
  830. onBeforeMountComponent: function (id, element, parentID) {
  831. var item = {
  832. element: element,
  833. parentID: parentID,
  834. text: null,
  835. childIDs: [],
  836. isMounted: false,
  837. updateCount: 0
  838. };
  839. setItem(id, item);
  840. },
  841. onBeforeUpdateComponent: function (id, element) {
  842. var item = getItem(id);
  843. if (!item || !item.isMounted) {
  844. // We may end up here as a result of setState() in componentWillUnmount().
  845. // In this case, ignore the element.
  846. return;
  847. }
  848. item.element = element;
  849. },
  850. onMountComponent: function (id) {
  851. var item = getItem(id);
  852. !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
  853. item.isMounted = true;
  854. var isRoot = item.parentID === 0;
  855. if (isRoot) {
  856. addRoot(id);
  857. }
  858. },
  859. onUpdateComponent: function (id) {
  860. var item = getItem(id);
  861. if (!item || !item.isMounted) {
  862. // We may end up here as a result of setState() in componentWillUnmount().
  863. // In this case, ignore the element.
  864. return;
  865. }
  866. item.updateCount++;
  867. },
  868. onUnmountComponent: function (id) {
  869. var item = getItem(id);
  870. if (item) {
  871. // We need to check if it exists.
  872. // `item` might not exist if it is inside an error boundary, and a sibling
  873. // error boundary child threw while mounting. Then this instance never
  874. // got a chance to mount, but it still gets an unmounting event during
  875. // the error boundary cleanup.
  876. item.isMounted = false;
  877. var isRoot = item.parentID === 0;
  878. if (isRoot) {
  879. removeRoot(id);
  880. }
  881. }
  882. unmountedIDs.push(id);
  883. },
  884. purgeUnmountedComponents: function () {
  885. if (ReactComponentTreeHook._preventPurging) {
  886. // Should only be used for testing.
  887. return;
  888. }
  889. for (var i = 0; i < unmountedIDs.length; i++) {
  890. var id = unmountedIDs[i];
  891. purgeDeep(id);
  892. }
  893. unmountedIDs.length = 0;
  894. },
  895. isMounted: function (id) {
  896. var item = getItem(id);
  897. return item ? item.isMounted : false;
  898. },
  899. getCurrentStackAddendum: function (topElement) {
  900. var info = '';
  901. if (topElement) {
  902. var name = getDisplayName(topElement);
  903. var owner = topElement._owner;
  904. info += describeComponentFrame(name, topElement._source, owner && owner.getName());
  905. }
  906. var currentOwner = ReactCurrentOwner.current;
  907. var id = currentOwner && currentOwner._debugID;
  908. info += ReactComponentTreeHook.getStackAddendumByID(id);
  909. return info;
  910. },
  911. getStackAddendumByID: function (id) {
  912. var info = '';
  913. while (id) {
  914. info += describeID(id);
  915. id = ReactComponentTreeHook.getParentID(id);
  916. }
  917. return info;
  918. },
  919. getChildIDs: function (id) {
  920. var item = getItem(id);
  921. return item ? item.childIDs : [];
  922. },
  923. getDisplayName: function (id) {
  924. var element = ReactComponentTreeHook.getElement(id);
  925. if (!element) {
  926. return null;
  927. }
  928. return getDisplayName(element);
  929. },
  930. getElement: function (id) {
  931. var item = getItem(id);
  932. return item ? item.element : null;
  933. },
  934. getOwnerID: function (id) {
  935. var element = ReactComponentTreeHook.getElement(id);
  936. if (!element || !element._owner) {
  937. return null;
  938. }
  939. return element._owner._debugID;
  940. },
  941. getParentID: function (id) {
  942. var item = getItem(id);
  943. return item ? item.parentID : null;
  944. },
  945. getSource: function (id) {
  946. var item = getItem(id);
  947. var element = item ? item.element : null;
  948. var source = element != null ? element._source : null;
  949. return source;
  950. },
  951. getText: function (id) {
  952. var element = ReactComponentTreeHook.getElement(id);
  953. if (typeof element === 'string') {
  954. return element;
  955. } else if (typeof element === 'number') {
  956. return '' + element;
  957. } else {
  958. return null;
  959. }
  960. },
  961. getUpdateCount: function (id) {
  962. var item = getItem(id);
  963. return item ? item.updateCount : 0;
  964. },
  965. getRootIDs: getRootIDs,
  966. getRegisteredIDs: getItemIDs
  967. };
  968. module.exports = ReactComponentTreeHook;
  969. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  970. /***/ }),
  971. /* 8 */
  972. /***/ (function(module, exports, __webpack_require__) {
  973. "use strict";
  974. /* WEBPACK VAR INJECTION */(function(process) {/**
  975. * Copyright 2016-present, Facebook, Inc.
  976. * All rights reserved.
  977. *
  978. * This source code is licensed under the BSD-style license found in the
  979. * LICENSE file in the root directory of this source tree. An additional grant
  980. * of patent rights can be found in the PATENTS file in the same directory.
  981. *
  982. *
  983. */
  984. // Trust the developer to only use ReactInstrumentation with a __DEV__ check
  985. var debugTool = null;
  986. if (process.env.NODE_ENV !== 'production') {
  987. var ReactDebugTool = __webpack_require__(130);
  988. debugTool = ReactDebugTool;
  989. }
  990. module.exports = { debugTool: debugTool };
  991. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  992. /***/ }),
  993. /* 9 */
  994. /***/ (function(module, exports, __webpack_require__) {
  995. "use strict";
  996. /**
  997. * Copyright (c) 2013-present, Facebook, Inc.
  998. * All rights reserved.
  999. *
  1000. * This source code is licensed under the BSD-style license found in the
  1001. * LICENSE file in the root directory of this source tree. An additional grant
  1002. * of patent rights can be found in the PATENTS file in the same directory.
  1003. *
  1004. *
  1005. */
  1006. function makeEmptyFunction(arg) {
  1007. return function () {
  1008. return arg;
  1009. };
  1010. }
  1011. /**
  1012. * This function accepts and discards inputs; it has no side effects. This is
  1013. * primarily useful idiomatically for overridable function endpoints which
  1014. * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
  1015. */
  1016. var emptyFunction = function emptyFunction() {};
  1017. emptyFunction.thatReturns = makeEmptyFunction;
  1018. emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
  1019. emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
  1020. emptyFunction.thatReturnsNull = makeEmptyFunction(null);
  1021. emptyFunction.thatReturnsThis = function () {
  1022. return this;
  1023. };
  1024. emptyFunction.thatReturnsArgument = function (arg) {
  1025. return arg;
  1026. };
  1027. module.exports = emptyFunction;
  1028. /***/ }),
  1029. /* 10 */
  1030. /***/ (function(module, exports, __webpack_require__) {
  1031. "use strict";
  1032. /* WEBPACK VAR INJECTION */(function(process) {/**
  1033. * Copyright 2013-present, Facebook, Inc.
  1034. * All rights reserved.
  1035. *
  1036. * This source code is licensed under the BSD-style license found in the
  1037. * LICENSE file in the root directory of this source tree. An additional grant
  1038. * of patent rights can be found in the PATENTS file in the same directory.
  1039. *
  1040. */
  1041. var _prodInvariant = __webpack_require__(3),
  1042. _assign = __webpack_require__(4);
  1043. var CallbackQueue = __webpack_require__(57);
  1044. var PooledClass = __webpack_require__(14);
  1045. var ReactFeatureFlags = __webpack_require__(62);
  1046. var ReactReconciler = __webpack_require__(18);
  1047. var Transaction = __webpack_require__(28);
  1048. var invariant = __webpack_require__(1);
  1049. var dirtyComponents = [];
  1050. var updateBatchNumber = 0;
  1051. var asapCallbackQueue = CallbackQueue.getPooled();
  1052. var asapEnqueued = false;
  1053. var batchingStrategy = null;
  1054. function ensureInjected() {
  1055. !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
  1056. }
  1057. var NESTED_UPDATES = {
  1058. initialize: function () {
  1059. this.dirtyComponentsLength = dirtyComponents.length;
  1060. },
  1061. close: function () {
  1062. if (this.dirtyComponentsLength !== dirtyComponents.length) {
  1063. // Additional updates were enqueued by componentDidUpdate handlers or
  1064. // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
  1065. // these new updates so that if A's componentDidUpdate calls setState on
  1066. // B, B will update before the callback A's updater provided when calling
  1067. // setState.
  1068. dirtyComponents.splice(0, this.dirtyComponentsLength);
  1069. flushBatchedUpdates();
  1070. } else {
  1071. dirtyComponents.length = 0;
  1072. }
  1073. }
  1074. };
  1075. var UPDATE_QUEUEING = {
  1076. initialize: function () {
  1077. this.callbackQueue.reset();
  1078. },
  1079. close: function () {
  1080. this.callbackQueue.notifyAll();
  1081. }
  1082. };
  1083. var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
  1084. function ReactUpdatesFlushTransaction() {
  1085. this.reinitializeTransaction();
  1086. this.dirtyComponentsLength = null;
  1087. this.callbackQueue = CallbackQueue.getPooled();
  1088. this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
  1089. /* useCreateElement */true);
  1090. }
  1091. _assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
  1092. getTransactionWrappers: function () {
  1093. return TRANSACTION_WRAPPERS;
  1094. },
  1095. destructor: function () {
  1096. this.dirtyComponentsLength = null;
  1097. CallbackQueue.release(this.callbackQueue);
  1098. this.callbackQueue = null;
  1099. ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
  1100. this.reconcileTransaction = null;
  1101. },
  1102. perform: function (method, scope, a) {
  1103. // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
  1104. // with this transaction's wrappers around it.
  1105. return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
  1106. }
  1107. });
  1108. PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
  1109. function batchedUpdates(callback, a, b, c, d, e) {
  1110. ensureInjected();
  1111. return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
  1112. }
  1113. /**
  1114. * Array comparator for ReactComponents by mount ordering.
  1115. *
  1116. * @param {ReactComponent} c1 first component you're comparing
  1117. * @param {ReactComponent} c2 second component you're comparing
  1118. * @return {number} Return value usable by Array.prototype.sort().
  1119. */
  1120. function mountOrderComparator(c1, c2) {
  1121. return c1._mountOrder - c2._mountOrder;
  1122. }
  1123. function runBatchedUpdates(transaction) {
  1124. var len = transaction.dirtyComponentsLength;
  1125. !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
  1126. // Since reconciling a component higher in the owner hierarchy usually (not
  1127. // always -- see shouldComponentUpdate()) will reconcile children, reconcile
  1128. // them before their children by sorting the array.
  1129. dirtyComponents.sort(mountOrderComparator);
  1130. // Any updates enqueued while reconciling must be performed after this entire
  1131. // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
  1132. // C, B could update twice in a single batch if C's render enqueues an update
  1133. // to B (since B would have already updated, we should skip it, and the only
  1134. // way we can know to do so is by checking the batch counter).
  1135. updateBatchNumber++;
  1136. for (var i = 0; i < len; i++) {
  1137. // If a component is unmounted before pending changes apply, it will still
  1138. // be here, but we assume that it has cleared its _pendingCallbacks and
  1139. // that performUpdateIfNecessary is a noop.
  1140. var component = dirtyComponents[i];
  1141. // If performUpdateIfNecessary happens to enqueue any new updates, we
  1142. // shouldn't execute the callbacks until the next render happens, so
  1143. // stash the callbacks first
  1144. var callbacks = component._pendingCallbacks;
  1145. component._pendingCallbacks = null;
  1146. var markerName;
  1147. if (ReactFeatureFlags.logTopLevelRenders) {
  1148. var namedComponent = component;
  1149. // Duck type TopLevelWrapper. This is probably always true.
  1150. if (component._currentElement.type.isReactTopLevelWrapper) {
  1151. namedComponent = component._renderedComponent;
  1152. }
  1153. markerName = 'React update: ' + namedComponent.getName();
  1154. console.time(markerName);
  1155. }
  1156. ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
  1157. if (markerName) {
  1158. console.timeEnd(markerName);
  1159. }
  1160. if (callbacks) {
  1161. for (var j = 0; j < callbacks.length; j++) {
  1162. transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
  1163. }
  1164. }
  1165. }
  1166. }
  1167. var flushBatchedUpdates = function () {
  1168. // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
  1169. // array and perform any updates enqueued by mount-ready handlers (i.e.,
  1170. // componentDidUpdate) but we need to check here too in order to catch
  1171. // updates enqueued by setState callbacks and asap calls.
  1172. while (dirtyComponents.length || asapEnqueued) {
  1173. if (dirtyComponents.length) {
  1174. var transaction = ReactUpdatesFlushTransaction.getPooled();
  1175. transaction.perform(runBatchedUpdates, null, transaction);
  1176. ReactUpdatesFlushTransaction.release(transaction);
  1177. }
  1178. if (asapEnqueued) {
  1179. asapEnqueued = false;
  1180. var queue = asapCallbackQueue;
  1181. asapCallbackQueue = CallbackQueue.getPooled();
  1182. queue.notifyAll();
  1183. CallbackQueue.release(queue);
  1184. }
  1185. }
  1186. };
  1187. /**
  1188. * Mark a component as needing a rerender, adding an optional callback to a
  1189. * list of functions which will be executed once the rerender occurs.
  1190. */
  1191. function enqueueUpdate(component) {
  1192. ensureInjected();
  1193. // Various parts of our code (such as ReactCompositeComponent's
  1194. // _renderValidatedComponent) assume that calls to render aren't nested;
  1195. // verify that that's the case. (This is called by each top-level update
  1196. // function, like setState, forceUpdate, etc.; creation and
  1197. // destruction of top-level components is guarded in ReactMount.)
  1198. if (!batchingStrategy.isBatchingUpdates) {
  1199. batchingStrategy.batchedUpdates(enqueueUpdate, component);
  1200. return;
  1201. }
  1202. dirtyComponents.push(component);
  1203. if (component._updateBatchNumber == null) {
  1204. component._updateBatchNumber = updateBatchNumber + 1;
  1205. }
  1206. }
  1207. /**
  1208. * Enqueue a callback to be run at the end of the current batching cycle. Throws
  1209. * if no updates are currently being performed.
  1210. */
  1211. function asap(callback, context) {
  1212. !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
  1213. asapCallbackQueue.enqueue(callback, context);
  1214. asapEnqueued = true;
  1215. }
  1216. var ReactUpdatesInjection = {
  1217. injectReconcileTransaction: function (ReconcileTransaction) {
  1218. !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
  1219. ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
  1220. },
  1221. injectBatchingStrategy: function (_batchingStrategy) {
  1222. !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
  1223. !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
  1224. !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
  1225. batchingStrategy = _batchingStrategy;
  1226. }
  1227. };
  1228. var ReactUpdates = {
  1229. /**
  1230. * React references `ReactReconcileTransaction` using this property in order
  1231. * to allow dependency injection.
  1232. *
  1233. * @internal
  1234. */
  1235. ReactReconcileTransaction: null,
  1236. batchedUpdates: batchedUpdates,
  1237. enqueueUpdate: enqueueUpdate,
  1238. flushBatchedUpdates: flushBatchedUpdates,
  1239. injection: ReactUpdatesInjection,
  1240. asap: asap
  1241. };
  1242. module.exports = ReactUpdates;
  1243. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  1244. /***/ }),
  1245. /* 11 */
  1246. /***/ (function(module, exports, __webpack_require__) {
  1247. "use strict";
  1248. /**
  1249. * Copyright 2013-present, Facebook, Inc.
  1250. * All rights reserved.
  1251. *
  1252. * This source code is licensed under the BSD-style license found in the
  1253. * LICENSE file in the root directory of this source tree. An additional grant
  1254. * of patent rights can be found in the PATENTS file in the same directory.
  1255. *
  1256. *
  1257. */
  1258. /**
  1259. * Keeps track of the current owner.
  1260. *
  1261. * The current owner is the component who should own any components that are
  1262. * currently being constructed.
  1263. */
  1264. var ReactCurrentOwner = {
  1265. /**
  1266. * @internal
  1267. * @type {ReactComponent}
  1268. */
  1269. current: null
  1270. };
  1271. module.exports = ReactCurrentOwner;
  1272. /***/ }),
  1273. /* 12 */
  1274. /***/ (function(module, exports, __webpack_require__) {
  1275. "use strict";
  1276. /* WEBPACK VAR INJECTION */(function(process) {/**
  1277. * Copyright 2013-present, Facebook, Inc.
  1278. * All rights reserved.
  1279. *
  1280. * This source code is licensed under the BSD-style license found in the
  1281. * LICENSE file in the root directory of this source tree. An additional grant
  1282. * of patent rights can be found in the PATENTS file in the same directory.
  1283. *
  1284. */
  1285. var _assign = __webpack_require__(4);
  1286. var PooledClass = __webpack_require__(14);
  1287. var emptyFunction = __webpack_require__(9);
  1288. var warning = __webpack_require__(2);
  1289. var didWarnForAddedNewProperty = false;
  1290. var isProxySupported = typeof Proxy === 'function';
  1291. var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
  1292. /**
  1293. * @interface Event
  1294. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  1295. */
  1296. var EventInterface = {
  1297. type: null,
  1298. target: null,
  1299. // currentTarget is set when dispatching; no use in copying it here
  1300. currentTarget: emptyFunction.thatReturnsNull,
  1301. eventPhase: null,
  1302. bubbles: null,
  1303. cancelable: null,
  1304. timeStamp: function (event) {
  1305. return event.timeStamp || Date.now();
  1306. },
  1307. defaultPrevented: null,
  1308. isTrusted: null
  1309. };
  1310. /**
  1311. * Synthetic events are dispatched by event plugins, typically in response to a
  1312. * top-level event delegation handler.
  1313. *
  1314. * These systems should generally use pooling to reduce the frequency of garbage
  1315. * collection. The system should check `isPersistent` to determine whether the
  1316. * event should be released into the pool after being dispatched. Users that
  1317. * need a persisted event should invoke `persist`.
  1318. *
  1319. * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
  1320. * normalizing browser quirks. Subclasses do not necessarily have to implement a
  1321. * DOM interface; custom application-specific events can also subclass this.
  1322. *
  1323. * @param {object} dispatchConfig Configuration used to dispatch this event.
  1324. * @param {*} targetInst Marker identifying the event target.
  1325. * @param {object} nativeEvent Native browser event.
  1326. * @param {DOMEventTarget} nativeEventTarget Target node.
  1327. */
  1328. function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
  1329. if (process.env.NODE_ENV !== 'production') {
  1330. // these have a getter/setter for warnings
  1331. delete this.nativeEvent;
  1332. delete this.preventDefault;
  1333. delete this.stopPropagation;
  1334. }
  1335. this.dispatchConfig = dispatchConfig;
  1336. this._targetInst = targetInst;
  1337. this.nativeEvent = nativeEvent;
  1338. var Interface = this.constructor.Interface;
  1339. for (var propName in Interface) {
  1340. if (!Interface.hasOwnProperty(propName)) {
  1341. continue;
  1342. }
  1343. if (process.env.NODE_ENV !== 'production') {
  1344. delete this[propName]; // this has a getter/setter for warnings
  1345. }
  1346. var normalize = Interface[propName];
  1347. if (normalize) {
  1348. this[propName] = normalize(nativeEvent);
  1349. } else {
  1350. if (propName === 'target') {
  1351. this.target = nativeEventTarget;
  1352. } else {
  1353. this[propName] = nativeEvent[propName];
  1354. }
  1355. }
  1356. }
  1357. var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
  1358. if (defaultPrevented) {
  1359. this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
  1360. } else {
  1361. this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
  1362. }
  1363. this.isPropagationStopped = emptyFunction.thatReturnsFalse;
  1364. return this;
  1365. }
  1366. _assign(SyntheticEvent.prototype, {
  1367. preventDefault: function () {
  1368. this.defaultPrevented = true;
  1369. var event = this.nativeEvent;
  1370. if (!event) {
  1371. return;
  1372. }
  1373. if (event.preventDefault) {
  1374. event.preventDefault();
  1375. } else if (typeof event.returnValue !== 'unknown') {
  1376. // eslint-disable-line valid-typeof
  1377. event.returnValue = false;
  1378. }
  1379. this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
  1380. },
  1381. stopPropagation: function () {
  1382. var event = this.nativeEvent;
  1383. if (!event) {
  1384. return;
  1385. }
  1386. if (event.stopPropagation) {
  1387. event.stopPropagation();
  1388. } else if (typeof event.cancelBubble !== 'unknown') {
  1389. // eslint-disable-line valid-typeof
  1390. // The ChangeEventPlugin registers a "propertychange" event for
  1391. // IE. This event does not support bubbling or cancelling, and
  1392. // any references to cancelBubble throw "Member not found". A
  1393. // typeof check of "unknown" circumvents this issue (and is also
  1394. // IE specific).
  1395. event.cancelBubble = true;
  1396. }
  1397. this.isPropagationStopped = emptyFunction.thatReturnsTrue;
  1398. },
  1399. /**
  1400. * We release all dispatched `SyntheticEvent`s after each event loop, adding
  1401. * them back into the pool. This allows a way to hold onto a reference that
  1402. * won't be added back into the pool.
  1403. */
  1404. persist: function () {
  1405. this.isPersistent = emptyFunction.thatReturnsTrue;
  1406. },
  1407. /**
  1408. * Checks if this event should be released back into the pool.
  1409. *
  1410. * @return {boolean} True if this should not be released, false otherwise.
  1411. */
  1412. isPersistent: emptyFunction.thatReturnsFalse,
  1413. /**
  1414. * `PooledClass` looks for `destructor` on each instance it releases.
  1415. */
  1416. destructor: function () {
  1417. var Interface = this.constructor.Interface;
  1418. for (var propName in Interface) {
  1419. if (process.env.NODE_ENV !== 'production') {
  1420. Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
  1421. } else {
  1422. this[propName] = null;
  1423. }
  1424. }
  1425. for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
  1426. this[shouldBeReleasedProperties[i]] = null;
  1427. }
  1428. if (process.env.NODE_ENV !== 'production') {
  1429. Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
  1430. Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
  1431. Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
  1432. }
  1433. }
  1434. });
  1435. SyntheticEvent.Interface = EventInterface;
  1436. if (process.env.NODE_ENV !== 'production') {
  1437. if (isProxySupported) {
  1438. /*eslint-disable no-func-assign */
  1439. SyntheticEvent = new Proxy(SyntheticEvent, {
  1440. construct: function (target, args) {
  1441. return this.apply(target, Object.create(target.prototype), args);
  1442. },
  1443. apply: function (constructor, that, args) {
  1444. return new Proxy(constructor.apply(that, args), {
  1445. set: function (target, prop, value) {
  1446. if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
  1447. process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
  1448. didWarnForAddedNewProperty = true;
  1449. }
  1450. target[prop] = value;
  1451. return true;
  1452. }
  1453. });
  1454. }
  1455. });
  1456. /*eslint-enable no-func-assign */
  1457. }
  1458. }
  1459. /**
  1460. * Helper to reduce boilerplate when creating subclasses.
  1461. *
  1462. * @param {function} Class
  1463. * @param {?object} Interface
  1464. */
  1465. SyntheticEvent.augmentClass = function (Class, Interface) {
  1466. var Super = this;
  1467. var E = function () {};
  1468. E.prototype = Super.prototype;
  1469. var prototype = new E();
  1470. _assign(prototype, Class.prototype);
  1471. Class.prototype = prototype;
  1472. Class.prototype.constructor = Class;
  1473. Class.Interface = _assign({}, Super.Interface, Interface);
  1474. Class.augmentClass = Super.augmentClass;
  1475. PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
  1476. };
  1477. PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
  1478. module.exports = SyntheticEvent;
  1479. /**
  1480. * Helper to nullify syntheticEvent instance properties when destructing
  1481. *
  1482. * @param {object} SyntheticEvent
  1483. * @param {String} propName
  1484. * @return {object} defineProperty object
  1485. */
  1486. function getPooledWarningPropertyDefinition(propName, getVal) {
  1487. var isFunction = typeof getVal === 'function';
  1488. return {
  1489. configurable: true,
  1490. set: set,
  1491. get: get
  1492. };
  1493. function set(val) {
  1494. var action = isFunction ? 'setting the method' : 'setting the property';
  1495. warn(action, 'This is effectively a no-op');
  1496. return val;
  1497. }
  1498. function get() {
  1499. var action = isFunction ? 'accessing the method' : 'accessing the property';
  1500. var result = isFunction ? 'This is a no-op function' : 'This is set to null';
  1501. warn(action, result);
  1502. return getVal;
  1503. }
  1504. function warn(action, result) {
  1505. var warningCondition = false;
  1506. process.env.NODE_ENV !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
  1507. }
  1508. }
  1509. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  1510. /***/ }),
  1511. /* 13 */
  1512. /***/ (function(module, exports, __webpack_require__) {
  1513. "use strict";
  1514. /* WEBPACK VAR INJECTION */(function(process) {/**
  1515. * Copyright 2013-present, Facebook, Inc.
  1516. * All rights reserved.
  1517. *
  1518. * This source code is licensed under the BSD-style license found in the
  1519. * LICENSE file in the root directory of this source tree. An additional grant
  1520. * of patent rights can be found in the PATENTS file in the same directory.
  1521. *
  1522. */
  1523. var _prodInvariant = __webpack_require__(3);
  1524. var invariant = __webpack_require__(1);
  1525. function checkMask(value, bitmask) {
  1526. return (value & bitmask) === bitmask;
  1527. }
  1528. var DOMPropertyInjection = {
  1529. /**
  1530. * Mapping from normalized, camelcased property names to a configuration that
  1531. * specifies how the associated DOM property should be accessed or rendered.
  1532. */
  1533. MUST_USE_PROPERTY: 0x1,
  1534. HAS_BOOLEAN_VALUE: 0x4,
  1535. HAS_NUMERIC_VALUE: 0x8,
  1536. HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
  1537. HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
  1538. /**
  1539. * Inject some specialized knowledge about the DOM. This takes a config object
  1540. * with the following properties:
  1541. *
  1542. * isCustomAttribute: function that given an attribute name will return true
  1543. * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
  1544. * attributes where it's impossible to enumerate all of the possible
  1545. * attribute names,
  1546. *
  1547. * Properties: object mapping DOM property name to one of the
  1548. * DOMPropertyInjection constants or null. If your attribute isn't in here,
  1549. * it won't get written to the DOM.
  1550. *
  1551. * DOMAttributeNames: object mapping React attribute name to the DOM
  1552. * attribute name. Attribute names not specified use the **lowercase**
  1553. * normalized name.
  1554. *
  1555. * DOMAttributeNamespaces: object mapping React attribute name to the DOM
  1556. * attribute namespace URL. (Attribute names not specified use no namespace.)
  1557. *
  1558. * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
  1559. * Property names not specified use the normalized name.
  1560. *
  1561. * DOMMutationMethods: Properties that require special mutation methods. If
  1562. * `value` is undefined, the mutation method should unset the property.
  1563. *
  1564. * @param {object} domPropertyConfig the config as described above.
  1565. */
  1566. injectDOMPropertyConfig: function (domPropertyConfig) {
  1567. var Injection = DOMPropertyInjection;
  1568. var Properties = domPropertyConfig.Properties || {};
  1569. var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
  1570. var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
  1571. var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
  1572. var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
  1573. if (domPropertyConfig.isCustomAttribute) {
  1574. DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
  1575. }
  1576. for (var propName in Properties) {
  1577. !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
  1578. var lowerCased = propName.toLowerCase();
  1579. var propConfig = Properties[propName];
  1580. var propertyInfo = {
  1581. attributeName: lowerCased,
  1582. attributeNamespace: null,
  1583. propertyName: propName,
  1584. mutationMethod: null,
  1585. mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
  1586. hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
  1587. hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
  1588. hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
  1589. hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
  1590. };
  1591. !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
  1592. if (process.env.NODE_ENV !== 'production') {
  1593. DOMProperty.getPossibleStandardName[lowerCased] = propName;
  1594. }
  1595. if (DOMAttributeNames.hasOwnProperty(propName)) {
  1596. var attributeName = DOMAttributeNames[propName];
  1597. propertyInfo.attributeName = attributeName;
  1598. if (process.env.NODE_ENV !== 'production') {
  1599. DOMProperty.getPossibleStandardName[attributeName] = propName;
  1600. }
  1601. }
  1602. if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
  1603. propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
  1604. }
  1605. if (DOMPropertyNames.hasOwnProperty(propName)) {
  1606. propertyInfo.propertyName = DOMPropertyNames[propName];
  1607. }
  1608. if (DOMMutationMethods.hasOwnProperty(propName)) {
  1609. propertyInfo.mutationMethod = DOMMutationMethods[propName];
  1610. }
  1611. DOMProperty.properties[propName] = propertyInfo;
  1612. }
  1613. }
  1614. };
  1615. /* eslint-disable max-len */
  1616. var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
  1617. /* eslint-enable max-len */
  1618. /**
  1619. * DOMProperty exports lookup objects that can be used like functions:
  1620. *
  1621. * > DOMProperty.isValid['id']
  1622. * true
  1623. * > DOMProperty.isValid['foobar']
  1624. * undefined
  1625. *
  1626. * Although this may be confusing, it performs better in general.
  1627. *
  1628. * @see http://jsperf.com/key-exists
  1629. * @see http://jsperf.com/key-missing
  1630. */
  1631. var DOMProperty = {
  1632. ID_ATTRIBUTE_NAME: 'data-reactid',
  1633. ROOT_ATTRIBUTE_NAME: 'data-reactroot',
  1634. ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
  1635. ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
  1636. /**
  1637. * Map from property "standard name" to an object with info about how to set
  1638. * the property in the DOM. Each object contains:
  1639. *
  1640. * attributeName:
  1641. * Used when rendering markup or with `*Attribute()`.
  1642. * attributeNamespace
  1643. * propertyName:
  1644. * Used on DOM node instances. (This includes properties that mutate due to
  1645. * external factors.)
  1646. * mutationMethod:
  1647. * If non-null, used instead of the property or `setAttribute()` after
  1648. * initial render.
  1649. * mustUseProperty:
  1650. * Whether the property must be accessed and mutated as an object property.
  1651. * hasBooleanValue:
  1652. * Whether the property should be removed when set to a falsey value.
  1653. * hasNumericValue:
  1654. * Whether the property must be numeric or parse as a numeric and should be
  1655. * removed when set to a falsey value.
  1656. * hasPositiveNumericValue:
  1657. * Whether the property must be positive numeric or parse as a positive
  1658. * numeric and should be removed when set to a falsey value.
  1659. * hasOverloadedBooleanValue:
  1660. * Whether the property can be used as a flag as well as with a value.
  1661. * Removed when strictly equal to false; present without a value when
  1662. * strictly equal to true; present with a value otherwise.
  1663. */
  1664. properties: {},
  1665. /**
  1666. * Mapping from lowercase property names to the properly cased version, used
  1667. * to warn in the case of missing properties. Available only in __DEV__.
  1668. *
  1669. * autofocus is predefined, because adding it to the property whitelist
  1670. * causes unintended side effects.
  1671. *
  1672. * @type {Object}
  1673. */
  1674. getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null,
  1675. /**
  1676. * All of the isCustomAttribute() functions that have been injected.
  1677. */
  1678. _isCustomAttributeFunctions: [],
  1679. /**
  1680. * Checks whether a property name is a custom attribute.
  1681. * @method
  1682. */
  1683. isCustomAttribute: function (attributeName) {
  1684. for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
  1685. var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
  1686. if (isCustomAttributeFn(attributeName)) {
  1687. return true;
  1688. }
  1689. }
  1690. return false;
  1691. },
  1692. injection: DOMPropertyInjection
  1693. };
  1694. module.exports = DOMProperty;
  1695. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  1696. /***/ }),
  1697. /* 14 */
  1698. /***/ (function(module, exports, __webpack_require__) {
  1699. "use strict";
  1700. /* WEBPACK VAR INJECTION */(function(process) {/**
  1701. * Copyright 2013-present, Facebook, Inc.
  1702. * All rights reserved.
  1703. *
  1704. * This source code is licensed under the BSD-style license found in the
  1705. * LICENSE file in the root directory of this source tree. An additional grant
  1706. * of patent rights can be found in the PATENTS file in the same directory.
  1707. *
  1708. *
  1709. */
  1710. var _prodInvariant = __webpack_require__(3);
  1711. var invariant = __webpack_require__(1);
  1712. /**
  1713. * Static poolers. Several custom versions for each potential number of
  1714. * arguments. A completely generic pooler is easy to implement, but would
  1715. * require accessing the `arguments` object. In each of these, `this` refers to
  1716. * the Class itself, not an instance. If any others are needed, simply add them
  1717. * here, or in their own files.
  1718. */
  1719. var oneArgumentPooler = function (copyFieldsFrom) {
  1720. var Klass = this;
  1721. if (Klass.instancePool.length) {
  1722. var instance = Klass.instancePool.pop();
  1723. Klass.call(instance, copyFieldsFrom);
  1724. return instance;
  1725. } else {
  1726. return new Klass(copyFieldsFrom);
  1727. }
  1728. };
  1729. var twoArgumentPooler = function (a1, a2) {
  1730. var Klass = this;
  1731. if (Klass.instancePool.length) {
  1732. var instance = Klass.instancePool.pop();
  1733. Klass.call(instance, a1, a2);
  1734. return instance;
  1735. } else {
  1736. return new Klass(a1, a2);
  1737. }
  1738. };
  1739. var threeArgumentPooler = function (a1, a2, a3) {
  1740. var Klass = this;
  1741. if (Klass.instancePool.length) {
  1742. var instance = Klass.instancePool.pop();
  1743. Klass.call(instance, a1, a2, a3);
  1744. return instance;
  1745. } else {
  1746. return new Klass(a1, a2, a3);
  1747. }
  1748. };
  1749. var fourArgumentPooler = function (a1, a2, a3, a4) {
  1750. var Klass = this;
  1751. if (Klass.instancePool.length) {
  1752. var instance = Klass.instancePool.pop();
  1753. Klass.call(instance, a1, a2, a3, a4);
  1754. return instance;
  1755. } else {
  1756. return new Klass(a1, a2, a3, a4);
  1757. }
  1758. };
  1759. var standardReleaser = function (instance) {
  1760. var Klass = this;
  1761. !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
  1762. instance.destructor();
  1763. if (Klass.instancePool.length < Klass.poolSize) {
  1764. Klass.instancePool.push(instance);
  1765. }
  1766. };
  1767. var DEFAULT_POOL_SIZE = 10;
  1768. var DEFAULT_POOLER = oneArgumentPooler;
  1769. /**
  1770. * Augments `CopyConstructor` to be a poolable class, augmenting only the class
  1771. * itself (statically) not adding any prototypical fields. Any CopyConstructor
  1772. * you give this may have a `poolSize` property, and will look for a
  1773. * prototypical `destructor` on instances.
  1774. *
  1775. * @param {Function} CopyConstructor Constructor that can be used to reset.
  1776. * @param {Function} pooler Customizable pooler.
  1777. */
  1778. var addPoolingTo = function (CopyConstructor, pooler) {
  1779. // Casting as any so that flow ignores the actual implementation and trusts
  1780. // it to match the type we declared
  1781. var NewKlass = CopyConstructor;
  1782. NewKlass.instancePool = [];
  1783. NewKlass.getPooled = pooler || DEFAULT_POOLER;
  1784. if (!NewKlass.poolSize) {
  1785. NewKlass.poolSize = DEFAULT_POOL_SIZE;
  1786. }
  1787. NewKlass.release = standardReleaser;
  1788. return NewKlass;
  1789. };
  1790. var PooledClass = {
  1791. addPoolingTo: addPoolingTo,
  1792. oneArgumentPooler: oneArgumentPooler,
  1793. twoArgumentPooler: twoArgumentPooler,
  1794. threeArgumentPooler: threeArgumentPooler,
  1795. fourArgumentPooler: fourArgumentPooler
  1796. };
  1797. module.exports = PooledClass;
  1798. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  1799. /***/ }),
  1800. /* 15 */
  1801. /***/ (function(module, exports, __webpack_require__) {
  1802. "use strict";
  1803. /* WEBPACK VAR INJECTION */(function(process) {/**
  1804. * Copyright 2014-present, Facebook, Inc.
  1805. * All rights reserved.
  1806. *
  1807. * This source code is licensed under the BSD-style license found in the
  1808. * LICENSE file in the root directory of this source tree. An additional grant
  1809. * of patent rights can be found in the PATENTS file in the same directory.
  1810. *
  1811. */
  1812. var _assign = __webpack_require__(4);
  1813. var ReactCurrentOwner = __webpack_require__(11);
  1814. var warning = __webpack_require__(2);
  1815. var canDefineProperty = __webpack_require__(31);
  1816. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1817. var REACT_ELEMENT_TYPE = __webpack_require__(77);
  1818. var RESERVED_PROPS = {
  1819. key: true,
  1820. ref: true,
  1821. __self: true,
  1822. __source: true
  1823. };
  1824. var specialPropKeyWarningShown, specialPropRefWarningShown;
  1825. function hasValidRef(config) {
  1826. if (process.env.NODE_ENV !== 'production') {
  1827. if (hasOwnProperty.call(config, 'ref')) {
  1828. var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
  1829. if (getter && getter.isReactWarning) {
  1830. return false;
  1831. }
  1832. }
  1833. }
  1834. return config.ref !== undefined;
  1835. }
  1836. function hasValidKey(config) {
  1837. if (process.env.NODE_ENV !== 'production') {
  1838. if (hasOwnProperty.call(config, 'key')) {
  1839. var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
  1840. if (getter && getter.isReactWarning) {
  1841. return false;
  1842. }
  1843. }
  1844. }
  1845. return config.key !== undefined;
  1846. }
  1847. function defineKeyPropWarningGetter(props, displayName) {
  1848. var warnAboutAccessingKey = function () {
  1849. if (!specialPropKeyWarningShown) {
  1850. specialPropKeyWarningShown = true;
  1851. process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
  1852. }
  1853. };
  1854. warnAboutAccessingKey.isReactWarning = true;
  1855. Object.defineProperty(props, 'key', {
  1856. get: warnAboutAccessingKey,
  1857. configurable: true
  1858. });
  1859. }
  1860. function defineRefPropWarningGetter(props, displayName) {
  1861. var warnAboutAccessingRef = function () {
  1862. if (!specialPropRefWarningShown) {
  1863. specialPropRefWarningShown = true;
  1864. process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
  1865. }
  1866. };
  1867. warnAboutAccessingRef.isReactWarning = true;
  1868. Object.defineProperty(props, 'ref', {
  1869. get: warnAboutAccessingRef,
  1870. configurable: true
  1871. });
  1872. }
  1873. /**
  1874. * Factory method to create a new React element. This no longer adheres to
  1875. * the class pattern, so do not use new to call it. Also, no instanceof check
  1876. * will work. Instead test $$typeof field against Symbol.for('react.element') to check
  1877. * if something is a React Element.
  1878. *
  1879. * @param {*} type
  1880. * @param {*} key
  1881. * @param {string|object} ref
  1882. * @param {*} self A *temporary* helper to detect places where `this` is
  1883. * different from the `owner` when React.createElement is called, so that we
  1884. * can warn. We want to get rid of owner and replace string `ref`s with arrow
  1885. * functions, and as long as `this` and owner are the same, there will be no
  1886. * change in behavior.
  1887. * @param {*} source An annotation object (added by a transpiler or otherwise)
  1888. * indicating filename, line number, and/or other information.
  1889. * @param {*} owner
  1890. * @param {*} props
  1891. * @internal
  1892. */
  1893. var ReactElement = function (type, key, ref, self, source, owner, props) {
  1894. var element = {
  1895. // This tag allow us to uniquely identify this as a React Element
  1896. $$typeof: REACT_ELEMENT_TYPE,
  1897. // Built-in properties that belong on the element
  1898. type: type,
  1899. key: key,
  1900. ref: ref,
  1901. props: props,
  1902. // Record the component responsible for creating this element.
  1903. _owner: owner
  1904. };
  1905. if (process.env.NODE_ENV !== 'production') {
  1906. // The validation flag is currently mutative. We put it on
  1907. // an external backing store so that we can freeze the whole object.
  1908. // This can be replaced with a WeakMap once they are implemented in
  1909. // commonly used development environments.
  1910. element._store = {};
  1911. // To make comparing ReactElements easier for testing purposes, we make
  1912. // the validation flag non-enumerable (where possible, which should
  1913. // include every environment we run tests in), so the test framework
  1914. // ignores it.
  1915. if (canDefineProperty) {
  1916. Object.defineProperty(element._store, 'validated', {
  1917. configurable: false,
  1918. enumerable: false,
  1919. writable: true,
  1920. value: false
  1921. });
  1922. // self and source are DEV only properties.
  1923. Object.defineProperty(element, '_self', {
  1924. configurable: false,
  1925. enumerable: false,
  1926. writable: false,
  1927. value: self
  1928. });
  1929. // Two elements created in two different places should be considered
  1930. // equal for testing purposes and therefore we hide it from enumeration.
  1931. Object.defineProperty(element, '_source', {
  1932. configurable: false,
  1933. enumerable: false,
  1934. writable: false,
  1935. value: source
  1936. });
  1937. } else {
  1938. element._store.validated = false;
  1939. element._self = self;
  1940. element._source = source;
  1941. }
  1942. if (Object.freeze) {
  1943. Object.freeze(element.props);
  1944. Object.freeze(element);
  1945. }
  1946. }
  1947. return element;
  1948. };
  1949. /**
  1950. * Create and return a new ReactElement of the given type.
  1951. * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
  1952. */
  1953. ReactElement.createElement = function (type, config, children) {
  1954. var propName;
  1955. // Reserved names are extracted
  1956. var props = {};
  1957. var key = null;
  1958. var ref = null;
  1959. var self = null;
  1960. var source = null;
  1961. if (config != null) {
  1962. if (hasValidRef(config)) {
  1963. ref = config.ref;
  1964. }
  1965. if (hasValidKey(config)) {
  1966. key = '' + config.key;
  1967. }
  1968. self = config.__self === undefined ? null : config.__self;
  1969. source = config.__source === undefined ? null : config.__source;
  1970. // Remaining properties are added to a new props object
  1971. for (propName in config) {
  1972. if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
  1973. props[propName] = config[propName];
  1974. }
  1975. }
  1976. }
  1977. // Children can be more than one argument, and those are transferred onto
  1978. // the newly allocated props object.
  1979. var childrenLength = arguments.length - 2;
  1980. if (childrenLength === 1) {
  1981. props.children = children;
  1982. } else if (childrenLength > 1) {
  1983. var childArray = Array(childrenLength);
  1984. for (var i = 0; i < childrenLength; i++) {
  1985. childArray[i] = arguments[i + 2];
  1986. }
  1987. if (process.env.NODE_ENV !== 'production') {
  1988. if (Object.freeze) {
  1989. Object.freeze(childArray);
  1990. }
  1991. }
  1992. props.children = childArray;
  1993. }
  1994. // Resolve default props
  1995. if (type && type.defaultProps) {
  1996. var defaultProps = type.defaultProps;
  1997. for (propName in defaultProps) {
  1998. if (props[propName] === undefined) {
  1999. props[propName] = defaultProps[propName];
  2000. }
  2001. }
  2002. }
  2003. if (process.env.NODE_ENV !== 'production') {
  2004. if (key || ref) {
  2005. if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
  2006. var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
  2007. if (key) {
  2008. defineKeyPropWarningGetter(props, displayName);
  2009. }
  2010. if (ref) {
  2011. defineRefPropWarningGetter(props, displayName);
  2012. }
  2013. }
  2014. }
  2015. }
  2016. return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
  2017. };
  2018. /**
  2019. * Return a function that produces ReactElements of a given type.
  2020. * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
  2021. */
  2022. ReactElement.createFactory = function (type) {
  2023. var factory = ReactElement.createElement.bind(null, type);
  2024. // Expose the type on the factory and the prototype so that it can be
  2025. // easily accessed on elements. E.g. `<Foo />.type === Foo`.
  2026. // This should not be named `constructor` since this may not be the function
  2027. // that created the element, and it may not even be a constructor.
  2028. // Legacy hook TODO: Warn if this is accessed
  2029. factory.type = type;
  2030. return factory;
  2031. };
  2032. ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
  2033. var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
  2034. return newElement;
  2035. };
  2036. /**
  2037. * Clone and return a new ReactElement using element as the starting point.
  2038. * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
  2039. */
  2040. ReactElement.cloneElement = function (element, config, children) {
  2041. var propName;
  2042. // Original props are copied
  2043. var props = _assign({}, element.props);
  2044. // Reserved names are extracted
  2045. var key = element.key;
  2046. var ref = element.ref;
  2047. // Self is preserved since the owner is preserved.
  2048. var self = element._self;
  2049. // Source is preserved since cloneElement is unlikely to be targeted by a
  2050. // transpiler, and the original source is probably a better indicator of the
  2051. // true owner.
  2052. var source = element._source;
  2053. // Owner will be preserved, unless ref is overridden
  2054. var owner = element._owner;
  2055. if (config != null) {
  2056. if (hasValidRef(config)) {
  2057. // Silently steal the ref from the parent.
  2058. ref = config.ref;
  2059. owner = ReactCurrentOwner.current;
  2060. }
  2061. if (hasValidKey(config)) {
  2062. key = '' + config.key;
  2063. }
  2064. // Remaining properties override existing props
  2065. var defaultProps;
  2066. if (element.type && element.type.defaultProps) {
  2067. defaultProps = element.type.defaultProps;
  2068. }
  2069. for (propName in config) {
  2070. if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
  2071. if (config[propName] === undefined && defaultProps !== undefined) {
  2072. // Resolve default props
  2073. props[propName] = defaultProps[propName];
  2074. } else {
  2075. props[propName] = config[propName];
  2076. }
  2077. }
  2078. }
  2079. }
  2080. // Children can be more than one argument, and those are transferred onto
  2081. // the newly allocated props object.
  2082. var childrenLength = arguments.length - 2;
  2083. if (childrenLength === 1) {
  2084. props.children = children;
  2085. } else if (childrenLength > 1) {
  2086. var childArray = Array(childrenLength);
  2087. for (var i = 0; i < childrenLength; i++) {
  2088. childArray[i] = arguments[i + 2];
  2089. }
  2090. props.children = childArray;
  2091. }
  2092. return ReactElement(element.type, key, ref, self, source, owner, props);
  2093. };
  2094. /**
  2095. * Verifies the object is a ReactElement.
  2096. * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
  2097. * @param {?object} object
  2098. * @return {boolean} True if `object` is a valid component.
  2099. * @final
  2100. */
  2101. ReactElement.isValidElement = function (object) {
  2102. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  2103. };
  2104. module.exports = ReactElement;
  2105. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  2106. /***/ }),
  2107. /* 16 */
  2108. /***/ (function(module, exports, __webpack_require__) {
  2109. "use strict";
  2110. /**
  2111. * Copyright (c) 2013-present, Facebook, Inc.
  2112. * All rights reserved.
  2113. *
  2114. * This source code is licensed under the BSD-style license found in the
  2115. * LICENSE file in the root directory of this source tree. An additional grant
  2116. * of patent rights can be found in the PATENTS file in the same directory.
  2117. *
  2118. *
  2119. */
  2120. /**
  2121. * WARNING: DO NOT manually require this module.
  2122. * This is a replacement for `invariant(...)` used by the error code system
  2123. * and will _only_ be required by the corresponding babel pass.
  2124. * It always throws.
  2125. */
  2126. function reactProdInvariant(code) {
  2127. var argCount = arguments.length - 1;
  2128. var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
  2129. for (var argIdx = 0; argIdx < argCount; argIdx++) {
  2130. message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
  2131. }
  2132. message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
  2133. var error = new Error(message);
  2134. error.name = 'Invariant Violation';
  2135. error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
  2136. throw error;
  2137. }
  2138. module.exports = reactProdInvariant;
  2139. /***/ }),
  2140. /* 17 */
  2141. /***/ (function(module, exports, __webpack_require__) {
  2142. "use strict";
  2143. /**
  2144. * Copyright 2015-present, Facebook, Inc.
  2145. * All rights reserved.
  2146. *
  2147. * This source code is licensed under the BSD-style license found in the
  2148. * LICENSE file in the root directory of this source tree. An additional grant
  2149. * of patent rights can be found in the PATENTS file in the same directory.
  2150. *
  2151. */
  2152. var DOMNamespaces = __webpack_require__(35);
  2153. var setInnerHTML = __webpack_require__(30);
  2154. var createMicrosoftUnsafeLocalFunction = __webpack_require__(42);
  2155. var setTextContent = __webpack_require__(75);
  2156. var ELEMENT_NODE_TYPE = 1;
  2157. var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
  2158. /**
  2159. * In IE (8-11) and Edge, appending nodes with no children is dramatically
  2160. * faster than appending a full subtree, so we essentially queue up the
  2161. * .appendChild calls here and apply them so each node is added to its parent
  2162. * before any children are added.
  2163. *
  2164. * In other browsers, doing so is slower or neutral compared to the other order
  2165. * (in Firefox, twice as slow) so we only do this inversion in IE.
  2166. *
  2167. * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
  2168. */
  2169. var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
  2170. function insertTreeChildren(tree) {
  2171. if (!enableLazy) {
  2172. return;
  2173. }
  2174. var node = tree.node;
  2175. var children = tree.children;
  2176. if (children.length) {
  2177. for (var i = 0; i < children.length; i++) {
  2178. insertTreeBefore(node, children[i], null);
  2179. }
  2180. } else if (tree.html != null) {
  2181. setInnerHTML(node, tree.html);
  2182. } else if (tree.text != null) {
  2183. setTextContent(node, tree.text);
  2184. }
  2185. }
  2186. var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
  2187. // DocumentFragments aren't actually part of the DOM after insertion so
  2188. // appending children won't update the DOM. We need to ensure the fragment
  2189. // is properly populated first, breaking out of our lazy approach for just
  2190. // this level. Also, some <object> plugins (like Flash Player) will read
  2191. // <param> nodes immediately upon insertion into the DOM, so <object>
  2192. // must also be populated prior to insertion into the DOM.
  2193. if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
  2194. insertTreeChildren(tree);
  2195. parentNode.insertBefore(tree.node, referenceNode);
  2196. } else {
  2197. parentNode.insertBefore(tree.node, referenceNode);
  2198. insertTreeChildren(tree);
  2199. }
  2200. });
  2201. function replaceChildWithTree(oldNode, newTree) {
  2202. oldNode.parentNode.replaceChild(newTree.node, oldNode);
  2203. insertTreeChildren(newTree);
  2204. }
  2205. function queueChild(parentTree, childTree) {
  2206. if (enableLazy) {
  2207. parentTree.children.push(childTree);
  2208. } else {
  2209. parentTree.node.appendChild(childTree.node);
  2210. }
  2211. }
  2212. function queueHTML(tree, html) {
  2213. if (enableLazy) {
  2214. tree.html = html;
  2215. } else {
  2216. setInnerHTML(tree.node, html);
  2217. }
  2218. }
  2219. function queueText(tree, text) {
  2220. if (enableLazy) {
  2221. tree.text = text;
  2222. } else {
  2223. setTextContent(tree.node, text);
  2224. }
  2225. }
  2226. function toString() {
  2227. return this.node.nodeName;
  2228. }
  2229. function DOMLazyTree(node) {
  2230. return {
  2231. node: node,
  2232. children: [],
  2233. html: null,
  2234. text: null,
  2235. toString: toString
  2236. };
  2237. }
  2238. DOMLazyTree.insertTreeBefore = insertTreeBefore;
  2239. DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
  2240. DOMLazyTree.queueChild = queueChild;
  2241. DOMLazyTree.queueHTML = queueHTML;
  2242. DOMLazyTree.queueText = queueText;
  2243. module.exports = DOMLazyTree;
  2244. /***/ }),
  2245. /* 18 */
  2246. /***/ (function(module, exports, __webpack_require__) {
  2247. "use strict";
  2248. /* WEBPACK VAR INJECTION */(function(process) {/**
  2249. * Copyright 2013-present, Facebook, Inc.
  2250. * All rights reserved.
  2251. *
  2252. * This source code is licensed under the BSD-style license found in the
  2253. * LICENSE file in the root directory of this source tree. An additional grant
  2254. * of patent rights can be found in the PATENTS file in the same directory.
  2255. *
  2256. */
  2257. var ReactRef = __webpack_require__(144);
  2258. var ReactInstrumentation = __webpack_require__(8);
  2259. var warning = __webpack_require__(2);
  2260. /**
  2261. * Helper to call ReactRef.attachRefs with this composite component, split out
  2262. * to avoid allocations in the transaction mount-ready queue.
  2263. */
  2264. function attachRefs() {
  2265. ReactRef.attachRefs(this, this._currentElement);
  2266. }
  2267. var ReactReconciler = {
  2268. /**
  2269. * Initializes the component, renders markup, and registers event listeners.
  2270. *
  2271. * @param {ReactComponent} internalInstance
  2272. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
  2273. * @param {?object} the containing host component instance
  2274. * @param {?object} info about the host container
  2275. * @return {?string} Rendered markup to be inserted into the DOM.
  2276. * @final
  2277. * @internal
  2278. */
  2279. mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
  2280. ) {
  2281. if (process.env.NODE_ENV !== 'production') {
  2282. if (internalInstance._debugID !== 0) {
  2283. ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
  2284. }
  2285. }
  2286. var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
  2287. if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
  2288. transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
  2289. }
  2290. if (process.env.NODE_ENV !== 'production') {
  2291. if (internalInstance._debugID !== 0) {
  2292. ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
  2293. }
  2294. }
  2295. return markup;
  2296. },
  2297. /**
  2298. * Returns a value that can be passed to
  2299. * ReactComponentEnvironment.replaceNodeWithMarkup.
  2300. */
  2301. getHostNode: function (internalInstance) {
  2302. return internalInstance.getHostNode();
  2303. },
  2304. /**
  2305. * Releases any resources allocated by `mountComponent`.
  2306. *
  2307. * @final
  2308. * @internal
  2309. */
  2310. unmountComponent: function (internalInstance, safely) {
  2311. if (process.env.NODE_ENV !== 'production') {
  2312. if (internalInstance._debugID !== 0) {
  2313. ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
  2314. }
  2315. }
  2316. ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
  2317. internalInstance.unmountComponent(safely);
  2318. if (process.env.NODE_ENV !== 'production') {
  2319. if (internalInstance._debugID !== 0) {
  2320. ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
  2321. }
  2322. }
  2323. },
  2324. /**
  2325. * Update a component using a new element.
  2326. *
  2327. * @param {ReactComponent} internalInstance
  2328. * @param {ReactElement} nextElement
  2329. * @param {ReactReconcileTransaction} transaction
  2330. * @param {object} context
  2331. * @internal
  2332. */
  2333. receiveComponent: function (internalInstance, nextElement, transaction, context) {
  2334. var prevElement = internalInstance._currentElement;
  2335. if (nextElement === prevElement && context === internalInstance._context) {
  2336. // Since elements are immutable after the owner is rendered,
  2337. // we can do a cheap identity compare here to determine if this is a
  2338. // superfluous reconcile. It's possible for state to be mutable but such
  2339. // change should trigger an update of the owner which would recreate
  2340. // the element. We explicitly check for the existence of an owner since
  2341. // it's possible for an element created outside a composite to be
  2342. // deeply mutated and reused.
  2343. // TODO: Bailing out early is just a perf optimization right?
  2344. // TODO: Removing the return statement should affect correctness?
  2345. return;
  2346. }
  2347. if (process.env.NODE_ENV !== 'production') {
  2348. if (internalInstance._debugID !== 0) {
  2349. ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
  2350. }
  2351. }
  2352. var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
  2353. if (refsChanged) {
  2354. ReactRef.detachRefs(internalInstance, prevElement);
  2355. }
  2356. internalInstance.receiveComponent(nextElement, transaction, context);
  2357. if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
  2358. transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
  2359. }
  2360. if (process.env.NODE_ENV !== 'production') {
  2361. if (internalInstance._debugID !== 0) {
  2362. ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
  2363. }
  2364. }
  2365. },
  2366. /**
  2367. * Flush any dirty changes in a component.
  2368. *
  2369. * @param {ReactComponent} internalInstance
  2370. * @param {ReactReconcileTransaction} transaction
  2371. * @internal
  2372. */
  2373. performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
  2374. if (internalInstance._updateBatchNumber !== updateBatchNumber) {
  2375. // The component's enqueued batch number should always be the current
  2376. // batch or the following one.
  2377. process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
  2378. return;
  2379. }
  2380. if (process.env.NODE_ENV !== 'production') {
  2381. if (internalInstance._debugID !== 0) {
  2382. ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
  2383. }
  2384. }
  2385. internalInstance.performUpdateIfNecessary(transaction);
  2386. if (process.env.NODE_ENV !== 'production') {
  2387. if (internalInstance._debugID !== 0) {
  2388. ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
  2389. }
  2390. }
  2391. }
  2392. };
  2393. module.exports = ReactReconciler;
  2394. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  2395. /***/ }),
  2396. /* 19 */
  2397. /***/ (function(module, exports, __webpack_require__) {
  2398. "use strict";
  2399. /* WEBPACK VAR INJECTION */(function(process) {/**
  2400. * Copyright 2013-present, Facebook, Inc.
  2401. * All rights reserved.
  2402. *
  2403. * This source code is licensed under the BSD-style license found in the
  2404. * LICENSE file in the root directory of this source tree. An additional grant
  2405. * of patent rights can be found in the PATENTS file in the same directory.
  2406. *
  2407. */
  2408. var _assign = __webpack_require__(4);
  2409. var ReactChildren = __webpack_require__(174);
  2410. var ReactComponent = __webpack_require__(49);
  2411. var ReactPureComponent = __webpack_require__(179);
  2412. var ReactClass = __webpack_require__(175);
  2413. var ReactDOMFactories = __webpack_require__(176);
  2414. var ReactElement = __webpack_require__(15);
  2415. var ReactPropTypes = __webpack_require__(177);
  2416. var ReactVersion = __webpack_require__(180);
  2417. var onlyChild = __webpack_require__(183);
  2418. var warning = __webpack_require__(2);
  2419. var createElement = ReactElement.createElement;
  2420. var createFactory = ReactElement.createFactory;
  2421. var cloneElement = ReactElement.cloneElement;
  2422. if (process.env.NODE_ENV !== 'production') {
  2423. var canDefineProperty = __webpack_require__(31);
  2424. var ReactElementValidator = __webpack_require__(78);
  2425. var didWarnPropTypesDeprecated = false;
  2426. createElement = ReactElementValidator.createElement;
  2427. createFactory = ReactElementValidator.createFactory;
  2428. cloneElement = ReactElementValidator.cloneElement;
  2429. }
  2430. var __spread = _assign;
  2431. if (process.env.NODE_ENV !== 'production') {
  2432. var warned = false;
  2433. __spread = function () {
  2434. process.env.NODE_ENV !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;
  2435. warned = true;
  2436. return _assign.apply(null, arguments);
  2437. };
  2438. }
  2439. var React = {
  2440. // Modern
  2441. Children: {
  2442. map: ReactChildren.map,
  2443. forEach: ReactChildren.forEach,
  2444. count: ReactChildren.count,
  2445. toArray: ReactChildren.toArray,
  2446. only: onlyChild
  2447. },
  2448. Component: ReactComponent,
  2449. PureComponent: ReactPureComponent,
  2450. createElement: createElement,
  2451. cloneElement: cloneElement,
  2452. isValidElement: ReactElement.isValidElement,
  2453. // Classic
  2454. PropTypes: ReactPropTypes,
  2455. createClass: ReactClass.createClass,
  2456. createFactory: createFactory,
  2457. createMixin: function (mixin) {
  2458. // Currently a noop. Will be used to validate and trace mixins.
  2459. return mixin;
  2460. },
  2461. // This looks DOM specific but these are actually isomorphic helpers
  2462. // since they are just generating DOM strings.
  2463. DOM: ReactDOMFactories,
  2464. version: ReactVersion,
  2465. // Deprecated hook for JSX spread, don't use this for anything.
  2466. __spread: __spread
  2467. };
  2468. // TODO: Fix tests so that this deprecation warning doesn't cause failures.
  2469. if (process.env.NODE_ENV !== 'production') {
  2470. if (canDefineProperty) {
  2471. Object.defineProperty(React, 'PropTypes', {
  2472. get: function () {
  2473. process.env.NODE_ENV !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0;
  2474. didWarnPropTypesDeprecated = true;
  2475. return ReactPropTypes;
  2476. }
  2477. });
  2478. }
  2479. }
  2480. module.exports = React;
  2481. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  2482. /***/ }),
  2483. /* 20 */
  2484. /***/ (function(module, exports, __webpack_require__) {
  2485. "use strict";
  2486. /* WEBPACK VAR INJECTION */(function(process) {/**
  2487. * Copyright (c) 2013-present, Facebook, Inc.
  2488. * All rights reserved.
  2489. *
  2490. * This source code is licensed under the BSD-style license found in the
  2491. * LICENSE file in the root directory of this source tree. An additional grant
  2492. * of patent rights can be found in the PATENTS file in the same directory.
  2493. *
  2494. */
  2495. var emptyObject = {};
  2496. if (process.env.NODE_ENV !== 'production') {
  2497. Object.freeze(emptyObject);
  2498. }
  2499. module.exports = emptyObject;
  2500. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  2501. /***/ }),
  2502. /* 21 */
  2503. /***/ (function(module, exports, __webpack_require__) {
  2504. "use strict";
  2505. /* WEBPACK VAR INJECTION */(function(process) {/**
  2506. * Copyright 2013-present, Facebook, Inc.
  2507. * All rights reserved.
  2508. *
  2509. * This source code is licensed under the BSD-style license found in the
  2510. * LICENSE file in the root directory of this source tree. An additional grant
  2511. * of patent rights can be found in the PATENTS file in the same directory.
  2512. *
  2513. */
  2514. var _prodInvariant = __webpack_require__(3);
  2515. var EventPluginRegistry = __webpack_require__(25);
  2516. var EventPluginUtils = __webpack_require__(36);
  2517. var ReactErrorUtils = __webpack_require__(40);
  2518. var accumulateInto = __webpack_require__(69);
  2519. var forEachAccumulated = __webpack_require__(70);
  2520. var invariant = __webpack_require__(1);
  2521. /**
  2522. * Internal store for event listeners
  2523. */
  2524. var listenerBank = {};
  2525. /**
  2526. * Internal queue of events that have accumulated their dispatches and are
  2527. * waiting to have their dispatches executed.
  2528. */
  2529. var eventQueue = null;
  2530. /**
  2531. * Dispatches an event and releases it back into the pool, unless persistent.
  2532. *
  2533. * @param {?object} event Synthetic event to be dispatched.
  2534. * @param {boolean} simulated If the event is simulated (changes exn behavior)
  2535. * @private
  2536. */
  2537. var executeDispatchesAndRelease = function (event, simulated) {
  2538. if (event) {
  2539. EventPluginUtils.executeDispatchesInOrder(event, simulated);
  2540. if (!event.isPersistent()) {
  2541. event.constructor.release(event);
  2542. }
  2543. }
  2544. };
  2545. var executeDispatchesAndReleaseSimulated = function (e) {
  2546. return executeDispatchesAndRelease(e, true);
  2547. };
  2548. var executeDispatchesAndReleaseTopLevel = function (e) {
  2549. return executeDispatchesAndRelease(e, false);
  2550. };
  2551. var getDictionaryKey = function (inst) {
  2552. // Prevents V8 performance issue:
  2553. // https://github.com/facebook/react/pull/7232
  2554. return '.' + inst._rootNodeID;
  2555. };
  2556. function isInteractive(tag) {
  2557. return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
  2558. }
  2559. function shouldPreventMouseEvent(name, type, props) {
  2560. switch (name) {
  2561. case 'onClick':
  2562. case 'onClickCapture':
  2563. case 'onDoubleClick':
  2564. case 'onDoubleClickCapture':
  2565. case 'onMouseDown':
  2566. case 'onMouseDownCapture':
  2567. case 'onMouseMove':
  2568. case 'onMouseMoveCapture':
  2569. case 'onMouseUp':
  2570. case 'onMouseUpCapture':
  2571. return !!(props.disabled && isInteractive(type));
  2572. default:
  2573. return false;
  2574. }
  2575. }
  2576. /**
  2577. * This is a unified interface for event plugins to be installed and configured.
  2578. *
  2579. * Event plugins can implement the following properties:
  2580. *
  2581. * `extractEvents` {function(string, DOMEventTarget, string, object): *}
  2582. * Required. When a top-level event is fired, this method is expected to
  2583. * extract synthetic events that will in turn be queued and dispatched.
  2584. *
  2585. * `eventTypes` {object}
  2586. * Optional, plugins that fire events must publish a mapping of registration
  2587. * names that are used to register listeners. Values of this mapping must
  2588. * be objects that contain `registrationName` or `phasedRegistrationNames`.
  2589. *
  2590. * `executeDispatch` {function(object, function, string)}
  2591. * Optional, allows plugins to override how an event gets dispatched. By
  2592. * default, the listener is simply invoked.
  2593. *
  2594. * Each plugin that is injected into `EventsPluginHub` is immediately operable.
  2595. *
  2596. * @public
  2597. */
  2598. var EventPluginHub = {
  2599. /**
  2600. * Methods for injecting dependencies.
  2601. */
  2602. injection: {
  2603. /**
  2604. * @param {array} InjectedEventPluginOrder
  2605. * @public
  2606. */
  2607. injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
  2608. /**
  2609. * @param {object} injectedNamesToPlugins Map from names to plugin modules.
  2610. */
  2611. injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
  2612. },
  2613. /**
  2614. * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
  2615. *
  2616. * @param {object} inst The instance, which is the source of events.
  2617. * @param {string} registrationName Name of listener (e.g. `onClick`).
  2618. * @param {function} listener The callback to store.
  2619. */
  2620. putListener: function (inst, registrationName, listener) {
  2621. !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
  2622. var key = getDictionaryKey(inst);
  2623. var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
  2624. bankForRegistrationName[key] = listener;
  2625. var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
  2626. if (PluginModule && PluginModule.didPutListener) {
  2627. PluginModule.didPutListener(inst, registrationName, listener);
  2628. }
  2629. },
  2630. /**
  2631. * @param {object} inst The instance, which is the source of events.
  2632. * @param {string} registrationName Name of listener (e.g. `onClick`).
  2633. * @return {?function} The stored callback.
  2634. */
  2635. getListener: function (inst, registrationName) {
  2636. // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
  2637. // live here; needs to be moved to a better place soon
  2638. var bankForRegistrationName = listenerBank[registrationName];
  2639. if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
  2640. return null;
  2641. }
  2642. var key = getDictionaryKey(inst);
  2643. return bankForRegistrationName && bankForRegistrationName[key];
  2644. },
  2645. /**
  2646. * Deletes a listener from the registration bank.
  2647. *
  2648. * @param {object} inst The instance, which is the source of events.
  2649. * @param {string} registrationName Name of listener (e.g. `onClick`).
  2650. */
  2651. deleteListener: function (inst, registrationName) {
  2652. var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
  2653. if (PluginModule && PluginModule.willDeleteListener) {
  2654. PluginModule.willDeleteListener(inst, registrationName);
  2655. }
  2656. var bankForRegistrationName = listenerBank[registrationName];
  2657. // TODO: This should never be null -- when is it?
  2658. if (bankForRegistrationName) {
  2659. var key = getDictionaryKey(inst);
  2660. delete bankForRegistrationName[key];
  2661. }
  2662. },
  2663. /**
  2664. * Deletes all listeners for the DOM element with the supplied ID.
  2665. *
  2666. * @param {object} inst The instance, which is the source of events.
  2667. */
  2668. deleteAllListeners: function (inst) {
  2669. var key = getDictionaryKey(inst);
  2670. for (var registrationName in listenerBank) {
  2671. if (!listenerBank.hasOwnProperty(registrationName)) {
  2672. continue;
  2673. }
  2674. if (!listenerBank[registrationName][key]) {
  2675. continue;
  2676. }
  2677. var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
  2678. if (PluginModule && PluginModule.willDeleteListener) {
  2679. PluginModule.willDeleteListener(inst, registrationName);
  2680. }
  2681. delete listenerBank[registrationName][key];
  2682. }
  2683. },
  2684. /**
  2685. * Allows registered plugins an opportunity to extract events from top-level
  2686. * native browser events.
  2687. *
  2688. * @return {*} An accumulation of synthetic events.
  2689. * @internal
  2690. */
  2691. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  2692. var events;
  2693. var plugins = EventPluginRegistry.plugins;
  2694. for (var i = 0; i < plugins.length; i++) {
  2695. // Not every plugin in the ordering may be loaded at runtime.
  2696. var possiblePlugin = plugins[i];
  2697. if (possiblePlugin) {
  2698. var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
  2699. if (extractedEvents) {
  2700. events = accumulateInto(events, extractedEvents);
  2701. }
  2702. }
  2703. }
  2704. return events;
  2705. },
  2706. /**
  2707. * Enqueues a synthetic event that should be dispatched when
  2708. * `processEventQueue` is invoked.
  2709. *
  2710. * @param {*} events An accumulation of synthetic events.
  2711. * @internal
  2712. */
  2713. enqueueEvents: function (events) {
  2714. if (events) {
  2715. eventQueue = accumulateInto(eventQueue, events);
  2716. }
  2717. },
  2718. /**
  2719. * Dispatches all synthetic events on the event queue.
  2720. *
  2721. * @internal
  2722. */
  2723. processEventQueue: function (simulated) {
  2724. // Set `eventQueue` to null before processing it so that we can tell if more
  2725. // events get enqueued while processing.
  2726. var processingEventQueue = eventQueue;
  2727. eventQueue = null;
  2728. if (simulated) {
  2729. forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
  2730. } else {
  2731. forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
  2732. }
  2733. !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
  2734. // This would be a good time to rethrow if any of the event handlers threw.
  2735. ReactErrorUtils.rethrowCaughtError();
  2736. },
  2737. /**
  2738. * These are needed for tests only. Do not use!
  2739. */
  2740. __purge: function () {
  2741. listenerBank = {};
  2742. },
  2743. __getListenerBank: function () {
  2744. return listenerBank;
  2745. }
  2746. };
  2747. module.exports = EventPluginHub;
  2748. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  2749. /***/ }),
  2750. /* 22 */
  2751. /***/ (function(module, exports, __webpack_require__) {
  2752. "use strict";
  2753. /* WEBPACK VAR INJECTION */(function(process) {/**
  2754. * Copyright 2013-present, Facebook, Inc.
  2755. * All rights reserved.
  2756. *
  2757. * This source code is licensed under the BSD-style license found in the
  2758. * LICENSE file in the root directory of this source tree. An additional grant
  2759. * of patent rights can be found in the PATENTS file in the same directory.
  2760. *
  2761. */
  2762. var EventPluginHub = __webpack_require__(21);
  2763. var EventPluginUtils = __webpack_require__(36);
  2764. var accumulateInto = __webpack_require__(69);
  2765. var forEachAccumulated = __webpack_require__(70);
  2766. var warning = __webpack_require__(2);
  2767. var getListener = EventPluginHub.getListener;
  2768. /**
  2769. * Some event types have a notion of different registration names for different
  2770. * "phases" of propagation. This finds listeners by a given phase.
  2771. */
  2772. function listenerAtPhase(inst, event, propagationPhase) {
  2773. var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
  2774. return getListener(inst, registrationName);
  2775. }
  2776. /**
  2777. * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
  2778. * here, allows us to not have to bind or create functions for each event.
  2779. * Mutating the event's members allows us to not have to create a wrapping
  2780. * "dispatch" object that pairs the event with the listener.
  2781. */
  2782. function accumulateDirectionalDispatches(inst, phase, event) {
  2783. if (process.env.NODE_ENV !== 'production') {
  2784. process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
  2785. }
  2786. var listener = listenerAtPhase(inst, event, phase);
  2787. if (listener) {
  2788. event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
  2789. event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
  2790. }
  2791. }
  2792. /**
  2793. * Collect dispatches (must be entirely collected before dispatching - see unit
  2794. * tests). Lazily allocate the array to conserve memory. We must loop through
  2795. * each event and perform the traversal for each one. We cannot perform a
  2796. * single traversal for the entire collection of events because each event may
  2797. * have a different target.
  2798. */
  2799. function accumulateTwoPhaseDispatchesSingle(event) {
  2800. if (event && event.dispatchConfig.phasedRegistrationNames) {
  2801. EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
  2802. }
  2803. }
  2804. /**
  2805. * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
  2806. */
  2807. function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
  2808. if (event && event.dispatchConfig.phasedRegistrationNames) {
  2809. var targetInst = event._targetInst;
  2810. var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
  2811. EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
  2812. }
  2813. }
  2814. /**
  2815. * Accumulates without regard to direction, does not look for phased
  2816. * registration names. Same as `accumulateDirectDispatchesSingle` but without
  2817. * requiring that the `dispatchMarker` be the same as the dispatched ID.
  2818. */
  2819. function accumulateDispatches(inst, ignoredDirection, event) {
  2820. if (event && event.dispatchConfig.registrationName) {
  2821. var registrationName = event.dispatchConfig.registrationName;
  2822. var listener = getListener(inst, registrationName);
  2823. if (listener) {
  2824. event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
  2825. event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
  2826. }
  2827. }
  2828. }
  2829. /**
  2830. * Accumulates dispatches on an `SyntheticEvent`, but only for the
  2831. * `dispatchMarker`.
  2832. * @param {SyntheticEvent} event
  2833. */
  2834. function accumulateDirectDispatchesSingle(event) {
  2835. if (event && event.dispatchConfig.registrationName) {
  2836. accumulateDispatches(event._targetInst, null, event);
  2837. }
  2838. }
  2839. function accumulateTwoPhaseDispatches(events) {
  2840. forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
  2841. }
  2842. function accumulateTwoPhaseDispatchesSkipTarget(events) {
  2843. forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
  2844. }
  2845. function accumulateEnterLeaveDispatches(leave, enter, from, to) {
  2846. EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
  2847. }
  2848. function accumulateDirectDispatches(events) {
  2849. forEachAccumulated(events, accumulateDirectDispatchesSingle);
  2850. }
  2851. /**
  2852. * A small set of propagation patterns, each of which will accept a small amount
  2853. * of information, and generate a set of "dispatch ready event objects" - which
  2854. * are sets of events that have already been annotated with a set of dispatched
  2855. * listener functions/ids. The API is designed this way to discourage these
  2856. * propagation strategies from actually executing the dispatches, since we
  2857. * always want to collect the entire set of dispatches before executing event a
  2858. * single one.
  2859. *
  2860. * @constructor EventPropagators
  2861. */
  2862. var EventPropagators = {
  2863. accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
  2864. accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
  2865. accumulateDirectDispatches: accumulateDirectDispatches,
  2866. accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
  2867. };
  2868. module.exports = EventPropagators;
  2869. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  2870. /***/ }),
  2871. /* 23 */
  2872. /***/ (function(module, exports, __webpack_require__) {
  2873. "use strict";
  2874. /**
  2875. * Copyright 2013-present, Facebook, Inc.
  2876. * All rights reserved.
  2877. *
  2878. * This source code is licensed under the BSD-style license found in the
  2879. * LICENSE file in the root directory of this source tree. An additional grant
  2880. * of patent rights can be found in the PATENTS file in the same directory.
  2881. *
  2882. */
  2883. /**
  2884. * `ReactInstanceMap` maintains a mapping from a public facing stateful
  2885. * instance (key) and the internal representation (value). This allows public
  2886. * methods to accept the user facing instance as an argument and map them back
  2887. * to internal methods.
  2888. */
  2889. // TODO: Replace this with ES6: var ReactInstanceMap = new Map();
  2890. var ReactInstanceMap = {
  2891. /**
  2892. * This API should be called `delete` but we'd have to make sure to always
  2893. * transform these to strings for IE support. When this transform is fully
  2894. * supported we can rename it.
  2895. */
  2896. remove: function (key) {
  2897. key._reactInternalInstance = undefined;
  2898. },
  2899. get: function (key) {
  2900. return key._reactInternalInstance;
  2901. },
  2902. has: function (key) {
  2903. return key._reactInternalInstance !== undefined;
  2904. },
  2905. set: function (key, value) {
  2906. key._reactInternalInstance = value;
  2907. }
  2908. };
  2909. module.exports = ReactInstanceMap;
  2910. /***/ }),
  2911. /* 24 */
  2912. /***/ (function(module, exports, __webpack_require__) {
  2913. "use strict";
  2914. /**
  2915. * Copyright 2013-present, Facebook, Inc.
  2916. * All rights reserved.
  2917. *
  2918. * This source code is licensed under the BSD-style license found in the
  2919. * LICENSE file in the root directory of this source tree. An additional grant
  2920. * of patent rights can be found in the PATENTS file in the same directory.
  2921. *
  2922. */
  2923. var SyntheticEvent = __webpack_require__(12);
  2924. var getEventTarget = __webpack_require__(45);
  2925. /**
  2926. * @interface UIEvent
  2927. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  2928. */
  2929. var UIEventInterface = {
  2930. view: function (event) {
  2931. if (event.view) {
  2932. return event.view;
  2933. }
  2934. var target = getEventTarget(event);
  2935. if (target.window === target) {
  2936. // target is a window object
  2937. return target;
  2938. }
  2939. var doc = target.ownerDocument;
  2940. // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
  2941. if (doc) {
  2942. return doc.defaultView || doc.parentWindow;
  2943. } else {
  2944. return window;
  2945. }
  2946. },
  2947. detail: function (event) {
  2948. return event.detail || 0;
  2949. }
  2950. };
  2951. /**
  2952. * @param {object} dispatchConfig Configuration used to dispatch this event.
  2953. * @param {string} dispatchMarker Marker identifying the event target.
  2954. * @param {object} nativeEvent Native browser event.
  2955. * @extends {SyntheticEvent}
  2956. */
  2957. function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  2958. return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  2959. }
  2960. SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
  2961. module.exports = SyntheticUIEvent;
  2962. /***/ }),
  2963. /* 25 */
  2964. /***/ (function(module, exports, __webpack_require__) {
  2965. "use strict";
  2966. /* WEBPACK VAR INJECTION */(function(process) {/**
  2967. * Copyright 2013-present, Facebook, Inc.
  2968. * All rights reserved.
  2969. *
  2970. * This source code is licensed under the BSD-style license found in the
  2971. * LICENSE file in the root directory of this source tree. An additional grant
  2972. * of patent rights can be found in the PATENTS file in the same directory.
  2973. *
  2974. *
  2975. */
  2976. var _prodInvariant = __webpack_require__(3);
  2977. var invariant = __webpack_require__(1);
  2978. /**
  2979. * Injectable ordering of event plugins.
  2980. */
  2981. var eventPluginOrder = null;
  2982. /**
  2983. * Injectable mapping from names to event plugin modules.
  2984. */
  2985. var namesToPlugins = {};
  2986. /**
  2987. * Recomputes the plugin list using the injected plugins and plugin ordering.
  2988. *
  2989. * @private
  2990. */
  2991. function recomputePluginOrdering() {
  2992. if (!eventPluginOrder) {
  2993. // Wait until an `eventPluginOrder` is injected.
  2994. return;
  2995. }
  2996. for (var pluginName in namesToPlugins) {
  2997. var pluginModule = namesToPlugins[pluginName];
  2998. var pluginIndex = eventPluginOrder.indexOf(pluginName);
  2999. !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
  3000. if (EventPluginRegistry.plugins[pluginIndex]) {
  3001. continue;
  3002. }
  3003. !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
  3004. EventPluginRegistry.plugins[pluginIndex] = pluginModule;
  3005. var publishedEvents = pluginModule.eventTypes;
  3006. for (var eventName in publishedEvents) {
  3007. !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
  3008. }
  3009. }
  3010. }
  3011. /**
  3012. * Publishes an event so that it can be dispatched by the supplied plugin.
  3013. *
  3014. * @param {object} dispatchConfig Dispatch configuration for the event.
  3015. * @param {object} PluginModule Plugin publishing the event.
  3016. * @return {boolean} True if the event was successfully published.
  3017. * @private
  3018. */
  3019. function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
  3020. !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
  3021. EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
  3022. var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  3023. if (phasedRegistrationNames) {
  3024. for (var phaseName in phasedRegistrationNames) {
  3025. if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
  3026. var phasedRegistrationName = phasedRegistrationNames[phaseName];
  3027. publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
  3028. }
  3029. }
  3030. return true;
  3031. } else if (dispatchConfig.registrationName) {
  3032. publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
  3033. return true;
  3034. }
  3035. return false;
  3036. }
  3037. /**
  3038. * Publishes a registration name that is used to identify dispatched events and
  3039. * can be used with `EventPluginHub.putListener` to register listeners.
  3040. *
  3041. * @param {string} registrationName Registration name to add.
  3042. * @param {object} PluginModule Plugin publishing the event.
  3043. * @private
  3044. */
  3045. function publishRegistrationName(registrationName, pluginModule, eventName) {
  3046. !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
  3047. EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
  3048. EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
  3049. if (process.env.NODE_ENV !== 'production') {
  3050. var lowerCasedName = registrationName.toLowerCase();
  3051. EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
  3052. if (registrationName === 'onDoubleClick') {
  3053. EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
  3054. }
  3055. }
  3056. }
  3057. /**
  3058. * Registers plugins so that they can extract and dispatch events.
  3059. *
  3060. * @see {EventPluginHub}
  3061. */
  3062. var EventPluginRegistry = {
  3063. /**
  3064. * Ordered list of injected plugins.
  3065. */
  3066. plugins: [],
  3067. /**
  3068. * Mapping from event name to dispatch config
  3069. */
  3070. eventNameDispatchConfigs: {},
  3071. /**
  3072. * Mapping from registration name to plugin module
  3073. */
  3074. registrationNameModules: {},
  3075. /**
  3076. * Mapping from registration name to event name
  3077. */
  3078. registrationNameDependencies: {},
  3079. /**
  3080. * Mapping from lowercase registration names to the properly cased version,
  3081. * used to warn in the case of missing event handlers. Available
  3082. * only in __DEV__.
  3083. * @type {Object}
  3084. */
  3085. possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,
  3086. // Trust the developer to only use possibleRegistrationNames in __DEV__
  3087. /**
  3088. * Injects an ordering of plugins (by plugin name). This allows the ordering
  3089. * to be decoupled from injection of the actual plugins so that ordering is
  3090. * always deterministic regardless of packaging, on-the-fly injection, etc.
  3091. *
  3092. * @param {array} InjectedEventPluginOrder
  3093. * @internal
  3094. * @see {EventPluginHub.injection.injectEventPluginOrder}
  3095. */
  3096. injectEventPluginOrder: function (injectedEventPluginOrder) {
  3097. !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
  3098. // Clone the ordering so it cannot be dynamically mutated.
  3099. eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
  3100. recomputePluginOrdering();
  3101. },
  3102. /**
  3103. * Injects plugins to be used by `EventPluginHub`. The plugin names must be
  3104. * in the ordering injected by `injectEventPluginOrder`.
  3105. *
  3106. * Plugins can be injected as part of page initialization or on-the-fly.
  3107. *
  3108. * @param {object} injectedNamesToPlugins Map from names to plugin modules.
  3109. * @internal
  3110. * @see {EventPluginHub.injection.injectEventPluginsByName}
  3111. */
  3112. injectEventPluginsByName: function (injectedNamesToPlugins) {
  3113. var isOrderingDirty = false;
  3114. for (var pluginName in injectedNamesToPlugins) {
  3115. if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
  3116. continue;
  3117. }
  3118. var pluginModule = injectedNamesToPlugins[pluginName];
  3119. if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
  3120. !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
  3121. namesToPlugins[pluginName] = pluginModule;
  3122. isOrderingDirty = true;
  3123. }
  3124. }
  3125. if (isOrderingDirty) {
  3126. recomputePluginOrdering();
  3127. }
  3128. },
  3129. /**
  3130. * Looks up the plugin for the supplied event.
  3131. *
  3132. * @param {object} event A synthetic event.
  3133. * @return {?object} The plugin that created the supplied event.
  3134. * @internal
  3135. */
  3136. getPluginModuleForEvent: function (event) {
  3137. var dispatchConfig = event.dispatchConfig;
  3138. if (dispatchConfig.registrationName) {
  3139. return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
  3140. }
  3141. if (dispatchConfig.phasedRegistrationNames !== undefined) {
  3142. // pulling phasedRegistrationNames out of dispatchConfig helps Flow see
  3143. // that it is not undefined.
  3144. var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  3145. for (var phase in phasedRegistrationNames) {
  3146. if (!phasedRegistrationNames.hasOwnProperty(phase)) {
  3147. continue;
  3148. }
  3149. var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
  3150. if (pluginModule) {
  3151. return pluginModule;
  3152. }
  3153. }
  3154. }
  3155. return null;
  3156. },
  3157. /**
  3158. * Exposed for unit testing.
  3159. * @private
  3160. */
  3161. _resetEventPlugins: function () {
  3162. eventPluginOrder = null;
  3163. for (var pluginName in namesToPlugins) {
  3164. if (namesToPlugins.hasOwnProperty(pluginName)) {
  3165. delete namesToPlugins[pluginName];
  3166. }
  3167. }
  3168. EventPluginRegistry.plugins.length = 0;
  3169. var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
  3170. for (var eventName in eventNameDispatchConfigs) {
  3171. if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
  3172. delete eventNameDispatchConfigs[eventName];
  3173. }
  3174. }
  3175. var registrationNameModules = EventPluginRegistry.registrationNameModules;
  3176. for (var registrationName in registrationNameModules) {
  3177. if (registrationNameModules.hasOwnProperty(registrationName)) {
  3178. delete registrationNameModules[registrationName];
  3179. }
  3180. }
  3181. if (process.env.NODE_ENV !== 'production') {
  3182. var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
  3183. for (var lowerCasedName in possibleRegistrationNames) {
  3184. if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
  3185. delete possibleRegistrationNames[lowerCasedName];
  3186. }
  3187. }
  3188. }
  3189. }
  3190. };
  3191. module.exports = EventPluginRegistry;
  3192. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  3193. /***/ }),
  3194. /* 26 */
  3195. /***/ (function(module, exports, __webpack_require__) {
  3196. "use strict";
  3197. /**
  3198. * Copyright 2013-present, Facebook, Inc.
  3199. * All rights reserved.
  3200. *
  3201. * This source code is licensed under the BSD-style license found in the
  3202. * LICENSE file in the root directory of this source tree. An additional grant
  3203. * of patent rights can be found in the PATENTS file in the same directory.
  3204. *
  3205. */
  3206. var _assign = __webpack_require__(4);
  3207. var EventPluginRegistry = __webpack_require__(25);
  3208. var ReactEventEmitterMixin = __webpack_require__(134);
  3209. var ViewportMetrics = __webpack_require__(68);
  3210. var getVendorPrefixedEventName = __webpack_require__(169);
  3211. var isEventSupported = __webpack_require__(46);
  3212. /**
  3213. * Summary of `ReactBrowserEventEmitter` event handling:
  3214. *
  3215. * - Top-level delegation is used to trap most native browser events. This
  3216. * may only occur in the main thread and is the responsibility of
  3217. * ReactEventListener, which is injected and can therefore support pluggable
  3218. * event sources. This is the only work that occurs in the main thread.
  3219. *
  3220. * - We normalize and de-duplicate events to account for browser quirks. This
  3221. * may be done in the worker thread.
  3222. *
  3223. * - Forward these native events (with the associated top-level type used to
  3224. * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
  3225. * to extract any synthetic events.
  3226. *
  3227. * - The `EventPluginHub` will then process each event by annotating them with
  3228. * "dispatches", a sequence of listeners and IDs that care about that event.
  3229. *
  3230. * - The `EventPluginHub` then dispatches the events.
  3231. *
  3232. * Overview of React and the event system:
  3233. *
  3234. * +------------+ .
  3235. * | DOM | .
  3236. * +------------+ .
  3237. * | .
  3238. * v .
  3239. * +------------+ .
  3240. * | ReactEvent | .
  3241. * | Listener | .
  3242. * +------------+ . +-----------+
  3243. * | . +--------+|SimpleEvent|
  3244. * | . | |Plugin |
  3245. * +-----|------+ . v +-----------+
  3246. * | | | . +--------------+ +------------+
  3247. * | +-----------.--->|EventPluginHub| | Event |
  3248. * | | . | | +-----------+ | Propagators|
  3249. * | ReactEvent | . | | |TapEvent | |------------|
  3250. * | Emitter | . | |<---+|Plugin | |other plugin|
  3251. * | | . | | +-----------+ | utilities |
  3252. * | +-----------.--->| | +------------+
  3253. * | | | . +--------------+
  3254. * +-----|------+ . ^ +-----------+
  3255. * | . | |Enter/Leave|
  3256. * + . +-------+|Plugin |
  3257. * +-------------+ . +-----------+
  3258. * | application | .
  3259. * |-------------| .
  3260. * | | .
  3261. * | | .
  3262. * +-------------+ .
  3263. * .
  3264. * React Core . General Purpose Event Plugin System
  3265. */
  3266. var hasEventPageXY;
  3267. var alreadyListeningTo = {};
  3268. var isMonitoringScrollValue = false;
  3269. var reactTopListenersCounter = 0;
  3270. // For events like 'submit' which don't consistently bubble (which we trap at a
  3271. // lower node than `document`), binding at `document` would cause duplicate
  3272. // events so we don't include them here
  3273. var topEventMapping = {
  3274. topAbort: 'abort',
  3275. topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
  3276. topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
  3277. topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
  3278. topBlur: 'blur',
  3279. topCanPlay: 'canplay',
  3280. topCanPlayThrough: 'canplaythrough',
  3281. topChange: 'change',
  3282. topClick: 'click',
  3283. topCompositionEnd: 'compositionend',
  3284. topCompositionStart: 'compositionstart',
  3285. topCompositionUpdate: 'compositionupdate',
  3286. topContextMenu: 'contextmenu',
  3287. topCopy: 'copy',
  3288. topCut: 'cut',
  3289. topDoubleClick: 'dblclick',
  3290. topDrag: 'drag',
  3291. topDragEnd: 'dragend',
  3292. topDragEnter: 'dragenter',
  3293. topDragExit: 'dragexit',
  3294. topDragLeave: 'dragleave',
  3295. topDragOver: 'dragover',
  3296. topDragStart: 'dragstart',
  3297. topDrop: 'drop',
  3298. topDurationChange: 'durationchange',
  3299. topEmptied: 'emptied',
  3300. topEncrypted: 'encrypted',
  3301. topEnded: 'ended',
  3302. topError: 'error',
  3303. topFocus: 'focus',
  3304. topInput: 'input',
  3305. topKeyDown: 'keydown',
  3306. topKeyPress: 'keypress',
  3307. topKeyUp: 'keyup',
  3308. topLoadedData: 'loadeddata',
  3309. topLoadedMetadata: 'loadedmetadata',
  3310. topLoadStart: 'loadstart',
  3311. topMouseDown: 'mousedown',
  3312. topMouseMove: 'mousemove',
  3313. topMouseOut: 'mouseout',
  3314. topMouseOver: 'mouseover',
  3315. topMouseUp: 'mouseup',
  3316. topPaste: 'paste',
  3317. topPause: 'pause',
  3318. topPlay: 'play',
  3319. topPlaying: 'playing',
  3320. topProgress: 'progress',
  3321. topRateChange: 'ratechange',
  3322. topScroll: 'scroll',
  3323. topSeeked: 'seeked',
  3324. topSeeking: 'seeking',
  3325. topSelectionChange: 'selectionchange',
  3326. topStalled: 'stalled',
  3327. topSuspend: 'suspend',
  3328. topTextInput: 'textInput',
  3329. topTimeUpdate: 'timeupdate',
  3330. topTouchCancel: 'touchcancel',
  3331. topTouchEnd: 'touchend',
  3332. topTouchMove: 'touchmove',
  3333. topTouchStart: 'touchstart',
  3334. topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
  3335. topVolumeChange: 'volumechange',
  3336. topWaiting: 'waiting',
  3337. topWheel: 'wheel'
  3338. };
  3339. /**
  3340. * To ensure no conflicts with other potential React instances on the page
  3341. */
  3342. var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
  3343. function getListeningForDocument(mountAt) {
  3344. // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
  3345. // directly.
  3346. if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
  3347. mountAt[topListenersIDKey] = reactTopListenersCounter++;
  3348. alreadyListeningTo[mountAt[topListenersIDKey]] = {};
  3349. }
  3350. return alreadyListeningTo[mountAt[topListenersIDKey]];
  3351. }
  3352. /**
  3353. * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
  3354. * example:
  3355. *
  3356. * EventPluginHub.putListener('myID', 'onClick', myFunction);
  3357. *
  3358. * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
  3359. *
  3360. * @internal
  3361. */
  3362. var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
  3363. /**
  3364. * Injectable event backend
  3365. */
  3366. ReactEventListener: null,
  3367. injection: {
  3368. /**
  3369. * @param {object} ReactEventListener
  3370. */
  3371. injectReactEventListener: function (ReactEventListener) {
  3372. ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
  3373. ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
  3374. }
  3375. },
  3376. /**
  3377. * Sets whether or not any created callbacks should be enabled.
  3378. *
  3379. * @param {boolean} enabled True if callbacks should be enabled.
  3380. */
  3381. setEnabled: function (enabled) {
  3382. if (ReactBrowserEventEmitter.ReactEventListener) {
  3383. ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
  3384. }
  3385. },
  3386. /**
  3387. * @return {boolean} True if callbacks are enabled.
  3388. */
  3389. isEnabled: function () {
  3390. return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
  3391. },
  3392. /**
  3393. * We listen for bubbled touch events on the document object.
  3394. *
  3395. * Firefox v8.01 (and possibly others) exhibited strange behavior when
  3396. * mounting `onmousemove` events at some node that was not the document
  3397. * element. The symptoms were that if your mouse is not moving over something
  3398. * contained within that mount point (for example on the background) the
  3399. * top-level listeners for `onmousemove` won't be called. However, if you
  3400. * register the `mousemove` on the document object, then it will of course
  3401. * catch all `mousemove`s. This along with iOS quirks, justifies restricting
  3402. * top-level listeners to the document object only, at least for these
  3403. * movement types of events and possibly all events.
  3404. *
  3405. * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
  3406. *
  3407. * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
  3408. * they bubble to document.
  3409. *
  3410. * @param {string} registrationName Name of listener (e.g. `onClick`).
  3411. * @param {object} contentDocumentHandle Document which owns the container
  3412. */
  3413. listenTo: function (registrationName, contentDocumentHandle) {
  3414. var mountAt = contentDocumentHandle;
  3415. var isListening = getListeningForDocument(mountAt);
  3416. var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
  3417. for (var i = 0; i < dependencies.length; i++) {
  3418. var dependency = dependencies[i];
  3419. if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
  3420. if (dependency === 'topWheel') {
  3421. if (isEventSupported('wheel')) {
  3422. ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
  3423. } else if (isEventSupported('mousewheel')) {
  3424. ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
  3425. } else {
  3426. // Firefox needs to capture a different mouse scroll event.
  3427. // @see http://www.quirksmode.org/dom/events/tests/scroll.html
  3428. ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
  3429. }
  3430. } else if (dependency === 'topScroll') {
  3431. if (isEventSupported('scroll', true)) {
  3432. ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
  3433. } else {
  3434. ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
  3435. }
  3436. } else if (dependency === 'topFocus' || dependency === 'topBlur') {
  3437. if (isEventSupported('focus', true)) {
  3438. ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
  3439. ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
  3440. } else if (isEventSupported('focusin')) {
  3441. // IE has `focusin` and `focusout` events which bubble.
  3442. // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
  3443. ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
  3444. ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
  3445. }
  3446. // to make sure blur and focus event listeners are only attached once
  3447. isListening.topBlur = true;
  3448. isListening.topFocus = true;
  3449. } else if (topEventMapping.hasOwnProperty(dependency)) {
  3450. ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
  3451. }
  3452. isListening[dependency] = true;
  3453. }
  3454. }
  3455. },
  3456. trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
  3457. return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
  3458. },
  3459. trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
  3460. return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
  3461. },
  3462. /**
  3463. * Protect against document.createEvent() returning null
  3464. * Some popup blocker extensions appear to do this:
  3465. * https://github.com/facebook/react/issues/6887
  3466. */
  3467. supportsEventPageXY: function () {
  3468. if (!document.createEvent) {
  3469. return false;
  3470. }
  3471. var ev = document.createEvent('MouseEvent');
  3472. return ev != null && 'pageX' in ev;
  3473. },
  3474. /**
  3475. * Listens to window scroll and resize events. We cache scroll values so that
  3476. * application code can access them without triggering reflows.
  3477. *
  3478. * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
  3479. * pageX/pageY isn't supported (legacy browsers).
  3480. *
  3481. * NOTE: Scroll events do not bubble.
  3482. *
  3483. * @see http://www.quirksmode.org/dom/events/scroll.html
  3484. */
  3485. ensureScrollValueMonitoring: function () {
  3486. if (hasEventPageXY === undefined) {
  3487. hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
  3488. }
  3489. if (!hasEventPageXY && !isMonitoringScrollValue) {
  3490. var refresh = ViewportMetrics.refreshScrollValues;
  3491. ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
  3492. isMonitoringScrollValue = true;
  3493. }
  3494. }
  3495. });
  3496. module.exports = ReactBrowserEventEmitter;
  3497. /***/ }),
  3498. /* 27 */
  3499. /***/ (function(module, exports, __webpack_require__) {
  3500. "use strict";
  3501. /**
  3502. * Copyright 2013-present, Facebook, Inc.
  3503. * All rights reserved.
  3504. *
  3505. * This source code is licensed under the BSD-style license found in the
  3506. * LICENSE file in the root directory of this source tree. An additional grant
  3507. * of patent rights can be found in the PATENTS file in the same directory.
  3508. *
  3509. */
  3510. var SyntheticUIEvent = __webpack_require__(24);
  3511. var ViewportMetrics = __webpack_require__(68);
  3512. var getEventModifierState = __webpack_require__(44);
  3513. /**
  3514. * @interface MouseEvent
  3515. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  3516. */
  3517. var MouseEventInterface = {
  3518. screenX: null,
  3519. screenY: null,
  3520. clientX: null,
  3521. clientY: null,
  3522. ctrlKey: null,
  3523. shiftKey: null,
  3524. altKey: null,
  3525. metaKey: null,
  3526. getModifierState: getEventModifierState,
  3527. button: function (event) {
  3528. // Webkit, Firefox, IE9+
  3529. // which: 1 2 3
  3530. // button: 0 1 2 (standard)
  3531. var button = event.button;
  3532. if ('which' in event) {
  3533. return button;
  3534. }
  3535. // IE<9
  3536. // which: undefined
  3537. // button: 0 0 0
  3538. // button: 1 4 2 (onmouseup)
  3539. return button === 2 ? 2 : button === 4 ? 1 : 0;
  3540. },
  3541. buttons: null,
  3542. relatedTarget: function (event) {
  3543. return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
  3544. },
  3545. // "Proprietary" Interface.
  3546. pageX: function (event) {
  3547. return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
  3548. },
  3549. pageY: function (event) {
  3550. return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
  3551. }
  3552. };
  3553. /**
  3554. * @param {object} dispatchConfig Configuration used to dispatch this event.
  3555. * @param {string} dispatchMarker Marker identifying the event target.
  3556. * @param {object} nativeEvent Native browser event.
  3557. * @extends {SyntheticUIEvent}
  3558. */
  3559. function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  3560. return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  3561. }
  3562. SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
  3563. module.exports = SyntheticMouseEvent;
  3564. /***/ }),
  3565. /* 28 */
  3566. /***/ (function(module, exports, __webpack_require__) {
  3567. "use strict";
  3568. /* WEBPACK VAR INJECTION */(function(process) {/**
  3569. * Copyright 2013-present, Facebook, Inc.
  3570. * All rights reserved.
  3571. *
  3572. * This source code is licensed under the BSD-style license found in the
  3573. * LICENSE file in the root directory of this source tree. An additional grant
  3574. * of patent rights can be found in the PATENTS file in the same directory.
  3575. *
  3576. *
  3577. */
  3578. var _prodInvariant = __webpack_require__(3);
  3579. var invariant = __webpack_require__(1);
  3580. var OBSERVED_ERROR = {};
  3581. /**
  3582. * `Transaction` creates a black box that is able to wrap any method such that
  3583. * certain invariants are maintained before and after the method is invoked
  3584. * (Even if an exception is thrown while invoking the wrapped method). Whoever
  3585. * instantiates a transaction can provide enforcers of the invariants at
  3586. * creation time. The `Transaction` class itself will supply one additional
  3587. * automatic invariant for you - the invariant that any transaction instance
  3588. * should not be run while it is already being run. You would typically create a
  3589. * single instance of a `Transaction` for reuse multiple times, that potentially
  3590. * is used to wrap several different methods. Wrappers are extremely simple -
  3591. * they only require implementing two methods.
  3592. *
  3593. * <pre>
  3594. * wrappers (injected at creation time)
  3595. * + +
  3596. * | |
  3597. * +-----------------|--------|--------------+
  3598. * | v | |
  3599. * | +---------------+ | |
  3600. * | +--| wrapper1 |---|----+ |
  3601. * | | +---------------+ v | |
  3602. * | | +-------------+ | |
  3603. * | | +----| wrapper2 |--------+ |
  3604. * | | | +-------------+ | | |
  3605. * | | | | | |
  3606. * | v v v v | wrapper
  3607. * | +---+ +---+ +---------+ +---+ +---+ | invariants
  3608. * perform(anyMethod) | | | | | | | | | | | | maintained
  3609. * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
  3610. * | | | | | | | | | | | |
  3611. * | | | | | | | | | | | |
  3612. * | | | | | | | | | | | |
  3613. * | +---+ +---+ +---------+ +---+ +---+ |
  3614. * | initialize close |
  3615. * +-----------------------------------------+
  3616. * </pre>
  3617. *
  3618. * Use cases:
  3619. * - Preserving the input selection ranges before/after reconciliation.
  3620. * Restoring selection even in the event of an unexpected error.
  3621. * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
  3622. * while guaranteeing that afterwards, the event system is reactivated.
  3623. * - Flushing a queue of collected DOM mutations to the main UI thread after a
  3624. * reconciliation takes place in a worker thread.
  3625. * - Invoking any collected `componentDidUpdate` callbacks after rendering new
  3626. * content.
  3627. * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
  3628. * to preserve the `scrollTop` (an automatic scroll aware DOM).
  3629. * - (Future use case): Layout calculations before and after DOM updates.
  3630. *
  3631. * Transactional plugin API:
  3632. * - A module that has an `initialize` method that returns any precomputation.
  3633. * - and a `close` method that accepts the precomputation. `close` is invoked
  3634. * when the wrapped process is completed, or has failed.
  3635. *
  3636. * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules
  3637. * that implement `initialize` and `close`.
  3638. * @return {Transaction} Single transaction for reuse in thread.
  3639. *
  3640. * @class Transaction
  3641. */
  3642. var TransactionImpl = {
  3643. /**
  3644. * Sets up this instance so that it is prepared for collecting metrics. Does
  3645. * so such that this setup method may be used on an instance that is already
  3646. * initialized, in a way that does not consume additional memory upon reuse.
  3647. * That can be useful if you decide to make your subclass of this mixin a
  3648. * "PooledClass".
  3649. */
  3650. reinitializeTransaction: function () {
  3651. this.transactionWrappers = this.getTransactionWrappers();
  3652. if (this.wrapperInitData) {
  3653. this.wrapperInitData.length = 0;
  3654. } else {
  3655. this.wrapperInitData = [];
  3656. }
  3657. this._isInTransaction = false;
  3658. },
  3659. _isInTransaction: false,
  3660. /**
  3661. * @abstract
  3662. * @return {Array<TransactionWrapper>} Array of transaction wrappers.
  3663. */
  3664. getTransactionWrappers: null,
  3665. isInTransaction: function () {
  3666. return !!this._isInTransaction;
  3667. },
  3668. /**
  3669. * Executes the function within a safety window. Use this for the top level
  3670. * methods that result in large amounts of computation/mutations that would
  3671. * need to be safety checked. The optional arguments helps prevent the need
  3672. * to bind in many cases.
  3673. *
  3674. * @param {function} method Member of scope to call.
  3675. * @param {Object} scope Scope to invoke from.
  3676. * @param {Object?=} a Argument to pass to the method.
  3677. * @param {Object?=} b Argument to pass to the method.
  3678. * @param {Object?=} c Argument to pass to the method.
  3679. * @param {Object?=} d Argument to pass to the method.
  3680. * @param {Object?=} e Argument to pass to the method.
  3681. * @param {Object?=} f Argument to pass to the method.
  3682. *
  3683. * @return {*} Return value from `method`.
  3684. */
  3685. perform: function (method, scope, a, b, c, d, e, f) {
  3686. !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
  3687. var errorThrown;
  3688. var ret;
  3689. try {
  3690. this._isInTransaction = true;
  3691. // Catching errors makes debugging more difficult, so we start with
  3692. // errorThrown set to true before setting it to false after calling
  3693. // close -- if it's still set to true in the finally block, it means
  3694. // one of these calls threw.
  3695. errorThrown = true;
  3696. this.initializeAll(0);
  3697. ret = method.call(scope, a, b, c, d, e, f);
  3698. errorThrown = false;
  3699. } finally {
  3700. try {
  3701. if (errorThrown) {
  3702. // If `method` throws, prefer to show that stack trace over any thrown
  3703. // by invoking `closeAll`.
  3704. try {
  3705. this.closeAll(0);
  3706. } catch (err) {}
  3707. } else {
  3708. // Since `method` didn't throw, we don't want to silence the exception
  3709. // here.
  3710. this.closeAll(0);
  3711. }
  3712. } finally {
  3713. this._isInTransaction = false;
  3714. }
  3715. }
  3716. return ret;
  3717. },
  3718. initializeAll: function (startIndex) {
  3719. var transactionWrappers = this.transactionWrappers;
  3720. for (var i = startIndex; i < transactionWrappers.length; i++) {
  3721. var wrapper = transactionWrappers[i];
  3722. try {
  3723. // Catching errors makes debugging more difficult, so we start with the
  3724. // OBSERVED_ERROR state before overwriting it with the real return value
  3725. // of initialize -- if it's still set to OBSERVED_ERROR in the finally
  3726. // block, it means wrapper.initialize threw.
  3727. this.wrapperInitData[i] = OBSERVED_ERROR;
  3728. this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
  3729. } finally {
  3730. if (this.wrapperInitData[i] === OBSERVED_ERROR) {
  3731. // The initializer for wrapper i threw an error; initialize the
  3732. // remaining wrappers but silence any exceptions from them to ensure
  3733. // that the first error is the one to bubble up.
  3734. try {
  3735. this.initializeAll(i + 1);
  3736. } catch (err) {}
  3737. }
  3738. }
  3739. }
  3740. },
  3741. /**
  3742. * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
  3743. * them the respective return values of `this.transactionWrappers.init[i]`
  3744. * (`close`rs that correspond to initializers that failed will not be
  3745. * invoked).
  3746. */
  3747. closeAll: function (startIndex) {
  3748. !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
  3749. var transactionWrappers = this.transactionWrappers;
  3750. for (var i = startIndex; i < transactionWrappers.length; i++) {
  3751. var wrapper = transactionWrappers[i];
  3752. var initData = this.wrapperInitData[i];
  3753. var errorThrown;
  3754. try {
  3755. // Catching errors makes debugging more difficult, so we start with
  3756. // errorThrown set to true before setting it to false after calling
  3757. // close -- if it's still set to true in the finally block, it means
  3758. // wrapper.close threw.
  3759. errorThrown = true;
  3760. if (initData !== OBSERVED_ERROR && wrapper.close) {
  3761. wrapper.close.call(this, initData);
  3762. }
  3763. errorThrown = false;
  3764. } finally {
  3765. if (errorThrown) {
  3766. // The closer for wrapper i threw an error; close the remaining
  3767. // wrappers but silence any exceptions from them to ensure that the
  3768. // first error is the one to bubble up.
  3769. try {
  3770. this.closeAll(i + 1);
  3771. } catch (e) {}
  3772. }
  3773. }
  3774. }
  3775. this.wrapperInitData.length = 0;
  3776. }
  3777. };
  3778. module.exports = TransactionImpl;
  3779. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  3780. /***/ }),
  3781. /* 29 */
  3782. /***/ (function(module, exports, __webpack_require__) {
  3783. "use strict";
  3784. /**
  3785. * Copyright 2016-present, Facebook, Inc.
  3786. * All rights reserved.
  3787. *
  3788. * This source code is licensed under the BSD-style license found in the
  3789. * LICENSE file in the root directory of this source tree. An additional grant
  3790. * of patent rights can be found in the PATENTS file in the same directory.
  3791. *
  3792. * Based on the escape-html library, which is used under the MIT License below:
  3793. *
  3794. * Copyright (c) 2012-2013 TJ Holowaychuk
  3795. * Copyright (c) 2015 Andreas Lubbe
  3796. * Copyright (c) 2015 Tiancheng "Timothy" Gu
  3797. *
  3798. * Permission is hereby granted, free of charge, to any person obtaining
  3799. * a copy of this software and associated documentation files (the
  3800. * 'Software'), to deal in the Software without restriction, including
  3801. * without limitation the rights to use, copy, modify, merge, publish,
  3802. * distribute, sublicense, and/or sell copies of the Software, and to
  3803. * permit persons to whom the Software is furnished to do so, subject to
  3804. * the following conditions:
  3805. *
  3806. * The above copyright notice and this permission notice shall be
  3807. * included in all copies or substantial portions of the Software.
  3808. *
  3809. * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  3810. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  3811. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  3812. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  3813. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  3814. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  3815. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  3816. *
  3817. */
  3818. // code copied and modified from escape-html
  3819. /**
  3820. * Module variables.
  3821. * @private
  3822. */
  3823. var matchHtmlRegExp = /["'&<>]/;
  3824. /**
  3825. * Escape special characters in the given string of html.
  3826. *
  3827. * @param {string} string The string to escape for inserting into HTML
  3828. * @return {string}
  3829. * @public
  3830. */
  3831. function escapeHtml(string) {
  3832. var str = '' + string;
  3833. var match = matchHtmlRegExp.exec(str);
  3834. if (!match) {
  3835. return str;
  3836. }
  3837. var escape;
  3838. var html = '';
  3839. var index = 0;
  3840. var lastIndex = 0;
  3841. for (index = match.index; index < str.length; index++) {
  3842. switch (str.charCodeAt(index)) {
  3843. case 34:
  3844. // "
  3845. escape = '&quot;';
  3846. break;
  3847. case 38:
  3848. // &
  3849. escape = '&amp;';
  3850. break;
  3851. case 39:
  3852. // '
  3853. escape = '&#x27;'; // modified from escape-html; used to be '&#39'
  3854. break;
  3855. case 60:
  3856. // <
  3857. escape = '&lt;';
  3858. break;
  3859. case 62:
  3860. // >
  3861. escape = '&gt;';
  3862. break;
  3863. default:
  3864. continue;
  3865. }
  3866. if (lastIndex !== index) {
  3867. html += str.substring(lastIndex, index);
  3868. }
  3869. lastIndex = index + 1;
  3870. html += escape;
  3871. }
  3872. return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
  3873. }
  3874. // end code copied and modified from escape-html
  3875. /**
  3876. * Escapes text to prevent scripting attacks.
  3877. *
  3878. * @param {*} text Text value to escape.
  3879. * @return {string} An escaped string.
  3880. */
  3881. function escapeTextContentForBrowser(text) {
  3882. if (typeof text === 'boolean' || typeof text === 'number') {
  3883. // this shortcircuit helps perf for types that we know will never have
  3884. // special characters, especially given that this function is used often
  3885. // for numeric dom ids.
  3886. return '' + text;
  3887. }
  3888. return escapeHtml(text);
  3889. }
  3890. module.exports = escapeTextContentForBrowser;
  3891. /***/ }),
  3892. /* 30 */
  3893. /***/ (function(module, exports, __webpack_require__) {
  3894. "use strict";
  3895. /**
  3896. * Copyright 2013-present, Facebook, Inc.
  3897. * All rights reserved.
  3898. *
  3899. * This source code is licensed under the BSD-style license found in the
  3900. * LICENSE file in the root directory of this source tree. An additional grant
  3901. * of patent rights can be found in the PATENTS file in the same directory.
  3902. *
  3903. */
  3904. var ExecutionEnvironment = __webpack_require__(6);
  3905. var DOMNamespaces = __webpack_require__(35);
  3906. var WHITESPACE_TEST = /^[ \r\n\t\f]/;
  3907. var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
  3908. var createMicrosoftUnsafeLocalFunction = __webpack_require__(42);
  3909. // SVG temp container for IE lacking innerHTML
  3910. var reusableSVGContainer;
  3911. /**
  3912. * Set the innerHTML property of a node, ensuring that whitespace is preserved
  3913. * even in IE8.
  3914. *
  3915. * @param {DOMElement} node
  3916. * @param {string} html
  3917. * @internal
  3918. */
  3919. var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
  3920. // IE does not have innerHTML for SVG nodes, so instead we inject the
  3921. // new markup in a temp node and then move the child nodes across into
  3922. // the target node
  3923. if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
  3924. reusableSVGContainer = reusableSVGContainer || document.createElement('div');
  3925. reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
  3926. var svgNode = reusableSVGContainer.firstChild;
  3927. while (svgNode.firstChild) {
  3928. node.appendChild(svgNode.firstChild);
  3929. }
  3930. } else {
  3931. node.innerHTML = html;
  3932. }
  3933. });
  3934. if (ExecutionEnvironment.canUseDOM) {
  3935. // IE8: When updating a just created node with innerHTML only leading
  3936. // whitespace is removed. When updating an existing node with innerHTML
  3937. // whitespace in root TextNodes is also collapsed.
  3938. // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
  3939. // Feature detection; only IE8 is known to behave improperly like this.
  3940. var testElement = document.createElement('div');
  3941. testElement.innerHTML = ' ';
  3942. if (testElement.innerHTML === '') {
  3943. setInnerHTML = function (node, html) {
  3944. // Magic theory: IE8 supposedly differentiates between added and updated
  3945. // nodes when processing innerHTML, innerHTML on updated nodes suffers
  3946. // from worse whitespace behavior. Re-adding a node like this triggers
  3947. // the initial and more favorable whitespace behavior.
  3948. // TODO: What to do on a detached node?
  3949. if (node.parentNode) {
  3950. node.parentNode.replaceChild(node, node);
  3951. }
  3952. // We also implement a workaround for non-visible tags disappearing into
  3953. // thin air on IE8, this only happens if there is no visible text
  3954. // in-front of the non-visible tags. Piggyback on the whitespace fix
  3955. // and simply check if any non-visible tags appear in the source.
  3956. if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
  3957. // Recover leading whitespace by temporarily prepending any character.
  3958. // \uFEFF has the potential advantage of being zero-width/invisible.
  3959. // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode
  3960. // in hopes that this is preserved even if "\uFEFF" is transformed to
  3961. // the actual Unicode character (by Babel, for example).
  3962. // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
  3963. node.innerHTML = String.fromCharCode(0xFEFF) + html;
  3964. // deleteData leaves an empty `TextNode` which offsets the index of all
  3965. // children. Definitely want to avoid this.
  3966. var textNode = node.firstChild;
  3967. if (textNode.data.length === 1) {
  3968. node.removeChild(textNode);
  3969. } else {
  3970. textNode.deleteData(0, 1);
  3971. }
  3972. } else {
  3973. node.innerHTML = html;
  3974. }
  3975. };
  3976. }
  3977. testElement = null;
  3978. }
  3979. module.exports = setInnerHTML;
  3980. /***/ }),
  3981. /* 31 */
  3982. /***/ (function(module, exports, __webpack_require__) {
  3983. "use strict";
  3984. /* WEBPACK VAR INJECTION */(function(process) {/**
  3985. * Copyright 2013-present, Facebook, Inc.
  3986. * All rights reserved.
  3987. *
  3988. * This source code is licensed under the BSD-style license found in the
  3989. * LICENSE file in the root directory of this source tree. An additional grant
  3990. * of patent rights can be found in the PATENTS file in the same directory.
  3991. *
  3992. *
  3993. */
  3994. var canDefineProperty = false;
  3995. if (process.env.NODE_ENV !== 'production') {
  3996. try {
  3997. // $FlowFixMe https://github.com/facebook/flow/issues/285
  3998. Object.defineProperty({}, 'x', { get: function () {} });
  3999. canDefineProperty = true;
  4000. } catch (x) {
  4001. // IE will fail on defineProperty
  4002. }
  4003. }
  4004. module.exports = canDefineProperty;
  4005. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  4006. /***/ }),
  4007. /* 32 */
  4008. /***/ (function(module, exports, __webpack_require__) {
  4009. "use strict";
  4010. module.exports = __webpack_require__(19);
  4011. /***/ }),
  4012. /* 33 */
  4013. /***/ (function(module, exports, __webpack_require__) {
  4014. "use strict";
  4015. /**
  4016. * Copyright (c) 2013-present, Facebook, Inc.
  4017. * All rights reserved.
  4018. *
  4019. * This source code is licensed under the BSD-style license found in the
  4020. * LICENSE file in the root directory of this source tree. An additional grant
  4021. * of patent rights can be found in the PATENTS file in the same directory.
  4022. *
  4023. * @typechecks
  4024. *
  4025. */
  4026. /*eslint-disable no-self-compare */
  4027. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4028. /**
  4029. * inlined Object.is polyfill to avoid requiring consumers ship their own
  4030. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  4031. */
  4032. function is(x, y) {
  4033. // SameValue algorithm
  4034. if (x === y) {
  4035. // Steps 1-5, 7-10
  4036. // Steps 6.b-6.e: +0 != -0
  4037. // Added the nonzero y check to make Flow happy, but it is redundant
  4038. return x !== 0 || y !== 0 || 1 / x === 1 / y;
  4039. } else {
  4040. // Step 6.a: NaN == NaN
  4041. return x !== x && y !== y;
  4042. }
  4043. }
  4044. /**
  4045. * Performs equality by iterating through keys on an object and returning false
  4046. * when any key has values which are not strictly equal between the arguments.
  4047. * Returns true when the values of all keys are strictly equal.
  4048. */
  4049. function shallowEqual(objA, objB) {
  4050. if (is(objA, objB)) {
  4051. return true;
  4052. }
  4053. if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
  4054. return false;
  4055. }
  4056. var keysA = Object.keys(objA);
  4057. var keysB = Object.keys(objB);
  4058. if (keysA.length !== keysB.length) {
  4059. return false;
  4060. }
  4061. // Test for A's keys different from B.
  4062. for (var i = 0; i < keysA.length; i++) {
  4063. if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
  4064. return false;
  4065. }
  4066. }
  4067. return true;
  4068. }
  4069. module.exports = shallowEqual;
  4070. /***/ }),
  4071. /* 34 */
  4072. /***/ (function(module, exports, __webpack_require__) {
  4073. "use strict";
  4074. /* WEBPACK VAR INJECTION */(function(process) {/**
  4075. * Copyright 2013-present, Facebook, Inc.
  4076. * All rights reserved.
  4077. *
  4078. * This source code is licensed under the BSD-style license found in the
  4079. * LICENSE file in the root directory of this source tree. An additional grant
  4080. * of patent rights can be found in the PATENTS file in the same directory.
  4081. *
  4082. */
  4083. var DOMLazyTree = __webpack_require__(17);
  4084. var Danger = __webpack_require__(107);
  4085. var ReactDOMComponentTree = __webpack_require__(5);
  4086. var ReactInstrumentation = __webpack_require__(8);
  4087. var createMicrosoftUnsafeLocalFunction = __webpack_require__(42);
  4088. var setInnerHTML = __webpack_require__(30);
  4089. var setTextContent = __webpack_require__(75);
  4090. function getNodeAfter(parentNode, node) {
  4091. // Special case for text components, which return [open, close] comments
  4092. // from getHostNode.
  4093. if (Array.isArray(node)) {
  4094. node = node[1];
  4095. }
  4096. return node ? node.nextSibling : parentNode.firstChild;
  4097. }
  4098. /**
  4099. * Inserts `childNode` as a child of `parentNode` at the `index`.
  4100. *
  4101. * @param {DOMElement} parentNode Parent node in which to insert.
  4102. * @param {DOMElement} childNode Child node to insert.
  4103. * @param {number} index Index at which to insert the child.
  4104. * @internal
  4105. */
  4106. var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
  4107. // We rely exclusively on `insertBefore(node, null)` instead of also using
  4108. // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
  4109. // we are careful to use `null`.)
  4110. parentNode.insertBefore(childNode, referenceNode);
  4111. });
  4112. function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
  4113. DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
  4114. }
  4115. function moveChild(parentNode, childNode, referenceNode) {
  4116. if (Array.isArray(childNode)) {
  4117. moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
  4118. } else {
  4119. insertChildAt(parentNode, childNode, referenceNode);
  4120. }
  4121. }
  4122. function removeChild(parentNode, childNode) {
  4123. if (Array.isArray(childNode)) {
  4124. var closingComment = childNode[1];
  4125. childNode = childNode[0];
  4126. removeDelimitedText(parentNode, childNode, closingComment);
  4127. parentNode.removeChild(closingComment);
  4128. }
  4129. parentNode.removeChild(childNode);
  4130. }
  4131. function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
  4132. var node = openingComment;
  4133. while (true) {
  4134. var nextNode = node.nextSibling;
  4135. insertChildAt(parentNode, node, referenceNode);
  4136. if (node === closingComment) {
  4137. break;
  4138. }
  4139. node = nextNode;
  4140. }
  4141. }
  4142. function removeDelimitedText(parentNode, startNode, closingComment) {
  4143. while (true) {
  4144. var node = startNode.nextSibling;
  4145. if (node === closingComment) {
  4146. // The closing comment is removed by ReactMultiChild.
  4147. break;
  4148. } else {
  4149. parentNode.removeChild(node);
  4150. }
  4151. }
  4152. }
  4153. function replaceDelimitedText(openingComment, closingComment, stringText) {
  4154. var parentNode = openingComment.parentNode;
  4155. var nodeAfterComment = openingComment.nextSibling;
  4156. if (nodeAfterComment === closingComment) {
  4157. // There are no text nodes between the opening and closing comments; insert
  4158. // a new one if stringText isn't empty.
  4159. if (stringText) {
  4160. insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
  4161. }
  4162. } else {
  4163. if (stringText) {
  4164. // Set the text content of the first node after the opening comment, and
  4165. // remove all following nodes up until the closing comment.
  4166. setTextContent(nodeAfterComment, stringText);
  4167. removeDelimitedText(parentNode, nodeAfterComment, closingComment);
  4168. } else {
  4169. removeDelimitedText(parentNode, openingComment, closingComment);
  4170. }
  4171. }
  4172. if (process.env.NODE_ENV !== 'production') {
  4173. ReactInstrumentation.debugTool.onHostOperation({
  4174. instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
  4175. type: 'replace text',
  4176. payload: stringText
  4177. });
  4178. }
  4179. }
  4180. var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
  4181. if (process.env.NODE_ENV !== 'production') {
  4182. dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
  4183. Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
  4184. if (prevInstance._debugID !== 0) {
  4185. ReactInstrumentation.debugTool.onHostOperation({
  4186. instanceID: prevInstance._debugID,
  4187. type: 'replace with',
  4188. payload: markup.toString()
  4189. });
  4190. } else {
  4191. var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
  4192. if (nextInstance._debugID !== 0) {
  4193. ReactInstrumentation.debugTool.onHostOperation({
  4194. instanceID: nextInstance._debugID,
  4195. type: 'mount',
  4196. payload: markup.toString()
  4197. });
  4198. }
  4199. }
  4200. };
  4201. }
  4202. /**
  4203. * Operations for updating with DOM children.
  4204. */
  4205. var DOMChildrenOperations = {
  4206. dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
  4207. replaceDelimitedText: replaceDelimitedText,
  4208. /**
  4209. * Updates a component's children by processing a series of updates. The
  4210. * update configurations are each expected to have a `parentNode` property.
  4211. *
  4212. * @param {array<object>} updates List of update configurations.
  4213. * @internal
  4214. */
  4215. processUpdates: function (parentNode, updates) {
  4216. if (process.env.NODE_ENV !== 'production') {
  4217. var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
  4218. }
  4219. for (var k = 0; k < updates.length; k++) {
  4220. var update = updates[k];
  4221. switch (update.type) {
  4222. case 'INSERT_MARKUP':
  4223. insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
  4224. if (process.env.NODE_ENV !== 'production') {
  4225. ReactInstrumentation.debugTool.onHostOperation({
  4226. instanceID: parentNodeDebugID,
  4227. type: 'insert child',
  4228. payload: { toIndex: update.toIndex, content: update.content.toString() }
  4229. });
  4230. }
  4231. break;
  4232. case 'MOVE_EXISTING':
  4233. moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
  4234. if (process.env.NODE_ENV !== 'production') {
  4235. ReactInstrumentation.debugTool.onHostOperation({
  4236. instanceID: parentNodeDebugID,
  4237. type: 'move child',
  4238. payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
  4239. });
  4240. }
  4241. break;
  4242. case 'SET_MARKUP':
  4243. setInnerHTML(parentNode, update.content);
  4244. if (process.env.NODE_ENV !== 'production') {
  4245. ReactInstrumentation.debugTool.onHostOperation({
  4246. instanceID: parentNodeDebugID,
  4247. type: 'replace children',
  4248. payload: update.content.toString()
  4249. });
  4250. }
  4251. break;
  4252. case 'TEXT_CONTENT':
  4253. setTextContent(parentNode, update.content);
  4254. if (process.env.NODE_ENV !== 'production') {
  4255. ReactInstrumentation.debugTool.onHostOperation({
  4256. instanceID: parentNodeDebugID,
  4257. type: 'replace text',
  4258. payload: update.content.toString()
  4259. });
  4260. }
  4261. break;
  4262. case 'REMOVE_NODE':
  4263. removeChild(parentNode, update.fromNode);
  4264. if (process.env.NODE_ENV !== 'production') {
  4265. ReactInstrumentation.debugTool.onHostOperation({
  4266. instanceID: parentNodeDebugID,
  4267. type: 'remove child',
  4268. payload: { fromIndex: update.fromIndex }
  4269. });
  4270. }
  4271. break;
  4272. }
  4273. }
  4274. }
  4275. };
  4276. module.exports = DOMChildrenOperations;
  4277. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  4278. /***/ }),
  4279. /* 35 */
  4280. /***/ (function(module, exports, __webpack_require__) {
  4281. "use strict";
  4282. /**
  4283. * Copyright 2013-present, Facebook, Inc.
  4284. * All rights reserved.
  4285. *
  4286. * This source code is licensed under the BSD-style license found in the
  4287. * LICENSE file in the root directory of this source tree. An additional grant
  4288. * of patent rights can be found in the PATENTS file in the same directory.
  4289. *
  4290. */
  4291. var DOMNamespaces = {
  4292. html: 'http://www.w3.org/1999/xhtml',
  4293. mathml: 'http://www.w3.org/1998/Math/MathML',
  4294. svg: 'http://www.w3.org/2000/svg'
  4295. };
  4296. module.exports = DOMNamespaces;
  4297. /***/ }),
  4298. /* 36 */
  4299. /***/ (function(module, exports, __webpack_require__) {
  4300. "use strict";
  4301. /* WEBPACK VAR INJECTION */(function(process) {/**
  4302. * Copyright 2013-present, Facebook, Inc.
  4303. * All rights reserved.
  4304. *
  4305. * This source code is licensed under the BSD-style license found in the
  4306. * LICENSE file in the root directory of this source tree. An additional grant
  4307. * of patent rights can be found in the PATENTS file in the same directory.
  4308. *
  4309. */
  4310. var _prodInvariant = __webpack_require__(3);
  4311. var ReactErrorUtils = __webpack_require__(40);
  4312. var invariant = __webpack_require__(1);
  4313. var warning = __webpack_require__(2);
  4314. /**
  4315. * Injected dependencies:
  4316. */
  4317. /**
  4318. * - `ComponentTree`: [required] Module that can convert between React instances
  4319. * and actual node references.
  4320. */
  4321. var ComponentTree;
  4322. var TreeTraversal;
  4323. var injection = {
  4324. injectComponentTree: function (Injected) {
  4325. ComponentTree = Injected;
  4326. if (process.env.NODE_ENV !== 'production') {
  4327. process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
  4328. }
  4329. },
  4330. injectTreeTraversal: function (Injected) {
  4331. TreeTraversal = Injected;
  4332. if (process.env.NODE_ENV !== 'production') {
  4333. process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
  4334. }
  4335. }
  4336. };
  4337. function isEndish(topLevelType) {
  4338. return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
  4339. }
  4340. function isMoveish(topLevelType) {
  4341. return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
  4342. }
  4343. function isStartish(topLevelType) {
  4344. return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
  4345. }
  4346. var validateEventDispatches;
  4347. if (process.env.NODE_ENV !== 'production') {
  4348. validateEventDispatches = function (event) {
  4349. var dispatchListeners = event._dispatchListeners;
  4350. var dispatchInstances = event._dispatchInstances;
  4351. var listenersIsArr = Array.isArray(dispatchListeners);
  4352. var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
  4353. var instancesIsArr = Array.isArray(dispatchInstances);
  4354. var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
  4355. process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
  4356. };
  4357. }
  4358. /**
  4359. * Dispatch the event to the listener.
  4360. * @param {SyntheticEvent} event SyntheticEvent to handle
  4361. * @param {boolean} simulated If the event is simulated (changes exn behavior)
  4362. * @param {function} listener Application-level callback
  4363. * @param {*} inst Internal component instance
  4364. */
  4365. function executeDispatch(event, simulated, listener, inst) {
  4366. var type = event.type || 'unknown-event';
  4367. event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
  4368. if (simulated) {
  4369. ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
  4370. } else {
  4371. ReactErrorUtils.invokeGuardedCallback(type, listener, event);
  4372. }
  4373. event.currentTarget = null;
  4374. }
  4375. /**
  4376. * Standard/simple iteration through an event's collected dispatches.
  4377. */
  4378. function executeDispatchesInOrder(event, simulated) {
  4379. var dispatchListeners = event._dispatchListeners;
  4380. var dispatchInstances = event._dispatchInstances;
  4381. if (process.env.NODE_ENV !== 'production') {
  4382. validateEventDispatches(event);
  4383. }
  4384. if (Array.isArray(dispatchListeners)) {
  4385. for (var i = 0; i < dispatchListeners.length; i++) {
  4386. if (event.isPropagationStopped()) {
  4387. break;
  4388. }
  4389. // Listeners and Instances are two parallel arrays that are always in sync.
  4390. executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
  4391. }
  4392. } else if (dispatchListeners) {
  4393. executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
  4394. }
  4395. event._dispatchListeners = null;
  4396. event._dispatchInstances = null;
  4397. }
  4398. /**
  4399. * Standard/simple iteration through an event's collected dispatches, but stops
  4400. * at the first dispatch execution returning true, and returns that id.
  4401. *
  4402. * @return {?string} id of the first dispatch execution who's listener returns
  4403. * true, or null if no listener returned true.
  4404. */
  4405. function executeDispatchesInOrderStopAtTrueImpl(event) {
  4406. var dispatchListeners = event._dispatchListeners;
  4407. var dispatchInstances = event._dispatchInstances;
  4408. if (process.env.NODE_ENV !== 'production') {
  4409. validateEventDispatches(event);
  4410. }
  4411. if (Array.isArray(dispatchListeners)) {
  4412. for (var i = 0; i < dispatchListeners.length; i++) {
  4413. if (event.isPropagationStopped()) {
  4414. break;
  4415. }
  4416. // Listeners and Instances are two parallel arrays that are always in sync.
  4417. if (dispatchListeners[i](event, dispatchInstances[i])) {
  4418. return dispatchInstances[i];
  4419. }
  4420. }
  4421. } else if (dispatchListeners) {
  4422. if (dispatchListeners(event, dispatchInstances)) {
  4423. return dispatchInstances;
  4424. }
  4425. }
  4426. return null;
  4427. }
  4428. /**
  4429. * @see executeDispatchesInOrderStopAtTrueImpl
  4430. */
  4431. function executeDispatchesInOrderStopAtTrue(event) {
  4432. var ret = executeDispatchesInOrderStopAtTrueImpl(event);
  4433. event._dispatchInstances = null;
  4434. event._dispatchListeners = null;
  4435. return ret;
  4436. }
  4437. /**
  4438. * Execution of a "direct" dispatch - there must be at most one dispatch
  4439. * accumulated on the event or it is considered an error. It doesn't really make
  4440. * sense for an event with multiple dispatches (bubbled) to keep track of the
  4441. * return values at each dispatch execution, but it does tend to make sense when
  4442. * dealing with "direct" dispatches.
  4443. *
  4444. * @return {*} The return value of executing the single dispatch.
  4445. */
  4446. function executeDirectDispatch(event) {
  4447. if (process.env.NODE_ENV !== 'production') {
  4448. validateEventDispatches(event);
  4449. }
  4450. var dispatchListener = event._dispatchListeners;
  4451. var dispatchInstance = event._dispatchInstances;
  4452. !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
  4453. event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
  4454. var res = dispatchListener ? dispatchListener(event) : null;
  4455. event.currentTarget = null;
  4456. event._dispatchListeners = null;
  4457. event._dispatchInstances = null;
  4458. return res;
  4459. }
  4460. /**
  4461. * @param {SyntheticEvent} event
  4462. * @return {boolean} True iff number of dispatches accumulated is greater than 0.
  4463. */
  4464. function hasDispatches(event) {
  4465. return !!event._dispatchListeners;
  4466. }
  4467. /**
  4468. * General utilities that are useful in creating custom Event Plugins.
  4469. */
  4470. var EventPluginUtils = {
  4471. isEndish: isEndish,
  4472. isMoveish: isMoveish,
  4473. isStartish: isStartish,
  4474. executeDirectDispatch: executeDirectDispatch,
  4475. executeDispatchesInOrder: executeDispatchesInOrder,
  4476. executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
  4477. hasDispatches: hasDispatches,
  4478. getInstanceFromNode: function (node) {
  4479. return ComponentTree.getInstanceFromNode(node);
  4480. },
  4481. getNodeFromInstance: function (node) {
  4482. return ComponentTree.getNodeFromInstance(node);
  4483. },
  4484. isAncestor: function (a, b) {
  4485. return TreeTraversal.isAncestor(a, b);
  4486. },
  4487. getLowestCommonAncestor: function (a, b) {
  4488. return TreeTraversal.getLowestCommonAncestor(a, b);
  4489. },
  4490. getParentInstance: function (inst) {
  4491. return TreeTraversal.getParentInstance(inst);
  4492. },
  4493. traverseTwoPhase: function (target, fn, arg) {
  4494. return TreeTraversal.traverseTwoPhase(target, fn, arg);
  4495. },
  4496. traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
  4497. return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
  4498. },
  4499. injection: injection
  4500. };
  4501. module.exports = EventPluginUtils;
  4502. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  4503. /***/ }),
  4504. /* 37 */
  4505. /***/ (function(module, exports, __webpack_require__) {
  4506. "use strict";
  4507. /**
  4508. * Copyright 2013-present, Facebook, Inc.
  4509. * All rights reserved.
  4510. *
  4511. * This source code is licensed under the BSD-style license found in the
  4512. * LICENSE file in the root directory of this source tree. An additional grant
  4513. * of patent rights can be found in the PATENTS file in the same directory.
  4514. *
  4515. *
  4516. */
  4517. /**
  4518. * Escape and wrap key so it is safe to use as a reactid
  4519. *
  4520. * @param {string} key to be escaped.
  4521. * @return {string} the escaped key.
  4522. */
  4523. function escape(key) {
  4524. var escapeRegex = /[=:]/g;
  4525. var escaperLookup = {
  4526. '=': '=0',
  4527. ':': '=2'
  4528. };
  4529. var escapedString = ('' + key).replace(escapeRegex, function (match) {
  4530. return escaperLookup[match];
  4531. });
  4532. return '$' + escapedString;
  4533. }
  4534. /**
  4535. * Unescape and unwrap key for human-readable display
  4536. *
  4537. * @param {string} key to unescape.
  4538. * @return {string} the unescaped key.
  4539. */
  4540. function unescape(key) {
  4541. var unescapeRegex = /(=0|=2)/g;
  4542. var unescaperLookup = {
  4543. '=0': '=',
  4544. '=2': ':'
  4545. };
  4546. var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
  4547. return ('' + keySubstring).replace(unescapeRegex, function (match) {
  4548. return unescaperLookup[match];
  4549. });
  4550. }
  4551. var KeyEscapeUtils = {
  4552. escape: escape,
  4553. unescape: unescape
  4554. };
  4555. module.exports = KeyEscapeUtils;
  4556. /***/ }),
  4557. /* 38 */
  4558. /***/ (function(module, exports, __webpack_require__) {
  4559. "use strict";
  4560. /* WEBPACK VAR INJECTION */(function(process) {/**
  4561. * Copyright 2013-present, Facebook, Inc.
  4562. * All rights reserved.
  4563. *
  4564. * This source code is licensed under the BSD-style license found in the
  4565. * LICENSE file in the root directory of this source tree. An additional grant
  4566. * of patent rights can be found in the PATENTS file in the same directory.
  4567. *
  4568. */
  4569. var _prodInvariant = __webpack_require__(3);
  4570. var ReactPropTypesSecret = __webpack_require__(67);
  4571. var propTypesFactory = __webpack_require__(54);
  4572. var React = __webpack_require__(19);
  4573. var PropTypes = propTypesFactory(React.isValidElement);
  4574. var invariant = __webpack_require__(1);
  4575. var warning = __webpack_require__(2);
  4576. var hasReadOnlyValue = {
  4577. 'button': true,
  4578. 'checkbox': true,
  4579. 'image': true,
  4580. 'hidden': true,
  4581. 'radio': true,
  4582. 'reset': true,
  4583. 'submit': true
  4584. };
  4585. function _assertSingleLink(inputProps) {
  4586. !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
  4587. }
  4588. function _assertValueLink(inputProps) {
  4589. _assertSingleLink(inputProps);
  4590. !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
  4591. }
  4592. function _assertCheckedLink(inputProps) {
  4593. _assertSingleLink(inputProps);
  4594. !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
  4595. }
  4596. var propTypes = {
  4597. value: function (props, propName, componentName) {
  4598. if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
  4599. return null;
  4600. }
  4601. return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
  4602. },
  4603. checked: function (props, propName, componentName) {
  4604. if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
  4605. return null;
  4606. }
  4607. return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
  4608. },
  4609. onChange: PropTypes.func
  4610. };
  4611. var loggedTypeFailures = {};
  4612. function getDeclarationErrorAddendum(owner) {
  4613. if (owner) {
  4614. var name = owner.getName();
  4615. if (name) {
  4616. return ' Check the render method of `' + name + '`.';
  4617. }
  4618. }
  4619. return '';
  4620. }
  4621. /**
  4622. * Provide a linked `value` attribute for controlled forms. You should not use
  4623. * this outside of the ReactDOM controlled form components.
  4624. */
  4625. var LinkedValueUtils = {
  4626. checkPropTypes: function (tagName, props, owner) {
  4627. for (var propName in propTypes) {
  4628. if (propTypes.hasOwnProperty(propName)) {
  4629. var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
  4630. }
  4631. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  4632. // Only monitor this failure once because there tends to be a lot of the
  4633. // same error.
  4634. loggedTypeFailures[error.message] = true;
  4635. var addendum = getDeclarationErrorAddendum(owner);
  4636. process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
  4637. }
  4638. }
  4639. },
  4640. /**
  4641. * @param {object} inputProps Props for form component
  4642. * @return {*} current value of the input either from value prop or link.
  4643. */
  4644. getValue: function (inputProps) {
  4645. if (inputProps.valueLink) {
  4646. _assertValueLink(inputProps);
  4647. return inputProps.valueLink.value;
  4648. }
  4649. return inputProps.value;
  4650. },
  4651. /**
  4652. * @param {object} inputProps Props for form component
  4653. * @return {*} current checked status of the input either from checked prop
  4654. * or link.
  4655. */
  4656. getChecked: function (inputProps) {
  4657. if (inputProps.checkedLink) {
  4658. _assertCheckedLink(inputProps);
  4659. return inputProps.checkedLink.value;
  4660. }
  4661. return inputProps.checked;
  4662. },
  4663. /**
  4664. * @param {object} inputProps Props for form component
  4665. * @param {SyntheticEvent} event change event to handle
  4666. */
  4667. executeOnChange: function (inputProps, event) {
  4668. if (inputProps.valueLink) {
  4669. _assertValueLink(inputProps);
  4670. return inputProps.valueLink.requestChange(event.target.value);
  4671. } else if (inputProps.checkedLink) {
  4672. _assertCheckedLink(inputProps);
  4673. return inputProps.checkedLink.requestChange(event.target.checked);
  4674. } else if (inputProps.onChange) {
  4675. return inputProps.onChange.call(undefined, event);
  4676. }
  4677. }
  4678. };
  4679. module.exports = LinkedValueUtils;
  4680. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  4681. /***/ }),
  4682. /* 39 */
  4683. /***/ (function(module, exports, __webpack_require__) {
  4684. "use strict";
  4685. /* WEBPACK VAR INJECTION */(function(process) {/**
  4686. * Copyright 2014-present, Facebook, Inc.
  4687. * All rights reserved.
  4688. *
  4689. * This source code is licensed under the BSD-style license found in the
  4690. * LICENSE file in the root directory of this source tree. An additional grant
  4691. * of patent rights can be found in the PATENTS file in the same directory.
  4692. *
  4693. *
  4694. */
  4695. var _prodInvariant = __webpack_require__(3);
  4696. var invariant = __webpack_require__(1);
  4697. var injected = false;
  4698. var ReactComponentEnvironment = {
  4699. /**
  4700. * Optionally injectable hook for swapping out mount images in the middle of
  4701. * the tree.
  4702. */
  4703. replaceNodeWithMarkup: null,
  4704. /**
  4705. * Optionally injectable hook for processing a queue of child updates. Will
  4706. * later move into MultiChildComponents.
  4707. */
  4708. processChildrenUpdates: null,
  4709. injection: {
  4710. injectEnvironment: function (environment) {
  4711. !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
  4712. ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
  4713. ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
  4714. injected = true;
  4715. }
  4716. }
  4717. };
  4718. module.exports = ReactComponentEnvironment;
  4719. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  4720. /***/ }),
  4721. /* 40 */
  4722. /***/ (function(module, exports, __webpack_require__) {
  4723. "use strict";
  4724. /* WEBPACK VAR INJECTION */(function(process) {/**
  4725. * Copyright 2013-present, Facebook, Inc.
  4726. * All rights reserved.
  4727. *
  4728. * This source code is licensed under the BSD-style license found in the
  4729. * LICENSE file in the root directory of this source tree. An additional grant
  4730. * of patent rights can be found in the PATENTS file in the same directory.
  4731. *
  4732. *
  4733. */
  4734. var caughtError = null;
  4735. /**
  4736. * Call a function while guarding against errors that happens within it.
  4737. *
  4738. * @param {String} name of the guard to use for logging or debugging
  4739. * @param {Function} func The function to invoke
  4740. * @param {*} a First argument
  4741. * @param {*} b Second argument
  4742. */
  4743. function invokeGuardedCallback(name, func, a) {
  4744. try {
  4745. func(a);
  4746. } catch (x) {
  4747. if (caughtError === null) {
  4748. caughtError = x;
  4749. }
  4750. }
  4751. }
  4752. var ReactErrorUtils = {
  4753. invokeGuardedCallback: invokeGuardedCallback,
  4754. /**
  4755. * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event
  4756. * handler are sure to be rethrown by rethrowCaughtError.
  4757. */
  4758. invokeGuardedCallbackWithCatch: invokeGuardedCallback,
  4759. /**
  4760. * During execution of guarded functions we will capture the first error which
  4761. * we will rethrow to be handled by the top level error handler.
  4762. */
  4763. rethrowCaughtError: function () {
  4764. if (caughtError) {
  4765. var error = caughtError;
  4766. caughtError = null;
  4767. throw error;
  4768. }
  4769. }
  4770. };
  4771. if (process.env.NODE_ENV !== 'production') {
  4772. /**
  4773. * To help development we can get better devtools integration by simulating a
  4774. * real browser event.
  4775. */
  4776. if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
  4777. var fakeNode = document.createElement('react');
  4778. ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
  4779. var boundFunc = func.bind(null, a);
  4780. var evtType = 'react-' + name;
  4781. fakeNode.addEventListener(evtType, boundFunc, false);
  4782. var evt = document.createEvent('Event');
  4783. evt.initEvent(evtType, false, false);
  4784. fakeNode.dispatchEvent(evt);
  4785. fakeNode.removeEventListener(evtType, boundFunc, false);
  4786. };
  4787. }
  4788. }
  4789. module.exports = ReactErrorUtils;
  4790. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  4791. /***/ }),
  4792. /* 41 */
  4793. /***/ (function(module, exports, __webpack_require__) {
  4794. "use strict";
  4795. /* WEBPACK VAR INJECTION */(function(process) {/**
  4796. * Copyright 2015-present, Facebook, Inc.
  4797. * All rights reserved.
  4798. *
  4799. * This source code is licensed under the BSD-style license found in the
  4800. * LICENSE file in the root directory of this source tree. An additional grant
  4801. * of patent rights can be found in the PATENTS file in the same directory.
  4802. *
  4803. */
  4804. var _prodInvariant = __webpack_require__(3);
  4805. var ReactCurrentOwner = __webpack_require__(11);
  4806. var ReactInstanceMap = __webpack_require__(23);
  4807. var ReactInstrumentation = __webpack_require__(8);
  4808. var ReactUpdates = __webpack_require__(10);
  4809. var invariant = __webpack_require__(1);
  4810. var warning = __webpack_require__(2);
  4811. function enqueueUpdate(internalInstance) {
  4812. ReactUpdates.enqueueUpdate(internalInstance);
  4813. }
  4814. function formatUnexpectedArgument(arg) {
  4815. var type = typeof arg;
  4816. if (type !== 'object') {
  4817. return type;
  4818. }
  4819. var displayName = arg.constructor && arg.constructor.name || type;
  4820. var keys = Object.keys(arg);
  4821. if (keys.length > 0 && keys.length < 20) {
  4822. return displayName + ' (keys: ' + keys.join(', ') + ')';
  4823. }
  4824. return displayName;
  4825. }
  4826. function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
  4827. var internalInstance = ReactInstanceMap.get(publicInstance);
  4828. if (!internalInstance) {
  4829. if (process.env.NODE_ENV !== 'production') {
  4830. var ctor = publicInstance.constructor;
  4831. // Only warn when we have a callerName. Otherwise we should be silent.
  4832. // We're probably calling from enqueueCallback. We don't want to warn
  4833. // there because we already warned for the corresponding lifecycle method.
  4834. process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;
  4835. }
  4836. return null;
  4837. }
  4838. if (process.env.NODE_ENV !== 'production') {
  4839. process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
  4840. }
  4841. return internalInstance;
  4842. }
  4843. /**
  4844. * ReactUpdateQueue allows for state updates to be scheduled into a later
  4845. * reconciliation step.
  4846. */
  4847. var ReactUpdateQueue = {
  4848. /**
  4849. * Checks whether or not this composite component is mounted.
  4850. * @param {ReactClass} publicInstance The instance we want to test.
  4851. * @return {boolean} True if mounted, false otherwise.
  4852. * @protected
  4853. * @final
  4854. */
  4855. isMounted: function (publicInstance) {
  4856. if (process.env.NODE_ENV !== 'production') {
  4857. var owner = ReactCurrentOwner.current;
  4858. if (owner !== null) {
  4859. process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
  4860. owner._warnedAboutRefsInRender = true;
  4861. }
  4862. }
  4863. var internalInstance = ReactInstanceMap.get(publicInstance);
  4864. if (internalInstance) {
  4865. // During componentWillMount and render this will still be null but after
  4866. // that will always render to something. At least for now. So we can use
  4867. // this hack.
  4868. return !!internalInstance._renderedComponent;
  4869. } else {
  4870. return false;
  4871. }
  4872. },
  4873. /**
  4874. * Enqueue a callback that will be executed after all the pending updates
  4875. * have processed.
  4876. *
  4877. * @param {ReactClass} publicInstance The instance to use as `this` context.
  4878. * @param {?function} callback Called after state is updated.
  4879. * @param {string} callerName Name of the calling function in the public API.
  4880. * @internal
  4881. */
  4882. enqueueCallback: function (publicInstance, callback, callerName) {
  4883. ReactUpdateQueue.validateCallback(callback, callerName);
  4884. var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
  4885. // Previously we would throw an error if we didn't have an internal
  4886. // instance. Since we want to make it a no-op instead, we mirror the same
  4887. // behavior we have in other enqueue* methods.
  4888. // We also need to ignore callbacks in componentWillMount. See
  4889. // enqueueUpdates.
  4890. if (!internalInstance) {
  4891. return null;
  4892. }
  4893. if (internalInstance._pendingCallbacks) {
  4894. internalInstance._pendingCallbacks.push(callback);
  4895. } else {
  4896. internalInstance._pendingCallbacks = [callback];
  4897. }
  4898. // TODO: The callback here is ignored when setState is called from
  4899. // componentWillMount. Either fix it or disallow doing so completely in
  4900. // favor of getInitialState. Alternatively, we can disallow
  4901. // componentWillMount during server-side rendering.
  4902. enqueueUpdate(internalInstance);
  4903. },
  4904. enqueueCallbackInternal: function (internalInstance, callback) {
  4905. if (internalInstance._pendingCallbacks) {
  4906. internalInstance._pendingCallbacks.push(callback);
  4907. } else {
  4908. internalInstance._pendingCallbacks = [callback];
  4909. }
  4910. enqueueUpdate(internalInstance);
  4911. },
  4912. /**
  4913. * Forces an update. This should only be invoked when it is known with
  4914. * certainty that we are **not** in a DOM transaction.
  4915. *
  4916. * You may want to call this when you know that some deeper aspect of the
  4917. * component's state has changed but `setState` was not called.
  4918. *
  4919. * This will not invoke `shouldComponentUpdate`, but it will invoke
  4920. * `componentWillUpdate` and `componentDidUpdate`.
  4921. *
  4922. * @param {ReactClass} publicInstance The instance that should rerender.
  4923. * @internal
  4924. */
  4925. enqueueForceUpdate: function (publicInstance) {
  4926. var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
  4927. if (!internalInstance) {
  4928. return;
  4929. }
  4930. internalInstance._pendingForceUpdate = true;
  4931. enqueueUpdate(internalInstance);
  4932. },
  4933. /**
  4934. * Replaces all of the state. Always use this or `setState` to mutate state.
  4935. * You should treat `this.state` as immutable.
  4936. *
  4937. * There is no guarantee that `this.state` will be immediately updated, so
  4938. * accessing `this.state` after calling this method may return the old value.
  4939. *
  4940. * @param {ReactClass} publicInstance The instance that should rerender.
  4941. * @param {object} completeState Next state.
  4942. * @internal
  4943. */
  4944. enqueueReplaceState: function (publicInstance, completeState, callback) {
  4945. var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
  4946. if (!internalInstance) {
  4947. return;
  4948. }
  4949. internalInstance._pendingStateQueue = [completeState];
  4950. internalInstance._pendingReplaceState = true;
  4951. // Future-proof 15.5
  4952. if (callback !== undefined && callback !== null) {
  4953. ReactUpdateQueue.validateCallback(callback, 'replaceState');
  4954. if (internalInstance._pendingCallbacks) {
  4955. internalInstance._pendingCallbacks.push(callback);
  4956. } else {
  4957. internalInstance._pendingCallbacks = [callback];
  4958. }
  4959. }
  4960. enqueueUpdate(internalInstance);
  4961. },
  4962. /**
  4963. * Sets a subset of the state. This only exists because _pendingState is
  4964. * internal. This provides a merging strategy that is not available to deep
  4965. * properties which is confusing. TODO: Expose pendingState or don't use it
  4966. * during the merge.
  4967. *
  4968. * @param {ReactClass} publicInstance The instance that should rerender.
  4969. * @param {object} partialState Next partial state to be merged with state.
  4970. * @internal
  4971. */
  4972. enqueueSetState: function (publicInstance, partialState) {
  4973. if (process.env.NODE_ENV !== 'production') {
  4974. ReactInstrumentation.debugTool.onSetState();
  4975. process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
  4976. }
  4977. var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
  4978. if (!internalInstance) {
  4979. return;
  4980. }
  4981. var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
  4982. queue.push(partialState);
  4983. enqueueUpdate(internalInstance);
  4984. },
  4985. enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
  4986. internalInstance._pendingElement = nextElement;
  4987. // TODO: introduce _pendingContext instead of setting it directly.
  4988. internalInstance._context = nextContext;
  4989. enqueueUpdate(internalInstance);
  4990. },
  4991. validateCallback: function (callback, callerName) {
  4992. !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
  4993. }
  4994. };
  4995. module.exports = ReactUpdateQueue;
  4996. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  4997. /***/ }),
  4998. /* 42 */
  4999. /***/ (function(module, exports, __webpack_require__) {
  5000. "use strict";
  5001. /**
  5002. * Copyright 2013-present, Facebook, Inc.
  5003. * All rights reserved.
  5004. *
  5005. * This source code is licensed under the BSD-style license found in the
  5006. * LICENSE file in the root directory of this source tree. An additional grant
  5007. * of patent rights can be found in the PATENTS file in the same directory.
  5008. *
  5009. */
  5010. /* globals MSApp */
  5011. /**
  5012. * Create a function which has 'unsafe' privileges (required by windows8 apps)
  5013. */
  5014. var createMicrosoftUnsafeLocalFunction = function (func) {
  5015. if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
  5016. return function (arg0, arg1, arg2, arg3) {
  5017. MSApp.execUnsafeLocalFunction(function () {
  5018. return func(arg0, arg1, arg2, arg3);
  5019. });
  5020. };
  5021. } else {
  5022. return func;
  5023. }
  5024. };
  5025. module.exports = createMicrosoftUnsafeLocalFunction;
  5026. /***/ }),
  5027. /* 43 */
  5028. /***/ (function(module, exports, __webpack_require__) {
  5029. "use strict";
  5030. /**
  5031. * Copyright 2013-present, Facebook, Inc.
  5032. * All rights reserved.
  5033. *
  5034. * This source code is licensed under the BSD-style license found in the
  5035. * LICENSE file in the root directory of this source tree. An additional grant
  5036. * of patent rights can be found in the PATENTS file in the same directory.
  5037. *
  5038. */
  5039. /**
  5040. * `charCode` represents the actual "character code" and is safe to use with
  5041. * `String.fromCharCode`. As such, only keys that correspond to printable
  5042. * characters produce a valid `charCode`, the only exception to this is Enter.
  5043. * The Tab-key is considered non-printable and does not have a `charCode`,
  5044. * presumably because it does not produce a tab-character in browsers.
  5045. *
  5046. * @param {object} nativeEvent Native browser event.
  5047. * @return {number} Normalized `charCode` property.
  5048. */
  5049. function getEventCharCode(nativeEvent) {
  5050. var charCode;
  5051. var keyCode = nativeEvent.keyCode;
  5052. if ('charCode' in nativeEvent) {
  5053. charCode = nativeEvent.charCode;
  5054. // FF does not set `charCode` for the Enter-key, check against `keyCode`.
  5055. if (charCode === 0 && keyCode === 13) {
  5056. charCode = 13;
  5057. }
  5058. } else {
  5059. // IE8 does not implement `charCode`, but `keyCode` has the correct value.
  5060. charCode = keyCode;
  5061. }
  5062. // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
  5063. // Must not discard the (non-)printable Enter-key.
  5064. if (charCode >= 32 || charCode === 13) {
  5065. return charCode;
  5066. }
  5067. return 0;
  5068. }
  5069. module.exports = getEventCharCode;
  5070. /***/ }),
  5071. /* 44 */
  5072. /***/ (function(module, exports, __webpack_require__) {
  5073. "use strict";
  5074. /**
  5075. * Copyright 2013-present, Facebook, Inc.
  5076. * All rights reserved.
  5077. *
  5078. * This source code is licensed under the BSD-style license found in the
  5079. * LICENSE file in the root directory of this source tree. An additional grant
  5080. * of patent rights can be found in the PATENTS file in the same directory.
  5081. *
  5082. */
  5083. /**
  5084. * Translation from modifier key to the associated property in the event.
  5085. * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
  5086. */
  5087. var modifierKeyToProp = {
  5088. 'Alt': 'altKey',
  5089. 'Control': 'ctrlKey',
  5090. 'Meta': 'metaKey',
  5091. 'Shift': 'shiftKey'
  5092. };
  5093. // IE8 does not implement getModifierState so we simply map it to the only
  5094. // modifier keys exposed by the event itself, does not support Lock-keys.
  5095. // Currently, all major browsers except Chrome seems to support Lock-keys.
  5096. function modifierStateGetter(keyArg) {
  5097. var syntheticEvent = this;
  5098. var nativeEvent = syntheticEvent.nativeEvent;
  5099. if (nativeEvent.getModifierState) {
  5100. return nativeEvent.getModifierState(keyArg);
  5101. }
  5102. var keyProp = modifierKeyToProp[keyArg];
  5103. return keyProp ? !!nativeEvent[keyProp] : false;
  5104. }
  5105. function getEventModifierState(nativeEvent) {
  5106. return modifierStateGetter;
  5107. }
  5108. module.exports = getEventModifierState;
  5109. /***/ }),
  5110. /* 45 */
  5111. /***/ (function(module, exports, __webpack_require__) {
  5112. "use strict";
  5113. /**
  5114. * Copyright 2013-present, Facebook, Inc.
  5115. * All rights reserved.
  5116. *
  5117. * This source code is licensed under the BSD-style license found in the
  5118. * LICENSE file in the root directory of this source tree. An additional grant
  5119. * of patent rights can be found in the PATENTS file in the same directory.
  5120. *
  5121. */
  5122. /**
  5123. * Gets the target node from a native browser event by accounting for
  5124. * inconsistencies in browser DOM APIs.
  5125. *
  5126. * @param {object} nativeEvent Native browser event.
  5127. * @return {DOMEventTarget} Target node.
  5128. */
  5129. function getEventTarget(nativeEvent) {
  5130. var target = nativeEvent.target || nativeEvent.srcElement || window;
  5131. // Normalize SVG <use> element events #4963
  5132. if (target.correspondingUseElement) {
  5133. target = target.correspondingUseElement;
  5134. }
  5135. // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
  5136. // @see http://www.quirksmode.org/js/events_properties.html
  5137. return target.nodeType === 3 ? target.parentNode : target;
  5138. }
  5139. module.exports = getEventTarget;
  5140. /***/ }),
  5141. /* 46 */
  5142. /***/ (function(module, exports, __webpack_require__) {
  5143. "use strict";
  5144. /**
  5145. * Copyright 2013-present, Facebook, Inc.
  5146. * All rights reserved.
  5147. *
  5148. * This source code is licensed under the BSD-style license found in the
  5149. * LICENSE file in the root directory of this source tree. An additional grant
  5150. * of patent rights can be found in the PATENTS file in the same directory.
  5151. *
  5152. */
  5153. var ExecutionEnvironment = __webpack_require__(6);
  5154. var useHasFeature;
  5155. if (ExecutionEnvironment.canUseDOM) {
  5156. useHasFeature = document.implementation && document.implementation.hasFeature &&
  5157. // always returns true in newer browsers as per the standard.
  5158. // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
  5159. document.implementation.hasFeature('', '') !== true;
  5160. }
  5161. /**
  5162. * Checks if an event is supported in the current execution environment.
  5163. *
  5164. * NOTE: This will not work correctly for non-generic events such as `change`,
  5165. * `reset`, `load`, `error`, and `select`.
  5166. *
  5167. * Borrows from Modernizr.
  5168. *
  5169. * @param {string} eventNameSuffix Event name, e.g. "click".
  5170. * @param {?boolean} capture Check if the capture phase is supported.
  5171. * @return {boolean} True if the event is supported.
  5172. * @internal
  5173. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  5174. */
  5175. function isEventSupported(eventNameSuffix, capture) {
  5176. if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
  5177. return false;
  5178. }
  5179. var eventName = 'on' + eventNameSuffix;
  5180. var isSupported = eventName in document;
  5181. if (!isSupported) {
  5182. var element = document.createElement('div');
  5183. element.setAttribute(eventName, 'return;');
  5184. isSupported = typeof element[eventName] === 'function';
  5185. }
  5186. if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
  5187. // This is the only way to test support for the `wheel` event in IE9+.
  5188. isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
  5189. }
  5190. return isSupported;
  5191. }
  5192. module.exports = isEventSupported;
  5193. /***/ }),
  5194. /* 47 */
  5195. /***/ (function(module, exports, __webpack_require__) {
  5196. "use strict";
  5197. /**
  5198. * Copyright 2013-present, Facebook, Inc.
  5199. * All rights reserved.
  5200. *
  5201. * This source code is licensed under the BSD-style license found in the
  5202. * LICENSE file in the root directory of this source tree. An additional grant
  5203. * of patent rights can be found in the PATENTS file in the same directory.
  5204. *
  5205. */
  5206. /**
  5207. * Given a `prevElement` and `nextElement`, determines if the existing
  5208. * instance should be updated as opposed to being destroyed or replaced by a new
  5209. * instance. Both arguments are elements. This ensures that this logic can
  5210. * operate on stateless trees without any backing instance.
  5211. *
  5212. * @param {?object} prevElement
  5213. * @param {?object} nextElement
  5214. * @return {boolean} True if the existing instance should be updated.
  5215. * @protected
  5216. */
  5217. function shouldUpdateReactComponent(prevElement, nextElement) {
  5218. var prevEmpty = prevElement === null || prevElement === false;
  5219. var nextEmpty = nextElement === null || nextElement === false;
  5220. if (prevEmpty || nextEmpty) {
  5221. return prevEmpty === nextEmpty;
  5222. }
  5223. var prevType = typeof prevElement;
  5224. var nextType = typeof nextElement;
  5225. if (prevType === 'string' || prevType === 'number') {
  5226. return nextType === 'string' || nextType === 'number';
  5227. } else {
  5228. return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
  5229. }
  5230. }
  5231. module.exports = shouldUpdateReactComponent;
  5232. /***/ }),
  5233. /* 48 */
  5234. /***/ (function(module, exports, __webpack_require__) {
  5235. "use strict";
  5236. /* WEBPACK VAR INJECTION */(function(process) {/**
  5237. * Copyright 2015-present, Facebook, Inc.
  5238. * All rights reserved.
  5239. *
  5240. * This source code is licensed under the BSD-style license found in the
  5241. * LICENSE file in the root directory of this source tree. An additional grant
  5242. * of patent rights can be found in the PATENTS file in the same directory.
  5243. *
  5244. */
  5245. var _assign = __webpack_require__(4);
  5246. var emptyFunction = __webpack_require__(9);
  5247. var warning = __webpack_require__(2);
  5248. var validateDOMNesting = emptyFunction;
  5249. if (process.env.NODE_ENV !== 'production') {
  5250. // This validation code was written based on the HTML5 parsing spec:
  5251. // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
  5252. //
  5253. // Note: this does not catch all invalid nesting, nor does it try to (as it's
  5254. // not clear what practical benefit doing so provides); instead, we warn only
  5255. // for cases where the parser will give a parse tree differing from what React
  5256. // intended. For example, <b><div></div></b> is invalid but we don't warn
  5257. // because it still parses correctly; we do warn for other cases like nested
  5258. // <p> tags where the beginning of the second element implicitly closes the
  5259. // first, causing a confusing mess.
  5260. // https://html.spec.whatwg.org/multipage/syntax.html#special
  5261. var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
  5262. // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
  5263. var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
  5264. // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
  5265. // TODO: Distinguish by namespace here -- for <title>, including it here
  5266. // errs on the side of fewer warnings
  5267. 'foreignObject', 'desc', 'title'];
  5268. // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
  5269. var buttonScopeTags = inScopeTags.concat(['button']);
  5270. // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
  5271. var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
  5272. var emptyAncestorInfo = {
  5273. current: null,
  5274. formTag: null,
  5275. aTagInScope: null,
  5276. buttonTagInScope: null,
  5277. nobrTagInScope: null,
  5278. pTagInButtonScope: null,
  5279. listItemTagAutoclosing: null,
  5280. dlItemTagAutoclosing: null
  5281. };
  5282. var updatedAncestorInfo = function (oldInfo, tag, instance) {
  5283. var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
  5284. var info = { tag: tag, instance: instance };
  5285. if (inScopeTags.indexOf(tag) !== -1) {
  5286. ancestorInfo.aTagInScope = null;
  5287. ancestorInfo.buttonTagInScope = null;
  5288. ancestorInfo.nobrTagInScope = null;
  5289. }
  5290. if (buttonScopeTags.indexOf(tag) !== -1) {
  5291. ancestorInfo.pTagInButtonScope = null;
  5292. }
  5293. // See rules for 'li', 'dd', 'dt' start tags in
  5294. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
  5295. if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
  5296. ancestorInfo.listItemTagAutoclosing = null;
  5297. ancestorInfo.dlItemTagAutoclosing = null;
  5298. }
  5299. ancestorInfo.current = info;
  5300. if (tag === 'form') {
  5301. ancestorInfo.formTag = info;
  5302. }
  5303. if (tag === 'a') {
  5304. ancestorInfo.aTagInScope = info;
  5305. }
  5306. if (tag === 'button') {
  5307. ancestorInfo.buttonTagInScope = info;
  5308. }
  5309. if (tag === 'nobr') {
  5310. ancestorInfo.nobrTagInScope = info;
  5311. }
  5312. if (tag === 'p') {
  5313. ancestorInfo.pTagInButtonScope = info;
  5314. }
  5315. if (tag === 'li') {
  5316. ancestorInfo.listItemTagAutoclosing = info;
  5317. }
  5318. if (tag === 'dd' || tag === 'dt') {
  5319. ancestorInfo.dlItemTagAutoclosing = info;
  5320. }
  5321. return ancestorInfo;
  5322. };
  5323. /**
  5324. * Returns whether
  5325. */
  5326. var isTagValidWithParent = function (tag, parentTag) {
  5327. // First, let's check if we're in an unusual parsing mode...
  5328. switch (parentTag) {
  5329. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
  5330. case 'select':
  5331. return tag === 'option' || tag === 'optgroup' || tag === '#text';
  5332. case 'optgroup':
  5333. return tag === 'option' || tag === '#text';
  5334. // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
  5335. // but
  5336. case 'option':
  5337. return tag === '#text';
  5338. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
  5339. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
  5340. // No special behavior since these rules fall back to "in body" mode for
  5341. // all except special table nodes which cause bad parsing behavior anyway.
  5342. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
  5343. case 'tr':
  5344. return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
  5345. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
  5346. case 'tbody':
  5347. case 'thead':
  5348. case 'tfoot':
  5349. return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
  5350. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
  5351. case 'colgroup':
  5352. return tag === 'col' || tag === 'template';
  5353. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
  5354. case 'table':
  5355. return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
  5356. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
  5357. case 'head':
  5358. return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
  5359. // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
  5360. case 'html':
  5361. return tag === 'head' || tag === 'body';
  5362. case '#document':
  5363. return tag === 'html';
  5364. }
  5365. // Probably in the "in body" parsing mode, so we outlaw only tag combos
  5366. // where the parsing rules cause implicit opens or closes to be added.
  5367. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
  5368. switch (tag) {
  5369. case 'h1':
  5370. case 'h2':
  5371. case 'h3':
  5372. case 'h4':
  5373. case 'h5':
  5374. case 'h6':
  5375. return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
  5376. case 'rp':
  5377. case 'rt':
  5378. return impliedEndTags.indexOf(parentTag) === -1;
  5379. case 'body':
  5380. case 'caption':
  5381. case 'col':
  5382. case 'colgroup':
  5383. case 'frame':
  5384. case 'head':
  5385. case 'html':
  5386. case 'tbody':
  5387. case 'td':
  5388. case 'tfoot':
  5389. case 'th':
  5390. case 'thead':
  5391. case 'tr':
  5392. // These tags are only valid with a few parents that have special child
  5393. // parsing rules -- if we're down here, then none of those matched and
  5394. // so we allow it only if we don't know what the parent is, as all other
  5395. // cases are invalid.
  5396. return parentTag == null;
  5397. }
  5398. return true;
  5399. };
  5400. /**
  5401. * Returns whether
  5402. */
  5403. var findInvalidAncestorForTag = function (tag, ancestorInfo) {
  5404. switch (tag) {
  5405. case 'address':
  5406. case 'article':
  5407. case 'aside':
  5408. case 'blockquote':
  5409. case 'center':
  5410. case 'details':
  5411. case 'dialog':
  5412. case 'dir':
  5413. case 'div':
  5414. case 'dl':
  5415. case 'fieldset':
  5416. case 'figcaption':
  5417. case 'figure':
  5418. case 'footer':
  5419. case 'header':
  5420. case 'hgroup':
  5421. case 'main':
  5422. case 'menu':
  5423. case 'nav':
  5424. case 'ol':
  5425. case 'p':
  5426. case 'section':
  5427. case 'summary':
  5428. case 'ul':
  5429. case 'pre':
  5430. case 'listing':
  5431. case 'table':
  5432. case 'hr':
  5433. case 'xmp':
  5434. case 'h1':
  5435. case 'h2':
  5436. case 'h3':
  5437. case 'h4':
  5438. case 'h5':
  5439. case 'h6':
  5440. return ancestorInfo.pTagInButtonScope;
  5441. case 'form':
  5442. return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
  5443. case 'li':
  5444. return ancestorInfo.listItemTagAutoclosing;
  5445. case 'dd':
  5446. case 'dt':
  5447. return ancestorInfo.dlItemTagAutoclosing;
  5448. case 'button':
  5449. return ancestorInfo.buttonTagInScope;
  5450. case 'a':
  5451. // Spec says something about storing a list of markers, but it sounds
  5452. // equivalent to this check.
  5453. return ancestorInfo.aTagInScope;
  5454. case 'nobr':
  5455. return ancestorInfo.nobrTagInScope;
  5456. }
  5457. return null;
  5458. };
  5459. /**
  5460. * Given a ReactCompositeComponent instance, return a list of its recursive
  5461. * owners, starting at the root and ending with the instance itself.
  5462. */
  5463. var findOwnerStack = function (instance) {
  5464. if (!instance) {
  5465. return [];
  5466. }
  5467. var stack = [];
  5468. do {
  5469. stack.push(instance);
  5470. } while (instance = instance._currentElement._owner);
  5471. stack.reverse();
  5472. return stack;
  5473. };
  5474. var didWarn = {};
  5475. validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
  5476. ancestorInfo = ancestorInfo || emptyAncestorInfo;
  5477. var parentInfo = ancestorInfo.current;
  5478. var parentTag = parentInfo && parentInfo.tag;
  5479. if (childText != null) {
  5480. process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
  5481. childTag = '#text';
  5482. }
  5483. var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
  5484. var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
  5485. var problematic = invalidParent || invalidAncestor;
  5486. if (problematic) {
  5487. var ancestorTag = problematic.tag;
  5488. var ancestorInstance = problematic.instance;
  5489. var childOwner = childInstance && childInstance._currentElement._owner;
  5490. var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
  5491. var childOwners = findOwnerStack(childOwner);
  5492. var ancestorOwners = findOwnerStack(ancestorOwner);
  5493. var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
  5494. var i;
  5495. var deepestCommon = -1;
  5496. for (i = 0; i < minStackLen; i++) {
  5497. if (childOwners[i] === ancestorOwners[i]) {
  5498. deepestCommon = i;
  5499. } else {
  5500. break;
  5501. }
  5502. }
  5503. var UNKNOWN = '(unknown)';
  5504. var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
  5505. return inst.getName() || UNKNOWN;
  5506. });
  5507. var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
  5508. return inst.getName() || UNKNOWN;
  5509. });
  5510. var ownerInfo = [].concat(
  5511. // If the parent and child instances have a common owner ancestor, start
  5512. // with that -- otherwise we just start with the parent's owners.
  5513. deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
  5514. // If we're warning about an invalid (non-parent) ancestry, add '...'
  5515. invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
  5516. var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
  5517. if (didWarn[warnKey]) {
  5518. return;
  5519. }
  5520. didWarn[warnKey] = true;
  5521. var tagDisplayName = childTag;
  5522. var whitespaceInfo = '';
  5523. if (childTag === '#text') {
  5524. if (/\S/.test(childText)) {
  5525. tagDisplayName = 'Text nodes';
  5526. } else {
  5527. tagDisplayName = 'Whitespace text nodes';
  5528. whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
  5529. }
  5530. } else {
  5531. tagDisplayName = '<' + childTag + '>';
  5532. }
  5533. if (invalidParent) {
  5534. var info = '';
  5535. if (ancestorTag === 'table' && childTag === 'tr') {
  5536. info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
  5537. }
  5538. process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
  5539. } else {
  5540. process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
  5541. }
  5542. }
  5543. };
  5544. validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
  5545. // For testing
  5546. validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
  5547. ancestorInfo = ancestorInfo || emptyAncestorInfo;
  5548. var parentInfo = ancestorInfo.current;
  5549. var parentTag = parentInfo && parentInfo.tag;
  5550. return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
  5551. };
  5552. }
  5553. module.exports = validateDOMNesting;
  5554. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  5555. /***/ }),
  5556. /* 49 */
  5557. /***/ (function(module, exports, __webpack_require__) {
  5558. "use strict";
  5559. /* WEBPACK VAR INJECTION */(function(process) {/**
  5560. * Copyright 2013-present, Facebook, Inc.
  5561. * All rights reserved.
  5562. *
  5563. * This source code is licensed under the BSD-style license found in the
  5564. * LICENSE file in the root directory of this source tree. An additional grant
  5565. * of patent rights can be found in the PATENTS file in the same directory.
  5566. *
  5567. */
  5568. var _prodInvariant = __webpack_require__(16);
  5569. var ReactNoopUpdateQueue = __webpack_require__(50);
  5570. var canDefineProperty = __webpack_require__(31);
  5571. var emptyObject = __webpack_require__(20);
  5572. var invariant = __webpack_require__(1);
  5573. var warning = __webpack_require__(2);
  5574. /**
  5575. * Base class helpers for the updating state of a component.
  5576. */
  5577. function ReactComponent(props, context, updater) {
  5578. this.props = props;
  5579. this.context = context;
  5580. this.refs = emptyObject;
  5581. // We initialize the default updater but the real one gets injected by the
  5582. // renderer.
  5583. this.updater = updater || ReactNoopUpdateQueue;
  5584. }
  5585. ReactComponent.prototype.isReactComponent = {};
  5586. /**
  5587. * Sets a subset of the state. Always use this to mutate
  5588. * state. You should treat `this.state` as immutable.
  5589. *
  5590. * There is no guarantee that `this.state` will be immediately updated, so
  5591. * accessing `this.state` after calling this method may return the old value.
  5592. *
  5593. * There is no guarantee that calls to `setState` will run synchronously,
  5594. * as they may eventually be batched together. You can provide an optional
  5595. * callback that will be executed when the call to setState is actually
  5596. * completed.
  5597. *
  5598. * When a function is provided to setState, it will be called at some point in
  5599. * the future (not synchronously). It will be called with the up to date
  5600. * component arguments (state, props, context). These values can be different
  5601. * from this.* because your function may be called after receiveProps but before
  5602. * shouldComponentUpdate, and this new state, props, and context will not yet be
  5603. * assigned to this.
  5604. *
  5605. * @param {object|function} partialState Next partial state or function to
  5606. * produce next partial state to be merged with current state.
  5607. * @param {?function} callback Called after state is updated.
  5608. * @final
  5609. * @protected
  5610. */
  5611. ReactComponent.prototype.setState = function (partialState, callback) {
  5612. !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
  5613. this.updater.enqueueSetState(this, partialState);
  5614. if (callback) {
  5615. this.updater.enqueueCallback(this, callback, 'setState');
  5616. }
  5617. };
  5618. /**
  5619. * Forces an update. This should only be invoked when it is known with
  5620. * certainty that we are **not** in a DOM transaction.
  5621. *
  5622. * You may want to call this when you know that some deeper aspect of the
  5623. * component's state has changed but `setState` was not called.
  5624. *
  5625. * This will not invoke `shouldComponentUpdate`, but it will invoke
  5626. * `componentWillUpdate` and `componentDidUpdate`.
  5627. *
  5628. * @param {?function} callback Called after update is complete.
  5629. * @final
  5630. * @protected
  5631. */
  5632. ReactComponent.prototype.forceUpdate = function (callback) {
  5633. this.updater.enqueueForceUpdate(this);
  5634. if (callback) {
  5635. this.updater.enqueueCallback(this, callback, 'forceUpdate');
  5636. }
  5637. };
  5638. /**
  5639. * Deprecated APIs. These APIs used to exist on classic React classes but since
  5640. * we would like to deprecate them, we're not going to move them over to this
  5641. * modern base class. Instead, we define a getter that warns if it's accessed.
  5642. */
  5643. if (process.env.NODE_ENV !== 'production') {
  5644. var deprecatedAPIs = {
  5645. isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
  5646. replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
  5647. };
  5648. var defineDeprecationWarning = function (methodName, info) {
  5649. if (canDefineProperty) {
  5650. Object.defineProperty(ReactComponent.prototype, methodName, {
  5651. get: function () {
  5652. process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
  5653. return undefined;
  5654. }
  5655. });
  5656. }
  5657. };
  5658. for (var fnName in deprecatedAPIs) {
  5659. if (deprecatedAPIs.hasOwnProperty(fnName)) {
  5660. defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
  5661. }
  5662. }
  5663. }
  5664. module.exports = ReactComponent;
  5665. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  5666. /***/ }),
  5667. /* 50 */
  5668. /***/ (function(module, exports, __webpack_require__) {
  5669. "use strict";
  5670. /* WEBPACK VAR INJECTION */(function(process) {/**
  5671. * Copyright 2015-present, Facebook, Inc.
  5672. * All rights reserved.
  5673. *
  5674. * This source code is licensed under the BSD-style license found in the
  5675. * LICENSE file in the root directory of this source tree. An additional grant
  5676. * of patent rights can be found in the PATENTS file in the same directory.
  5677. *
  5678. */
  5679. var warning = __webpack_require__(2);
  5680. function warnNoop(publicInstance, callerName) {
  5681. if (process.env.NODE_ENV !== 'production') {
  5682. var constructor = publicInstance.constructor;
  5683. process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
  5684. }
  5685. }
  5686. /**
  5687. * This is the abstract API for an update queue.
  5688. */
  5689. var ReactNoopUpdateQueue = {
  5690. /**
  5691. * Checks whether or not this composite component is mounted.
  5692. * @param {ReactClass} publicInstance The instance we want to test.
  5693. * @return {boolean} True if mounted, false otherwise.
  5694. * @protected
  5695. * @final
  5696. */
  5697. isMounted: function (publicInstance) {
  5698. return false;
  5699. },
  5700. /**
  5701. * Enqueue a callback that will be executed after all the pending updates
  5702. * have processed.
  5703. *
  5704. * @param {ReactClass} publicInstance The instance to use as `this` context.
  5705. * @param {?function} callback Called after state is updated.
  5706. * @internal
  5707. */
  5708. enqueueCallback: function (publicInstance, callback) {},
  5709. /**
  5710. * Forces an update. This should only be invoked when it is known with
  5711. * certainty that we are **not** in a DOM transaction.
  5712. *
  5713. * You may want to call this when you know that some deeper aspect of the
  5714. * component's state has changed but `setState` was not called.
  5715. *
  5716. * This will not invoke `shouldComponentUpdate`, but it will invoke
  5717. * `componentWillUpdate` and `componentDidUpdate`.
  5718. *
  5719. * @param {ReactClass} publicInstance The instance that should rerender.
  5720. * @internal
  5721. */
  5722. enqueueForceUpdate: function (publicInstance) {
  5723. warnNoop(publicInstance, 'forceUpdate');
  5724. },
  5725. /**
  5726. * Replaces all of the state. Always use this or `setState` to mutate state.
  5727. * You should treat `this.state` as immutable.
  5728. *
  5729. * There is no guarantee that `this.state` will be immediately updated, so
  5730. * accessing `this.state` after calling this method may return the old value.
  5731. *
  5732. * @param {ReactClass} publicInstance The instance that should rerender.
  5733. * @param {object} completeState Next state.
  5734. * @internal
  5735. */
  5736. enqueueReplaceState: function (publicInstance, completeState) {
  5737. warnNoop(publicInstance, 'replaceState');
  5738. },
  5739. /**
  5740. * Sets a subset of the state. This only exists because _pendingState is
  5741. * internal. This provides a merging strategy that is not available to deep
  5742. * properties which is confusing. TODO: Expose pendingState or don't use it
  5743. * during the merge.
  5744. *
  5745. * @param {ReactClass} publicInstance The instance that should rerender.
  5746. * @param {object} partialState Next partial state to be merged with state.
  5747. * @internal
  5748. */
  5749. enqueueSetState: function (publicInstance, partialState) {
  5750. warnNoop(publicInstance, 'setState');
  5751. }
  5752. };
  5753. module.exports = ReactNoopUpdateQueue;
  5754. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  5755. /***/ }),
  5756. /* 51 */
  5757. /***/ (function(module, exports, __webpack_require__) {
  5758. "use strict";
  5759. /* WEBPACK VAR INJECTION */(function(process) {
  5760. /**
  5761. * Copyright (c) 2013-present, Facebook, Inc.
  5762. *
  5763. * Licensed under the Apache License, Version 2.0 (the "License");
  5764. * you may not use this file except in compliance with the License.
  5765. * You may obtain a copy of the License at
  5766. *
  5767. * http://www.apache.org/licenses/LICENSE-2.0
  5768. *
  5769. * Unless required by applicable law or agreed to in writing, software
  5770. * distributed under the License is distributed on an "AS IS" BASIS,
  5771. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5772. * See the License for the specific language governing permissions and
  5773. * limitations under the License.
  5774. *
  5775. * @typechecks
  5776. */
  5777. var emptyFunction = __webpack_require__(9);
  5778. /**
  5779. * Upstream version of event listener. Does not take into account specific
  5780. * nature of platform.
  5781. */
  5782. var EventListener = {
  5783. /**
  5784. * Listen to DOM events during the bubble phase.
  5785. *
  5786. * @param {DOMEventTarget} target DOM element to register listener on.
  5787. * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
  5788. * @param {function} callback Callback function.
  5789. * @return {object} Object with a `remove` method.
  5790. */
  5791. listen: function listen(target, eventType, callback) {
  5792. if (target.addEventListener) {
  5793. target.addEventListener(eventType, callback, false);
  5794. return {
  5795. remove: function remove() {
  5796. target.removeEventListener(eventType, callback, false);
  5797. }
  5798. };
  5799. } else if (target.attachEvent) {
  5800. target.attachEvent('on' + eventType, callback);
  5801. return {
  5802. remove: function remove() {
  5803. target.detachEvent('on' + eventType, callback);
  5804. }
  5805. };
  5806. }
  5807. },
  5808. /**
  5809. * Listen to DOM events during the capture phase.
  5810. *
  5811. * @param {DOMEventTarget} target DOM element to register listener on.
  5812. * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
  5813. * @param {function} callback Callback function.
  5814. * @return {object} Object with a `remove` method.
  5815. */
  5816. capture: function capture(target, eventType, callback) {
  5817. if (target.addEventListener) {
  5818. target.addEventListener(eventType, callback, true);
  5819. return {
  5820. remove: function remove() {
  5821. target.removeEventListener(eventType, callback, true);
  5822. }
  5823. };
  5824. } else {
  5825. if (process.env.NODE_ENV !== 'production') {
  5826. console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
  5827. }
  5828. return {
  5829. remove: emptyFunction
  5830. };
  5831. }
  5832. },
  5833. registerDefault: function registerDefault() {}
  5834. };
  5835. module.exports = EventListener;
  5836. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  5837. /***/ }),
  5838. /* 52 */
  5839. /***/ (function(module, exports, __webpack_require__) {
  5840. "use strict";
  5841. /**
  5842. * Copyright (c) 2013-present, Facebook, Inc.
  5843. * All rights reserved.
  5844. *
  5845. * This source code is licensed under the BSD-style license found in the
  5846. * LICENSE file in the root directory of this source tree. An additional grant
  5847. * of patent rights can be found in the PATENTS file in the same directory.
  5848. *
  5849. */
  5850. /**
  5851. * @param {DOMElement} node input/textarea to focus
  5852. */
  5853. function focusNode(node) {
  5854. // IE8 can throw "Can't move focus to the control because it is invisible,
  5855. // not enabled, or of a type that does not accept the focus." for all kinds of
  5856. // reasons that are too expensive and fragile to test.
  5857. try {
  5858. node.focus();
  5859. } catch (e) {}
  5860. }
  5861. module.exports = focusNode;
  5862. /***/ }),
  5863. /* 53 */
  5864. /***/ (function(module, exports, __webpack_require__) {
  5865. "use strict";
  5866. /**
  5867. * Copyright (c) 2013-present, Facebook, Inc.
  5868. * All rights reserved.
  5869. *
  5870. * This source code is licensed under the BSD-style license found in the
  5871. * LICENSE file in the root directory of this source tree. An additional grant
  5872. * of patent rights can be found in the PATENTS file in the same directory.
  5873. *
  5874. * @typechecks
  5875. */
  5876. /* eslint-disable fb-www/typeof-undefined */
  5877. /**
  5878. * Same as document.activeElement but wraps in a try-catch block. In IE it is
  5879. * not safe to call document.activeElement if there is nothing focused.
  5880. *
  5881. * The activeElement will be null only if the document or document body is not
  5882. * yet defined.
  5883. *
  5884. * @param {?DOMDocument} doc Defaults to current document.
  5885. * @return {?DOMElement}
  5886. */
  5887. function getActiveElement(doc) /*?DOMElement*/{
  5888. doc = doc || (typeof document !== 'undefined' ? document : undefined);
  5889. if (typeof doc === 'undefined') {
  5890. return null;
  5891. }
  5892. try {
  5893. return doc.activeElement || doc.body;
  5894. } catch (e) {
  5895. return doc.body;
  5896. }
  5897. }
  5898. module.exports = getActiveElement;
  5899. /***/ }),
  5900. /* 54 */
  5901. /***/ (function(module, exports, __webpack_require__) {
  5902. "use strict";
  5903. /**
  5904. * Copyright 2013-present, Facebook, Inc.
  5905. * All rights reserved.
  5906. *
  5907. * This source code is licensed under the BSD-style license found in the
  5908. * LICENSE file in the root directory of this source tree. An additional grant
  5909. * of patent rights can be found in the PATENTS file in the same directory.
  5910. */
  5911. // React 15.5 references this module, and assumes PropTypes are still callable in production.
  5912. // Therefore we re-export development-only version with all the PropTypes checks here.
  5913. // However if one is migrating to the `prop-types` npm library, they will go through the
  5914. // `index.js` entry point, and it will branch depending on the environment.
  5915. var factory = __webpack_require__(101);
  5916. module.exports = function(isValidElement) {
  5917. // It is still allowed in 15.5.
  5918. var throwOnDirectAccess = false;
  5919. return factory(isValidElement, throwOnDirectAccess);
  5920. };
  5921. /***/ }),
  5922. /* 55 */
  5923. /***/ (function(module, exports, __webpack_require__) {
  5924. "use strict";
  5925. /**
  5926. * Copyright 2013-present, Facebook, Inc.
  5927. * All rights reserved.
  5928. *
  5929. * This source code is licensed under the BSD-style license found in the
  5930. * LICENSE file in the root directory of this source tree. An additional grant
  5931. * of patent rights can be found in the PATENTS file in the same directory.
  5932. */
  5933. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  5934. module.exports = ReactPropTypesSecret;
  5935. /***/ }),
  5936. /* 56 */
  5937. /***/ (function(module, exports, __webpack_require__) {
  5938. "use strict";
  5939. /**
  5940. * Copyright 2013-present, Facebook, Inc.
  5941. * All rights reserved.
  5942. *
  5943. * This source code is licensed under the BSD-style license found in the
  5944. * LICENSE file in the root directory of this source tree. An additional grant
  5945. * of patent rights can be found in the PATENTS file in the same directory.
  5946. *
  5947. */
  5948. /**
  5949. * CSS properties which accept numbers but are not in units of "px".
  5950. */
  5951. var isUnitlessNumber = {
  5952. animationIterationCount: true,
  5953. borderImageOutset: true,
  5954. borderImageSlice: true,
  5955. borderImageWidth: true,
  5956. boxFlex: true,
  5957. boxFlexGroup: true,
  5958. boxOrdinalGroup: true,
  5959. columnCount: true,
  5960. flex: true,
  5961. flexGrow: true,
  5962. flexPositive: true,
  5963. flexShrink: true,
  5964. flexNegative: true,
  5965. flexOrder: true,
  5966. gridRow: true,
  5967. gridColumn: true,
  5968. fontWeight: true,
  5969. lineClamp: true,
  5970. lineHeight: true,
  5971. opacity: true,
  5972. order: true,
  5973. orphans: true,
  5974. tabSize: true,
  5975. widows: true,
  5976. zIndex: true,
  5977. zoom: true,
  5978. // SVG-related properties
  5979. fillOpacity: true,
  5980. floodOpacity: true,
  5981. stopOpacity: true,
  5982. strokeDasharray: true,
  5983. strokeDashoffset: true,
  5984. strokeMiterlimit: true,
  5985. strokeOpacity: true,
  5986. strokeWidth: true
  5987. };
  5988. /**
  5989. * @param {string} prefix vendor-specific prefix, eg: Webkit
  5990. * @param {string} key style name, eg: transitionDuration
  5991. * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
  5992. * WebkitTransitionDuration
  5993. */
  5994. function prefixKey(prefix, key) {
  5995. return prefix + key.charAt(0).toUpperCase() + key.substring(1);
  5996. }
  5997. /**
  5998. * Support style names that may come passed in prefixed by adding permutations
  5999. * of vendor prefixes.
  6000. */
  6001. var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
  6002. // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
  6003. // infinite loop, because it iterates over the newly added props too.
  6004. Object.keys(isUnitlessNumber).forEach(function (prop) {
  6005. prefixes.forEach(function (prefix) {
  6006. isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
  6007. });
  6008. });
  6009. /**
  6010. * Most style properties can be unset by doing .style[prop] = '' but IE8
  6011. * doesn't like doing that with shorthand properties so for the properties that
  6012. * IE8 breaks on, which are listed here, we instead unset each of the
  6013. * individual properties. See http://bugs.jquery.com/ticket/12385.
  6014. * The 4-value 'clock' properties like margin, padding, border-width seem to
  6015. * behave without any problems. Curiously, list-style works too without any
  6016. * special prodding.
  6017. */
  6018. var shorthandPropertyExpansions = {
  6019. background: {
  6020. backgroundAttachment: true,
  6021. backgroundColor: true,
  6022. backgroundImage: true,
  6023. backgroundPositionX: true,
  6024. backgroundPositionY: true,
  6025. backgroundRepeat: true
  6026. },
  6027. backgroundPosition: {
  6028. backgroundPositionX: true,
  6029. backgroundPositionY: true
  6030. },
  6031. border: {
  6032. borderWidth: true,
  6033. borderStyle: true,
  6034. borderColor: true
  6035. },
  6036. borderBottom: {
  6037. borderBottomWidth: true,
  6038. borderBottomStyle: true,
  6039. borderBottomColor: true
  6040. },
  6041. borderLeft: {
  6042. borderLeftWidth: true,
  6043. borderLeftStyle: true,
  6044. borderLeftColor: true
  6045. },
  6046. borderRight: {
  6047. borderRightWidth: true,
  6048. borderRightStyle: true,
  6049. borderRightColor: true
  6050. },
  6051. borderTop: {
  6052. borderTopWidth: true,
  6053. borderTopStyle: true,
  6054. borderTopColor: true
  6055. },
  6056. font: {
  6057. fontStyle: true,
  6058. fontVariant: true,
  6059. fontWeight: true,
  6060. fontSize: true,
  6061. lineHeight: true,
  6062. fontFamily: true
  6063. },
  6064. outline: {
  6065. outlineWidth: true,
  6066. outlineStyle: true,
  6067. outlineColor: true
  6068. }
  6069. };
  6070. var CSSProperty = {
  6071. isUnitlessNumber: isUnitlessNumber,
  6072. shorthandPropertyExpansions: shorthandPropertyExpansions
  6073. };
  6074. module.exports = CSSProperty;
  6075. /***/ }),
  6076. /* 57 */
  6077. /***/ (function(module, exports, __webpack_require__) {
  6078. "use strict";
  6079. /* WEBPACK VAR INJECTION */(function(process) {/**
  6080. * Copyright 2013-present, Facebook, Inc.
  6081. * All rights reserved.
  6082. *
  6083. * This source code is licensed under the BSD-style license found in the
  6084. * LICENSE file in the root directory of this source tree. An additional grant
  6085. * of patent rights can be found in the PATENTS file in the same directory.
  6086. *
  6087. *
  6088. */
  6089. var _prodInvariant = __webpack_require__(3);
  6090. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6091. var PooledClass = __webpack_require__(14);
  6092. var invariant = __webpack_require__(1);
  6093. /**
  6094. * A specialized pseudo-event module to help keep track of components waiting to
  6095. * be notified when their DOM representations are available for use.
  6096. *
  6097. * This implements `PooledClass`, so you should never need to instantiate this.
  6098. * Instead, use `CallbackQueue.getPooled()`.
  6099. *
  6100. * @class ReactMountReady
  6101. * @implements PooledClass
  6102. * @internal
  6103. */
  6104. var CallbackQueue = function () {
  6105. function CallbackQueue(arg) {
  6106. _classCallCheck(this, CallbackQueue);
  6107. this._callbacks = null;
  6108. this._contexts = null;
  6109. this._arg = arg;
  6110. }
  6111. /**
  6112. * Enqueues a callback to be invoked when `notifyAll` is invoked.
  6113. *
  6114. * @param {function} callback Invoked when `notifyAll` is invoked.
  6115. * @param {?object} context Context to call `callback` with.
  6116. * @internal
  6117. */
  6118. CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
  6119. this._callbacks = this._callbacks || [];
  6120. this._callbacks.push(callback);
  6121. this._contexts = this._contexts || [];
  6122. this._contexts.push(context);
  6123. };
  6124. /**
  6125. * Invokes all enqueued callbacks and clears the queue. This is invoked after
  6126. * the DOM representation of a component has been created or updated.
  6127. *
  6128. * @internal
  6129. */
  6130. CallbackQueue.prototype.notifyAll = function notifyAll() {
  6131. var callbacks = this._callbacks;
  6132. var contexts = this._contexts;
  6133. var arg = this._arg;
  6134. if (callbacks && contexts) {
  6135. !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
  6136. this._callbacks = null;
  6137. this._contexts = null;
  6138. for (var i = 0; i < callbacks.length; i++) {
  6139. callbacks[i].call(contexts[i], arg);
  6140. }
  6141. callbacks.length = 0;
  6142. contexts.length = 0;
  6143. }
  6144. };
  6145. CallbackQueue.prototype.checkpoint = function checkpoint() {
  6146. return this._callbacks ? this._callbacks.length : 0;
  6147. };
  6148. CallbackQueue.prototype.rollback = function rollback(len) {
  6149. if (this._callbacks && this._contexts) {
  6150. this._callbacks.length = len;
  6151. this._contexts.length = len;
  6152. }
  6153. };
  6154. /**
  6155. * Resets the internal queue.
  6156. *
  6157. * @internal
  6158. */
  6159. CallbackQueue.prototype.reset = function reset() {
  6160. this._callbacks = null;
  6161. this._contexts = null;
  6162. };
  6163. /**
  6164. * `PooledClass` looks for this.
  6165. */
  6166. CallbackQueue.prototype.destructor = function destructor() {
  6167. this.reset();
  6168. };
  6169. return CallbackQueue;
  6170. }();
  6171. module.exports = PooledClass.addPoolingTo(CallbackQueue);
  6172. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  6173. /***/ }),
  6174. /* 58 */
  6175. /***/ (function(module, exports, __webpack_require__) {
  6176. "use strict";
  6177. /* WEBPACK VAR INJECTION */(function(process) {/**
  6178. * Copyright 2013-present, Facebook, Inc.
  6179. * All rights reserved.
  6180. *
  6181. * This source code is licensed under the BSD-style license found in the
  6182. * LICENSE file in the root directory of this source tree. An additional grant
  6183. * of patent rights can be found in the PATENTS file in the same directory.
  6184. *
  6185. */
  6186. var DOMProperty = __webpack_require__(13);
  6187. var ReactDOMComponentTree = __webpack_require__(5);
  6188. var ReactInstrumentation = __webpack_require__(8);
  6189. var quoteAttributeValueForBrowser = __webpack_require__(170);
  6190. var warning = __webpack_require__(2);
  6191. var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
  6192. var illegalAttributeNameCache = {};
  6193. var validatedAttributeNameCache = {};
  6194. function isAttributeNameSafe(attributeName) {
  6195. if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
  6196. return true;
  6197. }
  6198. if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
  6199. return false;
  6200. }
  6201. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
  6202. validatedAttributeNameCache[attributeName] = true;
  6203. return true;
  6204. }
  6205. illegalAttributeNameCache[attributeName] = true;
  6206. process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
  6207. return false;
  6208. }
  6209. function shouldIgnoreValue(propertyInfo, value) {
  6210. return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
  6211. }
  6212. /**
  6213. * Operations for dealing with DOM properties.
  6214. */
  6215. var DOMPropertyOperations = {
  6216. /**
  6217. * Creates markup for the ID property.
  6218. *
  6219. * @param {string} id Unescaped ID.
  6220. * @return {string} Markup string.
  6221. */
  6222. createMarkupForID: function (id) {
  6223. return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
  6224. },
  6225. setAttributeForID: function (node, id) {
  6226. node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
  6227. },
  6228. createMarkupForRoot: function () {
  6229. return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
  6230. },
  6231. setAttributeForRoot: function (node) {
  6232. node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
  6233. },
  6234. /**
  6235. * Creates markup for a property.
  6236. *
  6237. * @param {string} name
  6238. * @param {*} value
  6239. * @return {?string} Markup string, or null if the property was invalid.
  6240. */
  6241. createMarkupForProperty: function (name, value) {
  6242. var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
  6243. if (propertyInfo) {
  6244. if (shouldIgnoreValue(propertyInfo, value)) {
  6245. return '';
  6246. }
  6247. var attributeName = propertyInfo.attributeName;
  6248. if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
  6249. return attributeName + '=""';
  6250. }
  6251. return attributeName + '=' + quoteAttributeValueForBrowser(value);
  6252. } else if (DOMProperty.isCustomAttribute(name)) {
  6253. if (value == null) {
  6254. return '';
  6255. }
  6256. return name + '=' + quoteAttributeValueForBrowser(value);
  6257. }
  6258. return null;
  6259. },
  6260. /**
  6261. * Creates markup for a custom property.
  6262. *
  6263. * @param {string} name
  6264. * @param {*} value
  6265. * @return {string} Markup string, or empty string if the property was invalid.
  6266. */
  6267. createMarkupForCustomAttribute: function (name, value) {
  6268. if (!isAttributeNameSafe(name) || value == null) {
  6269. return '';
  6270. }
  6271. return name + '=' + quoteAttributeValueForBrowser(value);
  6272. },
  6273. /**
  6274. * Sets the value for a property on a node.
  6275. *
  6276. * @param {DOMElement} node
  6277. * @param {string} name
  6278. * @param {*} value
  6279. */
  6280. setValueForProperty: function (node, name, value) {
  6281. var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
  6282. if (propertyInfo) {
  6283. var mutationMethod = propertyInfo.mutationMethod;
  6284. if (mutationMethod) {
  6285. mutationMethod(node, value);
  6286. } else if (shouldIgnoreValue(propertyInfo, value)) {
  6287. this.deleteValueForProperty(node, name);
  6288. return;
  6289. } else if (propertyInfo.mustUseProperty) {
  6290. // Contrary to `setAttribute`, object properties are properly
  6291. // `toString`ed by IE8/9.
  6292. node[propertyInfo.propertyName] = value;
  6293. } else {
  6294. var attributeName = propertyInfo.attributeName;
  6295. var namespace = propertyInfo.attributeNamespace;
  6296. // `setAttribute` with objects becomes only `[object]` in IE8/9,
  6297. // ('' + value) makes it output the correct toString()-value.
  6298. if (namespace) {
  6299. node.setAttributeNS(namespace, attributeName, '' + value);
  6300. } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
  6301. node.setAttribute(attributeName, '');
  6302. } else {
  6303. node.setAttribute(attributeName, '' + value);
  6304. }
  6305. }
  6306. } else if (DOMProperty.isCustomAttribute(name)) {
  6307. DOMPropertyOperations.setValueForAttribute(node, name, value);
  6308. return;
  6309. }
  6310. if (process.env.NODE_ENV !== 'production') {
  6311. var payload = {};
  6312. payload[name] = value;
  6313. ReactInstrumentation.debugTool.onHostOperation({
  6314. instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
  6315. type: 'update attribute',
  6316. payload: payload
  6317. });
  6318. }
  6319. },
  6320. setValueForAttribute: function (node, name, value) {
  6321. if (!isAttributeNameSafe(name)) {
  6322. return;
  6323. }
  6324. if (value == null) {
  6325. node.removeAttribute(name);
  6326. } else {
  6327. node.setAttribute(name, '' + value);
  6328. }
  6329. if (process.env.NODE_ENV !== 'production') {
  6330. var payload = {};
  6331. payload[name] = value;
  6332. ReactInstrumentation.debugTool.onHostOperation({
  6333. instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
  6334. type: 'update attribute',
  6335. payload: payload
  6336. });
  6337. }
  6338. },
  6339. /**
  6340. * Deletes an attributes from a node.
  6341. *
  6342. * @param {DOMElement} node
  6343. * @param {string} name
  6344. */
  6345. deleteValueForAttribute: function (node, name) {
  6346. node.removeAttribute(name);
  6347. if (process.env.NODE_ENV !== 'production') {
  6348. ReactInstrumentation.debugTool.onHostOperation({
  6349. instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
  6350. type: 'remove attribute',
  6351. payload: name
  6352. });
  6353. }
  6354. },
  6355. /**
  6356. * Deletes the value for a property on a node.
  6357. *
  6358. * @param {DOMElement} node
  6359. * @param {string} name
  6360. */
  6361. deleteValueForProperty: function (node, name) {
  6362. var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
  6363. if (propertyInfo) {
  6364. var mutationMethod = propertyInfo.mutationMethod;
  6365. if (mutationMethod) {
  6366. mutationMethod(node, undefined);
  6367. } else if (propertyInfo.mustUseProperty) {
  6368. var propName = propertyInfo.propertyName;
  6369. if (propertyInfo.hasBooleanValue) {
  6370. node[propName] = false;
  6371. } else {
  6372. node[propName] = '';
  6373. }
  6374. } else {
  6375. node.removeAttribute(propertyInfo.attributeName);
  6376. }
  6377. } else if (DOMProperty.isCustomAttribute(name)) {
  6378. node.removeAttribute(name);
  6379. }
  6380. if (process.env.NODE_ENV !== 'production') {
  6381. ReactInstrumentation.debugTool.onHostOperation({
  6382. instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
  6383. type: 'remove attribute',
  6384. payload: name
  6385. });
  6386. }
  6387. }
  6388. };
  6389. module.exports = DOMPropertyOperations;
  6390. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  6391. /***/ }),
  6392. /* 59 */
  6393. /***/ (function(module, exports, __webpack_require__) {
  6394. "use strict";
  6395. /**
  6396. * Copyright 2015-present, Facebook, Inc.
  6397. * All rights reserved.
  6398. *
  6399. * This source code is licensed under the BSD-style license found in the
  6400. * LICENSE file in the root directory of this source tree. An additional grant
  6401. * of patent rights can be found in the PATENTS file in the same directory.
  6402. *
  6403. */
  6404. var ReactDOMComponentFlags = {
  6405. hasCachedChildNodes: 1 << 0
  6406. };
  6407. module.exports = ReactDOMComponentFlags;
  6408. /***/ }),
  6409. /* 60 */
  6410. /***/ (function(module, exports, __webpack_require__) {
  6411. "use strict";
  6412. /* WEBPACK VAR INJECTION */(function(process) {/**
  6413. * Copyright 2013-present, Facebook, Inc.
  6414. * All rights reserved.
  6415. *
  6416. * This source code is licensed under the BSD-style license found in the
  6417. * LICENSE file in the root directory of this source tree. An additional grant
  6418. * of patent rights can be found in the PATENTS file in the same directory.
  6419. *
  6420. */
  6421. var _assign = __webpack_require__(4);
  6422. var LinkedValueUtils = __webpack_require__(38);
  6423. var ReactDOMComponentTree = __webpack_require__(5);
  6424. var ReactUpdates = __webpack_require__(10);
  6425. var warning = __webpack_require__(2);
  6426. var didWarnValueLink = false;
  6427. var didWarnValueDefaultValue = false;
  6428. function updateOptionsIfPendingUpdateAndMounted() {
  6429. if (this._rootNodeID && this._wrapperState.pendingUpdate) {
  6430. this._wrapperState.pendingUpdate = false;
  6431. var props = this._currentElement.props;
  6432. var value = LinkedValueUtils.getValue(props);
  6433. if (value != null) {
  6434. updateOptions(this, Boolean(props.multiple), value);
  6435. }
  6436. }
  6437. }
  6438. function getDeclarationErrorAddendum(owner) {
  6439. if (owner) {
  6440. var name = owner.getName();
  6441. if (name) {
  6442. return ' Check the render method of `' + name + '`.';
  6443. }
  6444. }
  6445. return '';
  6446. }
  6447. var valuePropNames = ['value', 'defaultValue'];
  6448. /**
  6449. * Validation function for `value` and `defaultValue`.
  6450. * @private
  6451. */
  6452. function checkSelectPropTypes(inst, props) {
  6453. var owner = inst._currentElement._owner;
  6454. LinkedValueUtils.checkPropTypes('select', props, owner);
  6455. if (props.valueLink !== undefined && !didWarnValueLink) {
  6456. process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
  6457. didWarnValueLink = true;
  6458. }
  6459. for (var i = 0; i < valuePropNames.length; i++) {
  6460. var propName = valuePropNames[i];
  6461. if (props[propName] == null) {
  6462. continue;
  6463. }
  6464. var isArray = Array.isArray(props[propName]);
  6465. if (props.multiple && !isArray) {
  6466. process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
  6467. } else if (!props.multiple && isArray) {
  6468. process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
  6469. }
  6470. }
  6471. }
  6472. /**
  6473. * @param {ReactDOMComponent} inst
  6474. * @param {boolean} multiple
  6475. * @param {*} propValue A stringable (with `multiple`, a list of stringables).
  6476. * @private
  6477. */
  6478. function updateOptions(inst, multiple, propValue) {
  6479. var selectedValue, i;
  6480. var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
  6481. if (multiple) {
  6482. selectedValue = {};
  6483. for (i = 0; i < propValue.length; i++) {
  6484. selectedValue['' + propValue[i]] = true;
  6485. }
  6486. for (i = 0; i < options.length; i++) {
  6487. var selected = selectedValue.hasOwnProperty(options[i].value);
  6488. if (options[i].selected !== selected) {
  6489. options[i].selected = selected;
  6490. }
  6491. }
  6492. } else {
  6493. // Do not set `select.value` as exact behavior isn't consistent across all
  6494. // browsers for all cases.
  6495. selectedValue = '' + propValue;
  6496. for (i = 0; i < options.length; i++) {
  6497. if (options[i].value === selectedValue) {
  6498. options[i].selected = true;
  6499. return;
  6500. }
  6501. }
  6502. if (options.length) {
  6503. options[0].selected = true;
  6504. }
  6505. }
  6506. }
  6507. /**
  6508. * Implements a <select> host component that allows optionally setting the
  6509. * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
  6510. * stringable. If `multiple` is true, the prop must be an array of stringables.
  6511. *
  6512. * If `value` is not supplied (or null/undefined), user actions that change the
  6513. * selected option will trigger updates to the rendered options.
  6514. *
  6515. * If it is supplied (and not null/undefined), the rendered options will not
  6516. * update in response to user actions. Instead, the `value` prop must change in
  6517. * order for the rendered options to update.
  6518. *
  6519. * If `defaultValue` is provided, any options with the supplied values will be
  6520. * selected.
  6521. */
  6522. var ReactDOMSelect = {
  6523. getHostProps: function (inst, props) {
  6524. return _assign({}, props, {
  6525. onChange: inst._wrapperState.onChange,
  6526. value: undefined
  6527. });
  6528. },
  6529. mountWrapper: function (inst, props) {
  6530. if (process.env.NODE_ENV !== 'production') {
  6531. checkSelectPropTypes(inst, props);
  6532. }
  6533. var value = LinkedValueUtils.getValue(props);
  6534. inst._wrapperState = {
  6535. pendingUpdate: false,
  6536. initialValue: value != null ? value : props.defaultValue,
  6537. listeners: null,
  6538. onChange: _handleChange.bind(inst),
  6539. wasMultiple: Boolean(props.multiple)
  6540. };
  6541. if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
  6542. process.env.NODE_ENV !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
  6543. didWarnValueDefaultValue = true;
  6544. }
  6545. },
  6546. getSelectValueContext: function (inst) {
  6547. // ReactDOMOption looks at this initial value so the initial generated
  6548. // markup has correct `selected` attributes
  6549. return inst._wrapperState.initialValue;
  6550. },
  6551. postUpdateWrapper: function (inst) {
  6552. var props = inst._currentElement.props;
  6553. // After the initial mount, we control selected-ness manually so don't pass
  6554. // this value down
  6555. inst._wrapperState.initialValue = undefined;
  6556. var wasMultiple = inst._wrapperState.wasMultiple;
  6557. inst._wrapperState.wasMultiple = Boolean(props.multiple);
  6558. var value = LinkedValueUtils.getValue(props);
  6559. if (value != null) {
  6560. inst._wrapperState.pendingUpdate = false;
  6561. updateOptions(inst, Boolean(props.multiple), value);
  6562. } else if (wasMultiple !== Boolean(props.multiple)) {
  6563. // For simplicity, reapply `defaultValue` if `multiple` is toggled.
  6564. if (props.defaultValue != null) {
  6565. updateOptions(inst, Boolean(props.multiple), props.defaultValue);
  6566. } else {
  6567. // Revert the select back to its default unselected state.
  6568. updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
  6569. }
  6570. }
  6571. }
  6572. };
  6573. function _handleChange(event) {
  6574. var props = this._currentElement.props;
  6575. var returnValue = LinkedValueUtils.executeOnChange(props, event);
  6576. if (this._rootNodeID) {
  6577. this._wrapperState.pendingUpdate = true;
  6578. }
  6579. ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
  6580. return returnValue;
  6581. }
  6582. module.exports = ReactDOMSelect;
  6583. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  6584. /***/ }),
  6585. /* 61 */
  6586. /***/ (function(module, exports, __webpack_require__) {
  6587. "use strict";
  6588. /**
  6589. * Copyright 2014-present, Facebook, Inc.
  6590. * All rights reserved.
  6591. *
  6592. * This source code is licensed under the BSD-style license found in the
  6593. * LICENSE file in the root directory of this source tree. An additional grant
  6594. * of patent rights can be found in the PATENTS file in the same directory.
  6595. *
  6596. */
  6597. var emptyComponentFactory;
  6598. var ReactEmptyComponentInjection = {
  6599. injectEmptyComponentFactory: function (factory) {
  6600. emptyComponentFactory = factory;
  6601. }
  6602. };
  6603. var ReactEmptyComponent = {
  6604. create: function (instantiate) {
  6605. return emptyComponentFactory(instantiate);
  6606. }
  6607. };
  6608. ReactEmptyComponent.injection = ReactEmptyComponentInjection;
  6609. module.exports = ReactEmptyComponent;
  6610. /***/ }),
  6611. /* 62 */
  6612. /***/ (function(module, exports, __webpack_require__) {
  6613. "use strict";
  6614. /**
  6615. * Copyright 2013-present, Facebook, Inc.
  6616. * All rights reserved.
  6617. *
  6618. * This source code is licensed under the BSD-style license found in the
  6619. * LICENSE file in the root directory of this source tree. An additional grant
  6620. * of patent rights can be found in the PATENTS file in the same directory.
  6621. *
  6622. *
  6623. */
  6624. var ReactFeatureFlags = {
  6625. // When true, call console.time() before and .timeEnd() after each top-level
  6626. // render (both initial renders and updates). Useful when looking at prod-mode
  6627. // timeline profiles in Chrome, for example.
  6628. logTopLevelRenders: false
  6629. };
  6630. module.exports = ReactFeatureFlags;
  6631. /***/ }),
  6632. /* 63 */
  6633. /***/ (function(module, exports, __webpack_require__) {
  6634. "use strict";
  6635. /* WEBPACK VAR INJECTION */(function(process) {/**
  6636. * Copyright 2014-present, Facebook, Inc.
  6637. * All rights reserved.
  6638. *
  6639. * This source code is licensed under the BSD-style license found in the
  6640. * LICENSE file in the root directory of this source tree. An additional grant
  6641. * of patent rights can be found in the PATENTS file in the same directory.
  6642. *
  6643. */
  6644. var _prodInvariant = __webpack_require__(3);
  6645. var invariant = __webpack_require__(1);
  6646. var genericComponentClass = null;
  6647. var textComponentClass = null;
  6648. var ReactHostComponentInjection = {
  6649. // This accepts a class that receives the tag string. This is a catch all
  6650. // that can render any kind of tag.
  6651. injectGenericComponentClass: function (componentClass) {
  6652. genericComponentClass = componentClass;
  6653. },
  6654. // This accepts a text component class that takes the text string to be
  6655. // rendered as props.
  6656. injectTextComponentClass: function (componentClass) {
  6657. textComponentClass = componentClass;
  6658. }
  6659. };
  6660. /**
  6661. * Get a host internal component class for a specific tag.
  6662. *
  6663. * @param {ReactElement} element The element to create.
  6664. * @return {function} The internal class constructor function.
  6665. */
  6666. function createInternalComponent(element) {
  6667. !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
  6668. return new genericComponentClass(element);
  6669. }
  6670. /**
  6671. * @param {ReactText} text
  6672. * @return {ReactComponent}
  6673. */
  6674. function createInstanceForText(text) {
  6675. return new textComponentClass(text);
  6676. }
  6677. /**
  6678. * @param {ReactComponent} component
  6679. * @return {boolean}
  6680. */
  6681. function isTextComponent(component) {
  6682. return component instanceof textComponentClass;
  6683. }
  6684. var ReactHostComponent = {
  6685. createInternalComponent: createInternalComponent,
  6686. createInstanceForText: createInstanceForText,
  6687. isTextComponent: isTextComponent,
  6688. injection: ReactHostComponentInjection
  6689. };
  6690. module.exports = ReactHostComponent;
  6691. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  6692. /***/ }),
  6693. /* 64 */
  6694. /***/ (function(module, exports, __webpack_require__) {
  6695. "use strict";
  6696. /**
  6697. * Copyright 2013-present, Facebook, Inc.
  6698. * All rights reserved.
  6699. *
  6700. * This source code is licensed under the BSD-style license found in the
  6701. * LICENSE file in the root directory of this source tree. An additional grant
  6702. * of patent rights can be found in the PATENTS file in the same directory.
  6703. *
  6704. */
  6705. var ReactDOMSelection = __webpack_require__(125);
  6706. var containsNode = __webpack_require__(88);
  6707. var focusNode = __webpack_require__(52);
  6708. var getActiveElement = __webpack_require__(53);
  6709. function isInDocument(node) {
  6710. return containsNode(document.documentElement, node);
  6711. }
  6712. /**
  6713. * @ReactInputSelection: React input selection module. Based on Selection.js,
  6714. * but modified to be suitable for react and has a couple of bug fixes (doesn't
  6715. * assume buttons have range selections allowed).
  6716. * Input selection module for React.
  6717. */
  6718. var ReactInputSelection = {
  6719. hasSelectionCapabilities: function (elem) {
  6720. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  6721. return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
  6722. },
  6723. getSelectionInformation: function () {
  6724. var focusedElem = getActiveElement();
  6725. return {
  6726. focusedElem: focusedElem,
  6727. selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
  6728. };
  6729. },
  6730. /**
  6731. * @restoreSelection: If any selection information was potentially lost,
  6732. * restore it. This is useful when performing operations that could remove dom
  6733. * nodes and place them back in, resulting in focus being lost.
  6734. */
  6735. restoreSelection: function (priorSelectionInformation) {
  6736. var curFocusedElem = getActiveElement();
  6737. var priorFocusedElem = priorSelectionInformation.focusedElem;
  6738. var priorSelectionRange = priorSelectionInformation.selectionRange;
  6739. if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
  6740. if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
  6741. ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
  6742. }
  6743. focusNode(priorFocusedElem);
  6744. }
  6745. },
  6746. /**
  6747. * @getSelection: Gets the selection bounds of a focused textarea, input or
  6748. * contentEditable node.
  6749. * -@input: Look up selection bounds of this input
  6750. * -@return {start: selectionStart, end: selectionEnd}
  6751. */
  6752. getSelection: function (input) {
  6753. var selection;
  6754. if ('selectionStart' in input) {
  6755. // Modern browser with input or textarea.
  6756. selection = {
  6757. start: input.selectionStart,
  6758. end: input.selectionEnd
  6759. };
  6760. } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
  6761. // IE8 input.
  6762. var range = document.selection.createRange();
  6763. // There can only be one selection per document in IE, so it must
  6764. // be in our element.
  6765. if (range.parentElement() === input) {
  6766. selection = {
  6767. start: -range.moveStart('character', -input.value.length),
  6768. end: -range.moveEnd('character', -input.value.length)
  6769. };
  6770. }
  6771. } else {
  6772. // Content editable or old IE textarea.
  6773. selection = ReactDOMSelection.getOffsets(input);
  6774. }
  6775. return selection || { start: 0, end: 0 };
  6776. },
  6777. /**
  6778. * @setSelection: Sets the selection bounds of a textarea or input and focuses
  6779. * the input.
  6780. * -@input Set selection bounds of this input or textarea
  6781. * -@offsets Object of same form that is returned from get*
  6782. */
  6783. setSelection: function (input, offsets) {
  6784. var start = offsets.start;
  6785. var end = offsets.end;
  6786. if (end === undefined) {
  6787. end = start;
  6788. }
  6789. if ('selectionStart' in input) {
  6790. input.selectionStart = start;
  6791. input.selectionEnd = Math.min(end, input.value.length);
  6792. } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
  6793. var range = input.createTextRange();
  6794. range.collapse(true);
  6795. range.moveStart('character', start);
  6796. range.moveEnd('character', end - start);
  6797. range.select();
  6798. } else {
  6799. ReactDOMSelection.setOffsets(input, offsets);
  6800. }
  6801. }
  6802. };
  6803. module.exports = ReactInputSelection;
  6804. /***/ }),
  6805. /* 65 */
  6806. /***/ (function(module, exports, __webpack_require__) {
  6807. "use strict";
  6808. /* WEBPACK VAR INJECTION */(function(process) {/**
  6809. * Copyright 2013-present, Facebook, Inc.
  6810. * All rights reserved.
  6811. *
  6812. * This source code is licensed under the BSD-style license found in the
  6813. * LICENSE file in the root directory of this source tree. An additional grant
  6814. * of patent rights can be found in the PATENTS file in the same directory.
  6815. *
  6816. */
  6817. var _prodInvariant = __webpack_require__(3);
  6818. var DOMLazyTree = __webpack_require__(17);
  6819. var DOMProperty = __webpack_require__(13);
  6820. var React = __webpack_require__(19);
  6821. var ReactBrowserEventEmitter = __webpack_require__(26);
  6822. var ReactCurrentOwner = __webpack_require__(11);
  6823. var ReactDOMComponentTree = __webpack_require__(5);
  6824. var ReactDOMContainerInfo = __webpack_require__(117);
  6825. var ReactDOMFeatureFlags = __webpack_require__(119);
  6826. var ReactFeatureFlags = __webpack_require__(62);
  6827. var ReactInstanceMap = __webpack_require__(23);
  6828. var ReactInstrumentation = __webpack_require__(8);
  6829. var ReactMarkupChecksum = __webpack_require__(139);
  6830. var ReactReconciler = __webpack_require__(18);
  6831. var ReactUpdateQueue = __webpack_require__(41);
  6832. var ReactUpdates = __webpack_require__(10);
  6833. var emptyObject = __webpack_require__(20);
  6834. var instantiateReactComponent = __webpack_require__(73);
  6835. var invariant = __webpack_require__(1);
  6836. var setInnerHTML = __webpack_require__(30);
  6837. var shouldUpdateReactComponent = __webpack_require__(47);
  6838. var warning = __webpack_require__(2);
  6839. var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
  6840. var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;
  6841. var ELEMENT_NODE_TYPE = 1;
  6842. var DOC_NODE_TYPE = 9;
  6843. var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
  6844. var instancesByReactRootID = {};
  6845. /**
  6846. * Finds the index of the first character
  6847. * that's not common between the two given strings.
  6848. *
  6849. * @return {number} the index of the character where the strings diverge
  6850. */
  6851. function firstDifferenceIndex(string1, string2) {
  6852. var minLen = Math.min(string1.length, string2.length);
  6853. for (var i = 0; i < minLen; i++) {
  6854. if (string1.charAt(i) !== string2.charAt(i)) {
  6855. return i;
  6856. }
  6857. }
  6858. return string1.length === string2.length ? -1 : minLen;
  6859. }
  6860. /**
  6861. * @param {DOMElement|DOMDocument} container DOM element that may contain
  6862. * a React component
  6863. * @return {?*} DOM element that may have the reactRoot ID, or null.
  6864. */
  6865. function getReactRootElementInContainer(container) {
  6866. if (!container) {
  6867. return null;
  6868. }
  6869. if (container.nodeType === DOC_NODE_TYPE) {
  6870. return container.documentElement;
  6871. } else {
  6872. return container.firstChild;
  6873. }
  6874. }
  6875. function internalGetID(node) {
  6876. // If node is something like a window, document, or text node, none of
  6877. // which support attributes or a .getAttribute method, gracefully return
  6878. // the empty string, as if the attribute were missing.
  6879. return node.getAttribute && node.getAttribute(ATTR_NAME) || '';
  6880. }
  6881. /**
  6882. * Mounts this component and inserts it into the DOM.
  6883. *
  6884. * @param {ReactComponent} componentInstance The instance to mount.
  6885. * @param {DOMElement} container DOM element to mount into.
  6886. * @param {ReactReconcileTransaction} transaction
  6887. * @param {boolean} shouldReuseMarkup If true, do not insert markup
  6888. */
  6889. function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
  6890. var markerName;
  6891. if (ReactFeatureFlags.logTopLevelRenders) {
  6892. var wrappedElement = wrapperInstance._currentElement.props.child;
  6893. var type = wrappedElement.type;
  6894. markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);
  6895. console.time(markerName);
  6896. }
  6897. var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */
  6898. );
  6899. if (markerName) {
  6900. console.timeEnd(markerName);
  6901. }
  6902. wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;
  6903. ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
  6904. }
  6905. /**
  6906. * Batched mount.
  6907. *
  6908. * @param {ReactComponent} componentInstance The instance to mount.
  6909. * @param {DOMElement} container DOM element to mount into.
  6910. * @param {boolean} shouldReuseMarkup If true, do not insert markup
  6911. */
  6912. function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {
  6913. var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
  6914. /* useCreateElement */
  6915. !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
  6916. transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);
  6917. ReactUpdates.ReactReconcileTransaction.release(transaction);
  6918. }
  6919. /**
  6920. * Unmounts a component and removes it from the DOM.
  6921. *
  6922. * @param {ReactComponent} instance React component instance.
  6923. * @param {DOMElement} container DOM element to unmount from.
  6924. * @final
  6925. * @internal
  6926. * @see {ReactMount.unmountComponentAtNode}
  6927. */
  6928. function unmountComponentFromNode(instance, container, safely) {
  6929. if (process.env.NODE_ENV !== 'production') {
  6930. ReactInstrumentation.debugTool.onBeginFlush();
  6931. }
  6932. ReactReconciler.unmountComponent(instance, safely);
  6933. if (process.env.NODE_ENV !== 'production') {
  6934. ReactInstrumentation.debugTool.onEndFlush();
  6935. }
  6936. if (container.nodeType === DOC_NODE_TYPE) {
  6937. container = container.documentElement;
  6938. }
  6939. // http://jsperf.com/emptying-a-node
  6940. while (container.lastChild) {
  6941. container.removeChild(container.lastChild);
  6942. }
  6943. }
  6944. /**
  6945. * True if the supplied DOM node has a direct React-rendered child that is
  6946. * not a React root element. Useful for warning in `render`,
  6947. * `unmountComponentAtNode`, etc.
  6948. *
  6949. * @param {?DOMElement} node The candidate DOM node.
  6950. * @return {boolean} True if the DOM element contains a direct child that was
  6951. * rendered by React but is not a root element.
  6952. * @internal
  6953. */
  6954. function hasNonRootReactChild(container) {
  6955. var rootEl = getReactRootElementInContainer(container);
  6956. if (rootEl) {
  6957. var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);
  6958. return !!(inst && inst._hostParent);
  6959. }
  6960. }
  6961. /**
  6962. * True if the supplied DOM node is a React DOM element and
  6963. * it has been rendered by another copy of React.
  6964. *
  6965. * @param {?DOMElement} node The candidate DOM node.
  6966. * @return {boolean} True if the DOM has been rendered by another copy of React
  6967. * @internal
  6968. */
  6969. function nodeIsRenderedByOtherInstance(container) {
  6970. var rootEl = getReactRootElementInContainer(container);
  6971. return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
  6972. }
  6973. /**
  6974. * True if the supplied DOM node is a valid node element.
  6975. *
  6976. * @param {?DOMElement} node The candidate DOM node.
  6977. * @return {boolean} True if the DOM is a valid DOM node.
  6978. * @internal
  6979. */
  6980. function isValidContainer(node) {
  6981. return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));
  6982. }
  6983. /**
  6984. * True if the supplied DOM node is a valid React node element.
  6985. *
  6986. * @param {?DOMElement} node The candidate DOM node.
  6987. * @return {boolean} True if the DOM is a valid React DOM node.
  6988. * @internal
  6989. */
  6990. function isReactNode(node) {
  6991. return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
  6992. }
  6993. function getHostRootInstanceInContainer(container) {
  6994. var rootEl = getReactRootElementInContainer(container);
  6995. var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
  6996. return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;
  6997. }
  6998. function getTopLevelWrapperInContainer(container) {
  6999. var root = getHostRootInstanceInContainer(container);
  7000. return root ? root._hostContainerInfo._topLevelWrapper : null;
  7001. }
  7002. /**
  7003. * Temporary (?) hack so that we can store all top-level pending updates on
  7004. * composites instead of having to worry about different types of components
  7005. * here.
  7006. */
  7007. var topLevelRootCounter = 1;
  7008. var TopLevelWrapper = function () {
  7009. this.rootID = topLevelRootCounter++;
  7010. };
  7011. TopLevelWrapper.prototype.isReactComponent = {};
  7012. if (process.env.NODE_ENV !== 'production') {
  7013. TopLevelWrapper.displayName = 'TopLevelWrapper';
  7014. }
  7015. TopLevelWrapper.prototype.render = function () {
  7016. return this.props.child;
  7017. };
  7018. TopLevelWrapper.isReactTopLevelWrapper = true;
  7019. /**
  7020. * Mounting is the process of initializing a React component by creating its
  7021. * representative DOM elements and inserting them into a supplied `container`.
  7022. * Any prior content inside `container` is destroyed in the process.
  7023. *
  7024. * ReactMount.render(
  7025. * component,
  7026. * document.getElementById('container')
  7027. * );
  7028. *
  7029. * <div id="container"> <-- Supplied `container`.
  7030. * <div data-reactid=".3"> <-- Rendered reactRoot of React
  7031. * // ... component.
  7032. * </div>
  7033. * </div>
  7034. *
  7035. * Inside of `container`, the first element rendered is the "reactRoot".
  7036. */
  7037. var ReactMount = {
  7038. TopLevelWrapper: TopLevelWrapper,
  7039. /**
  7040. * Used by devtools. The keys are not important.
  7041. */
  7042. _instancesByReactRootID: instancesByReactRootID,
  7043. /**
  7044. * This is a hook provided to support rendering React components while
  7045. * ensuring that the apparent scroll position of its `container` does not
  7046. * change.
  7047. *
  7048. * @param {DOMElement} container The `container` being rendered into.
  7049. * @param {function} renderCallback This must be called once to do the render.
  7050. */
  7051. scrollMonitor: function (container, renderCallback) {
  7052. renderCallback();
  7053. },
  7054. /**
  7055. * Take a component that's already mounted into the DOM and replace its props
  7056. * @param {ReactComponent} prevComponent component instance already in the DOM
  7057. * @param {ReactElement} nextElement component instance to render
  7058. * @param {DOMElement} container container to render into
  7059. * @param {?function} callback function triggered on completion
  7060. */
  7061. _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {
  7062. ReactMount.scrollMonitor(container, function () {
  7063. ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);
  7064. if (callback) {
  7065. ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
  7066. }
  7067. });
  7068. return prevComponent;
  7069. },
  7070. /**
  7071. * Render a new component into the DOM. Hooked by hooks!
  7072. *
  7073. * @param {ReactElement} nextElement element to render
  7074. * @param {DOMElement} container container to render into
  7075. * @param {boolean} shouldReuseMarkup if we should skip the markup insertion
  7076. * @return {ReactComponent} nextComponent
  7077. */
  7078. _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
  7079. // Various parts of our code (such as ReactCompositeComponent's
  7080. // _renderValidatedComponent) assume that calls to render aren't nested;
  7081. // verify that that's the case.
  7082. process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
  7083. !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;
  7084. ReactBrowserEventEmitter.ensureScrollValueMonitoring();
  7085. var componentInstance = instantiateReactComponent(nextElement, false);
  7086. // The initial render is synchronous but any updates that happen during
  7087. // rendering, in componentWillMount or componentDidMount, will be batched
  7088. // according to the current batching strategy.
  7089. ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
  7090. var wrapperID = componentInstance._instance.rootID;
  7091. instancesByReactRootID[wrapperID] = componentInstance;
  7092. return componentInstance;
  7093. },
  7094. /**
  7095. * Renders a React component into the DOM in the supplied `container`.
  7096. *
  7097. * If the React component was previously rendered into `container`, this will
  7098. * perform an update on it and only mutate the DOM as necessary to reflect the
  7099. * latest React component.
  7100. *
  7101. * @param {ReactComponent} parentComponent The conceptual parent of this render tree.
  7102. * @param {ReactElement} nextElement Component element to render.
  7103. * @param {DOMElement} container DOM element to render into.
  7104. * @param {?function} callback function triggered on completion
  7105. * @return {ReactComponent} Component instance rendered in `container`.
  7106. */
  7107. renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
  7108. !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;
  7109. return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
  7110. },
  7111. _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
  7112. ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');
  7113. !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' :
  7114. // Check if it quacks like an element
  7115. nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;
  7116. process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
  7117. var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement });
  7118. var nextContext;
  7119. if (parentComponent) {
  7120. var parentInst = ReactInstanceMap.get(parentComponent);
  7121. nextContext = parentInst._processChildContext(parentInst._context);
  7122. } else {
  7123. nextContext = emptyObject;
  7124. }
  7125. var prevComponent = getTopLevelWrapperInContainer(container);
  7126. if (prevComponent) {
  7127. var prevWrappedElement = prevComponent._currentElement;
  7128. var prevElement = prevWrappedElement.props.child;
  7129. if (shouldUpdateReactComponent(prevElement, nextElement)) {
  7130. var publicInst = prevComponent._renderedComponent.getPublicInstance();
  7131. var updatedCallback = callback && function () {
  7132. callback.call(publicInst);
  7133. };
  7134. ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);
  7135. return publicInst;
  7136. } else {
  7137. ReactMount.unmountComponentAtNode(container);
  7138. }
  7139. }
  7140. var reactRootElement = getReactRootElementInContainer(container);
  7141. var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
  7142. var containerHasNonRootReactChild = hasNonRootReactChild(container);
  7143. if (process.env.NODE_ENV !== 'production') {
  7144. process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
  7145. if (!containerHasReactMarkup || reactRootElement.nextSibling) {
  7146. var rootElementSibling = reactRootElement;
  7147. while (rootElementSibling) {
  7148. if (internalGetID(rootElementSibling)) {
  7149. process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;
  7150. break;
  7151. }
  7152. rootElementSibling = rootElementSibling.nextSibling;
  7153. }
  7154. }
  7155. }
  7156. var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
  7157. var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
  7158. if (callback) {
  7159. callback.call(component);
  7160. }
  7161. return component;
  7162. },
  7163. /**
  7164. * Renders a React component into the DOM in the supplied `container`.
  7165. * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render
  7166. *
  7167. * If the React component was previously rendered into `container`, this will
  7168. * perform an update on it and only mutate the DOM as necessary to reflect the
  7169. * latest React component.
  7170. *
  7171. * @param {ReactElement} nextElement Component element to render.
  7172. * @param {DOMElement} container DOM element to render into.
  7173. * @param {?function} callback function triggered on completion
  7174. * @return {ReactComponent} Component instance rendered in `container`.
  7175. */
  7176. render: function (nextElement, container, callback) {
  7177. return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
  7178. },
  7179. /**
  7180. * Unmounts and destroys the React component rendered in the `container`.
  7181. * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode
  7182. *
  7183. * @param {DOMElement} container DOM element containing a React component.
  7184. * @return {boolean} True if a component was found in and unmounted from
  7185. * `container`
  7186. */
  7187. unmountComponentAtNode: function (container) {
  7188. // Various parts of our code (such as ReactCompositeComponent's
  7189. // _renderValidatedComponent) assume that calls to render aren't nested;
  7190. // verify that that's the case. (Strictly speaking, unmounting won't cause a
  7191. // render but we still don't expect to be in a render call here.)
  7192. process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
  7193. !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
  7194. if (process.env.NODE_ENV !== 'production') {
  7195. process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;
  7196. }
  7197. var prevComponent = getTopLevelWrapperInContainer(container);
  7198. if (!prevComponent) {
  7199. // Check if the node being unmounted was rendered by React, but isn't a
  7200. // root node.
  7201. var containerHasNonRootReactChild = hasNonRootReactChild(container);
  7202. // Check if the container itself is a React root node.
  7203. var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);
  7204. if (process.env.NODE_ENV !== 'production') {
  7205. process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
  7206. }
  7207. return false;
  7208. }
  7209. delete instancesByReactRootID[prevComponent._instance.rootID];
  7210. ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);
  7211. return true;
  7212. },
  7213. _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {
  7214. !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;
  7215. if (shouldReuseMarkup) {
  7216. var rootElement = getReactRootElementInContainer(container);
  7217. if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
  7218. ReactDOMComponentTree.precacheNode(instance, rootElement);
  7219. return;
  7220. } else {
  7221. var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
  7222. rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
  7223. var rootMarkup = rootElement.outerHTML;
  7224. rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
  7225. var normalizedMarkup = markup;
  7226. if (process.env.NODE_ENV !== 'production') {
  7227. // because rootMarkup is retrieved from the DOM, various normalizations
  7228. // will have occurred which will not be present in `markup`. Here,
  7229. // insert markup into a <div> or <iframe> depending on the container
  7230. // type to perform the same normalizations before comparing.
  7231. var normalizer;
  7232. if (container.nodeType === ELEMENT_NODE_TYPE) {
  7233. normalizer = document.createElement('div');
  7234. normalizer.innerHTML = markup;
  7235. normalizedMarkup = normalizer.innerHTML;
  7236. } else {
  7237. normalizer = document.createElement('iframe');
  7238. document.body.appendChild(normalizer);
  7239. normalizer.contentDocument.write(markup);
  7240. normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
  7241. document.body.removeChild(normalizer);
  7242. }
  7243. }
  7244. var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
  7245. var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
  7246. !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0;
  7247. if (process.env.NODE_ENV !== 'production') {
  7248. process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0;
  7249. }
  7250. }
  7251. }
  7252. !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;
  7253. if (transaction.useCreateElement) {
  7254. while (container.lastChild) {
  7255. container.removeChild(container.lastChild);
  7256. }
  7257. DOMLazyTree.insertTreeBefore(container, markup, null);
  7258. } else {
  7259. setInnerHTML(container, markup);
  7260. ReactDOMComponentTree.precacheNode(instance, container.firstChild);
  7261. }
  7262. if (process.env.NODE_ENV !== 'production') {
  7263. var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);
  7264. if (hostNode._debugID !== 0) {
  7265. ReactInstrumentation.debugTool.onHostOperation({
  7266. instanceID: hostNode._debugID,
  7267. type: 'mount',
  7268. payload: markup.toString()
  7269. });
  7270. }
  7271. }
  7272. }
  7273. };
  7274. module.exports = ReactMount;
  7275. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  7276. /***/ }),
  7277. /* 66 */
  7278. /***/ (function(module, exports, __webpack_require__) {
  7279. "use strict";
  7280. /* WEBPACK VAR INJECTION */(function(process) {/**
  7281. * Copyright 2013-present, Facebook, Inc.
  7282. * All rights reserved.
  7283. *
  7284. * This source code is licensed under the BSD-style license found in the
  7285. * LICENSE file in the root directory of this source tree. An additional grant
  7286. * of patent rights can be found in the PATENTS file in the same directory.
  7287. *
  7288. *
  7289. */
  7290. var _prodInvariant = __webpack_require__(3);
  7291. var React = __webpack_require__(19);
  7292. var invariant = __webpack_require__(1);
  7293. var ReactNodeTypes = {
  7294. HOST: 0,
  7295. COMPOSITE: 1,
  7296. EMPTY: 2,
  7297. getType: function (node) {
  7298. if (node === null || node === false) {
  7299. return ReactNodeTypes.EMPTY;
  7300. } else if (React.isValidElement(node)) {
  7301. if (typeof node.type === 'function') {
  7302. return ReactNodeTypes.COMPOSITE;
  7303. } else {
  7304. return ReactNodeTypes.HOST;
  7305. }
  7306. }
  7307. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
  7308. }
  7309. };
  7310. module.exports = ReactNodeTypes;
  7311. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  7312. /***/ }),
  7313. /* 67 */
  7314. /***/ (function(module, exports, __webpack_require__) {
  7315. "use strict";
  7316. /**
  7317. * Copyright 2013-present, Facebook, Inc.
  7318. * All rights reserved.
  7319. *
  7320. * This source code is licensed under the BSD-style license found in the
  7321. * LICENSE file in the root directory of this source tree. An additional grant
  7322. * of patent rights can be found in the PATENTS file in the same directory.
  7323. *
  7324. *
  7325. */
  7326. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  7327. module.exports = ReactPropTypesSecret;
  7328. /***/ }),
  7329. /* 68 */
  7330. /***/ (function(module, exports, __webpack_require__) {
  7331. "use strict";
  7332. /**
  7333. * Copyright 2013-present, Facebook, Inc.
  7334. * All rights reserved.
  7335. *
  7336. * This source code is licensed under the BSD-style license found in the
  7337. * LICENSE file in the root directory of this source tree. An additional grant
  7338. * of patent rights can be found in the PATENTS file in the same directory.
  7339. *
  7340. */
  7341. var ViewportMetrics = {
  7342. currentScrollLeft: 0,
  7343. currentScrollTop: 0,
  7344. refreshScrollValues: function (scrollPosition) {
  7345. ViewportMetrics.currentScrollLeft = scrollPosition.x;
  7346. ViewportMetrics.currentScrollTop = scrollPosition.y;
  7347. }
  7348. };
  7349. module.exports = ViewportMetrics;
  7350. /***/ }),
  7351. /* 69 */
  7352. /***/ (function(module, exports, __webpack_require__) {
  7353. "use strict";
  7354. /* WEBPACK VAR INJECTION */(function(process) {/**
  7355. * Copyright 2014-present, Facebook, Inc.
  7356. * All rights reserved.
  7357. *
  7358. * This source code is licensed under the BSD-style license found in the
  7359. * LICENSE file in the root directory of this source tree. An additional grant
  7360. * of patent rights can be found in the PATENTS file in the same directory.
  7361. *
  7362. *
  7363. */
  7364. var _prodInvariant = __webpack_require__(3);
  7365. var invariant = __webpack_require__(1);
  7366. /**
  7367. * Accumulates items that must not be null or undefined into the first one. This
  7368. * is used to conserve memory by avoiding array allocations, and thus sacrifices
  7369. * API cleanness. Since `current` can be null before being passed in and not
  7370. * null after this function, make sure to assign it back to `current`:
  7371. *
  7372. * `a = accumulateInto(a, b);`
  7373. *
  7374. * This API should be sparingly used. Try `accumulate` for something cleaner.
  7375. *
  7376. * @return {*|array<*>} An accumulation of items.
  7377. */
  7378. function accumulateInto(current, next) {
  7379. !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
  7380. if (current == null) {
  7381. return next;
  7382. }
  7383. // Both are not empty. Warning: Never call x.concat(y) when you are not
  7384. // certain that x is an Array (x could be a string with concat method).
  7385. if (Array.isArray(current)) {
  7386. if (Array.isArray(next)) {
  7387. current.push.apply(current, next);
  7388. return current;
  7389. }
  7390. current.push(next);
  7391. return current;
  7392. }
  7393. if (Array.isArray(next)) {
  7394. // A bit too dangerous to mutate `next`.
  7395. return [current].concat(next);
  7396. }
  7397. return [current, next];
  7398. }
  7399. module.exports = accumulateInto;
  7400. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  7401. /***/ }),
  7402. /* 70 */
  7403. /***/ (function(module, exports, __webpack_require__) {
  7404. "use strict";
  7405. /**
  7406. * Copyright 2013-present, Facebook, Inc.
  7407. * All rights reserved.
  7408. *
  7409. * This source code is licensed under the BSD-style license found in the
  7410. * LICENSE file in the root directory of this source tree. An additional grant
  7411. * of patent rights can be found in the PATENTS file in the same directory.
  7412. *
  7413. *
  7414. */
  7415. /**
  7416. * @param {array} arr an "accumulation" of items which is either an Array or
  7417. * a single item. Useful when paired with the `accumulate` module. This is a
  7418. * simple utility that allows us to reason about a collection of items, but
  7419. * handling the case when there is exactly one item (and we do not need to
  7420. * allocate an array).
  7421. */
  7422. function forEachAccumulated(arr, cb, scope) {
  7423. if (Array.isArray(arr)) {
  7424. arr.forEach(cb, scope);
  7425. } else if (arr) {
  7426. cb.call(scope, arr);
  7427. }
  7428. }
  7429. module.exports = forEachAccumulated;
  7430. /***/ }),
  7431. /* 71 */
  7432. /***/ (function(module, exports, __webpack_require__) {
  7433. "use strict";
  7434. /**
  7435. * Copyright 2013-present, Facebook, Inc.
  7436. * All rights reserved.
  7437. *
  7438. * This source code is licensed under the BSD-style license found in the
  7439. * LICENSE file in the root directory of this source tree. An additional grant
  7440. * of patent rights can be found in the PATENTS file in the same directory.
  7441. *
  7442. */
  7443. var ReactNodeTypes = __webpack_require__(66);
  7444. function getHostComponentFromComposite(inst) {
  7445. var type;
  7446. while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {
  7447. inst = inst._renderedComponent;
  7448. }
  7449. if (type === ReactNodeTypes.HOST) {
  7450. return inst._renderedComponent;
  7451. } else if (type === ReactNodeTypes.EMPTY) {
  7452. return null;
  7453. }
  7454. }
  7455. module.exports = getHostComponentFromComposite;
  7456. /***/ }),
  7457. /* 72 */
  7458. /***/ (function(module, exports, __webpack_require__) {
  7459. "use strict";
  7460. /**
  7461. * Copyright 2013-present, Facebook, Inc.
  7462. * All rights reserved.
  7463. *
  7464. * This source code is licensed under the BSD-style license found in the
  7465. * LICENSE file in the root directory of this source tree. An additional grant
  7466. * of patent rights can be found in the PATENTS file in the same directory.
  7467. *
  7468. */
  7469. var ExecutionEnvironment = __webpack_require__(6);
  7470. var contentKey = null;
  7471. /**
  7472. * Gets the key used to access text content on a DOM node.
  7473. *
  7474. * @return {?string} Key used to access text content.
  7475. * @internal
  7476. */
  7477. function getTextContentAccessor() {
  7478. if (!contentKey && ExecutionEnvironment.canUseDOM) {
  7479. // Prefer textContent to innerText because many browsers support both but
  7480. // SVG <text> elements don't support innerText even when <div> does.
  7481. contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
  7482. }
  7483. return contentKey;
  7484. }
  7485. module.exports = getTextContentAccessor;
  7486. /***/ }),
  7487. /* 73 */
  7488. /***/ (function(module, exports, __webpack_require__) {
  7489. "use strict";
  7490. /* WEBPACK VAR INJECTION */(function(process) {/**
  7491. * Copyright 2013-present, Facebook, Inc.
  7492. * All rights reserved.
  7493. *
  7494. * This source code is licensed under the BSD-style license found in the
  7495. * LICENSE file in the root directory of this source tree. An additional grant
  7496. * of patent rights can be found in the PATENTS file in the same directory.
  7497. *
  7498. */
  7499. var _prodInvariant = __webpack_require__(3),
  7500. _assign = __webpack_require__(4);
  7501. var ReactCompositeComponent = __webpack_require__(114);
  7502. var ReactEmptyComponent = __webpack_require__(61);
  7503. var ReactHostComponent = __webpack_require__(63);
  7504. var getNextDebugID = __webpack_require__(182);
  7505. var invariant = __webpack_require__(1);
  7506. var warning = __webpack_require__(2);
  7507. // To avoid a cyclic dependency, we create the final class in this module
  7508. var ReactCompositeComponentWrapper = function (element) {
  7509. this.construct(element);
  7510. };
  7511. function getDeclarationErrorAddendum(owner) {
  7512. if (owner) {
  7513. var name = owner.getName();
  7514. if (name) {
  7515. return ' Check the render method of `' + name + '`.';
  7516. }
  7517. }
  7518. return '';
  7519. }
  7520. /**
  7521. * Check if the type reference is a known internal type. I.e. not a user
  7522. * provided composite type.
  7523. *
  7524. * @param {function} type
  7525. * @return {boolean} Returns true if this is a valid internal type.
  7526. */
  7527. function isInternalComponentType(type) {
  7528. return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
  7529. }
  7530. /**
  7531. * Given a ReactNode, create an instance that will actually be mounted.
  7532. *
  7533. * @param {ReactNode} node
  7534. * @param {boolean} shouldHaveDebugID
  7535. * @return {object} A new instance of the element's constructor.
  7536. * @protected
  7537. */
  7538. function instantiateReactComponent(node, shouldHaveDebugID) {
  7539. var instance;
  7540. if (node === null || node === false) {
  7541. instance = ReactEmptyComponent.create(instantiateReactComponent);
  7542. } else if (typeof node === 'object') {
  7543. var element = node;
  7544. var type = element.type;
  7545. if (typeof type !== 'function' && typeof type !== 'string') {
  7546. var info = '';
  7547. if (process.env.NODE_ENV !== 'production') {
  7548. if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
  7549. info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
  7550. }
  7551. }
  7552. info += getDeclarationErrorAddendum(element._owner);
  7553. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
  7554. }
  7555. // Special case string values
  7556. if (typeof element.type === 'string') {
  7557. instance = ReactHostComponent.createInternalComponent(element);
  7558. } else if (isInternalComponentType(element.type)) {
  7559. // This is temporarily available for custom components that are not string
  7560. // representations. I.e. ART. Once those are updated to use the string
  7561. // representation, we can drop this code path.
  7562. instance = new element.type(element);
  7563. // We renamed this. Allow the old name for compat. :(
  7564. if (!instance.getHostNode) {
  7565. instance.getHostNode = instance.getNativeNode;
  7566. }
  7567. } else {
  7568. instance = new ReactCompositeComponentWrapper(element);
  7569. }
  7570. } else if (typeof node === 'string' || typeof node === 'number') {
  7571. instance = ReactHostComponent.createInstanceForText(node);
  7572. } else {
  7573. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
  7574. }
  7575. if (process.env.NODE_ENV !== 'production') {
  7576. process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
  7577. }
  7578. // These two fields are used by the DOM and ART diffing algorithms
  7579. // respectively. Instead of using expandos on components, we should be
  7580. // storing the state needed by the diffing algorithms elsewhere.
  7581. instance._mountIndex = 0;
  7582. instance._mountImage = null;
  7583. if (process.env.NODE_ENV !== 'production') {
  7584. instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
  7585. }
  7586. // Internal instances should fully constructed at this point, so they should
  7587. // not get any new fields added to them at this point.
  7588. if (process.env.NODE_ENV !== 'production') {
  7589. if (Object.preventExtensions) {
  7590. Object.preventExtensions(instance);
  7591. }
  7592. }
  7593. return instance;
  7594. }
  7595. _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
  7596. _instantiateReactComponent: instantiateReactComponent
  7597. });
  7598. module.exports = instantiateReactComponent;
  7599. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  7600. /***/ }),
  7601. /* 74 */
  7602. /***/ (function(module, exports, __webpack_require__) {
  7603. "use strict";
  7604. /**
  7605. * Copyright 2013-present, Facebook, Inc.
  7606. * All rights reserved.
  7607. *
  7608. * This source code is licensed under the BSD-style license found in the
  7609. * LICENSE file in the root directory of this source tree. An additional grant
  7610. * of patent rights can be found in the PATENTS file in the same directory.
  7611. *
  7612. *
  7613. */
  7614. /**
  7615. * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
  7616. */
  7617. var supportedInputTypes = {
  7618. 'color': true,
  7619. 'date': true,
  7620. 'datetime': true,
  7621. 'datetime-local': true,
  7622. 'email': true,
  7623. 'month': true,
  7624. 'number': true,
  7625. 'password': true,
  7626. 'range': true,
  7627. 'search': true,
  7628. 'tel': true,
  7629. 'text': true,
  7630. 'time': true,
  7631. 'url': true,
  7632. 'week': true
  7633. };
  7634. function isTextInputElement(elem) {
  7635. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  7636. if (nodeName === 'input') {
  7637. return !!supportedInputTypes[elem.type];
  7638. }
  7639. if (nodeName === 'textarea') {
  7640. return true;
  7641. }
  7642. return false;
  7643. }
  7644. module.exports = isTextInputElement;
  7645. /***/ }),
  7646. /* 75 */
  7647. /***/ (function(module, exports, __webpack_require__) {
  7648. "use strict";
  7649. /**
  7650. * Copyright 2013-present, Facebook, Inc.
  7651. * All rights reserved.
  7652. *
  7653. * This source code is licensed under the BSD-style license found in the
  7654. * LICENSE file in the root directory of this source tree. An additional grant
  7655. * of patent rights can be found in the PATENTS file in the same directory.
  7656. *
  7657. */
  7658. var ExecutionEnvironment = __webpack_require__(6);
  7659. var escapeTextContentForBrowser = __webpack_require__(29);
  7660. var setInnerHTML = __webpack_require__(30);
  7661. /**
  7662. * Set the textContent property of a node, ensuring that whitespace is preserved
  7663. * even in IE8. innerText is a poor substitute for textContent and, among many
  7664. * issues, inserts <br> instead of the literal newline chars. innerHTML behaves
  7665. * as it should.
  7666. *
  7667. * @param {DOMElement} node
  7668. * @param {string} text
  7669. * @internal
  7670. */
  7671. var setTextContent = function (node, text) {
  7672. if (text) {
  7673. var firstChild = node.firstChild;
  7674. if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
  7675. firstChild.nodeValue = text;
  7676. return;
  7677. }
  7678. }
  7679. node.textContent = text;
  7680. };
  7681. if (ExecutionEnvironment.canUseDOM) {
  7682. if (!('textContent' in document.documentElement)) {
  7683. setTextContent = function (node, text) {
  7684. if (node.nodeType === 3) {
  7685. node.nodeValue = text;
  7686. return;
  7687. }
  7688. setInnerHTML(node, escapeTextContentForBrowser(text));
  7689. };
  7690. }
  7691. }
  7692. module.exports = setTextContent;
  7693. /***/ }),
  7694. /* 76 */
  7695. /***/ (function(module, exports, __webpack_require__) {
  7696. "use strict";
  7697. /* WEBPACK VAR INJECTION */(function(process) {/**
  7698. * Copyright 2013-present, Facebook, Inc.
  7699. * All rights reserved.
  7700. *
  7701. * This source code is licensed under the BSD-style license found in the
  7702. * LICENSE file in the root directory of this source tree. An additional grant
  7703. * of patent rights can be found in the PATENTS file in the same directory.
  7704. *
  7705. */
  7706. var _prodInvariant = __webpack_require__(3);
  7707. var ReactCurrentOwner = __webpack_require__(11);
  7708. var REACT_ELEMENT_TYPE = __webpack_require__(133);
  7709. var getIteratorFn = __webpack_require__(167);
  7710. var invariant = __webpack_require__(1);
  7711. var KeyEscapeUtils = __webpack_require__(37);
  7712. var warning = __webpack_require__(2);
  7713. var SEPARATOR = '.';
  7714. var SUBSEPARATOR = ':';
  7715. /**
  7716. * This is inlined from ReactElement since this file is shared between
  7717. * isomorphic and renderers. We could extract this to a
  7718. *
  7719. */
  7720. /**
  7721. * TODO: Test that a single child and an array with one item have the same key
  7722. * pattern.
  7723. */
  7724. var didWarnAboutMaps = false;
  7725. /**
  7726. * Generate a key string that identifies a component within a set.
  7727. *
  7728. * @param {*} component A component that could contain a manual key.
  7729. * @param {number} index Index that is used if a manual key is not provided.
  7730. * @return {string}
  7731. */
  7732. function getComponentKey(component, index) {
  7733. // Do some typechecking here since we call this blindly. We want to ensure
  7734. // that we don't block potential future ES APIs.
  7735. if (component && typeof component === 'object' && component.key != null) {
  7736. // Explicit key
  7737. return KeyEscapeUtils.escape(component.key);
  7738. }
  7739. // Implicit key determined by the index in the set
  7740. return index.toString(36);
  7741. }
  7742. /**
  7743. * @param {?*} children Children tree container.
  7744. * @param {!string} nameSoFar Name of the key path so far.
  7745. * @param {!function} callback Callback to invoke with each child found.
  7746. * @param {?*} traverseContext Used to pass information throughout the traversal
  7747. * process.
  7748. * @return {!number} The number of children in this subtree.
  7749. */
  7750. function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
  7751. var type = typeof children;
  7752. if (type === 'undefined' || type === 'boolean') {
  7753. // All of the above are perceived as null.
  7754. children = null;
  7755. }
  7756. if (children === null || type === 'string' || type === 'number' ||
  7757. // The following is inlined from ReactElement. This means we can optimize
  7758. // some checks. React Fiber also inlines this logic for similar purposes.
  7759. type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
  7760. callback(traverseContext, children,
  7761. // If it's the only child, treat the name as if it was wrapped in an array
  7762. // so that it's consistent if the number of children grows.
  7763. nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
  7764. return 1;
  7765. }
  7766. var child;
  7767. var nextName;
  7768. var subtreeCount = 0; // Count of children found in the current subtree.
  7769. var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
  7770. if (Array.isArray(children)) {
  7771. for (var i = 0; i < children.length; i++) {
  7772. child = children[i];
  7773. nextName = nextNamePrefix + getComponentKey(child, i);
  7774. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  7775. }
  7776. } else {
  7777. var iteratorFn = getIteratorFn(children);
  7778. if (iteratorFn) {
  7779. var iterator = iteratorFn.call(children);
  7780. var step;
  7781. if (iteratorFn !== children.entries) {
  7782. var ii = 0;
  7783. while (!(step = iterator.next()).done) {
  7784. child = step.value;
  7785. nextName = nextNamePrefix + getComponentKey(child, ii++);
  7786. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  7787. }
  7788. } else {
  7789. if (process.env.NODE_ENV !== 'production') {
  7790. var mapsAsChildrenAddendum = '';
  7791. if (ReactCurrentOwner.current) {
  7792. var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
  7793. if (mapsAsChildrenOwnerName) {
  7794. mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
  7795. }
  7796. }
  7797. process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
  7798. didWarnAboutMaps = true;
  7799. }
  7800. // Iterator will provide entry [k,v] tuples rather than values.
  7801. while (!(step = iterator.next()).done) {
  7802. var entry = step.value;
  7803. if (entry) {
  7804. child = entry[1];
  7805. nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
  7806. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  7807. }
  7808. }
  7809. }
  7810. } else if (type === 'object') {
  7811. var addendum = '';
  7812. if (process.env.NODE_ENV !== 'production') {
  7813. addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
  7814. if (children._isReactElement) {
  7815. addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
  7816. }
  7817. if (ReactCurrentOwner.current) {
  7818. var name = ReactCurrentOwner.current.getName();
  7819. if (name) {
  7820. addendum += ' Check the render method of `' + name + '`.';
  7821. }
  7822. }
  7823. }
  7824. var childrenString = String(children);
  7825. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
  7826. }
  7827. }
  7828. return subtreeCount;
  7829. }
  7830. /**
  7831. * Traverses children that are typically specified as `props.children`, but
  7832. * might also be specified through attributes:
  7833. *
  7834. * - `traverseAllChildren(this.props.children, ...)`
  7835. * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
  7836. *
  7837. * The `traverseContext` is an optional argument that is passed through the
  7838. * entire traversal. It can be used to store accumulations or anything else that
  7839. * the callback might find relevant.
  7840. *
  7841. * @param {?*} children Children tree object.
  7842. * @param {!function} callback To invoke upon traversing each child.
  7843. * @param {?*} traverseContext Context for traversal.
  7844. * @return {!number} The number of children in this subtree.
  7845. */
  7846. function traverseAllChildren(children, callback, traverseContext) {
  7847. if (children == null) {
  7848. return 0;
  7849. }
  7850. return traverseAllChildrenImpl(children, '', callback, traverseContext);
  7851. }
  7852. module.exports = traverseAllChildren;
  7853. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  7854. /***/ }),
  7855. /* 77 */
  7856. /***/ (function(module, exports, __webpack_require__) {
  7857. "use strict";
  7858. /**
  7859. * Copyright 2014-present, Facebook, Inc.
  7860. * All rights reserved.
  7861. *
  7862. * This source code is licensed under the BSD-style license found in the
  7863. * LICENSE file in the root directory of this source tree. An additional grant
  7864. * of patent rights can be found in the PATENTS file in the same directory.
  7865. *
  7866. *
  7867. */
  7868. // The Symbol used to tag the ReactElement type. If there is no native Symbol
  7869. // nor polyfill, then a plain number is used for performance.
  7870. var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
  7871. module.exports = REACT_ELEMENT_TYPE;
  7872. /***/ }),
  7873. /* 78 */
  7874. /***/ (function(module, exports, __webpack_require__) {
  7875. "use strict";
  7876. /* WEBPACK VAR INJECTION */(function(process) {/**
  7877. * Copyright 2014-present, Facebook, Inc.
  7878. * All rights reserved.
  7879. *
  7880. * This source code is licensed under the BSD-style license found in the
  7881. * LICENSE file in the root directory of this source tree. An additional grant
  7882. * of patent rights can be found in the PATENTS file in the same directory.
  7883. *
  7884. */
  7885. /**
  7886. * ReactElementValidator provides a wrapper around a element factory
  7887. * which validates the props passed to the element. This is intended to be
  7888. * used only in DEV and could be replaced by a static type checker for languages
  7889. * that support it.
  7890. */
  7891. var ReactCurrentOwner = __webpack_require__(11);
  7892. var ReactComponentTreeHook = __webpack_require__(7);
  7893. var ReactElement = __webpack_require__(15);
  7894. var checkReactTypeSpec = __webpack_require__(181);
  7895. var canDefineProperty = __webpack_require__(31);
  7896. var getIteratorFn = __webpack_require__(80);
  7897. var warning = __webpack_require__(2);
  7898. function getDeclarationErrorAddendum() {
  7899. if (ReactCurrentOwner.current) {
  7900. var name = ReactCurrentOwner.current.getName();
  7901. if (name) {
  7902. return ' Check the render method of `' + name + '`.';
  7903. }
  7904. }
  7905. return '';
  7906. }
  7907. function getSourceInfoErrorAddendum(elementProps) {
  7908. if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
  7909. var source = elementProps.__source;
  7910. var fileName = source.fileName.replace(/^.*[\\\/]/, '');
  7911. var lineNumber = source.lineNumber;
  7912. return ' Check your code at ' + fileName + ':' + lineNumber + '.';
  7913. }
  7914. return '';
  7915. }
  7916. /**
  7917. * Warn if there's no key explicitly set on dynamic arrays of children or
  7918. * object keys are not valid. This allows us to keep track of children between
  7919. * updates.
  7920. */
  7921. var ownerHasKeyUseWarning = {};
  7922. function getCurrentComponentErrorInfo(parentType) {
  7923. var info = getDeclarationErrorAddendum();
  7924. if (!info) {
  7925. var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
  7926. if (parentName) {
  7927. info = ' Check the top-level render call using <' + parentName + '>.';
  7928. }
  7929. }
  7930. return info;
  7931. }
  7932. /**
  7933. * Warn if the element doesn't have an explicit key assigned to it.
  7934. * This element is in an array. The array could grow and shrink or be
  7935. * reordered. All children that haven't already been validated are required to
  7936. * have a "key" property assigned to it. Error statuses are cached so a warning
  7937. * will only be shown once.
  7938. *
  7939. * @internal
  7940. * @param {ReactElement} element Element that requires a key.
  7941. * @param {*} parentType element's parent's type.
  7942. */
  7943. function validateExplicitKey(element, parentType) {
  7944. if (!element._store || element._store.validated || element.key != null) {
  7945. return;
  7946. }
  7947. element._store.validated = true;
  7948. var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
  7949. var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
  7950. if (memoizer[currentComponentErrorInfo]) {
  7951. return;
  7952. }
  7953. memoizer[currentComponentErrorInfo] = true;
  7954. // Usually the current owner is the offender, but if it accepts children as a
  7955. // property, it may be the creator of the child that's responsible for
  7956. // assigning it a key.
  7957. var childOwner = '';
  7958. if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
  7959. // Give the component that originally created this child.
  7960. childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
  7961. }
  7962. process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
  7963. }
  7964. /**
  7965. * Ensure that every element either is passed in a static location, in an
  7966. * array with an explicit keys property defined, or in an object literal
  7967. * with valid key property.
  7968. *
  7969. * @internal
  7970. * @param {ReactNode} node Statically passed child of any type.
  7971. * @param {*} parentType node's parent's type.
  7972. */
  7973. function validateChildKeys(node, parentType) {
  7974. if (typeof node !== 'object') {
  7975. return;
  7976. }
  7977. if (Array.isArray(node)) {
  7978. for (var i = 0; i < node.length; i++) {
  7979. var child = node[i];
  7980. if (ReactElement.isValidElement(child)) {
  7981. validateExplicitKey(child, parentType);
  7982. }
  7983. }
  7984. } else if (ReactElement.isValidElement(node)) {
  7985. // This element was passed in a valid location.
  7986. if (node._store) {
  7987. node._store.validated = true;
  7988. }
  7989. } else if (node) {
  7990. var iteratorFn = getIteratorFn(node);
  7991. // Entry iterators provide implicit keys.
  7992. if (iteratorFn) {
  7993. if (iteratorFn !== node.entries) {
  7994. var iterator = iteratorFn.call(node);
  7995. var step;
  7996. while (!(step = iterator.next()).done) {
  7997. if (ReactElement.isValidElement(step.value)) {
  7998. validateExplicitKey(step.value, parentType);
  7999. }
  8000. }
  8001. }
  8002. }
  8003. }
  8004. }
  8005. /**
  8006. * Given an element, validate that its props follow the propTypes definition,
  8007. * provided by the type.
  8008. *
  8009. * @param {ReactElement} element
  8010. */
  8011. function validatePropTypes(element) {
  8012. var componentClass = element.type;
  8013. if (typeof componentClass !== 'function') {
  8014. return;
  8015. }
  8016. var name = componentClass.displayName || componentClass.name;
  8017. if (componentClass.propTypes) {
  8018. checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
  8019. }
  8020. if (typeof componentClass.getDefaultProps === 'function') {
  8021. process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
  8022. }
  8023. }
  8024. var ReactElementValidator = {
  8025. createElement: function (type, props, children) {
  8026. var validType = typeof type === 'string' || typeof type === 'function';
  8027. // We warn in this case but don't throw. We expect the element creation to
  8028. // succeed and there will likely be errors in render.
  8029. if (!validType) {
  8030. if (typeof type !== 'function' && typeof type !== 'string') {
  8031. var info = '';
  8032. if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
  8033. info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
  8034. }
  8035. var sourceInfo = getSourceInfoErrorAddendum(props);
  8036. if (sourceInfo) {
  8037. info += sourceInfo;
  8038. } else {
  8039. info += getDeclarationErrorAddendum();
  8040. }
  8041. info += ReactComponentTreeHook.getCurrentStackAddendum();
  8042. process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
  8043. }
  8044. }
  8045. var element = ReactElement.createElement.apply(this, arguments);
  8046. // The result can be nullish if a mock or a custom function is used.
  8047. // TODO: Drop this when these are no longer allowed as the type argument.
  8048. if (element == null) {
  8049. return element;
  8050. }
  8051. // Skip key warning if the type isn't valid since our key validation logic
  8052. // doesn't expect a non-string/function type and can throw confusing errors.
  8053. // We don't want exception behavior to differ between dev and prod.
  8054. // (Rendering will throw with a helpful message and as soon as the type is
  8055. // fixed, the key warnings will appear.)
  8056. if (validType) {
  8057. for (var i = 2; i < arguments.length; i++) {
  8058. validateChildKeys(arguments[i], type);
  8059. }
  8060. }
  8061. validatePropTypes(element);
  8062. return element;
  8063. },
  8064. createFactory: function (type) {
  8065. var validatedFactory = ReactElementValidator.createElement.bind(null, type);
  8066. // Legacy hook TODO: Warn if this is accessed
  8067. validatedFactory.type = type;
  8068. if (process.env.NODE_ENV !== 'production') {
  8069. if (canDefineProperty) {
  8070. Object.defineProperty(validatedFactory, 'type', {
  8071. enumerable: false,
  8072. get: function () {
  8073. process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;
  8074. Object.defineProperty(this, 'type', {
  8075. value: type
  8076. });
  8077. return type;
  8078. }
  8079. });
  8080. }
  8081. }
  8082. return validatedFactory;
  8083. },
  8084. cloneElement: function (element, props, children) {
  8085. var newElement = ReactElement.cloneElement.apply(this, arguments);
  8086. for (var i = 2; i < arguments.length; i++) {
  8087. validateChildKeys(arguments[i], newElement.type);
  8088. }
  8089. validatePropTypes(newElement);
  8090. return newElement;
  8091. }
  8092. };
  8093. module.exports = ReactElementValidator;
  8094. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  8095. /***/ }),
  8096. /* 79 */
  8097. /***/ (function(module, exports, __webpack_require__) {
  8098. "use strict";
  8099. /* WEBPACK VAR INJECTION */(function(process) {/**
  8100. * Copyright 2013-present, Facebook, Inc.
  8101. * All rights reserved.
  8102. *
  8103. * This source code is licensed under the BSD-style license found in the
  8104. * LICENSE file in the root directory of this source tree. An additional grant
  8105. * of patent rights can be found in the PATENTS file in the same directory.
  8106. *
  8107. *
  8108. */
  8109. var ReactPropTypeLocationNames = {};
  8110. if (process.env.NODE_ENV !== 'production') {
  8111. ReactPropTypeLocationNames = {
  8112. prop: 'prop',
  8113. context: 'context',
  8114. childContext: 'child context'
  8115. };
  8116. }
  8117. module.exports = ReactPropTypeLocationNames;
  8118. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  8119. /***/ }),
  8120. /* 80 */
  8121. /***/ (function(module, exports, __webpack_require__) {
  8122. "use strict";
  8123. /**
  8124. * Copyright 2013-present, Facebook, Inc.
  8125. * All rights reserved.
  8126. *
  8127. * This source code is licensed under the BSD-style license found in the
  8128. * LICENSE file in the root directory of this source tree. An additional grant
  8129. * of patent rights can be found in the PATENTS file in the same directory.
  8130. *
  8131. *
  8132. */
  8133. /* global Symbol */
  8134. var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  8135. var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  8136. /**
  8137. * Returns the iterator method function contained on the iterable object.
  8138. *
  8139. * Be sure to invoke the function with the iterable as context:
  8140. *
  8141. * var iteratorFn = getIteratorFn(myIterable);
  8142. * if (iteratorFn) {
  8143. * var iterator = iteratorFn.call(myIterable);
  8144. * ...
  8145. * }
  8146. *
  8147. * @param {?object} maybeIterable
  8148. * @return {?function}
  8149. */
  8150. function getIteratorFn(maybeIterable) {
  8151. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  8152. if (typeof iteratorFn === 'function') {
  8153. return iteratorFn;
  8154. }
  8155. }
  8156. module.exports = getIteratorFn;
  8157. /***/ }),
  8158. /* 81 */
  8159. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8160. "use strict";
  8161. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  8162. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(32);
  8163. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  8164. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_svg_baker_runtime_browser_symbol__ = __webpack_require__(185);
  8165. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_svg_baker_runtime_browser_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_svg_baker_runtime_browser_symbol__);
  8166. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_svg_sprite_loader_runtime_browser_sprite_build__ = __webpack_require__(186);
  8167. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_svg_sprite_loader_runtime_browser_sprite_build___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_svg_sprite_loader_runtime_browser_sprite_build__);
  8168. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__custom_runtime_generator_icon_jsx__ = __webpack_require__(84);
  8169. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__custom_runtime_generator_icon_jsx___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__custom_runtime_generator_icon_jsx__);
  8170. const symbol = new __WEBPACK_IMPORTED_MODULE_1_svg_baker_runtime_browser_symbol___default.a({
  8171. "id": "twitter",
  8172. "use": "twitter-usage",
  8173. "viewBox": "0 0 273.4 222.2",
  8174. "content": "\n<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\n<symbol viewBox=\"0 0 273.4 222.2\" id=\"twitter\">\n<path d=\"M273.4,26.3c-10.1,4.5-20.9,7.5-32.2,8.8c11.6-6.9,20.5-17.9,24.7-31C255,10.5,243,15.2,230.2,17.7\n\tC220,6.8,205.4,0,189.3,0c-31,0-56.1,25.1-56.1,56.1c0,4.4,0.5,8.7,1.5,12.8C88,66.5,46.7,44.2,19,10.3c-4.8,8.3-7.6,17.9-7.6,28.2\n\tc0,19.5,9.9,36.6,25,46.7c-9.2-0.3-17.8-2.8-25.4-7c0,0.2,0,0.5,0,0.7c0,27.2,19.3,49.8,45,55c-4.7,1.3-9.7,2-14.8,2\n\tc-3.6,0-7.1-0.4-10.6-1c7.1,22.3,27.9,38.5,52.4,39c-19.2,15-43.4,24-69.7,24c-4.5,0-9-0.3-13.4-0.8c24.8,15.9,54.3,25.2,86,25.2\n\tc103.2,0,159.6-85.5,159.6-159.6c0-2.4-0.1-4.9-0.2-7.3C256.4,47.4,265.9,37.5,273.4,26.3z\" />\n</symbol>\n"
  8175. });
  8176. __WEBPACK_IMPORTED_MODULE_2_svg_sprite_loader_runtime_browser_sprite_build___default.a.add(symbol);
  8177. class TwitterIcon extends __WEBPACK_IMPORTED_MODULE_3__custom_runtime_generator_icon_jsx___default.a {}
  8178. /* harmony export (immutable) */ __webpack_exports__["default"] = TwitterIcon;
  8179. TwitterIcon.defaultProps.glyph = 'twitter';
  8180. /***/ }),
  8181. /* 82 */
  8182. /***/ (function(module, exports, __webpack_require__) {
  8183. "use strict";
  8184. module.exports = __webpack_require__(115);
  8185. /***/ }),
  8186. /* 83 */
  8187. /***/ (function(module, exports) {
  8188. var g;
  8189. // This works in non-strict mode
  8190. g = (function() {
  8191. return this;
  8192. })();
  8193. try {
  8194. // This works if eval is allowed (see CSP)
  8195. g = g || Function("return this")() || (1,eval)("this");
  8196. } catch(e) {
  8197. // This works if the window reference is available
  8198. if(typeof window === "object")
  8199. g = window;
  8200. }
  8201. // g can still be undefined, but nothing to do about it...
  8202. // We return undefined, instead of nothing here, so it's
  8203. // easier to handle this case. if(!global) { ...}
  8204. module.exports = g;
  8205. /***/ }),
  8206. /* 84 */
  8207. /***/ (function(module, exports, __webpack_require__) {
  8208. "use strict";
  8209. Object.defineProperty(exports, "__esModule", {
  8210. value: true
  8211. });
  8212. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  8213. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  8214. var _react = __webpack_require__(32);
  8215. var _react2 = _interopRequireDefault(_react);
  8216. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8217. function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
  8218. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8219. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  8220. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  8221. var Icon = function (_PureComponent) {
  8222. _inherits(Icon, _PureComponent);
  8223. function Icon() {
  8224. _classCallCheck(this, Icon);
  8225. return _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).apply(this, arguments));
  8226. }
  8227. _createClass(Icon, [{
  8228. key: 'render',
  8229. value: function render() {
  8230. var _props = this.props,
  8231. className = _props.className,
  8232. glyph = _props.glyph,
  8233. width = _props.width,
  8234. height = _props.height,
  8235. restProps = _objectWithoutProperties(_props, ['className', 'glyph', 'width', 'height']);
  8236. var viewBox = '0 0 ' + width + ' ' + height;
  8237. return _react2.default.createElement(
  8238. 'svg',
  8239. _extends({ className: className, viewBox: viewBox }, restProps),
  8240. _react2.default.createElement('use', { xlinkHref: '#' + glyph })
  8241. );
  8242. }
  8243. }]);
  8244. return Icon;
  8245. }(_react.PureComponent);
  8246. exports.default = Icon;
  8247. Icon.defaultProps = {
  8248. glyph: '',
  8249. width: 16,
  8250. height: 16,
  8251. className: 'icon'
  8252. };
  8253. /***/ }),
  8254. /* 85 */
  8255. /***/ (function(module, exports, __webpack_require__) {
  8256. "use strict";
  8257. var _react = __webpack_require__(32);
  8258. var _react2 = _interopRequireDefault(_react);
  8259. var _reactDom = __webpack_require__(82);
  8260. var _twitter = __webpack_require__(81);
  8261. var _twitter2 = _interopRequireDefault(_twitter);
  8262. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8263. document.addEventListener('DOMContentLoaded', function () {
  8264. (0, _reactDom.render)(_react2.default.createElement(
  8265. 'div',
  8266. null,
  8267. _react2.default.createElement(_twitter2.default, { width: '100' }),
  8268. _react2.default.createElement(_twitter2.default, { fill: 'red', style: { width: 300 } }),
  8269. _react2.default.createElement(_twitter2.default, { fill: 'blue', style: { width: 600 } })
  8270. ), document.querySelector('.app'));
  8271. });
  8272. /***/ }),
  8273. /* 86 */
  8274. /***/ (function(module, exports, __webpack_require__) {
  8275. "use strict";
  8276. /**
  8277. * Copyright (c) 2013-present, Facebook, Inc.
  8278. * All rights reserved.
  8279. *
  8280. * This source code is licensed under the BSD-style license found in the
  8281. * LICENSE file in the root directory of this source tree. An additional grant
  8282. * of patent rights can be found in the PATENTS file in the same directory.
  8283. *
  8284. * @typechecks
  8285. */
  8286. var _hyphenPattern = /-(.)/g;
  8287. /**
  8288. * Camelcases a hyphenated string, for example:
  8289. *
  8290. * > camelize('background-color')
  8291. * < "backgroundColor"
  8292. *
  8293. * @param {string} string
  8294. * @return {string}
  8295. */
  8296. function camelize(string) {
  8297. return string.replace(_hyphenPattern, function (_, character) {
  8298. return character.toUpperCase();
  8299. });
  8300. }
  8301. module.exports = camelize;
  8302. /***/ }),
  8303. /* 87 */
  8304. /***/ (function(module, exports, __webpack_require__) {
  8305. "use strict";
  8306. /**
  8307. * Copyright (c) 2013-present, Facebook, Inc.
  8308. * All rights reserved.
  8309. *
  8310. * This source code is licensed under the BSD-style license found in the
  8311. * LICENSE file in the root directory of this source tree. An additional grant
  8312. * of patent rights can be found in the PATENTS file in the same directory.
  8313. *
  8314. * @typechecks
  8315. */
  8316. var camelize = __webpack_require__(86);
  8317. var msPattern = /^-ms-/;
  8318. /**
  8319. * Camelcases a hyphenated CSS property name, for example:
  8320. *
  8321. * > camelizeStyleName('background-color')
  8322. * < "backgroundColor"
  8323. * > camelizeStyleName('-moz-transition')
  8324. * < "MozTransition"
  8325. * > camelizeStyleName('-ms-transition')
  8326. * < "msTransition"
  8327. *
  8328. * As Andi Smith suggests
  8329. * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
  8330. * is converted to lowercase `ms`.
  8331. *
  8332. * @param {string} string
  8333. * @return {string}
  8334. */
  8335. function camelizeStyleName(string) {
  8336. return camelize(string.replace(msPattern, 'ms-'));
  8337. }
  8338. module.exports = camelizeStyleName;
  8339. /***/ }),
  8340. /* 88 */
  8341. /***/ (function(module, exports, __webpack_require__) {
  8342. "use strict";
  8343. /**
  8344. * Copyright (c) 2013-present, Facebook, Inc.
  8345. * All rights reserved.
  8346. *
  8347. * This source code is licensed under the BSD-style license found in the
  8348. * LICENSE file in the root directory of this source tree. An additional grant
  8349. * of patent rights can be found in the PATENTS file in the same directory.
  8350. *
  8351. *
  8352. */
  8353. var isTextNode = __webpack_require__(96);
  8354. /*eslint-disable no-bitwise */
  8355. /**
  8356. * Checks if a given DOM node contains or is another DOM node.
  8357. */
  8358. function containsNode(outerNode, innerNode) {
  8359. if (!outerNode || !innerNode) {
  8360. return false;
  8361. } else if (outerNode === innerNode) {
  8362. return true;
  8363. } else if (isTextNode(outerNode)) {
  8364. return false;
  8365. } else if (isTextNode(innerNode)) {
  8366. return containsNode(outerNode, innerNode.parentNode);
  8367. } else if ('contains' in outerNode) {
  8368. return outerNode.contains(innerNode);
  8369. } else if (outerNode.compareDocumentPosition) {
  8370. return !!(outerNode.compareDocumentPosition(innerNode) & 16);
  8371. } else {
  8372. return false;
  8373. }
  8374. }
  8375. module.exports = containsNode;
  8376. /***/ }),
  8377. /* 89 */
  8378. /***/ (function(module, exports, __webpack_require__) {
  8379. "use strict";
  8380. /* WEBPACK VAR INJECTION */(function(process) {
  8381. /**
  8382. * Copyright (c) 2013-present, Facebook, Inc.
  8383. * All rights reserved.
  8384. *
  8385. * This source code is licensed under the BSD-style license found in the
  8386. * LICENSE file in the root directory of this source tree. An additional grant
  8387. * of patent rights can be found in the PATENTS file in the same directory.
  8388. *
  8389. * @typechecks
  8390. */
  8391. var invariant = __webpack_require__(1);
  8392. /**
  8393. * Convert array-like objects to arrays.
  8394. *
  8395. * This API assumes the caller knows the contents of the data type. For less
  8396. * well defined inputs use createArrayFromMixed.
  8397. *
  8398. * @param {object|function|filelist} obj
  8399. * @return {array}
  8400. */
  8401. function toArray(obj) {
  8402. var length = obj.length;
  8403. // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
  8404. // in old versions of Safari).
  8405. !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
  8406. !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
  8407. !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
  8408. !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
  8409. // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
  8410. // without method will throw during the slice call and skip straight to the
  8411. // fallback.
  8412. if (obj.hasOwnProperty) {
  8413. try {
  8414. return Array.prototype.slice.call(obj);
  8415. } catch (e) {
  8416. // IE < 9 does not support Array#slice on collections objects
  8417. }
  8418. }
  8419. // Fall back to copying key by key. This assumes all keys have a value,
  8420. // so will not preserve sparsely populated inputs.
  8421. var ret = Array(length);
  8422. for (var ii = 0; ii < length; ii++) {
  8423. ret[ii] = obj[ii];
  8424. }
  8425. return ret;
  8426. }
  8427. /**
  8428. * Perform a heuristic test to determine if an object is "array-like".
  8429. *
  8430. * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
  8431. * Joshu replied: "Mu."
  8432. *
  8433. * This function determines if its argument has "array nature": it returns
  8434. * true if the argument is an actual array, an `arguments' object, or an
  8435. * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
  8436. *
  8437. * It will return false for other array-like objects like Filelist.
  8438. *
  8439. * @param {*} obj
  8440. * @return {boolean}
  8441. */
  8442. function hasArrayNature(obj) {
  8443. return (
  8444. // not null/false
  8445. !!obj && (
  8446. // arrays are objects, NodeLists are functions in Safari
  8447. typeof obj == 'object' || typeof obj == 'function') &&
  8448. // quacks like an array
  8449. 'length' in obj &&
  8450. // not window
  8451. !('setInterval' in obj) &&
  8452. // no DOM node should be considered an array-like
  8453. // a 'select' element has 'length' and 'item' properties on IE8
  8454. typeof obj.nodeType != 'number' && (
  8455. // a real array
  8456. Array.isArray(obj) ||
  8457. // arguments
  8458. 'callee' in obj ||
  8459. // HTMLCollection/NodeList
  8460. 'item' in obj)
  8461. );
  8462. }
  8463. /**
  8464. * Ensure that the argument is an array by wrapping it in an array if it is not.
  8465. * Creates a copy of the argument if it is already an array.
  8466. *
  8467. * This is mostly useful idiomatically:
  8468. *
  8469. * var createArrayFromMixed = require('createArrayFromMixed');
  8470. *
  8471. * function takesOneOrMoreThings(things) {
  8472. * things = createArrayFromMixed(things);
  8473. * ...
  8474. * }
  8475. *
  8476. * This allows you to treat `things' as an array, but accept scalars in the API.
  8477. *
  8478. * If you need to convert an array-like object, like `arguments`, into an array
  8479. * use toArray instead.
  8480. *
  8481. * @param {*} obj
  8482. * @return {array}
  8483. */
  8484. function createArrayFromMixed(obj) {
  8485. if (!hasArrayNature(obj)) {
  8486. return [obj];
  8487. } else if (Array.isArray(obj)) {
  8488. return obj.slice();
  8489. } else {
  8490. return toArray(obj);
  8491. }
  8492. }
  8493. module.exports = createArrayFromMixed;
  8494. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  8495. /***/ }),
  8496. /* 90 */
  8497. /***/ (function(module, exports, __webpack_require__) {
  8498. "use strict";
  8499. /* WEBPACK VAR INJECTION */(function(process) {
  8500. /**
  8501. * Copyright (c) 2013-present, Facebook, Inc.
  8502. * All rights reserved.
  8503. *
  8504. * This source code is licensed under the BSD-style license found in the
  8505. * LICENSE file in the root directory of this source tree. An additional grant
  8506. * of patent rights can be found in the PATENTS file in the same directory.
  8507. *
  8508. * @typechecks
  8509. */
  8510. /*eslint-disable fb-www/unsafe-html*/
  8511. var ExecutionEnvironment = __webpack_require__(6);
  8512. var createArrayFromMixed = __webpack_require__(89);
  8513. var getMarkupWrap = __webpack_require__(91);
  8514. var invariant = __webpack_require__(1);
  8515. /**
  8516. * Dummy container used to render all markup.
  8517. */
  8518. var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
  8519. /**
  8520. * Pattern used by `getNodeName`.
  8521. */
  8522. var nodeNamePattern = /^\s*<(\w+)/;
  8523. /**
  8524. * Extracts the `nodeName` of the first element in a string of markup.
  8525. *
  8526. * @param {string} markup String of markup.
  8527. * @return {?string} Node name of the supplied markup.
  8528. */
  8529. function getNodeName(markup) {
  8530. var nodeNameMatch = markup.match(nodeNamePattern);
  8531. return nodeNameMatch && nodeNameMatch[1].toLowerCase();
  8532. }
  8533. /**
  8534. * Creates an array containing the nodes rendered from the supplied markup. The
  8535. * optionally supplied `handleScript` function will be invoked once for each
  8536. * <script> element that is rendered. If no `handleScript` function is supplied,
  8537. * an exception is thrown if any <script> elements are rendered.
  8538. *
  8539. * @param {string} markup A string of valid HTML markup.
  8540. * @param {?function} handleScript Invoked once for each rendered <script>.
  8541. * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
  8542. */
  8543. function createNodesFromMarkup(markup, handleScript) {
  8544. var node = dummyNode;
  8545. !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
  8546. var nodeName = getNodeName(markup);
  8547. var wrap = nodeName && getMarkupWrap(nodeName);
  8548. if (wrap) {
  8549. node.innerHTML = wrap[1] + markup + wrap[2];
  8550. var wrapDepth = wrap[0];
  8551. while (wrapDepth--) {
  8552. node = node.lastChild;
  8553. }
  8554. } else {
  8555. node.innerHTML = markup;
  8556. }
  8557. var scripts = node.getElementsByTagName('script');
  8558. if (scripts.length) {
  8559. !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
  8560. createArrayFromMixed(scripts).forEach(handleScript);
  8561. }
  8562. var nodes = Array.from(node.childNodes);
  8563. while (node.lastChild) {
  8564. node.removeChild(node.lastChild);
  8565. }
  8566. return nodes;
  8567. }
  8568. module.exports = createNodesFromMarkup;
  8569. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  8570. /***/ }),
  8571. /* 91 */
  8572. /***/ (function(module, exports, __webpack_require__) {
  8573. "use strict";
  8574. /* WEBPACK VAR INJECTION */(function(process) {
  8575. /**
  8576. * Copyright (c) 2013-present, Facebook, Inc.
  8577. * All rights reserved.
  8578. *
  8579. * This source code is licensed under the BSD-style license found in the
  8580. * LICENSE file in the root directory of this source tree. An additional grant
  8581. * of patent rights can be found in the PATENTS file in the same directory.
  8582. *
  8583. */
  8584. /*eslint-disable fb-www/unsafe-html */
  8585. var ExecutionEnvironment = __webpack_require__(6);
  8586. var invariant = __webpack_require__(1);
  8587. /**
  8588. * Dummy container used to detect which wraps are necessary.
  8589. */
  8590. var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
  8591. /**
  8592. * Some browsers cannot use `innerHTML` to render certain elements standalone,
  8593. * so we wrap them, render the wrapped nodes, then extract the desired node.
  8594. *
  8595. * In IE8, certain elements cannot render alone, so wrap all elements ('*').
  8596. */
  8597. var shouldWrap = {};
  8598. var selectWrap = [1, '<select multiple="true">', '</select>'];
  8599. var tableWrap = [1, '<table>', '</table>'];
  8600. var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
  8601. var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
  8602. var markupWrap = {
  8603. '*': [1, '?<div>', '</div>'],
  8604. 'area': [1, '<map>', '</map>'],
  8605. 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
  8606. 'legend': [1, '<fieldset>', '</fieldset>'],
  8607. 'param': [1, '<object>', '</object>'],
  8608. 'tr': [2, '<table><tbody>', '</tbody></table>'],
  8609. 'optgroup': selectWrap,
  8610. 'option': selectWrap,
  8611. 'caption': tableWrap,
  8612. 'colgroup': tableWrap,
  8613. 'tbody': tableWrap,
  8614. 'tfoot': tableWrap,
  8615. 'thead': tableWrap,
  8616. 'td': trWrap,
  8617. 'th': trWrap
  8618. };
  8619. // Initialize the SVG elements since we know they'll always need to be wrapped
  8620. // consistently. If they are created inside a <div> they will be initialized in
  8621. // the wrong namespace (and will not display).
  8622. var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
  8623. svgElements.forEach(function (nodeName) {
  8624. markupWrap[nodeName] = svgWrap;
  8625. shouldWrap[nodeName] = true;
  8626. });
  8627. /**
  8628. * Gets the markup wrap configuration for the supplied `nodeName`.
  8629. *
  8630. * NOTE: This lazily detects which wraps are necessary for the current browser.
  8631. *
  8632. * @param {string} nodeName Lowercase `nodeName`.
  8633. * @return {?array} Markup wrap configuration, if applicable.
  8634. */
  8635. function getMarkupWrap(nodeName) {
  8636. !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
  8637. if (!markupWrap.hasOwnProperty(nodeName)) {
  8638. nodeName = '*';
  8639. }
  8640. if (!shouldWrap.hasOwnProperty(nodeName)) {
  8641. if (nodeName === '*') {
  8642. dummyNode.innerHTML = '<link />';
  8643. } else {
  8644. dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
  8645. }
  8646. shouldWrap[nodeName] = !dummyNode.firstChild;
  8647. }
  8648. return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
  8649. }
  8650. module.exports = getMarkupWrap;
  8651. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  8652. /***/ }),
  8653. /* 92 */
  8654. /***/ (function(module, exports, __webpack_require__) {
  8655. "use strict";
  8656. /**
  8657. * Copyright (c) 2013-present, Facebook, Inc.
  8658. * All rights reserved.
  8659. *
  8660. * This source code is licensed under the BSD-style license found in the
  8661. * LICENSE file in the root directory of this source tree. An additional grant
  8662. * of patent rights can be found in the PATENTS file in the same directory.
  8663. *
  8664. * @typechecks
  8665. */
  8666. /**
  8667. * Gets the scroll position of the supplied element or window.
  8668. *
  8669. * The return values are unbounded, unlike `getScrollPosition`. This means they
  8670. * may be negative or exceed the element boundaries (which is possible using
  8671. * inertial scrolling).
  8672. *
  8673. * @param {DOMWindow|DOMElement} scrollable
  8674. * @return {object} Map with `x` and `y` keys.
  8675. */
  8676. function getUnboundedScrollPosition(scrollable) {
  8677. if (scrollable.Window && scrollable instanceof scrollable.Window) {
  8678. return {
  8679. x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
  8680. y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
  8681. };
  8682. }
  8683. return {
  8684. x: scrollable.scrollLeft,
  8685. y: scrollable.scrollTop
  8686. };
  8687. }
  8688. module.exports = getUnboundedScrollPosition;
  8689. /***/ }),
  8690. /* 93 */
  8691. /***/ (function(module, exports, __webpack_require__) {
  8692. "use strict";
  8693. /**
  8694. * Copyright (c) 2013-present, Facebook, Inc.
  8695. * All rights reserved.
  8696. *
  8697. * This source code is licensed under the BSD-style license found in the
  8698. * LICENSE file in the root directory of this source tree. An additional grant
  8699. * of patent rights can be found in the PATENTS file in the same directory.
  8700. *
  8701. * @typechecks
  8702. */
  8703. var _uppercasePattern = /([A-Z])/g;
  8704. /**
  8705. * Hyphenates a camelcased string, for example:
  8706. *
  8707. * > hyphenate('backgroundColor')
  8708. * < "background-color"
  8709. *
  8710. * For CSS style names, use `hyphenateStyleName` instead which works properly
  8711. * with all vendor prefixes, including `ms`.
  8712. *
  8713. * @param {string} string
  8714. * @return {string}
  8715. */
  8716. function hyphenate(string) {
  8717. return string.replace(_uppercasePattern, '-$1').toLowerCase();
  8718. }
  8719. module.exports = hyphenate;
  8720. /***/ }),
  8721. /* 94 */
  8722. /***/ (function(module, exports, __webpack_require__) {
  8723. "use strict";
  8724. /**
  8725. * Copyright (c) 2013-present, Facebook, Inc.
  8726. * All rights reserved.
  8727. *
  8728. * This source code is licensed under the BSD-style license found in the
  8729. * LICENSE file in the root directory of this source tree. An additional grant
  8730. * of patent rights can be found in the PATENTS file in the same directory.
  8731. *
  8732. * @typechecks
  8733. */
  8734. var hyphenate = __webpack_require__(93);
  8735. var msPattern = /^ms-/;
  8736. /**
  8737. * Hyphenates a camelcased CSS property name, for example:
  8738. *
  8739. * > hyphenateStyleName('backgroundColor')
  8740. * < "background-color"
  8741. * > hyphenateStyleName('MozTransition')
  8742. * < "-moz-transition"
  8743. * > hyphenateStyleName('msTransition')
  8744. * < "-ms-transition"
  8745. *
  8746. * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
  8747. * is converted to `-ms-`.
  8748. *
  8749. * @param {string} string
  8750. * @return {string}
  8751. */
  8752. function hyphenateStyleName(string) {
  8753. return hyphenate(string).replace(msPattern, '-ms-');
  8754. }
  8755. module.exports = hyphenateStyleName;
  8756. /***/ }),
  8757. /* 95 */
  8758. /***/ (function(module, exports, __webpack_require__) {
  8759. "use strict";
  8760. /**
  8761. * Copyright (c) 2013-present, Facebook, Inc.
  8762. * All rights reserved.
  8763. *
  8764. * This source code is licensed under the BSD-style license found in the
  8765. * LICENSE file in the root directory of this source tree. An additional grant
  8766. * of patent rights can be found in the PATENTS file in the same directory.
  8767. *
  8768. * @typechecks
  8769. */
  8770. /**
  8771. * @param {*} object The object to check.
  8772. * @return {boolean} Whether or not the object is a DOM node.
  8773. */
  8774. function isNode(object) {
  8775. var doc = object ? object.ownerDocument || object : document;
  8776. var defaultView = doc.defaultView || window;
  8777. return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
  8778. }
  8779. module.exports = isNode;
  8780. /***/ }),
  8781. /* 96 */
  8782. /***/ (function(module, exports, __webpack_require__) {
  8783. "use strict";
  8784. /**
  8785. * Copyright (c) 2013-present, Facebook, Inc.
  8786. * All rights reserved.
  8787. *
  8788. * This source code is licensed under the BSD-style license found in the
  8789. * LICENSE file in the root directory of this source tree. An additional grant
  8790. * of patent rights can be found in the PATENTS file in the same directory.
  8791. *
  8792. * @typechecks
  8793. */
  8794. var isNode = __webpack_require__(95);
  8795. /**
  8796. * @param {*} object The object to check.
  8797. * @return {boolean} Whether or not the object is a DOM text node.
  8798. */
  8799. function isTextNode(object) {
  8800. return isNode(object) && object.nodeType == 3;
  8801. }
  8802. module.exports = isTextNode;
  8803. /***/ }),
  8804. /* 97 */
  8805. /***/ (function(module, exports, __webpack_require__) {
  8806. "use strict";
  8807. /**
  8808. * Copyright (c) 2013-present, Facebook, Inc.
  8809. * All rights reserved.
  8810. *
  8811. * This source code is licensed under the BSD-style license found in the
  8812. * LICENSE file in the root directory of this source tree. An additional grant
  8813. * of patent rights can be found in the PATENTS file in the same directory.
  8814. *
  8815. *
  8816. * @typechecks static-only
  8817. */
  8818. /**
  8819. * Memoizes the return value of a function that accepts one string argument.
  8820. */
  8821. function memoizeStringOnly(callback) {
  8822. var cache = {};
  8823. return function (string) {
  8824. if (!cache.hasOwnProperty(string)) {
  8825. cache[string] = callback.call(this, string);
  8826. }
  8827. return cache[string];
  8828. };
  8829. }
  8830. module.exports = memoizeStringOnly;
  8831. /***/ }),
  8832. /* 98 */
  8833. /***/ (function(module, exports, __webpack_require__) {
  8834. "use strict";
  8835. /**
  8836. * Copyright (c) 2013-present, Facebook, Inc.
  8837. * All rights reserved.
  8838. *
  8839. * This source code is licensed under the BSD-style license found in the
  8840. * LICENSE file in the root directory of this source tree. An additional grant
  8841. * of patent rights can be found in the PATENTS file in the same directory.
  8842. *
  8843. * @typechecks
  8844. */
  8845. var ExecutionEnvironment = __webpack_require__(6);
  8846. var performance;
  8847. if (ExecutionEnvironment.canUseDOM) {
  8848. performance = window.performance || window.msPerformance || window.webkitPerformance;
  8849. }
  8850. module.exports = performance || {};
  8851. /***/ }),
  8852. /* 99 */
  8853. /***/ (function(module, exports, __webpack_require__) {
  8854. "use strict";
  8855. /**
  8856. * Copyright (c) 2013-present, Facebook, Inc.
  8857. * All rights reserved.
  8858. *
  8859. * This source code is licensed under the BSD-style license found in the
  8860. * LICENSE file in the root directory of this source tree. An additional grant
  8861. * of patent rights can be found in the PATENTS file in the same directory.
  8862. *
  8863. * @typechecks
  8864. */
  8865. var performance = __webpack_require__(98);
  8866. var performanceNow;
  8867. /**
  8868. * Detect if we can use `window.performance.now()` and gracefully fallback to
  8869. * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
  8870. * because of Facebook's testing infrastructure.
  8871. */
  8872. if (performance.now) {
  8873. performanceNow = function performanceNow() {
  8874. return performance.now();
  8875. };
  8876. } else {
  8877. performanceNow = function performanceNow() {
  8878. return Date.now();
  8879. };
  8880. }
  8881. module.exports = performanceNow;
  8882. /***/ }),
  8883. /* 100 */
  8884. /***/ (function(module, exports, __webpack_require__) {
  8885. "use strict";
  8886. /* WEBPACK VAR INJECTION */(function(process) {/**
  8887. * Copyright 2013-present, Facebook, Inc.
  8888. * All rights reserved.
  8889. *
  8890. * This source code is licensed under the BSD-style license found in the
  8891. * LICENSE file in the root directory of this source tree. An additional grant
  8892. * of patent rights can be found in the PATENTS file in the same directory.
  8893. */
  8894. if (process.env.NODE_ENV !== 'production') {
  8895. var invariant = __webpack_require__(1);
  8896. var warning = __webpack_require__(2);
  8897. var ReactPropTypesSecret = __webpack_require__(55);
  8898. var loggedTypeFailures = {};
  8899. }
  8900. /**
  8901. * Assert that the values match with the type specs.
  8902. * Error messages are memorized and will only be shown once.
  8903. *
  8904. * @param {object} typeSpecs Map of name to a ReactPropType
  8905. * @param {object} values Runtime values that need to be type-checked
  8906. * @param {string} location e.g. "prop", "context", "child context"
  8907. * @param {string} componentName Name of the component for error messages.
  8908. * @param {?Function} getStack Returns the component stack.
  8909. * @private
  8910. */
  8911. function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  8912. if (process.env.NODE_ENV !== 'production') {
  8913. for (var typeSpecName in typeSpecs) {
  8914. if (typeSpecs.hasOwnProperty(typeSpecName)) {
  8915. var error;
  8916. // Prop type validation may throw. In case they do, we don't want to
  8917. // fail the render phase where it didn't fail before. So we log it.
  8918. // After these have been cleaned up, we'll let them throw.
  8919. try {
  8920. // This is intentionally an invariant that gets caught. It's the same
  8921. // behavior as without this statement except with a better message.
  8922. invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
  8923. error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  8924. } catch (ex) {
  8925. error = ex;
  8926. }
  8927. warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
  8928. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  8929. // Only monitor this failure once because there tends to be a lot of the
  8930. // same error.
  8931. loggedTypeFailures[error.message] = true;
  8932. var stack = getStack ? getStack() : '';
  8933. warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
  8934. }
  8935. }
  8936. }
  8937. }
  8938. }
  8939. module.exports = checkPropTypes;
  8940. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  8941. /***/ }),
  8942. /* 101 */
  8943. /***/ (function(module, exports, __webpack_require__) {
  8944. "use strict";
  8945. /* WEBPACK VAR INJECTION */(function(process) {/**
  8946. * Copyright 2013-present, Facebook, Inc.
  8947. * All rights reserved.
  8948. *
  8949. * This source code is licensed under the BSD-style license found in the
  8950. * LICENSE file in the root directory of this source tree. An additional grant
  8951. * of patent rights can be found in the PATENTS file in the same directory.
  8952. */
  8953. var emptyFunction = __webpack_require__(9);
  8954. var invariant = __webpack_require__(1);
  8955. var warning = __webpack_require__(2);
  8956. var ReactPropTypesSecret = __webpack_require__(55);
  8957. var checkPropTypes = __webpack_require__(100);
  8958. module.exports = function(isValidElement, throwOnDirectAccess) {
  8959. /* global Symbol */
  8960. var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  8961. var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  8962. /**
  8963. * Returns the iterator method function contained on the iterable object.
  8964. *
  8965. * Be sure to invoke the function with the iterable as context:
  8966. *
  8967. * var iteratorFn = getIteratorFn(myIterable);
  8968. * if (iteratorFn) {
  8969. * var iterator = iteratorFn.call(myIterable);
  8970. * ...
  8971. * }
  8972. *
  8973. * @param {?object} maybeIterable
  8974. * @return {?function}
  8975. */
  8976. function getIteratorFn(maybeIterable) {
  8977. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  8978. if (typeof iteratorFn === 'function') {
  8979. return iteratorFn;
  8980. }
  8981. }
  8982. /**
  8983. * Collection of methods that allow declaration and validation of props that are
  8984. * supplied to React components. Example usage:
  8985. *
  8986. * var Props = require('ReactPropTypes');
  8987. * var MyArticle = React.createClass({
  8988. * propTypes: {
  8989. * // An optional string prop named "description".
  8990. * description: Props.string,
  8991. *
  8992. * // A required enum prop named "category".
  8993. * category: Props.oneOf(['News','Photos']).isRequired,
  8994. *
  8995. * // A prop named "dialog" that requires an instance of Dialog.
  8996. * dialog: Props.instanceOf(Dialog).isRequired
  8997. * },
  8998. * render: function() { ... }
  8999. * });
  9000. *
  9001. * A more formal specification of how these methods are used:
  9002. *
  9003. * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
  9004. * decl := ReactPropTypes.{type}(.isRequired)?
  9005. *
  9006. * Each and every declaration produces a function with the same signature. This
  9007. * allows the creation of custom validation functions. For example:
  9008. *
  9009. * var MyLink = React.createClass({
  9010. * propTypes: {
  9011. * // An optional string or URI prop named "href".
  9012. * href: function(props, propName, componentName) {
  9013. * var propValue = props[propName];
  9014. * if (propValue != null && typeof propValue !== 'string' &&
  9015. * !(propValue instanceof URI)) {
  9016. * return new Error(
  9017. * 'Expected a string or an URI for ' + propName + ' in ' +
  9018. * componentName
  9019. * );
  9020. * }
  9021. * }
  9022. * },
  9023. * render: function() {...}
  9024. * });
  9025. *
  9026. * @internal
  9027. */
  9028. var ANONYMOUS = '<<anonymous>>';
  9029. // Important!
  9030. // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  9031. var ReactPropTypes = {
  9032. array: createPrimitiveTypeChecker('array'),
  9033. bool: createPrimitiveTypeChecker('boolean'),
  9034. func: createPrimitiveTypeChecker('function'),
  9035. number: createPrimitiveTypeChecker('number'),
  9036. object: createPrimitiveTypeChecker('object'),
  9037. string: createPrimitiveTypeChecker('string'),
  9038. symbol: createPrimitiveTypeChecker('symbol'),
  9039. any: createAnyTypeChecker(),
  9040. arrayOf: createArrayOfTypeChecker,
  9041. element: createElementTypeChecker(),
  9042. instanceOf: createInstanceTypeChecker,
  9043. node: createNodeChecker(),
  9044. objectOf: createObjectOfTypeChecker,
  9045. oneOf: createEnumTypeChecker,
  9046. oneOfType: createUnionTypeChecker,
  9047. shape: createShapeTypeChecker
  9048. };
  9049. /**
  9050. * inlined Object.is polyfill to avoid requiring consumers ship their own
  9051. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  9052. */
  9053. /*eslint-disable no-self-compare*/
  9054. function is(x, y) {
  9055. // SameValue algorithm
  9056. if (x === y) {
  9057. // Steps 1-5, 7-10
  9058. // Steps 6.b-6.e: +0 != -0
  9059. return x !== 0 || 1 / x === 1 / y;
  9060. } else {
  9061. // Step 6.a: NaN == NaN
  9062. return x !== x && y !== y;
  9063. }
  9064. }
  9065. /*eslint-enable no-self-compare*/
  9066. /**
  9067. * We use an Error-like object for backward compatibility as people may call
  9068. * PropTypes directly and inspect their output. However, we don't use real
  9069. * Errors anymore. We don't inspect their stack anyway, and creating them
  9070. * is prohibitively expensive if they are created too often, such as what
  9071. * happens in oneOfType() for any type before the one that matched.
  9072. */
  9073. function PropTypeError(message) {
  9074. this.message = message;
  9075. this.stack = '';
  9076. }
  9077. // Make `instanceof Error` still work for returned errors.
  9078. PropTypeError.prototype = Error.prototype;
  9079. function createChainableTypeChecker(validate) {
  9080. if (process.env.NODE_ENV !== 'production') {
  9081. var manualPropTypeCallCache = {};
  9082. var manualPropTypeWarningCount = 0;
  9083. }
  9084. function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
  9085. componentName = componentName || ANONYMOUS;
  9086. propFullName = propFullName || propName;
  9087. if (secret !== ReactPropTypesSecret) {
  9088. if (throwOnDirectAccess) {
  9089. // New behavior only for users of `prop-types` package
  9090. invariant(
  9091. false,
  9092. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  9093. 'Use `PropTypes.checkPropTypes()` to call them. ' +
  9094. 'Read more at http://fb.me/use-check-prop-types'
  9095. );
  9096. } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
  9097. // Old behavior for people using React.PropTypes
  9098. var cacheKey = componentName + ':' + propName;
  9099. if (
  9100. !manualPropTypeCallCache[cacheKey] &&
  9101. // Avoid spamming the console because they are often not actionable except for lib authors
  9102. manualPropTypeWarningCount < 3
  9103. ) {
  9104. warning(
  9105. false,
  9106. 'You are manually calling a React.PropTypes validation ' +
  9107. 'function for the `%s` prop on `%s`. This is deprecated ' +
  9108. 'and will throw in the standalone `prop-types` package. ' +
  9109. 'You may be seeing this warning due to a third-party PropTypes ' +
  9110. 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
  9111. propFullName,
  9112. componentName
  9113. );
  9114. manualPropTypeCallCache[cacheKey] = true;
  9115. manualPropTypeWarningCount++;
  9116. }
  9117. }
  9118. }
  9119. if (props[propName] == null) {
  9120. if (isRequired) {
  9121. if (props[propName] === null) {
  9122. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
  9123. }
  9124. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
  9125. }
  9126. return null;
  9127. } else {
  9128. return validate(props, propName, componentName, location, propFullName);
  9129. }
  9130. }
  9131. var chainedCheckType = checkType.bind(null, false);
  9132. chainedCheckType.isRequired = checkType.bind(null, true);
  9133. return chainedCheckType;
  9134. }
  9135. function createPrimitiveTypeChecker(expectedType) {
  9136. function validate(props, propName, componentName, location, propFullName, secret) {
  9137. var propValue = props[propName];
  9138. var propType = getPropType(propValue);
  9139. if (propType !== expectedType) {
  9140. // `propValue` being instance of, say, date/regexp, pass the 'object'
  9141. // check, but we can offer a more precise error message here rather than
  9142. // 'of type `object`'.
  9143. var preciseType = getPreciseType(propValue);
  9144. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
  9145. }
  9146. return null;
  9147. }
  9148. return createChainableTypeChecker(validate);
  9149. }
  9150. function createAnyTypeChecker() {
  9151. return createChainableTypeChecker(emptyFunction.thatReturnsNull);
  9152. }
  9153. function createArrayOfTypeChecker(typeChecker) {
  9154. function validate(props, propName, componentName, location, propFullName) {
  9155. if (typeof typeChecker !== 'function') {
  9156. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
  9157. }
  9158. var propValue = props[propName];
  9159. if (!Array.isArray(propValue)) {
  9160. var propType = getPropType(propValue);
  9161. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
  9162. }
  9163. for (var i = 0; i < propValue.length; i++) {
  9164. var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
  9165. if (error instanceof Error) {
  9166. return error;
  9167. }
  9168. }
  9169. return null;
  9170. }
  9171. return createChainableTypeChecker(validate);
  9172. }
  9173. function createElementTypeChecker() {
  9174. function validate(props, propName, componentName, location, propFullName) {
  9175. var propValue = props[propName];
  9176. if (!isValidElement(propValue)) {
  9177. var propType = getPropType(propValue);
  9178. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
  9179. }
  9180. return null;
  9181. }
  9182. return createChainableTypeChecker(validate);
  9183. }
  9184. function createInstanceTypeChecker(expectedClass) {
  9185. function validate(props, propName, componentName, location, propFullName) {
  9186. if (!(props[propName] instanceof expectedClass)) {
  9187. var expectedClassName = expectedClass.name || ANONYMOUS;
  9188. var actualClassName = getClassName(props[propName]);
  9189. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
  9190. }
  9191. return null;
  9192. }
  9193. return createChainableTypeChecker(validate);
  9194. }
  9195. function createEnumTypeChecker(expectedValues) {
  9196. if (!Array.isArray(expectedValues)) {
  9197. process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
  9198. return emptyFunction.thatReturnsNull;
  9199. }
  9200. function validate(props, propName, componentName, location, propFullName) {
  9201. var propValue = props[propName];
  9202. for (var i = 0; i < expectedValues.length; i++) {
  9203. if (is(propValue, expectedValues[i])) {
  9204. return null;
  9205. }
  9206. }
  9207. var valuesString = JSON.stringify(expectedValues);
  9208. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
  9209. }
  9210. return createChainableTypeChecker(validate);
  9211. }
  9212. function createObjectOfTypeChecker(typeChecker) {
  9213. function validate(props, propName, componentName, location, propFullName) {
  9214. if (typeof typeChecker !== 'function') {
  9215. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
  9216. }
  9217. var propValue = props[propName];
  9218. var propType = getPropType(propValue);
  9219. if (propType !== 'object') {
  9220. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
  9221. }
  9222. for (var key in propValue) {
  9223. if (propValue.hasOwnProperty(key)) {
  9224. var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  9225. if (error instanceof Error) {
  9226. return error;
  9227. }
  9228. }
  9229. }
  9230. return null;
  9231. }
  9232. return createChainableTypeChecker(validate);
  9233. }
  9234. function createUnionTypeChecker(arrayOfTypeCheckers) {
  9235. if (!Array.isArray(arrayOfTypeCheckers)) {
  9236. process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
  9237. return emptyFunction.thatReturnsNull;
  9238. }
  9239. function validate(props, propName, componentName, location, propFullName) {
  9240. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  9241. var checker = arrayOfTypeCheckers[i];
  9242. if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
  9243. return null;
  9244. }
  9245. }
  9246. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
  9247. }
  9248. return createChainableTypeChecker(validate);
  9249. }
  9250. function createNodeChecker() {
  9251. function validate(props, propName, componentName, location, propFullName) {
  9252. if (!isNode(props[propName])) {
  9253. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
  9254. }
  9255. return null;
  9256. }
  9257. return createChainableTypeChecker(validate);
  9258. }
  9259. function createShapeTypeChecker(shapeTypes) {
  9260. function validate(props, propName, componentName, location, propFullName) {
  9261. var propValue = props[propName];
  9262. var propType = getPropType(propValue);
  9263. if (propType !== 'object') {
  9264. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  9265. }
  9266. for (var key in shapeTypes) {
  9267. var checker = shapeTypes[key];
  9268. if (!checker) {
  9269. continue;
  9270. }
  9271. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  9272. if (error) {
  9273. return error;
  9274. }
  9275. }
  9276. return null;
  9277. }
  9278. return createChainableTypeChecker(validate);
  9279. }
  9280. function isNode(propValue) {
  9281. switch (typeof propValue) {
  9282. case 'number':
  9283. case 'string':
  9284. case 'undefined':
  9285. return true;
  9286. case 'boolean':
  9287. return !propValue;
  9288. case 'object':
  9289. if (Array.isArray(propValue)) {
  9290. return propValue.every(isNode);
  9291. }
  9292. if (propValue === null || isValidElement(propValue)) {
  9293. return true;
  9294. }
  9295. var iteratorFn = getIteratorFn(propValue);
  9296. if (iteratorFn) {
  9297. var iterator = iteratorFn.call(propValue);
  9298. var step;
  9299. if (iteratorFn !== propValue.entries) {
  9300. while (!(step = iterator.next()).done) {
  9301. if (!isNode(step.value)) {
  9302. return false;
  9303. }
  9304. }
  9305. } else {
  9306. // Iterator will provide entry [k,v] tuples rather than values.
  9307. while (!(step = iterator.next()).done) {
  9308. var entry = step.value;
  9309. if (entry) {
  9310. if (!isNode(entry[1])) {
  9311. return false;
  9312. }
  9313. }
  9314. }
  9315. }
  9316. } else {
  9317. return false;
  9318. }
  9319. return true;
  9320. default:
  9321. return false;
  9322. }
  9323. }
  9324. function isSymbol(propType, propValue) {
  9325. // Native Symbol.
  9326. if (propType === 'symbol') {
  9327. return true;
  9328. }
  9329. // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
  9330. if (propValue['@@toStringTag'] === 'Symbol') {
  9331. return true;
  9332. }
  9333. // Fallback for non-spec compliant Symbols which are polyfilled.
  9334. if (typeof Symbol === 'function' && propValue instanceof Symbol) {
  9335. return true;
  9336. }
  9337. return false;
  9338. }
  9339. // Equivalent of `typeof` but with special handling for array and regexp.
  9340. function getPropType(propValue) {
  9341. var propType = typeof propValue;
  9342. if (Array.isArray(propValue)) {
  9343. return 'array';
  9344. }
  9345. if (propValue instanceof RegExp) {
  9346. // Old webkits (at least until Android 4.0) return 'function' rather than
  9347. // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
  9348. // passes PropTypes.object.
  9349. return 'object';
  9350. }
  9351. if (isSymbol(propType, propValue)) {
  9352. return 'symbol';
  9353. }
  9354. return propType;
  9355. }
  9356. // This handles more types than `getPropType`. Only used for error messages.
  9357. // See `createPrimitiveTypeChecker`.
  9358. function getPreciseType(propValue) {
  9359. var propType = getPropType(propValue);
  9360. if (propType === 'object') {
  9361. if (propValue instanceof Date) {
  9362. return 'date';
  9363. } else if (propValue instanceof RegExp) {
  9364. return 'regexp';
  9365. }
  9366. }
  9367. return propType;
  9368. }
  9369. // Returns class name of the object, if any.
  9370. function getClassName(propValue) {
  9371. if (!propValue.constructor || !propValue.constructor.name) {
  9372. return ANONYMOUS;
  9373. }
  9374. return propValue.constructor.name;
  9375. }
  9376. ReactPropTypes.checkPropTypes = checkPropTypes;
  9377. ReactPropTypes.PropTypes = ReactPropTypes;
  9378. return ReactPropTypes;
  9379. };
  9380. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  9381. /***/ }),
  9382. /* 102 */
  9383. /***/ (function(module, exports, __webpack_require__) {
  9384. "use strict";
  9385. /**
  9386. * Copyright 2013-present, Facebook, Inc.
  9387. * All rights reserved.
  9388. *
  9389. * This source code is licensed under the BSD-style license found in the
  9390. * LICENSE file in the root directory of this source tree. An additional grant
  9391. * of patent rights can be found in the PATENTS file in the same directory.
  9392. *
  9393. */
  9394. var ARIADOMPropertyConfig = {
  9395. Properties: {
  9396. // Global States and Properties
  9397. 'aria-current': 0, // state
  9398. 'aria-details': 0,
  9399. 'aria-disabled': 0, // state
  9400. 'aria-hidden': 0, // state
  9401. 'aria-invalid': 0, // state
  9402. 'aria-keyshortcuts': 0,
  9403. 'aria-label': 0,
  9404. 'aria-roledescription': 0,
  9405. // Widget Attributes
  9406. 'aria-autocomplete': 0,
  9407. 'aria-checked': 0,
  9408. 'aria-expanded': 0,
  9409. 'aria-haspopup': 0,
  9410. 'aria-level': 0,
  9411. 'aria-modal': 0,
  9412. 'aria-multiline': 0,
  9413. 'aria-multiselectable': 0,
  9414. 'aria-orientation': 0,
  9415. 'aria-placeholder': 0,
  9416. 'aria-pressed': 0,
  9417. 'aria-readonly': 0,
  9418. 'aria-required': 0,
  9419. 'aria-selected': 0,
  9420. 'aria-sort': 0,
  9421. 'aria-valuemax': 0,
  9422. 'aria-valuemin': 0,
  9423. 'aria-valuenow': 0,
  9424. 'aria-valuetext': 0,
  9425. // Live Region Attributes
  9426. 'aria-atomic': 0,
  9427. 'aria-busy': 0,
  9428. 'aria-live': 0,
  9429. 'aria-relevant': 0,
  9430. // Drag-and-Drop Attributes
  9431. 'aria-dropeffect': 0,
  9432. 'aria-grabbed': 0,
  9433. // Relationship Attributes
  9434. 'aria-activedescendant': 0,
  9435. 'aria-colcount': 0,
  9436. 'aria-colindex': 0,
  9437. 'aria-colspan': 0,
  9438. 'aria-controls': 0,
  9439. 'aria-describedby': 0,
  9440. 'aria-errormessage': 0,
  9441. 'aria-flowto': 0,
  9442. 'aria-labelledby': 0,
  9443. 'aria-owns': 0,
  9444. 'aria-posinset': 0,
  9445. 'aria-rowcount': 0,
  9446. 'aria-rowindex': 0,
  9447. 'aria-rowspan': 0,
  9448. 'aria-setsize': 0
  9449. },
  9450. DOMAttributeNames: {},
  9451. DOMPropertyNames: {}
  9452. };
  9453. module.exports = ARIADOMPropertyConfig;
  9454. /***/ }),
  9455. /* 103 */
  9456. /***/ (function(module, exports, __webpack_require__) {
  9457. "use strict";
  9458. /**
  9459. * Copyright 2013-present, Facebook, Inc.
  9460. * All rights reserved.
  9461. *
  9462. * This source code is licensed under the BSD-style license found in the
  9463. * LICENSE file in the root directory of this source tree. An additional grant
  9464. * of patent rights can be found in the PATENTS file in the same directory.
  9465. *
  9466. */
  9467. var ReactDOMComponentTree = __webpack_require__(5);
  9468. var focusNode = __webpack_require__(52);
  9469. var AutoFocusUtils = {
  9470. focusDOMComponent: function () {
  9471. focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
  9472. }
  9473. };
  9474. module.exports = AutoFocusUtils;
  9475. /***/ }),
  9476. /* 104 */
  9477. /***/ (function(module, exports, __webpack_require__) {
  9478. "use strict";
  9479. /**
  9480. * Copyright 2013-present Facebook, Inc.
  9481. * All rights reserved.
  9482. *
  9483. * This source code is licensed under the BSD-style license found in the
  9484. * LICENSE file in the root directory of this source tree. An additional grant
  9485. * of patent rights can be found in the PATENTS file in the same directory.
  9486. *
  9487. */
  9488. var EventPropagators = __webpack_require__(22);
  9489. var ExecutionEnvironment = __webpack_require__(6);
  9490. var FallbackCompositionState = __webpack_require__(110);
  9491. var SyntheticCompositionEvent = __webpack_require__(153);
  9492. var SyntheticInputEvent = __webpack_require__(156);
  9493. var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
  9494. var START_KEYCODE = 229;
  9495. var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
  9496. var documentMode = null;
  9497. if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
  9498. documentMode = document.documentMode;
  9499. }
  9500. // Webkit offers a very useful `textInput` event that can be used to
  9501. // directly represent `beforeInput`. The IE `textinput` event is not as
  9502. // useful, so we don't use it.
  9503. var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
  9504. // In IE9+, we have access to composition events, but the data supplied
  9505. // by the native compositionend event may be incorrect. Japanese ideographic
  9506. // spaces, for instance (\u3000) are not recorded correctly.
  9507. var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
  9508. /**
  9509. * Opera <= 12 includes TextEvent in window, but does not fire
  9510. * text input events. Rely on keypress instead.
  9511. */
  9512. function isPresto() {
  9513. var opera = window.opera;
  9514. return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
  9515. }
  9516. var SPACEBAR_CODE = 32;
  9517. var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
  9518. // Events and their corresponding property names.
  9519. var eventTypes = {
  9520. beforeInput: {
  9521. phasedRegistrationNames: {
  9522. bubbled: 'onBeforeInput',
  9523. captured: 'onBeforeInputCapture'
  9524. },
  9525. dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
  9526. },
  9527. compositionEnd: {
  9528. phasedRegistrationNames: {
  9529. bubbled: 'onCompositionEnd',
  9530. captured: 'onCompositionEndCapture'
  9531. },
  9532. dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
  9533. },
  9534. compositionStart: {
  9535. phasedRegistrationNames: {
  9536. bubbled: 'onCompositionStart',
  9537. captured: 'onCompositionStartCapture'
  9538. },
  9539. dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
  9540. },
  9541. compositionUpdate: {
  9542. phasedRegistrationNames: {
  9543. bubbled: 'onCompositionUpdate',
  9544. captured: 'onCompositionUpdateCapture'
  9545. },
  9546. dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
  9547. }
  9548. };
  9549. // Track whether we've ever handled a keypress on the space key.
  9550. var hasSpaceKeypress = false;
  9551. /**
  9552. * Return whether a native keypress event is assumed to be a command.
  9553. * This is required because Firefox fires `keypress` events for key commands
  9554. * (cut, copy, select-all, etc.) even though no character is inserted.
  9555. */
  9556. function isKeypressCommand(nativeEvent) {
  9557. return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
  9558. // ctrlKey && altKey is equivalent to AltGr, and is not a command.
  9559. !(nativeEvent.ctrlKey && nativeEvent.altKey);
  9560. }
  9561. /**
  9562. * Translate native top level events into event types.
  9563. *
  9564. * @param {string} topLevelType
  9565. * @return {object}
  9566. */
  9567. function getCompositionEventType(topLevelType) {
  9568. switch (topLevelType) {
  9569. case 'topCompositionStart':
  9570. return eventTypes.compositionStart;
  9571. case 'topCompositionEnd':
  9572. return eventTypes.compositionEnd;
  9573. case 'topCompositionUpdate':
  9574. return eventTypes.compositionUpdate;
  9575. }
  9576. }
  9577. /**
  9578. * Does our fallback best-guess model think this event signifies that
  9579. * composition has begun?
  9580. *
  9581. * @param {string} topLevelType
  9582. * @param {object} nativeEvent
  9583. * @return {boolean}
  9584. */
  9585. function isFallbackCompositionStart(topLevelType, nativeEvent) {
  9586. return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
  9587. }
  9588. /**
  9589. * Does our fallback mode think that this event is the end of composition?
  9590. *
  9591. * @param {string} topLevelType
  9592. * @param {object} nativeEvent
  9593. * @return {boolean}
  9594. */
  9595. function isFallbackCompositionEnd(topLevelType, nativeEvent) {
  9596. switch (topLevelType) {
  9597. case 'topKeyUp':
  9598. // Command keys insert or clear IME input.
  9599. return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
  9600. case 'topKeyDown':
  9601. // Expect IME keyCode on each keydown. If we get any other
  9602. // code we must have exited earlier.
  9603. return nativeEvent.keyCode !== START_KEYCODE;
  9604. case 'topKeyPress':
  9605. case 'topMouseDown':
  9606. case 'topBlur':
  9607. // Events are not possible without cancelling IME.
  9608. return true;
  9609. default:
  9610. return false;
  9611. }
  9612. }
  9613. /**
  9614. * Google Input Tools provides composition data via a CustomEvent,
  9615. * with the `data` property populated in the `detail` object. If this
  9616. * is available on the event object, use it. If not, this is a plain
  9617. * composition event and we have nothing special to extract.
  9618. *
  9619. * @param {object} nativeEvent
  9620. * @return {?string}
  9621. */
  9622. function getDataFromCustomEvent(nativeEvent) {
  9623. var detail = nativeEvent.detail;
  9624. if (typeof detail === 'object' && 'data' in detail) {
  9625. return detail.data;
  9626. }
  9627. return null;
  9628. }
  9629. // Track the current IME composition fallback object, if any.
  9630. var currentComposition = null;
  9631. /**
  9632. * @return {?object} A SyntheticCompositionEvent.
  9633. */
  9634. function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  9635. var eventType;
  9636. var fallbackData;
  9637. if (canUseCompositionEvent) {
  9638. eventType = getCompositionEventType(topLevelType);
  9639. } else if (!currentComposition) {
  9640. if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
  9641. eventType = eventTypes.compositionStart;
  9642. }
  9643. } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
  9644. eventType = eventTypes.compositionEnd;
  9645. }
  9646. if (!eventType) {
  9647. return null;
  9648. }
  9649. if (useFallbackCompositionData) {
  9650. // The current composition is stored statically and must not be
  9651. // overwritten while composition continues.
  9652. if (!currentComposition && eventType === eventTypes.compositionStart) {
  9653. currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
  9654. } else if (eventType === eventTypes.compositionEnd) {
  9655. if (currentComposition) {
  9656. fallbackData = currentComposition.getData();
  9657. }
  9658. }
  9659. }
  9660. var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
  9661. if (fallbackData) {
  9662. // Inject data generated from fallback path into the synthetic event.
  9663. // This matches the property of native CompositionEventInterface.
  9664. event.data = fallbackData;
  9665. } else {
  9666. var customData = getDataFromCustomEvent(nativeEvent);
  9667. if (customData !== null) {
  9668. event.data = customData;
  9669. }
  9670. }
  9671. EventPropagators.accumulateTwoPhaseDispatches(event);
  9672. return event;
  9673. }
  9674. /**
  9675. * @param {string} topLevelType Record from `EventConstants`.
  9676. * @param {object} nativeEvent Native browser event.
  9677. * @return {?string} The string corresponding to this `beforeInput` event.
  9678. */
  9679. function getNativeBeforeInputChars(topLevelType, nativeEvent) {
  9680. switch (topLevelType) {
  9681. case 'topCompositionEnd':
  9682. return getDataFromCustomEvent(nativeEvent);
  9683. case 'topKeyPress':
  9684. /**
  9685. * If native `textInput` events are available, our goal is to make
  9686. * use of them. However, there is a special case: the spacebar key.
  9687. * In Webkit, preventing default on a spacebar `textInput` event
  9688. * cancels character insertion, but it *also* causes the browser
  9689. * to fall back to its default spacebar behavior of scrolling the
  9690. * page.
  9691. *
  9692. * Tracking at:
  9693. * https://code.google.com/p/chromium/issues/detail?id=355103
  9694. *
  9695. * To avoid this issue, use the keypress event as if no `textInput`
  9696. * event is available.
  9697. */
  9698. var which = nativeEvent.which;
  9699. if (which !== SPACEBAR_CODE) {
  9700. return null;
  9701. }
  9702. hasSpaceKeypress = true;
  9703. return SPACEBAR_CHAR;
  9704. case 'topTextInput':
  9705. // Record the characters to be added to the DOM.
  9706. var chars = nativeEvent.data;
  9707. // If it's a spacebar character, assume that we have already handled
  9708. // it at the keypress level and bail immediately. Android Chrome
  9709. // doesn't give us keycodes, so we need to blacklist it.
  9710. if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
  9711. return null;
  9712. }
  9713. return chars;
  9714. default:
  9715. // For other native event types, do nothing.
  9716. return null;
  9717. }
  9718. }
  9719. /**
  9720. * For browsers that do not provide the `textInput` event, extract the
  9721. * appropriate string to use for SyntheticInputEvent.
  9722. *
  9723. * @param {string} topLevelType Record from `EventConstants`.
  9724. * @param {object} nativeEvent Native browser event.
  9725. * @return {?string} The fallback string for this `beforeInput` event.
  9726. */
  9727. function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
  9728. // If we are currently composing (IME) and using a fallback to do so,
  9729. // try to extract the composed characters from the fallback object.
  9730. // If composition event is available, we extract a string only at
  9731. // compositionevent, otherwise extract it at fallback events.
  9732. if (currentComposition) {
  9733. if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
  9734. var chars = currentComposition.getData();
  9735. FallbackCompositionState.release(currentComposition);
  9736. currentComposition = null;
  9737. return chars;
  9738. }
  9739. return null;
  9740. }
  9741. switch (topLevelType) {
  9742. case 'topPaste':
  9743. // If a paste event occurs after a keypress, throw out the input
  9744. // chars. Paste events should not lead to BeforeInput events.
  9745. return null;
  9746. case 'topKeyPress':
  9747. /**
  9748. * As of v27, Firefox may fire keypress events even when no character
  9749. * will be inserted. A few possibilities:
  9750. *
  9751. * - `which` is `0`. Arrow keys, Esc key, etc.
  9752. *
  9753. * - `which` is the pressed key code, but no char is available.
  9754. * Ex: 'AltGr + d` in Polish. There is no modified character for
  9755. * this key combination and no character is inserted into the
  9756. * document, but FF fires the keypress for char code `100` anyway.
  9757. * No `input` event will occur.
  9758. *
  9759. * - `which` is the pressed key code, but a command combination is
  9760. * being used. Ex: `Cmd+C`. No character is inserted, and no
  9761. * `input` event will occur.
  9762. */
  9763. if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
  9764. return String.fromCharCode(nativeEvent.which);
  9765. }
  9766. return null;
  9767. case 'topCompositionEnd':
  9768. return useFallbackCompositionData ? null : nativeEvent.data;
  9769. default:
  9770. return null;
  9771. }
  9772. }
  9773. /**
  9774. * Extract a SyntheticInputEvent for `beforeInput`, based on either native
  9775. * `textInput` or fallback behavior.
  9776. *
  9777. * @return {?object} A SyntheticInputEvent.
  9778. */
  9779. function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  9780. var chars;
  9781. if (canUseTextInputEvent) {
  9782. chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
  9783. } else {
  9784. chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
  9785. }
  9786. // If no characters are being inserted, no BeforeInput event should
  9787. // be fired.
  9788. if (!chars) {
  9789. return null;
  9790. }
  9791. var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
  9792. event.data = chars;
  9793. EventPropagators.accumulateTwoPhaseDispatches(event);
  9794. return event;
  9795. }
  9796. /**
  9797. * Create an `onBeforeInput` event to match
  9798. * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
  9799. *
  9800. * This event plugin is based on the native `textInput` event
  9801. * available in Chrome, Safari, Opera, and IE. This event fires after
  9802. * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
  9803. *
  9804. * `beforeInput` is spec'd but not implemented in any browsers, and
  9805. * the `input` event does not provide any useful information about what has
  9806. * actually been added, contrary to the spec. Thus, `textInput` is the best
  9807. * available event to identify the characters that have actually been inserted
  9808. * into the target node.
  9809. *
  9810. * This plugin is also responsible for emitting `composition` events, thus
  9811. * allowing us to share composition fallback code for both `beforeInput` and
  9812. * `composition` event types.
  9813. */
  9814. var BeforeInputEventPlugin = {
  9815. eventTypes: eventTypes,
  9816. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  9817. return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
  9818. }
  9819. };
  9820. module.exports = BeforeInputEventPlugin;
  9821. /***/ }),
  9822. /* 105 */
  9823. /***/ (function(module, exports, __webpack_require__) {
  9824. "use strict";
  9825. /* WEBPACK VAR INJECTION */(function(process) {/**
  9826. * Copyright 2013-present, Facebook, Inc.
  9827. * All rights reserved.
  9828. *
  9829. * This source code is licensed under the BSD-style license found in the
  9830. * LICENSE file in the root directory of this source tree. An additional grant
  9831. * of patent rights can be found in the PATENTS file in the same directory.
  9832. *
  9833. */
  9834. var CSSProperty = __webpack_require__(56);
  9835. var ExecutionEnvironment = __webpack_require__(6);
  9836. var ReactInstrumentation = __webpack_require__(8);
  9837. var camelizeStyleName = __webpack_require__(87);
  9838. var dangerousStyleValue = __webpack_require__(163);
  9839. var hyphenateStyleName = __webpack_require__(94);
  9840. var memoizeStringOnly = __webpack_require__(97);
  9841. var warning = __webpack_require__(2);
  9842. var processStyleName = memoizeStringOnly(function (styleName) {
  9843. return hyphenateStyleName(styleName);
  9844. });
  9845. var hasShorthandPropertyBug = false;
  9846. var styleFloatAccessor = 'cssFloat';
  9847. if (ExecutionEnvironment.canUseDOM) {
  9848. var tempStyle = document.createElement('div').style;
  9849. try {
  9850. // IE8 throws "Invalid argument." if resetting shorthand style properties.
  9851. tempStyle.font = '';
  9852. } catch (e) {
  9853. hasShorthandPropertyBug = true;
  9854. }
  9855. // IE8 only supports accessing cssFloat (standard) as styleFloat
  9856. if (document.documentElement.style.cssFloat === undefined) {
  9857. styleFloatAccessor = 'styleFloat';
  9858. }
  9859. }
  9860. if (process.env.NODE_ENV !== 'production') {
  9861. // 'msTransform' is correct, but the other prefixes should be capitalized
  9862. var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
  9863. // style values shouldn't contain a semicolon
  9864. var badStyleValueWithSemicolonPattern = /;\s*$/;
  9865. var warnedStyleNames = {};
  9866. var warnedStyleValues = {};
  9867. var warnedForNaNValue = false;
  9868. var warnHyphenatedStyleName = function (name, owner) {
  9869. if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
  9870. return;
  9871. }
  9872. warnedStyleNames[name] = true;
  9873. process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
  9874. };
  9875. var warnBadVendoredStyleName = function (name, owner) {
  9876. if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
  9877. return;
  9878. }
  9879. warnedStyleNames[name] = true;
  9880. process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
  9881. };
  9882. var warnStyleValueWithSemicolon = function (name, value, owner) {
  9883. if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
  9884. return;
  9885. }
  9886. warnedStyleValues[value] = true;
  9887. process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
  9888. };
  9889. var warnStyleValueIsNaN = function (name, value, owner) {
  9890. if (warnedForNaNValue) {
  9891. return;
  9892. }
  9893. warnedForNaNValue = true;
  9894. process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
  9895. };
  9896. var checkRenderMessage = function (owner) {
  9897. if (owner) {
  9898. var name = owner.getName();
  9899. if (name) {
  9900. return ' Check the render method of `' + name + '`.';
  9901. }
  9902. }
  9903. return '';
  9904. };
  9905. /**
  9906. * @param {string} name
  9907. * @param {*} value
  9908. * @param {ReactDOMComponent} component
  9909. */
  9910. var warnValidStyle = function (name, value, component) {
  9911. var owner;
  9912. if (component) {
  9913. owner = component._currentElement._owner;
  9914. }
  9915. if (name.indexOf('-') > -1) {
  9916. warnHyphenatedStyleName(name, owner);
  9917. } else if (badVendoredStyleNamePattern.test(name)) {
  9918. warnBadVendoredStyleName(name, owner);
  9919. } else if (badStyleValueWithSemicolonPattern.test(value)) {
  9920. warnStyleValueWithSemicolon(name, value, owner);
  9921. }
  9922. if (typeof value === 'number' && isNaN(value)) {
  9923. warnStyleValueIsNaN(name, value, owner);
  9924. }
  9925. };
  9926. }
  9927. /**
  9928. * Operations for dealing with CSS properties.
  9929. */
  9930. var CSSPropertyOperations = {
  9931. /**
  9932. * Serializes a mapping of style properties for use as inline styles:
  9933. *
  9934. * > createMarkupForStyles({width: '200px', height: 0})
  9935. * "width:200px;height:0;"
  9936. *
  9937. * Undefined values are ignored so that declarative programming is easier.
  9938. * The result should be HTML-escaped before insertion into the DOM.
  9939. *
  9940. * @param {object} styles
  9941. * @param {ReactDOMComponent} component
  9942. * @return {?string}
  9943. */
  9944. createMarkupForStyles: function (styles, component) {
  9945. var serialized = '';
  9946. for (var styleName in styles) {
  9947. if (!styles.hasOwnProperty(styleName)) {
  9948. continue;
  9949. }
  9950. var styleValue = styles[styleName];
  9951. if (process.env.NODE_ENV !== 'production') {
  9952. warnValidStyle(styleName, styleValue, component);
  9953. }
  9954. if (styleValue != null) {
  9955. serialized += processStyleName(styleName) + ':';
  9956. serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
  9957. }
  9958. }
  9959. return serialized || null;
  9960. },
  9961. /**
  9962. * Sets the value for multiple styles on a node. If a value is specified as
  9963. * '' (empty string), the corresponding style property will be unset.
  9964. *
  9965. * @param {DOMElement} node
  9966. * @param {object} styles
  9967. * @param {ReactDOMComponent} component
  9968. */
  9969. setValueForStyles: function (node, styles, component) {
  9970. if (process.env.NODE_ENV !== 'production') {
  9971. ReactInstrumentation.debugTool.onHostOperation({
  9972. instanceID: component._debugID,
  9973. type: 'update styles',
  9974. payload: styles
  9975. });
  9976. }
  9977. var style = node.style;
  9978. for (var styleName in styles) {
  9979. if (!styles.hasOwnProperty(styleName)) {
  9980. continue;
  9981. }
  9982. if (process.env.NODE_ENV !== 'production') {
  9983. warnValidStyle(styleName, styles[styleName], component);
  9984. }
  9985. var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
  9986. if (styleName === 'float' || styleName === 'cssFloat') {
  9987. styleName = styleFloatAccessor;
  9988. }
  9989. if (styleValue) {
  9990. style[styleName] = styleValue;
  9991. } else {
  9992. var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
  9993. if (expansion) {
  9994. // Shorthand property that IE8 won't like unsetting, so unset each
  9995. // component to placate it
  9996. for (var individualStyleName in expansion) {
  9997. style[individualStyleName] = '';
  9998. }
  9999. } else {
  10000. style[styleName] = '';
  10001. }
  10002. }
  10003. }
  10004. }
  10005. };
  10006. module.exports = CSSPropertyOperations;
  10007. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  10008. /***/ }),
  10009. /* 106 */
  10010. /***/ (function(module, exports, __webpack_require__) {
  10011. "use strict";
  10012. /**
  10013. * Copyright 2013-present, Facebook, Inc.
  10014. * All rights reserved.
  10015. *
  10016. * This source code is licensed under the BSD-style license found in the
  10017. * LICENSE file in the root directory of this source tree. An additional grant
  10018. * of patent rights can be found in the PATENTS file in the same directory.
  10019. *
  10020. */
  10021. var EventPluginHub = __webpack_require__(21);
  10022. var EventPropagators = __webpack_require__(22);
  10023. var ExecutionEnvironment = __webpack_require__(6);
  10024. var ReactDOMComponentTree = __webpack_require__(5);
  10025. var ReactUpdates = __webpack_require__(10);
  10026. var SyntheticEvent = __webpack_require__(12);
  10027. var getEventTarget = __webpack_require__(45);
  10028. var isEventSupported = __webpack_require__(46);
  10029. var isTextInputElement = __webpack_require__(74);
  10030. var eventTypes = {
  10031. change: {
  10032. phasedRegistrationNames: {
  10033. bubbled: 'onChange',
  10034. captured: 'onChangeCapture'
  10035. },
  10036. dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
  10037. }
  10038. };
  10039. /**
  10040. * For IE shims
  10041. */
  10042. var activeElement = null;
  10043. var activeElementInst = null;
  10044. var activeElementValue = null;
  10045. var activeElementValueProp = null;
  10046. /**
  10047. * SECTION: handle `change` event
  10048. */
  10049. function shouldUseChangeEvent(elem) {
  10050. var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
  10051. return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
  10052. }
  10053. var doesChangeEventBubble = false;
  10054. if (ExecutionEnvironment.canUseDOM) {
  10055. // See `handleChange` comment below
  10056. doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
  10057. }
  10058. function manualDispatchChangeEvent(nativeEvent) {
  10059. var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
  10060. EventPropagators.accumulateTwoPhaseDispatches(event);
  10061. // If change and propertychange bubbled, we'd just bind to it like all the
  10062. // other events and have it go through ReactBrowserEventEmitter. Since it
  10063. // doesn't, we manually listen for the events and so we have to enqueue and
  10064. // process the abstract event manually.
  10065. //
  10066. // Batching is necessary here in order to ensure that all event handlers run
  10067. // before the next rerender (including event handlers attached to ancestor
  10068. // elements instead of directly on the input). Without this, controlled
  10069. // components don't work properly in conjunction with event bubbling because
  10070. // the component is rerendered and the value reverted before all the event
  10071. // handlers can run. See https://github.com/facebook/react/issues/708.
  10072. ReactUpdates.batchedUpdates(runEventInBatch, event);
  10073. }
  10074. function runEventInBatch(event) {
  10075. EventPluginHub.enqueueEvents(event);
  10076. EventPluginHub.processEventQueue(false);
  10077. }
  10078. function startWatchingForChangeEventIE8(target, targetInst) {
  10079. activeElement = target;
  10080. activeElementInst = targetInst;
  10081. activeElement.attachEvent('onchange', manualDispatchChangeEvent);
  10082. }
  10083. function stopWatchingForChangeEventIE8() {
  10084. if (!activeElement) {
  10085. return;
  10086. }
  10087. activeElement.detachEvent('onchange', manualDispatchChangeEvent);
  10088. activeElement = null;
  10089. activeElementInst = null;
  10090. }
  10091. function getTargetInstForChangeEvent(topLevelType, targetInst) {
  10092. if (topLevelType === 'topChange') {
  10093. return targetInst;
  10094. }
  10095. }
  10096. function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
  10097. if (topLevelType === 'topFocus') {
  10098. // stopWatching() should be a noop here but we call it just in case we
  10099. // missed a blur event somehow.
  10100. stopWatchingForChangeEventIE8();
  10101. startWatchingForChangeEventIE8(target, targetInst);
  10102. } else if (topLevelType === 'topBlur') {
  10103. stopWatchingForChangeEventIE8();
  10104. }
  10105. }
  10106. /**
  10107. * SECTION: handle `input` event
  10108. */
  10109. var isInputEventSupported = false;
  10110. if (ExecutionEnvironment.canUseDOM) {
  10111. // IE9 claims to support the input event but fails to trigger it when
  10112. // deleting text, so we ignore its input events.
  10113. // IE10+ fire input events to often, such when a placeholder
  10114. // changes or when an input with a placeholder is focused.
  10115. isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
  10116. }
  10117. /**
  10118. * (For IE <=11) Replacement getter/setter for the `value` property that gets
  10119. * set on the active element.
  10120. */
  10121. var newValueProp = {
  10122. get: function () {
  10123. return activeElementValueProp.get.call(this);
  10124. },
  10125. set: function (val) {
  10126. // Cast to a string so we can do equality checks.
  10127. activeElementValue = '' + val;
  10128. activeElementValueProp.set.call(this, val);
  10129. }
  10130. };
  10131. /**
  10132. * (For IE <=11) Starts tracking propertychange events on the passed-in element
  10133. * and override the value property so that we can distinguish user events from
  10134. * value changes in JS.
  10135. */
  10136. function startWatchingForValueChange(target, targetInst) {
  10137. activeElement = target;
  10138. activeElementInst = targetInst;
  10139. activeElementValue = target.value;
  10140. activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
  10141. // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
  10142. // on DOM elements
  10143. Object.defineProperty(activeElement, 'value', newValueProp);
  10144. if (activeElement.attachEvent) {
  10145. activeElement.attachEvent('onpropertychange', handlePropertyChange);
  10146. } else {
  10147. activeElement.addEventListener('propertychange', handlePropertyChange, false);
  10148. }
  10149. }
  10150. /**
  10151. * (For IE <=11) Removes the event listeners from the currently-tracked element,
  10152. * if any exists.
  10153. */
  10154. function stopWatchingForValueChange() {
  10155. if (!activeElement) {
  10156. return;
  10157. }
  10158. // delete restores the original property definition
  10159. delete activeElement.value;
  10160. if (activeElement.detachEvent) {
  10161. activeElement.detachEvent('onpropertychange', handlePropertyChange);
  10162. } else {
  10163. activeElement.removeEventListener('propertychange', handlePropertyChange, false);
  10164. }
  10165. activeElement = null;
  10166. activeElementInst = null;
  10167. activeElementValue = null;
  10168. activeElementValueProp = null;
  10169. }
  10170. /**
  10171. * (For IE <=11) Handles a propertychange event, sending a `change` event if
  10172. * the value of the active element has changed.
  10173. */
  10174. function handlePropertyChange(nativeEvent) {
  10175. if (nativeEvent.propertyName !== 'value') {
  10176. return;
  10177. }
  10178. var value = nativeEvent.srcElement.value;
  10179. if (value === activeElementValue) {
  10180. return;
  10181. }
  10182. activeElementValue = value;
  10183. manualDispatchChangeEvent(nativeEvent);
  10184. }
  10185. /**
  10186. * If a `change` event should be fired, returns the target's ID.
  10187. */
  10188. function getTargetInstForInputEvent(topLevelType, targetInst) {
  10189. if (topLevelType === 'topInput') {
  10190. // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
  10191. // what we want so fall through here and trigger an abstract event
  10192. return targetInst;
  10193. }
  10194. }
  10195. function handleEventsForInputEventIE(topLevelType, target, targetInst) {
  10196. if (topLevelType === 'topFocus') {
  10197. // In IE8, we can capture almost all .value changes by adding a
  10198. // propertychange handler and looking for events with propertyName
  10199. // equal to 'value'
  10200. // In IE9-11, propertychange fires for most input events but is buggy and
  10201. // doesn't fire when text is deleted, but conveniently, selectionchange
  10202. // appears to fire in all of the remaining cases so we catch those and
  10203. // forward the event if the value has changed
  10204. // In either case, we don't want to call the event handler if the value
  10205. // is changed from JS so we redefine a setter for `.value` that updates
  10206. // our activeElementValue variable, allowing us to ignore those changes
  10207. //
  10208. // stopWatching() should be a noop here but we call it just in case we
  10209. // missed a blur event somehow.
  10210. stopWatchingForValueChange();
  10211. startWatchingForValueChange(target, targetInst);
  10212. } else if (topLevelType === 'topBlur') {
  10213. stopWatchingForValueChange();
  10214. }
  10215. }
  10216. // For IE8 and IE9.
  10217. function getTargetInstForInputEventIE(topLevelType, targetInst) {
  10218. if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
  10219. // On the selectionchange event, the target is just document which isn't
  10220. // helpful for us so just check activeElement instead.
  10221. //
  10222. // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
  10223. // propertychange on the first input event after setting `value` from a
  10224. // script and fires only keydown, keypress, keyup. Catching keyup usually
  10225. // gets it and catching keydown lets us fire an event for the first
  10226. // keystroke if user does a key repeat (it'll be a little delayed: right
  10227. // before the second keystroke). Other input methods (e.g., paste) seem to
  10228. // fire selectionchange normally.
  10229. if (activeElement && activeElement.value !== activeElementValue) {
  10230. activeElementValue = activeElement.value;
  10231. return activeElementInst;
  10232. }
  10233. }
  10234. }
  10235. /**
  10236. * SECTION: handle `click` event
  10237. */
  10238. function shouldUseClickEvent(elem) {
  10239. // Use the `click` event to detect changes to checkbox and radio inputs.
  10240. // This approach works across all browsers, whereas `change` does not fire
  10241. // until `blur` in IE8.
  10242. return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
  10243. }
  10244. function getTargetInstForClickEvent(topLevelType, targetInst) {
  10245. if (topLevelType === 'topClick') {
  10246. return targetInst;
  10247. }
  10248. }
  10249. function handleControlledInputBlur(inst, node) {
  10250. // TODO: In IE, inst is occasionally null. Why?
  10251. if (inst == null) {
  10252. return;
  10253. }
  10254. // Fiber and ReactDOM keep wrapper state in separate places
  10255. var state = inst._wrapperState || node._wrapperState;
  10256. if (!state || !state.controlled || node.type !== 'number') {
  10257. return;
  10258. }
  10259. // If controlled, assign the value attribute to the current value on blur
  10260. var value = '' + node.value;
  10261. if (node.getAttribute('value') !== value) {
  10262. node.setAttribute('value', value);
  10263. }
  10264. }
  10265. /**
  10266. * This plugin creates an `onChange` event that normalizes change events
  10267. * across form elements. This event fires at a time when it's possible to
  10268. * change the element's value without seeing a flicker.
  10269. *
  10270. * Supported elements are:
  10271. * - input (see `isTextInputElement`)
  10272. * - textarea
  10273. * - select
  10274. */
  10275. var ChangeEventPlugin = {
  10276. eventTypes: eventTypes,
  10277. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  10278. var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
  10279. var getTargetInstFunc, handleEventFunc;
  10280. if (shouldUseChangeEvent(targetNode)) {
  10281. if (doesChangeEventBubble) {
  10282. getTargetInstFunc = getTargetInstForChangeEvent;
  10283. } else {
  10284. handleEventFunc = handleEventsForChangeEventIE8;
  10285. }
  10286. } else if (isTextInputElement(targetNode)) {
  10287. if (isInputEventSupported) {
  10288. getTargetInstFunc = getTargetInstForInputEvent;
  10289. } else {
  10290. getTargetInstFunc = getTargetInstForInputEventIE;
  10291. handleEventFunc = handleEventsForInputEventIE;
  10292. }
  10293. } else if (shouldUseClickEvent(targetNode)) {
  10294. getTargetInstFunc = getTargetInstForClickEvent;
  10295. }
  10296. if (getTargetInstFunc) {
  10297. var inst = getTargetInstFunc(topLevelType, targetInst);
  10298. if (inst) {
  10299. var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
  10300. event.type = 'change';
  10301. EventPropagators.accumulateTwoPhaseDispatches(event);
  10302. return event;
  10303. }
  10304. }
  10305. if (handleEventFunc) {
  10306. handleEventFunc(topLevelType, targetNode, targetInst);
  10307. }
  10308. // When blurring, set the value attribute for number inputs
  10309. if (topLevelType === 'topBlur') {
  10310. handleControlledInputBlur(targetInst, targetNode);
  10311. }
  10312. }
  10313. };
  10314. module.exports = ChangeEventPlugin;
  10315. /***/ }),
  10316. /* 107 */
  10317. /***/ (function(module, exports, __webpack_require__) {
  10318. "use strict";
  10319. /* WEBPACK VAR INJECTION */(function(process) {/**
  10320. * Copyright 2013-present, Facebook, Inc.
  10321. * All rights reserved.
  10322. *
  10323. * This source code is licensed under the BSD-style license found in the
  10324. * LICENSE file in the root directory of this source tree. An additional grant
  10325. * of patent rights can be found in the PATENTS file in the same directory.
  10326. *
  10327. */
  10328. var _prodInvariant = __webpack_require__(3);
  10329. var DOMLazyTree = __webpack_require__(17);
  10330. var ExecutionEnvironment = __webpack_require__(6);
  10331. var createNodesFromMarkup = __webpack_require__(90);
  10332. var emptyFunction = __webpack_require__(9);
  10333. var invariant = __webpack_require__(1);
  10334. var Danger = {
  10335. /**
  10336. * Replaces a node with a string of markup at its current position within its
  10337. * parent. The markup must render into a single root node.
  10338. *
  10339. * @param {DOMElement} oldChild Child node to replace.
  10340. * @param {string} markup Markup to render in place of the child node.
  10341. * @internal
  10342. */
  10343. dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
  10344. !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
  10345. !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
  10346. !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
  10347. if (typeof markup === 'string') {
  10348. var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
  10349. oldChild.parentNode.replaceChild(newChild, oldChild);
  10350. } else {
  10351. DOMLazyTree.replaceChildWithTree(oldChild, markup);
  10352. }
  10353. }
  10354. };
  10355. module.exports = Danger;
  10356. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  10357. /***/ }),
  10358. /* 108 */
  10359. /***/ (function(module, exports, __webpack_require__) {
  10360. "use strict";
  10361. /**
  10362. * Copyright 2013-present, Facebook, Inc.
  10363. * All rights reserved.
  10364. *
  10365. * This source code is licensed under the BSD-style license found in the
  10366. * LICENSE file in the root directory of this source tree. An additional grant
  10367. * of patent rights can be found in the PATENTS file in the same directory.
  10368. *
  10369. */
  10370. /**
  10371. * Module that is injectable into `EventPluginHub`, that specifies a
  10372. * deterministic ordering of `EventPlugin`s. A convenient way to reason about
  10373. * plugins, without having to package every one of them. This is better than
  10374. * having plugins be ordered in the same order that they are injected because
  10375. * that ordering would be influenced by the packaging order.
  10376. * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
  10377. * preventing default on events is convenient in `SimpleEventPlugin` handlers.
  10378. */
  10379. var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
  10380. module.exports = DefaultEventPluginOrder;
  10381. /***/ }),
  10382. /* 109 */
  10383. /***/ (function(module, exports, __webpack_require__) {
  10384. "use strict";
  10385. /**
  10386. * Copyright 2013-present, Facebook, Inc.
  10387. * All rights reserved.
  10388. *
  10389. * This source code is licensed under the BSD-style license found in the
  10390. * LICENSE file in the root directory of this source tree. An additional grant
  10391. * of patent rights can be found in the PATENTS file in the same directory.
  10392. *
  10393. */
  10394. var EventPropagators = __webpack_require__(22);
  10395. var ReactDOMComponentTree = __webpack_require__(5);
  10396. var SyntheticMouseEvent = __webpack_require__(27);
  10397. var eventTypes = {
  10398. mouseEnter: {
  10399. registrationName: 'onMouseEnter',
  10400. dependencies: ['topMouseOut', 'topMouseOver']
  10401. },
  10402. mouseLeave: {
  10403. registrationName: 'onMouseLeave',
  10404. dependencies: ['topMouseOut', 'topMouseOver']
  10405. }
  10406. };
  10407. var EnterLeaveEventPlugin = {
  10408. eventTypes: eventTypes,
  10409. /**
  10410. * For almost every interaction we care about, there will be both a top-level
  10411. * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
  10412. * we do not extract duplicate events. However, moving the mouse into the
  10413. * browser from outside will not fire a `mouseout` event. In this case, we use
  10414. * the `mouseover` top-level event.
  10415. */
  10416. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  10417. if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
  10418. return null;
  10419. }
  10420. if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
  10421. // Must not be a mouse in or mouse out - ignoring.
  10422. return null;
  10423. }
  10424. var win;
  10425. if (nativeEventTarget.window === nativeEventTarget) {
  10426. // `nativeEventTarget` is probably a window object.
  10427. win = nativeEventTarget;
  10428. } else {
  10429. // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
  10430. var doc = nativeEventTarget.ownerDocument;
  10431. if (doc) {
  10432. win = doc.defaultView || doc.parentWindow;
  10433. } else {
  10434. win = window;
  10435. }
  10436. }
  10437. var from;
  10438. var to;
  10439. if (topLevelType === 'topMouseOut') {
  10440. from = targetInst;
  10441. var related = nativeEvent.relatedTarget || nativeEvent.toElement;
  10442. to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
  10443. } else {
  10444. // Moving to a node from outside the window.
  10445. from = null;
  10446. to = targetInst;
  10447. }
  10448. if (from === to) {
  10449. // Nothing pertains to our managed components.
  10450. return null;
  10451. }
  10452. var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
  10453. var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
  10454. var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
  10455. leave.type = 'mouseleave';
  10456. leave.target = fromNode;
  10457. leave.relatedTarget = toNode;
  10458. var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
  10459. enter.type = 'mouseenter';
  10460. enter.target = toNode;
  10461. enter.relatedTarget = fromNode;
  10462. EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
  10463. return [leave, enter];
  10464. }
  10465. };
  10466. module.exports = EnterLeaveEventPlugin;
  10467. /***/ }),
  10468. /* 110 */
  10469. /***/ (function(module, exports, __webpack_require__) {
  10470. "use strict";
  10471. /**
  10472. * Copyright 2013-present, Facebook, Inc.
  10473. * All rights reserved.
  10474. *
  10475. * This source code is licensed under the BSD-style license found in the
  10476. * LICENSE file in the root directory of this source tree. An additional grant
  10477. * of patent rights can be found in the PATENTS file in the same directory.
  10478. *
  10479. */
  10480. var _assign = __webpack_require__(4);
  10481. var PooledClass = __webpack_require__(14);
  10482. var getTextContentAccessor = __webpack_require__(72);
  10483. /**
  10484. * This helper class stores information about text content of a target node,
  10485. * allowing comparison of content before and after a given event.
  10486. *
  10487. * Identify the node where selection currently begins, then observe
  10488. * both its text content and its current position in the DOM. Since the
  10489. * browser may natively replace the target node during composition, we can
  10490. * use its position to find its replacement.
  10491. *
  10492. * @param {DOMEventTarget} root
  10493. */
  10494. function FallbackCompositionState(root) {
  10495. this._root = root;
  10496. this._startText = this.getText();
  10497. this._fallbackText = null;
  10498. }
  10499. _assign(FallbackCompositionState.prototype, {
  10500. destructor: function () {
  10501. this._root = null;
  10502. this._startText = null;
  10503. this._fallbackText = null;
  10504. },
  10505. /**
  10506. * Get current text of input.
  10507. *
  10508. * @return {string}
  10509. */
  10510. getText: function () {
  10511. if ('value' in this._root) {
  10512. return this._root.value;
  10513. }
  10514. return this._root[getTextContentAccessor()];
  10515. },
  10516. /**
  10517. * Determine the differing substring between the initially stored
  10518. * text content and the current content.
  10519. *
  10520. * @return {string}
  10521. */
  10522. getData: function () {
  10523. if (this._fallbackText) {
  10524. return this._fallbackText;
  10525. }
  10526. var start;
  10527. var startValue = this._startText;
  10528. var startLength = startValue.length;
  10529. var end;
  10530. var endValue = this.getText();
  10531. var endLength = endValue.length;
  10532. for (start = 0; start < startLength; start++) {
  10533. if (startValue[start] !== endValue[start]) {
  10534. break;
  10535. }
  10536. }
  10537. var minEnd = startLength - start;
  10538. for (end = 1; end <= minEnd; end++) {
  10539. if (startValue[startLength - end] !== endValue[endLength - end]) {
  10540. break;
  10541. }
  10542. }
  10543. var sliceTail = end > 1 ? 1 - end : undefined;
  10544. this._fallbackText = endValue.slice(start, sliceTail);
  10545. return this._fallbackText;
  10546. }
  10547. });
  10548. PooledClass.addPoolingTo(FallbackCompositionState);
  10549. module.exports = FallbackCompositionState;
  10550. /***/ }),
  10551. /* 111 */
  10552. /***/ (function(module, exports, __webpack_require__) {
  10553. "use strict";
  10554. /**
  10555. * Copyright 2013-present, Facebook, Inc.
  10556. * All rights reserved.
  10557. *
  10558. * This source code is licensed under the BSD-style license found in the
  10559. * LICENSE file in the root directory of this source tree. An additional grant
  10560. * of patent rights can be found in the PATENTS file in the same directory.
  10561. *
  10562. */
  10563. var DOMProperty = __webpack_require__(13);
  10564. var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
  10565. var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
  10566. var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
  10567. var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
  10568. var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
  10569. var HTMLDOMPropertyConfig = {
  10570. isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
  10571. Properties: {
  10572. /**
  10573. * Standard Properties
  10574. */
  10575. accept: 0,
  10576. acceptCharset: 0,
  10577. accessKey: 0,
  10578. action: 0,
  10579. allowFullScreen: HAS_BOOLEAN_VALUE,
  10580. allowTransparency: 0,
  10581. alt: 0,
  10582. // specifies target context for links with `preload` type
  10583. as: 0,
  10584. async: HAS_BOOLEAN_VALUE,
  10585. autoComplete: 0,
  10586. // autoFocus is polyfilled/normalized by AutoFocusUtils
  10587. // autoFocus: HAS_BOOLEAN_VALUE,
  10588. autoPlay: HAS_BOOLEAN_VALUE,
  10589. capture: HAS_BOOLEAN_VALUE,
  10590. cellPadding: 0,
  10591. cellSpacing: 0,
  10592. charSet: 0,
  10593. challenge: 0,
  10594. checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
  10595. cite: 0,
  10596. classID: 0,
  10597. className: 0,
  10598. cols: HAS_POSITIVE_NUMERIC_VALUE,
  10599. colSpan: 0,
  10600. content: 0,
  10601. contentEditable: 0,
  10602. contextMenu: 0,
  10603. controls: HAS_BOOLEAN_VALUE,
  10604. coords: 0,
  10605. crossOrigin: 0,
  10606. data: 0, // For `<object />` acts as `src`.
  10607. dateTime: 0,
  10608. 'default': HAS_BOOLEAN_VALUE,
  10609. defer: HAS_BOOLEAN_VALUE,
  10610. dir: 0,
  10611. disabled: HAS_BOOLEAN_VALUE,
  10612. download: HAS_OVERLOADED_BOOLEAN_VALUE,
  10613. draggable: 0,
  10614. encType: 0,
  10615. form: 0,
  10616. formAction: 0,
  10617. formEncType: 0,
  10618. formMethod: 0,
  10619. formNoValidate: HAS_BOOLEAN_VALUE,
  10620. formTarget: 0,
  10621. frameBorder: 0,
  10622. headers: 0,
  10623. height: 0,
  10624. hidden: HAS_BOOLEAN_VALUE,
  10625. high: 0,
  10626. href: 0,
  10627. hrefLang: 0,
  10628. htmlFor: 0,
  10629. httpEquiv: 0,
  10630. icon: 0,
  10631. id: 0,
  10632. inputMode: 0,
  10633. integrity: 0,
  10634. is: 0,
  10635. keyParams: 0,
  10636. keyType: 0,
  10637. kind: 0,
  10638. label: 0,
  10639. lang: 0,
  10640. list: 0,
  10641. loop: HAS_BOOLEAN_VALUE,
  10642. low: 0,
  10643. manifest: 0,
  10644. marginHeight: 0,
  10645. marginWidth: 0,
  10646. max: 0,
  10647. maxLength: 0,
  10648. media: 0,
  10649. mediaGroup: 0,
  10650. method: 0,
  10651. min: 0,
  10652. minLength: 0,
  10653. // Caution; `option.selected` is not updated if `select.multiple` is
  10654. // disabled with `removeAttribute`.
  10655. multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
  10656. muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
  10657. name: 0,
  10658. nonce: 0,
  10659. noValidate: HAS_BOOLEAN_VALUE,
  10660. open: HAS_BOOLEAN_VALUE,
  10661. optimum: 0,
  10662. pattern: 0,
  10663. placeholder: 0,
  10664. playsInline: HAS_BOOLEAN_VALUE,
  10665. poster: 0,
  10666. preload: 0,
  10667. profile: 0,
  10668. radioGroup: 0,
  10669. readOnly: HAS_BOOLEAN_VALUE,
  10670. referrerPolicy: 0,
  10671. rel: 0,
  10672. required: HAS_BOOLEAN_VALUE,
  10673. reversed: HAS_BOOLEAN_VALUE,
  10674. role: 0,
  10675. rows: HAS_POSITIVE_NUMERIC_VALUE,
  10676. rowSpan: HAS_NUMERIC_VALUE,
  10677. sandbox: 0,
  10678. scope: 0,
  10679. scoped: HAS_BOOLEAN_VALUE,
  10680. scrolling: 0,
  10681. seamless: HAS_BOOLEAN_VALUE,
  10682. selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
  10683. shape: 0,
  10684. size: HAS_POSITIVE_NUMERIC_VALUE,
  10685. sizes: 0,
  10686. span: HAS_POSITIVE_NUMERIC_VALUE,
  10687. spellCheck: 0,
  10688. src: 0,
  10689. srcDoc: 0,
  10690. srcLang: 0,
  10691. srcSet: 0,
  10692. start: HAS_NUMERIC_VALUE,
  10693. step: 0,
  10694. style: 0,
  10695. summary: 0,
  10696. tabIndex: 0,
  10697. target: 0,
  10698. title: 0,
  10699. // Setting .type throws on non-<input> tags
  10700. type: 0,
  10701. useMap: 0,
  10702. value: 0,
  10703. width: 0,
  10704. wmode: 0,
  10705. wrap: 0,
  10706. /**
  10707. * RDFa Properties
  10708. */
  10709. about: 0,
  10710. datatype: 0,
  10711. inlist: 0,
  10712. prefix: 0,
  10713. // property is also supported for OpenGraph in meta tags.
  10714. property: 0,
  10715. resource: 0,
  10716. 'typeof': 0,
  10717. vocab: 0,
  10718. /**
  10719. * Non-standard Properties
  10720. */
  10721. // autoCapitalize and autoCorrect are supported in Mobile Safari for
  10722. // keyboard hints.
  10723. autoCapitalize: 0,
  10724. autoCorrect: 0,
  10725. // autoSave allows WebKit/Blink to persist values of input fields on page reloads
  10726. autoSave: 0,
  10727. // color is for Safari mask-icon link
  10728. color: 0,
  10729. // itemProp, itemScope, itemType are for
  10730. // Microdata support. See http://schema.org/docs/gs.html
  10731. itemProp: 0,
  10732. itemScope: HAS_BOOLEAN_VALUE,
  10733. itemType: 0,
  10734. // itemID and itemRef are for Microdata support as well but
  10735. // only specified in the WHATWG spec document. See
  10736. // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
  10737. itemID: 0,
  10738. itemRef: 0,
  10739. // results show looking glass icon and recent searches on input
  10740. // search fields in WebKit/Blink
  10741. results: 0,
  10742. // IE-only attribute that specifies security restrictions on an iframe
  10743. // as an alternative to the sandbox attribute on IE<10
  10744. security: 0,
  10745. // IE-only attribute that controls focus behavior
  10746. unselectable: 0
  10747. },
  10748. DOMAttributeNames: {
  10749. acceptCharset: 'accept-charset',
  10750. className: 'class',
  10751. htmlFor: 'for',
  10752. httpEquiv: 'http-equiv'
  10753. },
  10754. DOMPropertyNames: {},
  10755. DOMMutationMethods: {
  10756. value: function (node, value) {
  10757. if (value == null) {
  10758. return node.removeAttribute('value');
  10759. }
  10760. // Number inputs get special treatment due to some edge cases in
  10761. // Chrome. Let everything else assign the value attribute as normal.
  10762. // https://github.com/facebook/react/issues/7253#issuecomment-236074326
  10763. if (node.type !== 'number' || node.hasAttribute('value') === false) {
  10764. node.setAttribute('value', '' + value);
  10765. } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
  10766. // Don't assign an attribute if validation reports bad
  10767. // input. Chrome will clear the value. Additionally, don't
  10768. // operate on inputs that have focus, otherwise Chrome might
  10769. // strip off trailing decimal places and cause the user's
  10770. // cursor position to jump to the beginning of the input.
  10771. //
  10772. // In ReactDOMInput, we have an onBlur event that will trigger
  10773. // this function again when focus is lost.
  10774. node.setAttribute('value', '' + value);
  10775. }
  10776. }
  10777. }
  10778. };
  10779. module.exports = HTMLDOMPropertyConfig;
  10780. /***/ }),
  10781. /* 112 */
  10782. /***/ (function(module, exports, __webpack_require__) {
  10783. "use strict";
  10784. /* WEBPACK VAR INJECTION */(function(process) {/**
  10785. * Copyright 2014-present, Facebook, Inc.
  10786. * All rights reserved.
  10787. *
  10788. * This source code is licensed under the BSD-style license found in the
  10789. * LICENSE file in the root directory of this source tree. An additional grant
  10790. * of patent rights can be found in the PATENTS file in the same directory.
  10791. *
  10792. */
  10793. var ReactReconciler = __webpack_require__(18);
  10794. var instantiateReactComponent = __webpack_require__(73);
  10795. var KeyEscapeUtils = __webpack_require__(37);
  10796. var shouldUpdateReactComponent = __webpack_require__(47);
  10797. var traverseAllChildren = __webpack_require__(76);
  10798. var warning = __webpack_require__(2);
  10799. var ReactComponentTreeHook;
  10800. if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
  10801. // Temporary hack.
  10802. // Inline requires don't work well with Jest:
  10803. // https://github.com/facebook/react/issues/7240
  10804. // Remove the inline requires when we don't need them anymore:
  10805. // https://github.com/facebook/react/pull/7178
  10806. ReactComponentTreeHook = __webpack_require__(7);
  10807. }
  10808. function instantiateChild(childInstances, child, name, selfDebugID) {
  10809. // We found a component instance.
  10810. var keyUnique = childInstances[name] === undefined;
  10811. if (process.env.NODE_ENV !== 'production') {
  10812. if (!ReactComponentTreeHook) {
  10813. ReactComponentTreeHook = __webpack_require__(7);
  10814. }
  10815. if (!keyUnique) {
  10816. process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
  10817. }
  10818. }
  10819. if (child != null && keyUnique) {
  10820. childInstances[name] = instantiateReactComponent(child, true);
  10821. }
  10822. }
  10823. /**
  10824. * ReactChildReconciler provides helpers for initializing or updating a set of
  10825. * children. Its output is suitable for passing it onto ReactMultiChild which
  10826. * does diffed reordering and insertion.
  10827. */
  10828. var ReactChildReconciler = {
  10829. /**
  10830. * Generates a "mount image" for each of the supplied children. In the case
  10831. * of `ReactDOMComponent`, a mount image is a string of markup.
  10832. *
  10833. * @param {?object} nestedChildNodes Nested child maps.
  10834. * @return {?object} A set of child instances.
  10835. * @internal
  10836. */
  10837. instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
  10838. ) {
  10839. if (nestedChildNodes == null) {
  10840. return null;
  10841. }
  10842. var childInstances = {};
  10843. if (process.env.NODE_ENV !== 'production') {
  10844. traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
  10845. return instantiateChild(childInsts, child, name, selfDebugID);
  10846. }, childInstances);
  10847. } else {
  10848. traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
  10849. }
  10850. return childInstances;
  10851. },
  10852. /**
  10853. * Updates the rendered children and returns a new set of children.
  10854. *
  10855. * @param {?object} prevChildren Previously initialized set of children.
  10856. * @param {?object} nextChildren Flat child element maps.
  10857. * @param {ReactReconcileTransaction} transaction
  10858. * @param {object} context
  10859. * @return {?object} A new set of child instances.
  10860. * @internal
  10861. */
  10862. updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
  10863. ) {
  10864. // We currently don't have a way to track moves here but if we use iterators
  10865. // instead of for..in we can zip the iterators and check if an item has
  10866. // moved.
  10867. // TODO: If nothing has changed, return the prevChildren object so that we
  10868. // can quickly bailout if nothing has changed.
  10869. if (!nextChildren && !prevChildren) {
  10870. return;
  10871. }
  10872. var name;
  10873. var prevChild;
  10874. for (name in nextChildren) {
  10875. if (!nextChildren.hasOwnProperty(name)) {
  10876. continue;
  10877. }
  10878. prevChild = prevChildren && prevChildren[name];
  10879. var prevElement = prevChild && prevChild._currentElement;
  10880. var nextElement = nextChildren[name];
  10881. if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
  10882. ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
  10883. nextChildren[name] = prevChild;
  10884. } else {
  10885. if (prevChild) {
  10886. removedNodes[name] = ReactReconciler.getHostNode(prevChild);
  10887. ReactReconciler.unmountComponent(prevChild, false);
  10888. }
  10889. // The child must be instantiated before it's mounted.
  10890. var nextChildInstance = instantiateReactComponent(nextElement, true);
  10891. nextChildren[name] = nextChildInstance;
  10892. // Creating mount image now ensures refs are resolved in right order
  10893. // (see https://github.com/facebook/react/pull/7101 for explanation).
  10894. var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
  10895. mountImages.push(nextChildMountImage);
  10896. }
  10897. }
  10898. // Unmount children that are no longer present.
  10899. for (name in prevChildren) {
  10900. if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
  10901. prevChild = prevChildren[name];
  10902. removedNodes[name] = ReactReconciler.getHostNode(prevChild);
  10903. ReactReconciler.unmountComponent(prevChild, false);
  10904. }
  10905. }
  10906. },
  10907. /**
  10908. * Unmounts all rendered children. This should be used to clean up children
  10909. * when this component is unmounted.
  10910. *
  10911. * @param {?object} renderedChildren Previously initialized set of children.
  10912. * @internal
  10913. */
  10914. unmountChildren: function (renderedChildren, safely) {
  10915. for (var name in renderedChildren) {
  10916. if (renderedChildren.hasOwnProperty(name)) {
  10917. var renderedChild = renderedChildren[name];
  10918. ReactReconciler.unmountComponent(renderedChild, safely);
  10919. }
  10920. }
  10921. }
  10922. };
  10923. module.exports = ReactChildReconciler;
  10924. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  10925. /***/ }),
  10926. /* 113 */
  10927. /***/ (function(module, exports, __webpack_require__) {
  10928. "use strict";
  10929. /**
  10930. * Copyright 2013-present, Facebook, Inc.
  10931. * All rights reserved.
  10932. *
  10933. * This source code is licensed under the BSD-style license found in the
  10934. * LICENSE file in the root directory of this source tree. An additional grant
  10935. * of patent rights can be found in the PATENTS file in the same directory.
  10936. *
  10937. */
  10938. var DOMChildrenOperations = __webpack_require__(34);
  10939. var ReactDOMIDOperations = __webpack_require__(120);
  10940. /**
  10941. * Abstracts away all functionality of the reconciler that requires knowledge of
  10942. * the browser context. TODO: These callers should be refactored to avoid the
  10943. * need for this injection.
  10944. */
  10945. var ReactComponentBrowserEnvironment = {
  10946. processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
  10947. replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
  10948. };
  10949. module.exports = ReactComponentBrowserEnvironment;
  10950. /***/ }),
  10951. /* 114 */
  10952. /***/ (function(module, exports, __webpack_require__) {
  10953. "use strict";
  10954. /* WEBPACK VAR INJECTION */(function(process) {/**
  10955. * Copyright 2013-present, Facebook, Inc.
  10956. * All rights reserved.
  10957. *
  10958. * This source code is licensed under the BSD-style license found in the
  10959. * LICENSE file in the root directory of this source tree. An additional grant
  10960. * of patent rights can be found in the PATENTS file in the same directory.
  10961. *
  10962. */
  10963. var _prodInvariant = __webpack_require__(3),
  10964. _assign = __webpack_require__(4);
  10965. var React = __webpack_require__(19);
  10966. var ReactComponentEnvironment = __webpack_require__(39);
  10967. var ReactCurrentOwner = __webpack_require__(11);
  10968. var ReactErrorUtils = __webpack_require__(40);
  10969. var ReactInstanceMap = __webpack_require__(23);
  10970. var ReactInstrumentation = __webpack_require__(8);
  10971. var ReactNodeTypes = __webpack_require__(66);
  10972. var ReactReconciler = __webpack_require__(18);
  10973. if (process.env.NODE_ENV !== 'production') {
  10974. var checkReactTypeSpec = __webpack_require__(162);
  10975. }
  10976. var emptyObject = __webpack_require__(20);
  10977. var invariant = __webpack_require__(1);
  10978. var shallowEqual = __webpack_require__(33);
  10979. var shouldUpdateReactComponent = __webpack_require__(47);
  10980. var warning = __webpack_require__(2);
  10981. var CompositeTypes = {
  10982. ImpureClass: 0,
  10983. PureClass: 1,
  10984. StatelessFunctional: 2
  10985. };
  10986. function StatelessComponent(Component) {}
  10987. StatelessComponent.prototype.render = function () {
  10988. var Component = ReactInstanceMap.get(this)._currentElement.type;
  10989. var element = Component(this.props, this.context, this.updater);
  10990. warnIfInvalidElement(Component, element);
  10991. return element;
  10992. };
  10993. function warnIfInvalidElement(Component, element) {
  10994. if (process.env.NODE_ENV !== 'production') {
  10995. process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
  10996. process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
  10997. }
  10998. }
  10999. function shouldConstruct(Component) {
  11000. return !!(Component.prototype && Component.prototype.isReactComponent);
  11001. }
  11002. function isPureComponent(Component) {
  11003. return !!(Component.prototype && Component.prototype.isPureReactComponent);
  11004. }
  11005. // Separated into a function to contain deoptimizations caused by try/finally.
  11006. function measureLifeCyclePerf(fn, debugID, timerType) {
  11007. if (debugID === 0) {
  11008. // Top-level wrappers (see ReactMount) and empty components (see
  11009. // ReactDOMEmptyComponent) are invisible to hooks and devtools.
  11010. // Both are implementation details that should go away in the future.
  11011. return fn();
  11012. }
  11013. ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
  11014. try {
  11015. return fn();
  11016. } finally {
  11017. ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
  11018. }
  11019. }
  11020. /**
  11021. * ------------------ The Life-Cycle of a Composite Component ------------------
  11022. *
  11023. * - constructor: Initialization of state. The instance is now retained.
  11024. * - componentWillMount
  11025. * - render
  11026. * - [children's constructors]
  11027. * - [children's componentWillMount and render]
  11028. * - [children's componentDidMount]
  11029. * - componentDidMount
  11030. *
  11031. * Update Phases:
  11032. * - componentWillReceiveProps (only called if parent updated)
  11033. * - shouldComponentUpdate
  11034. * - componentWillUpdate
  11035. * - render
  11036. * - [children's constructors or receive props phases]
  11037. * - componentDidUpdate
  11038. *
  11039. * - componentWillUnmount
  11040. * - [children's componentWillUnmount]
  11041. * - [children destroyed]
  11042. * - (destroyed): The instance is now blank, released by React and ready for GC.
  11043. *
  11044. * -----------------------------------------------------------------------------
  11045. */
  11046. /**
  11047. * An incrementing ID assigned to each component when it is mounted. This is
  11048. * used to enforce the order in which `ReactUpdates` updates dirty components.
  11049. *
  11050. * @private
  11051. */
  11052. var nextMountID = 1;
  11053. /**
  11054. * @lends {ReactCompositeComponent.prototype}
  11055. */
  11056. var ReactCompositeComponent = {
  11057. /**
  11058. * Base constructor for all composite component.
  11059. *
  11060. * @param {ReactElement} element
  11061. * @final
  11062. * @internal
  11063. */
  11064. construct: function (element) {
  11065. this._currentElement = element;
  11066. this._rootNodeID = 0;
  11067. this._compositeType = null;
  11068. this._instance = null;
  11069. this._hostParent = null;
  11070. this._hostContainerInfo = null;
  11071. // See ReactUpdateQueue
  11072. this._updateBatchNumber = null;
  11073. this._pendingElement = null;
  11074. this._pendingStateQueue = null;
  11075. this._pendingReplaceState = false;
  11076. this._pendingForceUpdate = false;
  11077. this._renderedNodeType = null;
  11078. this._renderedComponent = null;
  11079. this._context = null;
  11080. this._mountOrder = 0;
  11081. this._topLevelWrapper = null;
  11082. // See ReactUpdates and ReactUpdateQueue.
  11083. this._pendingCallbacks = null;
  11084. // ComponentWillUnmount shall only be called once
  11085. this._calledComponentWillUnmount = false;
  11086. if (process.env.NODE_ENV !== 'production') {
  11087. this._warnedAboutRefsInRender = false;
  11088. }
  11089. },
  11090. /**
  11091. * Initializes the component, renders markup, and registers event listeners.
  11092. *
  11093. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
  11094. * @param {?object} hostParent
  11095. * @param {?object} hostContainerInfo
  11096. * @param {?object} context
  11097. * @return {?string} Rendered markup to be inserted into the DOM.
  11098. * @final
  11099. * @internal
  11100. */
  11101. mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
  11102. var _this = this;
  11103. this._context = context;
  11104. this._mountOrder = nextMountID++;
  11105. this._hostParent = hostParent;
  11106. this._hostContainerInfo = hostContainerInfo;
  11107. var publicProps = this._currentElement.props;
  11108. var publicContext = this._processContext(context);
  11109. var Component = this._currentElement.type;
  11110. var updateQueue = transaction.getUpdateQueue();
  11111. // Initialize the public class
  11112. var doConstruct = shouldConstruct(Component);
  11113. var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
  11114. var renderedElement;
  11115. // Support functional components
  11116. if (!doConstruct && (inst == null || inst.render == null)) {
  11117. renderedElement = inst;
  11118. warnIfInvalidElement(Component, renderedElement);
  11119. !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;
  11120. inst = new StatelessComponent(Component);
  11121. this._compositeType = CompositeTypes.StatelessFunctional;
  11122. } else {
  11123. if (isPureComponent(Component)) {
  11124. this._compositeType = CompositeTypes.PureClass;
  11125. } else {
  11126. this._compositeType = CompositeTypes.ImpureClass;
  11127. }
  11128. }
  11129. if (process.env.NODE_ENV !== 'production') {
  11130. // This will throw later in _renderValidatedComponent, but add an early
  11131. // warning now to help debugging
  11132. if (inst.render == null) {
  11133. process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
  11134. }
  11135. var propsMutated = inst.props !== publicProps;
  11136. var componentName = Component.displayName || Component.name || 'Component';
  11137. process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
  11138. }
  11139. // These should be set up in the constructor, but as a convenience for
  11140. // simpler class abstractions, we set them up after the fact.
  11141. inst.props = publicProps;
  11142. inst.context = publicContext;
  11143. inst.refs = emptyObject;
  11144. inst.updater = updateQueue;
  11145. this._instance = inst;
  11146. // Store a reference from the instance back to the internal representation
  11147. ReactInstanceMap.set(inst, this);
  11148. if (process.env.NODE_ENV !== 'production') {
  11149. // Since plain JS classes are defined without any special initialization
  11150. // logic, we can not catch common errors early. Therefore, we have to
  11151. // catch them here, at initialization time, instead.
  11152. process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
  11153. process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
  11154. process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
  11155. process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
  11156. process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;
  11157. process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
  11158. process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
  11159. }
  11160. var initialState = inst.state;
  11161. if (initialState === undefined) {
  11162. inst.state = initialState = null;
  11163. }
  11164. !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
  11165. this._pendingStateQueue = null;
  11166. this._pendingReplaceState = false;
  11167. this._pendingForceUpdate = false;
  11168. var markup;
  11169. if (inst.unstable_handleError) {
  11170. markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
  11171. } else {
  11172. markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
  11173. }
  11174. if (inst.componentDidMount) {
  11175. if (process.env.NODE_ENV !== 'production') {
  11176. transaction.getReactMountReady().enqueue(function () {
  11177. measureLifeCyclePerf(function () {
  11178. return inst.componentDidMount();
  11179. }, _this._debugID, 'componentDidMount');
  11180. });
  11181. } else {
  11182. transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
  11183. }
  11184. }
  11185. return markup;
  11186. },
  11187. _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
  11188. if (process.env.NODE_ENV !== 'production') {
  11189. ReactCurrentOwner.current = this;
  11190. try {
  11191. return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
  11192. } finally {
  11193. ReactCurrentOwner.current = null;
  11194. }
  11195. } else {
  11196. return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
  11197. }
  11198. },
  11199. _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
  11200. var Component = this._currentElement.type;
  11201. if (doConstruct) {
  11202. if (process.env.NODE_ENV !== 'production') {
  11203. return measureLifeCyclePerf(function () {
  11204. return new Component(publicProps, publicContext, updateQueue);
  11205. }, this._debugID, 'ctor');
  11206. } else {
  11207. return new Component(publicProps, publicContext, updateQueue);
  11208. }
  11209. }
  11210. // This can still be an instance in case of factory components
  11211. // but we'll count this as time spent rendering as the more common case.
  11212. if (process.env.NODE_ENV !== 'production') {
  11213. return measureLifeCyclePerf(function () {
  11214. return Component(publicProps, publicContext, updateQueue);
  11215. }, this._debugID, 'render');
  11216. } else {
  11217. return Component(publicProps, publicContext, updateQueue);
  11218. }
  11219. },
  11220. performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
  11221. var markup;
  11222. var checkpoint = transaction.checkpoint();
  11223. try {
  11224. markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
  11225. } catch (e) {
  11226. // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
  11227. transaction.rollback(checkpoint);
  11228. this._instance.unstable_handleError(e);
  11229. if (this._pendingStateQueue) {
  11230. this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
  11231. }
  11232. checkpoint = transaction.checkpoint();
  11233. this._renderedComponent.unmountComponent(true);
  11234. transaction.rollback(checkpoint);
  11235. // Try again - we've informed the component about the error, so they can render an error message this time.
  11236. // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
  11237. markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
  11238. }
  11239. return markup;
  11240. },
  11241. performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
  11242. var inst = this._instance;
  11243. var debugID = 0;
  11244. if (process.env.NODE_ENV !== 'production') {
  11245. debugID = this._debugID;
  11246. }
  11247. if (inst.componentWillMount) {
  11248. if (process.env.NODE_ENV !== 'production') {
  11249. measureLifeCyclePerf(function () {
  11250. return inst.componentWillMount();
  11251. }, debugID, 'componentWillMount');
  11252. } else {
  11253. inst.componentWillMount();
  11254. }
  11255. // When mounting, calls to `setState` by `componentWillMount` will set
  11256. // `this._pendingStateQueue` without triggering a re-render.
  11257. if (this._pendingStateQueue) {
  11258. inst.state = this._processPendingState(inst.props, inst.context);
  11259. }
  11260. }
  11261. // If not a stateless component, we now render
  11262. if (renderedElement === undefined) {
  11263. renderedElement = this._renderValidatedComponent();
  11264. }
  11265. var nodeType = ReactNodeTypes.getType(renderedElement);
  11266. this._renderedNodeType = nodeType;
  11267. var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
  11268. );
  11269. this._renderedComponent = child;
  11270. var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
  11271. if (process.env.NODE_ENV !== 'production') {
  11272. if (debugID !== 0) {
  11273. var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
  11274. ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
  11275. }
  11276. }
  11277. return markup;
  11278. },
  11279. getHostNode: function () {
  11280. return ReactReconciler.getHostNode(this._renderedComponent);
  11281. },
  11282. /**
  11283. * Releases any resources allocated by `mountComponent`.
  11284. *
  11285. * @final
  11286. * @internal
  11287. */
  11288. unmountComponent: function (safely) {
  11289. if (!this._renderedComponent) {
  11290. return;
  11291. }
  11292. var inst = this._instance;
  11293. if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
  11294. inst._calledComponentWillUnmount = true;
  11295. if (safely) {
  11296. var name = this.getName() + '.componentWillUnmount()';
  11297. ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
  11298. } else {
  11299. if (process.env.NODE_ENV !== 'production') {
  11300. measureLifeCyclePerf(function () {
  11301. return inst.componentWillUnmount();
  11302. }, this._debugID, 'componentWillUnmount');
  11303. } else {
  11304. inst.componentWillUnmount();
  11305. }
  11306. }
  11307. }
  11308. if (this._renderedComponent) {
  11309. ReactReconciler.unmountComponent(this._renderedComponent, safely);
  11310. this._renderedNodeType = null;
  11311. this._renderedComponent = null;
  11312. this._instance = null;
  11313. }
  11314. // Reset pending fields
  11315. // Even if this component is scheduled for another update in ReactUpdates,
  11316. // it would still be ignored because these fields are reset.
  11317. this._pendingStateQueue = null;
  11318. this._pendingReplaceState = false;
  11319. this._pendingForceUpdate = false;
  11320. this._pendingCallbacks = null;
  11321. this._pendingElement = null;
  11322. // These fields do not really need to be reset since this object is no
  11323. // longer accessible.
  11324. this._context = null;
  11325. this._rootNodeID = 0;
  11326. this._topLevelWrapper = null;
  11327. // Delete the reference from the instance to this internal representation
  11328. // which allow the internals to be properly cleaned up even if the user
  11329. // leaks a reference to the public instance.
  11330. ReactInstanceMap.remove(inst);
  11331. // Some existing components rely on inst.props even after they've been
  11332. // destroyed (in event handlers).
  11333. // TODO: inst.props = null;
  11334. // TODO: inst.state = null;
  11335. // TODO: inst.context = null;
  11336. },
  11337. /**
  11338. * Filters the context object to only contain keys specified in
  11339. * `contextTypes`
  11340. *
  11341. * @param {object} context
  11342. * @return {?object}
  11343. * @private
  11344. */
  11345. _maskContext: function (context) {
  11346. var Component = this._currentElement.type;
  11347. var contextTypes = Component.contextTypes;
  11348. if (!contextTypes) {
  11349. return emptyObject;
  11350. }
  11351. var maskedContext = {};
  11352. for (var contextName in contextTypes) {
  11353. maskedContext[contextName] = context[contextName];
  11354. }
  11355. return maskedContext;
  11356. },
  11357. /**
  11358. * Filters the context object to only contain keys specified in
  11359. * `contextTypes`, and asserts that they are valid.
  11360. *
  11361. * @param {object} context
  11362. * @return {?object}
  11363. * @private
  11364. */
  11365. _processContext: function (context) {
  11366. var maskedContext = this._maskContext(context);
  11367. if (process.env.NODE_ENV !== 'production') {
  11368. var Component = this._currentElement.type;
  11369. if (Component.contextTypes) {
  11370. this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
  11371. }
  11372. }
  11373. return maskedContext;
  11374. },
  11375. /**
  11376. * @param {object} currentContext
  11377. * @return {object}
  11378. * @private
  11379. */
  11380. _processChildContext: function (currentContext) {
  11381. var Component = this._currentElement.type;
  11382. var inst = this._instance;
  11383. var childContext;
  11384. if (inst.getChildContext) {
  11385. if (process.env.NODE_ENV !== 'production') {
  11386. ReactInstrumentation.debugTool.onBeginProcessingChildContext();
  11387. try {
  11388. childContext = inst.getChildContext();
  11389. } finally {
  11390. ReactInstrumentation.debugTool.onEndProcessingChildContext();
  11391. }
  11392. } else {
  11393. childContext = inst.getChildContext();
  11394. }
  11395. }
  11396. if (childContext) {
  11397. !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
  11398. if (process.env.NODE_ENV !== 'production') {
  11399. this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
  11400. }
  11401. for (var name in childContext) {
  11402. !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
  11403. }
  11404. return _assign({}, currentContext, childContext);
  11405. }
  11406. return currentContext;
  11407. },
  11408. /**
  11409. * Assert that the context types are valid
  11410. *
  11411. * @param {object} typeSpecs Map of context field to a ReactPropType
  11412. * @param {object} values Runtime values that need to be type-checked
  11413. * @param {string} location e.g. "prop", "context", "child context"
  11414. * @private
  11415. */
  11416. _checkContextTypes: function (typeSpecs, values, location) {
  11417. if (process.env.NODE_ENV !== 'production') {
  11418. checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
  11419. }
  11420. },
  11421. receiveComponent: function (nextElement, transaction, nextContext) {
  11422. var prevElement = this._currentElement;
  11423. var prevContext = this._context;
  11424. this._pendingElement = null;
  11425. this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
  11426. },
  11427. /**
  11428. * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
  11429. * is set, update the component.
  11430. *
  11431. * @param {ReactReconcileTransaction} transaction
  11432. * @internal
  11433. */
  11434. performUpdateIfNecessary: function (transaction) {
  11435. if (this._pendingElement != null) {
  11436. ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
  11437. } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
  11438. this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
  11439. } else {
  11440. this._updateBatchNumber = null;
  11441. }
  11442. },
  11443. /**
  11444. * Perform an update to a mounted component. The componentWillReceiveProps and
  11445. * shouldComponentUpdate methods are called, then (assuming the update isn't
  11446. * skipped) the remaining update lifecycle methods are called and the DOM
  11447. * representation is updated.
  11448. *
  11449. * By default, this implements React's rendering and reconciliation algorithm.
  11450. * Sophisticated clients may wish to override this.
  11451. *
  11452. * @param {ReactReconcileTransaction} transaction
  11453. * @param {ReactElement} prevParentElement
  11454. * @param {ReactElement} nextParentElement
  11455. * @internal
  11456. * @overridable
  11457. */
  11458. updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
  11459. var inst = this._instance;
  11460. !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;
  11461. var willReceive = false;
  11462. var nextContext;
  11463. // Determine if the context has changed or not
  11464. if (this._context === nextUnmaskedContext) {
  11465. nextContext = inst.context;
  11466. } else {
  11467. nextContext = this._processContext(nextUnmaskedContext);
  11468. willReceive = true;
  11469. }
  11470. var prevProps = prevParentElement.props;
  11471. var nextProps = nextParentElement.props;
  11472. // Not a simple state update but a props update
  11473. if (prevParentElement !== nextParentElement) {
  11474. willReceive = true;
  11475. }
  11476. // An update here will schedule an update but immediately set
  11477. // _pendingStateQueue which will ensure that any state updates gets
  11478. // immediately reconciled instead of waiting for the next batch.
  11479. if (willReceive && inst.componentWillReceiveProps) {
  11480. if (process.env.NODE_ENV !== 'production') {
  11481. measureLifeCyclePerf(function () {
  11482. return inst.componentWillReceiveProps(nextProps, nextContext);
  11483. }, this._debugID, 'componentWillReceiveProps');
  11484. } else {
  11485. inst.componentWillReceiveProps(nextProps, nextContext);
  11486. }
  11487. }
  11488. var nextState = this._processPendingState(nextProps, nextContext);
  11489. var shouldUpdate = true;
  11490. if (!this._pendingForceUpdate) {
  11491. if (inst.shouldComponentUpdate) {
  11492. if (process.env.NODE_ENV !== 'production') {
  11493. shouldUpdate = measureLifeCyclePerf(function () {
  11494. return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
  11495. }, this._debugID, 'shouldComponentUpdate');
  11496. } else {
  11497. shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
  11498. }
  11499. } else {
  11500. if (this._compositeType === CompositeTypes.PureClass) {
  11501. shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
  11502. }
  11503. }
  11504. }
  11505. if (process.env.NODE_ENV !== 'production') {
  11506. process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
  11507. }
  11508. this._updateBatchNumber = null;
  11509. if (shouldUpdate) {
  11510. this._pendingForceUpdate = false;
  11511. // Will set `this.props`, `this.state` and `this.context`.
  11512. this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
  11513. } else {
  11514. // If it's determined that a component should not update, we still want
  11515. // to set props and state but we shortcut the rest of the update.
  11516. this._currentElement = nextParentElement;
  11517. this._context = nextUnmaskedContext;
  11518. inst.props = nextProps;
  11519. inst.state = nextState;
  11520. inst.context = nextContext;
  11521. }
  11522. },
  11523. _processPendingState: function (props, context) {
  11524. var inst = this._instance;
  11525. var queue = this._pendingStateQueue;
  11526. var replace = this._pendingReplaceState;
  11527. this._pendingReplaceState = false;
  11528. this._pendingStateQueue = null;
  11529. if (!queue) {
  11530. return inst.state;
  11531. }
  11532. if (replace && queue.length === 1) {
  11533. return queue[0];
  11534. }
  11535. var nextState = _assign({}, replace ? queue[0] : inst.state);
  11536. for (var i = replace ? 1 : 0; i < queue.length; i++) {
  11537. var partial = queue[i];
  11538. _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
  11539. }
  11540. return nextState;
  11541. },
  11542. /**
  11543. * Merges new props and state, notifies delegate methods of update and
  11544. * performs update.
  11545. *
  11546. * @param {ReactElement} nextElement Next element
  11547. * @param {object} nextProps Next public object to set as properties.
  11548. * @param {?object} nextState Next object to set as state.
  11549. * @param {?object} nextContext Next public object to set as context.
  11550. * @param {ReactReconcileTransaction} transaction
  11551. * @param {?object} unmaskedContext
  11552. * @private
  11553. */
  11554. _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
  11555. var _this2 = this;
  11556. var inst = this._instance;
  11557. var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
  11558. var prevProps;
  11559. var prevState;
  11560. var prevContext;
  11561. if (hasComponentDidUpdate) {
  11562. prevProps = inst.props;
  11563. prevState = inst.state;
  11564. prevContext = inst.context;
  11565. }
  11566. if (inst.componentWillUpdate) {
  11567. if (process.env.NODE_ENV !== 'production') {
  11568. measureLifeCyclePerf(function () {
  11569. return inst.componentWillUpdate(nextProps, nextState, nextContext);
  11570. }, this._debugID, 'componentWillUpdate');
  11571. } else {
  11572. inst.componentWillUpdate(nextProps, nextState, nextContext);
  11573. }
  11574. }
  11575. this._currentElement = nextElement;
  11576. this._context = unmaskedContext;
  11577. inst.props = nextProps;
  11578. inst.state = nextState;
  11579. inst.context = nextContext;
  11580. this._updateRenderedComponent(transaction, unmaskedContext);
  11581. if (hasComponentDidUpdate) {
  11582. if (process.env.NODE_ENV !== 'production') {
  11583. transaction.getReactMountReady().enqueue(function () {
  11584. measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
  11585. });
  11586. } else {
  11587. transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
  11588. }
  11589. }
  11590. },
  11591. /**
  11592. * Call the component's `render` method and update the DOM accordingly.
  11593. *
  11594. * @param {ReactReconcileTransaction} transaction
  11595. * @internal
  11596. */
  11597. _updateRenderedComponent: function (transaction, context) {
  11598. var prevComponentInstance = this._renderedComponent;
  11599. var prevRenderedElement = prevComponentInstance._currentElement;
  11600. var nextRenderedElement = this._renderValidatedComponent();
  11601. var debugID = 0;
  11602. if (process.env.NODE_ENV !== 'production') {
  11603. debugID = this._debugID;
  11604. }
  11605. if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
  11606. ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
  11607. } else {
  11608. var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
  11609. ReactReconciler.unmountComponent(prevComponentInstance, false);
  11610. var nodeType = ReactNodeTypes.getType(nextRenderedElement);
  11611. this._renderedNodeType = nodeType;
  11612. var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
  11613. );
  11614. this._renderedComponent = child;
  11615. var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
  11616. if (process.env.NODE_ENV !== 'production') {
  11617. if (debugID !== 0) {
  11618. var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
  11619. ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
  11620. }
  11621. }
  11622. this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
  11623. }
  11624. },
  11625. /**
  11626. * Overridden in shallow rendering.
  11627. *
  11628. * @protected
  11629. */
  11630. _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
  11631. ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
  11632. },
  11633. /**
  11634. * @protected
  11635. */
  11636. _renderValidatedComponentWithoutOwnerOrContext: function () {
  11637. var inst = this._instance;
  11638. var renderedElement;
  11639. if (process.env.NODE_ENV !== 'production') {
  11640. renderedElement = measureLifeCyclePerf(function () {
  11641. return inst.render();
  11642. }, this._debugID, 'render');
  11643. } else {
  11644. renderedElement = inst.render();
  11645. }
  11646. if (process.env.NODE_ENV !== 'production') {
  11647. // We allow auto-mocks to proceed as if they're returning null.
  11648. if (renderedElement === undefined && inst.render._isMockFunction) {
  11649. // This is probably bad practice. Consider warning here and
  11650. // deprecating this convenience.
  11651. renderedElement = null;
  11652. }
  11653. }
  11654. return renderedElement;
  11655. },
  11656. /**
  11657. * @private
  11658. */
  11659. _renderValidatedComponent: function () {
  11660. var renderedElement;
  11661. if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
  11662. ReactCurrentOwner.current = this;
  11663. try {
  11664. renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
  11665. } finally {
  11666. ReactCurrentOwner.current = null;
  11667. }
  11668. } else {
  11669. renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
  11670. }
  11671. !(
  11672. // TODO: An `isValidNode` function would probably be more appropriate
  11673. renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;
  11674. return renderedElement;
  11675. },
  11676. /**
  11677. * Lazily allocates the refs object and stores `component` as `ref`.
  11678. *
  11679. * @param {string} ref Reference name.
  11680. * @param {component} component Component to store as `ref`.
  11681. * @final
  11682. * @private
  11683. */
  11684. attachRef: function (ref, component) {
  11685. var inst = this.getPublicInstance();
  11686. !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
  11687. var publicComponentInstance = component.getPublicInstance();
  11688. if (process.env.NODE_ENV !== 'production') {
  11689. var componentName = component && component.getName ? component.getName() : 'a component';
  11690. process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
  11691. }
  11692. var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
  11693. refs[ref] = publicComponentInstance;
  11694. },
  11695. /**
  11696. * Detaches a reference name.
  11697. *
  11698. * @param {string} ref Name to dereference.
  11699. * @final
  11700. * @private
  11701. */
  11702. detachRef: function (ref) {
  11703. var refs = this.getPublicInstance().refs;
  11704. delete refs[ref];
  11705. },
  11706. /**
  11707. * Get a text description of the component that can be used to identify it
  11708. * in error messages.
  11709. * @return {string} The name or null.
  11710. * @internal
  11711. */
  11712. getName: function () {
  11713. var type = this._currentElement.type;
  11714. var constructor = this._instance && this._instance.constructor;
  11715. return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
  11716. },
  11717. /**
  11718. * Get the publicly accessible representation of this component - i.e. what
  11719. * is exposed by refs and returned by render. Can be null for stateless
  11720. * components.
  11721. *
  11722. * @return {ReactComponent} the public component instance.
  11723. * @internal
  11724. */
  11725. getPublicInstance: function () {
  11726. var inst = this._instance;
  11727. if (this._compositeType === CompositeTypes.StatelessFunctional) {
  11728. return null;
  11729. }
  11730. return inst;
  11731. },
  11732. // Stub
  11733. _instantiateReactComponent: null
  11734. };
  11735. module.exports = ReactCompositeComponent;
  11736. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  11737. /***/ }),
  11738. /* 115 */
  11739. /***/ (function(module, exports, __webpack_require__) {
  11740. "use strict";
  11741. /* WEBPACK VAR INJECTION */(function(process) {/**
  11742. * Copyright 2013-present, Facebook, Inc.
  11743. * All rights reserved.
  11744. *
  11745. * This source code is licensed under the BSD-style license found in the
  11746. * LICENSE file in the root directory of this source tree. An additional grant
  11747. * of patent rights can be found in the PATENTS file in the same directory.
  11748. *
  11749. */
  11750. /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
  11751. var ReactDOMComponentTree = __webpack_require__(5);
  11752. var ReactDefaultInjection = __webpack_require__(132);
  11753. var ReactMount = __webpack_require__(65);
  11754. var ReactReconciler = __webpack_require__(18);
  11755. var ReactUpdates = __webpack_require__(10);
  11756. var ReactVersion = __webpack_require__(147);
  11757. var findDOMNode = __webpack_require__(164);
  11758. var getHostComponentFromComposite = __webpack_require__(71);
  11759. var renderSubtreeIntoContainer = __webpack_require__(171);
  11760. var warning = __webpack_require__(2);
  11761. ReactDefaultInjection.inject();
  11762. var ReactDOM = {
  11763. findDOMNode: findDOMNode,
  11764. render: ReactMount.render,
  11765. unmountComponentAtNode: ReactMount.unmountComponentAtNode,
  11766. version: ReactVersion,
  11767. /* eslint-disable camelcase */
  11768. unstable_batchedUpdates: ReactUpdates.batchedUpdates,
  11769. unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
  11770. };
  11771. // Inject the runtime into a devtools global hook regardless of browser.
  11772. // Allows for debugging when the hook is injected on the page.
  11773. if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
  11774. __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
  11775. ComponentTree: {
  11776. getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
  11777. getNodeFromInstance: function (inst) {
  11778. // inst is an internal instance (but could be a composite)
  11779. if (inst._renderedComponent) {
  11780. inst = getHostComponentFromComposite(inst);
  11781. }
  11782. if (inst) {
  11783. return ReactDOMComponentTree.getNodeFromInstance(inst);
  11784. } else {
  11785. return null;
  11786. }
  11787. }
  11788. },
  11789. Mount: ReactMount,
  11790. Reconciler: ReactReconciler
  11791. });
  11792. }
  11793. if (process.env.NODE_ENV !== 'production') {
  11794. var ExecutionEnvironment = __webpack_require__(6);
  11795. if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
  11796. // First check if devtools is not installed
  11797. if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
  11798. // If we're in Chrome or Firefox, provide a download link if not installed.
  11799. if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
  11800. // Firefox does not have the issue with devtools loaded over file://
  11801. var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;
  11802. console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');
  11803. }
  11804. }
  11805. var testFunc = function testFn() {};
  11806. process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
  11807. // If we're in IE8, check to see if we are in compatibility mode and provide
  11808. // information on preventing compatibility mode
  11809. var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
  11810. process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0;
  11811. var expectedFeatures = [
  11812. // shims
  11813. Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim];
  11814. for (var i = 0; i < expectedFeatures.length; i++) {
  11815. if (!expectedFeatures[i]) {
  11816. process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;
  11817. break;
  11818. }
  11819. }
  11820. }
  11821. }
  11822. if (process.env.NODE_ENV !== 'production') {
  11823. var ReactInstrumentation = __webpack_require__(8);
  11824. var ReactDOMUnknownPropertyHook = __webpack_require__(129);
  11825. var ReactDOMNullInputValuePropHook = __webpack_require__(123);
  11826. var ReactDOMInvalidARIAHook = __webpack_require__(122);
  11827. ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
  11828. ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
  11829. ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook);
  11830. }
  11831. module.exports = ReactDOM;
  11832. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  11833. /***/ }),
  11834. /* 116 */
  11835. /***/ (function(module, exports, __webpack_require__) {
  11836. "use strict";
  11837. /* WEBPACK VAR INJECTION */(function(process) {/**
  11838. * Copyright 2013-present, Facebook, Inc.
  11839. * All rights reserved.
  11840. *
  11841. * This source code is licensed under the BSD-style license found in the
  11842. * LICENSE file in the root directory of this source tree. An additional grant
  11843. * of patent rights can be found in the PATENTS file in the same directory.
  11844. *
  11845. */
  11846. /* global hasOwnProperty:true */
  11847. var _prodInvariant = __webpack_require__(3),
  11848. _assign = __webpack_require__(4);
  11849. var AutoFocusUtils = __webpack_require__(103);
  11850. var CSSPropertyOperations = __webpack_require__(105);
  11851. var DOMLazyTree = __webpack_require__(17);
  11852. var DOMNamespaces = __webpack_require__(35);
  11853. var DOMProperty = __webpack_require__(13);
  11854. var DOMPropertyOperations = __webpack_require__(58);
  11855. var EventPluginHub = __webpack_require__(21);
  11856. var EventPluginRegistry = __webpack_require__(25);
  11857. var ReactBrowserEventEmitter = __webpack_require__(26);
  11858. var ReactDOMComponentFlags = __webpack_require__(59);
  11859. var ReactDOMComponentTree = __webpack_require__(5);
  11860. var ReactDOMInput = __webpack_require__(121);
  11861. var ReactDOMOption = __webpack_require__(124);
  11862. var ReactDOMSelect = __webpack_require__(60);
  11863. var ReactDOMTextarea = __webpack_require__(127);
  11864. var ReactInstrumentation = __webpack_require__(8);
  11865. var ReactMultiChild = __webpack_require__(140);
  11866. var ReactServerRenderingTransaction = __webpack_require__(145);
  11867. var emptyFunction = __webpack_require__(9);
  11868. var escapeTextContentForBrowser = __webpack_require__(29);
  11869. var invariant = __webpack_require__(1);
  11870. var isEventSupported = __webpack_require__(46);
  11871. var shallowEqual = __webpack_require__(33);
  11872. var validateDOMNesting = __webpack_require__(48);
  11873. var warning = __webpack_require__(2);
  11874. var Flags = ReactDOMComponentFlags;
  11875. var deleteListener = EventPluginHub.deleteListener;
  11876. var getNode = ReactDOMComponentTree.getNodeFromInstance;
  11877. var listenTo = ReactBrowserEventEmitter.listenTo;
  11878. var registrationNameModules = EventPluginRegistry.registrationNameModules;
  11879. // For quickly matching children type, to test if can be treated as content.
  11880. var CONTENT_TYPES = { 'string': true, 'number': true };
  11881. var STYLE = 'style';
  11882. var HTML = '__html';
  11883. var RESERVED_PROPS = {
  11884. children: null,
  11885. dangerouslySetInnerHTML: null,
  11886. suppressContentEditableWarning: null
  11887. };
  11888. // Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).
  11889. var DOC_FRAGMENT_TYPE = 11;
  11890. function getDeclarationErrorAddendum(internalInstance) {
  11891. if (internalInstance) {
  11892. var owner = internalInstance._currentElement._owner || null;
  11893. if (owner) {
  11894. var name = owner.getName();
  11895. if (name) {
  11896. return ' This DOM node was rendered by `' + name + '`.';
  11897. }
  11898. }
  11899. }
  11900. return '';
  11901. }
  11902. function friendlyStringify(obj) {
  11903. if (typeof obj === 'object') {
  11904. if (Array.isArray(obj)) {
  11905. return '[' + obj.map(friendlyStringify).join(', ') + ']';
  11906. } else {
  11907. var pairs = [];
  11908. for (var key in obj) {
  11909. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  11910. var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
  11911. pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
  11912. }
  11913. }
  11914. return '{' + pairs.join(', ') + '}';
  11915. }
  11916. } else if (typeof obj === 'string') {
  11917. return JSON.stringify(obj);
  11918. } else if (typeof obj === 'function') {
  11919. return '[function object]';
  11920. }
  11921. // Differs from JSON.stringify in that undefined because undefined and that
  11922. // inf and nan don't become null
  11923. return String(obj);
  11924. }
  11925. var styleMutationWarning = {};
  11926. function checkAndWarnForMutatedStyle(style1, style2, component) {
  11927. if (style1 == null || style2 == null) {
  11928. return;
  11929. }
  11930. if (shallowEqual(style1, style2)) {
  11931. return;
  11932. }
  11933. var componentName = component._tag;
  11934. var owner = component._currentElement._owner;
  11935. var ownerName;
  11936. if (owner) {
  11937. ownerName = owner.getName();
  11938. }
  11939. var hash = ownerName + '|' + componentName;
  11940. if (styleMutationWarning.hasOwnProperty(hash)) {
  11941. return;
  11942. }
  11943. styleMutationWarning[hash] = true;
  11944. process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
  11945. }
  11946. /**
  11947. * @param {object} component
  11948. * @param {?object} props
  11949. */
  11950. function assertValidProps(component, props) {
  11951. if (!props) {
  11952. return;
  11953. }
  11954. // Note the use of `==` which checks for null or undefined.
  11955. if (voidElementTags[component._tag]) {
  11956. !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;
  11957. }
  11958. if (props.dangerouslySetInnerHTML != null) {
  11959. !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
  11960. !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;
  11961. }
  11962. if (process.env.NODE_ENV !== 'production') {
  11963. process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
  11964. process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
  11965. process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
  11966. }
  11967. !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;
  11968. }
  11969. function enqueuePutListener(inst, registrationName, listener, transaction) {
  11970. if (transaction instanceof ReactServerRenderingTransaction) {
  11971. return;
  11972. }
  11973. if (process.env.NODE_ENV !== 'production') {
  11974. // IE8 has no API for event capturing and the `onScroll` event doesn't
  11975. // bubble.
  11976. process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
  11977. }
  11978. var containerInfo = inst._hostContainerInfo;
  11979. var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
  11980. var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
  11981. listenTo(registrationName, doc);
  11982. transaction.getReactMountReady().enqueue(putListener, {
  11983. inst: inst,
  11984. registrationName: registrationName,
  11985. listener: listener
  11986. });
  11987. }
  11988. function putListener() {
  11989. var listenerToPut = this;
  11990. EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
  11991. }
  11992. function inputPostMount() {
  11993. var inst = this;
  11994. ReactDOMInput.postMountWrapper(inst);
  11995. }
  11996. function textareaPostMount() {
  11997. var inst = this;
  11998. ReactDOMTextarea.postMountWrapper(inst);
  11999. }
  12000. function optionPostMount() {
  12001. var inst = this;
  12002. ReactDOMOption.postMountWrapper(inst);
  12003. }
  12004. var setAndValidateContentChildDev = emptyFunction;
  12005. if (process.env.NODE_ENV !== 'production') {
  12006. setAndValidateContentChildDev = function (content) {
  12007. var hasExistingContent = this._contentDebugID != null;
  12008. var debugID = this._debugID;
  12009. // This ID represents the inlined child that has no backing instance:
  12010. var contentDebugID = -debugID;
  12011. if (content == null) {
  12012. if (hasExistingContent) {
  12013. ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
  12014. }
  12015. this._contentDebugID = null;
  12016. return;
  12017. }
  12018. validateDOMNesting(null, String(content), this, this._ancestorInfo);
  12019. this._contentDebugID = contentDebugID;
  12020. if (hasExistingContent) {
  12021. ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
  12022. ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
  12023. } else {
  12024. ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
  12025. ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
  12026. ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
  12027. }
  12028. };
  12029. }
  12030. // There are so many media events, it makes sense to just
  12031. // maintain a list rather than create a `trapBubbledEvent` for each
  12032. var mediaEvents = {
  12033. topAbort: 'abort',
  12034. topCanPlay: 'canplay',
  12035. topCanPlayThrough: 'canplaythrough',
  12036. topDurationChange: 'durationchange',
  12037. topEmptied: 'emptied',
  12038. topEncrypted: 'encrypted',
  12039. topEnded: 'ended',
  12040. topError: 'error',
  12041. topLoadedData: 'loadeddata',
  12042. topLoadedMetadata: 'loadedmetadata',
  12043. topLoadStart: 'loadstart',
  12044. topPause: 'pause',
  12045. topPlay: 'play',
  12046. topPlaying: 'playing',
  12047. topProgress: 'progress',
  12048. topRateChange: 'ratechange',
  12049. topSeeked: 'seeked',
  12050. topSeeking: 'seeking',
  12051. topStalled: 'stalled',
  12052. topSuspend: 'suspend',
  12053. topTimeUpdate: 'timeupdate',
  12054. topVolumeChange: 'volumechange',
  12055. topWaiting: 'waiting'
  12056. };
  12057. function trapBubbledEventsLocal() {
  12058. var inst = this;
  12059. // If a component renders to null or if another component fatals and causes
  12060. // the state of the tree to be corrupted, `node` here can be null.
  12061. !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
  12062. var node = getNode(inst);
  12063. !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
  12064. switch (inst._tag) {
  12065. case 'iframe':
  12066. case 'object':
  12067. inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
  12068. break;
  12069. case 'video':
  12070. case 'audio':
  12071. inst._wrapperState.listeners = [];
  12072. // Create listener for each media event
  12073. for (var event in mediaEvents) {
  12074. if (mediaEvents.hasOwnProperty(event)) {
  12075. inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
  12076. }
  12077. }
  12078. break;
  12079. case 'source':
  12080. inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
  12081. break;
  12082. case 'img':
  12083. inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
  12084. break;
  12085. case 'form':
  12086. inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
  12087. break;
  12088. case 'input':
  12089. case 'select':
  12090. case 'textarea':
  12091. inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
  12092. break;
  12093. }
  12094. }
  12095. function postUpdateSelectWrapper() {
  12096. ReactDOMSelect.postUpdateWrapper(this);
  12097. }
  12098. // For HTML, certain tags should omit their close tag. We keep a whitelist for
  12099. // those special-case tags.
  12100. var omittedCloseTags = {
  12101. 'area': true,
  12102. 'base': true,
  12103. 'br': true,
  12104. 'col': true,
  12105. 'embed': true,
  12106. 'hr': true,
  12107. 'img': true,
  12108. 'input': true,
  12109. 'keygen': true,
  12110. 'link': true,
  12111. 'meta': true,
  12112. 'param': true,
  12113. 'source': true,
  12114. 'track': true,
  12115. 'wbr': true
  12116. };
  12117. var newlineEatingTags = {
  12118. 'listing': true,
  12119. 'pre': true,
  12120. 'textarea': true
  12121. };
  12122. // For HTML, certain tags cannot have children. This has the same purpose as
  12123. // `omittedCloseTags` except that `menuitem` should still have its closing tag.
  12124. var voidElementTags = _assign({
  12125. 'menuitem': true
  12126. }, omittedCloseTags);
  12127. // We accept any tag to be rendered but since this gets injected into arbitrary
  12128. // HTML, we want to make sure that it's a safe tag.
  12129. // http://www.w3.org/TR/REC-xml/#NT-Name
  12130. var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
  12131. var validatedTagCache = {};
  12132. var hasOwnProperty = {}.hasOwnProperty;
  12133. function validateDangerousTag(tag) {
  12134. if (!hasOwnProperty.call(validatedTagCache, tag)) {
  12135. !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
  12136. validatedTagCache[tag] = true;
  12137. }
  12138. }
  12139. function isCustomComponent(tagName, props) {
  12140. return tagName.indexOf('-') >= 0 || props.is != null;
  12141. }
  12142. var globalIdCounter = 1;
  12143. /**
  12144. * Creates a new React class that is idempotent and capable of containing other
  12145. * React components. It accepts event listeners and DOM properties that are
  12146. * valid according to `DOMProperty`.
  12147. *
  12148. * - Event listeners: `onClick`, `onMouseDown`, etc.
  12149. * - DOM properties: `className`, `name`, `title`, etc.
  12150. *
  12151. * The `style` property functions differently from the DOM API. It accepts an
  12152. * object mapping of style properties to values.
  12153. *
  12154. * @constructor ReactDOMComponent
  12155. * @extends ReactMultiChild
  12156. */
  12157. function ReactDOMComponent(element) {
  12158. var tag = element.type;
  12159. validateDangerousTag(tag);
  12160. this._currentElement = element;
  12161. this._tag = tag.toLowerCase();
  12162. this._namespaceURI = null;
  12163. this._renderedChildren = null;
  12164. this._previousStyle = null;
  12165. this._previousStyleCopy = null;
  12166. this._hostNode = null;
  12167. this._hostParent = null;
  12168. this._rootNodeID = 0;
  12169. this._domID = 0;
  12170. this._hostContainerInfo = null;
  12171. this._wrapperState = null;
  12172. this._topLevelWrapper = null;
  12173. this._flags = 0;
  12174. if (process.env.NODE_ENV !== 'production') {
  12175. this._ancestorInfo = null;
  12176. setAndValidateContentChildDev.call(this, null);
  12177. }
  12178. }
  12179. ReactDOMComponent.displayName = 'ReactDOMComponent';
  12180. ReactDOMComponent.Mixin = {
  12181. /**
  12182. * Generates root tag markup then recurses. This method has side effects and
  12183. * is not idempotent.
  12184. *
  12185. * @internal
  12186. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
  12187. * @param {?ReactDOMComponent} the parent component instance
  12188. * @param {?object} info about the host container
  12189. * @param {object} context
  12190. * @return {string} The computed markup.
  12191. */
  12192. mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
  12193. this._rootNodeID = globalIdCounter++;
  12194. this._domID = hostContainerInfo._idCounter++;
  12195. this._hostParent = hostParent;
  12196. this._hostContainerInfo = hostContainerInfo;
  12197. var props = this._currentElement.props;
  12198. switch (this._tag) {
  12199. case 'audio':
  12200. case 'form':
  12201. case 'iframe':
  12202. case 'img':
  12203. case 'link':
  12204. case 'object':
  12205. case 'source':
  12206. case 'video':
  12207. this._wrapperState = {
  12208. listeners: null
  12209. };
  12210. transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
  12211. break;
  12212. case 'input':
  12213. ReactDOMInput.mountWrapper(this, props, hostParent);
  12214. props = ReactDOMInput.getHostProps(this, props);
  12215. transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
  12216. break;
  12217. case 'option':
  12218. ReactDOMOption.mountWrapper(this, props, hostParent);
  12219. props = ReactDOMOption.getHostProps(this, props);
  12220. break;
  12221. case 'select':
  12222. ReactDOMSelect.mountWrapper(this, props, hostParent);
  12223. props = ReactDOMSelect.getHostProps(this, props);
  12224. transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
  12225. break;
  12226. case 'textarea':
  12227. ReactDOMTextarea.mountWrapper(this, props, hostParent);
  12228. props = ReactDOMTextarea.getHostProps(this, props);
  12229. transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
  12230. break;
  12231. }
  12232. assertValidProps(this, props);
  12233. // We create tags in the namespace of their parent container, except HTML
  12234. // tags get no namespace.
  12235. var namespaceURI;
  12236. var parentTag;
  12237. if (hostParent != null) {
  12238. namespaceURI = hostParent._namespaceURI;
  12239. parentTag = hostParent._tag;
  12240. } else if (hostContainerInfo._tag) {
  12241. namespaceURI = hostContainerInfo._namespaceURI;
  12242. parentTag = hostContainerInfo._tag;
  12243. }
  12244. if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
  12245. namespaceURI = DOMNamespaces.html;
  12246. }
  12247. if (namespaceURI === DOMNamespaces.html) {
  12248. if (this._tag === 'svg') {
  12249. namespaceURI = DOMNamespaces.svg;
  12250. } else if (this._tag === 'math') {
  12251. namespaceURI = DOMNamespaces.mathml;
  12252. }
  12253. }
  12254. this._namespaceURI = namespaceURI;
  12255. if (process.env.NODE_ENV !== 'production') {
  12256. var parentInfo;
  12257. if (hostParent != null) {
  12258. parentInfo = hostParent._ancestorInfo;
  12259. } else if (hostContainerInfo._tag) {
  12260. parentInfo = hostContainerInfo._ancestorInfo;
  12261. }
  12262. if (parentInfo) {
  12263. // parentInfo should always be present except for the top-level
  12264. // component when server rendering
  12265. validateDOMNesting(this._tag, null, this, parentInfo);
  12266. }
  12267. this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
  12268. }
  12269. var mountImage;
  12270. if (transaction.useCreateElement) {
  12271. var ownerDocument = hostContainerInfo._ownerDocument;
  12272. var el;
  12273. if (namespaceURI === DOMNamespaces.html) {
  12274. if (this._tag === 'script') {
  12275. // Create the script via .innerHTML so its "parser-inserted" flag is
  12276. // set to true and it does not execute
  12277. var div = ownerDocument.createElement('div');
  12278. var type = this._currentElement.type;
  12279. div.innerHTML = '<' + type + '></' + type + '>';
  12280. el = div.removeChild(div.firstChild);
  12281. } else if (props.is) {
  12282. el = ownerDocument.createElement(this._currentElement.type, props.is);
  12283. } else {
  12284. // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
  12285. // See discussion in https://github.com/facebook/react/pull/6896
  12286. // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
  12287. el = ownerDocument.createElement(this._currentElement.type);
  12288. }
  12289. } else {
  12290. el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
  12291. }
  12292. ReactDOMComponentTree.precacheNode(this, el);
  12293. this._flags |= Flags.hasCachedChildNodes;
  12294. if (!this._hostParent) {
  12295. DOMPropertyOperations.setAttributeForRoot(el);
  12296. }
  12297. this._updateDOMProperties(null, props, transaction);
  12298. var lazyTree = DOMLazyTree(el);
  12299. this._createInitialChildren(transaction, props, context, lazyTree);
  12300. mountImage = lazyTree;
  12301. } else {
  12302. var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
  12303. var tagContent = this._createContentMarkup(transaction, props, context);
  12304. if (!tagContent && omittedCloseTags[this._tag]) {
  12305. mountImage = tagOpen + '/>';
  12306. } else {
  12307. mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
  12308. }
  12309. }
  12310. switch (this._tag) {
  12311. case 'input':
  12312. transaction.getReactMountReady().enqueue(inputPostMount, this);
  12313. if (props.autoFocus) {
  12314. transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
  12315. }
  12316. break;
  12317. case 'textarea':
  12318. transaction.getReactMountReady().enqueue(textareaPostMount, this);
  12319. if (props.autoFocus) {
  12320. transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
  12321. }
  12322. break;
  12323. case 'select':
  12324. if (props.autoFocus) {
  12325. transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
  12326. }
  12327. break;
  12328. case 'button':
  12329. if (props.autoFocus) {
  12330. transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
  12331. }
  12332. break;
  12333. case 'option':
  12334. transaction.getReactMountReady().enqueue(optionPostMount, this);
  12335. break;
  12336. }
  12337. return mountImage;
  12338. },
  12339. /**
  12340. * Creates markup for the open tag and all attributes.
  12341. *
  12342. * This method has side effects because events get registered.
  12343. *
  12344. * Iterating over object properties is faster than iterating over arrays.
  12345. * @see http://jsperf.com/obj-vs-arr-iteration
  12346. *
  12347. * @private
  12348. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
  12349. * @param {object} props
  12350. * @return {string} Markup of opening tag.
  12351. */
  12352. _createOpenTagMarkupAndPutListeners: function (transaction, props) {
  12353. var ret = '<' + this._currentElement.type;
  12354. for (var propKey in props) {
  12355. if (!props.hasOwnProperty(propKey)) {
  12356. continue;
  12357. }
  12358. var propValue = props[propKey];
  12359. if (propValue == null) {
  12360. continue;
  12361. }
  12362. if (registrationNameModules.hasOwnProperty(propKey)) {
  12363. if (propValue) {
  12364. enqueuePutListener(this, propKey, propValue, transaction);
  12365. }
  12366. } else {
  12367. if (propKey === STYLE) {
  12368. if (propValue) {
  12369. if (process.env.NODE_ENV !== 'production') {
  12370. // See `_updateDOMProperties`. style block
  12371. this._previousStyle = propValue;
  12372. }
  12373. propValue = this._previousStyleCopy = _assign({}, props.style);
  12374. }
  12375. propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
  12376. }
  12377. var markup = null;
  12378. if (this._tag != null && isCustomComponent(this._tag, props)) {
  12379. if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
  12380. markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
  12381. }
  12382. } else {
  12383. markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
  12384. }
  12385. if (markup) {
  12386. ret += ' ' + markup;
  12387. }
  12388. }
  12389. }
  12390. // For static pages, no need to put React ID and checksum. Saves lots of
  12391. // bytes.
  12392. if (transaction.renderToStaticMarkup) {
  12393. return ret;
  12394. }
  12395. if (!this._hostParent) {
  12396. ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
  12397. }
  12398. ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
  12399. return ret;
  12400. },
  12401. /**
  12402. * Creates markup for the content between the tags.
  12403. *
  12404. * @private
  12405. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
  12406. * @param {object} props
  12407. * @param {object} context
  12408. * @return {string} Content markup.
  12409. */
  12410. _createContentMarkup: function (transaction, props, context) {
  12411. var ret = '';
  12412. // Intentional use of != to avoid catching zero/false.
  12413. var innerHTML = props.dangerouslySetInnerHTML;
  12414. if (innerHTML != null) {
  12415. if (innerHTML.__html != null) {
  12416. ret = innerHTML.__html;
  12417. }
  12418. } else {
  12419. var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
  12420. var childrenToUse = contentToUse != null ? null : props.children;
  12421. if (contentToUse != null) {
  12422. // TODO: Validate that text is allowed as a child of this node
  12423. ret = escapeTextContentForBrowser(contentToUse);
  12424. if (process.env.NODE_ENV !== 'production') {
  12425. setAndValidateContentChildDev.call(this, contentToUse);
  12426. }
  12427. } else if (childrenToUse != null) {
  12428. var mountImages = this.mountChildren(childrenToUse, transaction, context);
  12429. ret = mountImages.join('');
  12430. }
  12431. }
  12432. if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
  12433. // text/html ignores the first character in these tags if it's a newline
  12434. // Prefer to break application/xml over text/html (for now) by adding
  12435. // a newline specifically to get eaten by the parser. (Alternately for
  12436. // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
  12437. // \r is normalized out by HTMLTextAreaElement#value.)
  12438. // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
  12439. // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
  12440. // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
  12441. // See: Parsing of "textarea" "listing" and "pre" elements
  12442. // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
  12443. return '\n' + ret;
  12444. } else {
  12445. return ret;
  12446. }
  12447. },
  12448. _createInitialChildren: function (transaction, props, context, lazyTree) {
  12449. // Intentional use of != to avoid catching zero/false.
  12450. var innerHTML = props.dangerouslySetInnerHTML;
  12451. if (innerHTML != null) {
  12452. if (innerHTML.__html != null) {
  12453. DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
  12454. }
  12455. } else {
  12456. var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
  12457. var childrenToUse = contentToUse != null ? null : props.children;
  12458. // TODO: Validate that text is allowed as a child of this node
  12459. if (contentToUse != null) {
  12460. // Avoid setting textContent when the text is empty. In IE11 setting
  12461. // textContent on a text area will cause the placeholder to not
  12462. // show within the textarea until it has been focused and blurred again.
  12463. // https://github.com/facebook/react/issues/6731#issuecomment-254874553
  12464. if (contentToUse !== '') {
  12465. if (process.env.NODE_ENV !== 'production') {
  12466. setAndValidateContentChildDev.call(this, contentToUse);
  12467. }
  12468. DOMLazyTree.queueText(lazyTree, contentToUse);
  12469. }
  12470. } else if (childrenToUse != null) {
  12471. var mountImages = this.mountChildren(childrenToUse, transaction, context);
  12472. for (var i = 0; i < mountImages.length; i++) {
  12473. DOMLazyTree.queueChild(lazyTree, mountImages[i]);
  12474. }
  12475. }
  12476. }
  12477. },
  12478. /**
  12479. * Receives a next element and updates the component.
  12480. *
  12481. * @internal
  12482. * @param {ReactElement} nextElement
  12483. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
  12484. * @param {object} context
  12485. */
  12486. receiveComponent: function (nextElement, transaction, context) {
  12487. var prevElement = this._currentElement;
  12488. this._currentElement = nextElement;
  12489. this.updateComponent(transaction, prevElement, nextElement, context);
  12490. },
  12491. /**
  12492. * Updates a DOM component after it has already been allocated and
  12493. * attached to the DOM. Reconciles the root DOM node, then recurses.
  12494. *
  12495. * @param {ReactReconcileTransaction} transaction
  12496. * @param {ReactElement} prevElement
  12497. * @param {ReactElement} nextElement
  12498. * @internal
  12499. * @overridable
  12500. */
  12501. updateComponent: function (transaction, prevElement, nextElement, context) {
  12502. var lastProps = prevElement.props;
  12503. var nextProps = this._currentElement.props;
  12504. switch (this._tag) {
  12505. case 'input':
  12506. lastProps = ReactDOMInput.getHostProps(this, lastProps);
  12507. nextProps = ReactDOMInput.getHostProps(this, nextProps);
  12508. break;
  12509. case 'option':
  12510. lastProps = ReactDOMOption.getHostProps(this, lastProps);
  12511. nextProps = ReactDOMOption.getHostProps(this, nextProps);
  12512. break;
  12513. case 'select':
  12514. lastProps = ReactDOMSelect.getHostProps(this, lastProps);
  12515. nextProps = ReactDOMSelect.getHostProps(this, nextProps);
  12516. break;
  12517. case 'textarea':
  12518. lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
  12519. nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
  12520. break;
  12521. }
  12522. assertValidProps(this, nextProps);
  12523. this._updateDOMProperties(lastProps, nextProps, transaction);
  12524. this._updateDOMChildren(lastProps, nextProps, transaction, context);
  12525. switch (this._tag) {
  12526. case 'input':
  12527. // Update the wrapper around inputs *after* updating props. This has to
  12528. // happen after `_updateDOMProperties`. Otherwise HTML5 input validations
  12529. // raise warnings and prevent the new value from being assigned.
  12530. ReactDOMInput.updateWrapper(this);
  12531. break;
  12532. case 'textarea':
  12533. ReactDOMTextarea.updateWrapper(this);
  12534. break;
  12535. case 'select':
  12536. // <select> value update needs to occur after <option> children
  12537. // reconciliation
  12538. transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
  12539. break;
  12540. }
  12541. },
  12542. /**
  12543. * Reconciles the properties by detecting differences in property values and
  12544. * updating the DOM as necessary. This function is probably the single most
  12545. * critical path for performance optimization.
  12546. *
  12547. * TODO: Benchmark whether checking for changed values in memory actually
  12548. * improves performance (especially statically positioned elements).
  12549. * TODO: Benchmark the effects of putting this at the top since 99% of props
  12550. * do not change for a given reconciliation.
  12551. * TODO: Benchmark areas that can be improved with caching.
  12552. *
  12553. * @private
  12554. * @param {object} lastProps
  12555. * @param {object} nextProps
  12556. * @param {?DOMElement} node
  12557. */
  12558. _updateDOMProperties: function (lastProps, nextProps, transaction) {
  12559. var propKey;
  12560. var styleName;
  12561. var styleUpdates;
  12562. for (propKey in lastProps) {
  12563. if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
  12564. continue;
  12565. }
  12566. if (propKey === STYLE) {
  12567. var lastStyle = this._previousStyleCopy;
  12568. for (styleName in lastStyle) {
  12569. if (lastStyle.hasOwnProperty(styleName)) {
  12570. styleUpdates = styleUpdates || {};
  12571. styleUpdates[styleName] = '';
  12572. }
  12573. }
  12574. this._previousStyleCopy = null;
  12575. } else if (registrationNameModules.hasOwnProperty(propKey)) {
  12576. if (lastProps[propKey]) {
  12577. // Only call deleteListener if there was a listener previously or
  12578. // else willDeleteListener gets called when there wasn't actually a
  12579. // listener (e.g., onClick={null})
  12580. deleteListener(this, propKey);
  12581. }
  12582. } else if (isCustomComponent(this._tag, lastProps)) {
  12583. if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
  12584. DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
  12585. }
  12586. } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
  12587. DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
  12588. }
  12589. }
  12590. for (propKey in nextProps) {
  12591. var nextProp = nextProps[propKey];
  12592. var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
  12593. if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
  12594. continue;
  12595. }
  12596. if (propKey === STYLE) {
  12597. if (nextProp) {
  12598. if (process.env.NODE_ENV !== 'production') {
  12599. checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
  12600. this._previousStyle = nextProp;
  12601. }
  12602. nextProp = this._previousStyleCopy = _assign({}, nextProp);
  12603. } else {
  12604. this._previousStyleCopy = null;
  12605. }
  12606. if (lastProp) {
  12607. // Unset styles on `lastProp` but not on `nextProp`.
  12608. for (styleName in lastProp) {
  12609. if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
  12610. styleUpdates = styleUpdates || {};
  12611. styleUpdates[styleName] = '';
  12612. }
  12613. }
  12614. // Update styles that changed since `lastProp`.
  12615. for (styleName in nextProp) {
  12616. if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
  12617. styleUpdates = styleUpdates || {};
  12618. styleUpdates[styleName] = nextProp[styleName];
  12619. }
  12620. }
  12621. } else {
  12622. // Relies on `updateStylesByID` not mutating `styleUpdates`.
  12623. styleUpdates = nextProp;
  12624. }
  12625. } else if (registrationNameModules.hasOwnProperty(propKey)) {
  12626. if (nextProp) {
  12627. enqueuePutListener(this, propKey, nextProp, transaction);
  12628. } else if (lastProp) {
  12629. deleteListener(this, propKey);
  12630. }
  12631. } else if (isCustomComponent(this._tag, nextProps)) {
  12632. if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
  12633. DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
  12634. }
  12635. } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
  12636. var node = getNode(this);
  12637. // If we're updating to null or undefined, we should remove the property
  12638. // from the DOM node instead of inadvertently setting to a string. This
  12639. // brings us in line with the same behavior we have on initial render.
  12640. if (nextProp != null) {
  12641. DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
  12642. } else {
  12643. DOMPropertyOperations.deleteValueForProperty(node, propKey);
  12644. }
  12645. }
  12646. }
  12647. if (styleUpdates) {
  12648. CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
  12649. }
  12650. },
  12651. /**
  12652. * Reconciles the children with the various properties that affect the
  12653. * children content.
  12654. *
  12655. * @param {object} lastProps
  12656. * @param {object} nextProps
  12657. * @param {ReactReconcileTransaction} transaction
  12658. * @param {object} context
  12659. */
  12660. _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
  12661. var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
  12662. var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
  12663. var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
  12664. var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
  12665. // Note the use of `!=` which checks for null or undefined.
  12666. var lastChildren = lastContent != null ? null : lastProps.children;
  12667. var nextChildren = nextContent != null ? null : nextProps.children;
  12668. // If we're switching from children to content/html or vice versa, remove
  12669. // the old content
  12670. var lastHasContentOrHtml = lastContent != null || lastHtml != null;
  12671. var nextHasContentOrHtml = nextContent != null || nextHtml != null;
  12672. if (lastChildren != null && nextChildren == null) {
  12673. this.updateChildren(null, transaction, context);
  12674. } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
  12675. this.updateTextContent('');
  12676. if (process.env.NODE_ENV !== 'production') {
  12677. ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
  12678. }
  12679. }
  12680. if (nextContent != null) {
  12681. if (lastContent !== nextContent) {
  12682. this.updateTextContent('' + nextContent);
  12683. if (process.env.NODE_ENV !== 'production') {
  12684. setAndValidateContentChildDev.call(this, nextContent);
  12685. }
  12686. }
  12687. } else if (nextHtml != null) {
  12688. if (lastHtml !== nextHtml) {
  12689. this.updateMarkup('' + nextHtml);
  12690. }
  12691. if (process.env.NODE_ENV !== 'production') {
  12692. ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
  12693. }
  12694. } else if (nextChildren != null) {
  12695. if (process.env.NODE_ENV !== 'production') {
  12696. setAndValidateContentChildDev.call(this, null);
  12697. }
  12698. this.updateChildren(nextChildren, transaction, context);
  12699. }
  12700. },
  12701. getHostNode: function () {
  12702. return getNode(this);
  12703. },
  12704. /**
  12705. * Destroys all event registrations for this instance. Does not remove from
  12706. * the DOM. That must be done by the parent.
  12707. *
  12708. * @internal
  12709. */
  12710. unmountComponent: function (safely) {
  12711. switch (this._tag) {
  12712. case 'audio':
  12713. case 'form':
  12714. case 'iframe':
  12715. case 'img':
  12716. case 'link':
  12717. case 'object':
  12718. case 'source':
  12719. case 'video':
  12720. var listeners = this._wrapperState.listeners;
  12721. if (listeners) {
  12722. for (var i = 0; i < listeners.length; i++) {
  12723. listeners[i].remove();
  12724. }
  12725. }
  12726. break;
  12727. case 'html':
  12728. case 'head':
  12729. case 'body':
  12730. /**
  12731. * Components like <html> <head> and <body> can't be removed or added
  12732. * easily in a cross-browser way, however it's valuable to be able to
  12733. * take advantage of React's reconciliation for styling and <title>
  12734. * management. So we just document it and throw in dangerous cases.
  12735. */
  12736. true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;
  12737. break;
  12738. }
  12739. this.unmountChildren(safely);
  12740. ReactDOMComponentTree.uncacheNode(this);
  12741. EventPluginHub.deleteAllListeners(this);
  12742. this._rootNodeID = 0;
  12743. this._domID = 0;
  12744. this._wrapperState = null;
  12745. if (process.env.NODE_ENV !== 'production') {
  12746. setAndValidateContentChildDev.call(this, null);
  12747. }
  12748. },
  12749. getPublicInstance: function () {
  12750. return getNode(this);
  12751. }
  12752. };
  12753. _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
  12754. module.exports = ReactDOMComponent;
  12755. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  12756. /***/ }),
  12757. /* 117 */
  12758. /***/ (function(module, exports, __webpack_require__) {
  12759. "use strict";
  12760. /* WEBPACK VAR INJECTION */(function(process) {/**
  12761. * Copyright 2013-present, Facebook, Inc.
  12762. * All rights reserved.
  12763. *
  12764. * This source code is licensed under the BSD-style license found in the
  12765. * LICENSE file in the root directory of this source tree. An additional grant
  12766. * of patent rights can be found in the PATENTS file in the same directory.
  12767. *
  12768. */
  12769. var validateDOMNesting = __webpack_require__(48);
  12770. var DOC_NODE_TYPE = 9;
  12771. function ReactDOMContainerInfo(topLevelWrapper, node) {
  12772. var info = {
  12773. _topLevelWrapper: topLevelWrapper,
  12774. _idCounter: 1,
  12775. _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
  12776. _node: node,
  12777. _tag: node ? node.nodeName.toLowerCase() : null,
  12778. _namespaceURI: node ? node.namespaceURI : null
  12779. };
  12780. if (process.env.NODE_ENV !== 'production') {
  12781. info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
  12782. }
  12783. return info;
  12784. }
  12785. module.exports = ReactDOMContainerInfo;
  12786. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  12787. /***/ }),
  12788. /* 118 */
  12789. /***/ (function(module, exports, __webpack_require__) {
  12790. "use strict";
  12791. /**
  12792. * Copyright 2014-present, Facebook, Inc.
  12793. * All rights reserved.
  12794. *
  12795. * This source code is licensed under the BSD-style license found in the
  12796. * LICENSE file in the root directory of this source tree. An additional grant
  12797. * of patent rights can be found in the PATENTS file in the same directory.
  12798. *
  12799. */
  12800. var _assign = __webpack_require__(4);
  12801. var DOMLazyTree = __webpack_require__(17);
  12802. var ReactDOMComponentTree = __webpack_require__(5);
  12803. var ReactDOMEmptyComponent = function (instantiate) {
  12804. // ReactCompositeComponent uses this:
  12805. this._currentElement = null;
  12806. // ReactDOMComponentTree uses these:
  12807. this._hostNode = null;
  12808. this._hostParent = null;
  12809. this._hostContainerInfo = null;
  12810. this._domID = 0;
  12811. };
  12812. _assign(ReactDOMEmptyComponent.prototype, {
  12813. mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
  12814. var domID = hostContainerInfo._idCounter++;
  12815. this._domID = domID;
  12816. this._hostParent = hostParent;
  12817. this._hostContainerInfo = hostContainerInfo;
  12818. var nodeValue = ' react-empty: ' + this._domID + ' ';
  12819. if (transaction.useCreateElement) {
  12820. var ownerDocument = hostContainerInfo._ownerDocument;
  12821. var node = ownerDocument.createComment(nodeValue);
  12822. ReactDOMComponentTree.precacheNode(this, node);
  12823. return DOMLazyTree(node);
  12824. } else {
  12825. if (transaction.renderToStaticMarkup) {
  12826. // Normally we'd insert a comment node, but since this is a situation
  12827. // where React won't take over (static pages), we can simply return
  12828. // nothing.
  12829. return '';
  12830. }
  12831. return '<!--' + nodeValue + '-->';
  12832. }
  12833. },
  12834. receiveComponent: function () {},
  12835. getHostNode: function () {
  12836. return ReactDOMComponentTree.getNodeFromInstance(this);
  12837. },
  12838. unmountComponent: function () {
  12839. ReactDOMComponentTree.uncacheNode(this);
  12840. }
  12841. });
  12842. module.exports = ReactDOMEmptyComponent;
  12843. /***/ }),
  12844. /* 119 */
  12845. /***/ (function(module, exports, __webpack_require__) {
  12846. "use strict";
  12847. /**
  12848. * Copyright 2013-present, Facebook, Inc.
  12849. * All rights reserved.
  12850. *
  12851. * This source code is licensed under the BSD-style license found in the
  12852. * LICENSE file in the root directory of this source tree. An additional grant
  12853. * of patent rights can be found in the PATENTS file in the same directory.
  12854. *
  12855. */
  12856. var ReactDOMFeatureFlags = {
  12857. useCreateElement: true,
  12858. useFiber: false
  12859. };
  12860. module.exports = ReactDOMFeatureFlags;
  12861. /***/ }),
  12862. /* 120 */
  12863. /***/ (function(module, exports, __webpack_require__) {
  12864. "use strict";
  12865. /**
  12866. * Copyright 2013-present, Facebook, Inc.
  12867. * All rights reserved.
  12868. *
  12869. * This source code is licensed under the BSD-style license found in the
  12870. * LICENSE file in the root directory of this source tree. An additional grant
  12871. * of patent rights can be found in the PATENTS file in the same directory.
  12872. *
  12873. */
  12874. var DOMChildrenOperations = __webpack_require__(34);
  12875. var ReactDOMComponentTree = __webpack_require__(5);
  12876. /**
  12877. * Operations used to process updates to DOM nodes.
  12878. */
  12879. var ReactDOMIDOperations = {
  12880. /**
  12881. * Updates a component's children by processing a series of updates.
  12882. *
  12883. * @param {array<object>} updates List of update configurations.
  12884. * @internal
  12885. */
  12886. dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
  12887. var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
  12888. DOMChildrenOperations.processUpdates(node, updates);
  12889. }
  12890. };
  12891. module.exports = ReactDOMIDOperations;
  12892. /***/ }),
  12893. /* 121 */
  12894. /***/ (function(module, exports, __webpack_require__) {
  12895. "use strict";
  12896. /* WEBPACK VAR INJECTION */(function(process) {/**
  12897. * Copyright 2013-present, Facebook, Inc.
  12898. * All rights reserved.
  12899. *
  12900. * This source code is licensed under the BSD-style license found in the
  12901. * LICENSE file in the root directory of this source tree. An additional grant
  12902. * of patent rights can be found in the PATENTS file in the same directory.
  12903. *
  12904. */
  12905. var _prodInvariant = __webpack_require__(3),
  12906. _assign = __webpack_require__(4);
  12907. var DOMPropertyOperations = __webpack_require__(58);
  12908. var LinkedValueUtils = __webpack_require__(38);
  12909. var ReactDOMComponentTree = __webpack_require__(5);
  12910. var ReactUpdates = __webpack_require__(10);
  12911. var invariant = __webpack_require__(1);
  12912. var warning = __webpack_require__(2);
  12913. var didWarnValueLink = false;
  12914. var didWarnCheckedLink = false;
  12915. var didWarnValueDefaultValue = false;
  12916. var didWarnCheckedDefaultChecked = false;
  12917. var didWarnControlledToUncontrolled = false;
  12918. var didWarnUncontrolledToControlled = false;
  12919. function forceUpdateIfMounted() {
  12920. if (this._rootNodeID) {
  12921. // DOM component is still mounted; update
  12922. ReactDOMInput.updateWrapper(this);
  12923. }
  12924. }
  12925. function isControlled(props) {
  12926. var usesChecked = props.type === 'checkbox' || props.type === 'radio';
  12927. return usesChecked ? props.checked != null : props.value != null;
  12928. }
  12929. /**
  12930. * Implements an <input> host component that allows setting these optional
  12931. * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
  12932. *
  12933. * If `checked` or `value` are not supplied (or null/undefined), user actions
  12934. * that affect the checked state or value will trigger updates to the element.
  12935. *
  12936. * If they are supplied (and not null/undefined), the rendered element will not
  12937. * trigger updates to the element. Instead, the props must change in order for
  12938. * the rendered element to be updated.
  12939. *
  12940. * The rendered element will be initialized as unchecked (or `defaultChecked`)
  12941. * with an empty value (or `defaultValue`).
  12942. *
  12943. * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
  12944. */
  12945. var ReactDOMInput = {
  12946. getHostProps: function (inst, props) {
  12947. var value = LinkedValueUtils.getValue(props);
  12948. var checked = LinkedValueUtils.getChecked(props);
  12949. var hostProps = _assign({
  12950. // Make sure we set .type before any other properties (setting .value
  12951. // before .type means .value is lost in IE11 and below)
  12952. type: undefined,
  12953. // Make sure we set .step before .value (setting .value before .step
  12954. // means .value is rounded on mount, based upon step precision)
  12955. step: undefined,
  12956. // Make sure we set .min & .max before .value (to ensure proper order
  12957. // in corner cases such as min or max deriving from value, e.g. Issue #7170)
  12958. min: undefined,
  12959. max: undefined
  12960. }, props, {
  12961. defaultChecked: undefined,
  12962. defaultValue: undefined,
  12963. value: value != null ? value : inst._wrapperState.initialValue,
  12964. checked: checked != null ? checked : inst._wrapperState.initialChecked,
  12965. onChange: inst._wrapperState.onChange
  12966. });
  12967. return hostProps;
  12968. },
  12969. mountWrapper: function (inst, props) {
  12970. if (process.env.NODE_ENV !== 'production') {
  12971. LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
  12972. var owner = inst._currentElement._owner;
  12973. if (props.valueLink !== undefined && !didWarnValueLink) {
  12974. process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
  12975. didWarnValueLink = true;
  12976. }
  12977. if (props.checkedLink !== undefined && !didWarnCheckedLink) {
  12978. process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
  12979. didWarnCheckedLink = true;
  12980. }
  12981. if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
  12982. process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
  12983. didWarnCheckedDefaultChecked = true;
  12984. }
  12985. if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
  12986. process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
  12987. didWarnValueDefaultValue = true;
  12988. }
  12989. }
  12990. var defaultValue = props.defaultValue;
  12991. inst._wrapperState = {
  12992. initialChecked: props.checked != null ? props.checked : props.defaultChecked,
  12993. initialValue: props.value != null ? props.value : defaultValue,
  12994. listeners: null,
  12995. onChange: _handleChange.bind(inst),
  12996. controlled: isControlled(props)
  12997. };
  12998. },
  12999. updateWrapper: function (inst) {
  13000. var props = inst._currentElement.props;
  13001. if (process.env.NODE_ENV !== 'production') {
  13002. var controlled = isControlled(props);
  13003. var owner = inst._currentElement._owner;
  13004. if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
  13005. process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
  13006. didWarnUncontrolledToControlled = true;
  13007. }
  13008. if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
  13009. process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
  13010. didWarnControlledToUncontrolled = true;
  13011. }
  13012. }
  13013. // TODO: Shouldn't this be getChecked(props)?
  13014. var checked = props.checked;
  13015. if (checked != null) {
  13016. DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
  13017. }
  13018. var node = ReactDOMComponentTree.getNodeFromInstance(inst);
  13019. var value = LinkedValueUtils.getValue(props);
  13020. if (value != null) {
  13021. if (value === 0 && node.value === '') {
  13022. node.value = '0';
  13023. // Note: IE9 reports a number inputs as 'text', so check props instead.
  13024. } else if (props.type === 'number') {
  13025. // Simulate `input.valueAsNumber`. IE9 does not support it
  13026. var valueAsNumber = parseFloat(node.value, 10) || 0;
  13027. // eslint-disable-next-line
  13028. if (value != valueAsNumber) {
  13029. // Cast `value` to a string to ensure the value is set correctly. While
  13030. // browsers typically do this as necessary, jsdom doesn't.
  13031. node.value = '' + value;
  13032. }
  13033. // eslint-disable-next-line
  13034. } else if (value != node.value) {
  13035. // Cast `value` to a string to ensure the value is set correctly. While
  13036. // browsers typically do this as necessary, jsdom doesn't.
  13037. node.value = '' + value;
  13038. }
  13039. } else {
  13040. if (props.value == null && props.defaultValue != null) {
  13041. // In Chrome, assigning defaultValue to certain input types triggers input validation.
  13042. // For number inputs, the display value loses trailing decimal points. For email inputs,
  13043. // Chrome raises "The specified value <x> is not a valid email address".
  13044. //
  13045. // Here we check to see if the defaultValue has actually changed, avoiding these problems
  13046. // when the user is inputting text
  13047. //
  13048. // https://github.com/facebook/react/issues/7253
  13049. if (node.defaultValue !== '' + props.defaultValue) {
  13050. node.defaultValue = '' + props.defaultValue;
  13051. }
  13052. }
  13053. if (props.checked == null && props.defaultChecked != null) {
  13054. node.defaultChecked = !!props.defaultChecked;
  13055. }
  13056. }
  13057. },
  13058. postMountWrapper: function (inst) {
  13059. var props = inst._currentElement.props;
  13060. // This is in postMount because we need access to the DOM node, which is not
  13061. // available until after the component has mounted.
  13062. var node = ReactDOMComponentTree.getNodeFromInstance(inst);
  13063. // Detach value from defaultValue. We won't do anything if we're working on
  13064. // submit or reset inputs as those values & defaultValues are linked. They
  13065. // are not resetable nodes so this operation doesn't matter and actually
  13066. // removes browser-default values (eg "Submit Query") when no value is
  13067. // provided.
  13068. switch (props.type) {
  13069. case 'submit':
  13070. case 'reset':
  13071. break;
  13072. case 'color':
  13073. case 'date':
  13074. case 'datetime':
  13075. case 'datetime-local':
  13076. case 'month':
  13077. case 'time':
  13078. case 'week':
  13079. // This fixes the no-show issue on iOS Safari and Android Chrome:
  13080. // https://github.com/facebook/react/issues/7233
  13081. node.value = '';
  13082. node.value = node.defaultValue;
  13083. break;
  13084. default:
  13085. node.value = node.value;
  13086. break;
  13087. }
  13088. // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
  13089. // this is needed to work around a chrome bug where setting defaultChecked
  13090. // will sometimes influence the value of checked (even after detachment).
  13091. // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
  13092. // We need to temporarily unset name to avoid disrupting radio button groups.
  13093. var name = node.name;
  13094. if (name !== '') {
  13095. node.name = '';
  13096. }
  13097. node.defaultChecked = !node.defaultChecked;
  13098. node.defaultChecked = !node.defaultChecked;
  13099. if (name !== '') {
  13100. node.name = name;
  13101. }
  13102. }
  13103. };
  13104. function _handleChange(event) {
  13105. var props = this._currentElement.props;
  13106. var returnValue = LinkedValueUtils.executeOnChange(props, event);
  13107. // Here we use asap to wait until all updates have propagated, which
  13108. // is important when using controlled components within layers:
  13109. // https://github.com/facebook/react/issues/1698
  13110. ReactUpdates.asap(forceUpdateIfMounted, this);
  13111. var name = props.name;
  13112. if (props.type === 'radio' && name != null) {
  13113. var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
  13114. var queryRoot = rootNode;
  13115. while (queryRoot.parentNode) {
  13116. queryRoot = queryRoot.parentNode;
  13117. }
  13118. // If `rootNode.form` was non-null, then we could try `form.elements`,
  13119. // but that sometimes behaves strangely in IE8. We could also try using
  13120. // `form.getElementsByName`, but that will only return direct children
  13121. // and won't include inputs that use the HTML5 `form=` attribute. Since
  13122. // the input might not even be in a form, let's just use the global
  13123. // `querySelectorAll` to ensure we don't miss anything.
  13124. var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
  13125. for (var i = 0; i < group.length; i++) {
  13126. var otherNode = group[i];
  13127. if (otherNode === rootNode || otherNode.form !== rootNode.form) {
  13128. continue;
  13129. }
  13130. // This will throw if radio buttons rendered by different copies of React
  13131. // and the same name are rendered into the same form (same as #1939).
  13132. // That's probably okay; we don't support it just as we don't support
  13133. // mixing React radio buttons with non-React ones.
  13134. var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
  13135. !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
  13136. // If this is a controlled radio button group, forcing the input that
  13137. // was previously checked to update will cause it to be come re-checked
  13138. // as appropriate.
  13139. ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
  13140. }
  13141. }
  13142. return returnValue;
  13143. }
  13144. module.exports = ReactDOMInput;
  13145. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  13146. /***/ }),
  13147. /* 122 */
  13148. /***/ (function(module, exports, __webpack_require__) {
  13149. "use strict";
  13150. /* WEBPACK VAR INJECTION */(function(process) {/**
  13151. * Copyright 2013-present, Facebook, Inc.
  13152. * All rights reserved.
  13153. *
  13154. * This source code is licensed under the BSD-style license found in the
  13155. * LICENSE file in the root directory of this source tree. An additional grant
  13156. * of patent rights can be found in the PATENTS file in the same directory.
  13157. *
  13158. */
  13159. var DOMProperty = __webpack_require__(13);
  13160. var ReactComponentTreeHook = __webpack_require__(7);
  13161. var warning = __webpack_require__(2);
  13162. var warnedProperties = {};
  13163. var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
  13164. function validateProperty(tagName, name, debugID) {
  13165. if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
  13166. return true;
  13167. }
  13168. if (rARIA.test(name)) {
  13169. var lowerCasedName = name.toLowerCase();
  13170. var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
  13171. // If this is an aria-* attribute, but is not listed in the known DOM
  13172. // DOM properties, then it is an invalid aria-* attribute.
  13173. if (standardName == null) {
  13174. warnedProperties[name] = true;
  13175. return false;
  13176. }
  13177. // aria-* attributes should be lowercase; suggest the lowercase version.
  13178. if (name !== standardName) {
  13179. process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  13180. warnedProperties[name] = true;
  13181. return true;
  13182. }
  13183. }
  13184. return true;
  13185. }
  13186. function warnInvalidARIAProps(debugID, element) {
  13187. var invalidProps = [];
  13188. for (var key in element.props) {
  13189. var isValid = validateProperty(element.type, key, debugID);
  13190. if (!isValid) {
  13191. invalidProps.push(key);
  13192. }
  13193. }
  13194. var unknownPropString = invalidProps.map(function (prop) {
  13195. return '`' + prop + '`';
  13196. }).join(', ');
  13197. if (invalidProps.length === 1) {
  13198. process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  13199. } else if (invalidProps.length > 1) {
  13200. process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  13201. }
  13202. }
  13203. function handleElement(debugID, element) {
  13204. if (element == null || typeof element.type !== 'string') {
  13205. return;
  13206. }
  13207. if (element.type.indexOf('-') >= 0 || element.props.is) {
  13208. return;
  13209. }
  13210. warnInvalidARIAProps(debugID, element);
  13211. }
  13212. var ReactDOMInvalidARIAHook = {
  13213. onBeforeMountComponent: function (debugID, element) {
  13214. if (process.env.NODE_ENV !== 'production') {
  13215. handleElement(debugID, element);
  13216. }
  13217. },
  13218. onBeforeUpdateComponent: function (debugID, element) {
  13219. if (process.env.NODE_ENV !== 'production') {
  13220. handleElement(debugID, element);
  13221. }
  13222. }
  13223. };
  13224. module.exports = ReactDOMInvalidARIAHook;
  13225. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  13226. /***/ }),
  13227. /* 123 */
  13228. /***/ (function(module, exports, __webpack_require__) {
  13229. "use strict";
  13230. /* WEBPACK VAR INJECTION */(function(process) {/**
  13231. * Copyright 2013-present, Facebook, Inc.
  13232. * All rights reserved.
  13233. *
  13234. * This source code is licensed under the BSD-style license found in the
  13235. * LICENSE file in the root directory of this source tree. An additional grant
  13236. * of patent rights can be found in the PATENTS file in the same directory.
  13237. *
  13238. */
  13239. var ReactComponentTreeHook = __webpack_require__(7);
  13240. var warning = __webpack_require__(2);
  13241. var didWarnValueNull = false;
  13242. function handleElement(debugID, element) {
  13243. if (element == null) {
  13244. return;
  13245. }
  13246. if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
  13247. return;
  13248. }
  13249. if (element.props != null && element.props.value === null && !didWarnValueNull) {
  13250. process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  13251. didWarnValueNull = true;
  13252. }
  13253. }
  13254. var ReactDOMNullInputValuePropHook = {
  13255. onBeforeMountComponent: function (debugID, element) {
  13256. handleElement(debugID, element);
  13257. },
  13258. onBeforeUpdateComponent: function (debugID, element) {
  13259. handleElement(debugID, element);
  13260. }
  13261. };
  13262. module.exports = ReactDOMNullInputValuePropHook;
  13263. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  13264. /***/ }),
  13265. /* 124 */
  13266. /***/ (function(module, exports, __webpack_require__) {
  13267. "use strict";
  13268. /* WEBPACK VAR INJECTION */(function(process) {/**
  13269. * Copyright 2013-present, Facebook, Inc.
  13270. * All rights reserved.
  13271. *
  13272. * This source code is licensed under the BSD-style license found in the
  13273. * LICENSE file in the root directory of this source tree. An additional grant
  13274. * of patent rights can be found in the PATENTS file in the same directory.
  13275. *
  13276. */
  13277. var _assign = __webpack_require__(4);
  13278. var React = __webpack_require__(19);
  13279. var ReactDOMComponentTree = __webpack_require__(5);
  13280. var ReactDOMSelect = __webpack_require__(60);
  13281. var warning = __webpack_require__(2);
  13282. var didWarnInvalidOptionChildren = false;
  13283. function flattenChildren(children) {
  13284. var content = '';
  13285. // Flatten children and warn if they aren't strings or numbers;
  13286. // invalid types are ignored.
  13287. React.Children.forEach(children, function (child) {
  13288. if (child == null) {
  13289. return;
  13290. }
  13291. if (typeof child === 'string' || typeof child === 'number') {
  13292. content += child;
  13293. } else if (!didWarnInvalidOptionChildren) {
  13294. didWarnInvalidOptionChildren = true;
  13295. process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
  13296. }
  13297. });
  13298. return content;
  13299. }
  13300. /**
  13301. * Implements an <option> host component that warns when `selected` is set.
  13302. */
  13303. var ReactDOMOption = {
  13304. mountWrapper: function (inst, props, hostParent) {
  13305. // TODO (yungsters): Remove support for `selected` in <option>.
  13306. if (process.env.NODE_ENV !== 'production') {
  13307. process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
  13308. }
  13309. // Look up whether this option is 'selected'
  13310. var selectValue = null;
  13311. if (hostParent != null) {
  13312. var selectParent = hostParent;
  13313. if (selectParent._tag === 'optgroup') {
  13314. selectParent = selectParent._hostParent;
  13315. }
  13316. if (selectParent != null && selectParent._tag === 'select') {
  13317. selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
  13318. }
  13319. }
  13320. // If the value is null (e.g., no specified value or after initial mount)
  13321. // or missing (e.g., for <datalist>), we don't change props.selected
  13322. var selected = null;
  13323. if (selectValue != null) {
  13324. var value;
  13325. if (props.value != null) {
  13326. value = props.value + '';
  13327. } else {
  13328. value = flattenChildren(props.children);
  13329. }
  13330. selected = false;
  13331. if (Array.isArray(selectValue)) {
  13332. // multiple
  13333. for (var i = 0; i < selectValue.length; i++) {
  13334. if ('' + selectValue[i] === value) {
  13335. selected = true;
  13336. break;
  13337. }
  13338. }
  13339. } else {
  13340. selected = '' + selectValue === value;
  13341. }
  13342. }
  13343. inst._wrapperState = { selected: selected };
  13344. },
  13345. postMountWrapper: function (inst) {
  13346. // value="" should make a value attribute (#6219)
  13347. var props = inst._currentElement.props;
  13348. if (props.value != null) {
  13349. var node = ReactDOMComponentTree.getNodeFromInstance(inst);
  13350. node.setAttribute('value', props.value);
  13351. }
  13352. },
  13353. getHostProps: function (inst, props) {
  13354. var hostProps = _assign({ selected: undefined, children: undefined }, props);
  13355. // Read state only from initial mount because <select> updates value
  13356. // manually; we need the initial state only for server rendering
  13357. if (inst._wrapperState.selected != null) {
  13358. hostProps.selected = inst._wrapperState.selected;
  13359. }
  13360. var content = flattenChildren(props.children);
  13361. if (content) {
  13362. hostProps.children = content;
  13363. }
  13364. return hostProps;
  13365. }
  13366. };
  13367. module.exports = ReactDOMOption;
  13368. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  13369. /***/ }),
  13370. /* 125 */
  13371. /***/ (function(module, exports, __webpack_require__) {
  13372. "use strict";
  13373. /**
  13374. * Copyright 2013-present, Facebook, Inc.
  13375. * All rights reserved.
  13376. *
  13377. * This source code is licensed under the BSD-style license found in the
  13378. * LICENSE file in the root directory of this source tree. An additional grant
  13379. * of patent rights can be found in the PATENTS file in the same directory.
  13380. *
  13381. */
  13382. var ExecutionEnvironment = __webpack_require__(6);
  13383. var getNodeForCharacterOffset = __webpack_require__(168);
  13384. var getTextContentAccessor = __webpack_require__(72);
  13385. /**
  13386. * While `isCollapsed` is available on the Selection object and `collapsed`
  13387. * is available on the Range object, IE11 sometimes gets them wrong.
  13388. * If the anchor/focus nodes and offsets are the same, the range is collapsed.
  13389. */
  13390. function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
  13391. return anchorNode === focusNode && anchorOffset === focusOffset;
  13392. }
  13393. /**
  13394. * Get the appropriate anchor and focus node/offset pairs for IE.
  13395. *
  13396. * The catch here is that IE's selection API doesn't provide information
  13397. * about whether the selection is forward or backward, so we have to
  13398. * behave as though it's always forward.
  13399. *
  13400. * IE text differs from modern selection in that it behaves as though
  13401. * block elements end with a new line. This means character offsets will
  13402. * differ between the two APIs.
  13403. *
  13404. * @param {DOMElement} node
  13405. * @return {object}
  13406. */
  13407. function getIEOffsets(node) {
  13408. var selection = document.selection;
  13409. var selectedRange = selection.createRange();
  13410. var selectedLength = selectedRange.text.length;
  13411. // Duplicate selection so we can move range without breaking user selection.
  13412. var fromStart = selectedRange.duplicate();
  13413. fromStart.moveToElementText(node);
  13414. fromStart.setEndPoint('EndToStart', selectedRange);
  13415. var startOffset = fromStart.text.length;
  13416. var endOffset = startOffset + selectedLength;
  13417. return {
  13418. start: startOffset,
  13419. end: endOffset
  13420. };
  13421. }
  13422. /**
  13423. * @param {DOMElement} node
  13424. * @return {?object}
  13425. */
  13426. function getModernOffsets(node) {
  13427. var selection = window.getSelection && window.getSelection();
  13428. if (!selection || selection.rangeCount === 0) {
  13429. return null;
  13430. }
  13431. var anchorNode = selection.anchorNode;
  13432. var anchorOffset = selection.anchorOffset;
  13433. var focusNode = selection.focusNode;
  13434. var focusOffset = selection.focusOffset;
  13435. var currentRange = selection.getRangeAt(0);
  13436. // In Firefox, range.startContainer and range.endContainer can be "anonymous
  13437. // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
  13438. // divs do not seem to expose properties, triggering a "Permission denied
  13439. // error" if any of its properties are accessed. The only seemingly possible
  13440. // way to avoid erroring is to access a property that typically works for
  13441. // non-anonymous divs and catch any error that may otherwise arise. See
  13442. // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
  13443. try {
  13444. /* eslint-disable no-unused-expressions */
  13445. currentRange.startContainer.nodeType;
  13446. currentRange.endContainer.nodeType;
  13447. /* eslint-enable no-unused-expressions */
  13448. } catch (e) {
  13449. return null;
  13450. }
  13451. // If the node and offset values are the same, the selection is collapsed.
  13452. // `Selection.isCollapsed` is available natively, but IE sometimes gets
  13453. // this value wrong.
  13454. var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
  13455. var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
  13456. var tempRange = currentRange.cloneRange();
  13457. tempRange.selectNodeContents(node);
  13458. tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
  13459. var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
  13460. var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
  13461. var end = start + rangeLength;
  13462. // Detect whether the selection is backward.
  13463. var detectionRange = document.createRange();
  13464. detectionRange.setStart(anchorNode, anchorOffset);
  13465. detectionRange.setEnd(focusNode, focusOffset);
  13466. var isBackward = detectionRange.collapsed;
  13467. return {
  13468. start: isBackward ? end : start,
  13469. end: isBackward ? start : end
  13470. };
  13471. }
  13472. /**
  13473. * @param {DOMElement|DOMTextNode} node
  13474. * @param {object} offsets
  13475. */
  13476. function setIEOffsets(node, offsets) {
  13477. var range = document.selection.createRange().duplicate();
  13478. var start, end;
  13479. if (offsets.end === undefined) {
  13480. start = offsets.start;
  13481. end = start;
  13482. } else if (offsets.start > offsets.end) {
  13483. start = offsets.end;
  13484. end = offsets.start;
  13485. } else {
  13486. start = offsets.start;
  13487. end = offsets.end;
  13488. }
  13489. range.moveToElementText(node);
  13490. range.moveStart('character', start);
  13491. range.setEndPoint('EndToStart', range);
  13492. range.moveEnd('character', end - start);
  13493. range.select();
  13494. }
  13495. /**
  13496. * In modern non-IE browsers, we can support both forward and backward
  13497. * selections.
  13498. *
  13499. * Note: IE10+ supports the Selection object, but it does not support
  13500. * the `extend` method, which means that even in modern IE, it's not possible
  13501. * to programmatically create a backward selection. Thus, for all IE
  13502. * versions, we use the old IE API to create our selections.
  13503. *
  13504. * @param {DOMElement|DOMTextNode} node
  13505. * @param {object} offsets
  13506. */
  13507. function setModernOffsets(node, offsets) {
  13508. if (!window.getSelection) {
  13509. return;
  13510. }
  13511. var selection = window.getSelection();
  13512. var length = node[getTextContentAccessor()].length;
  13513. var start = Math.min(offsets.start, length);
  13514. var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
  13515. // IE 11 uses modern selection, but doesn't support the extend method.
  13516. // Flip backward selections, so we can set with a single range.
  13517. if (!selection.extend && start > end) {
  13518. var temp = end;
  13519. end = start;
  13520. start = temp;
  13521. }
  13522. var startMarker = getNodeForCharacterOffset(node, start);
  13523. var endMarker = getNodeForCharacterOffset(node, end);
  13524. if (startMarker && endMarker) {
  13525. var range = document.createRange();
  13526. range.setStart(startMarker.node, startMarker.offset);
  13527. selection.removeAllRanges();
  13528. if (start > end) {
  13529. selection.addRange(range);
  13530. selection.extend(endMarker.node, endMarker.offset);
  13531. } else {
  13532. range.setEnd(endMarker.node, endMarker.offset);
  13533. selection.addRange(range);
  13534. }
  13535. }
  13536. }
  13537. var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
  13538. var ReactDOMSelection = {
  13539. /**
  13540. * @param {DOMElement} node
  13541. */
  13542. getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
  13543. /**
  13544. * @param {DOMElement|DOMTextNode} node
  13545. * @param {object} offsets
  13546. */
  13547. setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
  13548. };
  13549. module.exports = ReactDOMSelection;
  13550. /***/ }),
  13551. /* 126 */
  13552. /***/ (function(module, exports, __webpack_require__) {
  13553. "use strict";
  13554. /* WEBPACK VAR INJECTION */(function(process) {/**
  13555. * Copyright 2013-present, Facebook, Inc.
  13556. * All rights reserved.
  13557. *
  13558. * This source code is licensed under the BSD-style license found in the
  13559. * LICENSE file in the root directory of this source tree. An additional grant
  13560. * of patent rights can be found in the PATENTS file in the same directory.
  13561. *
  13562. */
  13563. var _prodInvariant = __webpack_require__(3),
  13564. _assign = __webpack_require__(4);
  13565. var DOMChildrenOperations = __webpack_require__(34);
  13566. var DOMLazyTree = __webpack_require__(17);
  13567. var ReactDOMComponentTree = __webpack_require__(5);
  13568. var escapeTextContentForBrowser = __webpack_require__(29);
  13569. var invariant = __webpack_require__(1);
  13570. var validateDOMNesting = __webpack_require__(48);
  13571. /**
  13572. * Text nodes violate a couple assumptions that React makes about components:
  13573. *
  13574. * - When mounting text into the DOM, adjacent text nodes are merged.
  13575. * - Text nodes cannot be assigned a React root ID.
  13576. *
  13577. * This component is used to wrap strings between comment nodes so that they
  13578. * can undergo the same reconciliation that is applied to elements.
  13579. *
  13580. * TODO: Investigate representing React components in the DOM with text nodes.
  13581. *
  13582. * @class ReactDOMTextComponent
  13583. * @extends ReactComponent
  13584. * @internal
  13585. */
  13586. var ReactDOMTextComponent = function (text) {
  13587. // TODO: This is really a ReactText (ReactNode), not a ReactElement
  13588. this._currentElement = text;
  13589. this._stringText = '' + text;
  13590. // ReactDOMComponentTree uses these:
  13591. this._hostNode = null;
  13592. this._hostParent = null;
  13593. // Properties
  13594. this._domID = 0;
  13595. this._mountIndex = 0;
  13596. this._closingComment = null;
  13597. this._commentNodes = null;
  13598. };
  13599. _assign(ReactDOMTextComponent.prototype, {
  13600. /**
  13601. * Creates the markup for this text node. This node is not intended to have
  13602. * any features besides containing text content.
  13603. *
  13604. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
  13605. * @return {string} Markup for this text node.
  13606. * @internal
  13607. */
  13608. mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
  13609. if (process.env.NODE_ENV !== 'production') {
  13610. var parentInfo;
  13611. if (hostParent != null) {
  13612. parentInfo = hostParent._ancestorInfo;
  13613. } else if (hostContainerInfo != null) {
  13614. parentInfo = hostContainerInfo._ancestorInfo;
  13615. }
  13616. if (parentInfo) {
  13617. // parentInfo should always be present except for the top-level
  13618. // component when server rendering
  13619. validateDOMNesting(null, this._stringText, this, parentInfo);
  13620. }
  13621. }
  13622. var domID = hostContainerInfo._idCounter++;
  13623. var openingValue = ' react-text: ' + domID + ' ';
  13624. var closingValue = ' /react-text ';
  13625. this._domID = domID;
  13626. this._hostParent = hostParent;
  13627. if (transaction.useCreateElement) {
  13628. var ownerDocument = hostContainerInfo._ownerDocument;
  13629. var openingComment = ownerDocument.createComment(openingValue);
  13630. var closingComment = ownerDocument.createComment(closingValue);
  13631. var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
  13632. DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
  13633. if (this._stringText) {
  13634. DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
  13635. }
  13636. DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
  13637. ReactDOMComponentTree.precacheNode(this, openingComment);
  13638. this._closingComment = closingComment;
  13639. return lazyTree;
  13640. } else {
  13641. var escapedText = escapeTextContentForBrowser(this._stringText);
  13642. if (transaction.renderToStaticMarkup) {
  13643. // Normally we'd wrap this between comment nodes for the reasons stated
  13644. // above, but since this is a situation where React won't take over
  13645. // (static pages), we can simply return the text as it is.
  13646. return escapedText;
  13647. }
  13648. return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
  13649. }
  13650. },
  13651. /**
  13652. * Updates this component by updating the text content.
  13653. *
  13654. * @param {ReactText} nextText The next text content
  13655. * @param {ReactReconcileTransaction} transaction
  13656. * @internal
  13657. */
  13658. receiveComponent: function (nextText, transaction) {
  13659. if (nextText !== this._currentElement) {
  13660. this._currentElement = nextText;
  13661. var nextStringText = '' + nextText;
  13662. if (nextStringText !== this._stringText) {
  13663. // TODO: Save this as pending props and use performUpdateIfNecessary
  13664. // and/or updateComponent to do the actual update for consistency with
  13665. // other component types?
  13666. this._stringText = nextStringText;
  13667. var commentNodes = this.getHostNode();
  13668. DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
  13669. }
  13670. }
  13671. },
  13672. getHostNode: function () {
  13673. var hostNode = this._commentNodes;
  13674. if (hostNode) {
  13675. return hostNode;
  13676. }
  13677. if (!this._closingComment) {
  13678. var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
  13679. var node = openingComment.nextSibling;
  13680. while (true) {
  13681. !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
  13682. if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
  13683. this._closingComment = node;
  13684. break;
  13685. }
  13686. node = node.nextSibling;
  13687. }
  13688. }
  13689. hostNode = [this._hostNode, this._closingComment];
  13690. this._commentNodes = hostNode;
  13691. return hostNode;
  13692. },
  13693. unmountComponent: function () {
  13694. this._closingComment = null;
  13695. this._commentNodes = null;
  13696. ReactDOMComponentTree.uncacheNode(this);
  13697. }
  13698. });
  13699. module.exports = ReactDOMTextComponent;
  13700. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  13701. /***/ }),
  13702. /* 127 */
  13703. /***/ (function(module, exports, __webpack_require__) {
  13704. "use strict";
  13705. /* WEBPACK VAR INJECTION */(function(process) {/**
  13706. * Copyright 2013-present, Facebook, Inc.
  13707. * All rights reserved.
  13708. *
  13709. * This source code is licensed under the BSD-style license found in the
  13710. * LICENSE file in the root directory of this source tree. An additional grant
  13711. * of patent rights can be found in the PATENTS file in the same directory.
  13712. *
  13713. */
  13714. var _prodInvariant = __webpack_require__(3),
  13715. _assign = __webpack_require__(4);
  13716. var LinkedValueUtils = __webpack_require__(38);
  13717. var ReactDOMComponentTree = __webpack_require__(5);
  13718. var ReactUpdates = __webpack_require__(10);
  13719. var invariant = __webpack_require__(1);
  13720. var warning = __webpack_require__(2);
  13721. var didWarnValueLink = false;
  13722. var didWarnValDefaultVal = false;
  13723. function forceUpdateIfMounted() {
  13724. if (this._rootNodeID) {
  13725. // DOM component is still mounted; update
  13726. ReactDOMTextarea.updateWrapper(this);
  13727. }
  13728. }
  13729. /**
  13730. * Implements a <textarea> host component that allows setting `value`, and
  13731. * `defaultValue`. This differs from the traditional DOM API because value is
  13732. * usually set as PCDATA children.
  13733. *
  13734. * If `value` is not supplied (or null/undefined), user actions that affect the
  13735. * value will trigger updates to the element.
  13736. *
  13737. * If `value` is supplied (and not null/undefined), the rendered element will
  13738. * not trigger updates to the element. Instead, the `value` prop must change in
  13739. * order for the rendered element to be updated.
  13740. *
  13741. * The rendered element will be initialized with an empty value, the prop
  13742. * `defaultValue` if specified, or the children content (deprecated).
  13743. */
  13744. var ReactDOMTextarea = {
  13745. getHostProps: function (inst, props) {
  13746. !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
  13747. // Always set children to the same thing. In IE9, the selection range will
  13748. // get reset if `textContent` is mutated. We could add a check in setTextContent
  13749. // to only set the value if/when the value differs from the node value (which would
  13750. // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.
  13751. // The value can be a boolean or object so that's why it's forced to be a string.
  13752. var hostProps = _assign({}, props, {
  13753. value: undefined,
  13754. defaultValue: undefined,
  13755. children: '' + inst._wrapperState.initialValue,
  13756. onChange: inst._wrapperState.onChange
  13757. });
  13758. return hostProps;
  13759. },
  13760. mountWrapper: function (inst, props) {
  13761. if (process.env.NODE_ENV !== 'production') {
  13762. LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
  13763. if (props.valueLink !== undefined && !didWarnValueLink) {
  13764. process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
  13765. didWarnValueLink = true;
  13766. }
  13767. if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
  13768. process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
  13769. didWarnValDefaultVal = true;
  13770. }
  13771. }
  13772. var value = LinkedValueUtils.getValue(props);
  13773. var initialValue = value;
  13774. // Only bother fetching default value if we're going to use it
  13775. if (value == null) {
  13776. var defaultValue = props.defaultValue;
  13777. // TODO (yungsters): Remove support for children content in <textarea>.
  13778. var children = props.children;
  13779. if (children != null) {
  13780. if (process.env.NODE_ENV !== 'production') {
  13781. process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
  13782. }
  13783. !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
  13784. if (Array.isArray(children)) {
  13785. !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
  13786. children = children[0];
  13787. }
  13788. defaultValue = '' + children;
  13789. }
  13790. if (defaultValue == null) {
  13791. defaultValue = '';
  13792. }
  13793. initialValue = defaultValue;
  13794. }
  13795. inst._wrapperState = {
  13796. initialValue: '' + initialValue,
  13797. listeners: null,
  13798. onChange: _handleChange.bind(inst)
  13799. };
  13800. },
  13801. updateWrapper: function (inst) {
  13802. var props = inst._currentElement.props;
  13803. var node = ReactDOMComponentTree.getNodeFromInstance(inst);
  13804. var value = LinkedValueUtils.getValue(props);
  13805. if (value != null) {
  13806. // Cast `value` to a string to ensure the value is set correctly. While
  13807. // browsers typically do this as necessary, jsdom doesn't.
  13808. var newValue = '' + value;
  13809. // To avoid side effects (such as losing text selection), only set value if changed
  13810. if (newValue !== node.value) {
  13811. node.value = newValue;
  13812. }
  13813. if (props.defaultValue == null) {
  13814. node.defaultValue = newValue;
  13815. }
  13816. }
  13817. if (props.defaultValue != null) {
  13818. node.defaultValue = props.defaultValue;
  13819. }
  13820. },
  13821. postMountWrapper: function (inst) {
  13822. // This is in postMount because we need access to the DOM node, which is not
  13823. // available until after the component has mounted.
  13824. var node = ReactDOMComponentTree.getNodeFromInstance(inst);
  13825. var textContent = node.textContent;
  13826. // Only set node.value if textContent is equal to the expected
  13827. // initial value. In IE10/IE11 there is a bug where the placeholder attribute
  13828. // will populate textContent as well.
  13829. // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
  13830. if (textContent === inst._wrapperState.initialValue) {
  13831. node.value = textContent;
  13832. }
  13833. }
  13834. };
  13835. function _handleChange(event) {
  13836. var props = this._currentElement.props;
  13837. var returnValue = LinkedValueUtils.executeOnChange(props, event);
  13838. ReactUpdates.asap(forceUpdateIfMounted, this);
  13839. return returnValue;
  13840. }
  13841. module.exports = ReactDOMTextarea;
  13842. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  13843. /***/ }),
  13844. /* 128 */
  13845. /***/ (function(module, exports, __webpack_require__) {
  13846. "use strict";
  13847. /* WEBPACK VAR INJECTION */(function(process) {/**
  13848. * Copyright 2015-present, Facebook, Inc.
  13849. * All rights reserved.
  13850. *
  13851. * This source code is licensed under the BSD-style license found in the
  13852. * LICENSE file in the root directory of this source tree. An additional grant
  13853. * of patent rights can be found in the PATENTS file in the same directory.
  13854. *
  13855. */
  13856. var _prodInvariant = __webpack_require__(3);
  13857. var invariant = __webpack_require__(1);
  13858. /**
  13859. * Return the lowest common ancestor of A and B, or null if they are in
  13860. * different trees.
  13861. */
  13862. function getLowestCommonAncestor(instA, instB) {
  13863. !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
  13864. !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
  13865. var depthA = 0;
  13866. for (var tempA = instA; tempA; tempA = tempA._hostParent) {
  13867. depthA++;
  13868. }
  13869. var depthB = 0;
  13870. for (var tempB = instB; tempB; tempB = tempB._hostParent) {
  13871. depthB++;
  13872. }
  13873. // If A is deeper, crawl up.
  13874. while (depthA - depthB > 0) {
  13875. instA = instA._hostParent;
  13876. depthA--;
  13877. }
  13878. // If B is deeper, crawl up.
  13879. while (depthB - depthA > 0) {
  13880. instB = instB._hostParent;
  13881. depthB--;
  13882. }
  13883. // Walk in lockstep until we find a match.
  13884. var depth = depthA;
  13885. while (depth--) {
  13886. if (instA === instB) {
  13887. return instA;
  13888. }
  13889. instA = instA._hostParent;
  13890. instB = instB._hostParent;
  13891. }
  13892. return null;
  13893. }
  13894. /**
  13895. * Return if A is an ancestor of B.
  13896. */
  13897. function isAncestor(instA, instB) {
  13898. !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
  13899. !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
  13900. while (instB) {
  13901. if (instB === instA) {
  13902. return true;
  13903. }
  13904. instB = instB._hostParent;
  13905. }
  13906. return false;
  13907. }
  13908. /**
  13909. * Return the parent instance of the passed-in instance.
  13910. */
  13911. function getParentInstance(inst) {
  13912. !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
  13913. return inst._hostParent;
  13914. }
  13915. /**
  13916. * Simulates the traversal of a two-phase, capture/bubble event dispatch.
  13917. */
  13918. function traverseTwoPhase(inst, fn, arg) {
  13919. var path = [];
  13920. while (inst) {
  13921. path.push(inst);
  13922. inst = inst._hostParent;
  13923. }
  13924. var i;
  13925. for (i = path.length; i-- > 0;) {
  13926. fn(path[i], 'captured', arg);
  13927. }
  13928. for (i = 0; i < path.length; i++) {
  13929. fn(path[i], 'bubbled', arg);
  13930. }
  13931. }
  13932. /**
  13933. * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
  13934. * should would receive a `mouseEnter` or `mouseLeave` event.
  13935. *
  13936. * Does not invoke the callback on the nearest common ancestor because nothing
  13937. * "entered" or "left" that element.
  13938. */
  13939. function traverseEnterLeave(from, to, fn, argFrom, argTo) {
  13940. var common = from && to ? getLowestCommonAncestor(from, to) : null;
  13941. var pathFrom = [];
  13942. while (from && from !== common) {
  13943. pathFrom.push(from);
  13944. from = from._hostParent;
  13945. }
  13946. var pathTo = [];
  13947. while (to && to !== common) {
  13948. pathTo.push(to);
  13949. to = to._hostParent;
  13950. }
  13951. var i;
  13952. for (i = 0; i < pathFrom.length; i++) {
  13953. fn(pathFrom[i], 'bubbled', argFrom);
  13954. }
  13955. for (i = pathTo.length; i-- > 0;) {
  13956. fn(pathTo[i], 'captured', argTo);
  13957. }
  13958. }
  13959. module.exports = {
  13960. isAncestor: isAncestor,
  13961. getLowestCommonAncestor: getLowestCommonAncestor,
  13962. getParentInstance: getParentInstance,
  13963. traverseTwoPhase: traverseTwoPhase,
  13964. traverseEnterLeave: traverseEnterLeave
  13965. };
  13966. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  13967. /***/ }),
  13968. /* 129 */
  13969. /***/ (function(module, exports, __webpack_require__) {
  13970. "use strict";
  13971. /* WEBPACK VAR INJECTION */(function(process) {/**
  13972. * Copyright 2013-present, Facebook, Inc.
  13973. * All rights reserved.
  13974. *
  13975. * This source code is licensed under the BSD-style license found in the
  13976. * LICENSE file in the root directory of this source tree. An additional grant
  13977. * of patent rights can be found in the PATENTS file in the same directory.
  13978. *
  13979. */
  13980. var DOMProperty = __webpack_require__(13);
  13981. var EventPluginRegistry = __webpack_require__(25);
  13982. var ReactComponentTreeHook = __webpack_require__(7);
  13983. var warning = __webpack_require__(2);
  13984. if (process.env.NODE_ENV !== 'production') {
  13985. var reactProps = {
  13986. children: true,
  13987. dangerouslySetInnerHTML: true,
  13988. key: true,
  13989. ref: true,
  13990. autoFocus: true,
  13991. defaultValue: true,
  13992. valueLink: true,
  13993. defaultChecked: true,
  13994. checkedLink: true,
  13995. innerHTML: true,
  13996. suppressContentEditableWarning: true,
  13997. onFocusIn: true,
  13998. onFocusOut: true
  13999. };
  14000. var warnedProperties = {};
  14001. var validateProperty = function (tagName, name, debugID) {
  14002. if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
  14003. return true;
  14004. }
  14005. if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
  14006. return true;
  14007. }
  14008. if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
  14009. return true;
  14010. }
  14011. warnedProperties[name] = true;
  14012. var lowerCasedName = name.toLowerCase();
  14013. // data-* attributes should be lowercase; suggest the lowercase version
  14014. var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
  14015. var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
  14016. if (standardName != null) {
  14017. process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  14018. return true;
  14019. } else if (registrationName != null) {
  14020. process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  14021. return true;
  14022. } else {
  14023. // We were unable to guess which prop the user intended.
  14024. // It is likely that the user was just blindly spreading/forwarding props
  14025. // Components should be careful to only render valid props/attributes.
  14026. // Warning will be invoked in warnUnknownProperties to allow grouping.
  14027. return false;
  14028. }
  14029. };
  14030. }
  14031. var warnUnknownProperties = function (debugID, element) {
  14032. var unknownProps = [];
  14033. for (var key in element.props) {
  14034. var isValid = validateProperty(element.type, key, debugID);
  14035. if (!isValid) {
  14036. unknownProps.push(key);
  14037. }
  14038. }
  14039. var unknownPropString = unknownProps.map(function (prop) {
  14040. return '`' + prop + '`';
  14041. }).join(', ');
  14042. if (unknownProps.length === 1) {
  14043. process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  14044. } else if (unknownProps.length > 1) {
  14045. process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
  14046. }
  14047. };
  14048. function handleElement(debugID, element) {
  14049. if (element == null || typeof element.type !== 'string') {
  14050. return;
  14051. }
  14052. if (element.type.indexOf('-') >= 0 || element.props.is) {
  14053. return;
  14054. }
  14055. warnUnknownProperties(debugID, element);
  14056. }
  14057. var ReactDOMUnknownPropertyHook = {
  14058. onBeforeMountComponent: function (debugID, element) {
  14059. handleElement(debugID, element);
  14060. },
  14061. onBeforeUpdateComponent: function (debugID, element) {
  14062. handleElement(debugID, element);
  14063. }
  14064. };
  14065. module.exports = ReactDOMUnknownPropertyHook;
  14066. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  14067. /***/ }),
  14068. /* 130 */
  14069. /***/ (function(module, exports, __webpack_require__) {
  14070. "use strict";
  14071. /* WEBPACK VAR INJECTION */(function(process) {/**
  14072. * Copyright 2016-present, Facebook, Inc.
  14073. * All rights reserved.
  14074. *
  14075. * This source code is licensed under the BSD-style license found in the
  14076. * LICENSE file in the root directory of this source tree. An additional grant
  14077. * of patent rights can be found in the PATENTS file in the same directory.
  14078. *
  14079. *
  14080. */
  14081. var ReactInvalidSetStateWarningHook = __webpack_require__(138);
  14082. var ReactHostOperationHistoryHook = __webpack_require__(136);
  14083. var ReactComponentTreeHook = __webpack_require__(7);
  14084. var ExecutionEnvironment = __webpack_require__(6);
  14085. var performanceNow = __webpack_require__(99);
  14086. var warning = __webpack_require__(2);
  14087. var hooks = [];
  14088. var didHookThrowForEvent = {};
  14089. function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
  14090. try {
  14091. fn.call(context, arg1, arg2, arg3, arg4, arg5);
  14092. } catch (e) {
  14093. process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
  14094. didHookThrowForEvent[event] = true;
  14095. }
  14096. }
  14097. function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
  14098. for (var i = 0; i < hooks.length; i++) {
  14099. var hook = hooks[i];
  14100. var fn = hook[event];
  14101. if (fn) {
  14102. callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
  14103. }
  14104. }
  14105. }
  14106. var isProfiling = false;
  14107. var flushHistory = [];
  14108. var lifeCycleTimerStack = [];
  14109. var currentFlushNesting = 0;
  14110. var currentFlushMeasurements = [];
  14111. var currentFlushStartTime = 0;
  14112. var currentTimerDebugID = null;
  14113. var currentTimerStartTime = 0;
  14114. var currentTimerNestedFlushDuration = 0;
  14115. var currentTimerType = null;
  14116. var lifeCycleTimerHasWarned = false;
  14117. function clearHistory() {
  14118. ReactComponentTreeHook.purgeUnmountedComponents();
  14119. ReactHostOperationHistoryHook.clearHistory();
  14120. }
  14121. function getTreeSnapshot(registeredIDs) {
  14122. return registeredIDs.reduce(function (tree, id) {
  14123. var ownerID = ReactComponentTreeHook.getOwnerID(id);
  14124. var parentID = ReactComponentTreeHook.getParentID(id);
  14125. tree[id] = {
  14126. displayName: ReactComponentTreeHook.getDisplayName(id),
  14127. text: ReactComponentTreeHook.getText(id),
  14128. updateCount: ReactComponentTreeHook.getUpdateCount(id),
  14129. childIDs: ReactComponentTreeHook.getChildIDs(id),
  14130. // Text nodes don't have owners but this is close enough.
  14131. ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
  14132. parentID: parentID
  14133. };
  14134. return tree;
  14135. }, {});
  14136. }
  14137. function resetMeasurements() {
  14138. var previousStartTime = currentFlushStartTime;
  14139. var previousMeasurements = currentFlushMeasurements;
  14140. var previousOperations = ReactHostOperationHistoryHook.getHistory();
  14141. if (currentFlushNesting === 0) {
  14142. currentFlushStartTime = 0;
  14143. currentFlushMeasurements = [];
  14144. clearHistory();
  14145. return;
  14146. }
  14147. if (previousMeasurements.length || previousOperations.length) {
  14148. var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
  14149. flushHistory.push({
  14150. duration: performanceNow() - previousStartTime,
  14151. measurements: previousMeasurements || [],
  14152. operations: previousOperations || [],
  14153. treeSnapshot: getTreeSnapshot(registeredIDs)
  14154. });
  14155. }
  14156. clearHistory();
  14157. currentFlushStartTime = performanceNow();
  14158. currentFlushMeasurements = [];
  14159. }
  14160. function checkDebugID(debugID) {
  14161. var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  14162. if (allowRoot && debugID === 0) {
  14163. return;
  14164. }
  14165. if (!debugID) {
  14166. process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
  14167. }
  14168. }
  14169. function beginLifeCycleTimer(debugID, timerType) {
  14170. if (currentFlushNesting === 0) {
  14171. return;
  14172. }
  14173. if (currentTimerType && !lifeCycleTimerHasWarned) {
  14174. process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
  14175. lifeCycleTimerHasWarned = true;
  14176. }
  14177. currentTimerStartTime = performanceNow();
  14178. currentTimerNestedFlushDuration = 0;
  14179. currentTimerDebugID = debugID;
  14180. currentTimerType = timerType;
  14181. }
  14182. function endLifeCycleTimer(debugID, timerType) {
  14183. if (currentFlushNesting === 0) {
  14184. return;
  14185. }
  14186. if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
  14187. process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
  14188. lifeCycleTimerHasWarned = true;
  14189. }
  14190. if (isProfiling) {
  14191. currentFlushMeasurements.push({
  14192. timerType: timerType,
  14193. instanceID: debugID,
  14194. duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
  14195. });
  14196. }
  14197. currentTimerStartTime = 0;
  14198. currentTimerNestedFlushDuration = 0;
  14199. currentTimerDebugID = null;
  14200. currentTimerType = null;
  14201. }
  14202. function pauseCurrentLifeCycleTimer() {
  14203. var currentTimer = {
  14204. startTime: currentTimerStartTime,
  14205. nestedFlushStartTime: performanceNow(),
  14206. debugID: currentTimerDebugID,
  14207. timerType: currentTimerType
  14208. };
  14209. lifeCycleTimerStack.push(currentTimer);
  14210. currentTimerStartTime = 0;
  14211. currentTimerNestedFlushDuration = 0;
  14212. currentTimerDebugID = null;
  14213. currentTimerType = null;
  14214. }
  14215. function resumeCurrentLifeCycleTimer() {
  14216. var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
  14217. startTime = _lifeCycleTimerStack$.startTime,
  14218. nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
  14219. debugID = _lifeCycleTimerStack$.debugID,
  14220. timerType = _lifeCycleTimerStack$.timerType;
  14221. var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
  14222. currentTimerStartTime = startTime;
  14223. currentTimerNestedFlushDuration += nestedFlushDuration;
  14224. currentTimerDebugID = debugID;
  14225. currentTimerType = timerType;
  14226. }
  14227. var lastMarkTimeStamp = 0;
  14228. var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
  14229. function shouldMark(debugID) {
  14230. if (!isProfiling || !canUsePerformanceMeasure) {
  14231. return false;
  14232. }
  14233. var element = ReactComponentTreeHook.getElement(debugID);
  14234. if (element == null || typeof element !== 'object') {
  14235. return false;
  14236. }
  14237. var isHostElement = typeof element.type === 'string';
  14238. if (isHostElement) {
  14239. return false;
  14240. }
  14241. return true;
  14242. }
  14243. function markBegin(debugID, markType) {
  14244. if (!shouldMark(debugID)) {
  14245. return;
  14246. }
  14247. var markName = debugID + '::' + markType;
  14248. lastMarkTimeStamp = performanceNow();
  14249. performance.mark(markName);
  14250. }
  14251. function markEnd(debugID, markType) {
  14252. if (!shouldMark(debugID)) {
  14253. return;
  14254. }
  14255. var markName = debugID + '::' + markType;
  14256. var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
  14257. // Chrome has an issue of dropping markers recorded too fast:
  14258. // https://bugs.chromium.org/p/chromium/issues/detail?id=640652
  14259. // To work around this, we will not report very small measurements.
  14260. // I determined the magic number by tweaking it back and forth.
  14261. // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
  14262. // When the bug is fixed, we can `measure()` unconditionally if we want to.
  14263. var timeStamp = performanceNow();
  14264. if (timeStamp - lastMarkTimeStamp > 0.1) {
  14265. var measurementName = displayName + ' [' + markType + ']';
  14266. performance.measure(measurementName, markName);
  14267. }
  14268. performance.clearMarks(markName);
  14269. performance.clearMeasures(measurementName);
  14270. }
  14271. var ReactDebugTool = {
  14272. addHook: function (hook) {
  14273. hooks.push(hook);
  14274. },
  14275. removeHook: function (hook) {
  14276. for (var i = 0; i < hooks.length; i++) {
  14277. if (hooks[i] === hook) {
  14278. hooks.splice(i, 1);
  14279. i--;
  14280. }
  14281. }
  14282. },
  14283. isProfiling: function () {
  14284. return isProfiling;
  14285. },
  14286. beginProfiling: function () {
  14287. if (isProfiling) {
  14288. return;
  14289. }
  14290. isProfiling = true;
  14291. flushHistory.length = 0;
  14292. resetMeasurements();
  14293. ReactDebugTool.addHook(ReactHostOperationHistoryHook);
  14294. },
  14295. endProfiling: function () {
  14296. if (!isProfiling) {
  14297. return;
  14298. }
  14299. isProfiling = false;
  14300. resetMeasurements();
  14301. ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
  14302. },
  14303. getFlushHistory: function () {
  14304. return flushHistory;
  14305. },
  14306. onBeginFlush: function () {
  14307. currentFlushNesting++;
  14308. resetMeasurements();
  14309. pauseCurrentLifeCycleTimer();
  14310. emitEvent('onBeginFlush');
  14311. },
  14312. onEndFlush: function () {
  14313. resetMeasurements();
  14314. currentFlushNesting--;
  14315. resumeCurrentLifeCycleTimer();
  14316. emitEvent('onEndFlush');
  14317. },
  14318. onBeginLifeCycleTimer: function (debugID, timerType) {
  14319. checkDebugID(debugID);
  14320. emitEvent('onBeginLifeCycleTimer', debugID, timerType);
  14321. markBegin(debugID, timerType);
  14322. beginLifeCycleTimer(debugID, timerType);
  14323. },
  14324. onEndLifeCycleTimer: function (debugID, timerType) {
  14325. checkDebugID(debugID);
  14326. endLifeCycleTimer(debugID, timerType);
  14327. markEnd(debugID, timerType);
  14328. emitEvent('onEndLifeCycleTimer', debugID, timerType);
  14329. },
  14330. onBeginProcessingChildContext: function () {
  14331. emitEvent('onBeginProcessingChildContext');
  14332. },
  14333. onEndProcessingChildContext: function () {
  14334. emitEvent('onEndProcessingChildContext');
  14335. },
  14336. onHostOperation: function (operation) {
  14337. checkDebugID(operation.instanceID);
  14338. emitEvent('onHostOperation', operation);
  14339. },
  14340. onSetState: function () {
  14341. emitEvent('onSetState');
  14342. },
  14343. onSetChildren: function (debugID, childDebugIDs) {
  14344. checkDebugID(debugID);
  14345. childDebugIDs.forEach(checkDebugID);
  14346. emitEvent('onSetChildren', debugID, childDebugIDs);
  14347. },
  14348. onBeforeMountComponent: function (debugID, element, parentDebugID) {
  14349. checkDebugID(debugID);
  14350. checkDebugID(parentDebugID, true);
  14351. emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
  14352. markBegin(debugID, 'mount');
  14353. },
  14354. onMountComponent: function (debugID) {
  14355. checkDebugID(debugID);
  14356. markEnd(debugID, 'mount');
  14357. emitEvent('onMountComponent', debugID);
  14358. },
  14359. onBeforeUpdateComponent: function (debugID, element) {
  14360. checkDebugID(debugID);
  14361. emitEvent('onBeforeUpdateComponent', debugID, element);
  14362. markBegin(debugID, 'update');
  14363. },
  14364. onUpdateComponent: function (debugID) {
  14365. checkDebugID(debugID);
  14366. markEnd(debugID, 'update');
  14367. emitEvent('onUpdateComponent', debugID);
  14368. },
  14369. onBeforeUnmountComponent: function (debugID) {
  14370. checkDebugID(debugID);
  14371. emitEvent('onBeforeUnmountComponent', debugID);
  14372. markBegin(debugID, 'unmount');
  14373. },
  14374. onUnmountComponent: function (debugID) {
  14375. checkDebugID(debugID);
  14376. markEnd(debugID, 'unmount');
  14377. emitEvent('onUnmountComponent', debugID);
  14378. },
  14379. onTestEvent: function () {
  14380. emitEvent('onTestEvent');
  14381. }
  14382. };
  14383. // TODO remove these when RN/www gets updated
  14384. ReactDebugTool.addDevtool = ReactDebugTool.addHook;
  14385. ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
  14386. ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
  14387. ReactDebugTool.addHook(ReactComponentTreeHook);
  14388. var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
  14389. if (/[?&]react_perf\b/.test(url)) {
  14390. ReactDebugTool.beginProfiling();
  14391. }
  14392. module.exports = ReactDebugTool;
  14393. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  14394. /***/ }),
  14395. /* 131 */
  14396. /***/ (function(module, exports, __webpack_require__) {
  14397. "use strict";
  14398. /**
  14399. * Copyright 2013-present, Facebook, Inc.
  14400. * All rights reserved.
  14401. *
  14402. * This source code is licensed under the BSD-style license found in the
  14403. * LICENSE file in the root directory of this source tree. An additional grant
  14404. * of patent rights can be found in the PATENTS file in the same directory.
  14405. *
  14406. */
  14407. var _assign = __webpack_require__(4);
  14408. var ReactUpdates = __webpack_require__(10);
  14409. var Transaction = __webpack_require__(28);
  14410. var emptyFunction = __webpack_require__(9);
  14411. var RESET_BATCHED_UPDATES = {
  14412. initialize: emptyFunction,
  14413. close: function () {
  14414. ReactDefaultBatchingStrategy.isBatchingUpdates = false;
  14415. }
  14416. };
  14417. var FLUSH_BATCHED_UPDATES = {
  14418. initialize: emptyFunction,
  14419. close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
  14420. };
  14421. var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
  14422. function ReactDefaultBatchingStrategyTransaction() {
  14423. this.reinitializeTransaction();
  14424. }
  14425. _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
  14426. getTransactionWrappers: function () {
  14427. return TRANSACTION_WRAPPERS;
  14428. }
  14429. });
  14430. var transaction = new ReactDefaultBatchingStrategyTransaction();
  14431. var ReactDefaultBatchingStrategy = {
  14432. isBatchingUpdates: false,
  14433. /**
  14434. * Call the provided function in a context within which calls to `setState`
  14435. * and friends are batched such that components aren't updated unnecessarily.
  14436. */
  14437. batchedUpdates: function (callback, a, b, c, d, e) {
  14438. var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
  14439. ReactDefaultBatchingStrategy.isBatchingUpdates = true;
  14440. // The code is written this way to avoid extra allocations
  14441. if (alreadyBatchingUpdates) {
  14442. return callback(a, b, c, d, e);
  14443. } else {
  14444. return transaction.perform(callback, null, a, b, c, d, e);
  14445. }
  14446. }
  14447. };
  14448. module.exports = ReactDefaultBatchingStrategy;
  14449. /***/ }),
  14450. /* 132 */
  14451. /***/ (function(module, exports, __webpack_require__) {
  14452. "use strict";
  14453. /**
  14454. * Copyright 2013-present, Facebook, Inc.
  14455. * All rights reserved.
  14456. *
  14457. * This source code is licensed under the BSD-style license found in the
  14458. * LICENSE file in the root directory of this source tree. An additional grant
  14459. * of patent rights can be found in the PATENTS file in the same directory.
  14460. *
  14461. */
  14462. var ARIADOMPropertyConfig = __webpack_require__(102);
  14463. var BeforeInputEventPlugin = __webpack_require__(104);
  14464. var ChangeEventPlugin = __webpack_require__(106);
  14465. var DefaultEventPluginOrder = __webpack_require__(108);
  14466. var EnterLeaveEventPlugin = __webpack_require__(109);
  14467. var HTMLDOMPropertyConfig = __webpack_require__(111);
  14468. var ReactComponentBrowserEnvironment = __webpack_require__(113);
  14469. var ReactDOMComponent = __webpack_require__(116);
  14470. var ReactDOMComponentTree = __webpack_require__(5);
  14471. var ReactDOMEmptyComponent = __webpack_require__(118);
  14472. var ReactDOMTreeTraversal = __webpack_require__(128);
  14473. var ReactDOMTextComponent = __webpack_require__(126);
  14474. var ReactDefaultBatchingStrategy = __webpack_require__(131);
  14475. var ReactEventListener = __webpack_require__(135);
  14476. var ReactInjection = __webpack_require__(137);
  14477. var ReactReconcileTransaction = __webpack_require__(143);
  14478. var SVGDOMPropertyConfig = __webpack_require__(148);
  14479. var SelectEventPlugin = __webpack_require__(149);
  14480. var SimpleEventPlugin = __webpack_require__(150);
  14481. var alreadyInjected = false;
  14482. function inject() {
  14483. if (alreadyInjected) {
  14484. // TODO: This is currently true because these injections are shared between
  14485. // the client and the server package. They should be built independently
  14486. // and not share any injection state. Then this problem will be solved.
  14487. return;
  14488. }
  14489. alreadyInjected = true;
  14490. ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
  14491. /**
  14492. * Inject modules for resolving DOM hierarchy and plugin ordering.
  14493. */
  14494. ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
  14495. ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
  14496. ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
  14497. /**
  14498. * Some important event plugins included by default (without having to require
  14499. * them).
  14500. */
  14501. ReactInjection.EventPluginHub.injectEventPluginsByName({
  14502. SimpleEventPlugin: SimpleEventPlugin,
  14503. EnterLeaveEventPlugin: EnterLeaveEventPlugin,
  14504. ChangeEventPlugin: ChangeEventPlugin,
  14505. SelectEventPlugin: SelectEventPlugin,
  14506. BeforeInputEventPlugin: BeforeInputEventPlugin
  14507. });
  14508. ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
  14509. ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
  14510. ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
  14511. ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
  14512. ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
  14513. ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
  14514. return new ReactDOMEmptyComponent(instantiate);
  14515. });
  14516. ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
  14517. ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
  14518. ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
  14519. }
  14520. module.exports = {
  14521. inject: inject
  14522. };
  14523. /***/ }),
  14524. /* 133 */
  14525. /***/ (function(module, exports, __webpack_require__) {
  14526. "use strict";
  14527. /**
  14528. * Copyright 2014-present, Facebook, Inc.
  14529. * All rights reserved.
  14530. *
  14531. * This source code is licensed under the BSD-style license found in the
  14532. * LICENSE file in the root directory of this source tree. An additional grant
  14533. * of patent rights can be found in the PATENTS file in the same directory.
  14534. *
  14535. *
  14536. */
  14537. // The Symbol used to tag the ReactElement type. If there is no native Symbol
  14538. // nor polyfill, then a plain number is used for performance.
  14539. var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
  14540. module.exports = REACT_ELEMENT_TYPE;
  14541. /***/ }),
  14542. /* 134 */
  14543. /***/ (function(module, exports, __webpack_require__) {
  14544. "use strict";
  14545. /**
  14546. * Copyright 2013-present, Facebook, Inc.
  14547. * All rights reserved.
  14548. *
  14549. * This source code is licensed under the BSD-style license found in the
  14550. * LICENSE file in the root directory of this source tree. An additional grant
  14551. * of patent rights can be found in the PATENTS file in the same directory.
  14552. *
  14553. */
  14554. var EventPluginHub = __webpack_require__(21);
  14555. function runEventQueueInBatch(events) {
  14556. EventPluginHub.enqueueEvents(events);
  14557. EventPluginHub.processEventQueue(false);
  14558. }
  14559. var ReactEventEmitterMixin = {
  14560. /**
  14561. * Streams a fired top-level event to `EventPluginHub` where plugins have the
  14562. * opportunity to create `ReactEvent`s to be dispatched.
  14563. */
  14564. handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  14565. var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
  14566. runEventQueueInBatch(events);
  14567. }
  14568. };
  14569. module.exports = ReactEventEmitterMixin;
  14570. /***/ }),
  14571. /* 135 */
  14572. /***/ (function(module, exports, __webpack_require__) {
  14573. "use strict";
  14574. /**
  14575. * Copyright 2013-present, Facebook, Inc.
  14576. * All rights reserved.
  14577. *
  14578. * This source code is licensed under the BSD-style license found in the
  14579. * LICENSE file in the root directory of this source tree. An additional grant
  14580. * of patent rights can be found in the PATENTS file in the same directory.
  14581. *
  14582. */
  14583. var _assign = __webpack_require__(4);
  14584. var EventListener = __webpack_require__(51);
  14585. var ExecutionEnvironment = __webpack_require__(6);
  14586. var PooledClass = __webpack_require__(14);
  14587. var ReactDOMComponentTree = __webpack_require__(5);
  14588. var ReactUpdates = __webpack_require__(10);
  14589. var getEventTarget = __webpack_require__(45);
  14590. var getUnboundedScrollPosition = __webpack_require__(92);
  14591. /**
  14592. * Find the deepest React component completely containing the root of the
  14593. * passed-in instance (for use when entire React trees are nested within each
  14594. * other). If React trees are not nested, returns null.
  14595. */
  14596. function findParent(inst) {
  14597. // TODO: It may be a good idea to cache this to prevent unnecessary DOM
  14598. // traversal, but caching is difficult to do correctly without using a
  14599. // mutation observer to listen for all DOM changes.
  14600. while (inst._hostParent) {
  14601. inst = inst._hostParent;
  14602. }
  14603. var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
  14604. var container = rootNode.parentNode;
  14605. return ReactDOMComponentTree.getClosestInstanceFromNode(container);
  14606. }
  14607. // Used to store ancestor hierarchy in top level callback
  14608. function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
  14609. this.topLevelType = topLevelType;
  14610. this.nativeEvent = nativeEvent;
  14611. this.ancestors = [];
  14612. }
  14613. _assign(TopLevelCallbackBookKeeping.prototype, {
  14614. destructor: function () {
  14615. this.topLevelType = null;
  14616. this.nativeEvent = null;
  14617. this.ancestors.length = 0;
  14618. }
  14619. });
  14620. PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
  14621. function handleTopLevelImpl(bookKeeping) {
  14622. var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
  14623. var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
  14624. // Loop through the hierarchy, in case there's any nested components.
  14625. // It's important that we build the array of ancestors before calling any
  14626. // event handlers, because event handlers can modify the DOM, leading to
  14627. // inconsistencies with ReactMount's node cache. See #1105.
  14628. var ancestor = targetInst;
  14629. do {
  14630. bookKeeping.ancestors.push(ancestor);
  14631. ancestor = ancestor && findParent(ancestor);
  14632. } while (ancestor);
  14633. for (var i = 0; i < bookKeeping.ancestors.length; i++) {
  14634. targetInst = bookKeeping.ancestors[i];
  14635. ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
  14636. }
  14637. }
  14638. function scrollValueMonitor(cb) {
  14639. var scrollPosition = getUnboundedScrollPosition(window);
  14640. cb(scrollPosition);
  14641. }
  14642. var ReactEventListener = {
  14643. _enabled: true,
  14644. _handleTopLevel: null,
  14645. WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
  14646. setHandleTopLevel: function (handleTopLevel) {
  14647. ReactEventListener._handleTopLevel = handleTopLevel;
  14648. },
  14649. setEnabled: function (enabled) {
  14650. ReactEventListener._enabled = !!enabled;
  14651. },
  14652. isEnabled: function () {
  14653. return ReactEventListener._enabled;
  14654. },
  14655. /**
  14656. * Traps top-level events by using event bubbling.
  14657. *
  14658. * @param {string} topLevelType Record from `EventConstants`.
  14659. * @param {string} handlerBaseName Event name (e.g. "click").
  14660. * @param {object} element Element on which to attach listener.
  14661. * @return {?object} An object with a remove function which will forcefully
  14662. * remove the listener.
  14663. * @internal
  14664. */
  14665. trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
  14666. if (!element) {
  14667. return null;
  14668. }
  14669. return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
  14670. },
  14671. /**
  14672. * Traps a top-level event by using event capturing.
  14673. *
  14674. * @param {string} topLevelType Record from `EventConstants`.
  14675. * @param {string} handlerBaseName Event name (e.g. "click").
  14676. * @param {object} element Element on which to attach listener.
  14677. * @return {?object} An object with a remove function which will forcefully
  14678. * remove the listener.
  14679. * @internal
  14680. */
  14681. trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
  14682. if (!element) {
  14683. return null;
  14684. }
  14685. return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
  14686. },
  14687. monitorScrollValue: function (refresh) {
  14688. var callback = scrollValueMonitor.bind(null, refresh);
  14689. EventListener.listen(window, 'scroll', callback);
  14690. },
  14691. dispatchEvent: function (topLevelType, nativeEvent) {
  14692. if (!ReactEventListener._enabled) {
  14693. return;
  14694. }
  14695. var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
  14696. try {
  14697. // Event queue being processed in the same cycle allows
  14698. // `preventDefault`.
  14699. ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
  14700. } finally {
  14701. TopLevelCallbackBookKeeping.release(bookKeeping);
  14702. }
  14703. }
  14704. };
  14705. module.exports = ReactEventListener;
  14706. /***/ }),
  14707. /* 136 */
  14708. /***/ (function(module, exports, __webpack_require__) {
  14709. "use strict";
  14710. /**
  14711. * Copyright 2016-present, Facebook, Inc.
  14712. * All rights reserved.
  14713. *
  14714. * This source code is licensed under the BSD-style license found in the
  14715. * LICENSE file in the root directory of this source tree. An additional grant
  14716. * of patent rights can be found in the PATENTS file in the same directory.
  14717. *
  14718. *
  14719. */
  14720. var history = [];
  14721. var ReactHostOperationHistoryHook = {
  14722. onHostOperation: function (operation) {
  14723. history.push(operation);
  14724. },
  14725. clearHistory: function () {
  14726. if (ReactHostOperationHistoryHook._preventClearing) {
  14727. // Should only be used for tests.
  14728. return;
  14729. }
  14730. history = [];
  14731. },
  14732. getHistory: function () {
  14733. return history;
  14734. }
  14735. };
  14736. module.exports = ReactHostOperationHistoryHook;
  14737. /***/ }),
  14738. /* 137 */
  14739. /***/ (function(module, exports, __webpack_require__) {
  14740. "use strict";
  14741. /**
  14742. * Copyright 2013-present, Facebook, Inc.
  14743. * All rights reserved.
  14744. *
  14745. * This source code is licensed under the BSD-style license found in the
  14746. * LICENSE file in the root directory of this source tree. An additional grant
  14747. * of patent rights can be found in the PATENTS file in the same directory.
  14748. *
  14749. */
  14750. var DOMProperty = __webpack_require__(13);
  14751. var EventPluginHub = __webpack_require__(21);
  14752. var EventPluginUtils = __webpack_require__(36);
  14753. var ReactComponentEnvironment = __webpack_require__(39);
  14754. var ReactEmptyComponent = __webpack_require__(61);
  14755. var ReactBrowserEventEmitter = __webpack_require__(26);
  14756. var ReactHostComponent = __webpack_require__(63);
  14757. var ReactUpdates = __webpack_require__(10);
  14758. var ReactInjection = {
  14759. Component: ReactComponentEnvironment.injection,
  14760. DOMProperty: DOMProperty.injection,
  14761. EmptyComponent: ReactEmptyComponent.injection,
  14762. EventPluginHub: EventPluginHub.injection,
  14763. EventPluginUtils: EventPluginUtils.injection,
  14764. EventEmitter: ReactBrowserEventEmitter.injection,
  14765. HostComponent: ReactHostComponent.injection,
  14766. Updates: ReactUpdates.injection
  14767. };
  14768. module.exports = ReactInjection;
  14769. /***/ }),
  14770. /* 138 */
  14771. /***/ (function(module, exports, __webpack_require__) {
  14772. "use strict";
  14773. /* WEBPACK VAR INJECTION */(function(process) {/**
  14774. * Copyright 2016-present, Facebook, Inc.
  14775. * All rights reserved.
  14776. *
  14777. * This source code is licensed under the BSD-style license found in the
  14778. * LICENSE file in the root directory of this source tree. An additional grant
  14779. * of patent rights can be found in the PATENTS file in the same directory.
  14780. *
  14781. *
  14782. */
  14783. var warning = __webpack_require__(2);
  14784. if (process.env.NODE_ENV !== 'production') {
  14785. var processingChildContext = false;
  14786. var warnInvalidSetState = function () {
  14787. process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
  14788. };
  14789. }
  14790. var ReactInvalidSetStateWarningHook = {
  14791. onBeginProcessingChildContext: function () {
  14792. processingChildContext = true;
  14793. },
  14794. onEndProcessingChildContext: function () {
  14795. processingChildContext = false;
  14796. },
  14797. onSetState: function () {
  14798. warnInvalidSetState();
  14799. }
  14800. };
  14801. module.exports = ReactInvalidSetStateWarningHook;
  14802. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  14803. /***/ }),
  14804. /* 139 */
  14805. /***/ (function(module, exports, __webpack_require__) {
  14806. "use strict";
  14807. /**
  14808. * Copyright 2013-present, Facebook, Inc.
  14809. * All rights reserved.
  14810. *
  14811. * This source code is licensed under the BSD-style license found in the
  14812. * LICENSE file in the root directory of this source tree. An additional grant
  14813. * of patent rights can be found in the PATENTS file in the same directory.
  14814. *
  14815. */
  14816. var adler32 = __webpack_require__(161);
  14817. var TAG_END = /\/?>/;
  14818. var COMMENT_START = /^<\!\-\-/;
  14819. var ReactMarkupChecksum = {
  14820. CHECKSUM_ATTR_NAME: 'data-react-checksum',
  14821. /**
  14822. * @param {string} markup Markup string
  14823. * @return {string} Markup string with checksum attribute attached
  14824. */
  14825. addChecksumToMarkup: function (markup) {
  14826. var checksum = adler32(markup);
  14827. // Add checksum (handle both parent tags, comments and self-closing tags)
  14828. if (COMMENT_START.test(markup)) {
  14829. return markup;
  14830. } else {
  14831. return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
  14832. }
  14833. },
  14834. /**
  14835. * @param {string} markup to use
  14836. * @param {DOMElement} element root React element
  14837. * @returns {boolean} whether or not the markup is the same
  14838. */
  14839. canReuseMarkup: function (markup, element) {
  14840. var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
  14841. existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
  14842. var markupChecksum = adler32(markup);
  14843. return markupChecksum === existingChecksum;
  14844. }
  14845. };
  14846. module.exports = ReactMarkupChecksum;
  14847. /***/ }),
  14848. /* 140 */
  14849. /***/ (function(module, exports, __webpack_require__) {
  14850. "use strict";
  14851. /* WEBPACK VAR INJECTION */(function(process) {/**
  14852. * Copyright 2013-present, Facebook, Inc.
  14853. * All rights reserved.
  14854. *
  14855. * This source code is licensed under the BSD-style license found in the
  14856. * LICENSE file in the root directory of this source tree. An additional grant
  14857. * of patent rights can be found in the PATENTS file in the same directory.
  14858. *
  14859. */
  14860. var _prodInvariant = __webpack_require__(3);
  14861. var ReactComponentEnvironment = __webpack_require__(39);
  14862. var ReactInstanceMap = __webpack_require__(23);
  14863. var ReactInstrumentation = __webpack_require__(8);
  14864. var ReactCurrentOwner = __webpack_require__(11);
  14865. var ReactReconciler = __webpack_require__(18);
  14866. var ReactChildReconciler = __webpack_require__(112);
  14867. var emptyFunction = __webpack_require__(9);
  14868. var flattenChildren = __webpack_require__(165);
  14869. var invariant = __webpack_require__(1);
  14870. /**
  14871. * Make an update for markup to be rendered and inserted at a supplied index.
  14872. *
  14873. * @param {string} markup Markup that renders into an element.
  14874. * @param {number} toIndex Destination index.
  14875. * @private
  14876. */
  14877. function makeInsertMarkup(markup, afterNode, toIndex) {
  14878. // NOTE: Null values reduce hidden classes.
  14879. return {
  14880. type: 'INSERT_MARKUP',
  14881. content: markup,
  14882. fromIndex: null,
  14883. fromNode: null,
  14884. toIndex: toIndex,
  14885. afterNode: afterNode
  14886. };
  14887. }
  14888. /**
  14889. * Make an update for moving an existing element to another index.
  14890. *
  14891. * @param {number} fromIndex Source index of the existing element.
  14892. * @param {number} toIndex Destination index of the element.
  14893. * @private
  14894. */
  14895. function makeMove(child, afterNode, toIndex) {
  14896. // NOTE: Null values reduce hidden classes.
  14897. return {
  14898. type: 'MOVE_EXISTING',
  14899. content: null,
  14900. fromIndex: child._mountIndex,
  14901. fromNode: ReactReconciler.getHostNode(child),
  14902. toIndex: toIndex,
  14903. afterNode: afterNode
  14904. };
  14905. }
  14906. /**
  14907. * Make an update for removing an element at an index.
  14908. *
  14909. * @param {number} fromIndex Index of the element to remove.
  14910. * @private
  14911. */
  14912. function makeRemove(child, node) {
  14913. // NOTE: Null values reduce hidden classes.
  14914. return {
  14915. type: 'REMOVE_NODE',
  14916. content: null,
  14917. fromIndex: child._mountIndex,
  14918. fromNode: node,
  14919. toIndex: null,
  14920. afterNode: null
  14921. };
  14922. }
  14923. /**
  14924. * Make an update for setting the markup of a node.
  14925. *
  14926. * @param {string} markup Markup that renders into an element.
  14927. * @private
  14928. */
  14929. function makeSetMarkup(markup) {
  14930. // NOTE: Null values reduce hidden classes.
  14931. return {
  14932. type: 'SET_MARKUP',
  14933. content: markup,
  14934. fromIndex: null,
  14935. fromNode: null,
  14936. toIndex: null,
  14937. afterNode: null
  14938. };
  14939. }
  14940. /**
  14941. * Make an update for setting the text content.
  14942. *
  14943. * @param {string} textContent Text content to set.
  14944. * @private
  14945. */
  14946. function makeTextContent(textContent) {
  14947. // NOTE: Null values reduce hidden classes.
  14948. return {
  14949. type: 'TEXT_CONTENT',
  14950. content: textContent,
  14951. fromIndex: null,
  14952. fromNode: null,
  14953. toIndex: null,
  14954. afterNode: null
  14955. };
  14956. }
  14957. /**
  14958. * Push an update, if any, onto the queue. Creates a new queue if none is
  14959. * passed and always returns the queue. Mutative.
  14960. */
  14961. function enqueue(queue, update) {
  14962. if (update) {
  14963. queue = queue || [];
  14964. queue.push(update);
  14965. }
  14966. return queue;
  14967. }
  14968. /**
  14969. * Processes any enqueued updates.
  14970. *
  14971. * @private
  14972. */
  14973. function processQueue(inst, updateQueue) {
  14974. ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
  14975. }
  14976. var setChildrenForInstrumentation = emptyFunction;
  14977. if (process.env.NODE_ENV !== 'production') {
  14978. var getDebugID = function (inst) {
  14979. if (!inst._debugID) {
  14980. // Check for ART-like instances. TODO: This is silly/gross.
  14981. var internal;
  14982. if (internal = ReactInstanceMap.get(inst)) {
  14983. inst = internal;
  14984. }
  14985. }
  14986. return inst._debugID;
  14987. };
  14988. setChildrenForInstrumentation = function (children) {
  14989. var debugID = getDebugID(this);
  14990. // TODO: React Native empty components are also multichild.
  14991. // This means they still get into this method but don't have _debugID.
  14992. if (debugID !== 0) {
  14993. ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
  14994. return children[key]._debugID;
  14995. }) : []);
  14996. }
  14997. };
  14998. }
  14999. /**
  15000. * ReactMultiChild are capable of reconciling multiple children.
  15001. *
  15002. * @class ReactMultiChild
  15003. * @internal
  15004. */
  15005. var ReactMultiChild = {
  15006. /**
  15007. * Provides common functionality for components that must reconcile multiple
  15008. * children. This is used by `ReactDOMComponent` to mount, update, and
  15009. * unmount child components.
  15010. *
  15011. * @lends {ReactMultiChild.prototype}
  15012. */
  15013. Mixin: {
  15014. _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
  15015. if (process.env.NODE_ENV !== 'production') {
  15016. var selfDebugID = getDebugID(this);
  15017. if (this._currentElement) {
  15018. try {
  15019. ReactCurrentOwner.current = this._currentElement._owner;
  15020. return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
  15021. } finally {
  15022. ReactCurrentOwner.current = null;
  15023. }
  15024. }
  15025. }
  15026. return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
  15027. },
  15028. _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
  15029. var nextChildren;
  15030. var selfDebugID = 0;
  15031. if (process.env.NODE_ENV !== 'production') {
  15032. selfDebugID = getDebugID(this);
  15033. if (this._currentElement) {
  15034. try {
  15035. ReactCurrentOwner.current = this._currentElement._owner;
  15036. nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
  15037. } finally {
  15038. ReactCurrentOwner.current = null;
  15039. }
  15040. ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
  15041. return nextChildren;
  15042. }
  15043. }
  15044. nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
  15045. ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
  15046. return nextChildren;
  15047. },
  15048. /**
  15049. * Generates a "mount image" for each of the supplied children. In the case
  15050. * of `ReactDOMComponent`, a mount image is a string of markup.
  15051. *
  15052. * @param {?object} nestedChildren Nested child maps.
  15053. * @return {array} An array of mounted representations.
  15054. * @internal
  15055. */
  15056. mountChildren: function (nestedChildren, transaction, context) {
  15057. var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
  15058. this._renderedChildren = children;
  15059. var mountImages = [];
  15060. var index = 0;
  15061. for (var name in children) {
  15062. if (children.hasOwnProperty(name)) {
  15063. var child = children[name];
  15064. var selfDebugID = 0;
  15065. if (process.env.NODE_ENV !== 'production') {
  15066. selfDebugID = getDebugID(this);
  15067. }
  15068. var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
  15069. child._mountIndex = index++;
  15070. mountImages.push(mountImage);
  15071. }
  15072. }
  15073. if (process.env.NODE_ENV !== 'production') {
  15074. setChildrenForInstrumentation.call(this, children);
  15075. }
  15076. return mountImages;
  15077. },
  15078. /**
  15079. * Replaces any rendered children with a text content string.
  15080. *
  15081. * @param {string} nextContent String of content.
  15082. * @internal
  15083. */
  15084. updateTextContent: function (nextContent) {
  15085. var prevChildren = this._renderedChildren;
  15086. // Remove any rendered children.
  15087. ReactChildReconciler.unmountChildren(prevChildren, false);
  15088. for (var name in prevChildren) {
  15089. if (prevChildren.hasOwnProperty(name)) {
  15090. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
  15091. }
  15092. }
  15093. // Set new text content.
  15094. var updates = [makeTextContent(nextContent)];
  15095. processQueue(this, updates);
  15096. },
  15097. /**
  15098. * Replaces any rendered children with a markup string.
  15099. *
  15100. * @param {string} nextMarkup String of markup.
  15101. * @internal
  15102. */
  15103. updateMarkup: function (nextMarkup) {
  15104. var prevChildren = this._renderedChildren;
  15105. // Remove any rendered children.
  15106. ReactChildReconciler.unmountChildren(prevChildren, false);
  15107. for (var name in prevChildren) {
  15108. if (prevChildren.hasOwnProperty(name)) {
  15109. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
  15110. }
  15111. }
  15112. var updates = [makeSetMarkup(nextMarkup)];
  15113. processQueue(this, updates);
  15114. },
  15115. /**
  15116. * Updates the rendered children with new children.
  15117. *
  15118. * @param {?object} nextNestedChildrenElements Nested child element maps.
  15119. * @param {ReactReconcileTransaction} transaction
  15120. * @internal
  15121. */
  15122. updateChildren: function (nextNestedChildrenElements, transaction, context) {
  15123. // Hook used by React ART
  15124. this._updateChildren(nextNestedChildrenElements, transaction, context);
  15125. },
  15126. /**
  15127. * @param {?object} nextNestedChildrenElements Nested child element maps.
  15128. * @param {ReactReconcileTransaction} transaction
  15129. * @final
  15130. * @protected
  15131. */
  15132. _updateChildren: function (nextNestedChildrenElements, transaction, context) {
  15133. var prevChildren = this._renderedChildren;
  15134. var removedNodes = {};
  15135. var mountImages = [];
  15136. var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
  15137. if (!nextChildren && !prevChildren) {
  15138. return;
  15139. }
  15140. var updates = null;
  15141. var name;
  15142. // `nextIndex` will increment for each child in `nextChildren`, but
  15143. // `lastIndex` will be the last index visited in `prevChildren`.
  15144. var nextIndex = 0;
  15145. var lastIndex = 0;
  15146. // `nextMountIndex` will increment for each newly mounted child.
  15147. var nextMountIndex = 0;
  15148. var lastPlacedNode = null;
  15149. for (name in nextChildren) {
  15150. if (!nextChildren.hasOwnProperty(name)) {
  15151. continue;
  15152. }
  15153. var prevChild = prevChildren && prevChildren[name];
  15154. var nextChild = nextChildren[name];
  15155. if (prevChild === nextChild) {
  15156. updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
  15157. lastIndex = Math.max(prevChild._mountIndex, lastIndex);
  15158. prevChild._mountIndex = nextIndex;
  15159. } else {
  15160. if (prevChild) {
  15161. // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
  15162. lastIndex = Math.max(prevChild._mountIndex, lastIndex);
  15163. // The `removedNodes` loop below will actually remove the child.
  15164. }
  15165. // The child must be instantiated before it's mounted.
  15166. updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
  15167. nextMountIndex++;
  15168. }
  15169. nextIndex++;
  15170. lastPlacedNode = ReactReconciler.getHostNode(nextChild);
  15171. }
  15172. // Remove children that are no longer present.
  15173. for (name in removedNodes) {
  15174. if (removedNodes.hasOwnProperty(name)) {
  15175. updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
  15176. }
  15177. }
  15178. if (updates) {
  15179. processQueue(this, updates);
  15180. }
  15181. this._renderedChildren = nextChildren;
  15182. if (process.env.NODE_ENV !== 'production') {
  15183. setChildrenForInstrumentation.call(this, nextChildren);
  15184. }
  15185. },
  15186. /**
  15187. * Unmounts all rendered children. This should be used to clean up children
  15188. * when this component is unmounted. It does not actually perform any
  15189. * backend operations.
  15190. *
  15191. * @internal
  15192. */
  15193. unmountChildren: function (safely) {
  15194. var renderedChildren = this._renderedChildren;
  15195. ReactChildReconciler.unmountChildren(renderedChildren, safely);
  15196. this._renderedChildren = null;
  15197. },
  15198. /**
  15199. * Moves a child component to the supplied index.
  15200. *
  15201. * @param {ReactComponent} child Component to move.
  15202. * @param {number} toIndex Destination index of the element.
  15203. * @param {number} lastIndex Last index visited of the siblings of `child`.
  15204. * @protected
  15205. */
  15206. moveChild: function (child, afterNode, toIndex, lastIndex) {
  15207. // If the index of `child` is less than `lastIndex`, then it needs to
  15208. // be moved. Otherwise, we do not need to move it because a child will be
  15209. // inserted or moved before `child`.
  15210. if (child._mountIndex < lastIndex) {
  15211. return makeMove(child, afterNode, toIndex);
  15212. }
  15213. },
  15214. /**
  15215. * Creates a child component.
  15216. *
  15217. * @param {ReactComponent} child Component to create.
  15218. * @param {string} mountImage Markup to insert.
  15219. * @protected
  15220. */
  15221. createChild: function (child, afterNode, mountImage) {
  15222. return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
  15223. },
  15224. /**
  15225. * Removes a child component.
  15226. *
  15227. * @param {ReactComponent} child Child to remove.
  15228. * @protected
  15229. */
  15230. removeChild: function (child, node) {
  15231. return makeRemove(child, node);
  15232. },
  15233. /**
  15234. * Mounts a child with the supplied name.
  15235. *
  15236. * NOTE: This is part of `updateChildren` and is here for readability.
  15237. *
  15238. * @param {ReactComponent} child Component to mount.
  15239. * @param {string} name Name of the child.
  15240. * @param {number} index Index at which to insert the child.
  15241. * @param {ReactReconcileTransaction} transaction
  15242. * @private
  15243. */
  15244. _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
  15245. child._mountIndex = index;
  15246. return this.createChild(child, afterNode, mountImage);
  15247. },
  15248. /**
  15249. * Unmounts a rendered child.
  15250. *
  15251. * NOTE: This is part of `updateChildren` and is here for readability.
  15252. *
  15253. * @param {ReactComponent} child Component to unmount.
  15254. * @private
  15255. */
  15256. _unmountChild: function (child, node) {
  15257. var update = this.removeChild(child, node);
  15258. child._mountIndex = null;
  15259. return update;
  15260. }
  15261. }
  15262. };
  15263. module.exports = ReactMultiChild;
  15264. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  15265. /***/ }),
  15266. /* 141 */
  15267. /***/ (function(module, exports, __webpack_require__) {
  15268. "use strict";
  15269. /* WEBPACK VAR INJECTION */(function(process) {/**
  15270. * Copyright 2013-present, Facebook, Inc.
  15271. * All rights reserved.
  15272. *
  15273. * This source code is licensed under the BSD-style license found in the
  15274. * LICENSE file in the root directory of this source tree. An additional grant
  15275. * of patent rights can be found in the PATENTS file in the same directory.
  15276. *
  15277. *
  15278. */
  15279. var _prodInvariant = __webpack_require__(3);
  15280. var invariant = __webpack_require__(1);
  15281. /**
  15282. * @param {?object} object
  15283. * @return {boolean} True if `object` is a valid owner.
  15284. * @final
  15285. */
  15286. function isValidOwner(object) {
  15287. return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
  15288. }
  15289. /**
  15290. * ReactOwners are capable of storing references to owned components.
  15291. *
  15292. * All components are capable of //being// referenced by owner components, but
  15293. * only ReactOwner components are capable of //referencing// owned components.
  15294. * The named reference is known as a "ref".
  15295. *
  15296. * Refs are available when mounted and updated during reconciliation.
  15297. *
  15298. * var MyComponent = React.createClass({
  15299. * render: function() {
  15300. * return (
  15301. * <div onClick={this.handleClick}>
  15302. * <CustomComponent ref="custom" />
  15303. * </div>
  15304. * );
  15305. * },
  15306. * handleClick: function() {
  15307. * this.refs.custom.handleClick();
  15308. * },
  15309. * componentDidMount: function() {
  15310. * this.refs.custom.initialize();
  15311. * }
  15312. * });
  15313. *
  15314. * Refs should rarely be used. When refs are used, they should only be done to
  15315. * control data that is not handled by React's data flow.
  15316. *
  15317. * @class ReactOwner
  15318. */
  15319. var ReactOwner = {
  15320. /**
  15321. * Adds a component by ref to an owner component.
  15322. *
  15323. * @param {ReactComponent} component Component to reference.
  15324. * @param {string} ref Name by which to refer to the component.
  15325. * @param {ReactOwner} owner Component on which to record the ref.
  15326. * @final
  15327. * @internal
  15328. */
  15329. addComponentAsRefTo: function (component, ref, owner) {
  15330. !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
  15331. owner.attachRef(ref, component);
  15332. },
  15333. /**
  15334. * Removes a component by ref from an owner component.
  15335. *
  15336. * @param {ReactComponent} component Component to dereference.
  15337. * @param {string} ref Name of the ref to remove.
  15338. * @param {ReactOwner} owner Component on which the ref is recorded.
  15339. * @final
  15340. * @internal
  15341. */
  15342. removeComponentAsRefFrom: function (component, ref, owner) {
  15343. !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
  15344. var ownerPublicInstance = owner.getPublicInstance();
  15345. // Check that `component`'s owner is still alive and that `component` is still the current ref
  15346. // because we do not want to detach the ref if another component stole it.
  15347. if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
  15348. owner.detachRef(ref);
  15349. }
  15350. }
  15351. };
  15352. module.exports = ReactOwner;
  15353. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  15354. /***/ }),
  15355. /* 142 */
  15356. /***/ (function(module, exports, __webpack_require__) {
  15357. "use strict";
  15358. /* WEBPACK VAR INJECTION */(function(process) {/**
  15359. * Copyright 2013-present, Facebook, Inc.
  15360. * All rights reserved.
  15361. *
  15362. * This source code is licensed under the BSD-style license found in the
  15363. * LICENSE file in the root directory of this source tree. An additional grant
  15364. * of patent rights can be found in the PATENTS file in the same directory.
  15365. *
  15366. *
  15367. */
  15368. var ReactPropTypeLocationNames = {};
  15369. if (process.env.NODE_ENV !== 'production') {
  15370. ReactPropTypeLocationNames = {
  15371. prop: 'prop',
  15372. context: 'context',
  15373. childContext: 'child context'
  15374. };
  15375. }
  15376. module.exports = ReactPropTypeLocationNames;
  15377. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  15378. /***/ }),
  15379. /* 143 */
  15380. /***/ (function(module, exports, __webpack_require__) {
  15381. "use strict";
  15382. /* WEBPACK VAR INJECTION */(function(process) {/**
  15383. * Copyright 2013-present, Facebook, Inc.
  15384. * All rights reserved.
  15385. *
  15386. * This source code is licensed under the BSD-style license found in the
  15387. * LICENSE file in the root directory of this source tree. An additional grant
  15388. * of patent rights can be found in the PATENTS file in the same directory.
  15389. *
  15390. */
  15391. var _assign = __webpack_require__(4);
  15392. var CallbackQueue = __webpack_require__(57);
  15393. var PooledClass = __webpack_require__(14);
  15394. var ReactBrowserEventEmitter = __webpack_require__(26);
  15395. var ReactInputSelection = __webpack_require__(64);
  15396. var ReactInstrumentation = __webpack_require__(8);
  15397. var Transaction = __webpack_require__(28);
  15398. var ReactUpdateQueue = __webpack_require__(41);
  15399. /**
  15400. * Ensures that, when possible, the selection range (currently selected text
  15401. * input) is not disturbed by performing the transaction.
  15402. */
  15403. var SELECTION_RESTORATION = {
  15404. /**
  15405. * @return {Selection} Selection information.
  15406. */
  15407. initialize: ReactInputSelection.getSelectionInformation,
  15408. /**
  15409. * @param {Selection} sel Selection information returned from `initialize`.
  15410. */
  15411. close: ReactInputSelection.restoreSelection
  15412. };
  15413. /**
  15414. * Suppresses events (blur/focus) that could be inadvertently dispatched due to
  15415. * high level DOM manipulations (like temporarily removing a text input from the
  15416. * DOM).
  15417. */
  15418. var EVENT_SUPPRESSION = {
  15419. /**
  15420. * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before
  15421. * the reconciliation.
  15422. */
  15423. initialize: function () {
  15424. var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
  15425. ReactBrowserEventEmitter.setEnabled(false);
  15426. return currentlyEnabled;
  15427. },
  15428. /**
  15429. * @param {boolean} previouslyEnabled Enabled status of
  15430. * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`
  15431. * restores the previous value.
  15432. */
  15433. close: function (previouslyEnabled) {
  15434. ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
  15435. }
  15436. };
  15437. /**
  15438. * Provides a queue for collecting `componentDidMount` and
  15439. * `componentDidUpdate` callbacks during the transaction.
  15440. */
  15441. var ON_DOM_READY_QUEUEING = {
  15442. /**
  15443. * Initializes the internal `onDOMReady` queue.
  15444. */
  15445. initialize: function () {
  15446. this.reactMountReady.reset();
  15447. },
  15448. /**
  15449. * After DOM is flushed, invoke all registered `onDOMReady` callbacks.
  15450. */
  15451. close: function () {
  15452. this.reactMountReady.notifyAll();
  15453. }
  15454. };
  15455. /**
  15456. * Executed within the scope of the `Transaction` instance. Consider these as
  15457. * being member methods, but with an implied ordering while being isolated from
  15458. * each other.
  15459. */
  15460. var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
  15461. if (process.env.NODE_ENV !== 'production') {
  15462. TRANSACTION_WRAPPERS.push({
  15463. initialize: ReactInstrumentation.debugTool.onBeginFlush,
  15464. close: ReactInstrumentation.debugTool.onEndFlush
  15465. });
  15466. }
  15467. /**
  15468. * Currently:
  15469. * - The order that these are listed in the transaction is critical:
  15470. * - Suppresses events.
  15471. * - Restores selection range.
  15472. *
  15473. * Future:
  15474. * - Restore document/overflow scroll positions that were unintentionally
  15475. * modified via DOM insertions above the top viewport boundary.
  15476. * - Implement/integrate with customized constraint based layout system and keep
  15477. * track of which dimensions must be remeasured.
  15478. *
  15479. * @class ReactReconcileTransaction
  15480. */
  15481. function ReactReconcileTransaction(useCreateElement) {
  15482. this.reinitializeTransaction();
  15483. // Only server-side rendering really needs this option (see
  15484. // `ReactServerRendering`), but server-side uses
  15485. // `ReactServerRenderingTransaction` instead. This option is here so that it's
  15486. // accessible and defaults to false when `ReactDOMComponent` and
  15487. // `ReactDOMTextComponent` checks it in `mountComponent`.`
  15488. this.renderToStaticMarkup = false;
  15489. this.reactMountReady = CallbackQueue.getPooled(null);
  15490. this.useCreateElement = useCreateElement;
  15491. }
  15492. var Mixin = {
  15493. /**
  15494. * @see Transaction
  15495. * @abstract
  15496. * @final
  15497. * @return {array<object>} List of operation wrap procedures.
  15498. * TODO: convert to array<TransactionWrapper>
  15499. */
  15500. getTransactionWrappers: function () {
  15501. return TRANSACTION_WRAPPERS;
  15502. },
  15503. /**
  15504. * @return {object} The queue to collect `onDOMReady` callbacks with.
  15505. */
  15506. getReactMountReady: function () {
  15507. return this.reactMountReady;
  15508. },
  15509. /**
  15510. * @return {object} The queue to collect React async events.
  15511. */
  15512. getUpdateQueue: function () {
  15513. return ReactUpdateQueue;
  15514. },
  15515. /**
  15516. * Save current transaction state -- if the return value from this method is
  15517. * passed to `rollback`, the transaction will be reset to that state.
  15518. */
  15519. checkpoint: function () {
  15520. // reactMountReady is the our only stateful wrapper
  15521. return this.reactMountReady.checkpoint();
  15522. },
  15523. rollback: function (checkpoint) {
  15524. this.reactMountReady.rollback(checkpoint);
  15525. },
  15526. /**
  15527. * `PooledClass` looks for this, and will invoke this before allowing this
  15528. * instance to be reused.
  15529. */
  15530. destructor: function () {
  15531. CallbackQueue.release(this.reactMountReady);
  15532. this.reactMountReady = null;
  15533. }
  15534. };
  15535. _assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
  15536. PooledClass.addPoolingTo(ReactReconcileTransaction);
  15537. module.exports = ReactReconcileTransaction;
  15538. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  15539. /***/ }),
  15540. /* 144 */
  15541. /***/ (function(module, exports, __webpack_require__) {
  15542. "use strict";
  15543. /**
  15544. * Copyright 2013-present, Facebook, Inc.
  15545. * All rights reserved.
  15546. *
  15547. * This source code is licensed under the BSD-style license found in the
  15548. * LICENSE file in the root directory of this source tree. An additional grant
  15549. * of patent rights can be found in the PATENTS file in the same directory.
  15550. *
  15551. *
  15552. */
  15553. var ReactOwner = __webpack_require__(141);
  15554. var ReactRef = {};
  15555. function attachRef(ref, component, owner) {
  15556. if (typeof ref === 'function') {
  15557. ref(component.getPublicInstance());
  15558. } else {
  15559. // Legacy ref
  15560. ReactOwner.addComponentAsRefTo(component, ref, owner);
  15561. }
  15562. }
  15563. function detachRef(ref, component, owner) {
  15564. if (typeof ref === 'function') {
  15565. ref(null);
  15566. } else {
  15567. // Legacy ref
  15568. ReactOwner.removeComponentAsRefFrom(component, ref, owner);
  15569. }
  15570. }
  15571. ReactRef.attachRefs = function (instance, element) {
  15572. if (element === null || typeof element !== 'object') {
  15573. return;
  15574. }
  15575. var ref = element.ref;
  15576. if (ref != null) {
  15577. attachRef(ref, instance, element._owner);
  15578. }
  15579. };
  15580. ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
  15581. // If either the owner or a `ref` has changed, make sure the newest owner
  15582. // has stored a reference to `this`, and the previous owner (if different)
  15583. // has forgotten the reference to `this`. We use the element instead
  15584. // of the public this.props because the post processing cannot determine
  15585. // a ref. The ref conceptually lives on the element.
  15586. // TODO: Should this even be possible? The owner cannot change because
  15587. // it's forbidden by shouldUpdateReactComponent. The ref can change
  15588. // if you swap the keys of but not the refs. Reconsider where this check
  15589. // is made. It probably belongs where the key checking and
  15590. // instantiateReactComponent is done.
  15591. var prevRef = null;
  15592. var prevOwner = null;
  15593. if (prevElement !== null && typeof prevElement === 'object') {
  15594. prevRef = prevElement.ref;
  15595. prevOwner = prevElement._owner;
  15596. }
  15597. var nextRef = null;
  15598. var nextOwner = null;
  15599. if (nextElement !== null && typeof nextElement === 'object') {
  15600. nextRef = nextElement.ref;
  15601. nextOwner = nextElement._owner;
  15602. }
  15603. return prevRef !== nextRef ||
  15604. // If owner changes but we have an unchanged function ref, don't update refs
  15605. typeof nextRef === 'string' && nextOwner !== prevOwner;
  15606. };
  15607. ReactRef.detachRefs = function (instance, element) {
  15608. if (element === null || typeof element !== 'object') {
  15609. return;
  15610. }
  15611. var ref = element.ref;
  15612. if (ref != null) {
  15613. detachRef(ref, instance, element._owner);
  15614. }
  15615. };
  15616. module.exports = ReactRef;
  15617. /***/ }),
  15618. /* 145 */
  15619. /***/ (function(module, exports, __webpack_require__) {
  15620. "use strict";
  15621. /* WEBPACK VAR INJECTION */(function(process) {/**
  15622. * Copyright 2014-present, Facebook, Inc.
  15623. * All rights reserved.
  15624. *
  15625. * This source code is licensed under the BSD-style license found in the
  15626. * LICENSE file in the root directory of this source tree. An additional grant
  15627. * of patent rights can be found in the PATENTS file in the same directory.
  15628. *
  15629. */
  15630. var _assign = __webpack_require__(4);
  15631. var PooledClass = __webpack_require__(14);
  15632. var Transaction = __webpack_require__(28);
  15633. var ReactInstrumentation = __webpack_require__(8);
  15634. var ReactServerUpdateQueue = __webpack_require__(146);
  15635. /**
  15636. * Executed within the scope of the `Transaction` instance. Consider these as
  15637. * being member methods, but with an implied ordering while being isolated from
  15638. * each other.
  15639. */
  15640. var TRANSACTION_WRAPPERS = [];
  15641. if (process.env.NODE_ENV !== 'production') {
  15642. TRANSACTION_WRAPPERS.push({
  15643. initialize: ReactInstrumentation.debugTool.onBeginFlush,
  15644. close: ReactInstrumentation.debugTool.onEndFlush
  15645. });
  15646. }
  15647. var noopCallbackQueue = {
  15648. enqueue: function () {}
  15649. };
  15650. /**
  15651. * @class ReactServerRenderingTransaction
  15652. * @param {boolean} renderToStaticMarkup
  15653. */
  15654. function ReactServerRenderingTransaction(renderToStaticMarkup) {
  15655. this.reinitializeTransaction();
  15656. this.renderToStaticMarkup = renderToStaticMarkup;
  15657. this.useCreateElement = false;
  15658. this.updateQueue = new ReactServerUpdateQueue(this);
  15659. }
  15660. var Mixin = {
  15661. /**
  15662. * @see Transaction
  15663. * @abstract
  15664. * @final
  15665. * @return {array} Empty list of operation wrap procedures.
  15666. */
  15667. getTransactionWrappers: function () {
  15668. return TRANSACTION_WRAPPERS;
  15669. },
  15670. /**
  15671. * @return {object} The queue to collect `onDOMReady` callbacks with.
  15672. */
  15673. getReactMountReady: function () {
  15674. return noopCallbackQueue;
  15675. },
  15676. /**
  15677. * @return {object} The queue to collect React async events.
  15678. */
  15679. getUpdateQueue: function () {
  15680. return this.updateQueue;
  15681. },
  15682. /**
  15683. * `PooledClass` looks for this, and will invoke this before allowing this
  15684. * instance to be reused.
  15685. */
  15686. destructor: function () {},
  15687. checkpoint: function () {},
  15688. rollback: function () {}
  15689. };
  15690. _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
  15691. PooledClass.addPoolingTo(ReactServerRenderingTransaction);
  15692. module.exports = ReactServerRenderingTransaction;
  15693. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  15694. /***/ }),
  15695. /* 146 */
  15696. /***/ (function(module, exports, __webpack_require__) {
  15697. "use strict";
  15698. /* WEBPACK VAR INJECTION */(function(process) {/**
  15699. * Copyright 2015-present, Facebook, Inc.
  15700. * All rights reserved.
  15701. *
  15702. * This source code is licensed under the BSD-style license found in the
  15703. * LICENSE file in the root directory of this source tree. An additional grant
  15704. * of patent rights can be found in the PATENTS file in the same directory.
  15705. *
  15706. *
  15707. */
  15708. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  15709. var ReactUpdateQueue = __webpack_require__(41);
  15710. var warning = __webpack_require__(2);
  15711. function warnNoop(publicInstance, callerName) {
  15712. if (process.env.NODE_ENV !== 'production') {
  15713. var constructor = publicInstance.constructor;
  15714. process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
  15715. }
  15716. }
  15717. /**
  15718. * This is the update queue used for server rendering.
  15719. * It delegates to ReactUpdateQueue while server rendering is in progress and
  15720. * switches to ReactNoopUpdateQueue after the transaction has completed.
  15721. * @class ReactServerUpdateQueue
  15722. * @param {Transaction} transaction
  15723. */
  15724. var ReactServerUpdateQueue = function () {
  15725. function ReactServerUpdateQueue(transaction) {
  15726. _classCallCheck(this, ReactServerUpdateQueue);
  15727. this.transaction = transaction;
  15728. }
  15729. /**
  15730. * Checks whether or not this composite component is mounted.
  15731. * @param {ReactClass} publicInstance The instance we want to test.
  15732. * @return {boolean} True if mounted, false otherwise.
  15733. * @protected
  15734. * @final
  15735. */
  15736. ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
  15737. return false;
  15738. };
  15739. /**
  15740. * Enqueue a callback that will be executed after all the pending updates
  15741. * have processed.
  15742. *
  15743. * @param {ReactClass} publicInstance The instance to use as `this` context.
  15744. * @param {?function} callback Called after state is updated.
  15745. * @internal
  15746. */
  15747. ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
  15748. if (this.transaction.isInTransaction()) {
  15749. ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
  15750. }
  15751. };
  15752. /**
  15753. * Forces an update. This should only be invoked when it is known with
  15754. * certainty that we are **not** in a DOM transaction.
  15755. *
  15756. * You may want to call this when you know that some deeper aspect of the
  15757. * component's state has changed but `setState` was not called.
  15758. *
  15759. * This will not invoke `shouldComponentUpdate`, but it will invoke
  15760. * `componentWillUpdate` and `componentDidUpdate`.
  15761. *
  15762. * @param {ReactClass} publicInstance The instance that should rerender.
  15763. * @internal
  15764. */
  15765. ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
  15766. if (this.transaction.isInTransaction()) {
  15767. ReactUpdateQueue.enqueueForceUpdate(publicInstance);
  15768. } else {
  15769. warnNoop(publicInstance, 'forceUpdate');
  15770. }
  15771. };
  15772. /**
  15773. * Replaces all of the state. Always use this or `setState` to mutate state.
  15774. * You should treat `this.state` as immutable.
  15775. *
  15776. * There is no guarantee that `this.state` will be immediately updated, so
  15777. * accessing `this.state` after calling this method may return the old value.
  15778. *
  15779. * @param {ReactClass} publicInstance The instance that should rerender.
  15780. * @param {object|function} completeState Next state.
  15781. * @internal
  15782. */
  15783. ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
  15784. if (this.transaction.isInTransaction()) {
  15785. ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
  15786. } else {
  15787. warnNoop(publicInstance, 'replaceState');
  15788. }
  15789. };
  15790. /**
  15791. * Sets a subset of the state. This only exists because _pendingState is
  15792. * internal. This provides a merging strategy that is not available to deep
  15793. * properties which is confusing. TODO: Expose pendingState or don't use it
  15794. * during the merge.
  15795. *
  15796. * @param {ReactClass} publicInstance The instance that should rerender.
  15797. * @param {object|function} partialState Next partial state to be merged with state.
  15798. * @internal
  15799. */
  15800. ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
  15801. if (this.transaction.isInTransaction()) {
  15802. ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
  15803. } else {
  15804. warnNoop(publicInstance, 'setState');
  15805. }
  15806. };
  15807. return ReactServerUpdateQueue;
  15808. }();
  15809. module.exports = ReactServerUpdateQueue;
  15810. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  15811. /***/ }),
  15812. /* 147 */
  15813. /***/ (function(module, exports, __webpack_require__) {
  15814. "use strict";
  15815. /**
  15816. * Copyright 2013-present, Facebook, Inc.
  15817. * All rights reserved.
  15818. *
  15819. * This source code is licensed under the BSD-style license found in the
  15820. * LICENSE file in the root directory of this source tree. An additional grant
  15821. * of patent rights can be found in the PATENTS file in the same directory.
  15822. *
  15823. */
  15824. module.exports = '15.5.4';
  15825. /***/ }),
  15826. /* 148 */
  15827. /***/ (function(module, exports, __webpack_require__) {
  15828. "use strict";
  15829. /**
  15830. * Copyright 2013-present, Facebook, Inc.
  15831. * All rights reserved.
  15832. *
  15833. * This source code is licensed under the BSD-style license found in the
  15834. * LICENSE file in the root directory of this source tree. An additional grant
  15835. * of patent rights can be found in the PATENTS file in the same directory.
  15836. *
  15837. */
  15838. var NS = {
  15839. xlink: 'http://www.w3.org/1999/xlink',
  15840. xml: 'http://www.w3.org/XML/1998/namespace'
  15841. };
  15842. // We use attributes for everything SVG so let's avoid some duplication and run
  15843. // code instead.
  15844. // The following are all specified in the HTML config already so we exclude here.
  15845. // - class (as className)
  15846. // - color
  15847. // - height
  15848. // - id
  15849. // - lang
  15850. // - max
  15851. // - media
  15852. // - method
  15853. // - min
  15854. // - name
  15855. // - style
  15856. // - target
  15857. // - type
  15858. // - width
  15859. var ATTRS = {
  15860. accentHeight: 'accent-height',
  15861. accumulate: 0,
  15862. additive: 0,
  15863. alignmentBaseline: 'alignment-baseline',
  15864. allowReorder: 'allowReorder',
  15865. alphabetic: 0,
  15866. amplitude: 0,
  15867. arabicForm: 'arabic-form',
  15868. ascent: 0,
  15869. attributeName: 'attributeName',
  15870. attributeType: 'attributeType',
  15871. autoReverse: 'autoReverse',
  15872. azimuth: 0,
  15873. baseFrequency: 'baseFrequency',
  15874. baseProfile: 'baseProfile',
  15875. baselineShift: 'baseline-shift',
  15876. bbox: 0,
  15877. begin: 0,
  15878. bias: 0,
  15879. by: 0,
  15880. calcMode: 'calcMode',
  15881. capHeight: 'cap-height',
  15882. clip: 0,
  15883. clipPath: 'clip-path',
  15884. clipRule: 'clip-rule',
  15885. clipPathUnits: 'clipPathUnits',
  15886. colorInterpolation: 'color-interpolation',
  15887. colorInterpolationFilters: 'color-interpolation-filters',
  15888. colorProfile: 'color-profile',
  15889. colorRendering: 'color-rendering',
  15890. contentScriptType: 'contentScriptType',
  15891. contentStyleType: 'contentStyleType',
  15892. cursor: 0,
  15893. cx: 0,
  15894. cy: 0,
  15895. d: 0,
  15896. decelerate: 0,
  15897. descent: 0,
  15898. diffuseConstant: 'diffuseConstant',
  15899. direction: 0,
  15900. display: 0,
  15901. divisor: 0,
  15902. dominantBaseline: 'dominant-baseline',
  15903. dur: 0,
  15904. dx: 0,
  15905. dy: 0,
  15906. edgeMode: 'edgeMode',
  15907. elevation: 0,
  15908. enableBackground: 'enable-background',
  15909. end: 0,
  15910. exponent: 0,
  15911. externalResourcesRequired: 'externalResourcesRequired',
  15912. fill: 0,
  15913. fillOpacity: 'fill-opacity',
  15914. fillRule: 'fill-rule',
  15915. filter: 0,
  15916. filterRes: 'filterRes',
  15917. filterUnits: 'filterUnits',
  15918. floodColor: 'flood-color',
  15919. floodOpacity: 'flood-opacity',
  15920. focusable: 0,
  15921. fontFamily: 'font-family',
  15922. fontSize: 'font-size',
  15923. fontSizeAdjust: 'font-size-adjust',
  15924. fontStretch: 'font-stretch',
  15925. fontStyle: 'font-style',
  15926. fontVariant: 'font-variant',
  15927. fontWeight: 'font-weight',
  15928. format: 0,
  15929. from: 0,
  15930. fx: 0,
  15931. fy: 0,
  15932. g1: 0,
  15933. g2: 0,
  15934. glyphName: 'glyph-name',
  15935. glyphOrientationHorizontal: 'glyph-orientation-horizontal',
  15936. glyphOrientationVertical: 'glyph-orientation-vertical',
  15937. glyphRef: 'glyphRef',
  15938. gradientTransform: 'gradientTransform',
  15939. gradientUnits: 'gradientUnits',
  15940. hanging: 0,
  15941. horizAdvX: 'horiz-adv-x',
  15942. horizOriginX: 'horiz-origin-x',
  15943. ideographic: 0,
  15944. imageRendering: 'image-rendering',
  15945. 'in': 0,
  15946. in2: 0,
  15947. intercept: 0,
  15948. k: 0,
  15949. k1: 0,
  15950. k2: 0,
  15951. k3: 0,
  15952. k4: 0,
  15953. kernelMatrix: 'kernelMatrix',
  15954. kernelUnitLength: 'kernelUnitLength',
  15955. kerning: 0,
  15956. keyPoints: 'keyPoints',
  15957. keySplines: 'keySplines',
  15958. keyTimes: 'keyTimes',
  15959. lengthAdjust: 'lengthAdjust',
  15960. letterSpacing: 'letter-spacing',
  15961. lightingColor: 'lighting-color',
  15962. limitingConeAngle: 'limitingConeAngle',
  15963. local: 0,
  15964. markerEnd: 'marker-end',
  15965. markerMid: 'marker-mid',
  15966. markerStart: 'marker-start',
  15967. markerHeight: 'markerHeight',
  15968. markerUnits: 'markerUnits',
  15969. markerWidth: 'markerWidth',
  15970. mask: 0,
  15971. maskContentUnits: 'maskContentUnits',
  15972. maskUnits: 'maskUnits',
  15973. mathematical: 0,
  15974. mode: 0,
  15975. numOctaves: 'numOctaves',
  15976. offset: 0,
  15977. opacity: 0,
  15978. operator: 0,
  15979. order: 0,
  15980. orient: 0,
  15981. orientation: 0,
  15982. origin: 0,
  15983. overflow: 0,
  15984. overlinePosition: 'overline-position',
  15985. overlineThickness: 'overline-thickness',
  15986. paintOrder: 'paint-order',
  15987. panose1: 'panose-1',
  15988. pathLength: 'pathLength',
  15989. patternContentUnits: 'patternContentUnits',
  15990. patternTransform: 'patternTransform',
  15991. patternUnits: 'patternUnits',
  15992. pointerEvents: 'pointer-events',
  15993. points: 0,
  15994. pointsAtX: 'pointsAtX',
  15995. pointsAtY: 'pointsAtY',
  15996. pointsAtZ: 'pointsAtZ',
  15997. preserveAlpha: 'preserveAlpha',
  15998. preserveAspectRatio: 'preserveAspectRatio',
  15999. primitiveUnits: 'primitiveUnits',
  16000. r: 0,
  16001. radius: 0,
  16002. refX: 'refX',
  16003. refY: 'refY',
  16004. renderingIntent: 'rendering-intent',
  16005. repeatCount: 'repeatCount',
  16006. repeatDur: 'repeatDur',
  16007. requiredExtensions: 'requiredExtensions',
  16008. requiredFeatures: 'requiredFeatures',
  16009. restart: 0,
  16010. result: 0,
  16011. rotate: 0,
  16012. rx: 0,
  16013. ry: 0,
  16014. scale: 0,
  16015. seed: 0,
  16016. shapeRendering: 'shape-rendering',
  16017. slope: 0,
  16018. spacing: 0,
  16019. specularConstant: 'specularConstant',
  16020. specularExponent: 'specularExponent',
  16021. speed: 0,
  16022. spreadMethod: 'spreadMethod',
  16023. startOffset: 'startOffset',
  16024. stdDeviation: 'stdDeviation',
  16025. stemh: 0,
  16026. stemv: 0,
  16027. stitchTiles: 'stitchTiles',
  16028. stopColor: 'stop-color',
  16029. stopOpacity: 'stop-opacity',
  16030. strikethroughPosition: 'strikethrough-position',
  16031. strikethroughThickness: 'strikethrough-thickness',
  16032. string: 0,
  16033. stroke: 0,
  16034. strokeDasharray: 'stroke-dasharray',
  16035. strokeDashoffset: 'stroke-dashoffset',
  16036. strokeLinecap: 'stroke-linecap',
  16037. strokeLinejoin: 'stroke-linejoin',
  16038. strokeMiterlimit: 'stroke-miterlimit',
  16039. strokeOpacity: 'stroke-opacity',
  16040. strokeWidth: 'stroke-width',
  16041. surfaceScale: 'surfaceScale',
  16042. systemLanguage: 'systemLanguage',
  16043. tableValues: 'tableValues',
  16044. targetX: 'targetX',
  16045. targetY: 'targetY',
  16046. textAnchor: 'text-anchor',
  16047. textDecoration: 'text-decoration',
  16048. textRendering: 'text-rendering',
  16049. textLength: 'textLength',
  16050. to: 0,
  16051. transform: 0,
  16052. u1: 0,
  16053. u2: 0,
  16054. underlinePosition: 'underline-position',
  16055. underlineThickness: 'underline-thickness',
  16056. unicode: 0,
  16057. unicodeBidi: 'unicode-bidi',
  16058. unicodeRange: 'unicode-range',
  16059. unitsPerEm: 'units-per-em',
  16060. vAlphabetic: 'v-alphabetic',
  16061. vHanging: 'v-hanging',
  16062. vIdeographic: 'v-ideographic',
  16063. vMathematical: 'v-mathematical',
  16064. values: 0,
  16065. vectorEffect: 'vector-effect',
  16066. version: 0,
  16067. vertAdvY: 'vert-adv-y',
  16068. vertOriginX: 'vert-origin-x',
  16069. vertOriginY: 'vert-origin-y',
  16070. viewBox: 'viewBox',
  16071. viewTarget: 'viewTarget',
  16072. visibility: 0,
  16073. widths: 0,
  16074. wordSpacing: 'word-spacing',
  16075. writingMode: 'writing-mode',
  16076. x: 0,
  16077. xHeight: 'x-height',
  16078. x1: 0,
  16079. x2: 0,
  16080. xChannelSelector: 'xChannelSelector',
  16081. xlinkActuate: 'xlink:actuate',
  16082. xlinkArcrole: 'xlink:arcrole',
  16083. xlinkHref: 'xlink:href',
  16084. xlinkRole: 'xlink:role',
  16085. xlinkShow: 'xlink:show',
  16086. xlinkTitle: 'xlink:title',
  16087. xlinkType: 'xlink:type',
  16088. xmlBase: 'xml:base',
  16089. xmlns: 0,
  16090. xmlnsXlink: 'xmlns:xlink',
  16091. xmlLang: 'xml:lang',
  16092. xmlSpace: 'xml:space',
  16093. y: 0,
  16094. y1: 0,
  16095. y2: 0,
  16096. yChannelSelector: 'yChannelSelector',
  16097. z: 0,
  16098. zoomAndPan: 'zoomAndPan'
  16099. };
  16100. var SVGDOMPropertyConfig = {
  16101. Properties: {},
  16102. DOMAttributeNamespaces: {
  16103. xlinkActuate: NS.xlink,
  16104. xlinkArcrole: NS.xlink,
  16105. xlinkHref: NS.xlink,
  16106. xlinkRole: NS.xlink,
  16107. xlinkShow: NS.xlink,
  16108. xlinkTitle: NS.xlink,
  16109. xlinkType: NS.xlink,
  16110. xmlBase: NS.xml,
  16111. xmlLang: NS.xml,
  16112. xmlSpace: NS.xml
  16113. },
  16114. DOMAttributeNames: {}
  16115. };
  16116. Object.keys(ATTRS).forEach(function (key) {
  16117. SVGDOMPropertyConfig.Properties[key] = 0;
  16118. if (ATTRS[key]) {
  16119. SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
  16120. }
  16121. });
  16122. module.exports = SVGDOMPropertyConfig;
  16123. /***/ }),
  16124. /* 149 */
  16125. /***/ (function(module, exports, __webpack_require__) {
  16126. "use strict";
  16127. /**
  16128. * Copyright 2013-present, Facebook, Inc.
  16129. * All rights reserved.
  16130. *
  16131. * This source code is licensed under the BSD-style license found in the
  16132. * LICENSE file in the root directory of this source tree. An additional grant
  16133. * of patent rights can be found in the PATENTS file in the same directory.
  16134. *
  16135. */
  16136. var EventPropagators = __webpack_require__(22);
  16137. var ExecutionEnvironment = __webpack_require__(6);
  16138. var ReactDOMComponentTree = __webpack_require__(5);
  16139. var ReactInputSelection = __webpack_require__(64);
  16140. var SyntheticEvent = __webpack_require__(12);
  16141. var getActiveElement = __webpack_require__(53);
  16142. var isTextInputElement = __webpack_require__(74);
  16143. var shallowEqual = __webpack_require__(33);
  16144. var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
  16145. var eventTypes = {
  16146. select: {
  16147. phasedRegistrationNames: {
  16148. bubbled: 'onSelect',
  16149. captured: 'onSelectCapture'
  16150. },
  16151. dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
  16152. }
  16153. };
  16154. var activeElement = null;
  16155. var activeElementInst = null;
  16156. var lastSelection = null;
  16157. var mouseDown = false;
  16158. // Track whether a listener exists for this plugin. If none exist, we do
  16159. // not extract events. See #3639.
  16160. var hasListener = false;
  16161. /**
  16162. * Get an object which is a unique representation of the current selection.
  16163. *
  16164. * The return value will not be consistent across nodes or browsers, but
  16165. * two identical selections on the same node will return identical objects.
  16166. *
  16167. * @param {DOMElement} node
  16168. * @return {object}
  16169. */
  16170. function getSelection(node) {
  16171. if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
  16172. return {
  16173. start: node.selectionStart,
  16174. end: node.selectionEnd
  16175. };
  16176. } else if (window.getSelection) {
  16177. var selection = window.getSelection();
  16178. return {
  16179. anchorNode: selection.anchorNode,
  16180. anchorOffset: selection.anchorOffset,
  16181. focusNode: selection.focusNode,
  16182. focusOffset: selection.focusOffset
  16183. };
  16184. } else if (document.selection) {
  16185. var range = document.selection.createRange();
  16186. return {
  16187. parentElement: range.parentElement(),
  16188. text: range.text,
  16189. top: range.boundingTop,
  16190. left: range.boundingLeft
  16191. };
  16192. }
  16193. }
  16194. /**
  16195. * Poll selection to see whether it's changed.
  16196. *
  16197. * @param {object} nativeEvent
  16198. * @return {?SyntheticEvent}
  16199. */
  16200. function constructSelectEvent(nativeEvent, nativeEventTarget) {
  16201. // Ensure we have the right element, and that the user is not dragging a
  16202. // selection (this matches native `select` event behavior). In HTML5, select
  16203. // fires only on input and textarea thus if there's no focused element we
  16204. // won't dispatch.
  16205. if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
  16206. return null;
  16207. }
  16208. // Only fire when selection has actually changed.
  16209. var currentSelection = getSelection(activeElement);
  16210. if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
  16211. lastSelection = currentSelection;
  16212. var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
  16213. syntheticEvent.type = 'select';
  16214. syntheticEvent.target = activeElement;
  16215. EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
  16216. return syntheticEvent;
  16217. }
  16218. return null;
  16219. }
  16220. /**
  16221. * This plugin creates an `onSelect` event that normalizes select events
  16222. * across form elements.
  16223. *
  16224. * Supported elements are:
  16225. * - input (see `isTextInputElement`)
  16226. * - textarea
  16227. * - contentEditable
  16228. *
  16229. * This differs from native browser implementations in the following ways:
  16230. * - Fires on contentEditable fields as well as inputs.
  16231. * - Fires for collapsed selection.
  16232. * - Fires after user input.
  16233. */
  16234. var SelectEventPlugin = {
  16235. eventTypes: eventTypes,
  16236. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  16237. if (!hasListener) {
  16238. return null;
  16239. }
  16240. var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
  16241. switch (topLevelType) {
  16242. // Track the input node that has focus.
  16243. case 'topFocus':
  16244. if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
  16245. activeElement = targetNode;
  16246. activeElementInst = targetInst;
  16247. lastSelection = null;
  16248. }
  16249. break;
  16250. case 'topBlur':
  16251. activeElement = null;
  16252. activeElementInst = null;
  16253. lastSelection = null;
  16254. break;
  16255. // Don't fire the event while the user is dragging. This matches the
  16256. // semantics of the native select event.
  16257. case 'topMouseDown':
  16258. mouseDown = true;
  16259. break;
  16260. case 'topContextMenu':
  16261. case 'topMouseUp':
  16262. mouseDown = false;
  16263. return constructSelectEvent(nativeEvent, nativeEventTarget);
  16264. // Chrome and IE fire non-standard event when selection is changed (and
  16265. // sometimes when it hasn't). IE's event fires out of order with respect
  16266. // to key and input events on deletion, so we discard it.
  16267. //
  16268. // Firefox doesn't support selectionchange, so check selection status
  16269. // after each key entry. The selection changes after keydown and before
  16270. // keyup, but we check on keydown as well in the case of holding down a
  16271. // key, when multiple keydown events are fired but only one keyup is.
  16272. // This is also our approach for IE handling, for the reason above.
  16273. case 'topSelectionChange':
  16274. if (skipSelectionChangeEvent) {
  16275. break;
  16276. }
  16277. // falls through
  16278. case 'topKeyDown':
  16279. case 'topKeyUp':
  16280. return constructSelectEvent(nativeEvent, nativeEventTarget);
  16281. }
  16282. return null;
  16283. },
  16284. didPutListener: function (inst, registrationName, listener) {
  16285. if (registrationName === 'onSelect') {
  16286. hasListener = true;
  16287. }
  16288. }
  16289. };
  16290. module.exports = SelectEventPlugin;
  16291. /***/ }),
  16292. /* 150 */
  16293. /***/ (function(module, exports, __webpack_require__) {
  16294. "use strict";
  16295. /* WEBPACK VAR INJECTION */(function(process) {/**
  16296. * Copyright 2013-present, Facebook, Inc.
  16297. * All rights reserved.
  16298. *
  16299. * This source code is licensed under the BSD-style license found in the
  16300. * LICENSE file in the root directory of this source tree. An additional grant
  16301. * of patent rights can be found in the PATENTS file in the same directory.
  16302. *
  16303. *
  16304. */
  16305. var _prodInvariant = __webpack_require__(3);
  16306. var EventListener = __webpack_require__(51);
  16307. var EventPropagators = __webpack_require__(22);
  16308. var ReactDOMComponentTree = __webpack_require__(5);
  16309. var SyntheticAnimationEvent = __webpack_require__(151);
  16310. var SyntheticClipboardEvent = __webpack_require__(152);
  16311. var SyntheticEvent = __webpack_require__(12);
  16312. var SyntheticFocusEvent = __webpack_require__(155);
  16313. var SyntheticKeyboardEvent = __webpack_require__(157);
  16314. var SyntheticMouseEvent = __webpack_require__(27);
  16315. var SyntheticDragEvent = __webpack_require__(154);
  16316. var SyntheticTouchEvent = __webpack_require__(158);
  16317. var SyntheticTransitionEvent = __webpack_require__(159);
  16318. var SyntheticUIEvent = __webpack_require__(24);
  16319. var SyntheticWheelEvent = __webpack_require__(160);
  16320. var emptyFunction = __webpack_require__(9);
  16321. var getEventCharCode = __webpack_require__(43);
  16322. var invariant = __webpack_require__(1);
  16323. /**
  16324. * Turns
  16325. * ['abort', ...]
  16326. * into
  16327. * eventTypes = {
  16328. * 'abort': {
  16329. * phasedRegistrationNames: {
  16330. * bubbled: 'onAbort',
  16331. * captured: 'onAbortCapture',
  16332. * },
  16333. * dependencies: ['topAbort'],
  16334. * },
  16335. * ...
  16336. * };
  16337. * topLevelEventsToDispatchConfig = {
  16338. * 'topAbort': { sameConfig }
  16339. * };
  16340. */
  16341. var eventTypes = {};
  16342. var topLevelEventsToDispatchConfig = {};
  16343. ['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
  16344. var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
  16345. var onEvent = 'on' + capitalizedEvent;
  16346. var topEvent = 'top' + capitalizedEvent;
  16347. var type = {
  16348. phasedRegistrationNames: {
  16349. bubbled: onEvent,
  16350. captured: onEvent + 'Capture'
  16351. },
  16352. dependencies: [topEvent]
  16353. };
  16354. eventTypes[event] = type;
  16355. topLevelEventsToDispatchConfig[topEvent] = type;
  16356. });
  16357. var onClickListeners = {};
  16358. function getDictionaryKey(inst) {
  16359. // Prevents V8 performance issue:
  16360. // https://github.com/facebook/react/pull/7232
  16361. return '.' + inst._rootNodeID;
  16362. }
  16363. function isInteractive(tag) {
  16364. return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
  16365. }
  16366. var SimpleEventPlugin = {
  16367. eventTypes: eventTypes,
  16368. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  16369. var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
  16370. if (!dispatchConfig) {
  16371. return null;
  16372. }
  16373. var EventConstructor;
  16374. switch (topLevelType) {
  16375. case 'topAbort':
  16376. case 'topCanPlay':
  16377. case 'topCanPlayThrough':
  16378. case 'topDurationChange':
  16379. case 'topEmptied':
  16380. case 'topEncrypted':
  16381. case 'topEnded':
  16382. case 'topError':
  16383. case 'topInput':
  16384. case 'topInvalid':
  16385. case 'topLoad':
  16386. case 'topLoadedData':
  16387. case 'topLoadedMetadata':
  16388. case 'topLoadStart':
  16389. case 'topPause':
  16390. case 'topPlay':
  16391. case 'topPlaying':
  16392. case 'topProgress':
  16393. case 'topRateChange':
  16394. case 'topReset':
  16395. case 'topSeeked':
  16396. case 'topSeeking':
  16397. case 'topStalled':
  16398. case 'topSubmit':
  16399. case 'topSuspend':
  16400. case 'topTimeUpdate':
  16401. case 'topVolumeChange':
  16402. case 'topWaiting':
  16403. // HTML Events
  16404. // @see http://www.w3.org/TR/html5/index.html#events-0
  16405. EventConstructor = SyntheticEvent;
  16406. break;
  16407. case 'topKeyPress':
  16408. // Firefox creates a keypress event for function keys too. This removes
  16409. // the unwanted keypress events. Enter is however both printable and
  16410. // non-printable. One would expect Tab to be as well (but it isn't).
  16411. if (getEventCharCode(nativeEvent) === 0) {
  16412. return null;
  16413. }
  16414. /* falls through */
  16415. case 'topKeyDown':
  16416. case 'topKeyUp':
  16417. EventConstructor = SyntheticKeyboardEvent;
  16418. break;
  16419. case 'topBlur':
  16420. case 'topFocus':
  16421. EventConstructor = SyntheticFocusEvent;
  16422. break;
  16423. case 'topClick':
  16424. // Firefox creates a click event on right mouse clicks. This removes the
  16425. // unwanted click events.
  16426. if (nativeEvent.button === 2) {
  16427. return null;
  16428. }
  16429. /* falls through */
  16430. case 'topDoubleClick':
  16431. case 'topMouseDown':
  16432. case 'topMouseMove':
  16433. case 'topMouseUp':
  16434. // TODO: Disabled elements should not respond to mouse events
  16435. /* falls through */
  16436. case 'topMouseOut':
  16437. case 'topMouseOver':
  16438. case 'topContextMenu':
  16439. EventConstructor = SyntheticMouseEvent;
  16440. break;
  16441. case 'topDrag':
  16442. case 'topDragEnd':
  16443. case 'topDragEnter':
  16444. case 'topDragExit':
  16445. case 'topDragLeave':
  16446. case 'topDragOver':
  16447. case 'topDragStart':
  16448. case 'topDrop':
  16449. EventConstructor = SyntheticDragEvent;
  16450. break;
  16451. case 'topTouchCancel':
  16452. case 'topTouchEnd':
  16453. case 'topTouchMove':
  16454. case 'topTouchStart':
  16455. EventConstructor = SyntheticTouchEvent;
  16456. break;
  16457. case 'topAnimationEnd':
  16458. case 'topAnimationIteration':
  16459. case 'topAnimationStart':
  16460. EventConstructor = SyntheticAnimationEvent;
  16461. break;
  16462. case 'topTransitionEnd':
  16463. EventConstructor = SyntheticTransitionEvent;
  16464. break;
  16465. case 'topScroll':
  16466. EventConstructor = SyntheticUIEvent;
  16467. break;
  16468. case 'topWheel':
  16469. EventConstructor = SyntheticWheelEvent;
  16470. break;
  16471. case 'topCopy':
  16472. case 'topCut':
  16473. case 'topPaste':
  16474. EventConstructor = SyntheticClipboardEvent;
  16475. break;
  16476. }
  16477. !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
  16478. var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
  16479. EventPropagators.accumulateTwoPhaseDispatches(event);
  16480. return event;
  16481. },
  16482. didPutListener: function (inst, registrationName, listener) {
  16483. // Mobile Safari does not fire properly bubble click events on
  16484. // non-interactive elements, which means delegated click listeners do not
  16485. // fire. The workaround for this bug involves attaching an empty click
  16486. // listener on the target node.
  16487. // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
  16488. if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
  16489. var key = getDictionaryKey(inst);
  16490. var node = ReactDOMComponentTree.getNodeFromInstance(inst);
  16491. if (!onClickListeners[key]) {
  16492. onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
  16493. }
  16494. }
  16495. },
  16496. willDeleteListener: function (inst, registrationName) {
  16497. if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
  16498. var key = getDictionaryKey(inst);
  16499. onClickListeners[key].remove();
  16500. delete onClickListeners[key];
  16501. }
  16502. }
  16503. };
  16504. module.exports = SimpleEventPlugin;
  16505. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  16506. /***/ }),
  16507. /* 151 */
  16508. /***/ (function(module, exports, __webpack_require__) {
  16509. "use strict";
  16510. /**
  16511. * Copyright 2013-present, Facebook, Inc.
  16512. * All rights reserved.
  16513. *
  16514. * This source code is licensed under the BSD-style license found in the
  16515. * LICENSE file in the root directory of this source tree. An additional grant
  16516. * of patent rights can be found in the PATENTS file in the same directory.
  16517. *
  16518. */
  16519. var SyntheticEvent = __webpack_require__(12);
  16520. /**
  16521. * @interface Event
  16522. * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
  16523. * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
  16524. */
  16525. var AnimationEventInterface = {
  16526. animationName: null,
  16527. elapsedTime: null,
  16528. pseudoElement: null
  16529. };
  16530. /**
  16531. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16532. * @param {string} dispatchMarker Marker identifying the event target.
  16533. * @param {object} nativeEvent Native browser event.
  16534. * @extends {SyntheticEvent}
  16535. */
  16536. function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16537. return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16538. }
  16539. SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
  16540. module.exports = SyntheticAnimationEvent;
  16541. /***/ }),
  16542. /* 152 */
  16543. /***/ (function(module, exports, __webpack_require__) {
  16544. "use strict";
  16545. /**
  16546. * Copyright 2013-present, Facebook, Inc.
  16547. * All rights reserved.
  16548. *
  16549. * This source code is licensed under the BSD-style license found in the
  16550. * LICENSE file in the root directory of this source tree. An additional grant
  16551. * of patent rights can be found in the PATENTS file in the same directory.
  16552. *
  16553. */
  16554. var SyntheticEvent = __webpack_require__(12);
  16555. /**
  16556. * @interface Event
  16557. * @see http://www.w3.org/TR/clipboard-apis/
  16558. */
  16559. var ClipboardEventInterface = {
  16560. clipboardData: function (event) {
  16561. return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
  16562. }
  16563. };
  16564. /**
  16565. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16566. * @param {string} dispatchMarker Marker identifying the event target.
  16567. * @param {object} nativeEvent Native browser event.
  16568. * @extends {SyntheticUIEvent}
  16569. */
  16570. function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16571. return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16572. }
  16573. SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
  16574. module.exports = SyntheticClipboardEvent;
  16575. /***/ }),
  16576. /* 153 */
  16577. /***/ (function(module, exports, __webpack_require__) {
  16578. "use strict";
  16579. /**
  16580. * Copyright 2013-present, Facebook, Inc.
  16581. * All rights reserved.
  16582. *
  16583. * This source code is licensed under the BSD-style license found in the
  16584. * LICENSE file in the root directory of this source tree. An additional grant
  16585. * of patent rights can be found in the PATENTS file in the same directory.
  16586. *
  16587. */
  16588. var SyntheticEvent = __webpack_require__(12);
  16589. /**
  16590. * @interface Event
  16591. * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
  16592. */
  16593. var CompositionEventInterface = {
  16594. data: null
  16595. };
  16596. /**
  16597. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16598. * @param {string} dispatchMarker Marker identifying the event target.
  16599. * @param {object} nativeEvent Native browser event.
  16600. * @extends {SyntheticUIEvent}
  16601. */
  16602. function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16603. return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16604. }
  16605. SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
  16606. module.exports = SyntheticCompositionEvent;
  16607. /***/ }),
  16608. /* 154 */
  16609. /***/ (function(module, exports, __webpack_require__) {
  16610. "use strict";
  16611. /**
  16612. * Copyright 2013-present, Facebook, Inc.
  16613. * All rights reserved.
  16614. *
  16615. * This source code is licensed under the BSD-style license found in the
  16616. * LICENSE file in the root directory of this source tree. An additional grant
  16617. * of patent rights can be found in the PATENTS file in the same directory.
  16618. *
  16619. */
  16620. var SyntheticMouseEvent = __webpack_require__(27);
  16621. /**
  16622. * @interface DragEvent
  16623. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  16624. */
  16625. var DragEventInterface = {
  16626. dataTransfer: null
  16627. };
  16628. /**
  16629. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16630. * @param {string} dispatchMarker Marker identifying the event target.
  16631. * @param {object} nativeEvent Native browser event.
  16632. * @extends {SyntheticUIEvent}
  16633. */
  16634. function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16635. return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16636. }
  16637. SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
  16638. module.exports = SyntheticDragEvent;
  16639. /***/ }),
  16640. /* 155 */
  16641. /***/ (function(module, exports, __webpack_require__) {
  16642. "use strict";
  16643. /**
  16644. * Copyright 2013-present, Facebook, Inc.
  16645. * All rights reserved.
  16646. *
  16647. * This source code is licensed under the BSD-style license found in the
  16648. * LICENSE file in the root directory of this source tree. An additional grant
  16649. * of patent rights can be found in the PATENTS file in the same directory.
  16650. *
  16651. */
  16652. var SyntheticUIEvent = __webpack_require__(24);
  16653. /**
  16654. * @interface FocusEvent
  16655. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  16656. */
  16657. var FocusEventInterface = {
  16658. relatedTarget: null
  16659. };
  16660. /**
  16661. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16662. * @param {string} dispatchMarker Marker identifying the event target.
  16663. * @param {object} nativeEvent Native browser event.
  16664. * @extends {SyntheticUIEvent}
  16665. */
  16666. function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16667. return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16668. }
  16669. SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
  16670. module.exports = SyntheticFocusEvent;
  16671. /***/ }),
  16672. /* 156 */
  16673. /***/ (function(module, exports, __webpack_require__) {
  16674. "use strict";
  16675. /**
  16676. * Copyright 2013-present, Facebook, Inc.
  16677. * All rights reserved.
  16678. *
  16679. * This source code is licensed under the BSD-style license found in the
  16680. * LICENSE file in the root directory of this source tree. An additional grant
  16681. * of patent rights can be found in the PATENTS file in the same directory.
  16682. *
  16683. */
  16684. var SyntheticEvent = __webpack_require__(12);
  16685. /**
  16686. * @interface Event
  16687. * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
  16688. * /#events-inputevents
  16689. */
  16690. var InputEventInterface = {
  16691. data: null
  16692. };
  16693. /**
  16694. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16695. * @param {string} dispatchMarker Marker identifying the event target.
  16696. * @param {object} nativeEvent Native browser event.
  16697. * @extends {SyntheticUIEvent}
  16698. */
  16699. function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16700. return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16701. }
  16702. SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
  16703. module.exports = SyntheticInputEvent;
  16704. /***/ }),
  16705. /* 157 */
  16706. /***/ (function(module, exports, __webpack_require__) {
  16707. "use strict";
  16708. /**
  16709. * Copyright 2013-present, Facebook, Inc.
  16710. * All rights reserved.
  16711. *
  16712. * This source code is licensed under the BSD-style license found in the
  16713. * LICENSE file in the root directory of this source tree. An additional grant
  16714. * of patent rights can be found in the PATENTS file in the same directory.
  16715. *
  16716. */
  16717. var SyntheticUIEvent = __webpack_require__(24);
  16718. var getEventCharCode = __webpack_require__(43);
  16719. var getEventKey = __webpack_require__(166);
  16720. var getEventModifierState = __webpack_require__(44);
  16721. /**
  16722. * @interface KeyboardEvent
  16723. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  16724. */
  16725. var KeyboardEventInterface = {
  16726. key: getEventKey,
  16727. location: null,
  16728. ctrlKey: null,
  16729. shiftKey: null,
  16730. altKey: null,
  16731. metaKey: null,
  16732. repeat: null,
  16733. locale: null,
  16734. getModifierState: getEventModifierState,
  16735. // Legacy Interface
  16736. charCode: function (event) {
  16737. // `charCode` is the result of a KeyPress event and represents the value of
  16738. // the actual printable character.
  16739. // KeyPress is deprecated, but its replacement is not yet final and not
  16740. // implemented in any major browser. Only KeyPress has charCode.
  16741. if (event.type === 'keypress') {
  16742. return getEventCharCode(event);
  16743. }
  16744. return 0;
  16745. },
  16746. keyCode: function (event) {
  16747. // `keyCode` is the result of a KeyDown/Up event and represents the value of
  16748. // physical keyboard key.
  16749. // The actual meaning of the value depends on the users' keyboard layout
  16750. // which cannot be detected. Assuming that it is a US keyboard layout
  16751. // provides a surprisingly accurate mapping for US and European users.
  16752. // Due to this, it is left to the user to implement at this time.
  16753. if (event.type === 'keydown' || event.type === 'keyup') {
  16754. return event.keyCode;
  16755. }
  16756. return 0;
  16757. },
  16758. which: function (event) {
  16759. // `which` is an alias for either `keyCode` or `charCode` depending on the
  16760. // type of the event.
  16761. if (event.type === 'keypress') {
  16762. return getEventCharCode(event);
  16763. }
  16764. if (event.type === 'keydown' || event.type === 'keyup') {
  16765. return event.keyCode;
  16766. }
  16767. return 0;
  16768. }
  16769. };
  16770. /**
  16771. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16772. * @param {string} dispatchMarker Marker identifying the event target.
  16773. * @param {object} nativeEvent Native browser event.
  16774. * @extends {SyntheticUIEvent}
  16775. */
  16776. function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16777. return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16778. }
  16779. SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
  16780. module.exports = SyntheticKeyboardEvent;
  16781. /***/ }),
  16782. /* 158 */
  16783. /***/ (function(module, exports, __webpack_require__) {
  16784. "use strict";
  16785. /**
  16786. * Copyright 2013-present, Facebook, Inc.
  16787. * All rights reserved.
  16788. *
  16789. * This source code is licensed under the BSD-style license found in the
  16790. * LICENSE file in the root directory of this source tree. An additional grant
  16791. * of patent rights can be found in the PATENTS file in the same directory.
  16792. *
  16793. */
  16794. var SyntheticUIEvent = __webpack_require__(24);
  16795. var getEventModifierState = __webpack_require__(44);
  16796. /**
  16797. * @interface TouchEvent
  16798. * @see http://www.w3.org/TR/touch-events/
  16799. */
  16800. var TouchEventInterface = {
  16801. touches: null,
  16802. targetTouches: null,
  16803. changedTouches: null,
  16804. altKey: null,
  16805. metaKey: null,
  16806. ctrlKey: null,
  16807. shiftKey: null,
  16808. getModifierState: getEventModifierState
  16809. };
  16810. /**
  16811. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16812. * @param {string} dispatchMarker Marker identifying the event target.
  16813. * @param {object} nativeEvent Native browser event.
  16814. * @extends {SyntheticUIEvent}
  16815. */
  16816. function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16817. return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16818. }
  16819. SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
  16820. module.exports = SyntheticTouchEvent;
  16821. /***/ }),
  16822. /* 159 */
  16823. /***/ (function(module, exports, __webpack_require__) {
  16824. "use strict";
  16825. /**
  16826. * Copyright 2013-present, Facebook, Inc.
  16827. * All rights reserved.
  16828. *
  16829. * This source code is licensed under the BSD-style license found in the
  16830. * LICENSE file in the root directory of this source tree. An additional grant
  16831. * of patent rights can be found in the PATENTS file in the same directory.
  16832. *
  16833. */
  16834. var SyntheticEvent = __webpack_require__(12);
  16835. /**
  16836. * @interface Event
  16837. * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
  16838. * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
  16839. */
  16840. var TransitionEventInterface = {
  16841. propertyName: null,
  16842. elapsedTime: null,
  16843. pseudoElement: null
  16844. };
  16845. /**
  16846. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16847. * @param {string} dispatchMarker Marker identifying the event target.
  16848. * @param {object} nativeEvent Native browser event.
  16849. * @extends {SyntheticEvent}
  16850. */
  16851. function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16852. return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16853. }
  16854. SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
  16855. module.exports = SyntheticTransitionEvent;
  16856. /***/ }),
  16857. /* 160 */
  16858. /***/ (function(module, exports, __webpack_require__) {
  16859. "use strict";
  16860. /**
  16861. * Copyright 2013-present, Facebook, Inc.
  16862. * All rights reserved.
  16863. *
  16864. * This source code is licensed under the BSD-style license found in the
  16865. * LICENSE file in the root directory of this source tree. An additional grant
  16866. * of patent rights can be found in the PATENTS file in the same directory.
  16867. *
  16868. */
  16869. var SyntheticMouseEvent = __webpack_require__(27);
  16870. /**
  16871. * @interface WheelEvent
  16872. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  16873. */
  16874. var WheelEventInterface = {
  16875. deltaX: function (event) {
  16876. return 'deltaX' in event ? event.deltaX :
  16877. // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
  16878. 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
  16879. },
  16880. deltaY: function (event) {
  16881. return 'deltaY' in event ? event.deltaY :
  16882. // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
  16883. 'wheelDeltaY' in event ? -event.wheelDeltaY :
  16884. // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
  16885. 'wheelDelta' in event ? -event.wheelDelta : 0;
  16886. },
  16887. deltaZ: null,
  16888. // Browsers without "deltaMode" is reporting in raw wheel delta where one
  16889. // notch on the scroll is always +/- 120, roughly equivalent to pixels.
  16890. // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
  16891. // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
  16892. deltaMode: null
  16893. };
  16894. /**
  16895. * @param {object} dispatchConfig Configuration used to dispatch this event.
  16896. * @param {string} dispatchMarker Marker identifying the event target.
  16897. * @param {object} nativeEvent Native browser event.
  16898. * @extends {SyntheticMouseEvent}
  16899. */
  16900. function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
  16901. return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
  16902. }
  16903. SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
  16904. module.exports = SyntheticWheelEvent;
  16905. /***/ }),
  16906. /* 161 */
  16907. /***/ (function(module, exports, __webpack_require__) {
  16908. "use strict";
  16909. /**
  16910. * Copyright 2013-present, Facebook, Inc.
  16911. * All rights reserved.
  16912. *
  16913. * This source code is licensed under the BSD-style license found in the
  16914. * LICENSE file in the root directory of this source tree. An additional grant
  16915. * of patent rights can be found in the PATENTS file in the same directory.
  16916. *
  16917. *
  16918. */
  16919. var MOD = 65521;
  16920. // adler32 is not cryptographically strong, and is only used to sanity check that
  16921. // markup generated on the server matches the markup generated on the client.
  16922. // This implementation (a modified version of the SheetJS version) has been optimized
  16923. // for our use case, at the expense of conforming to the adler32 specification
  16924. // for non-ascii inputs.
  16925. function adler32(data) {
  16926. var a = 1;
  16927. var b = 0;
  16928. var i = 0;
  16929. var l = data.length;
  16930. var m = l & ~0x3;
  16931. while (i < m) {
  16932. var n = Math.min(i + 4096, m);
  16933. for (; i < n; i += 4) {
  16934. b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
  16935. }
  16936. a %= MOD;
  16937. b %= MOD;
  16938. }
  16939. for (; i < l; i++) {
  16940. b += a += data.charCodeAt(i);
  16941. }
  16942. a %= MOD;
  16943. b %= MOD;
  16944. return a | b << 16;
  16945. }
  16946. module.exports = adler32;
  16947. /***/ }),
  16948. /* 162 */
  16949. /***/ (function(module, exports, __webpack_require__) {
  16950. "use strict";
  16951. /* WEBPACK VAR INJECTION */(function(process) {/**
  16952. * Copyright 2013-present, Facebook, Inc.
  16953. * All rights reserved.
  16954. *
  16955. * This source code is licensed under the BSD-style license found in the
  16956. * LICENSE file in the root directory of this source tree. An additional grant
  16957. * of patent rights can be found in the PATENTS file in the same directory.
  16958. *
  16959. */
  16960. var _prodInvariant = __webpack_require__(3);
  16961. var ReactPropTypeLocationNames = __webpack_require__(142);
  16962. var ReactPropTypesSecret = __webpack_require__(67);
  16963. var invariant = __webpack_require__(1);
  16964. var warning = __webpack_require__(2);
  16965. var ReactComponentTreeHook;
  16966. if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
  16967. // Temporary hack.
  16968. // Inline requires don't work well with Jest:
  16969. // https://github.com/facebook/react/issues/7240
  16970. // Remove the inline requires when we don't need them anymore:
  16971. // https://github.com/facebook/react/pull/7178
  16972. ReactComponentTreeHook = __webpack_require__(7);
  16973. }
  16974. var loggedTypeFailures = {};
  16975. /**
  16976. * Assert that the values match with the type specs.
  16977. * Error messages are memorized and will only be shown once.
  16978. *
  16979. * @param {object} typeSpecs Map of name to a ReactPropType
  16980. * @param {object} values Runtime values that need to be type-checked
  16981. * @param {string} location e.g. "prop", "context", "child context"
  16982. * @param {string} componentName Name of the component for error messages.
  16983. * @param {?object} element The React element that is being type-checked
  16984. * @param {?number} debugID The React component instance that is being type-checked
  16985. * @private
  16986. */
  16987. function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
  16988. for (var typeSpecName in typeSpecs) {
  16989. if (typeSpecs.hasOwnProperty(typeSpecName)) {
  16990. var error;
  16991. // Prop type validation may throw. In case they do, we don't want to
  16992. // fail the render phase where it didn't fail before. So we log it.
  16993. // After these have been cleaned up, we'll let them throw.
  16994. try {
  16995. // This is intentionally an invariant that gets caught. It's the same
  16996. // behavior as without this statement except with a better message.
  16997. !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
  16998. error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  16999. } catch (ex) {
  17000. error = ex;
  17001. }
  17002. process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
  17003. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  17004. // Only monitor this failure once because there tends to be a lot of the
  17005. // same error.
  17006. loggedTypeFailures[error.message] = true;
  17007. var componentStackInfo = '';
  17008. if (process.env.NODE_ENV !== 'production') {
  17009. if (!ReactComponentTreeHook) {
  17010. ReactComponentTreeHook = __webpack_require__(7);
  17011. }
  17012. if (debugID !== null) {
  17013. componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
  17014. } else if (element !== null) {
  17015. componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
  17016. }
  17017. }
  17018. process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
  17019. }
  17020. }
  17021. }
  17022. }
  17023. module.exports = checkReactTypeSpec;
  17024. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  17025. /***/ }),
  17026. /* 163 */
  17027. /***/ (function(module, exports, __webpack_require__) {
  17028. "use strict";
  17029. /* WEBPACK VAR INJECTION */(function(process) {/**
  17030. * Copyright 2013-present, Facebook, Inc.
  17031. * All rights reserved.
  17032. *
  17033. * This source code is licensed under the BSD-style license found in the
  17034. * LICENSE file in the root directory of this source tree. An additional grant
  17035. * of patent rights can be found in the PATENTS file in the same directory.
  17036. *
  17037. */
  17038. var CSSProperty = __webpack_require__(56);
  17039. var warning = __webpack_require__(2);
  17040. var isUnitlessNumber = CSSProperty.isUnitlessNumber;
  17041. var styleWarnings = {};
  17042. /**
  17043. * Convert a value into the proper css writable value. The style name `name`
  17044. * should be logical (no hyphens), as specified
  17045. * in `CSSProperty.isUnitlessNumber`.
  17046. *
  17047. * @param {string} name CSS property name such as `topMargin`.
  17048. * @param {*} value CSS property value such as `10px`.
  17049. * @param {ReactDOMComponent} component
  17050. * @return {string} Normalized style value with dimensions applied.
  17051. */
  17052. function dangerousStyleValue(name, value, component) {
  17053. // Note that we've removed escapeTextForBrowser() calls here since the
  17054. // whole string will be escaped when the attribute is injected into
  17055. // the markup. If you provide unsafe user data here they can inject
  17056. // arbitrary CSS which may be problematic (I couldn't repro this):
  17057. // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
  17058. // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
  17059. // This is not an XSS hole but instead a potential CSS injection issue
  17060. // which has lead to a greater discussion about how we're going to
  17061. // trust URLs moving forward. See #2115901
  17062. var isEmpty = value == null || typeof value === 'boolean' || value === '';
  17063. if (isEmpty) {
  17064. return '';
  17065. }
  17066. var isNonNumeric = isNaN(value);
  17067. if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
  17068. return '' + value; // cast to string
  17069. }
  17070. if (typeof value === 'string') {
  17071. if (process.env.NODE_ENV !== 'production') {
  17072. // Allow '0' to pass through without warning. 0 is already special and
  17073. // doesn't require units, so we don't need to warn about it.
  17074. if (component && value !== '0') {
  17075. var owner = component._currentElement._owner;
  17076. var ownerName = owner ? owner.getName() : null;
  17077. if (ownerName && !styleWarnings[ownerName]) {
  17078. styleWarnings[ownerName] = {};
  17079. }
  17080. var warned = false;
  17081. if (ownerName) {
  17082. var warnings = styleWarnings[ownerName];
  17083. warned = warnings[name];
  17084. if (!warned) {
  17085. warnings[name] = true;
  17086. }
  17087. }
  17088. if (!warned) {
  17089. process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
  17090. }
  17091. }
  17092. }
  17093. value = value.trim();
  17094. }
  17095. return value + 'px';
  17096. }
  17097. module.exports = dangerousStyleValue;
  17098. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  17099. /***/ }),
  17100. /* 164 */
  17101. /***/ (function(module, exports, __webpack_require__) {
  17102. "use strict";
  17103. /* WEBPACK VAR INJECTION */(function(process) {/**
  17104. * Copyright 2013-present, Facebook, Inc.
  17105. * All rights reserved.
  17106. *
  17107. * This source code is licensed under the BSD-style license found in the
  17108. * LICENSE file in the root directory of this source tree. An additional grant
  17109. * of patent rights can be found in the PATENTS file in the same directory.
  17110. *
  17111. */
  17112. var _prodInvariant = __webpack_require__(3);
  17113. var ReactCurrentOwner = __webpack_require__(11);
  17114. var ReactDOMComponentTree = __webpack_require__(5);
  17115. var ReactInstanceMap = __webpack_require__(23);
  17116. var getHostComponentFromComposite = __webpack_require__(71);
  17117. var invariant = __webpack_require__(1);
  17118. var warning = __webpack_require__(2);
  17119. /**
  17120. * Returns the DOM node rendered by this element.
  17121. *
  17122. * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode
  17123. *
  17124. * @param {ReactComponent|DOMElement} componentOrElement
  17125. * @return {?DOMElement} The root node of this element.
  17126. */
  17127. function findDOMNode(componentOrElement) {
  17128. if (process.env.NODE_ENV !== 'production') {
  17129. var owner = ReactCurrentOwner.current;
  17130. if (owner !== null) {
  17131. process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
  17132. owner._warnedAboutRefsInRender = true;
  17133. }
  17134. }
  17135. if (componentOrElement == null) {
  17136. return null;
  17137. }
  17138. if (componentOrElement.nodeType === 1) {
  17139. return componentOrElement;
  17140. }
  17141. var inst = ReactInstanceMap.get(componentOrElement);
  17142. if (inst) {
  17143. inst = getHostComponentFromComposite(inst);
  17144. return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
  17145. }
  17146. if (typeof componentOrElement.render === 'function') {
  17147. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;
  17148. } else {
  17149. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;
  17150. }
  17151. }
  17152. module.exports = findDOMNode;
  17153. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  17154. /***/ }),
  17155. /* 165 */
  17156. /***/ (function(module, exports, __webpack_require__) {
  17157. "use strict";
  17158. /* WEBPACK VAR INJECTION */(function(process) {/**
  17159. * Copyright 2013-present, Facebook, Inc.
  17160. * All rights reserved.
  17161. *
  17162. * This source code is licensed under the BSD-style license found in the
  17163. * LICENSE file in the root directory of this source tree. An additional grant
  17164. * of patent rights can be found in the PATENTS file in the same directory.
  17165. *
  17166. *
  17167. */
  17168. var KeyEscapeUtils = __webpack_require__(37);
  17169. var traverseAllChildren = __webpack_require__(76);
  17170. var warning = __webpack_require__(2);
  17171. var ReactComponentTreeHook;
  17172. if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
  17173. // Temporary hack.
  17174. // Inline requires don't work well with Jest:
  17175. // https://github.com/facebook/react/issues/7240
  17176. // Remove the inline requires when we don't need them anymore:
  17177. // https://github.com/facebook/react/pull/7178
  17178. ReactComponentTreeHook = __webpack_require__(7);
  17179. }
  17180. /**
  17181. * @param {function} traverseContext Context passed through traversal.
  17182. * @param {?ReactComponent} child React child component.
  17183. * @param {!string} name String name of key path to child.
  17184. * @param {number=} selfDebugID Optional debugID of the current internal instance.
  17185. */
  17186. function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
  17187. // We found a component instance.
  17188. if (traverseContext && typeof traverseContext === 'object') {
  17189. var result = traverseContext;
  17190. var keyUnique = result[name] === undefined;
  17191. if (process.env.NODE_ENV !== 'production') {
  17192. if (!ReactComponentTreeHook) {
  17193. ReactComponentTreeHook = __webpack_require__(7);
  17194. }
  17195. if (!keyUnique) {
  17196. process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
  17197. }
  17198. }
  17199. if (keyUnique && child != null) {
  17200. result[name] = child;
  17201. }
  17202. }
  17203. }
  17204. /**
  17205. * Flattens children that are typically specified as `props.children`. Any null
  17206. * children will not be included in the resulting object.
  17207. * @return {!object} flattened children keyed by name.
  17208. */
  17209. function flattenChildren(children, selfDebugID) {
  17210. if (children == null) {
  17211. return children;
  17212. }
  17213. var result = {};
  17214. if (process.env.NODE_ENV !== 'production') {
  17215. traverseAllChildren(children, function (traverseContext, child, name) {
  17216. return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
  17217. }, result);
  17218. } else {
  17219. traverseAllChildren(children, flattenSingleChildIntoContext, result);
  17220. }
  17221. return result;
  17222. }
  17223. module.exports = flattenChildren;
  17224. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  17225. /***/ }),
  17226. /* 166 */
  17227. /***/ (function(module, exports, __webpack_require__) {
  17228. "use strict";
  17229. /**
  17230. * Copyright 2013-present, Facebook, Inc.
  17231. * All rights reserved.
  17232. *
  17233. * This source code is licensed under the BSD-style license found in the
  17234. * LICENSE file in the root directory of this source tree. An additional grant
  17235. * of patent rights can be found in the PATENTS file in the same directory.
  17236. *
  17237. */
  17238. var getEventCharCode = __webpack_require__(43);
  17239. /**
  17240. * Normalization of deprecated HTML5 `key` values
  17241. * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
  17242. */
  17243. var normalizeKey = {
  17244. 'Esc': 'Escape',
  17245. 'Spacebar': ' ',
  17246. 'Left': 'ArrowLeft',
  17247. 'Up': 'ArrowUp',
  17248. 'Right': 'ArrowRight',
  17249. 'Down': 'ArrowDown',
  17250. 'Del': 'Delete',
  17251. 'Win': 'OS',
  17252. 'Menu': 'ContextMenu',
  17253. 'Apps': 'ContextMenu',
  17254. 'Scroll': 'ScrollLock',
  17255. 'MozPrintableKey': 'Unidentified'
  17256. };
  17257. /**
  17258. * Translation from legacy `keyCode` to HTML5 `key`
  17259. * Only special keys supported, all others depend on keyboard layout or browser
  17260. * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
  17261. */
  17262. var translateToKey = {
  17263. 8: 'Backspace',
  17264. 9: 'Tab',
  17265. 12: 'Clear',
  17266. 13: 'Enter',
  17267. 16: 'Shift',
  17268. 17: 'Control',
  17269. 18: 'Alt',
  17270. 19: 'Pause',
  17271. 20: 'CapsLock',
  17272. 27: 'Escape',
  17273. 32: ' ',
  17274. 33: 'PageUp',
  17275. 34: 'PageDown',
  17276. 35: 'End',
  17277. 36: 'Home',
  17278. 37: 'ArrowLeft',
  17279. 38: 'ArrowUp',
  17280. 39: 'ArrowRight',
  17281. 40: 'ArrowDown',
  17282. 45: 'Insert',
  17283. 46: 'Delete',
  17284. 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
  17285. 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
  17286. 144: 'NumLock',
  17287. 145: 'ScrollLock',
  17288. 224: 'Meta'
  17289. };
  17290. /**
  17291. * @param {object} nativeEvent Native browser event.
  17292. * @return {string} Normalized `key` property.
  17293. */
  17294. function getEventKey(nativeEvent) {
  17295. if (nativeEvent.key) {
  17296. // Normalize inconsistent values reported by browsers due to
  17297. // implementations of a working draft specification.
  17298. // FireFox implements `key` but returns `MozPrintableKey` for all
  17299. // printable characters (normalized to `Unidentified`), ignore it.
  17300. var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
  17301. if (key !== 'Unidentified') {
  17302. return key;
  17303. }
  17304. }
  17305. // Browser does not implement `key`, polyfill as much of it as we can.
  17306. if (nativeEvent.type === 'keypress') {
  17307. var charCode = getEventCharCode(nativeEvent);
  17308. // The enter-key is technically both printable and non-printable and can
  17309. // thus be captured by `keypress`, no other non-printable key should.
  17310. return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
  17311. }
  17312. if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
  17313. // While user keyboard layout determines the actual meaning of each
  17314. // `keyCode` value, almost all function keys have a universal value.
  17315. return translateToKey[nativeEvent.keyCode] || 'Unidentified';
  17316. }
  17317. return '';
  17318. }
  17319. module.exports = getEventKey;
  17320. /***/ }),
  17321. /* 167 */
  17322. /***/ (function(module, exports, __webpack_require__) {
  17323. "use strict";
  17324. /**
  17325. * Copyright 2013-present, Facebook, Inc.
  17326. * All rights reserved.
  17327. *
  17328. * This source code is licensed under the BSD-style license found in the
  17329. * LICENSE file in the root directory of this source tree. An additional grant
  17330. * of patent rights can be found in the PATENTS file in the same directory.
  17331. *
  17332. *
  17333. */
  17334. /* global Symbol */
  17335. var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  17336. var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  17337. /**
  17338. * Returns the iterator method function contained on the iterable object.
  17339. *
  17340. * Be sure to invoke the function with the iterable as context:
  17341. *
  17342. * var iteratorFn = getIteratorFn(myIterable);
  17343. * if (iteratorFn) {
  17344. * var iterator = iteratorFn.call(myIterable);
  17345. * ...
  17346. * }
  17347. *
  17348. * @param {?object} maybeIterable
  17349. * @return {?function}
  17350. */
  17351. function getIteratorFn(maybeIterable) {
  17352. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  17353. if (typeof iteratorFn === 'function') {
  17354. return iteratorFn;
  17355. }
  17356. }
  17357. module.exports = getIteratorFn;
  17358. /***/ }),
  17359. /* 168 */
  17360. /***/ (function(module, exports, __webpack_require__) {
  17361. "use strict";
  17362. /**
  17363. * Copyright 2013-present, Facebook, Inc.
  17364. * All rights reserved.
  17365. *
  17366. * This source code is licensed under the BSD-style license found in the
  17367. * LICENSE file in the root directory of this source tree. An additional grant
  17368. * of patent rights can be found in the PATENTS file in the same directory.
  17369. *
  17370. */
  17371. /**
  17372. * Given any node return the first leaf node without children.
  17373. *
  17374. * @param {DOMElement|DOMTextNode} node
  17375. * @return {DOMElement|DOMTextNode}
  17376. */
  17377. function getLeafNode(node) {
  17378. while (node && node.firstChild) {
  17379. node = node.firstChild;
  17380. }
  17381. return node;
  17382. }
  17383. /**
  17384. * Get the next sibling within a container. This will walk up the
  17385. * DOM if a node's siblings have been exhausted.
  17386. *
  17387. * @param {DOMElement|DOMTextNode} node
  17388. * @return {?DOMElement|DOMTextNode}
  17389. */
  17390. function getSiblingNode(node) {
  17391. while (node) {
  17392. if (node.nextSibling) {
  17393. return node.nextSibling;
  17394. }
  17395. node = node.parentNode;
  17396. }
  17397. }
  17398. /**
  17399. * Get object describing the nodes which contain characters at offset.
  17400. *
  17401. * @param {DOMElement|DOMTextNode} root
  17402. * @param {number} offset
  17403. * @return {?object}
  17404. */
  17405. function getNodeForCharacterOffset(root, offset) {
  17406. var node = getLeafNode(root);
  17407. var nodeStart = 0;
  17408. var nodeEnd = 0;
  17409. while (node) {
  17410. if (node.nodeType === 3) {
  17411. nodeEnd = nodeStart + node.textContent.length;
  17412. if (nodeStart <= offset && nodeEnd >= offset) {
  17413. return {
  17414. node: node,
  17415. offset: offset - nodeStart
  17416. };
  17417. }
  17418. nodeStart = nodeEnd;
  17419. }
  17420. node = getLeafNode(getSiblingNode(node));
  17421. }
  17422. }
  17423. module.exports = getNodeForCharacterOffset;
  17424. /***/ }),
  17425. /* 169 */
  17426. /***/ (function(module, exports, __webpack_require__) {
  17427. "use strict";
  17428. /**
  17429. * Copyright 2013-present, Facebook, Inc.
  17430. * All rights reserved.
  17431. *
  17432. * This source code is licensed under the BSD-style license found in the
  17433. * LICENSE file in the root directory of this source tree. An additional grant
  17434. * of patent rights can be found in the PATENTS file in the same directory.
  17435. *
  17436. */
  17437. var ExecutionEnvironment = __webpack_require__(6);
  17438. /**
  17439. * Generate a mapping of standard vendor prefixes using the defined style property and event name.
  17440. *
  17441. * @param {string} styleProp
  17442. * @param {string} eventName
  17443. * @returns {object}
  17444. */
  17445. function makePrefixMap(styleProp, eventName) {
  17446. var prefixes = {};
  17447. prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  17448. prefixes['Webkit' + styleProp] = 'webkit' + eventName;
  17449. prefixes['Moz' + styleProp] = 'moz' + eventName;
  17450. prefixes['ms' + styleProp] = 'MS' + eventName;
  17451. prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
  17452. return prefixes;
  17453. }
  17454. /**
  17455. * A list of event names to a configurable list of vendor prefixes.
  17456. */
  17457. var vendorPrefixes = {
  17458. animationend: makePrefixMap('Animation', 'AnimationEnd'),
  17459. animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
  17460. animationstart: makePrefixMap('Animation', 'AnimationStart'),
  17461. transitionend: makePrefixMap('Transition', 'TransitionEnd')
  17462. };
  17463. /**
  17464. * Event names that have already been detected and prefixed (if applicable).
  17465. */
  17466. var prefixedEventNames = {};
  17467. /**
  17468. * Element to check for prefixes on.
  17469. */
  17470. var style = {};
  17471. /**
  17472. * Bootstrap if a DOM exists.
  17473. */
  17474. if (ExecutionEnvironment.canUseDOM) {
  17475. style = document.createElement('div').style;
  17476. // On some platforms, in particular some releases of Android 4.x,
  17477. // the un-prefixed "animation" and "transition" properties are defined on the
  17478. // style object but the events that fire will still be prefixed, so we need
  17479. // to check if the un-prefixed events are usable, and if not remove them from the map.
  17480. if (!('AnimationEvent' in window)) {
  17481. delete vendorPrefixes.animationend.animation;
  17482. delete vendorPrefixes.animationiteration.animation;
  17483. delete vendorPrefixes.animationstart.animation;
  17484. }
  17485. // Same as above
  17486. if (!('TransitionEvent' in window)) {
  17487. delete vendorPrefixes.transitionend.transition;
  17488. }
  17489. }
  17490. /**
  17491. * Attempts to determine the correct vendor prefixed event name.
  17492. *
  17493. * @param {string} eventName
  17494. * @returns {string}
  17495. */
  17496. function getVendorPrefixedEventName(eventName) {
  17497. if (prefixedEventNames[eventName]) {
  17498. return prefixedEventNames[eventName];
  17499. } else if (!vendorPrefixes[eventName]) {
  17500. return eventName;
  17501. }
  17502. var prefixMap = vendorPrefixes[eventName];
  17503. for (var styleProp in prefixMap) {
  17504. if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
  17505. return prefixedEventNames[eventName] = prefixMap[styleProp];
  17506. }
  17507. }
  17508. return '';
  17509. }
  17510. module.exports = getVendorPrefixedEventName;
  17511. /***/ }),
  17512. /* 170 */
  17513. /***/ (function(module, exports, __webpack_require__) {
  17514. "use strict";
  17515. /**
  17516. * Copyright 2013-present, Facebook, Inc.
  17517. * All rights reserved.
  17518. *
  17519. * This source code is licensed under the BSD-style license found in the
  17520. * LICENSE file in the root directory of this source tree. An additional grant
  17521. * of patent rights can be found in the PATENTS file in the same directory.
  17522. *
  17523. */
  17524. var escapeTextContentForBrowser = __webpack_require__(29);
  17525. /**
  17526. * Escapes attribute value to prevent scripting attacks.
  17527. *
  17528. * @param {*} value Value to escape.
  17529. * @return {string} An escaped string.
  17530. */
  17531. function quoteAttributeValueForBrowser(value) {
  17532. return '"' + escapeTextContentForBrowser(value) + '"';
  17533. }
  17534. module.exports = quoteAttributeValueForBrowser;
  17535. /***/ }),
  17536. /* 171 */
  17537. /***/ (function(module, exports, __webpack_require__) {
  17538. "use strict";
  17539. /**
  17540. * Copyright 2013-present, Facebook, Inc.
  17541. * All rights reserved.
  17542. *
  17543. * This source code is licensed under the BSD-style license found in the
  17544. * LICENSE file in the root directory of this source tree. An additional grant
  17545. * of patent rights can be found in the PATENTS file in the same directory.
  17546. *
  17547. */
  17548. var ReactMount = __webpack_require__(65);
  17549. module.exports = ReactMount.renderSubtreeIntoContainer;
  17550. /***/ }),
  17551. /* 172 */
  17552. /***/ (function(module, exports, __webpack_require__) {
  17553. "use strict";
  17554. /**
  17555. * Copyright 2013-present, Facebook, Inc.
  17556. * All rights reserved.
  17557. *
  17558. * This source code is licensed under the BSD-style license found in the
  17559. * LICENSE file in the root directory of this source tree. An additional grant
  17560. * of patent rights can be found in the PATENTS file in the same directory.
  17561. *
  17562. *
  17563. */
  17564. /**
  17565. * Escape and wrap key so it is safe to use as a reactid
  17566. *
  17567. * @param {string} key to be escaped.
  17568. * @return {string} the escaped key.
  17569. */
  17570. function escape(key) {
  17571. var escapeRegex = /[=:]/g;
  17572. var escaperLookup = {
  17573. '=': '=0',
  17574. ':': '=2'
  17575. };
  17576. var escapedString = ('' + key).replace(escapeRegex, function (match) {
  17577. return escaperLookup[match];
  17578. });
  17579. return '$' + escapedString;
  17580. }
  17581. /**
  17582. * Unescape and unwrap key for human-readable display
  17583. *
  17584. * @param {string} key to unescape.
  17585. * @return {string} the unescaped key.
  17586. */
  17587. function unescape(key) {
  17588. var unescapeRegex = /(=0|=2)/g;
  17589. var unescaperLookup = {
  17590. '=0': '=',
  17591. '=2': ':'
  17592. };
  17593. var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
  17594. return ('' + keySubstring).replace(unescapeRegex, function (match) {
  17595. return unescaperLookup[match];
  17596. });
  17597. }
  17598. var KeyEscapeUtils = {
  17599. escape: escape,
  17600. unescape: unescape
  17601. };
  17602. module.exports = KeyEscapeUtils;
  17603. /***/ }),
  17604. /* 173 */
  17605. /***/ (function(module, exports, __webpack_require__) {
  17606. "use strict";
  17607. /* WEBPACK VAR INJECTION */(function(process) {/**
  17608. * Copyright 2013-present, Facebook, Inc.
  17609. * All rights reserved.
  17610. *
  17611. * This source code is licensed under the BSD-style license found in the
  17612. * LICENSE file in the root directory of this source tree. An additional grant
  17613. * of patent rights can be found in the PATENTS file in the same directory.
  17614. *
  17615. *
  17616. */
  17617. var _prodInvariant = __webpack_require__(16);
  17618. var invariant = __webpack_require__(1);
  17619. /**
  17620. * Static poolers. Several custom versions for each potential number of
  17621. * arguments. A completely generic pooler is easy to implement, but would
  17622. * require accessing the `arguments` object. In each of these, `this` refers to
  17623. * the Class itself, not an instance. If any others are needed, simply add them
  17624. * here, or in their own files.
  17625. */
  17626. var oneArgumentPooler = function (copyFieldsFrom) {
  17627. var Klass = this;
  17628. if (Klass.instancePool.length) {
  17629. var instance = Klass.instancePool.pop();
  17630. Klass.call(instance, copyFieldsFrom);
  17631. return instance;
  17632. } else {
  17633. return new Klass(copyFieldsFrom);
  17634. }
  17635. };
  17636. var twoArgumentPooler = function (a1, a2) {
  17637. var Klass = this;
  17638. if (Klass.instancePool.length) {
  17639. var instance = Klass.instancePool.pop();
  17640. Klass.call(instance, a1, a2);
  17641. return instance;
  17642. } else {
  17643. return new Klass(a1, a2);
  17644. }
  17645. };
  17646. var threeArgumentPooler = function (a1, a2, a3) {
  17647. var Klass = this;
  17648. if (Klass.instancePool.length) {
  17649. var instance = Klass.instancePool.pop();
  17650. Klass.call(instance, a1, a2, a3);
  17651. return instance;
  17652. } else {
  17653. return new Klass(a1, a2, a3);
  17654. }
  17655. };
  17656. var fourArgumentPooler = function (a1, a2, a3, a4) {
  17657. var Klass = this;
  17658. if (Klass.instancePool.length) {
  17659. var instance = Klass.instancePool.pop();
  17660. Klass.call(instance, a1, a2, a3, a4);
  17661. return instance;
  17662. } else {
  17663. return new Klass(a1, a2, a3, a4);
  17664. }
  17665. };
  17666. var standardReleaser = function (instance) {
  17667. var Klass = this;
  17668. !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
  17669. instance.destructor();
  17670. if (Klass.instancePool.length < Klass.poolSize) {
  17671. Klass.instancePool.push(instance);
  17672. }
  17673. };
  17674. var DEFAULT_POOL_SIZE = 10;
  17675. var DEFAULT_POOLER = oneArgumentPooler;
  17676. /**
  17677. * Augments `CopyConstructor` to be a poolable class, augmenting only the class
  17678. * itself (statically) not adding any prototypical fields. Any CopyConstructor
  17679. * you give this may have a `poolSize` property, and will look for a
  17680. * prototypical `destructor` on instances.
  17681. *
  17682. * @param {Function} CopyConstructor Constructor that can be used to reset.
  17683. * @param {Function} pooler Customizable pooler.
  17684. */
  17685. var addPoolingTo = function (CopyConstructor, pooler) {
  17686. // Casting as any so that flow ignores the actual implementation and trusts
  17687. // it to match the type we declared
  17688. var NewKlass = CopyConstructor;
  17689. NewKlass.instancePool = [];
  17690. NewKlass.getPooled = pooler || DEFAULT_POOLER;
  17691. if (!NewKlass.poolSize) {
  17692. NewKlass.poolSize = DEFAULT_POOL_SIZE;
  17693. }
  17694. NewKlass.release = standardReleaser;
  17695. return NewKlass;
  17696. };
  17697. var PooledClass = {
  17698. addPoolingTo: addPoolingTo,
  17699. oneArgumentPooler: oneArgumentPooler,
  17700. twoArgumentPooler: twoArgumentPooler,
  17701. threeArgumentPooler: threeArgumentPooler,
  17702. fourArgumentPooler: fourArgumentPooler
  17703. };
  17704. module.exports = PooledClass;
  17705. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  17706. /***/ }),
  17707. /* 174 */
  17708. /***/ (function(module, exports, __webpack_require__) {
  17709. "use strict";
  17710. /**
  17711. * Copyright 2013-present, Facebook, Inc.
  17712. * All rights reserved.
  17713. *
  17714. * This source code is licensed under the BSD-style license found in the
  17715. * LICENSE file in the root directory of this source tree. An additional grant
  17716. * of patent rights can be found in the PATENTS file in the same directory.
  17717. *
  17718. */
  17719. var PooledClass = __webpack_require__(173);
  17720. var ReactElement = __webpack_require__(15);
  17721. var emptyFunction = __webpack_require__(9);
  17722. var traverseAllChildren = __webpack_require__(184);
  17723. var twoArgumentPooler = PooledClass.twoArgumentPooler;
  17724. var fourArgumentPooler = PooledClass.fourArgumentPooler;
  17725. var userProvidedKeyEscapeRegex = /\/+/g;
  17726. function escapeUserProvidedKey(text) {
  17727. return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
  17728. }
  17729. /**
  17730. * PooledClass representing the bookkeeping associated with performing a child
  17731. * traversal. Allows avoiding binding callbacks.
  17732. *
  17733. * @constructor ForEachBookKeeping
  17734. * @param {!function} forEachFunction Function to perform traversal with.
  17735. * @param {?*} forEachContext Context to perform context with.
  17736. */
  17737. function ForEachBookKeeping(forEachFunction, forEachContext) {
  17738. this.func = forEachFunction;
  17739. this.context = forEachContext;
  17740. this.count = 0;
  17741. }
  17742. ForEachBookKeeping.prototype.destructor = function () {
  17743. this.func = null;
  17744. this.context = null;
  17745. this.count = 0;
  17746. };
  17747. PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
  17748. function forEachSingleChild(bookKeeping, child, name) {
  17749. var func = bookKeeping.func,
  17750. context = bookKeeping.context;
  17751. func.call(context, child, bookKeeping.count++);
  17752. }
  17753. /**
  17754. * Iterates through children that are typically specified as `props.children`.
  17755. *
  17756. * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
  17757. *
  17758. * The provided forEachFunc(child, index) will be called for each
  17759. * leaf child.
  17760. *
  17761. * @param {?*} children Children tree container.
  17762. * @param {function(*, int)} forEachFunc
  17763. * @param {*} forEachContext Context for forEachContext.
  17764. */
  17765. function forEachChildren(children, forEachFunc, forEachContext) {
  17766. if (children == null) {
  17767. return children;
  17768. }
  17769. var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
  17770. traverseAllChildren(children, forEachSingleChild, traverseContext);
  17771. ForEachBookKeeping.release(traverseContext);
  17772. }
  17773. /**
  17774. * PooledClass representing the bookkeeping associated with performing a child
  17775. * mapping. Allows avoiding binding callbacks.
  17776. *
  17777. * @constructor MapBookKeeping
  17778. * @param {!*} mapResult Object containing the ordered map of results.
  17779. * @param {!function} mapFunction Function to perform mapping with.
  17780. * @param {?*} mapContext Context to perform mapping with.
  17781. */
  17782. function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
  17783. this.result = mapResult;
  17784. this.keyPrefix = keyPrefix;
  17785. this.func = mapFunction;
  17786. this.context = mapContext;
  17787. this.count = 0;
  17788. }
  17789. MapBookKeeping.prototype.destructor = function () {
  17790. this.result = null;
  17791. this.keyPrefix = null;
  17792. this.func = null;
  17793. this.context = null;
  17794. this.count = 0;
  17795. };
  17796. PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
  17797. function mapSingleChildIntoContext(bookKeeping, child, childKey) {
  17798. var result = bookKeeping.result,
  17799. keyPrefix = bookKeeping.keyPrefix,
  17800. func = bookKeeping.func,
  17801. context = bookKeeping.context;
  17802. var mappedChild = func.call(context, child, bookKeeping.count++);
  17803. if (Array.isArray(mappedChild)) {
  17804. mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
  17805. } else if (mappedChild != null) {
  17806. if (ReactElement.isValidElement(mappedChild)) {
  17807. mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
  17808. // Keep both the (mapped) and old keys if they differ, just as
  17809. // traverseAllChildren used to do for objects as children
  17810. keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
  17811. }
  17812. result.push(mappedChild);
  17813. }
  17814. }
  17815. function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
  17816. var escapedPrefix = '';
  17817. if (prefix != null) {
  17818. escapedPrefix = escapeUserProvidedKey(prefix) + '/';
  17819. }
  17820. var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
  17821. traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
  17822. MapBookKeeping.release(traverseContext);
  17823. }
  17824. /**
  17825. * Maps children that are typically specified as `props.children`.
  17826. *
  17827. * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
  17828. *
  17829. * The provided mapFunction(child, key, index) will be called for each
  17830. * leaf child.
  17831. *
  17832. * @param {?*} children Children tree container.
  17833. * @param {function(*, int)} func The map function.
  17834. * @param {*} context Context for mapFunction.
  17835. * @return {object} Object containing the ordered map of results.
  17836. */
  17837. function mapChildren(children, func, context) {
  17838. if (children == null) {
  17839. return children;
  17840. }
  17841. var result = [];
  17842. mapIntoWithKeyPrefixInternal(children, result, null, func, context);
  17843. return result;
  17844. }
  17845. function forEachSingleChildDummy(traverseContext, child, name) {
  17846. return null;
  17847. }
  17848. /**
  17849. * Count the number of children that are typically specified as
  17850. * `props.children`.
  17851. *
  17852. * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
  17853. *
  17854. * @param {?*} children Children tree container.
  17855. * @return {number} The number of children.
  17856. */
  17857. function countChildren(children, context) {
  17858. return traverseAllChildren(children, forEachSingleChildDummy, null);
  17859. }
  17860. /**
  17861. * Flatten a children object (typically specified as `props.children`) and
  17862. * return an array with appropriately re-keyed children.
  17863. *
  17864. * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
  17865. */
  17866. function toArray(children) {
  17867. var result = [];
  17868. mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
  17869. return result;
  17870. }
  17871. var ReactChildren = {
  17872. forEach: forEachChildren,
  17873. map: mapChildren,
  17874. mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
  17875. count: countChildren,
  17876. toArray: toArray
  17877. };
  17878. module.exports = ReactChildren;
  17879. /***/ }),
  17880. /* 175 */
  17881. /***/ (function(module, exports, __webpack_require__) {
  17882. "use strict";
  17883. /* WEBPACK VAR INJECTION */(function(process) {/**
  17884. * Copyright 2013-present, Facebook, Inc.
  17885. * All rights reserved.
  17886. *
  17887. * This source code is licensed under the BSD-style license found in the
  17888. * LICENSE file in the root directory of this source tree. An additional grant
  17889. * of patent rights can be found in the PATENTS file in the same directory.
  17890. *
  17891. */
  17892. var _prodInvariant = __webpack_require__(16),
  17893. _assign = __webpack_require__(4);
  17894. var ReactComponent = __webpack_require__(49);
  17895. var ReactElement = __webpack_require__(15);
  17896. var ReactPropTypeLocationNames = __webpack_require__(79);
  17897. var ReactNoopUpdateQueue = __webpack_require__(50);
  17898. var emptyObject = __webpack_require__(20);
  17899. var invariant = __webpack_require__(1);
  17900. var warning = __webpack_require__(2);
  17901. var MIXINS_KEY = 'mixins';
  17902. // Helper function to allow the creation of anonymous functions which do not
  17903. // have .name set to the name of the variable being assigned to.
  17904. function identity(fn) {
  17905. return fn;
  17906. }
  17907. /**
  17908. * Policies that describe methods in `ReactClassInterface`.
  17909. */
  17910. var injectedMixins = [];
  17911. /**
  17912. * Composite components are higher-level components that compose other composite
  17913. * or host components.
  17914. *
  17915. * To create a new type of `ReactClass`, pass a specification of
  17916. * your new class to `React.createClass`. The only requirement of your class
  17917. * specification is that you implement a `render` method.
  17918. *
  17919. * var MyComponent = React.createClass({
  17920. * render: function() {
  17921. * return <div>Hello World</div>;
  17922. * }
  17923. * });
  17924. *
  17925. * The class specification supports a specific protocol of methods that have
  17926. * special meaning (e.g. `render`). See `ReactClassInterface` for
  17927. * more the comprehensive protocol. Any other properties and methods in the
  17928. * class specification will be available on the prototype.
  17929. *
  17930. * @interface ReactClassInterface
  17931. * @internal
  17932. */
  17933. var ReactClassInterface = {
  17934. /**
  17935. * An array of Mixin objects to include when defining your component.
  17936. *
  17937. * @type {array}
  17938. * @optional
  17939. */
  17940. mixins: 'DEFINE_MANY',
  17941. /**
  17942. * An object containing properties and methods that should be defined on
  17943. * the component's constructor instead of its prototype (static methods).
  17944. *
  17945. * @type {object}
  17946. * @optional
  17947. */
  17948. statics: 'DEFINE_MANY',
  17949. /**
  17950. * Definition of prop types for this component.
  17951. *
  17952. * @type {object}
  17953. * @optional
  17954. */
  17955. propTypes: 'DEFINE_MANY',
  17956. /**
  17957. * Definition of context types for this component.
  17958. *
  17959. * @type {object}
  17960. * @optional
  17961. */
  17962. contextTypes: 'DEFINE_MANY',
  17963. /**
  17964. * Definition of context types this component sets for its children.
  17965. *
  17966. * @type {object}
  17967. * @optional
  17968. */
  17969. childContextTypes: 'DEFINE_MANY',
  17970. // ==== Definition methods ====
  17971. /**
  17972. * Invoked when the component is mounted. Values in the mapping will be set on
  17973. * `this.props` if that prop is not specified (i.e. using an `in` check).
  17974. *
  17975. * This method is invoked before `getInitialState` and therefore cannot rely
  17976. * on `this.state` or use `this.setState`.
  17977. *
  17978. * @return {object}
  17979. * @optional
  17980. */
  17981. getDefaultProps: 'DEFINE_MANY_MERGED',
  17982. /**
  17983. * Invoked once before the component is mounted. The return value will be used
  17984. * as the initial value of `this.state`.
  17985. *
  17986. * getInitialState: function() {
  17987. * return {
  17988. * isOn: false,
  17989. * fooBaz: new BazFoo()
  17990. * }
  17991. * }
  17992. *
  17993. * @return {object}
  17994. * @optional
  17995. */
  17996. getInitialState: 'DEFINE_MANY_MERGED',
  17997. /**
  17998. * @return {object}
  17999. * @optional
  18000. */
  18001. getChildContext: 'DEFINE_MANY_MERGED',
  18002. /**
  18003. * Uses props from `this.props` and state from `this.state` to render the
  18004. * structure of the component.
  18005. *
  18006. * No guarantees are made about when or how often this method is invoked, so
  18007. * it must not have side effects.
  18008. *
  18009. * render: function() {
  18010. * var name = this.props.name;
  18011. * return <div>Hello, {name}!</div>;
  18012. * }
  18013. *
  18014. * @return {ReactComponent}
  18015. * @required
  18016. */
  18017. render: 'DEFINE_ONCE',
  18018. // ==== Delegate methods ====
  18019. /**
  18020. * Invoked when the component is initially created and about to be mounted.
  18021. * This may have side effects, but any external subscriptions or data created
  18022. * by this method must be cleaned up in `componentWillUnmount`.
  18023. *
  18024. * @optional
  18025. */
  18026. componentWillMount: 'DEFINE_MANY',
  18027. /**
  18028. * Invoked when the component has been mounted and has a DOM representation.
  18029. * However, there is no guarantee that the DOM node is in the document.
  18030. *
  18031. * Use this as an opportunity to operate on the DOM when the component has
  18032. * been mounted (initialized and rendered) for the first time.
  18033. *
  18034. * @param {DOMElement} rootNode DOM element representing the component.
  18035. * @optional
  18036. */
  18037. componentDidMount: 'DEFINE_MANY',
  18038. /**
  18039. * Invoked before the component receives new props.
  18040. *
  18041. * Use this as an opportunity to react to a prop transition by updating the
  18042. * state using `this.setState`. Current props are accessed via `this.props`.
  18043. *
  18044. * componentWillReceiveProps: function(nextProps, nextContext) {
  18045. * this.setState({
  18046. * likesIncreasing: nextProps.likeCount > this.props.likeCount
  18047. * });
  18048. * }
  18049. *
  18050. * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
  18051. * transition may cause a state change, but the opposite is not true. If you
  18052. * need it, you are probably looking for `componentWillUpdate`.
  18053. *
  18054. * @param {object} nextProps
  18055. * @optional
  18056. */
  18057. componentWillReceiveProps: 'DEFINE_MANY',
  18058. /**
  18059. * Invoked while deciding if the component should be updated as a result of
  18060. * receiving new props, state and/or context.
  18061. *
  18062. * Use this as an opportunity to `return false` when you're certain that the
  18063. * transition to the new props/state/context will not require a component
  18064. * update.
  18065. *
  18066. * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
  18067. * return !equal(nextProps, this.props) ||
  18068. * !equal(nextState, this.state) ||
  18069. * !equal(nextContext, this.context);
  18070. * }
  18071. *
  18072. * @param {object} nextProps
  18073. * @param {?object} nextState
  18074. * @param {?object} nextContext
  18075. * @return {boolean} True if the component should update.
  18076. * @optional
  18077. */
  18078. shouldComponentUpdate: 'DEFINE_ONCE',
  18079. /**
  18080. * Invoked when the component is about to update due to a transition from
  18081. * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
  18082. * and `nextContext`.
  18083. *
  18084. * Use this as an opportunity to perform preparation before an update occurs.
  18085. *
  18086. * NOTE: You **cannot** use `this.setState()` in this method.
  18087. *
  18088. * @param {object} nextProps
  18089. * @param {?object} nextState
  18090. * @param {?object} nextContext
  18091. * @param {ReactReconcileTransaction} transaction
  18092. * @optional
  18093. */
  18094. componentWillUpdate: 'DEFINE_MANY',
  18095. /**
  18096. * Invoked when the component's DOM representation has been updated.
  18097. *
  18098. * Use this as an opportunity to operate on the DOM when the component has
  18099. * been updated.
  18100. *
  18101. * @param {object} prevProps
  18102. * @param {?object} prevState
  18103. * @param {?object} prevContext
  18104. * @param {DOMElement} rootNode DOM element representing the component.
  18105. * @optional
  18106. */
  18107. componentDidUpdate: 'DEFINE_MANY',
  18108. /**
  18109. * Invoked when the component is about to be removed from its parent and have
  18110. * its DOM representation destroyed.
  18111. *
  18112. * Use this as an opportunity to deallocate any external resources.
  18113. *
  18114. * NOTE: There is no `componentDidUnmount` since your component will have been
  18115. * destroyed by that point.
  18116. *
  18117. * @optional
  18118. */
  18119. componentWillUnmount: 'DEFINE_MANY',
  18120. // ==== Advanced methods ====
  18121. /**
  18122. * Updates the component's currently mounted DOM representation.
  18123. *
  18124. * By default, this implements React's rendering and reconciliation algorithm.
  18125. * Sophisticated clients may wish to override this.
  18126. *
  18127. * @param {ReactReconcileTransaction} transaction
  18128. * @internal
  18129. * @overridable
  18130. */
  18131. updateComponent: 'OVERRIDE_BASE'
  18132. };
  18133. /**
  18134. * Mapping from class specification keys to special processing functions.
  18135. *
  18136. * Although these are declared like instance properties in the specification
  18137. * when defining classes using `React.createClass`, they are actually static
  18138. * and are accessible on the constructor instead of the prototype. Despite
  18139. * being static, they must be defined outside of the "statics" key under
  18140. * which all other static methods are defined.
  18141. */
  18142. var RESERVED_SPEC_KEYS = {
  18143. displayName: function (Constructor, displayName) {
  18144. Constructor.displayName = displayName;
  18145. },
  18146. mixins: function (Constructor, mixins) {
  18147. if (mixins) {
  18148. for (var i = 0; i < mixins.length; i++) {
  18149. mixSpecIntoComponent(Constructor, mixins[i]);
  18150. }
  18151. }
  18152. },
  18153. childContextTypes: function (Constructor, childContextTypes) {
  18154. if (process.env.NODE_ENV !== 'production') {
  18155. validateTypeDef(Constructor, childContextTypes, 'childContext');
  18156. }
  18157. Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
  18158. },
  18159. contextTypes: function (Constructor, contextTypes) {
  18160. if (process.env.NODE_ENV !== 'production') {
  18161. validateTypeDef(Constructor, contextTypes, 'context');
  18162. }
  18163. Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
  18164. },
  18165. /**
  18166. * Special case getDefaultProps which should move into statics but requires
  18167. * automatic merging.
  18168. */
  18169. getDefaultProps: function (Constructor, getDefaultProps) {
  18170. if (Constructor.getDefaultProps) {
  18171. Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
  18172. } else {
  18173. Constructor.getDefaultProps = getDefaultProps;
  18174. }
  18175. },
  18176. propTypes: function (Constructor, propTypes) {
  18177. if (process.env.NODE_ENV !== 'production') {
  18178. validateTypeDef(Constructor, propTypes, 'prop');
  18179. }
  18180. Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
  18181. },
  18182. statics: function (Constructor, statics) {
  18183. mixStaticSpecIntoComponent(Constructor, statics);
  18184. },
  18185. autobind: function () {} };
  18186. function validateTypeDef(Constructor, typeDef, location) {
  18187. for (var propName in typeDef) {
  18188. if (typeDef.hasOwnProperty(propName)) {
  18189. // use a warning instead of an invariant so components
  18190. // don't show up in prod but only in __DEV__
  18191. process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
  18192. }
  18193. }
  18194. }
  18195. function validateMethodOverride(isAlreadyDefined, name) {
  18196. var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
  18197. // Disallow overriding of base class methods unless explicitly allowed.
  18198. if (ReactClassMixin.hasOwnProperty(name)) {
  18199. !(specPolicy === 'OVERRIDE_BASE') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;
  18200. }
  18201. // Disallow defining methods more than once unless explicitly allowed.
  18202. if (isAlreadyDefined) {
  18203. !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
  18204. }
  18205. }
  18206. /**
  18207. * Mixin helper which handles policy validation and reserved
  18208. * specification keys when building React classes.
  18209. */
  18210. function mixSpecIntoComponent(Constructor, spec) {
  18211. if (!spec) {
  18212. if (process.env.NODE_ENV !== 'production') {
  18213. var typeofSpec = typeof spec;
  18214. var isMixinValid = typeofSpec === 'object' && spec !== null;
  18215. process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
  18216. }
  18217. return;
  18218. }
  18219. !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;
  18220. !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;
  18221. var proto = Constructor.prototype;
  18222. var autoBindPairs = proto.__reactAutoBindPairs;
  18223. // By handling mixins before any other properties, we ensure the same
  18224. // chaining order is applied to methods with DEFINE_MANY policy, whether
  18225. // mixins are listed before or after these methods in the spec.
  18226. if (spec.hasOwnProperty(MIXINS_KEY)) {
  18227. RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
  18228. }
  18229. for (var name in spec) {
  18230. if (!spec.hasOwnProperty(name)) {
  18231. continue;
  18232. }
  18233. if (name === MIXINS_KEY) {
  18234. // We have already handled mixins in a special case above.
  18235. continue;
  18236. }
  18237. var property = spec[name];
  18238. var isAlreadyDefined = proto.hasOwnProperty(name);
  18239. validateMethodOverride(isAlreadyDefined, name);
  18240. if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
  18241. RESERVED_SPEC_KEYS[name](Constructor, property);
  18242. } else {
  18243. // Setup methods on prototype:
  18244. // The following member methods should not be automatically bound:
  18245. // 1. Expected ReactClass methods (in the "interface").
  18246. // 2. Overridden methods (that were mixed in).
  18247. var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
  18248. var isFunction = typeof property === 'function';
  18249. var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
  18250. if (shouldAutoBind) {
  18251. autoBindPairs.push(name, property);
  18252. proto[name] = property;
  18253. } else {
  18254. if (isAlreadyDefined) {
  18255. var specPolicy = ReactClassInterface[name];
  18256. // These cases should already be caught by validateMethodOverride.
  18257. !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
  18258. // For methods which are defined more than once, call the existing
  18259. // methods before calling the new property, merging if appropriate.
  18260. if (specPolicy === 'DEFINE_MANY_MERGED') {
  18261. proto[name] = createMergedResultFunction(proto[name], property);
  18262. } else if (specPolicy === 'DEFINE_MANY') {
  18263. proto[name] = createChainedFunction(proto[name], property);
  18264. }
  18265. } else {
  18266. proto[name] = property;
  18267. if (process.env.NODE_ENV !== 'production') {
  18268. // Add verbose displayName to the function, which helps when looking
  18269. // at profiling tools.
  18270. if (typeof property === 'function' && spec.displayName) {
  18271. proto[name].displayName = spec.displayName + '_' + name;
  18272. }
  18273. }
  18274. }
  18275. }
  18276. }
  18277. }
  18278. }
  18279. function mixStaticSpecIntoComponent(Constructor, statics) {
  18280. if (!statics) {
  18281. return;
  18282. }
  18283. for (var name in statics) {
  18284. var property = statics[name];
  18285. if (!statics.hasOwnProperty(name)) {
  18286. continue;
  18287. }
  18288. var isReserved = name in RESERVED_SPEC_KEYS;
  18289. !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;
  18290. var isInherited = name in Constructor;
  18291. !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;
  18292. Constructor[name] = property;
  18293. }
  18294. }
  18295. /**
  18296. * Merge two objects, but throw if both contain the same key.
  18297. *
  18298. * @param {object} one The first object, which is mutated.
  18299. * @param {object} two The second object
  18300. * @return {object} one after it has been mutated to contain everything in two.
  18301. */
  18302. function mergeIntoWithNoDuplicateKeys(one, two) {
  18303. !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
  18304. for (var key in two) {
  18305. if (two.hasOwnProperty(key)) {
  18306. !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;
  18307. one[key] = two[key];
  18308. }
  18309. }
  18310. return one;
  18311. }
  18312. /**
  18313. * Creates a function that invokes two functions and merges their return values.
  18314. *
  18315. * @param {function} one Function to invoke first.
  18316. * @param {function} two Function to invoke second.
  18317. * @return {function} Function that invokes the two argument functions.
  18318. * @private
  18319. */
  18320. function createMergedResultFunction(one, two) {
  18321. return function mergedResult() {
  18322. var a = one.apply(this, arguments);
  18323. var b = two.apply(this, arguments);
  18324. if (a == null) {
  18325. return b;
  18326. } else if (b == null) {
  18327. return a;
  18328. }
  18329. var c = {};
  18330. mergeIntoWithNoDuplicateKeys(c, a);
  18331. mergeIntoWithNoDuplicateKeys(c, b);
  18332. return c;
  18333. };
  18334. }
  18335. /**
  18336. * Creates a function that invokes two functions and ignores their return vales.
  18337. *
  18338. * @param {function} one Function to invoke first.
  18339. * @param {function} two Function to invoke second.
  18340. * @return {function} Function that invokes the two argument functions.
  18341. * @private
  18342. */
  18343. function createChainedFunction(one, two) {
  18344. return function chainedFunction() {
  18345. one.apply(this, arguments);
  18346. two.apply(this, arguments);
  18347. };
  18348. }
  18349. /**
  18350. * Binds a method to the component.
  18351. *
  18352. * @param {object} component Component whose method is going to be bound.
  18353. * @param {function} method Method to be bound.
  18354. * @return {function} The bound method.
  18355. */
  18356. function bindAutoBindMethod(component, method) {
  18357. var boundMethod = method.bind(component);
  18358. if (process.env.NODE_ENV !== 'production') {
  18359. boundMethod.__reactBoundContext = component;
  18360. boundMethod.__reactBoundMethod = method;
  18361. boundMethod.__reactBoundArguments = null;
  18362. var componentName = component.constructor.displayName;
  18363. var _bind = boundMethod.bind;
  18364. boundMethod.bind = function (newThis) {
  18365. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  18366. args[_key - 1] = arguments[_key];
  18367. }
  18368. // User is trying to bind() an autobound method; we effectively will
  18369. // ignore the value of "this" that the user is trying to use, so
  18370. // let's warn.
  18371. if (newThis !== component && newThis !== null) {
  18372. process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
  18373. } else if (!args.length) {
  18374. process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
  18375. return boundMethod;
  18376. }
  18377. var reboundMethod = _bind.apply(boundMethod, arguments);
  18378. reboundMethod.__reactBoundContext = component;
  18379. reboundMethod.__reactBoundMethod = method;
  18380. reboundMethod.__reactBoundArguments = args;
  18381. return reboundMethod;
  18382. };
  18383. }
  18384. return boundMethod;
  18385. }
  18386. /**
  18387. * Binds all auto-bound methods in a component.
  18388. *
  18389. * @param {object} component Component whose method is going to be bound.
  18390. */
  18391. function bindAutoBindMethods(component) {
  18392. var pairs = component.__reactAutoBindPairs;
  18393. for (var i = 0; i < pairs.length; i += 2) {
  18394. var autoBindKey = pairs[i];
  18395. var method = pairs[i + 1];
  18396. component[autoBindKey] = bindAutoBindMethod(component, method);
  18397. }
  18398. }
  18399. /**
  18400. * Add more to the ReactClass base class. These are all legacy features and
  18401. * therefore not already part of the modern ReactComponent.
  18402. */
  18403. var ReactClassMixin = {
  18404. /**
  18405. * TODO: This will be deprecated because state should always keep a consistent
  18406. * type signature and the only use case for this, is to avoid that.
  18407. */
  18408. replaceState: function (newState, callback) {
  18409. this.updater.enqueueReplaceState(this, newState);
  18410. if (callback) {
  18411. this.updater.enqueueCallback(this, callback, 'replaceState');
  18412. }
  18413. },
  18414. /**
  18415. * Checks whether or not this composite component is mounted.
  18416. * @return {boolean} True if mounted, false otherwise.
  18417. * @protected
  18418. * @final
  18419. */
  18420. isMounted: function () {
  18421. return this.updater.isMounted(this);
  18422. }
  18423. };
  18424. var ReactClassComponent = function () {};
  18425. _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
  18426. var didWarnDeprecated = false;
  18427. /**
  18428. * Module for creating composite components.
  18429. *
  18430. * @class ReactClass
  18431. */
  18432. var ReactClass = {
  18433. /**
  18434. * Creates a composite component class given a class specification.
  18435. * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
  18436. *
  18437. * @param {object} spec Class specification (which must define `render`).
  18438. * @return {function} Component constructor function.
  18439. * @public
  18440. */
  18441. createClass: function (spec) {
  18442. if (process.env.NODE_ENV !== 'production') {
  18443. process.env.NODE_ENV !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0;
  18444. didWarnDeprecated = true;
  18445. }
  18446. // To keep our warnings more understandable, we'll use a little hack here to
  18447. // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
  18448. // unnecessarily identify a class without displayName as 'Constructor'.
  18449. var Constructor = identity(function (props, context, updater) {
  18450. // This constructor gets overridden by mocks. The argument is used
  18451. // by mocks to assert on what gets mounted.
  18452. if (process.env.NODE_ENV !== 'production') {
  18453. process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
  18454. }
  18455. // Wire up auto-binding
  18456. if (this.__reactAutoBindPairs.length) {
  18457. bindAutoBindMethods(this);
  18458. }
  18459. this.props = props;
  18460. this.context = context;
  18461. this.refs = emptyObject;
  18462. this.updater = updater || ReactNoopUpdateQueue;
  18463. this.state = null;
  18464. // ReactClasses doesn't have constructors. Instead, they use the
  18465. // getInitialState and componentWillMount methods for initialization.
  18466. var initialState = this.getInitialState ? this.getInitialState() : null;
  18467. if (process.env.NODE_ENV !== 'production') {
  18468. // We allow auto-mocks to proceed as if they're returning null.
  18469. if (initialState === undefined && this.getInitialState._isMockFunction) {
  18470. // This is probably bad practice. Consider warning here and
  18471. // deprecating this convenience.
  18472. initialState = null;
  18473. }
  18474. }
  18475. !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;
  18476. this.state = initialState;
  18477. });
  18478. Constructor.prototype = new ReactClassComponent();
  18479. Constructor.prototype.constructor = Constructor;
  18480. Constructor.prototype.__reactAutoBindPairs = [];
  18481. injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
  18482. mixSpecIntoComponent(Constructor, spec);
  18483. // Initialize the defaultProps property after all mixins have been merged.
  18484. if (Constructor.getDefaultProps) {
  18485. Constructor.defaultProps = Constructor.getDefaultProps();
  18486. }
  18487. if (process.env.NODE_ENV !== 'production') {
  18488. // This is a tag to indicate that the use of these method names is ok,
  18489. // since it's used with createClass. If it's not, then it's likely a
  18490. // mistake so we'll warn you to use the static property, property
  18491. // initializer or constructor respectively.
  18492. if (Constructor.getDefaultProps) {
  18493. Constructor.getDefaultProps.isReactClassApproved = {};
  18494. }
  18495. if (Constructor.prototype.getInitialState) {
  18496. Constructor.prototype.getInitialState.isReactClassApproved = {};
  18497. }
  18498. }
  18499. !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
  18500. if (process.env.NODE_ENV !== 'production') {
  18501. process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
  18502. process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
  18503. }
  18504. // Reduce time spent doing lookups by setting these on the prototype.
  18505. for (var methodName in ReactClassInterface) {
  18506. if (!Constructor.prototype[methodName]) {
  18507. Constructor.prototype[methodName] = null;
  18508. }
  18509. }
  18510. return Constructor;
  18511. },
  18512. injection: {
  18513. injectMixin: function (mixin) {
  18514. injectedMixins.push(mixin);
  18515. }
  18516. }
  18517. };
  18518. module.exports = ReactClass;
  18519. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  18520. /***/ }),
  18521. /* 176 */
  18522. /***/ (function(module, exports, __webpack_require__) {
  18523. "use strict";
  18524. /* WEBPACK VAR INJECTION */(function(process) {/**
  18525. * Copyright 2013-present, Facebook, Inc.
  18526. * All rights reserved.
  18527. *
  18528. * This source code is licensed under the BSD-style license found in the
  18529. * LICENSE file in the root directory of this source tree. An additional grant
  18530. * of patent rights can be found in the PATENTS file in the same directory.
  18531. *
  18532. */
  18533. var ReactElement = __webpack_require__(15);
  18534. /**
  18535. * Create a factory that creates HTML tag elements.
  18536. *
  18537. * @private
  18538. */
  18539. var createDOMFactory = ReactElement.createFactory;
  18540. if (process.env.NODE_ENV !== 'production') {
  18541. var ReactElementValidator = __webpack_require__(78);
  18542. createDOMFactory = ReactElementValidator.createFactory;
  18543. }
  18544. /**
  18545. * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
  18546. * This is also accessible via `React.DOM`.
  18547. *
  18548. * @public
  18549. */
  18550. var ReactDOMFactories = {
  18551. a: createDOMFactory('a'),
  18552. abbr: createDOMFactory('abbr'),
  18553. address: createDOMFactory('address'),
  18554. area: createDOMFactory('area'),
  18555. article: createDOMFactory('article'),
  18556. aside: createDOMFactory('aside'),
  18557. audio: createDOMFactory('audio'),
  18558. b: createDOMFactory('b'),
  18559. base: createDOMFactory('base'),
  18560. bdi: createDOMFactory('bdi'),
  18561. bdo: createDOMFactory('bdo'),
  18562. big: createDOMFactory('big'),
  18563. blockquote: createDOMFactory('blockquote'),
  18564. body: createDOMFactory('body'),
  18565. br: createDOMFactory('br'),
  18566. button: createDOMFactory('button'),
  18567. canvas: createDOMFactory('canvas'),
  18568. caption: createDOMFactory('caption'),
  18569. cite: createDOMFactory('cite'),
  18570. code: createDOMFactory('code'),
  18571. col: createDOMFactory('col'),
  18572. colgroup: createDOMFactory('colgroup'),
  18573. data: createDOMFactory('data'),
  18574. datalist: createDOMFactory('datalist'),
  18575. dd: createDOMFactory('dd'),
  18576. del: createDOMFactory('del'),
  18577. details: createDOMFactory('details'),
  18578. dfn: createDOMFactory('dfn'),
  18579. dialog: createDOMFactory('dialog'),
  18580. div: createDOMFactory('div'),
  18581. dl: createDOMFactory('dl'),
  18582. dt: createDOMFactory('dt'),
  18583. em: createDOMFactory('em'),
  18584. embed: createDOMFactory('embed'),
  18585. fieldset: createDOMFactory('fieldset'),
  18586. figcaption: createDOMFactory('figcaption'),
  18587. figure: createDOMFactory('figure'),
  18588. footer: createDOMFactory('footer'),
  18589. form: createDOMFactory('form'),
  18590. h1: createDOMFactory('h1'),
  18591. h2: createDOMFactory('h2'),
  18592. h3: createDOMFactory('h3'),
  18593. h4: createDOMFactory('h4'),
  18594. h5: createDOMFactory('h5'),
  18595. h6: createDOMFactory('h6'),
  18596. head: createDOMFactory('head'),
  18597. header: createDOMFactory('header'),
  18598. hgroup: createDOMFactory('hgroup'),
  18599. hr: createDOMFactory('hr'),
  18600. html: createDOMFactory('html'),
  18601. i: createDOMFactory('i'),
  18602. iframe: createDOMFactory('iframe'),
  18603. img: createDOMFactory('img'),
  18604. input: createDOMFactory('input'),
  18605. ins: createDOMFactory('ins'),
  18606. kbd: createDOMFactory('kbd'),
  18607. keygen: createDOMFactory('keygen'),
  18608. label: createDOMFactory('label'),
  18609. legend: createDOMFactory('legend'),
  18610. li: createDOMFactory('li'),
  18611. link: createDOMFactory('link'),
  18612. main: createDOMFactory('main'),
  18613. map: createDOMFactory('map'),
  18614. mark: createDOMFactory('mark'),
  18615. menu: createDOMFactory('menu'),
  18616. menuitem: createDOMFactory('menuitem'),
  18617. meta: createDOMFactory('meta'),
  18618. meter: createDOMFactory('meter'),
  18619. nav: createDOMFactory('nav'),
  18620. noscript: createDOMFactory('noscript'),
  18621. object: createDOMFactory('object'),
  18622. ol: createDOMFactory('ol'),
  18623. optgroup: createDOMFactory('optgroup'),
  18624. option: createDOMFactory('option'),
  18625. output: createDOMFactory('output'),
  18626. p: createDOMFactory('p'),
  18627. param: createDOMFactory('param'),
  18628. picture: createDOMFactory('picture'),
  18629. pre: createDOMFactory('pre'),
  18630. progress: createDOMFactory('progress'),
  18631. q: createDOMFactory('q'),
  18632. rp: createDOMFactory('rp'),
  18633. rt: createDOMFactory('rt'),
  18634. ruby: createDOMFactory('ruby'),
  18635. s: createDOMFactory('s'),
  18636. samp: createDOMFactory('samp'),
  18637. script: createDOMFactory('script'),
  18638. section: createDOMFactory('section'),
  18639. select: createDOMFactory('select'),
  18640. small: createDOMFactory('small'),
  18641. source: createDOMFactory('source'),
  18642. span: createDOMFactory('span'),
  18643. strong: createDOMFactory('strong'),
  18644. style: createDOMFactory('style'),
  18645. sub: createDOMFactory('sub'),
  18646. summary: createDOMFactory('summary'),
  18647. sup: createDOMFactory('sup'),
  18648. table: createDOMFactory('table'),
  18649. tbody: createDOMFactory('tbody'),
  18650. td: createDOMFactory('td'),
  18651. textarea: createDOMFactory('textarea'),
  18652. tfoot: createDOMFactory('tfoot'),
  18653. th: createDOMFactory('th'),
  18654. thead: createDOMFactory('thead'),
  18655. time: createDOMFactory('time'),
  18656. title: createDOMFactory('title'),
  18657. tr: createDOMFactory('tr'),
  18658. track: createDOMFactory('track'),
  18659. u: createDOMFactory('u'),
  18660. ul: createDOMFactory('ul'),
  18661. 'var': createDOMFactory('var'),
  18662. video: createDOMFactory('video'),
  18663. wbr: createDOMFactory('wbr'),
  18664. // SVG
  18665. circle: createDOMFactory('circle'),
  18666. clipPath: createDOMFactory('clipPath'),
  18667. defs: createDOMFactory('defs'),
  18668. ellipse: createDOMFactory('ellipse'),
  18669. g: createDOMFactory('g'),
  18670. image: createDOMFactory('image'),
  18671. line: createDOMFactory('line'),
  18672. linearGradient: createDOMFactory('linearGradient'),
  18673. mask: createDOMFactory('mask'),
  18674. path: createDOMFactory('path'),
  18675. pattern: createDOMFactory('pattern'),
  18676. polygon: createDOMFactory('polygon'),
  18677. polyline: createDOMFactory('polyline'),
  18678. radialGradient: createDOMFactory('radialGradient'),
  18679. rect: createDOMFactory('rect'),
  18680. stop: createDOMFactory('stop'),
  18681. svg: createDOMFactory('svg'),
  18682. text: createDOMFactory('text'),
  18683. tspan: createDOMFactory('tspan')
  18684. };
  18685. module.exports = ReactDOMFactories;
  18686. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  18687. /***/ }),
  18688. /* 177 */
  18689. /***/ (function(module, exports, __webpack_require__) {
  18690. "use strict";
  18691. /**
  18692. * Copyright 2013-present, Facebook, Inc.
  18693. * All rights reserved.
  18694. *
  18695. * This source code is licensed under the BSD-style license found in the
  18696. * LICENSE file in the root directory of this source tree. An additional grant
  18697. * of patent rights can be found in the PATENTS file in the same directory.
  18698. *
  18699. */
  18700. var _require = __webpack_require__(15),
  18701. isValidElement = _require.isValidElement;
  18702. var factory = __webpack_require__(54);
  18703. module.exports = factory(isValidElement);
  18704. /***/ }),
  18705. /* 178 */
  18706. /***/ (function(module, exports, __webpack_require__) {
  18707. "use strict";
  18708. /**
  18709. * Copyright 2013-present, Facebook, Inc.
  18710. * All rights reserved.
  18711. *
  18712. * This source code is licensed under the BSD-style license found in the
  18713. * LICENSE file in the root directory of this source tree. An additional grant
  18714. * of patent rights can be found in the PATENTS file in the same directory.
  18715. *
  18716. *
  18717. */
  18718. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  18719. module.exports = ReactPropTypesSecret;
  18720. /***/ }),
  18721. /* 179 */
  18722. /***/ (function(module, exports, __webpack_require__) {
  18723. "use strict";
  18724. /**
  18725. * Copyright 2013-present, Facebook, Inc.
  18726. * All rights reserved.
  18727. *
  18728. * This source code is licensed under the BSD-style license found in the
  18729. * LICENSE file in the root directory of this source tree. An additional grant
  18730. * of patent rights can be found in the PATENTS file in the same directory.
  18731. *
  18732. */
  18733. var _assign = __webpack_require__(4);
  18734. var ReactComponent = __webpack_require__(49);
  18735. var ReactNoopUpdateQueue = __webpack_require__(50);
  18736. var emptyObject = __webpack_require__(20);
  18737. /**
  18738. * Base class helpers for the updating state of a component.
  18739. */
  18740. function ReactPureComponent(props, context, updater) {
  18741. // Duplicated from ReactComponent.
  18742. this.props = props;
  18743. this.context = context;
  18744. this.refs = emptyObject;
  18745. // We initialize the default updater but the real one gets injected by the
  18746. // renderer.
  18747. this.updater = updater || ReactNoopUpdateQueue;
  18748. }
  18749. function ComponentDummy() {}
  18750. ComponentDummy.prototype = ReactComponent.prototype;
  18751. ReactPureComponent.prototype = new ComponentDummy();
  18752. ReactPureComponent.prototype.constructor = ReactPureComponent;
  18753. // Avoid an extra prototype jump for these methods.
  18754. _assign(ReactPureComponent.prototype, ReactComponent.prototype);
  18755. ReactPureComponent.prototype.isPureReactComponent = true;
  18756. module.exports = ReactPureComponent;
  18757. /***/ }),
  18758. /* 180 */
  18759. /***/ (function(module, exports, __webpack_require__) {
  18760. "use strict";
  18761. /**
  18762. * Copyright 2013-present, Facebook, Inc.
  18763. * All rights reserved.
  18764. *
  18765. * This source code is licensed under the BSD-style license found in the
  18766. * LICENSE file in the root directory of this source tree. An additional grant
  18767. * of patent rights can be found in the PATENTS file in the same directory.
  18768. *
  18769. */
  18770. module.exports = '15.5.4';
  18771. /***/ }),
  18772. /* 181 */
  18773. /***/ (function(module, exports, __webpack_require__) {
  18774. "use strict";
  18775. /* WEBPACK VAR INJECTION */(function(process) {/**
  18776. * Copyright 2013-present, Facebook, Inc.
  18777. * All rights reserved.
  18778. *
  18779. * This source code is licensed under the BSD-style license found in the
  18780. * LICENSE file in the root directory of this source tree. An additional grant
  18781. * of patent rights can be found in the PATENTS file in the same directory.
  18782. *
  18783. */
  18784. var _prodInvariant = __webpack_require__(16);
  18785. var ReactPropTypeLocationNames = __webpack_require__(79);
  18786. var ReactPropTypesSecret = __webpack_require__(178);
  18787. var invariant = __webpack_require__(1);
  18788. var warning = __webpack_require__(2);
  18789. var ReactComponentTreeHook;
  18790. if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
  18791. // Temporary hack.
  18792. // Inline requires don't work well with Jest:
  18793. // https://github.com/facebook/react/issues/7240
  18794. // Remove the inline requires when we don't need them anymore:
  18795. // https://github.com/facebook/react/pull/7178
  18796. ReactComponentTreeHook = __webpack_require__(7);
  18797. }
  18798. var loggedTypeFailures = {};
  18799. /**
  18800. * Assert that the values match with the type specs.
  18801. * Error messages are memorized and will only be shown once.
  18802. *
  18803. * @param {object} typeSpecs Map of name to a ReactPropType
  18804. * @param {object} values Runtime values that need to be type-checked
  18805. * @param {string} location e.g. "prop", "context", "child context"
  18806. * @param {string} componentName Name of the component for error messages.
  18807. * @param {?object} element The React element that is being type-checked
  18808. * @param {?number} debugID The React component instance that is being type-checked
  18809. * @private
  18810. */
  18811. function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
  18812. for (var typeSpecName in typeSpecs) {
  18813. if (typeSpecs.hasOwnProperty(typeSpecName)) {
  18814. var error;
  18815. // Prop type validation may throw. In case they do, we don't want to
  18816. // fail the render phase where it didn't fail before. So we log it.
  18817. // After these have been cleaned up, we'll let them throw.
  18818. try {
  18819. // This is intentionally an invariant that gets caught. It's the same
  18820. // behavior as without this statement except with a better message.
  18821. !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
  18822. error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  18823. } catch (ex) {
  18824. error = ex;
  18825. }
  18826. process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
  18827. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  18828. // Only monitor this failure once because there tends to be a lot of the
  18829. // same error.
  18830. loggedTypeFailures[error.message] = true;
  18831. var componentStackInfo = '';
  18832. if (process.env.NODE_ENV !== 'production') {
  18833. if (!ReactComponentTreeHook) {
  18834. ReactComponentTreeHook = __webpack_require__(7);
  18835. }
  18836. if (debugID !== null) {
  18837. componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
  18838. } else if (element !== null) {
  18839. componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
  18840. }
  18841. }
  18842. process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
  18843. }
  18844. }
  18845. }
  18846. }
  18847. module.exports = checkReactTypeSpec;
  18848. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  18849. /***/ }),
  18850. /* 182 */
  18851. /***/ (function(module, exports, __webpack_require__) {
  18852. "use strict";
  18853. /**
  18854. * Copyright 2013-present, Facebook, Inc.
  18855. * All rights reserved.
  18856. *
  18857. * This source code is licensed under the BSD-style license found in the
  18858. * LICENSE file in the root directory of this source tree. An additional grant
  18859. * of patent rights can be found in the PATENTS file in the same directory.
  18860. *
  18861. *
  18862. */
  18863. var nextDebugID = 1;
  18864. function getNextDebugID() {
  18865. return nextDebugID++;
  18866. }
  18867. module.exports = getNextDebugID;
  18868. /***/ }),
  18869. /* 183 */
  18870. /***/ (function(module, exports, __webpack_require__) {
  18871. "use strict";
  18872. /* WEBPACK VAR INJECTION */(function(process) {/**
  18873. * Copyright 2013-present, Facebook, Inc.
  18874. * All rights reserved.
  18875. *
  18876. * This source code is licensed under the BSD-style license found in the
  18877. * LICENSE file in the root directory of this source tree. An additional grant
  18878. * of patent rights can be found in the PATENTS file in the same directory.
  18879. *
  18880. */
  18881. var _prodInvariant = __webpack_require__(16);
  18882. var ReactElement = __webpack_require__(15);
  18883. var invariant = __webpack_require__(1);
  18884. /**
  18885. * Returns the first child in a collection of children and verifies that there
  18886. * is only one child in the collection.
  18887. *
  18888. * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
  18889. *
  18890. * The current implementation of this function assumes that a single child gets
  18891. * passed without a wrapper, but the purpose of this helper function is to
  18892. * abstract away the particular structure of children.
  18893. *
  18894. * @param {?object} children Child collection structure.
  18895. * @return {ReactElement} The first and only `ReactElement` contained in the
  18896. * structure.
  18897. */
  18898. function onlyChild(children) {
  18899. !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
  18900. return children;
  18901. }
  18902. module.exports = onlyChild;
  18903. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  18904. /***/ }),
  18905. /* 184 */
  18906. /***/ (function(module, exports, __webpack_require__) {
  18907. "use strict";
  18908. /* WEBPACK VAR INJECTION */(function(process) {/**
  18909. * Copyright 2013-present, Facebook, Inc.
  18910. * All rights reserved.
  18911. *
  18912. * This source code is licensed under the BSD-style license found in the
  18913. * LICENSE file in the root directory of this source tree. An additional grant
  18914. * of patent rights can be found in the PATENTS file in the same directory.
  18915. *
  18916. */
  18917. var _prodInvariant = __webpack_require__(16);
  18918. var ReactCurrentOwner = __webpack_require__(11);
  18919. var REACT_ELEMENT_TYPE = __webpack_require__(77);
  18920. var getIteratorFn = __webpack_require__(80);
  18921. var invariant = __webpack_require__(1);
  18922. var KeyEscapeUtils = __webpack_require__(172);
  18923. var warning = __webpack_require__(2);
  18924. var SEPARATOR = '.';
  18925. var SUBSEPARATOR = ':';
  18926. /**
  18927. * This is inlined from ReactElement since this file is shared between
  18928. * isomorphic and renderers. We could extract this to a
  18929. *
  18930. */
  18931. /**
  18932. * TODO: Test that a single child and an array with one item have the same key
  18933. * pattern.
  18934. */
  18935. var didWarnAboutMaps = false;
  18936. /**
  18937. * Generate a key string that identifies a component within a set.
  18938. *
  18939. * @param {*} component A component that could contain a manual key.
  18940. * @param {number} index Index that is used if a manual key is not provided.
  18941. * @return {string}
  18942. */
  18943. function getComponentKey(component, index) {
  18944. // Do some typechecking here since we call this blindly. We want to ensure
  18945. // that we don't block potential future ES APIs.
  18946. if (component && typeof component === 'object' && component.key != null) {
  18947. // Explicit key
  18948. return KeyEscapeUtils.escape(component.key);
  18949. }
  18950. // Implicit key determined by the index in the set
  18951. return index.toString(36);
  18952. }
  18953. /**
  18954. * @param {?*} children Children tree container.
  18955. * @param {!string} nameSoFar Name of the key path so far.
  18956. * @param {!function} callback Callback to invoke with each child found.
  18957. * @param {?*} traverseContext Used to pass information throughout the traversal
  18958. * process.
  18959. * @return {!number} The number of children in this subtree.
  18960. */
  18961. function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
  18962. var type = typeof children;
  18963. if (type === 'undefined' || type === 'boolean') {
  18964. // All of the above are perceived as null.
  18965. children = null;
  18966. }
  18967. if (children === null || type === 'string' || type === 'number' ||
  18968. // The following is inlined from ReactElement. This means we can optimize
  18969. // some checks. React Fiber also inlines this logic for similar purposes.
  18970. type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
  18971. callback(traverseContext, children,
  18972. // If it's the only child, treat the name as if it was wrapped in an array
  18973. // so that it's consistent if the number of children grows.
  18974. nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
  18975. return 1;
  18976. }
  18977. var child;
  18978. var nextName;
  18979. var subtreeCount = 0; // Count of children found in the current subtree.
  18980. var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
  18981. if (Array.isArray(children)) {
  18982. for (var i = 0; i < children.length; i++) {
  18983. child = children[i];
  18984. nextName = nextNamePrefix + getComponentKey(child, i);
  18985. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  18986. }
  18987. } else {
  18988. var iteratorFn = getIteratorFn(children);
  18989. if (iteratorFn) {
  18990. var iterator = iteratorFn.call(children);
  18991. var step;
  18992. if (iteratorFn !== children.entries) {
  18993. var ii = 0;
  18994. while (!(step = iterator.next()).done) {
  18995. child = step.value;
  18996. nextName = nextNamePrefix + getComponentKey(child, ii++);
  18997. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  18998. }
  18999. } else {
  19000. if (process.env.NODE_ENV !== 'production') {
  19001. var mapsAsChildrenAddendum = '';
  19002. if (ReactCurrentOwner.current) {
  19003. var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
  19004. if (mapsAsChildrenOwnerName) {
  19005. mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
  19006. }
  19007. }
  19008. process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
  19009. didWarnAboutMaps = true;
  19010. }
  19011. // Iterator will provide entry [k,v] tuples rather than values.
  19012. while (!(step = iterator.next()).done) {
  19013. var entry = step.value;
  19014. if (entry) {
  19015. child = entry[1];
  19016. nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
  19017. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  19018. }
  19019. }
  19020. }
  19021. } else if (type === 'object') {
  19022. var addendum = '';
  19023. if (process.env.NODE_ENV !== 'production') {
  19024. addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
  19025. if (children._isReactElement) {
  19026. addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
  19027. }
  19028. if (ReactCurrentOwner.current) {
  19029. var name = ReactCurrentOwner.current.getName();
  19030. if (name) {
  19031. addendum += ' Check the render method of `' + name + '`.';
  19032. }
  19033. }
  19034. }
  19035. var childrenString = String(children);
  19036. true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
  19037. }
  19038. }
  19039. return subtreeCount;
  19040. }
  19041. /**
  19042. * Traverses children that are typically specified as `props.children`, but
  19043. * might also be specified through attributes:
  19044. *
  19045. * - `traverseAllChildren(this.props.children, ...)`
  19046. * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
  19047. *
  19048. * The `traverseContext` is an optional argument that is passed through the
  19049. * entire traversal. It can be used to store accumulations or anything else that
  19050. * the callback might find relevant.
  19051. *
  19052. * @param {?*} children Children tree object.
  19053. * @param {!function} callback To invoke upon traversing each child.
  19054. * @param {?*} traverseContext Context for traversal.
  19055. * @return {!number} The number of children in this subtree.
  19056. */
  19057. function traverseAllChildren(children, callback, traverseContext) {
  19058. if (children == null) {
  19059. return 0;
  19060. }
  19061. return traverseAllChildrenImpl(children, '', callback, traverseContext);
  19062. }
  19063. module.exports = traverseAllChildren;
  19064. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  19065. /***/ }),
  19066. /* 185 */
  19067. /***/ (function(module, exports, __webpack_require__) {
  19068. (function (global, factory) {
  19069. true ? module.exports = factory() :
  19070. typeof define === 'function' && define.amd ? define(factory) :
  19071. (global.BrowserSpriteSymbol = factory());
  19072. }(this, (function () { 'use strict';
  19073. var SpriteSymbol = function SpriteSymbol(ref) {
  19074. var id = ref.id;
  19075. var viewBox = ref.viewBox;
  19076. var content = ref.content;
  19077. this.id = id;
  19078. this.viewBox = viewBox;
  19079. this.content = content;
  19080. };
  19081. /**
  19082. * @return {string}
  19083. */
  19084. SpriteSymbol.prototype.stringify = function stringify () {
  19085. return this.content;
  19086. };
  19087. /**
  19088. * @return {string}
  19089. */
  19090. SpriteSymbol.prototype.toString = function toString () {
  19091. return this.stringify();
  19092. };
  19093. SpriteSymbol.prototype.destroy = function destroy () {
  19094. var this$1 = this;
  19095. ['id', 'viewBox', 'content'].forEach(function (prop) { return delete this$1[prop]; });
  19096. };
  19097. var hasImportNode = !!document.importNode;
  19098. /**
  19099. * @param {string} content
  19100. * @return {Element}
  19101. */
  19102. var parse = function (content) {
  19103. var doc = new DOMParser().parseFromString(content, 'image/svg+xml').documentElement;
  19104. /**
  19105. * Fix for browser which are throwing WrongDocumentError
  19106. * if you insert an element which is not part of the document
  19107. * @see http://stackoverflow.com/a/7986519/4624403
  19108. */
  19109. if (hasImportNode) {
  19110. return document.importNode(doc, true);
  19111. }
  19112. return doc;
  19113. };
  19114. var BrowserSpriteSymbol = (function (SpriteSymbol$$1) {
  19115. function BrowserSpriteSymbol () {
  19116. SpriteSymbol$$1.apply(this, arguments);
  19117. }
  19118. if ( SpriteSymbol$$1 ) BrowserSpriteSymbol.__proto__ = SpriteSymbol$$1;
  19119. BrowserSpriteSymbol.prototype = Object.create( SpriteSymbol$$1 && SpriteSymbol$$1.prototype );
  19120. BrowserSpriteSymbol.prototype.constructor = BrowserSpriteSymbol;
  19121. BrowserSpriteSymbol.prototype.render = function render () {
  19122. return parse(this.stringify());
  19123. };
  19124. return BrowserSpriteSymbol;
  19125. }(SpriteSymbol));
  19126. return BrowserSpriteSymbol;
  19127. })));
  19128. /***/ }),
  19129. /* 186 */
  19130. /***/ (function(module, exports, __webpack_require__) {
  19131. /* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {
  19132. true ? module.exports = factory() :
  19133. typeof define === 'function' && define.amd ? define(factory) :
  19134. (global.BrowserSprite = factory());
  19135. }(this, (function () { 'use strict';
  19136. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  19137. function createCommonjsModule(fn, module) {
  19138. return module = { exports: {} }, fn(module, module.exports), module.exports;
  19139. }
  19140. var index = createCommonjsModule(function (module, exports) {
  19141. (function (root, factory) {
  19142. if (false) {
  19143. undefined(factory);
  19144. } else {
  19145. module.exports = factory();
  19146. }
  19147. }(commonjsGlobal, function () {
  19148. function isMergeableObject(val) {
  19149. var nonNullObject = val && typeof val === 'object';
  19150. return nonNullObject
  19151. && Object.prototype.toString.call(val) !== '[object RegExp]'
  19152. && Object.prototype.toString.call(val) !== '[object Date]'
  19153. }
  19154. function emptyTarget(val) {
  19155. return Array.isArray(val) ? [] : {}
  19156. }
  19157. function cloneIfNecessary(value, optionsArgument) {
  19158. var clone = optionsArgument && optionsArgument.clone === true;
  19159. return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
  19160. }
  19161. function defaultArrayMerge(target, source, optionsArgument) {
  19162. var destination = target.slice();
  19163. source.forEach(function(e, i) {
  19164. if (typeof destination[i] === 'undefined') {
  19165. destination[i] = cloneIfNecessary(e, optionsArgument);
  19166. } else if (isMergeableObject(e)) {
  19167. destination[i] = deepmerge(target[i], e, optionsArgument);
  19168. } else if (target.indexOf(e) === -1) {
  19169. destination.push(cloneIfNecessary(e, optionsArgument));
  19170. }
  19171. });
  19172. return destination
  19173. }
  19174. function mergeObject(target, source, optionsArgument) {
  19175. var destination = {};
  19176. if (isMergeableObject(target)) {
  19177. Object.keys(target).forEach(function (key) {
  19178. destination[key] = cloneIfNecessary(target[key], optionsArgument);
  19179. });
  19180. }
  19181. Object.keys(source).forEach(function (key) {
  19182. if (!isMergeableObject(source[key]) || !target[key]) {
  19183. destination[key] = cloneIfNecessary(source[key], optionsArgument);
  19184. } else {
  19185. destination[key] = deepmerge(target[key], source[key], optionsArgument);
  19186. }
  19187. });
  19188. return destination
  19189. }
  19190. function deepmerge(target, source, optionsArgument) {
  19191. var array = Array.isArray(source);
  19192. var options = optionsArgument || { arrayMerge: defaultArrayMerge };
  19193. var arrayMerge = options.arrayMerge || defaultArrayMerge;
  19194. if (array) {
  19195. return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument)
  19196. } else {
  19197. return mergeObject(target, source, optionsArgument)
  19198. }
  19199. }
  19200. deepmerge.all = function deepmergeAll(array, optionsArgument) {
  19201. if (!Array.isArray(array) || array.length < 2) {
  19202. throw new Error('first argument should be an array with at least two elements')
  19203. }
  19204. // we are sure there are at least 2 values, so it is safe to have no initial value
  19205. return array.reduce(function(prev, next) {
  19206. return deepmerge(prev, next, optionsArgument)
  19207. })
  19208. };
  19209. return deepmerge
  19210. }));
  19211. });
  19212. //
  19213. // An event handler can take an optional event argument
  19214. // and should not return a value
  19215. // An array of all currently registered event handlers for a type
  19216. // A map of event types and their corresponding event handlers.
  19217. /** Mitt: Tiny (~200b) functional event emitter / pubsub.
  19218. * @name mitt
  19219. * @returns {Mitt}
  19220. */
  19221. function mitt(all ) {
  19222. all = all || Object.create(null);
  19223. return {
  19224. /**
  19225. * Register an event handler for the given type.
  19226. *
  19227. * @param {String} type Type of event to listen for, or `"*"` for all events
  19228. * @param {Function} handler Function to call in response to given event
  19229. * @memberOf mitt
  19230. */
  19231. on: function on(type , handler ) {
  19232. (all[type] || (all[type] = [])).push(handler);
  19233. },
  19234. /**
  19235. * Remove an event handler for the given type.
  19236. *
  19237. * @param {String} type Type of event to unregister `handler` from, or `"*"`
  19238. * @param {Function} handler Handler function to remove
  19239. * @memberOf mitt
  19240. */
  19241. off: function off(type , handler ) {
  19242. if (all[type]) {
  19243. all[type].splice(all[type].indexOf(handler) >>> 0, 1);
  19244. }
  19245. },
  19246. /**
  19247. * Invoke all handlers for the given type.
  19248. * If present, `"*"` handlers are invoked after type-matched handlers.
  19249. *
  19250. * @param {String} type The event type to invoke
  19251. * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
  19252. * @memberof mitt
  19253. */
  19254. emit: function emit(type , evt ) {
  19255. (all[type] || []).map(function (handler) { handler(evt); });
  19256. (all['*'] || []).map(function (handler) { handler(type, evt); });
  19257. }
  19258. };
  19259. }
  19260. var namespaces_1 = createCommonjsModule(function (module, exports) {
  19261. var namespaces = {
  19262. svg: {
  19263. name: 'xmlns',
  19264. uri: 'http://www.w3.org/2000/svg'
  19265. },
  19266. xlink: {
  19267. name: 'xmlns:xlink',
  19268. uri: 'http://www.w3.org/1999/xlink'
  19269. }
  19270. };
  19271. exports.default = namespaces;
  19272. module.exports = exports.default;
  19273. });
  19274. /**
  19275. * @param {Object} attrs
  19276. * @return {string}
  19277. */
  19278. var objectToAttrsString = function (attrs) {
  19279. return Object.keys(attrs).map(function (attr) {
  19280. var value = attrs[attr].toString().replace(/"/g, '&quot;');
  19281. return (attr + "=\"" + value + "\"");
  19282. }).join(' ');
  19283. };
  19284. var svg = namespaces_1.svg;
  19285. var xlink = namespaces_1.xlink;
  19286. var defaultAttrs = {};
  19287. defaultAttrs[svg.name] = svg.uri;
  19288. defaultAttrs[xlink.name] = xlink.uri;
  19289. /**
  19290. * @param {string} [content]
  19291. * @param {Object} [attributes]
  19292. * @return {string}
  19293. */
  19294. var wrapInSvgString = function (content, attributes) {
  19295. if ( content === void 0 ) content = '';
  19296. var attrs = index(defaultAttrs, attributes || {});
  19297. var attrsRendered = objectToAttrsString(attrs);
  19298. return ("<svg " + attrsRendered + ">" + content + "</svg>");
  19299. };
  19300. var svg$1 = namespaces_1.svg;
  19301. var xlink$1 = namespaces_1.xlink;
  19302. var defaultConfig = {
  19303. attrs: ( obj = {
  19304. style: ['position: absolute', 'width: 0', 'height: 0'].join('; ')
  19305. }, obj[svg$1.name] = svg$1.uri, obj[xlink$1.name] = xlink$1.uri, obj )
  19306. };
  19307. var obj;
  19308. var Sprite = function Sprite(config) {
  19309. this.config = index(defaultConfig, config || {});
  19310. this.symbols = [];
  19311. };
  19312. /**
  19313. * TODO return add | replace instead of symbol instance
  19314. * @param {SpriteSymbol} symbol
  19315. * @return {SpriteSymbol}
  19316. */
  19317. Sprite.prototype.add = function add (symbol) {
  19318. var ref = this;
  19319. var symbols = ref.symbols;
  19320. var existing = this.find(symbol.id);
  19321. if (existing) {
  19322. symbols[symbols.indexOf(existing)] = symbol;
  19323. return symbol;
  19324. }
  19325. symbols.push(symbol);
  19326. return symbol;
  19327. };
  19328. /**
  19329. * Remove from list & destroy symbol
  19330. * @param {string} id
  19331. */
  19332. Sprite.prototype.remove = function remove (id) {
  19333. var ref = this;
  19334. var symbols = ref.symbols;
  19335. var symbol = this.find(id);
  19336. if (symbol) {
  19337. symbols.splice(symbols.indexOf(symbol), 1);
  19338. symbol.destroy();
  19339. }
  19340. };
  19341. /**
  19342. * @param {string} id
  19343. * @return {SpriteSymbol|null}
  19344. */
  19345. Sprite.prototype.find = function find (id) {
  19346. return this.symbols.filter(function (s) { return s.id === id; })[0] || null;
  19347. };
  19348. /**
  19349. * @param {string} id
  19350. * @return {boolean}
  19351. */
  19352. Sprite.prototype.has = function has (id) {
  19353. return this.find(id) !== null;
  19354. };
  19355. /**
  19356. * @return {string}
  19357. */
  19358. Sprite.prototype.stringify = function stringify () {
  19359. var ref = this.config;
  19360. var attrs = ref.attrs;
  19361. var stringifiedSymbols = this.symbols.map(function (s) { return s.stringify(); }).join('');
  19362. return wrapInSvgString(stringifiedSymbols, attrs);
  19363. };
  19364. /**
  19365. * @return {string}
  19366. */
  19367. Sprite.prototype.toString = function toString () {
  19368. return this.stringify();
  19369. };
  19370. var defaultConfig$1 = {
  19371. /**
  19372. * Should following options be automatically configured:
  19373. * - `syncUrlsWithBaseTag`
  19374. * - `locationChangeAngularEmitter`
  19375. * - `moveGradientsOutsideSymbol`
  19376. * @type {boolean}
  19377. */
  19378. autoConfigure: true,
  19379. /**
  19380. * Default mounting selector
  19381. * @type {string}
  19382. */
  19383. mountTo: 'body',
  19384. /**
  19385. * Fix disappearing SVG elements when <base href> exists.
  19386. * Executes when sprite mounted.
  19387. * @see http://stackoverflow.com/a/18265336/796152
  19388. * @see https://github.com/everdimension/angular-svg-base-fix
  19389. * @see https://github.com/angular/angular.js/issues/8934#issuecomment-56568466
  19390. * @type {boolean}
  19391. */
  19392. syncUrlsWithBaseTag: false,
  19393. /**
  19394. * Should sprite listen custom location change event
  19395. * @type {boolean}
  19396. */
  19397. listenLocationChangeEvent: true,
  19398. /**
  19399. * Custom window event name which should be emitted to update sprite urls
  19400. * @type {string}
  19401. */
  19402. locationChangeEvent: 'locationChange',
  19403. /**
  19404. * Emit location change event in Angular automatically
  19405. * @type {boolean}
  19406. */
  19407. locationChangeAngularEmitter: false,
  19408. /**
  19409. * Selector to find symbols usages when updating sprite urls
  19410. * @type {string}
  19411. */
  19412. usagesToUpdate: 'use[*|href]',
  19413. /**
  19414. * Fix Firefox bug when gradients and patterns don't work if they are within a symbol.
  19415. * Executes when sprite is rendered, but not mounted.
  19416. * @see https://bugzilla.mozilla.org/show_bug.cgi?id=306674
  19417. * @see https://bugzilla.mozilla.org/show_bug.cgi?id=353575
  19418. * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1235364
  19419. * @type {boolean}
  19420. */
  19421. moveGradientsOutsideSymbol: false
  19422. };
  19423. var arrayFrom = function (arrayLike) {
  19424. return Array.prototype.slice.call(arrayLike, 0);
  19425. };
  19426. var ua = navigator.userAgent;
  19427. var browser = {
  19428. isChrome: /chrome/i.test(ua),
  19429. isFirefox: /firefox/i.test(ua),
  19430. isIE: /msie/i.test(ua),
  19431. isEdge: /edge/i.test(ua)
  19432. };
  19433. /**
  19434. * @param {string} name
  19435. * @param {*} data
  19436. */
  19437. var dispatchEvent = function (name, data) {
  19438. var event = document.createEvent('CustomEvent');
  19439. event.initCustomEvent(name, false, false, data);
  19440. window.dispatchEvent(event);
  19441. };
  19442. /**
  19443. * @param {string} [url] If not provided - current URL will be used
  19444. * @return {string}
  19445. */
  19446. var getUrlWithoutFragment = function (url) {
  19447. return (url || window.location.href).split('#')[0];
  19448. };
  19449. /* global angular */
  19450. /**
  19451. * @param {string} eventName
  19452. */
  19453. var locationChangeAngularEmitter = function (eventName) {
  19454. angular.module('ng').run(['$rootScope', function ($rootScope) {
  19455. $rootScope.$on('$locationChangeSuccess', function (e, newUrl) {
  19456. dispatchEvent(eventName, {
  19457. oldURL: window.localtion.href,
  19458. newUrl: newUrl
  19459. });
  19460. });
  19461. }]);
  19462. };
  19463. var defaultSelector = 'linearGradient, radialGradient, pattern';
  19464. /**
  19465. * @param {Element} svg
  19466. * @param {string} [selector]
  19467. * @return {Element}
  19468. */
  19469. var moveGradientsOutsideSymbol = function (svg, selector) {
  19470. if ( selector === void 0 ) selector = defaultSelector;
  19471. arrayFrom(svg.querySelectorAll('symbol')).forEach(function (symbol) {
  19472. arrayFrom(symbol.querySelectorAll(selector)).forEach(function (node) {
  19473. symbol.parentNode.insertBefore(node, symbol);
  19474. });
  19475. });
  19476. return svg;
  19477. };
  19478. var hasImportNode = !!document.importNode;
  19479. /**
  19480. * @param {string} content
  19481. * @return {Element}
  19482. */
  19483. var parse = function (content) {
  19484. var doc = new DOMParser().parseFromString(content, 'image/svg+xml').documentElement;
  19485. /**
  19486. * Fix for browser which are throwing WrongDocumentError
  19487. * if you insert an element which is not part of the document
  19488. * @see http://stackoverflow.com/a/7986519/4624403
  19489. */
  19490. if (hasImportNode) {
  19491. return document.importNode(doc, true);
  19492. }
  19493. return doc;
  19494. };
  19495. /**
  19496. * @param {NodeList} nodes
  19497. * @param {Function} [matcher]
  19498. * @return {Attr[]}
  19499. */
  19500. function selectAttributes(nodes, matcher) {
  19501. var attrs = arrayFrom(nodes).reduce(function (acc, node) {
  19502. if (!node.attributes) {
  19503. return acc;
  19504. }
  19505. var arrayfied = arrayFrom(node.attributes);
  19506. var matched = matcher ? arrayfied.filter(matcher) : arrayfied;
  19507. return acc.concat(matched);
  19508. }, []);
  19509. return attrs;
  19510. }
  19511. /**
  19512. * @param {NodeList|Node} nodes
  19513. * @param {boolean} [clone=true]
  19514. * @return {string}
  19515. */
  19516. var xLinkNS = namespaces_1.xlink.uri;
  19517. var xLinkAttrName = 'xlink:href';
  19518. var specialUrlCharsPattern = /[(){}|\\\^~\[\]`"<>]/g;
  19519. function encoder(url) {
  19520. return url.replace(specialUrlCharsPattern, function (match) {
  19521. return ("%" + (match[0].charCodeAt(0).toString(16).toUpperCase()));
  19522. });
  19523. }
  19524. /**
  19525. * @param {NodeList} nodes
  19526. * @param {string} startsWith
  19527. * @param {string} replaceWith
  19528. * @return {NodeList}
  19529. */
  19530. function updateReferences(nodes, startsWith, replaceWith) {
  19531. arrayFrom(nodes).forEach(function (node) {
  19532. var href = node.getAttribute(xLinkAttrName);
  19533. if (href && href.indexOf(startsWith) === 0) {
  19534. var newUrl = href.replace(startsWith, replaceWith);
  19535. node.setAttributeNS(xLinkNS, xLinkAttrName, newUrl);
  19536. }
  19537. });
  19538. return nodes;
  19539. }
  19540. /**
  19541. * List of SVG attributes to update url() target in them
  19542. */
  19543. var attList = [
  19544. 'clipPath',
  19545. 'colorProfile',
  19546. 'src',
  19547. 'cursor',
  19548. 'fill',
  19549. 'filter',
  19550. 'marker',
  19551. 'markerStart',
  19552. 'markerMid',
  19553. 'markerEnd',
  19554. 'mask',
  19555. 'stroke',
  19556. 'style'
  19557. ];
  19558. var attSelector = attList.map(function (attr) { return ("[" + attr + "]"); }).join(',');
  19559. /**
  19560. * Update URLs in svg image (like `fill="url(...)"`) and update referencing elements
  19561. * @param {Element} svg
  19562. * @param {NodeList} references
  19563. * @param {string|RegExp} startsWith
  19564. * @param {string} replaceWith
  19565. * @return {void}
  19566. *
  19567. * @example
  19568. * const sprite = document.querySelector('svg.sprite');
  19569. * const usages = document.querySelectorAll('use');
  19570. * updateUrls(sprite, usages, '#', 'prefix#');
  19571. */
  19572. var updateUrls = function (svg, references, startsWith, replaceWith) {
  19573. var startsWithEncoded = encoder(startsWith);
  19574. var replaceWithEncoded = encoder(replaceWith);
  19575. var nodes = svg.querySelectorAll(attSelector);
  19576. var attrs = selectAttributes(nodes, function (ref) {
  19577. var localName = ref.localName;
  19578. var value = ref.value;
  19579. return attList.indexOf(localName) !== -1 && value.indexOf(("url(" + startsWithEncoded)) !== -1;
  19580. });
  19581. attrs.forEach(function (attr) { return attr.value = attr.value.replace(startsWithEncoded, replaceWithEncoded); });
  19582. updateReferences(references, startsWithEncoded, replaceWithEncoded);
  19583. };
  19584. /**
  19585. * Internal emitter events
  19586. * @enum
  19587. * @private
  19588. */
  19589. var Events = {
  19590. RENDER: 'render',
  19591. MOUNT: 'mount'
  19592. };
  19593. var BrowserSprite = (function (Sprite$$1) {
  19594. function BrowserSprite(cfg) {
  19595. var this$1 = this;
  19596. if ( cfg === void 0 ) cfg = {};
  19597. Sprite$$1.call(this, index(defaultConfig$1, cfg));
  19598. var emitter = mitt();
  19599. this._emitter = emitter;
  19600. this.node = false;
  19601. this.isMounted = false;
  19602. var ref = this;
  19603. var config = ref.config;
  19604. if (config.autoConfigure) {
  19605. this._autoConfigure(cfg);
  19606. }
  19607. if (config.syncUrlsWithBaseTag) {
  19608. var baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');
  19609. emitter.on(Events.MOUNT, function () { return this$1.updateUrls('#', baseUrl); });
  19610. }
  19611. var handleLocationChange = this._handleLocationChange.bind(this);
  19612. this._handleLocationChange = handleLocationChange;
  19613. // Provide way to update sprite urls externally via dispatching custom window event
  19614. if (config.listenLocationChangeEvent) {
  19615. window.addEventListener(config.locationChangeEvent, handleLocationChange);
  19616. }
  19617. // Emit location change event in Angular automatically
  19618. if (config.locationChangeAngularEmitter) {
  19619. locationChangeAngularEmitter(config.locationChangeEvent);
  19620. }
  19621. if (config.moveGradientsOutsideSymbol) {
  19622. emitter.on(Events.RENDER, function (node) {
  19623. moveGradientsOutsideSymbol(node);
  19624. });
  19625. }
  19626. }
  19627. if ( Sprite$$1 ) BrowserSprite.__proto__ = Sprite$$1;
  19628. BrowserSprite.prototype = Object.create( Sprite$$1 && Sprite$$1.prototype );
  19629. BrowserSprite.prototype.constructor = BrowserSprite;
  19630. /**
  19631. * Automatically configure following options
  19632. * - `syncUrlsWithBaseTag`
  19633. * - `locationChangeAngularEmitter`
  19634. * - `moveGradientsOutsideSymbol`
  19635. * @param {Object} cfg
  19636. * @private
  19637. */
  19638. BrowserSprite.prototype._autoConfigure = function _autoConfigure (cfg) {
  19639. var ref = this;
  19640. var config = ref.config;
  19641. if (typeof cfg.syncUrlsWithBaseTag === 'undefined') {
  19642. config.syncUrlsWithBaseTag = typeof document.getElementsByTagName('base')[0] !== 'undefined';
  19643. }
  19644. if (typeof cfg.locationChangeAngularEmitter === 'undefined') {
  19645. config.locationChangeAngularEmitter = 'angular' in window;
  19646. }
  19647. if (typeof cfg.moveGradientsOutsideSymbol === 'undefined') {
  19648. config.moveGradientsOutsideSymbol = browser.isFirefox;
  19649. }
  19650. };
  19651. /**
  19652. * @param {Event} event
  19653. * @param {Object} event.detail
  19654. * @param {string} event.oldUrl
  19655. * @param {string} event.newUrl
  19656. * @private
  19657. */
  19658. BrowserSprite.prototype._handleLocationChange = function _handleLocationChange (event) {
  19659. var ref = event.detail;
  19660. var oldUrl = ref.oldUrl;
  19661. var newUrl = ref.newUrl;
  19662. this.updateUrls(oldUrl, newUrl);
  19663. };
  19664. /**
  19665. * Update URLs in sprite and usage elements
  19666. * @param {string} oldUrl
  19667. * @param {string} newUrl
  19668. */
  19669. BrowserSprite.prototype.updateUrls = function updateUrls$1 (oldUrl, newUrl) {
  19670. if (!this.isMounted) {
  19671. throw new Error('Sprite should be mounted to apply updateUrls');
  19672. }
  19673. var usages = document.querySelectorAll(this.config.usagesToUpdate);
  19674. updateUrls(
  19675. this.node,
  19676. usages,
  19677. ((getUrlWithoutFragment(oldUrl)) + "#"),
  19678. ((getUrlWithoutFragment(newUrl)) + "#")
  19679. );
  19680. };
  19681. /**
  19682. * @return {Element}
  19683. * @fires Events#RENDER
  19684. */
  19685. BrowserSprite.prototype.render = function render () {
  19686. var node = parse(this.stringify());
  19687. this._emitter.emit(Events.RENDER, node);
  19688. return node;
  19689. };
  19690. /**
  19691. * @param {Element|string} [target]
  19692. * @param {boolean} [prepend=false]
  19693. * @return {Element} rendered sprite element
  19694. * @fires Events#MOUNT
  19695. */
  19696. BrowserSprite.prototype.mount = function mount (target, prepend) {
  19697. if ( prepend === void 0 ) prepend = false;
  19698. if (this.isMounted) {
  19699. return this.node;
  19700. }
  19701. var mountTarget = target || this.config.mountTo;
  19702. var parent = typeof mountTarget === 'string' ? document.querySelector(mountTarget) : mountTarget;
  19703. var node = this.render();
  19704. if (prepend && parent.childNodes[0]) {
  19705. parent.insertBefore(node, parent.childNodes[0]);
  19706. } else {
  19707. parent.appendChild(node);
  19708. }
  19709. this.node = node;
  19710. this.isMounted = true;
  19711. this._emitter.emit(Events.MOUNT, node);
  19712. return node;
  19713. };
  19714. /**
  19715. * Detach sprite from the DOM
  19716. */
  19717. BrowserSprite.prototype.unmount = function unmount () {
  19718. this.node.parentNode.removeChild(this.node);
  19719. };
  19720. BrowserSprite.prototype.destroy = function destroy () {
  19721. var ref = this;
  19722. var config = ref.config;
  19723. var symbols = ref.symbols;
  19724. var _emitter = ref._emitter;
  19725. symbols.forEach(function (s) { return s.destroy(); });
  19726. _emitter.off('*');
  19727. window.removeEventListener(config.locationChangeEvent, this._handleLocationChange);
  19728. if (this.isMounted) {
  19729. this.unmount();
  19730. }
  19731. };
  19732. return BrowserSprite;
  19733. }(Sprite));
  19734. var ready$1 = createCommonjsModule(function (module) {
  19735. /*!
  19736. * domready (c) Dustin Diaz 2014 - License MIT
  19737. */
  19738. !function (name, definition) {
  19739. { module.exports = definition(); }
  19740. }('domready', function () {
  19741. var fns = [], listener
  19742. , doc = document
  19743. , hack = doc.documentElement.doScroll
  19744. , domContentLoaded = 'DOMContentLoaded'
  19745. , loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);
  19746. if (!loaded)
  19747. { doc.addEventListener(domContentLoaded, listener = function () {
  19748. doc.removeEventListener(domContentLoaded, listener);
  19749. loaded = 1;
  19750. while (listener = fns.shift()) { listener(); }
  19751. }); }
  19752. return function (fn) {
  19753. loaded ? setTimeout(fn, 0) : fns.push(fn);
  19754. }
  19755. });
  19756. });
  19757. var sprite = new BrowserSprite();
  19758. ready$1(function () { return sprite.mount(document.body, true); });
  19759. return sprite;
  19760. })));
  19761. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(83)))
  19762. /***/ })
  19763. /******/ ]);