bundle.js 2.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // install a JSONP callback for chunk loading
  3. /******/ var parentJsonpFunction = window["webpackJsonp"];
  4. /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
  5. /******/ // add "moreModules" to the modules object,
  6. /******/ // then flag all "chunkIds" as loaded and fire callback
  7. /******/ var moduleId, chunkId, i = 0, resolves = [], result;
  8. /******/ for(;i < chunkIds.length; i++) {
  9. /******/ chunkId = chunkIds[i];
  10. /******/ if(installedChunks[chunkId]) {
  11. /******/ resolves.push(installedChunks[chunkId][0]);
  12. /******/ }
  13. /******/ installedChunks[chunkId] = 0;
  14. /******/ }
  15. /******/ for(moduleId in moreModules) {
  16. /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
  17. /******/ modules[moduleId] = moreModules[moduleId];
  18. /******/ }
  19. /******/ }
  20. /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
  21. /******/ while(resolves.length) {
  22. /******/ resolves.shift()();
  23. /******/ }
  24. /******/
  25. /******/ };
  26. /******/ function hotDisposeChunk(chunkId) {
  27. /******/ delete installedChunks[chunkId];
  28. /******/ }
  29. /******/ var parentHotUpdateCallback = this["webpackHotUpdate"];
  30. /******/ this["webpackHotUpdate"] =
  31. /******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
  32. /******/ hotAddUpdateChunk(chunkId, moreModules);
  33. /******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
  34. /******/ } ;
  35. /******/
  36. /******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
  37. /******/ var head = document.getElementsByTagName("head")[0];
  38. /******/ var script = document.createElement("script");
  39. /******/ script.type = "text/javascript";
  40. /******/ script.charset = "utf-8";
  41. /******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
  42. /******/ ;
  43. /******/ head.appendChild(script);
  44. /******/ }
  45. /******/
  46. /******/ function hotDownloadManifest(requestTimeout) { // eslint-disable-line no-unused-vars
  47. /******/ requestTimeout = requestTimeout || 10000;
  48. /******/ return new Promise(function(resolve, reject) {
  49. /******/ if(typeof XMLHttpRequest === "undefined")
  50. /******/ return reject(new Error("No browser support"));
  51. /******/ try {
  52. /******/ var request = new XMLHttpRequest();
  53. /******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
  54. /******/ request.open("GET", requestPath, true);
  55. /******/ request.timeout = requestTimeout;
  56. /******/ request.send(null);
  57. /******/ } catch(err) {
  58. /******/ return reject(err);
  59. /******/ }
  60. /******/ request.onreadystatechange = function() {
  61. /******/ if(request.readyState !== 4) return;
  62. /******/ if(request.status === 0) {
  63. /******/ // timeout
  64. /******/ reject(new Error("Manifest request to " + requestPath + " timed out."));
  65. /******/ } else if(request.status === 404) {
  66. /******/ // no update available
  67. /******/ resolve();
  68. /******/ } else if(request.status !== 200 && request.status !== 304) {
  69. /******/ // other failure
  70. /******/ reject(new Error("Manifest request to " + requestPath + " failed."));
  71. /******/ } else {
  72. /******/ // success
  73. /******/ try {
  74. /******/ var update = JSON.parse(request.responseText);
  75. /******/ } catch(e) {
  76. /******/ reject(e);
  77. /******/ return;
  78. /******/ }
  79. /******/ resolve(update);
  80. /******/ }
  81. /******/ };
  82. /******/ });
  83. /******/ }
  84. /******/
  85. /******/
  86. /******/
  87. /******/ var hotApplyOnUpdate = true;
  88. /******/ var hotCurrentHash = "6b0de470e57b6d1a81a7"; // eslint-disable-line no-unused-vars
  89. /******/ var hotRequestTimeout = 10000;
  90. /******/ var hotCurrentModuleData = {};
  91. /******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
  92. /******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
  93. /******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
  94. /******/
  95. /******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
  96. /******/ var me = installedModules[moduleId];
  97. /******/ if(!me) return __webpack_require__;
  98. /******/ var fn = function(request) {
  99. /******/ if(me.hot.active) {
  100. /******/ if(installedModules[request]) {
  101. /******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
  102. /******/ installedModules[request].parents.push(moduleId);
  103. /******/ } else {
  104. /******/ hotCurrentParents = [moduleId];
  105. /******/ hotCurrentChildModule = request;
  106. /******/ }
  107. /******/ if(me.children.indexOf(request) < 0)
  108. /******/ me.children.push(request);
  109. /******/ } else {
  110. /******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
  111. /******/ hotCurrentParents = [];
  112. /******/ }
  113. /******/ return __webpack_require__(request);
  114. /******/ };
  115. /******/ var ObjectFactory = function ObjectFactory(name) {
  116. /******/ return {
  117. /******/ configurable: true,
  118. /******/ enumerable: true,
  119. /******/ get: function() {
  120. /******/ return __webpack_require__[name];
  121. /******/ },
  122. /******/ set: function(value) {
  123. /******/ __webpack_require__[name] = value;
  124. /******/ }
  125. /******/ };
  126. /******/ };
  127. /******/ for(var name in __webpack_require__) {
  128. /******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") {
  129. /******/ Object.defineProperty(fn, name, ObjectFactory(name));
  130. /******/ }
  131. /******/ }
  132. /******/ fn.e = function(chunkId) {
  133. /******/ if(hotStatus === "ready")
  134. /******/ hotSetStatus("prepare");
  135. /******/ hotChunksLoading++;
  136. /******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
  137. /******/ finishChunkLoading();
  138. /******/ throw err;
  139. /******/ });
  140. /******/
  141. /******/ function finishChunkLoading() {
  142. /******/ hotChunksLoading--;
  143. /******/ if(hotStatus === "prepare") {
  144. /******/ if(!hotWaitingFilesMap[chunkId]) {
  145. /******/ hotEnsureUpdateChunk(chunkId);
  146. /******/ }
  147. /******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
  148. /******/ hotUpdateDownloaded();
  149. /******/ }
  150. /******/ }
  151. /******/ }
  152. /******/ };
  153. /******/ return fn;
  154. /******/ }
  155. /******/
  156. /******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars
  157. /******/ var hot = {
  158. /******/ // private stuff
  159. /******/ _acceptedDependencies: {},
  160. /******/ _declinedDependencies: {},
  161. /******/ _selfAccepted: false,
  162. /******/ _selfDeclined: false,
  163. /******/ _disposeHandlers: [],
  164. /******/ _main: hotCurrentChildModule !== moduleId,
  165. /******/
  166. /******/ // Module API
  167. /******/ active: true,
  168. /******/ accept: function(dep, callback) {
  169. /******/ if(typeof dep === "undefined")
  170. /******/ hot._selfAccepted = true;
  171. /******/ else if(typeof dep === "function")
  172. /******/ hot._selfAccepted = dep;
  173. /******/ else if(typeof dep === "object")
  174. /******/ for(var i = 0; i < dep.length; i++)
  175. /******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
  176. /******/ else
  177. /******/ hot._acceptedDependencies[dep] = callback || function() {};
  178. /******/ },
  179. /******/ decline: function(dep) {
  180. /******/ if(typeof dep === "undefined")
  181. /******/ hot._selfDeclined = true;
  182. /******/ else if(typeof dep === "object")
  183. /******/ for(var i = 0; i < dep.length; i++)
  184. /******/ hot._declinedDependencies[dep[i]] = true;
  185. /******/ else
  186. /******/ hot._declinedDependencies[dep] = true;
  187. /******/ },
  188. /******/ dispose: function(callback) {
  189. /******/ hot._disposeHandlers.push(callback);
  190. /******/ },
  191. /******/ addDisposeHandler: function(callback) {
  192. /******/ hot._disposeHandlers.push(callback);
  193. /******/ },
  194. /******/ removeDisposeHandler: function(callback) {
  195. /******/ var idx = hot._disposeHandlers.indexOf(callback);
  196. /******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
  197. /******/ },
  198. /******/
  199. /******/ // Management API
  200. /******/ check: hotCheck,
  201. /******/ apply: hotApply,
  202. /******/ status: function(l) {
  203. /******/ if(!l) return hotStatus;
  204. /******/ hotStatusHandlers.push(l);
  205. /******/ },
  206. /******/ addStatusHandler: function(l) {
  207. /******/ hotStatusHandlers.push(l);
  208. /******/ },
  209. /******/ removeStatusHandler: function(l) {
  210. /******/ var idx = hotStatusHandlers.indexOf(l);
  211. /******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
  212. /******/ },
  213. /******/
  214. /******/ //inherit from previous dispose call
  215. /******/ data: hotCurrentModuleData[moduleId]
  216. /******/ };
  217. /******/ hotCurrentChildModule = undefined;
  218. /******/ return hot;
  219. /******/ }
  220. /******/
  221. /******/ var hotStatusHandlers = [];
  222. /******/ var hotStatus = "idle";
  223. /******/
  224. /******/ function hotSetStatus(newStatus) {
  225. /******/ hotStatus = newStatus;
  226. /******/ for(var i = 0; i < hotStatusHandlers.length; i++)
  227. /******/ hotStatusHandlers[i].call(null, newStatus);
  228. /******/ }
  229. /******/
  230. /******/ // while downloading
  231. /******/ var hotWaitingFiles = 0;
  232. /******/ var hotChunksLoading = 0;
  233. /******/ var hotWaitingFilesMap = {};
  234. /******/ var hotRequestedFilesMap = {};
  235. /******/ var hotAvailableFilesMap = {};
  236. /******/ var hotDeferred;
  237. /******/
  238. /******/ // The update info
  239. /******/ var hotUpdate, hotUpdateNewHash;
  240. /******/
  241. /******/ function toModuleId(id) {
  242. /******/ var isNumber = (+id) + "" === id;
  243. /******/ return isNumber ? +id : id;
  244. /******/ }
  245. /******/
  246. /******/ function hotCheck(apply) {
  247. /******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
  248. /******/ hotApplyOnUpdate = apply;
  249. /******/ hotSetStatus("check");
  250. /******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) {
  251. /******/ if(!update) {
  252. /******/ hotSetStatus("idle");
  253. /******/ return null;
  254. /******/ }
  255. /******/ hotRequestedFilesMap = {};
  256. /******/ hotWaitingFilesMap = {};
  257. /******/ hotAvailableFilesMap = update.c;
  258. /******/ hotUpdateNewHash = update.h;
  259. /******/
  260. /******/ hotSetStatus("prepare");
  261. /******/ var promise = new Promise(function(resolve, reject) {
  262. /******/ hotDeferred = {
  263. /******/ resolve: resolve,
  264. /******/ reject: reject
  265. /******/ };
  266. /******/ });
  267. /******/ hotUpdate = {};
  268. /******/ for(var chunkId in installedChunks)
  269. /******/ { // eslint-disable-line no-lone-blocks
  270. /******/ /*globals chunkId */
  271. /******/ hotEnsureUpdateChunk(chunkId);
  272. /******/ }
  273. /******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
  274. /******/ hotUpdateDownloaded();
  275. /******/ }
  276. /******/ return promise;
  277. /******/ });
  278. /******/ }
  279. /******/
  280. /******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
  281. /******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
  282. /******/ return;
  283. /******/ hotRequestedFilesMap[chunkId] = false;
  284. /******/ for(var moduleId in moreModules) {
  285. /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
  286. /******/ hotUpdate[moduleId] = moreModules[moduleId];
  287. /******/ }
  288. /******/ }
  289. /******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
  290. /******/ hotUpdateDownloaded();
  291. /******/ }
  292. /******/ }
  293. /******/
  294. /******/ function hotEnsureUpdateChunk(chunkId) {
  295. /******/ if(!hotAvailableFilesMap[chunkId]) {
  296. /******/ hotWaitingFilesMap[chunkId] = true;
  297. /******/ } else {
  298. /******/ hotRequestedFilesMap[chunkId] = true;
  299. /******/ hotWaitingFiles++;
  300. /******/ hotDownloadUpdateChunk(chunkId);
  301. /******/ }
  302. /******/ }
  303. /******/
  304. /******/ function hotUpdateDownloaded() {
  305. /******/ hotSetStatus("ready");
  306. /******/ var deferred = hotDeferred;
  307. /******/ hotDeferred = null;
  308. /******/ if(!deferred) return;
  309. /******/ if(hotApplyOnUpdate) {
  310. /******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to
  311. /******/ // avoid triggering uncaught exception warning in Chrome.
  312. /******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
  313. /******/ Promise.resolve().then(function() {
  314. /******/ return hotApply(hotApplyOnUpdate);
  315. /******/ }).then(
  316. /******/ function(result) {
  317. /******/ deferred.resolve(result);
  318. /******/ },
  319. /******/ function(err) {
  320. /******/ deferred.reject(err);
  321. /******/ }
  322. /******/ );
  323. /******/ } else {
  324. /******/ var outdatedModules = [];
  325. /******/ for(var id in hotUpdate) {
  326. /******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
  327. /******/ outdatedModules.push(toModuleId(id));
  328. /******/ }
  329. /******/ }
  330. /******/ deferred.resolve(outdatedModules);
  331. /******/ }
  332. /******/ }
  333. /******/
  334. /******/ function hotApply(options) {
  335. /******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
  336. /******/ options = options || {};
  337. /******/
  338. /******/ var cb;
  339. /******/ var i;
  340. /******/ var j;
  341. /******/ var module;
  342. /******/ var moduleId;
  343. /******/
  344. /******/ function getAffectedStuff(updateModuleId) {
  345. /******/ var outdatedModules = [updateModuleId];
  346. /******/ var outdatedDependencies = {};
  347. /******/
  348. /******/ var queue = outdatedModules.slice().map(function(id) {
  349. /******/ return {
  350. /******/ chain: [id],
  351. /******/ id: id
  352. /******/ };
  353. /******/ });
  354. /******/ while(queue.length > 0) {
  355. /******/ var queueItem = queue.pop();
  356. /******/ var moduleId = queueItem.id;
  357. /******/ var chain = queueItem.chain;
  358. /******/ module = installedModules[moduleId];
  359. /******/ if(!module || module.hot._selfAccepted)
  360. /******/ continue;
  361. /******/ if(module.hot._selfDeclined) {
  362. /******/ return {
  363. /******/ type: "self-declined",
  364. /******/ chain: chain,
  365. /******/ moduleId: moduleId
  366. /******/ };
  367. /******/ }
  368. /******/ if(module.hot._main) {
  369. /******/ return {
  370. /******/ type: "unaccepted",
  371. /******/ chain: chain,
  372. /******/ moduleId: moduleId
  373. /******/ };
  374. /******/ }
  375. /******/ for(var i = 0; i < module.parents.length; i++) {
  376. /******/ var parentId = module.parents[i];
  377. /******/ var parent = installedModules[parentId];
  378. /******/ if(!parent) continue;
  379. /******/ if(parent.hot._declinedDependencies[moduleId]) {
  380. /******/ return {
  381. /******/ type: "declined",
  382. /******/ chain: chain.concat([parentId]),
  383. /******/ moduleId: moduleId,
  384. /******/ parentId: parentId
  385. /******/ };
  386. /******/ }
  387. /******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
  388. /******/ if(parent.hot._acceptedDependencies[moduleId]) {
  389. /******/ if(!outdatedDependencies[parentId])
  390. /******/ outdatedDependencies[parentId] = [];
  391. /******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
  392. /******/ continue;
  393. /******/ }
  394. /******/ delete outdatedDependencies[parentId];
  395. /******/ outdatedModules.push(parentId);
  396. /******/ queue.push({
  397. /******/ chain: chain.concat([parentId]),
  398. /******/ id: parentId
  399. /******/ });
  400. /******/ }
  401. /******/ }
  402. /******/
  403. /******/ return {
  404. /******/ type: "accepted",
  405. /******/ moduleId: updateModuleId,
  406. /******/ outdatedModules: outdatedModules,
  407. /******/ outdatedDependencies: outdatedDependencies
  408. /******/ };
  409. /******/ }
  410. /******/
  411. /******/ function addAllToSet(a, b) {
  412. /******/ for(var i = 0; i < b.length; i++) {
  413. /******/ var item = b[i];
  414. /******/ if(a.indexOf(item) < 0)
  415. /******/ a.push(item);
  416. /******/ }
  417. /******/ }
  418. /******/
  419. /******/ // at begin all updates modules are outdated
  420. /******/ // the "outdated" status can propagate to parents if they don't accept the children
  421. /******/ var outdatedDependencies = {};
  422. /******/ var outdatedModules = [];
  423. /******/ var appliedUpdate = {};
  424. /******/
  425. /******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
  426. /******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
  427. /******/ };
  428. /******/
  429. /******/ for(var id in hotUpdate) {
  430. /******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
  431. /******/ moduleId = toModuleId(id);
  432. /******/ var result;
  433. /******/ if(hotUpdate[id]) {
  434. /******/ result = getAffectedStuff(moduleId);
  435. /******/ } else {
  436. /******/ result = {
  437. /******/ type: "disposed",
  438. /******/ moduleId: id
  439. /******/ };
  440. /******/ }
  441. /******/ var abortError = false;
  442. /******/ var doApply = false;
  443. /******/ var doDispose = false;
  444. /******/ var chainInfo = "";
  445. /******/ if(result.chain) {
  446. /******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
  447. /******/ }
  448. /******/ switch(result.type) {
  449. /******/ case "self-declined":
  450. /******/ if(options.onDeclined)
  451. /******/ options.onDeclined(result);
  452. /******/ if(!options.ignoreDeclined)
  453. /******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
  454. /******/ break;
  455. /******/ case "declined":
  456. /******/ if(options.onDeclined)
  457. /******/ options.onDeclined(result);
  458. /******/ if(!options.ignoreDeclined)
  459. /******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
  460. /******/ break;
  461. /******/ case "unaccepted":
  462. /******/ if(options.onUnaccepted)
  463. /******/ options.onUnaccepted(result);
  464. /******/ if(!options.ignoreUnaccepted)
  465. /******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
  466. /******/ break;
  467. /******/ case "accepted":
  468. /******/ if(options.onAccepted)
  469. /******/ options.onAccepted(result);
  470. /******/ doApply = true;
  471. /******/ break;
  472. /******/ case "disposed":
  473. /******/ if(options.onDisposed)
  474. /******/ options.onDisposed(result);
  475. /******/ doDispose = true;
  476. /******/ break;
  477. /******/ default:
  478. /******/ throw new Error("Unexception type " + result.type);
  479. /******/ }
  480. /******/ if(abortError) {
  481. /******/ hotSetStatus("abort");
  482. /******/ return Promise.reject(abortError);
  483. /******/ }
  484. /******/ if(doApply) {
  485. /******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
  486. /******/ addAllToSet(outdatedModules, result.outdatedModules);
  487. /******/ for(moduleId in result.outdatedDependencies) {
  488. /******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
  489. /******/ if(!outdatedDependencies[moduleId])
  490. /******/ outdatedDependencies[moduleId] = [];
  491. /******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
  492. /******/ }
  493. /******/ }
  494. /******/ }
  495. /******/ if(doDispose) {
  496. /******/ addAllToSet(outdatedModules, [result.moduleId]);
  497. /******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
  498. /******/ }
  499. /******/ }
  500. /******/ }
  501. /******/
  502. /******/ // Store self accepted outdated modules to require them later by the module system
  503. /******/ var outdatedSelfAcceptedModules = [];
  504. /******/ for(i = 0; i < outdatedModules.length; i++) {
  505. /******/ moduleId = outdatedModules[i];
  506. /******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
  507. /******/ outdatedSelfAcceptedModules.push({
  508. /******/ module: moduleId,
  509. /******/ errorHandler: installedModules[moduleId].hot._selfAccepted
  510. /******/ });
  511. /******/ }
  512. /******/
  513. /******/ // Now in "dispose" phase
  514. /******/ hotSetStatus("dispose");
  515. /******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
  516. /******/ if(hotAvailableFilesMap[chunkId] === false) {
  517. /******/ hotDisposeChunk(chunkId);
  518. /******/ }
  519. /******/ });
  520. /******/
  521. /******/ var idx;
  522. /******/ var queue = outdatedModules.slice();
  523. /******/ while(queue.length > 0) {
  524. /******/ moduleId = queue.pop();
  525. /******/ module = installedModules[moduleId];
  526. /******/ if(!module) continue;
  527. /******/
  528. /******/ var data = {};
  529. /******/
  530. /******/ // Call dispose handlers
  531. /******/ var disposeHandlers = module.hot._disposeHandlers;
  532. /******/ for(j = 0; j < disposeHandlers.length; j++) {
  533. /******/ cb = disposeHandlers[j];
  534. /******/ cb(data);
  535. /******/ }
  536. /******/ hotCurrentModuleData[moduleId] = data;
  537. /******/
  538. /******/ // disable module (this disables requires from this module)
  539. /******/ module.hot.active = false;
  540. /******/
  541. /******/ // remove module from cache
  542. /******/ delete installedModules[moduleId];
  543. /******/
  544. /******/ // when disposing there is no need to call dispose handler
  545. /******/ delete outdatedDependencies[moduleId];
  546. /******/
  547. /******/ // remove "parents" references from all children
  548. /******/ for(j = 0; j < module.children.length; j++) {
  549. /******/ var child = installedModules[module.children[j]];
  550. /******/ if(!child) continue;
  551. /******/ idx = child.parents.indexOf(moduleId);
  552. /******/ if(idx >= 0) {
  553. /******/ child.parents.splice(idx, 1);
  554. /******/ }
  555. /******/ }
  556. /******/ }
  557. /******/
  558. /******/ // remove outdated dependency from module children
  559. /******/ var dependency;
  560. /******/ var moduleOutdatedDependencies;
  561. /******/ for(moduleId in outdatedDependencies) {
  562. /******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
  563. /******/ module = installedModules[moduleId];
  564. /******/ if(module) {
  565. /******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
  566. /******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
  567. /******/ dependency = moduleOutdatedDependencies[j];
  568. /******/ idx = module.children.indexOf(dependency);
  569. /******/ if(idx >= 0) module.children.splice(idx, 1);
  570. /******/ }
  571. /******/ }
  572. /******/ }
  573. /******/ }
  574. /******/
  575. /******/ // Not in "apply" phase
  576. /******/ hotSetStatus("apply");
  577. /******/
  578. /******/ hotCurrentHash = hotUpdateNewHash;
  579. /******/
  580. /******/ // insert new code
  581. /******/ for(moduleId in appliedUpdate) {
  582. /******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
  583. /******/ modules[moduleId] = appliedUpdate[moduleId];
  584. /******/ }
  585. /******/ }
  586. /******/
  587. /******/ // call accept handlers
  588. /******/ var error = null;
  589. /******/ for(moduleId in outdatedDependencies) {
  590. /******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
  591. /******/ module = installedModules[moduleId];
  592. /******/ if(module) {
  593. /******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
  594. /******/ var callbacks = [];
  595. /******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
  596. /******/ dependency = moduleOutdatedDependencies[i];
  597. /******/ cb = module.hot._acceptedDependencies[dependency];
  598. /******/ if(cb) {
  599. /******/ if(callbacks.indexOf(cb) >= 0) continue;
  600. /******/ callbacks.push(cb);
  601. /******/ }
  602. /******/ }
  603. /******/ for(i = 0; i < callbacks.length; i++) {
  604. /******/ cb = callbacks[i];
  605. /******/ try {
  606. /******/ cb(moduleOutdatedDependencies);
  607. /******/ } catch(err) {
  608. /******/ if(options.onErrored) {
  609. /******/ options.onErrored({
  610. /******/ type: "accept-errored",
  611. /******/ moduleId: moduleId,
  612. /******/ dependencyId: moduleOutdatedDependencies[i],
  613. /******/ error: err
  614. /******/ });
  615. /******/ }
  616. /******/ if(!options.ignoreErrored) {
  617. /******/ if(!error)
  618. /******/ error = err;
  619. /******/ }
  620. /******/ }
  621. /******/ }
  622. /******/ }
  623. /******/ }
  624. /******/ }
  625. /******/
  626. /******/ // Load self accepted modules
  627. /******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
  628. /******/ var item = outdatedSelfAcceptedModules[i];
  629. /******/ moduleId = item.module;
  630. /******/ hotCurrentParents = [moduleId];
  631. /******/ try {
  632. /******/ __webpack_require__(moduleId);
  633. /******/ } catch(err) {
  634. /******/ if(typeof item.errorHandler === "function") {
  635. /******/ try {
  636. /******/ item.errorHandler(err);
  637. /******/ } catch(err2) {
  638. /******/ if(options.onErrored) {
  639. /******/ options.onErrored({
  640. /******/ type: "self-accept-error-handler-errored",
  641. /******/ moduleId: moduleId,
  642. /******/ error: err2,
  643. /******/ orginalError: err, // TODO remove in webpack 4
  644. /******/ originalError: err
  645. /******/ });
  646. /******/ }
  647. /******/ if(!options.ignoreErrored) {
  648. /******/ if(!error)
  649. /******/ error = err2;
  650. /******/ }
  651. /******/ if(!error)
  652. /******/ error = err;
  653. /******/ }
  654. /******/ } else {
  655. /******/ if(options.onErrored) {
  656. /******/ options.onErrored({
  657. /******/ type: "self-accept-errored",
  658. /******/ moduleId: moduleId,
  659. /******/ error: err
  660. /******/ });
  661. /******/ }
  662. /******/ if(!options.ignoreErrored) {
  663. /******/ if(!error)
  664. /******/ error = err;
  665. /******/ }
  666. /******/ }
  667. /******/ }
  668. /******/ }
  669. /******/
  670. /******/ // handle errors in accept handlers and self accepted module load
  671. /******/ if(error) {
  672. /******/ hotSetStatus("fail");
  673. /******/ return Promise.reject(error);
  674. /******/ }
  675. /******/
  676. /******/ hotSetStatus("idle");
  677. /******/ return new Promise(function(resolve) {
  678. /******/ resolve(outdatedModules);
  679. /******/ });
  680. /******/ }
  681. /******/
  682. /******/ // The module cache
  683. /******/ var installedModules = {};
  684. /******/
  685. /******/ // objects to store loaded and loading chunks
  686. /******/ var installedChunks = {
  687. /******/ 3: 0
  688. /******/ };
  689. /******/
  690. /******/ // The require function
  691. /******/ function __webpack_require__(moduleId) {
  692. /******/
  693. /******/ // Check if module is in cache
  694. /******/ if(installedModules[moduleId]) {
  695. /******/ return installedModules[moduleId].exports;
  696. /******/ }
  697. /******/ // Create a new module (and put it into the cache)
  698. /******/ var module = installedModules[moduleId] = {
  699. /******/ i: moduleId,
  700. /******/ l: false,
  701. /******/ exports: {},
  702. /******/ hot: hotCreateModule(moduleId),
  703. /******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
  704. /******/ children: []
  705. /******/ };
  706. /******/
  707. /******/ // Execute the module function
  708. /******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
  709. /******/
  710. /******/ // Flag the module as loaded
  711. /******/ module.l = true;
  712. /******/
  713. /******/ // Return the exports of the module
  714. /******/ return module.exports;
  715. /******/ }
  716. /******/
  717. /******/ // This file contains only the entry chunk.
  718. /******/ // The chunk loading function for additional chunks
  719. /******/ __webpack_require__.e = function requireEnsure(chunkId) {
  720. /******/ var installedChunkData = installedChunks[chunkId];
  721. /******/ if(installedChunkData === 0) {
  722. /******/ return new Promise(function(resolve) { resolve(); });
  723. /******/ }
  724. /******/
  725. /******/ // a Promise means "currently loading".
  726. /******/ if(installedChunkData) {
  727. /******/ return installedChunkData[2];
  728. /******/ }
  729. /******/
  730. /******/ // setup Promise in chunk cache
  731. /******/ var promise = new Promise(function(resolve, reject) {
  732. /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
  733. /******/ });
  734. /******/ installedChunkData[2] = promise;
  735. /******/
  736. /******/ // start chunk loading
  737. /******/ var head = document.getElementsByTagName('head')[0];
  738. /******/ var script = document.createElement('script');
  739. /******/ script.type = 'text/javascript';
  740. /******/ script.charset = 'utf-8';
  741. /******/ script.async = true;
  742. /******/ script.timeout = 120000;
  743. /******/
  744. /******/ if (__webpack_require__.nc) {
  745. /******/ script.setAttribute("nonce", __webpack_require__.nc);
  746. /******/ }
  747. /******/ script.src = __webpack_require__.p + "static/js/" + ({}[chunkId]||chunkId) + ".chunk.js";
  748. /******/ var timeout = setTimeout(onScriptComplete, 120000);
  749. /******/ script.onerror = script.onload = onScriptComplete;
  750. /******/ function onScriptComplete() {
  751. /******/ // avoid mem leaks in IE.
  752. /******/ script.onerror = script.onload = null;
  753. /******/ clearTimeout(timeout);
  754. /******/ var chunk = installedChunks[chunkId];
  755. /******/ if(chunk !== 0) {
  756. /******/ if(chunk) {
  757. /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
  758. /******/ }
  759. /******/ installedChunks[chunkId] = undefined;
  760. /******/ }
  761. /******/ };
  762. /******/ head.appendChild(script);
  763. /******/
  764. /******/ return promise;
  765. /******/ };
  766. /******/
  767. /******/ // expose the modules object (__webpack_modules__)
  768. /******/ __webpack_require__.m = modules;
  769. /******/
  770. /******/ // expose the module cache
  771. /******/ __webpack_require__.c = installedModules;
  772. /******/
  773. /******/ // define getter function for harmony exports
  774. /******/ __webpack_require__.d = function(exports, name, getter) {
  775. /******/ if(!__webpack_require__.o(exports, name)) {
  776. /******/ Object.defineProperty(exports, name, {
  777. /******/ configurable: false,
  778. /******/ enumerable: true,
  779. /******/ get: getter
  780. /******/ });
  781. /******/ }
  782. /******/ };
  783. /******/
  784. /******/ // getDefaultExport function for compatibility with non-harmony modules
  785. /******/ __webpack_require__.n = function(module) {
  786. /******/ var getter = module && module.__esModule ?
  787. /******/ function getDefault() { return module['default']; } :
  788. /******/ function getModuleExports() { return module; };
  789. /******/ __webpack_require__.d(getter, 'a', getter);
  790. /******/ return getter;
  791. /******/ };
  792. /******/
  793. /******/ // Object.prototype.hasOwnProperty.call
  794. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  795. /******/
  796. /******/ // __webpack_public_path__
  797. /******/ __webpack_require__.p = "/";
  798. /******/
  799. /******/ // on error function for async loading
  800. /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
  801. /******/
  802. /******/ // __webpack_hash__
  803. /******/ __webpack_require__.h = function() { return hotCurrentHash; };
  804. /******/
  805. /******/ // Load entry module and return exports
  806. /******/ return hotCreateRequire(0)(__webpack_require__.s = 0);
  807. /******/ })
  808. /************************************************************************/
  809. /******/ ({
  810. /***/ "./config/polyfills.js":
  811. /*!*****************************!*\
  812. !*** ./config/polyfills.js ***!
  813. \*****************************/
  814. /*! dynamic exports provided */
  815. /*! all exports used */
  816. /***/ (function(module, exports, __webpack_require__) {
  817. "use strict";
  818. if (typeof Promise === 'undefined') {
  819. // Rejection tracking prevents a common issue where React gets into an
  820. // inconsistent state due to an error, but it gets swallowed by a Promise,
  821. // and the user has no idea what causes React's erratic future behavior.
  822. __webpack_require__(/*! promise/lib/rejection-tracking */ "./node_modules/promise/lib/rejection-tracking.js").enable();
  823. window.Promise = __webpack_require__(/*! promise/lib/es6-extensions.js */ "./node_modules/promise/lib/es6-extensions.js");
  824. }
  825. // fetch() polyfill for making API calls.
  826. __webpack_require__(/*! whatwg-fetch */ "./node_modules/whatwg-fetch/fetch.js");
  827. // Object.assign() is commonly used with React.
  828. // It will use the native implementation if it's present and isn't buggy.
  829. Object.assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
  830. // In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
  831. // We don't polyfill it in the browser--this is user's responsibility.
  832. if (false) {
  833. require('raf').polyfill(global);
  834. }
  835. /***/ }),
  836. /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
  837. /*!**************************************************************************!*\
  838. !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
  839. \**************************************************************************/
  840. /*! exports provided: default */
  841. /*! exports used: default */
  842. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  843. "use strict";
  844. /* harmony export (immutable) */ __webpack_exports__["a"] = _assertThisInitialized;
  845. function _assertThisInitialized(self) {
  846. if (self === void 0) {
  847. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  848. }
  849. return self;
  850. }
  851. /***/ }),
  852. /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
  853. /*!************************************************************!*\
  854. !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
  855. \************************************************************/
  856. /*! exports provided: default */
  857. /*! exports used: default */
  858. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  859. "use strict";
  860. /* harmony export (immutable) */ __webpack_exports__["a"] = _extends;
  861. function _extends() {
  862. _extends = Object.assign ? Object.assign.bind() : function (target) {
  863. for (var i = 1; i < arguments.length; i++) {
  864. var source = arguments[i];
  865. for (var key in source) {
  866. if (Object.prototype.hasOwnProperty.call(source, key)) {
  867. target[key] = source[key];
  868. }
  869. }
  870. }
  871. return target;
  872. };
  873. return _extends.apply(this, arguments);
  874. }
  875. /***/ }),
  876. /***/ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js":
  877. /*!******************************************************************!*\
  878. !*** ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js ***!
  879. \******************************************************************/
  880. /*! exports provided: default */
  881. /*! exports used: default */
  882. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  883. "use strict";
  884. /* harmony export (immutable) */ __webpack_exports__["a"] = _inheritsLoose;
  885. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setPrototypeOf_js__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
  886. function _inheritsLoose(subClass, superClass) {
  887. subClass.prototype = Object.create(superClass.prototype);
  888. subClass.prototype.constructor = subClass;
  889. Object(__WEBPACK_IMPORTED_MODULE_0__setPrototypeOf_js__["a" /* default */])(subClass, superClass);
  890. }
  891. /***/ }),
  892. /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":
  893. /*!*********************************************************************************!*\
  894. !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***!
  895. \*********************************************************************************/
  896. /*! exports provided: default */
  897. /*! exports used: default */
  898. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  899. "use strict";
  900. /* harmony export (immutable) */ __webpack_exports__["a"] = _objectWithoutPropertiesLoose;
  901. function _objectWithoutPropertiesLoose(source, excluded) {
  902. if (source == null) return {};
  903. var target = {};
  904. var sourceKeys = Object.keys(source);
  905. var key, i;
  906. for (i = 0; i < sourceKeys.length; i++) {
  907. key = sourceKeys[i];
  908. if (excluded.indexOf(key) >= 0) continue;
  909. target[key] = source[key];
  910. }
  911. return target;
  912. }
  913. /***/ }),
  914. /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
  915. /*!*******************************************************************!*\
  916. !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  917. \*******************************************************************/
  918. /*! exports provided: default */
  919. /*! exports used: default */
  920. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  921. "use strict";
  922. /* harmony export (immutable) */ __webpack_exports__["a"] = _setPrototypeOf;
  923. function _setPrototypeOf(o, p) {
  924. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  925. o.__proto__ = p;
  926. return o;
  927. };
  928. return _setPrototypeOf(o, p);
  929. }
  930. /***/ }),
  931. /***/ "./node_modules/ansi-regex/index.js":
  932. /*!******************************************!*\
  933. !*** ./node_modules/ansi-regex/index.js ***!
  934. \******************************************/
  935. /*! dynamic exports provided */
  936. /*! all exports used */
  937. /***/ (function(module, exports, __webpack_require__) {
  938. "use strict";
  939. module.exports = function () {
  940. return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
  941. };
  942. /***/ }),
  943. /***/ "./node_modules/asap/browser-raw.js":
  944. /*!******************************************!*\
  945. !*** ./node_modules/asap/browser-raw.js ***!
  946. \******************************************/
  947. /*! dynamic exports provided */
  948. /*! all exports used */
  949. /***/ (function(module, exports, __webpack_require__) {
  950. "use strict";
  951. /* WEBPACK VAR INJECTION */(function(global) {
  952. // Use the fastest means possible to execute a task in its own turn, with
  953. // priority over other events including IO, animation, reflow, and redraw
  954. // events in browsers.
  955. //
  956. // An exception thrown by a task will permanently interrupt the processing of
  957. // subsequent tasks. The higher level `asap` function ensures that if an
  958. // exception is thrown by a task, that the task queue will continue flushing as
  959. // soon as possible, but if you use `rawAsap` directly, you are responsible to
  960. // either ensure that no exceptions are thrown from your task, or to manually
  961. // call `rawAsap.requestFlush` if an exception is thrown.
  962. module.exports = rawAsap;
  963. function rawAsap(task) {
  964. if (!queue.length) {
  965. requestFlush();
  966. flushing = true;
  967. }
  968. // Equivalent to push, but avoids a function call.
  969. queue[queue.length] = task;
  970. }
  971. var queue = [];
  972. // Once a flush has been requested, no further calls to `requestFlush` are
  973. // necessary until the next `flush` completes.
  974. var flushing = false;
  975. // `requestFlush` is an implementation-specific method that attempts to kick
  976. // off a `flush` event as quickly as possible. `flush` will attempt to exhaust
  977. // the event queue before yielding to the browser's own event loop.
  978. var requestFlush;
  979. // The position of the next task to execute in the task queue. This is
  980. // preserved between calls to `flush` so that it can be resumed if
  981. // a task throws an exception.
  982. var index = 0;
  983. // If a task schedules additional tasks recursively, the task queue can grow
  984. // unbounded. To prevent memory exhaustion, the task queue will periodically
  985. // truncate already-completed tasks.
  986. var capacity = 1024;
  987. // The flush function processes all tasks that have been scheduled with
  988. // `rawAsap` unless and until one of those tasks throws an exception.
  989. // If a task throws an exception, `flush` ensures that its state will remain
  990. // consistent and will resume where it left off when called again.
  991. // However, `flush` does not make any arrangements to be called again if an
  992. // exception is thrown.
  993. function flush() {
  994. while (index < queue.length) {
  995. var currentIndex = index;
  996. // Advance the index before calling the task. This ensures that we will
  997. // begin flushing on the next task the task throws an error.
  998. index = index + 1;
  999. queue[currentIndex].call();
  1000. // Prevent leaking memory for long chains of recursive calls to `asap`.
  1001. // If we call `asap` within tasks scheduled by `asap`, the queue will
  1002. // grow, but to avoid an O(n) walk for every task we execute, we don't
  1003. // shift tasks off the queue after they have been executed.
  1004. // Instead, we periodically shift 1024 tasks off the queue.
  1005. if (index > capacity) {
  1006. // Manually shift all values starting at the index back to the
  1007. // beginning of the queue.
  1008. for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
  1009. queue[scan] = queue[scan + index];
  1010. }
  1011. queue.length -= index;
  1012. index = 0;
  1013. }
  1014. }
  1015. queue.length = 0;
  1016. index = 0;
  1017. flushing = false;
  1018. }
  1019. // `requestFlush` is implemented using a strategy based on data collected from
  1020. // every available SauceLabs Selenium web driver worker at time of writing.
  1021. // https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
  1022. // Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
  1023. // have WebKitMutationObserver but not un-prefixed MutationObserver.
  1024. // Must use `global` or `self` instead of `window` to work in both frames and web
  1025. // workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
  1026. /* globals self */
  1027. var scope = typeof global !== "undefined" ? global : self;
  1028. var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;
  1029. // MutationObservers are desirable because they have high priority and work
  1030. // reliably everywhere they are implemented.
  1031. // They are implemented in all modern browsers.
  1032. //
  1033. // - Android 4-4.3
  1034. // - Chrome 26-34
  1035. // - Firefox 14-29
  1036. // - Internet Explorer 11
  1037. // - iPad Safari 6-7.1
  1038. // - iPhone Safari 7-7.1
  1039. // - Safari 6-7
  1040. if (typeof BrowserMutationObserver === "function") {
  1041. requestFlush = makeRequestCallFromMutationObserver(flush);
  1042. // MessageChannels are desirable because they give direct access to the HTML
  1043. // task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
  1044. // 11-12, and in web workers in many engines.
  1045. // Although message channels yield to any queued rendering and IO tasks, they
  1046. // would be better than imposing the 4ms delay of timers.
  1047. // However, they do not work reliably in Internet Explorer or Safari.
  1048. // Internet Explorer 10 is the only browser that has setImmediate but does
  1049. // not have MutationObservers.
  1050. // Although setImmediate yields to the browser's renderer, it would be
  1051. // preferrable to falling back to setTimeout since it does not have
  1052. // the minimum 4ms penalty.
  1053. // Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
  1054. // Desktop to a lesser extent) that renders both setImmediate and
  1055. // MessageChannel useless for the purposes of ASAP.
  1056. // https://github.com/kriskowal/q/issues/396
  1057. // Timers are implemented universally.
  1058. // We fall back to timers in workers in most engines, and in foreground
  1059. // contexts in the following browsers.
  1060. // However, note that even this simple case requires nuances to operate in a
  1061. // broad spectrum of browsers.
  1062. //
  1063. // - Firefox 3-13
  1064. // - Internet Explorer 6-9
  1065. // - iPad Safari 4.3
  1066. // - Lynx 2.8.7
  1067. } else {
  1068. requestFlush = makeRequestCallFromTimer(flush);
  1069. }
  1070. // `requestFlush` requests that the high priority event queue be flushed as
  1071. // soon as possible.
  1072. // This is useful to prevent an error thrown in a task from stalling the event
  1073. // queue if the exception handled by Node.js’s
  1074. // `process.on("uncaughtException")` or by a domain.
  1075. rawAsap.requestFlush = requestFlush;
  1076. // To request a high priority event, we induce a mutation observer by toggling
  1077. // the text of a text node between "1" and "-1".
  1078. function makeRequestCallFromMutationObserver(callback) {
  1079. var toggle = 1;
  1080. var observer = new BrowserMutationObserver(callback);
  1081. var node = document.createTextNode("");
  1082. observer.observe(node, {characterData: true});
  1083. return function requestCall() {
  1084. toggle = -toggle;
  1085. node.data = toggle;
  1086. };
  1087. }
  1088. // The message channel technique was discovered by Malte Ubl and was the
  1089. // original foundation for this library.
  1090. // http://www.nonblocking.io/2011/06/windownexttick.html
  1091. // Safari 6.0.5 (at least) intermittently fails to create message ports on a
  1092. // page's first load. Thankfully, this version of Safari supports
  1093. // MutationObservers, so we don't need to fall back in that case.
  1094. // function makeRequestCallFromMessageChannel(callback) {
  1095. // var channel = new MessageChannel();
  1096. // channel.port1.onmessage = callback;
  1097. // return function requestCall() {
  1098. // channel.port2.postMessage(0);
  1099. // };
  1100. // }
  1101. // For reasons explained above, we are also unable to use `setImmediate`
  1102. // under any circumstances.
  1103. // Even if we were, there is another bug in Internet Explorer 10.
  1104. // It is not sufficient to assign `setImmediate` to `requestFlush` because
  1105. // `setImmediate` must be called *by name* and therefore must be wrapped in a
  1106. // closure.
  1107. // Never forget.
  1108. // function makeRequestCallFromSetImmediate(callback) {
  1109. // return function requestCall() {
  1110. // setImmediate(callback);
  1111. // };
  1112. // }
  1113. // Safari 6.0 has a problem where timers will get lost while the user is
  1114. // scrolling. This problem does not impact ASAP because Safari 6.0 supports
  1115. // mutation observers, so that implementation is used instead.
  1116. // However, if we ever elect to use timers in Safari, the prevalent work-around
  1117. // is to add a scroll event listener that calls for a flush.
  1118. // `setTimeout` does not call the passed callback if the delay is less than
  1119. // approximately 7 in web workers in Firefox 8 through 18, and sometimes not
  1120. // even then.
  1121. function makeRequestCallFromTimer(callback) {
  1122. return function requestCall() {
  1123. // We dispatch a timeout with a specified delay of 0 for engines that
  1124. // can reliably accommodate that request. This will usually be snapped
  1125. // to a 4 milisecond delay, but once we're flushing, there's no delay
  1126. // between events.
  1127. var timeoutHandle = setTimeout(handleTimer, 0);
  1128. // However, since this timer gets frequently dropped in Firefox
  1129. // workers, we enlist an interval handle that will try to fire
  1130. // an event 20 times per second until it succeeds.
  1131. var intervalHandle = setInterval(handleTimer, 50);
  1132. function handleTimer() {
  1133. // Whichever timer succeeds will cancel both timers and
  1134. // execute the callback.
  1135. clearTimeout(timeoutHandle);
  1136. clearInterval(intervalHandle);
  1137. callback();
  1138. }
  1139. };
  1140. }
  1141. // This is for `asap.js` only.
  1142. // Its name will be periodically randomized to break any code that depends on
  1143. // its existence.
  1144. rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
  1145. // ASAP was originally a nextTick shim included in Q. This was factored out
  1146. // into this ASAP package. It was later adapted to RSVP which made further
  1147. // amendments. These decisions, particularly to marginalize MessageChannel and
  1148. // to capture the MutationObserver implementation in a closure, were integrated
  1149. // back into ASAP proper.
  1150. // https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
  1151. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  1152. /***/ }),
  1153. /***/ "./node_modules/chalk/index.js":
  1154. /*!*************************************!*\
  1155. !*** ./node_modules/chalk/index.js ***!
  1156. \*************************************/
  1157. /*! dynamic exports provided */
  1158. /*! all exports used */
  1159. /***/ (function(module, exports, __webpack_require__) {
  1160. "use strict";
  1161. /* WEBPACK VAR INJECTION */(function(process) {
  1162. var escapeStringRegexp = __webpack_require__(/*! escape-string-regexp */ "./node_modules/escape-string-regexp/index.js");
  1163. var ansiStyles = __webpack_require__(/*! ansi-styles */ "./node_modules/chalk/node_modules/ansi-styles/index.js");
  1164. var stripAnsi = __webpack_require__(/*! strip-ansi */ "./node_modules/strip-ansi/index.js");
  1165. var hasAnsi = __webpack_require__(/*! has-ansi */ "./node_modules/has-ansi/index.js");
  1166. var supportsColor = __webpack_require__(/*! supports-color */ "./node_modules/chalk/node_modules/supports-color/index.js");
  1167. var defineProps = Object.defineProperties;
  1168. var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(Object({"NODE_ENV":"development","PUBLIC_URL":""}).TERM);
  1169. function Chalk(options) {
  1170. // detect mode if not set manually
  1171. this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
  1172. }
  1173. // use bright blue on Windows as the normal blue color is illegible
  1174. if (isSimpleWindowsTerm) {
  1175. ansiStyles.blue.open = '\u001b[94m';
  1176. }
  1177. var styles = (function () {
  1178. var ret = {};
  1179. Object.keys(ansiStyles).forEach(function (key) {
  1180. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
  1181. ret[key] = {
  1182. get: function () {
  1183. return build.call(this, this._styles.concat(key));
  1184. }
  1185. };
  1186. });
  1187. return ret;
  1188. })();
  1189. var proto = defineProps(function chalk() {}, styles);
  1190. function build(_styles) {
  1191. var builder = function () {
  1192. return applyStyle.apply(builder, arguments);
  1193. };
  1194. builder._styles = _styles;
  1195. builder.enabled = this.enabled;
  1196. // __proto__ is used because we must return a function, but there is
  1197. // no way to create a function with a different prototype.
  1198. /* eslint-disable no-proto */
  1199. builder.__proto__ = proto;
  1200. return builder;
  1201. }
  1202. function applyStyle() {
  1203. // support varags, but simply cast to string in case there's only one arg
  1204. var args = arguments;
  1205. var argsLen = args.length;
  1206. var str = argsLen !== 0 && String(arguments[0]);
  1207. if (argsLen > 1) {
  1208. // don't slice `arguments`, it prevents v8 optimizations
  1209. for (var a = 1; a < argsLen; a++) {
  1210. str += ' ' + args[a];
  1211. }
  1212. }
  1213. if (!this.enabled || !str) {
  1214. return str;
  1215. }
  1216. var nestedStyles = this._styles;
  1217. var i = nestedStyles.length;
  1218. // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
  1219. // see https://github.com/chalk/chalk/issues/58
  1220. // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
  1221. var originalDim = ansiStyles.dim.open;
  1222. if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
  1223. ansiStyles.dim.open = '';
  1224. }
  1225. while (i--) {
  1226. var code = ansiStyles[nestedStyles[i]];
  1227. // Replace any instances already present with a re-opening code
  1228. // otherwise only the part of the string until said closing code
  1229. // will be colored, and the rest will simply be 'plain'.
  1230. str = code.open + str.replace(code.closeRe, code.open) + code.close;
  1231. }
  1232. // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
  1233. ansiStyles.dim.open = originalDim;
  1234. return str;
  1235. }
  1236. function init() {
  1237. var ret = {};
  1238. Object.keys(styles).forEach(function (name) {
  1239. ret[name] = {
  1240. get: function () {
  1241. return build.call(this, [name]);
  1242. }
  1243. };
  1244. });
  1245. return ret;
  1246. }
  1247. defineProps(Chalk.prototype, init());
  1248. module.exports = new Chalk();
  1249. module.exports.styles = ansiStyles;
  1250. module.exports.hasColor = hasAnsi;
  1251. module.exports.stripColor = stripAnsi;
  1252. module.exports.supportsColor = supportsColor;
  1253. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
  1254. /***/ }),
  1255. /***/ "./node_modules/chalk/node_modules/ansi-styles/index.js":
  1256. /*!**************************************************************!*\
  1257. !*** ./node_modules/chalk/node_modules/ansi-styles/index.js ***!
  1258. \**************************************************************/
  1259. /*! dynamic exports provided */
  1260. /*! all exports used */
  1261. /***/ (function(module, exports, __webpack_require__) {
  1262. "use strict";
  1263. /* WEBPACK VAR INJECTION */(function(module) {
  1264. function assembleStyles () {
  1265. var styles = {
  1266. modifiers: {
  1267. reset: [0, 0],
  1268. bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
  1269. dim: [2, 22],
  1270. italic: [3, 23],
  1271. underline: [4, 24],
  1272. inverse: [7, 27],
  1273. hidden: [8, 28],
  1274. strikethrough: [9, 29]
  1275. },
  1276. colors: {
  1277. black: [30, 39],
  1278. red: [31, 39],
  1279. green: [32, 39],
  1280. yellow: [33, 39],
  1281. blue: [34, 39],
  1282. magenta: [35, 39],
  1283. cyan: [36, 39],
  1284. white: [37, 39],
  1285. gray: [90, 39]
  1286. },
  1287. bgColors: {
  1288. bgBlack: [40, 49],
  1289. bgRed: [41, 49],
  1290. bgGreen: [42, 49],
  1291. bgYellow: [43, 49],
  1292. bgBlue: [44, 49],
  1293. bgMagenta: [45, 49],
  1294. bgCyan: [46, 49],
  1295. bgWhite: [47, 49]
  1296. }
  1297. };
  1298. // fix humans
  1299. styles.colors.grey = styles.colors.gray;
  1300. Object.keys(styles).forEach(function (groupName) {
  1301. var group = styles[groupName];
  1302. Object.keys(group).forEach(function (styleName) {
  1303. var style = group[styleName];
  1304. styles[styleName] = group[styleName] = {
  1305. open: '\u001b[' + style[0] + 'm',
  1306. close: '\u001b[' + style[1] + 'm'
  1307. };
  1308. });
  1309. Object.defineProperty(styles, groupName, {
  1310. value: group,
  1311. enumerable: false
  1312. });
  1313. });
  1314. return styles;
  1315. }
  1316. Object.defineProperty(module, 'exports', {
  1317. enumerable: true,
  1318. get: assembleStyles
  1319. });
  1320. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  1321. /***/ }),
  1322. /***/ "./node_modules/chalk/node_modules/supports-color/index.js":
  1323. /*!*****************************************************************!*\
  1324. !*** ./node_modules/chalk/node_modules/supports-color/index.js ***!
  1325. \*****************************************************************/
  1326. /*! dynamic exports provided */
  1327. /*! all exports used */
  1328. /***/ (function(module, exports, __webpack_require__) {
  1329. "use strict";
  1330. /* WEBPACK VAR INJECTION */(function(process) {
  1331. var argv = process.argv;
  1332. var terminator = argv.indexOf('--');
  1333. var hasFlag = function (flag) {
  1334. flag = '--' + flag;
  1335. var pos = argv.indexOf(flag);
  1336. return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
  1337. };
  1338. module.exports = (function () {
  1339. if ('FORCE_COLOR' in Object({"NODE_ENV":"development","PUBLIC_URL":""})) {
  1340. return true;
  1341. }
  1342. if (hasFlag('no-color') ||
  1343. hasFlag('no-colors') ||
  1344. hasFlag('color=false')) {
  1345. return false;
  1346. }
  1347. if (hasFlag('color') ||
  1348. hasFlag('colors') ||
  1349. hasFlag('color=true') ||
  1350. hasFlag('color=always')) {
  1351. return true;
  1352. }
  1353. if (process.stdout && !process.stdout.isTTY) {
  1354. return false;
  1355. }
  1356. if (process.platform === 'win32') {
  1357. return true;
  1358. }
  1359. if ('COLORTERM' in Object({"NODE_ENV":"development","PUBLIC_URL":""})) {
  1360. return true;
  1361. }
  1362. if (Object({"NODE_ENV":"development","PUBLIC_URL":""}).TERM === 'dumb') {
  1363. return false;
  1364. }
  1365. if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(Object({"NODE_ENV":"development","PUBLIC_URL":""}).TERM)) {
  1366. return true;
  1367. }
  1368. return false;
  1369. })();
  1370. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../process/browser.js */ "./node_modules/process/browser.js")))
  1371. /***/ }),
  1372. /***/ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css":
  1373. /*!***************************************************************************************************************************************!*\
  1374. !*** ./node_modules/css-loader?{"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss"}!./src/assets/css/common.css ***!
  1375. \***************************************************************************************************************************************/
  1376. /*! dynamic exports provided */
  1377. /*! all exports used */
  1378. /***/ (function(module, exports, __webpack_require__) {
  1379. exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(undefined);
  1380. // imports
  1381. // module
  1382. exports.push([module.i, "* {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\nbody {\r\n margin: 0;\r\n padding: 0;\r\n font-size: 1.867vw;\r\n font-family: sans-serif;\r\n overflow-x: hidden;\r\n background-color: #fcfcfd;\r\n}\r\n\r\nli {\r\n list-style: none;\r\n}\r\n\r\nimg {\r\n display: block;\r\n max-width: 100%;\r\n}\r\n\r\ni {\r\n font-style: normal;\r\n}\r\n\r\na {\r\n display: block;\r\n color: #333;\r\n text-decoration: none;\r\n}\r\n\r\nh1, h2, h3, h4, h5 {\r\n font-weight: normal;\r\n}", ""]);
  1383. // exports
  1384. /***/ }),
  1385. /***/ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css":
  1386. /*!***************************************************************************************************************************!*\
  1387. !*** ./node_modules/css-loader?{"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss"}!./src/index.css ***!
  1388. \***************************************************************************************************************************/
  1389. /*! dynamic exports provided */
  1390. /*! all exports used */
  1391. /***/ (function(module, exports, __webpack_require__) {
  1392. exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(undefined);
  1393. // imports
  1394. // module
  1395. exports.push([module.i, "/* common\r\n=================================================================*/\r\n.icon_play {\r\n position: absolute;\r\n top: 1.6vw;\r\n right: 1.333vw;\r\n width: 3.2vw;\r\n height: 3.2vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/index_icon_2x.png */ "./src/assets/images/index_icon_2x.png") + ") no-repeat;\r\n background-size: 24vw;\r\n background-position: -3.467vw 0;\r\n}\r\n\r\n.sq {\r\n display: inline-block;\r\n width: 2.133vw;\r\n height: 1.2vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/index_icon_2x.png */ "./src/assets/images/index_icon_2x.png") + ") no-repeat;\r\n background-size: 24vw;\r\n}\r\n\r\n/* component-index\r\n=================================================================*/\r\n.cmp_index {\r\n padding-top: 13.867vw;\r\n}\r\n\r\n.top_bar {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n z-index: 1000;\r\n display: -ms-flexbox;\r\n display: flex;\r\n width: 100%;\r\n height: 8.533vw;\r\n padding: 0 1.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n -ms-flex-pack: justify;\r\n justify-content: space-between;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n background-color: #d43c33;\r\n}\r\n\r\n.top_bar .logo {\r\n width: 18.933vw;\r\n height: 3.333vw;\r\n}\r\n\r\n.top_bar .download {\r\n width: 13.333vw;\r\n height: 4vw;\r\n line-height: 4vw;\r\n text-align: center;\r\n color: #fff;\r\n font-size: 2.133vw;\r\n border: 1px solid #fff;\r\n border-radius: 4vw;\r\n}\r\n\r\n/* nav_bar */\r\n.nav_bar {\r\n position: fixed;\r\n top: 8.533vw;\r\n left: 0;\r\n z-index: 1000;\r\n}\r\n\r\n.nav_bar,\r\n.nav_bar ul {\r\n width: 100%;\r\n height: 5.333vw;\r\n background-color: #fff;\r\n}\r\n\r\n.nav_bar ul {\r\n display: -ms-flexbox;\r\n display: flex;\r\n padding: 0 2vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n border-bottom: 1px solid #f1f1f1;\r\n -webkit-box-shadow: 0 1px 2vw rgba(204, 204, 204, 0.5);\r\n box-shadow: 0 1px 2vw rgba(204, 204, 204, 0.5);\r\n}\r\n\r\n.nav_bar ul li {\r\n -ms-flex: 1 1;\r\n flex: 1 1;\r\n height: 5.333vw;\r\n line-height: 5.333vw;\r\n text-align: center;\r\n -webkit-tap-highlight-color: transparent;\r\n tap-highlight-color: transparent;\r\n}\r\n\r\n.nav_bar ul li:nth-of-type(2) {\r\n margin: 0 2vw;\r\n}\r\n\r\n.nav_bar ul li.active {\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n border-bottom: 0.267vw solid #d43c33;\r\n}\r\n\r\n/* 推荐歌单 */\r\n.cmp_recommend .rmd_title {\r\n position: relative;\r\n font-size: 2.133vw;\r\n text-indent: 1.333vw;\r\n padding: 2.667vw 0 2vw 0;\r\n}\r\n\r\n.cmp_recommend .rmd_title:after {\r\n position: absolute;\r\n bottom: 2.4vw;\r\n left: 0;\r\n z-index: 10;\r\n width: 0.267vw;\r\n height: 2vw;\r\n content: \"\";\r\n background-color: #d43c33;\r\n}\r\n\r\n.rmd_sheet:after {\r\n display: block;\r\n visibility: hidden;\r\n clear: both;\r\n height: 0;\r\n overflow: hidden;\r\n content: \".\";\r\n}\r\n\r\n.rmd_sheet .song_sheet_item {\r\n width: 33.3%;\r\n float: left;\r\n margin-bottom: 2vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item:nth-of-type(1),\r\n.rmd_sheet .song_sheet_item:nth-of-type(4) {\r\n padding: 0 0.267vw 0 0;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item:nth-of-type(2),\r\n.rmd_sheet .song_sheet_item:nth-of-type(5) {\r\n padding: 0 1px;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item:nth-of-type(3),\r\n.rmd_sheet .song_sheet_item:nth-of-type(6) {\r\n padding: 0 0 0 0.267vw;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img {\r\n position: relative;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img:after {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n width: 100%;\r\n height: 2.667vw;\r\n content: \" \";\r\n z-index: 2;\r\n background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .2)), to(transparent));\r\n background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, .2), transparent);\r\n background-image: -o-linear-gradient(top, rgba(0, 0, 0, .2), transparent);\r\n background-image: linear-gradient(180deg, rgba(0, 0, 0, .2), transparent);\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img .earp {\r\n position: absolute;\r\n top: 0.667vw;\r\n right: 0.667vw;\r\n z-index: 10;\r\n color: #fff;\r\n font-size: 1.6vw;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img .earp:after {\r\n position: absolute;\r\n top: 0.4vw;\r\n left: -2.4vw;\r\n z-index: 10;\r\n width: 1.6vw;\r\n height: 1.333vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/earp.png */ "./src/assets/images/earp.png") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_text {\r\n height: 4vw;\r\n line-height: 2vw;\r\n margin-top: 0.667vw;\r\n font-size: 1.6vw;\r\n padding: 0 0.667vw;\r\n overflow: hidden;\r\n}\r\n\r\n/* 最新音乐 */\r\n.rmd_new_song {\r\n padding-left: 1.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.song_item {\r\n position: relative;\r\n padding: 0.8vw 0;\r\n vertical-align: top;\r\n}\r\n\r\n.song_item:after {\r\n position: absolute;\r\n left: 0;\r\n bottom: -0.267vw;\r\n right: 0;\r\n z-index: 2;\r\n height: 1px;\r\n border-bottom: 1px solid #e5e5e5;\r\n color: #e5e5e5;\r\n content: \" \";\r\n -webkit-transform-origin: 0 0;\r\n -ms-transform-origin: 0 0;\r\n transform-origin: 0 0;\r\n -webkit-transform: scaleY(0.5);\r\n -ms-transform: scaleY(0.5);\r\n transform: scaleY(0.5);\r\n\r\n}\r\n\r\n.song_item h3 {\r\n color: #333;\r\n}\r\n\r\n.song_item p {\r\n color: #888;\r\n font-size: 1.6vw;\r\n vertical-align: middle;\r\n}\r\n\r\n/* 热歌榜 */\r\n.cmp_hot_songs .hot_brand {\r\n width: 100%;\r\n height: 20vw;\r\n padding: 2.667vw 0 0 2.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n background: url(" + __webpack_require__(/*! ./assets/images/hot_music_bg_2x.jpg */ "./src/assets/images/hot_music_bg_2x.jpg") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.cmp_hot_songs .big_icon {\r\n width: 18.933vw;\r\n height: 8.933vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/index_icon_2x.png */ "./src/assets/images/index_icon_2x.png") + ") no-repeat;\r\n background-size: 22.133vw 12.933vw;\r\n background-position: -3.2vw -4vw;\r\n}\r\n\r\n.cmp_hot_songs .update_date {\r\n color: #fff;\r\n font-size: 1.333vw;\r\n margin-top: 1.333vw;\r\n}\r\n\r\n.cmp_hot_songs .item {\r\n position: relative;\r\n padding-left: 5.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_hot_songs .item .song_no {\r\n position: absolute;\r\n top: 2vw;\r\n left: 1.333vw;\r\n z-index: 2;\r\n display: block;\r\n color: #999;\r\n font-size: 2.133vw;\r\n}\r\n\r\n.cmp_hot_songs .item:nth-of-type(1) .song_no,\r\n.cmp_hot_songs .item:nth-of-type(2) .song_no,\r\n.cmp_hot_songs .item:nth-of-type(3) .song_no {\r\n color: #d43c33;\r\n}\r\n\r\n.cmp_hot_songs .go_all_songs {\r\n text-align: center;\r\n padding: 2vw 0;\r\n color: #999;\r\n font-size: 1.867vw;\r\n}\r\n\r\n/* 搜索 */\r\n.cmp_search .search_box {\r\n position: relative;\r\n padding: 2vw 1.333vw;\r\n}\r\n\r\n.cmp_search .search_box:after {\r\n position: absolute;\r\n left: 0;\r\n bottom: -0.267vw;\r\n right: 0;\r\n z-index: 2;\r\n height: 1px;\r\n border-bottom: 1px solid #e5e5e5;\r\n color: #e5e5e5;\r\n content: \" \";\r\n -webkit-transform-origin: 0 0;\r\n -ms-transform-origin: 0 0;\r\n transform-origin: 0 0;\r\n -webkit-transform: scaleY(0.5);\r\n -ms-transform: scaleY(0.5);\r\n transform: scaleY(0.5);\r\n}\r\n\r\n.cmp_search .search_main {\r\n padding: 0.667vw 1.333vw 0.667vw 4vw;\r\n border-radius: 2.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n background: #ebecec url(" + __webpack_require__(/*! ./assets/images/search.png */ "./src/assets/images/search.png") + ") no-repeat;\r\n background-size: 2.667vw;\r\n background-position: 0.667vw center;\r\n}\r\n\r\n.cmp_search .search_main input {\r\n outline: none;\r\n border: 0;\r\n background-color: transparent;\r\n}\r\n\r\n.cmp_search .hot_search {\r\n padding: 1.333vw;\r\n}\r\n\r\n.cmp_search .hot_search .title {\r\n color: #888;\r\n font-size: 1.333vw;\r\n margin-bottom: 1.333vw;\r\n}\r\n\r\n.cmp_search .songs ul {\r\n font-size: 0;\r\n}\r\n\r\n.cmp_search .songs ul li {\r\n display: inline-block;\r\n color: #666;\r\n font-size: 1.867vw;\r\n padding: 0.667vw 1.333vw;\r\n margin-right: 2vw;\r\n margin-bottom: 1.333vw;\r\n border: 1px solid #eaeaea;\r\n border-radius: 4vw;\r\n}\r\n\r\n.cmp_search .history {\r\n padding-left: 4vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_search .history .item {\r\n position: relative;\r\n padding: 1.333vw 0;\r\n color: #666;\r\n font-size: 1.867vw;\r\n border-bottom: 1px solid #f1f1f1;\r\n}\r\n\r\n.cmp_search .history .item:after {\r\n position: absolute;\r\n top: 1.6vw;\r\n left: -3.333vw;\r\n z-index: 2;\r\n display: block;\r\n width: 2.667vw;\r\n height: 2.667vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/time.png */ "./src/assets/images/time.png") + ") no-repeat;\r\n background-size: 2.4vw;\r\n}\r\n\r\n.cmp_search .history .close {\r\n position: absolute;\r\n top: 1.333vw;\r\n right: 1.333vw;\r\n z-index: 2;\r\n display: block;\r\n width: 4vw;\r\n height: 4vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/close.png */ "./src/assets/images/close.png") + ") no-repeat;\r\n background-size: 2.933vw;\r\n}\r\n\r\n/* Footer\r\n=================================================================*/\r\n.footer {\r\n position: relative;\r\n width: 100%;\r\n height: 26.667vw;\r\n overflow: hidden;\r\n background: url(" + __webpack_require__(/*! ./assets/images/recommand_bg_2x.png */ "./src/assets/images/recommand_bg_2x.png") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.footer .logo {\r\n width: 30.667vw;\r\n height: 5.333vw;\r\n margin: 8.4vw auto 0 auto;\r\n}\r\n\r\n.footer .find_more {\r\n width: 40vw;\r\n height: 5.067vw;\r\n line-height: 5.067vw;\r\n text-align: center;\r\n color: #d43c33;\r\n font-size: 2.133vw;\r\n margin: 2vw auto 0.667vw auto;\r\n border: 1px solid #d43c33;\r\n border-radius: 5.067vw;\r\n}\r\n\r\n.footer .copyright {\r\n color: #888;\r\n font-size: 1.6vw;\r\n line-height: 2.133vw;\r\n text-align: center;\r\n -webkit-transform: scale(.75);\r\n -ms-transform: scale(.75);\r\n transform: scale(.75);\r\n}\r\n\r\n/* Play\r\n=================================================================*/\r\n.cmp_play .play_bg {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n z-index: 1;\r\n display: block;\r\n width: 100vw;\r\n height: 100vh;\r\n}\r\n\r\n.cmp_play .play_bg img {\r\n display: block;\r\n width: 100%;\r\n height: 100%;\r\n\r\n}\r\n\r\n.cmp_play .play_main {\r\n position: relative;\r\n z-index: 5;\r\n padding-top: 9.333vw;\r\n}\r\n\r\n.cmp_play .play_main .logo {\r\n position: absolute;\r\n top: 1.6vw;\r\n left: 1.333vw;\r\n display: block;\r\n width: 13.333vw;\r\n height: 2.267vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/logo.png */ "./src/assets/images/logo.png") + ") no-repeat;\r\n background-size: 13.333vw auto;\r\n}\r\n\r\n.cmp_play .control {\r\n width: 40vw;\r\n height: 40vw;\r\n margin: 0 auto;\r\n padding: 0.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n border-radius: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.cmp_play .disc {\r\n position: relative;\r\n width: 100%;\r\n height: 100%;\r\n border-radius: 100%;\r\n background: url(" + __webpack_require__(/*! ./assets/images/play_disc.png */ "./src/assets/images/play_disc.png") + ") no-repeat;\r\n background-size: cover;\r\n cursor:pointer;\r\n}\r\n\r\n.cmp_play .btn_play,\r\n.cmp_play .btn_stop {\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n z-index: 5;\r\n display: block;\r\n width: 7.467vw;\r\n height: 7.467vw;\r\n margin: -3.733vw 0 0 -3.733vw;\r\n}\r\n\r\n.cmp_play .btn_play {\r\n background: url(" + __webpack_require__(/*! ./assets/images/play.png */ "./src/assets/images/play.png") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.cmp_play .btn_stop {\r\n background: url(" + __webpack_require__(/*! ./assets/images/stop.png */ "./src/assets/images/stop.png") + ") no-repeat;\r\n background-size: cover;\r\n\r\n}\r\n\r\n.cmp_play .handler {\r\n position: absolute;\r\n top: -4.667vw;\r\n left: 50%;\r\n z-index: 2;\r\n width: 12.8vw;\r\n height: 19.467vw;\r\n margin-left: -2.933vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/needle-ip6.png */ "./src/assets/images/needle-ip6.png") + ") no-repeat;\r\n background-size: 100% 100%;\r\n -webkit-transform: rotate(-25deg);\r\n -ms-transform: rotate(-25deg);\r\n transform: rotate(-25deg);\r\n -webkit-transition: transform .3s linear 0s;\r\n -webkit-transition: -webkit-transform .3s linear 0s;\r\n transition: -webkit-transform .3s linear 0s;\r\n -o-transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s, -webkit-transform .3s linear 0s;\r\n}\r\n\r\n.cmp_play .handler.play {\r\n -webkit-transform: rotate(15deg);\r\n -ms-transform: rotate(15deg);\r\n transform: rotate(15deg);\r\n}\r\n\r\n.cmp_play .brand {\r\n width: 100%;\r\n height: 100%;\r\n padding: 6.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play .brand img {\r\n border-radius: 100%;\r\n}\r\n\r\n.cmp_play .brand.spin {\r\n -webkit-animation: spin 15s linear 0s infinite;\r\n animation: spin 15s linear 0s infinite;\r\n}\r\n\r\n@-webkit-keyframes spin {\r\n 100% {\r\n -webkit-transform: rotate(1turn);\r\n transform: rotate(1turn);\r\n }\r\n}\r\n\r\n@keyframes spin {\r\n 100% {\r\n -webkit-transform: rotate(1turn);\r\n transform: rotate(1turn);\r\n }\r\n}\r\n\r\n.cmp_play .lyric {\r\n text-align: center;\r\n color: #fff;\r\n padding: 3.333vw 4.667vw 0 4.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play .lyric .song_title {\r\n font-size: 2.4vw;\r\n margin-bottom: 1.333vw;\r\n}\r\n\r\n.cmp_play .lyric .lyric_main {\r\n width: 100%;\r\n height: 12vw;\r\n overflow: hidden;\r\n}\r\n\r\n.cmp_play .lyric_cont {\r\n -webkit-transition: -webkit-transform .3s linear 0s;\r\n transition: -webkit-transform .3s linear 0s;\r\n -o-transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s, -webkit-transform .3s linear 0s;\r\n -webkit-transition: transform .3s linear 0s;\r\n}\r\n\r\n.cmp_play .lyric_cont p {\r\n height: 4vw;\r\n line-height: 4vw;\r\n color: #fff;\r\n font-size: 2.133vw;\r\n -webkit-transition: all .5s linear 0s;\r\n -o-transition: all .5s linear 0s;\r\n transition: all .5s linear 0s;\r\n}\r\n\r\n.cmp_play .lyric_cont p.active {\r\n color: #d43c33;\r\n}\r\n\r\n.cmp_play .btns {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n bottom: 1.333vw;\r\n z-index: 6;\r\n display: -ms-flexbox;\r\n display: flex;\r\n padding: 1.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play .btns span {\r\n -ms-flex: 1 1;\r\n flex: 1 1;\r\n height: 5.333vw;\r\n line-height: 5.333vw;\r\n text-align: center;\r\n color: #fff;\r\n font-size: 2.133vw;\r\n border: 1px solid #d43c33;\r\n border-radius: 2.667vw;\r\n}\r\n\r\n.cmp_play .btns .open {\r\n margin-right: 0.667vw;\r\n}\r\n\r\n.cmp_play .btns .download {\r\n margin-left: 0.667vw;\r\n background-color: #d33a31;\r\n}\r\n\r\n.cmp_play .arrow {\r\n position: absolute;\r\n left: 50%;\r\n bottom: 9.333vw;\r\n display: block;\r\n width: 2.267vw;\r\n height: 1.6vw;\r\n margin-left: -1.067vw;\r\n background-repeat: no-repeat;\r\n background-size: 2.267vw auto;\r\n background-image: url(" + __webpack_require__(/*! ./assets/images/arrow.png */ "./src/assets/images/arrow.png") + ");\r\n background-position: 0 0;\r\n}\r\n\r\n.cmp_play .arrow.ani {\r\n -webkit-animation: shining 1.2s steps(1) infinite;\r\n animation: shining 1.2s steps(1) infinite;\r\n}\r\n\r\n@-webkit-keyframes shining {\r\n 0% {\r\n background-position: 0 0\r\n }\r\n\r\n 15% {\r\n background-position: 0 -12px\r\n }\r\n\r\n 30% {\r\n background-position: 0 -24px\r\n }\r\n\r\n 45% {\r\n background-position: 0 -36px\r\n }\r\n\r\n 60% {\r\n background-position: 0 -48px\r\n }\r\n\r\n 75% {\r\n background-position: 0 -60px\r\n }\r\n\r\n 90% {\r\n background-position: 0 -72px\r\n }\r\n\r\n to {\r\n background-position: 0 -84px\r\n }\r\n}\r\n\r\n@keyframes shining {\r\n 0% {\r\n background-position: 0 0\r\n }\r\n\r\n 15% {\r\n background-position: 0 -12px\r\n }\r\n\r\n 30% {\r\n background-position: 0 -24px\r\n }\r\n\r\n 45% {\r\n background-position: 0 -36px\r\n }\r\n\r\n 60% {\r\n background-position: 0 -48px\r\n }\r\n\r\n 75% {\r\n background-position: 0 -60px\r\n }\r\n\r\n 90% {\r\n background-position: 0 -72px\r\n }\r\n\r\n to {\r\n background-position: 0 -84px\r\n }\r\n}\r\n\r\n/* PlayList\r\n=================================================================*/\r\n.cmp_play_list .header {\r\n padding: 4vw 2vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/play_bg.jpg */ "./src/assets/images/play_bg.jpg") + ") no-repeat;\r\n background-size: 500% 1000%;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play_list .hdr_main {\r\n display: -ms-flexbox;\r\n display: flex;\r\n height: 16.8vw;\r\n}\r\n\r\n.cmp_play_list .picture {\r\n position: relative;\r\n width: 16.8vw;\r\n height: 100%;\r\n margin-right: 2.667vw;\r\n}\r\n\r\n.cmp_play_list .picture img {\r\n display: block;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n}\r\n\r\n.cmp_play_list .picture .tag {\r\n position: absolute;\r\n top: 2vw;\r\n left: 0;\r\n z-index: 2;\r\n display: inline-block;\r\n color: #fff;\r\n font-size: 1.333vw;\r\n padding: 0 1.333vw;\r\n border-top-right-radius: 0.667vw;\r\n border-bottom-right-radius: 0.667vw;\r\n background-color: #d43c33;\r\n\r\n}\r\n\r\n.cmp_play_list .picture .num {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 2;\r\n color: #fff;\r\n font-size: 1.333vw;\r\n padding-left: 2.667vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/earp.png */ "./src/assets/images/earp.png") + ") no-repeat;\r\n background-size: 1.6vw;\r\n background-position: 0.667vw center;\r\n}\r\n\r\n.cmp_play_list .info {\r\n min-width: 10%;\r\n -ms-flex: 1 1;\r\n flex: 1 1;\r\n color: #fff;\r\n}\r\n\r\n.cmp_play_list .info .desc {\r\n font-size: 2.133vw;\r\n}\r\n\r\n.cmp_play_list .info .photo {\r\n position: relative;\r\n height: 4vw;\r\n line-height: 4vw;\r\n margin-top: 2.667vw;\r\n white-space: nowrap;\r\n -o-text-overflow: ellipsis;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n}\r\n\r\n.cmp_play_list .info .photo img {\r\n display: block;\r\n width: 4vw;\r\n height: 4vw;\r\n float: left;\r\n margin-right: 0.667vw;\r\n border-radius: 4vw;\r\n}\r\n\r\n.cmp_play_list .info .photo:after {\r\n position: absolute;\r\n top: 2.133vw;\r\n left: 2.667vw;\r\n bottom: 0;\r\n z-index: 2;\r\n display: block;\r\n width: 2vw;\r\n height: 2vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/usericn_2x.png */ "./src/assets/images/usericn_2x.png") + ") no-repeat;\r\n background-size: 10.667vw;\r\n background-position: -5.6vw 0;\r\n}\r\n\r\n.cmp_play_list .texts {\r\n padding: 1.333vw;\r\n color: #666;\r\n}\r\n\r\n.cmp_play_list .tags {\r\n margin-bottom: 1.333vw;\r\n font-size: 1.6vw;\r\n}\r\n\r\n.cmp_play_list .tags i {\r\n display: inline-block;\r\n padding: 1px 0.667vw;\r\n margin-right: 1.333vw;\r\n border: 1px solid #eaeaea;\r\n border-radius: 1.333vw;\r\n}\r\n\r\n.cmp_play_list .introduction {\r\n font-size: 1.867vw;\r\n}\r\n\r\n.cmp_play_list .introduction p {\r\n margin-bottom: 2.667vw;\r\n}", ""]);
  1396. // exports
  1397. /***/ }),
  1398. /***/ "./node_modules/css-loader/lib/css-base.js":
  1399. /*!*************************************************!*\
  1400. !*** ./node_modules/css-loader/lib/css-base.js ***!
  1401. \*************************************************/
  1402. /*! dynamic exports provided */
  1403. /*! all exports used */
  1404. /***/ (function(module, exports) {
  1405. /*
  1406. MIT License http://www.opensource.org/licenses/mit-license.php
  1407. Author Tobias Koppers @sokra
  1408. */
  1409. // css base code, injected by the css-loader
  1410. module.exports = function(useSourceMap) {
  1411. var list = [];
  1412. // return the list of modules as css string
  1413. list.toString = function toString() {
  1414. return this.map(function (item) {
  1415. var content = cssWithMappingToString(item, useSourceMap);
  1416. if(item[2]) {
  1417. return "@media " + item[2] + "{" + content + "}";
  1418. } else {
  1419. return content;
  1420. }
  1421. }).join("");
  1422. };
  1423. // import a list of modules into the list
  1424. list.i = function(modules, mediaQuery) {
  1425. if(typeof modules === "string")
  1426. modules = [[null, modules, ""]];
  1427. var alreadyImportedModules = {};
  1428. for(var i = 0; i < this.length; i++) {
  1429. var id = this[i][0];
  1430. if(typeof id === "number")
  1431. alreadyImportedModules[id] = true;
  1432. }
  1433. for(i = 0; i < modules.length; i++) {
  1434. var item = modules[i];
  1435. // skip already imported module
  1436. // this implementation is not 100% perfect for weird media query combinations
  1437. // when a module is imported multiple times with different media queries.
  1438. // I hope this will never occur (Hey this way we have smaller bundles)
  1439. if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
  1440. if(mediaQuery && !item[2]) {
  1441. item[2] = mediaQuery;
  1442. } else if(mediaQuery) {
  1443. item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
  1444. }
  1445. list.push(item);
  1446. }
  1447. }
  1448. };
  1449. return list;
  1450. };
  1451. function cssWithMappingToString(item, useSourceMap) {
  1452. var content = item[1] || '';
  1453. var cssMapping = item[3];
  1454. if (!cssMapping) {
  1455. return content;
  1456. }
  1457. if (useSourceMap && typeof btoa === 'function') {
  1458. var sourceMapping = toComment(cssMapping);
  1459. var sourceURLs = cssMapping.sources.map(function (source) {
  1460. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
  1461. });
  1462. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  1463. }
  1464. return [content].join('\n');
  1465. }
  1466. // Adapted from convert-source-map (MIT)
  1467. function toComment(sourceMap) {
  1468. // eslint-disable-next-line no-undef
  1469. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  1470. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  1471. return '/*# ' + data + ' */';
  1472. }
  1473. /***/ }),
  1474. /***/ "./node_modules/debug/src/browser.js":
  1475. /*!*******************************************!*\
  1476. !*** ./node_modules/debug/src/browser.js ***!
  1477. \*******************************************/
  1478. /*! dynamic exports provided */
  1479. /*! all exports used */
  1480. /***/ (function(module, exports, __webpack_require__) {
  1481. /* WEBPACK VAR INJECTION */(function(process) {/**
  1482. * This is the web browser implementation of `debug()`.
  1483. *
  1484. * Expose `debug()` as the module.
  1485. */
  1486. exports = module.exports = __webpack_require__(/*! ./debug */ "./node_modules/debug/src/debug.js");
  1487. exports.log = log;
  1488. exports.formatArgs = formatArgs;
  1489. exports.save = save;
  1490. exports.load = load;
  1491. exports.useColors = useColors;
  1492. exports.storage = 'undefined' != typeof chrome
  1493. && 'undefined' != typeof chrome.storage
  1494. ? chrome.storage.local
  1495. : localstorage();
  1496. /**
  1497. * Colors.
  1498. */
  1499. exports.colors = [
  1500. 'lightseagreen',
  1501. 'forestgreen',
  1502. 'goldenrod',
  1503. 'dodgerblue',
  1504. 'darkorchid',
  1505. 'crimson'
  1506. ];
  1507. /**
  1508. * Currently only WebKit-based Web Inspectors, Firefox >= v31,
  1509. * and the Firebug extension (any Firefox version) are known
  1510. * to support "%c" CSS customizations.
  1511. *
  1512. * TODO: add a `localStorage` variable to explicitly enable/disable colors
  1513. */
  1514. function useColors() {
  1515. // NB: In an Electron preload script, document will be defined but not fully
  1516. // initialized. Since we know we're in Chrome, we'll just detect this case
  1517. // explicitly
  1518. if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
  1519. return true;
  1520. }
  1521. // is webkit? http://stackoverflow.com/a/16459606/376773
  1522. // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
  1523. return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
  1524. // is firebug? http://stackoverflow.com/a/398120/376773
  1525. (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
  1526. // is firefox >= v31?
  1527. // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
  1528. (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
  1529. // double check webkit in userAgent just in case we are in a worker
  1530. (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
  1531. }
  1532. /**
  1533. * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
  1534. */
  1535. exports.formatters.j = function(v) {
  1536. try {
  1537. return JSON.stringify(v);
  1538. } catch (err) {
  1539. return '[UnexpectedJSONParseError]: ' + err.message;
  1540. }
  1541. };
  1542. /**
  1543. * Colorize log arguments if enabled.
  1544. *
  1545. * @api public
  1546. */
  1547. function formatArgs(args) {
  1548. var useColors = this.useColors;
  1549. args[0] = (useColors ? '%c' : '')
  1550. + this.namespace
  1551. + (useColors ? ' %c' : ' ')
  1552. + args[0]
  1553. + (useColors ? '%c ' : ' ')
  1554. + '+' + exports.humanize(this.diff);
  1555. if (!useColors) return;
  1556. var c = 'color: ' + this.color;
  1557. args.splice(1, 0, c, 'color: inherit')
  1558. // the final "%c" is somewhat tricky, because there could be other
  1559. // arguments passed either before or after the %c, so we need to
  1560. // figure out the correct index to insert the CSS into
  1561. var index = 0;
  1562. var lastC = 0;
  1563. args[0].replace(/%[a-zA-Z%]/g, function(match) {
  1564. if ('%%' === match) return;
  1565. index++;
  1566. if ('%c' === match) {
  1567. // we only are interested in the *last* %c
  1568. // (the user may have provided their own)
  1569. lastC = index;
  1570. }
  1571. });
  1572. args.splice(lastC, 0, c);
  1573. }
  1574. /**
  1575. * Invokes `console.log()` when available.
  1576. * No-op when `console.log` is not a "function".
  1577. *
  1578. * @api public
  1579. */
  1580. function log() {
  1581. // this hackery is required for IE8/9, where
  1582. // the `console.log` function doesn't have 'apply'
  1583. return 'object' === typeof console
  1584. && console.log
  1585. && Function.prototype.apply.call(console.log, console, arguments);
  1586. }
  1587. /**
  1588. * Save `namespaces`.
  1589. *
  1590. * @param {String} namespaces
  1591. * @api private
  1592. */
  1593. function save(namespaces) {
  1594. try {
  1595. if (null == namespaces) {
  1596. exports.storage.removeItem('debug');
  1597. } else {
  1598. exports.storage.debug = namespaces;
  1599. }
  1600. } catch(e) {}
  1601. }
  1602. /**
  1603. * Load `namespaces`.
  1604. *
  1605. * @return {String} returns the previously persisted debug modes
  1606. * @api private
  1607. */
  1608. function load() {
  1609. var r;
  1610. try {
  1611. r = exports.storage.debug;
  1612. } catch(e) {}
  1613. // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
  1614. if (!r && typeof process !== 'undefined' && 'env' in process) {
  1615. r = Object({"NODE_ENV":"development","PUBLIC_URL":""}).DEBUG;
  1616. }
  1617. return r;
  1618. }
  1619. /**
  1620. * Enable namespaces listed in `localStorage.debug` initially.
  1621. */
  1622. exports.enable(load());
  1623. /**
  1624. * Localstorage attempts to return the localstorage.
  1625. *
  1626. * This is necessary because safari throws
  1627. * when a user disables cookies/localstorage
  1628. * and you attempt to access it.
  1629. *
  1630. * @return {LocalStorage}
  1631. * @api private
  1632. */
  1633. function localstorage() {
  1634. try {
  1635. return window.localStorage;
  1636. } catch (e) {}
  1637. }
  1638. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
  1639. /***/ }),
  1640. /***/ "./node_modules/debug/src/debug.js":
  1641. /*!*****************************************!*\
  1642. !*** ./node_modules/debug/src/debug.js ***!
  1643. \*****************************************/
  1644. /*! dynamic exports provided */
  1645. /*! all exports used */
  1646. /***/ (function(module, exports, __webpack_require__) {
  1647. /**
  1648. * This is the common logic for both the Node.js and web browser
  1649. * implementations of `debug()`.
  1650. *
  1651. * Expose `debug()` as the module.
  1652. */
  1653. exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
  1654. exports.coerce = coerce;
  1655. exports.disable = disable;
  1656. exports.enable = enable;
  1657. exports.enabled = enabled;
  1658. exports.humanize = __webpack_require__(/*! ms */ "./node_modules/ms/index.js");
  1659. /**
  1660. * The currently active debug mode names, and names to skip.
  1661. */
  1662. exports.names = [];
  1663. exports.skips = [];
  1664. /**
  1665. * Map of special "%n" handling functions, for the debug "format" argument.
  1666. *
  1667. * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
  1668. */
  1669. exports.formatters = {};
  1670. /**
  1671. * Previous log timestamp.
  1672. */
  1673. var prevTime;
  1674. /**
  1675. * Select a color.
  1676. * @param {String} namespace
  1677. * @return {Number}
  1678. * @api private
  1679. */
  1680. function selectColor(namespace) {
  1681. var hash = 0, i;
  1682. for (i in namespace) {
  1683. hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
  1684. hash |= 0; // Convert to 32bit integer
  1685. }
  1686. return exports.colors[Math.abs(hash) % exports.colors.length];
  1687. }
  1688. /**
  1689. * Create a debugger with the given `namespace`.
  1690. *
  1691. * @param {String} namespace
  1692. * @return {Function}
  1693. * @api public
  1694. */
  1695. function createDebug(namespace) {
  1696. function debug() {
  1697. // disabled?
  1698. if (!debug.enabled) return;
  1699. var self = debug;
  1700. // set `diff` timestamp
  1701. var curr = +new Date();
  1702. var ms = curr - (prevTime || curr);
  1703. self.diff = ms;
  1704. self.prev = prevTime;
  1705. self.curr = curr;
  1706. prevTime = curr;
  1707. // turn the `arguments` into a proper Array
  1708. var args = new Array(arguments.length);
  1709. for (var i = 0; i < args.length; i++) {
  1710. args[i] = arguments[i];
  1711. }
  1712. args[0] = exports.coerce(args[0]);
  1713. if ('string' !== typeof args[0]) {
  1714. // anything else let's inspect with %O
  1715. args.unshift('%O');
  1716. }
  1717. // apply any `formatters` transformations
  1718. var index = 0;
  1719. args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
  1720. // if we encounter an escaped % then don't increase the array index
  1721. if (match === '%%') return match;
  1722. index++;
  1723. var formatter = exports.formatters[format];
  1724. if ('function' === typeof formatter) {
  1725. var val = args[index];
  1726. match = formatter.call(self, val);
  1727. // now we need to remove `args[index]` since it's inlined in the `format`
  1728. args.splice(index, 1);
  1729. index--;
  1730. }
  1731. return match;
  1732. });
  1733. // apply env-specific formatting (colors, etc.)
  1734. exports.formatArgs.call(self, args);
  1735. var logFn = debug.log || exports.log || console.log.bind(console);
  1736. logFn.apply(self, args);
  1737. }
  1738. debug.namespace = namespace;
  1739. debug.enabled = exports.enabled(namespace);
  1740. debug.useColors = exports.useColors();
  1741. debug.color = selectColor(namespace);
  1742. // env-specific initialization logic for debug instances
  1743. if ('function' === typeof exports.init) {
  1744. exports.init(debug);
  1745. }
  1746. return debug;
  1747. }
  1748. /**
  1749. * Enables a debug mode by namespaces. This can include modes
  1750. * separated by a colon and wildcards.
  1751. *
  1752. * @param {String} namespaces
  1753. * @api public
  1754. */
  1755. function enable(namespaces) {
  1756. exports.save(namespaces);
  1757. exports.names = [];
  1758. exports.skips = [];
  1759. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  1760. var len = split.length;
  1761. for (var i = 0; i < len; i++) {
  1762. if (!split[i]) continue; // ignore empty strings
  1763. namespaces = split[i].replace(/\*/g, '.*?');
  1764. if (namespaces[0] === '-') {
  1765. exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  1766. } else {
  1767. exports.names.push(new RegExp('^' + namespaces + '$'));
  1768. }
  1769. }
  1770. }
  1771. /**
  1772. * Disable debug output.
  1773. *
  1774. * @api public
  1775. */
  1776. function disable() {
  1777. exports.enable('');
  1778. }
  1779. /**
  1780. * Returns true if the given mode name is enabled, false otherwise.
  1781. *
  1782. * @param {String} name
  1783. * @return {Boolean}
  1784. * @api public
  1785. */
  1786. function enabled(name) {
  1787. var i, len;
  1788. for (i = 0, len = exports.skips.length; i < len; i++) {
  1789. if (exports.skips[i].test(name)) {
  1790. return false;
  1791. }
  1792. }
  1793. for (i = 0, len = exports.names.length; i < len; i++) {
  1794. if (exports.names[i].test(name)) {
  1795. return true;
  1796. }
  1797. }
  1798. return false;
  1799. }
  1800. /**
  1801. * Coerce `val`.
  1802. *
  1803. * @param {Mixed} val
  1804. * @return {Mixed}
  1805. * @api private
  1806. */
  1807. function coerce(val) {
  1808. if (val instanceof Error) return val.stack || val.message;
  1809. return val;
  1810. }
  1811. /***/ }),
  1812. /***/ "./node_modules/escape-string-regexp/index.js":
  1813. /*!****************************************************!*\
  1814. !*** ./node_modules/escape-string-regexp/index.js ***!
  1815. \****************************************************/
  1816. /*! dynamic exports provided */
  1817. /*! all exports used */
  1818. /***/ (function(module, exports, __webpack_require__) {
  1819. "use strict";
  1820. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  1821. module.exports = function (str) {
  1822. if (typeof str !== 'string') {
  1823. throw new TypeError('Expected a string');
  1824. }
  1825. return str.replace(matchOperatorsRe, '\\$&');
  1826. };
  1827. /***/ }),
  1828. /***/ "./node_modules/has-ansi/index.js":
  1829. /*!****************************************!*\
  1830. !*** ./node_modules/has-ansi/index.js ***!
  1831. \****************************************/
  1832. /*! dynamic exports provided */
  1833. /*! all exports used */
  1834. /***/ (function(module, exports, __webpack_require__) {
  1835. "use strict";
  1836. var ansiRegex = __webpack_require__(/*! ansi-regex */ "./node_modules/ansi-regex/index.js");
  1837. var re = new RegExp(ansiRegex().source); // remove the `g` flag
  1838. module.exports = re.test.bind(re);
  1839. /***/ }),
  1840. /***/ "./node_modules/history/esm/history.js":
  1841. /*!*********************************************!*\
  1842. !*** ./node_modules/history/esm/history.js ***!
  1843. \*********************************************/
  1844. /*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */
  1845. /*! exports used: createBrowserHistory, createHashHistory, createLocation, createMemoryHistory, createPath, locationsAreEqual */
  1846. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1847. "use strict";
  1848. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createBrowserHistory; });
  1849. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createHashHistory; });
  1850. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return createMemoryHistory; });
  1851. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createLocation; });
  1852. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return locationsAreEqual; });
  1853. /* unused harmony export parsePath */
  1854. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return createPath; });
  1855. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
  1856. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_resolve_pathname__ = __webpack_require__(/*! resolve-pathname */ "./node_modules/resolve-pathname/esm/resolve-pathname.js");
  1857. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_value_equal__ = __webpack_require__(/*! value-equal */ "./node_modules/value-equal/esm/value-equal.js");
  1858. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_tiny_warning__ = __webpack_require__(/*! tiny-warning */ "./node_modules/tiny-warning/dist/tiny-warning.esm.js");
  1859. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_tiny_invariant__ = __webpack_require__(/*! tiny-invariant */ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js");
  1860. function addLeadingSlash(path) {
  1861. return path.charAt(0) === '/' ? path : '/' + path;
  1862. }
  1863. function stripLeadingSlash(path) {
  1864. return path.charAt(0) === '/' ? path.substr(1) : path;
  1865. }
  1866. function hasBasename(path, prefix) {
  1867. return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
  1868. }
  1869. function stripBasename(path, prefix) {
  1870. return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
  1871. }
  1872. function stripTrailingSlash(path) {
  1873. return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
  1874. }
  1875. function parsePath(path) {
  1876. var pathname = path || '/';
  1877. var search = '';
  1878. var hash = '';
  1879. var hashIndex = pathname.indexOf('#');
  1880. if (hashIndex !== -1) {
  1881. hash = pathname.substr(hashIndex);
  1882. pathname = pathname.substr(0, hashIndex);
  1883. }
  1884. var searchIndex = pathname.indexOf('?');
  1885. if (searchIndex !== -1) {
  1886. search = pathname.substr(searchIndex);
  1887. pathname = pathname.substr(0, searchIndex);
  1888. }
  1889. return {
  1890. pathname: pathname,
  1891. search: search === '?' ? '' : search,
  1892. hash: hash === '#' ? '' : hash
  1893. };
  1894. }
  1895. function createPath(location) {
  1896. var pathname = location.pathname,
  1897. search = location.search,
  1898. hash = location.hash;
  1899. var path = pathname || '/';
  1900. if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
  1901. if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
  1902. return path;
  1903. }
  1904. function createLocation(path, state, key, currentLocation) {
  1905. var location;
  1906. if (typeof path === 'string') {
  1907. // Two-arg form: push(path, state)
  1908. location = parsePath(path);
  1909. location.state = state;
  1910. } else {
  1911. // One-arg form: push(location)
  1912. location = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, path);
  1913. if (location.pathname === undefined) location.pathname = '';
  1914. if (location.search) {
  1915. if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
  1916. } else {
  1917. location.search = '';
  1918. }
  1919. if (location.hash) {
  1920. if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
  1921. } else {
  1922. location.hash = '';
  1923. }
  1924. if (state !== undefined && location.state === undefined) location.state = state;
  1925. }
  1926. try {
  1927. location.pathname = decodeURI(location.pathname);
  1928. } catch (e) {
  1929. if (e instanceof URIError) {
  1930. throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
  1931. } else {
  1932. throw e;
  1933. }
  1934. }
  1935. if (key) location.key = key;
  1936. if (currentLocation) {
  1937. // Resolve incomplete/relative pathname relative to current location.
  1938. if (!location.pathname) {
  1939. location.pathname = currentLocation.pathname;
  1940. } else if (location.pathname.charAt(0) !== '/') {
  1941. location.pathname = Object(__WEBPACK_IMPORTED_MODULE_1_resolve_pathname__["a" /* default */])(location.pathname, currentLocation.pathname);
  1942. }
  1943. } else {
  1944. // When there is no prior location and pathname is empty, set it to /
  1945. if (!location.pathname) {
  1946. location.pathname = '/';
  1947. }
  1948. }
  1949. return location;
  1950. }
  1951. function locationsAreEqual(a, b) {
  1952. return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_2_value_equal__["a" /* default */])(a.state, b.state);
  1953. }
  1954. function createTransitionManager() {
  1955. var prompt = null;
  1956. function setPrompt(nextPrompt) {
  1957. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(prompt == null, 'A history supports only one prompt at a time') : void 0;
  1958. prompt = nextPrompt;
  1959. return function () {
  1960. if (prompt === nextPrompt) prompt = null;
  1961. };
  1962. }
  1963. function confirmTransitionTo(location, action, getUserConfirmation, callback) {
  1964. // TODO: If another transition starts while we're still confirming
  1965. // the previous one, we may end up in a weird state. Figure out the
  1966. // best way to handle this.
  1967. if (prompt != null) {
  1968. var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
  1969. if (typeof result === 'string') {
  1970. if (typeof getUserConfirmation === 'function') {
  1971. getUserConfirmation(result, callback);
  1972. } else {
  1973. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;
  1974. callback(true);
  1975. }
  1976. } else {
  1977. // Return false from a transition hook to cancel the transition.
  1978. callback(result !== false);
  1979. }
  1980. } else {
  1981. callback(true);
  1982. }
  1983. }
  1984. var listeners = [];
  1985. function appendListener(fn) {
  1986. var isActive = true;
  1987. function listener() {
  1988. if (isActive) fn.apply(void 0, arguments);
  1989. }
  1990. listeners.push(listener);
  1991. return function () {
  1992. isActive = false;
  1993. listeners = listeners.filter(function (item) {
  1994. return item !== listener;
  1995. });
  1996. };
  1997. }
  1998. function notifyListeners() {
  1999. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2000. args[_key] = arguments[_key];
  2001. }
  2002. listeners.forEach(function (listener) {
  2003. return listener.apply(void 0, args);
  2004. });
  2005. }
  2006. return {
  2007. setPrompt: setPrompt,
  2008. confirmTransitionTo: confirmTransitionTo,
  2009. appendListener: appendListener,
  2010. notifyListeners: notifyListeners
  2011. };
  2012. }
  2013. var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
  2014. function getConfirmation(message, callback) {
  2015. callback(window.confirm(message)); // eslint-disable-line no-alert
  2016. }
  2017. /**
  2018. * Returns true if the HTML5 history API is supported. Taken from Modernizr.
  2019. *
  2020. * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
  2021. * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
  2022. * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
  2023. */
  2024. function supportsHistory() {
  2025. var ua = window.navigator.userAgent;
  2026. if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
  2027. return window.history && 'pushState' in window.history;
  2028. }
  2029. /**
  2030. * Returns true if browser fires popstate on hash change.
  2031. * IE10 and IE11 do not.
  2032. */
  2033. function supportsPopStateOnHashChange() {
  2034. return window.navigator.userAgent.indexOf('Trident') === -1;
  2035. }
  2036. /**
  2037. * Returns false if using go(n) with hash history causes a full page reload.
  2038. */
  2039. function supportsGoWithoutReloadUsingHash() {
  2040. return window.navigator.userAgent.indexOf('Firefox') === -1;
  2041. }
  2042. /**
  2043. * Returns true if a given popstate event is an extraneous WebKit event.
  2044. * Accounts for the fact that Chrome on iOS fires real popstate events
  2045. * containing undefined state when pressing the back button.
  2046. */
  2047. function isExtraneousPopstateEvent(event) {
  2048. return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
  2049. }
  2050. var PopStateEvent = 'popstate';
  2051. var HashChangeEvent = 'hashchange';
  2052. function getHistoryState() {
  2053. try {
  2054. return window.history.state || {};
  2055. } catch (e) {
  2056. // IE 11 sometimes throws when accessing window.history.state
  2057. // See https://github.com/ReactTraining/history/pull/289
  2058. return {};
  2059. }
  2060. }
  2061. /**
  2062. * Creates a history object that uses the HTML5 history API including
  2063. * pushState, replaceState, and the popstate event.
  2064. */
  2065. function createBrowserHistory(props) {
  2066. if (props === void 0) {
  2067. props = {};
  2068. }
  2069. !canUseDOM ? true ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Browser history needs a DOM') : invariant(false) : void 0;
  2070. var globalHistory = window.history;
  2071. var canUseHistory = supportsHistory();
  2072. var needsHashChangeListener = !supportsPopStateOnHashChange();
  2073. var _props = props,
  2074. _props$forceRefresh = _props.forceRefresh,
  2075. forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
  2076. _props$getUserConfirm = _props.getUserConfirmation,
  2077. getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
  2078. _props$keyLength = _props.keyLength,
  2079. keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
  2080. var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
  2081. function getDOMLocation(historyState) {
  2082. var _ref = historyState || {},
  2083. key = _ref.key,
  2084. state = _ref.state;
  2085. var _window$location = window.location,
  2086. pathname = _window$location.pathname,
  2087. search = _window$location.search,
  2088. hash = _window$location.hash;
  2089. var path = pathname + search + hash;
  2090. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
  2091. if (basename) path = stripBasename(path, basename);
  2092. return createLocation(path, state, key);
  2093. }
  2094. function createKey() {
  2095. return Math.random().toString(36).substr(2, keyLength);
  2096. }
  2097. var transitionManager = createTransitionManager();
  2098. function setState(nextState) {
  2099. Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
  2100. history.length = globalHistory.length;
  2101. transitionManager.notifyListeners(history.location, history.action);
  2102. }
  2103. function handlePopState(event) {
  2104. // Ignore extraneous popstate events in WebKit.
  2105. if (isExtraneousPopstateEvent(event)) return;
  2106. handlePop(getDOMLocation(event.state));
  2107. }
  2108. function handleHashChange() {
  2109. handlePop(getDOMLocation(getHistoryState()));
  2110. }
  2111. var forceNextPop = false;
  2112. function handlePop(location) {
  2113. if (forceNextPop) {
  2114. forceNextPop = false;
  2115. setState();
  2116. } else {
  2117. var action = 'POP';
  2118. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2119. if (ok) {
  2120. setState({
  2121. action: action,
  2122. location: location
  2123. });
  2124. } else {
  2125. revertPop(location);
  2126. }
  2127. });
  2128. }
  2129. }
  2130. function revertPop(fromLocation) {
  2131. var toLocation = history.location; // TODO: We could probably make this more reliable by
  2132. // keeping a list of keys we've seen in sessionStorage.
  2133. // Instead, we just default to 0 for keys we don't know.
  2134. var toIndex = allKeys.indexOf(toLocation.key);
  2135. if (toIndex === -1) toIndex = 0;
  2136. var fromIndex = allKeys.indexOf(fromLocation.key);
  2137. if (fromIndex === -1) fromIndex = 0;
  2138. var delta = toIndex - fromIndex;
  2139. if (delta) {
  2140. forceNextPop = true;
  2141. go(delta);
  2142. }
  2143. }
  2144. var initialLocation = getDOMLocation(getHistoryState());
  2145. var allKeys = [initialLocation.key]; // Public interface
  2146. function createHref(location) {
  2147. return basename + createPath(location);
  2148. }
  2149. function push(path, state) {
  2150. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
  2151. var action = 'PUSH';
  2152. var location = createLocation(path, state, createKey(), history.location);
  2153. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2154. if (!ok) return;
  2155. var href = createHref(location);
  2156. var key = location.key,
  2157. state = location.state;
  2158. if (canUseHistory) {
  2159. globalHistory.pushState({
  2160. key: key,
  2161. state: state
  2162. }, null, href);
  2163. if (forceRefresh) {
  2164. window.location.href = href;
  2165. } else {
  2166. var prevIndex = allKeys.indexOf(history.location.key);
  2167. var nextKeys = allKeys.slice(0, prevIndex + 1);
  2168. nextKeys.push(location.key);
  2169. allKeys = nextKeys;
  2170. setState({
  2171. action: action,
  2172. location: location
  2173. });
  2174. }
  2175. } else {
  2176. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;
  2177. window.location.href = href;
  2178. }
  2179. });
  2180. }
  2181. function replace(path, state) {
  2182. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
  2183. var action = 'REPLACE';
  2184. var location = createLocation(path, state, createKey(), history.location);
  2185. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2186. if (!ok) return;
  2187. var href = createHref(location);
  2188. var key = location.key,
  2189. state = location.state;
  2190. if (canUseHistory) {
  2191. globalHistory.replaceState({
  2192. key: key,
  2193. state: state
  2194. }, null, href);
  2195. if (forceRefresh) {
  2196. window.location.replace(href);
  2197. } else {
  2198. var prevIndex = allKeys.indexOf(history.location.key);
  2199. if (prevIndex !== -1) allKeys[prevIndex] = location.key;
  2200. setState({
  2201. action: action,
  2202. location: location
  2203. });
  2204. }
  2205. } else {
  2206. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;
  2207. window.location.replace(href);
  2208. }
  2209. });
  2210. }
  2211. function go(n) {
  2212. globalHistory.go(n);
  2213. }
  2214. function goBack() {
  2215. go(-1);
  2216. }
  2217. function goForward() {
  2218. go(1);
  2219. }
  2220. var listenerCount = 0;
  2221. function checkDOMListeners(delta) {
  2222. listenerCount += delta;
  2223. if (listenerCount === 1 && delta === 1) {
  2224. window.addEventListener(PopStateEvent, handlePopState);
  2225. if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
  2226. } else if (listenerCount === 0) {
  2227. window.removeEventListener(PopStateEvent, handlePopState);
  2228. if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
  2229. }
  2230. }
  2231. var isBlocked = false;
  2232. function block(prompt) {
  2233. if (prompt === void 0) {
  2234. prompt = false;
  2235. }
  2236. var unblock = transitionManager.setPrompt(prompt);
  2237. if (!isBlocked) {
  2238. checkDOMListeners(1);
  2239. isBlocked = true;
  2240. }
  2241. return function () {
  2242. if (isBlocked) {
  2243. isBlocked = false;
  2244. checkDOMListeners(-1);
  2245. }
  2246. return unblock();
  2247. };
  2248. }
  2249. function listen(listener) {
  2250. var unlisten = transitionManager.appendListener(listener);
  2251. checkDOMListeners(1);
  2252. return function () {
  2253. checkDOMListeners(-1);
  2254. unlisten();
  2255. };
  2256. }
  2257. var history = {
  2258. length: globalHistory.length,
  2259. action: 'POP',
  2260. location: initialLocation,
  2261. createHref: createHref,
  2262. push: push,
  2263. replace: replace,
  2264. go: go,
  2265. goBack: goBack,
  2266. goForward: goForward,
  2267. block: block,
  2268. listen: listen
  2269. };
  2270. return history;
  2271. }
  2272. var HashChangeEvent$1 = 'hashchange';
  2273. var HashPathCoders = {
  2274. hashbang: {
  2275. encodePath: function encodePath(path) {
  2276. return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
  2277. },
  2278. decodePath: function decodePath(path) {
  2279. return path.charAt(0) === '!' ? path.substr(1) : path;
  2280. }
  2281. },
  2282. noslash: {
  2283. encodePath: stripLeadingSlash,
  2284. decodePath: addLeadingSlash
  2285. },
  2286. slash: {
  2287. encodePath: addLeadingSlash,
  2288. decodePath: addLeadingSlash
  2289. }
  2290. };
  2291. function stripHash(url) {
  2292. var hashIndex = url.indexOf('#');
  2293. return hashIndex === -1 ? url : url.slice(0, hashIndex);
  2294. }
  2295. function getHashPath() {
  2296. // We can't use window.location.hash here because it's not
  2297. // consistent across browsers - Firefox will pre-decode it!
  2298. var href = window.location.href;
  2299. var hashIndex = href.indexOf('#');
  2300. return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
  2301. }
  2302. function pushHashPath(path) {
  2303. window.location.hash = path;
  2304. }
  2305. function replaceHashPath(path) {
  2306. window.location.replace(stripHash(window.location.href) + '#' + path);
  2307. }
  2308. function createHashHistory(props) {
  2309. if (props === void 0) {
  2310. props = {};
  2311. }
  2312. !canUseDOM ? true ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Hash history needs a DOM') : invariant(false) : void 0;
  2313. var globalHistory = window.history;
  2314. var canGoWithoutReload = supportsGoWithoutReloadUsingHash();
  2315. var _props = props,
  2316. _props$getUserConfirm = _props.getUserConfirmation,
  2317. getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
  2318. _props$hashType = _props.hashType,
  2319. hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;
  2320. var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
  2321. var _HashPathCoders$hashT = HashPathCoders[hashType],
  2322. encodePath = _HashPathCoders$hashT.encodePath,
  2323. decodePath = _HashPathCoders$hashT.decodePath;
  2324. function getDOMLocation() {
  2325. var path = decodePath(getHashPath());
  2326. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
  2327. if (basename) path = stripBasename(path, basename);
  2328. return createLocation(path);
  2329. }
  2330. var transitionManager = createTransitionManager();
  2331. function setState(nextState) {
  2332. Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
  2333. history.length = globalHistory.length;
  2334. transitionManager.notifyListeners(history.location, history.action);
  2335. }
  2336. var forceNextPop = false;
  2337. var ignorePath = null;
  2338. function locationsAreEqual$$1(a, b) {
  2339. return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;
  2340. }
  2341. function handleHashChange() {
  2342. var path = getHashPath();
  2343. var encodedPath = encodePath(path);
  2344. if (path !== encodedPath) {
  2345. // Ensure we always have a properly-encoded hash.
  2346. replaceHashPath(encodedPath);
  2347. } else {
  2348. var location = getDOMLocation();
  2349. var prevLocation = history.location;
  2350. if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.
  2351. if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.
  2352. ignorePath = null;
  2353. handlePop(location);
  2354. }
  2355. }
  2356. function handlePop(location) {
  2357. if (forceNextPop) {
  2358. forceNextPop = false;
  2359. setState();
  2360. } else {
  2361. var action = 'POP';
  2362. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2363. if (ok) {
  2364. setState({
  2365. action: action,
  2366. location: location
  2367. });
  2368. } else {
  2369. revertPop(location);
  2370. }
  2371. });
  2372. }
  2373. }
  2374. function revertPop(fromLocation) {
  2375. var toLocation = history.location; // TODO: We could probably make this more reliable by
  2376. // keeping a list of paths we've seen in sessionStorage.
  2377. // Instead, we just default to 0 for paths we don't know.
  2378. var toIndex = allPaths.lastIndexOf(createPath(toLocation));
  2379. if (toIndex === -1) toIndex = 0;
  2380. var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
  2381. if (fromIndex === -1) fromIndex = 0;
  2382. var delta = toIndex - fromIndex;
  2383. if (delta) {
  2384. forceNextPop = true;
  2385. go(delta);
  2386. }
  2387. } // Ensure the hash is encoded properly before doing anything else.
  2388. var path = getHashPath();
  2389. var encodedPath = encodePath(path);
  2390. if (path !== encodedPath) replaceHashPath(encodedPath);
  2391. var initialLocation = getDOMLocation();
  2392. var allPaths = [createPath(initialLocation)]; // Public interface
  2393. function createHref(location) {
  2394. var baseTag = document.querySelector('base');
  2395. var href = '';
  2396. if (baseTag && baseTag.getAttribute('href')) {
  2397. href = stripHash(window.location.href);
  2398. }
  2399. return href + '#' + encodePath(basename + createPath(location));
  2400. }
  2401. function push(path, state) {
  2402. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;
  2403. var action = 'PUSH';
  2404. var location = createLocation(path, undefined, undefined, history.location);
  2405. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2406. if (!ok) return;
  2407. var path = createPath(location);
  2408. var encodedPath = encodePath(basename + path);
  2409. var hashChanged = getHashPath() !== encodedPath;
  2410. if (hashChanged) {
  2411. // We cannot tell if a hashchange was caused by a PUSH, so we'd
  2412. // rather setState here and ignore the hashchange. The caveat here
  2413. // is that other hash histories in the page will consider it a POP.
  2414. ignorePath = path;
  2415. pushHashPath(encodedPath);
  2416. var prevIndex = allPaths.lastIndexOf(createPath(history.location));
  2417. var nextPaths = allPaths.slice(0, prevIndex + 1);
  2418. nextPaths.push(path);
  2419. allPaths = nextPaths;
  2420. setState({
  2421. action: action,
  2422. location: location
  2423. });
  2424. } else {
  2425. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;
  2426. setState();
  2427. }
  2428. });
  2429. }
  2430. function replace(path, state) {
  2431. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;
  2432. var action = 'REPLACE';
  2433. var location = createLocation(path, undefined, undefined, history.location);
  2434. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2435. if (!ok) return;
  2436. var path = createPath(location);
  2437. var encodedPath = encodePath(basename + path);
  2438. var hashChanged = getHashPath() !== encodedPath;
  2439. if (hashChanged) {
  2440. // We cannot tell if a hashchange was caused by a REPLACE, so we'd
  2441. // rather setState here and ignore the hashchange. The caveat here
  2442. // is that other hash histories in the page will consider it a POP.
  2443. ignorePath = path;
  2444. replaceHashPath(encodedPath);
  2445. }
  2446. var prevIndex = allPaths.indexOf(createPath(history.location));
  2447. if (prevIndex !== -1) allPaths[prevIndex] = path;
  2448. setState({
  2449. action: action,
  2450. location: location
  2451. });
  2452. });
  2453. }
  2454. function go(n) {
  2455. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;
  2456. globalHistory.go(n);
  2457. }
  2458. function goBack() {
  2459. go(-1);
  2460. }
  2461. function goForward() {
  2462. go(1);
  2463. }
  2464. var listenerCount = 0;
  2465. function checkDOMListeners(delta) {
  2466. listenerCount += delta;
  2467. if (listenerCount === 1 && delta === 1) {
  2468. window.addEventListener(HashChangeEvent$1, handleHashChange);
  2469. } else if (listenerCount === 0) {
  2470. window.removeEventListener(HashChangeEvent$1, handleHashChange);
  2471. }
  2472. }
  2473. var isBlocked = false;
  2474. function block(prompt) {
  2475. if (prompt === void 0) {
  2476. prompt = false;
  2477. }
  2478. var unblock = transitionManager.setPrompt(prompt);
  2479. if (!isBlocked) {
  2480. checkDOMListeners(1);
  2481. isBlocked = true;
  2482. }
  2483. return function () {
  2484. if (isBlocked) {
  2485. isBlocked = false;
  2486. checkDOMListeners(-1);
  2487. }
  2488. return unblock();
  2489. };
  2490. }
  2491. function listen(listener) {
  2492. var unlisten = transitionManager.appendListener(listener);
  2493. checkDOMListeners(1);
  2494. return function () {
  2495. checkDOMListeners(-1);
  2496. unlisten();
  2497. };
  2498. }
  2499. var history = {
  2500. length: globalHistory.length,
  2501. action: 'POP',
  2502. location: initialLocation,
  2503. createHref: createHref,
  2504. push: push,
  2505. replace: replace,
  2506. go: go,
  2507. goBack: goBack,
  2508. goForward: goForward,
  2509. block: block,
  2510. listen: listen
  2511. };
  2512. return history;
  2513. }
  2514. function clamp(n, lowerBound, upperBound) {
  2515. return Math.min(Math.max(n, lowerBound), upperBound);
  2516. }
  2517. /**
  2518. * Creates a history object that stores locations in memory.
  2519. */
  2520. function createMemoryHistory(props) {
  2521. if (props === void 0) {
  2522. props = {};
  2523. }
  2524. var _props = props,
  2525. getUserConfirmation = _props.getUserConfirmation,
  2526. _props$initialEntries = _props.initialEntries,
  2527. initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,
  2528. _props$initialIndex = _props.initialIndex,
  2529. initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
  2530. _props$keyLength = _props.keyLength,
  2531. keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
  2532. var transitionManager = createTransitionManager();
  2533. function setState(nextState) {
  2534. Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
  2535. history.length = history.entries.length;
  2536. transitionManager.notifyListeners(history.location, history.action);
  2537. }
  2538. function createKey() {
  2539. return Math.random().toString(36).substr(2, keyLength);
  2540. }
  2541. var index = clamp(initialIndex, 0, initialEntries.length - 1);
  2542. var entries = initialEntries.map(function (entry) {
  2543. return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());
  2544. }); // Public interface
  2545. var createHref = createPath;
  2546. function push(path, state) {
  2547. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
  2548. var action = 'PUSH';
  2549. var location = createLocation(path, state, createKey(), history.location);
  2550. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2551. if (!ok) return;
  2552. var prevIndex = history.index;
  2553. var nextIndex = prevIndex + 1;
  2554. var nextEntries = history.entries.slice(0);
  2555. if (nextEntries.length > nextIndex) {
  2556. nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
  2557. } else {
  2558. nextEntries.push(location);
  2559. }
  2560. setState({
  2561. action: action,
  2562. location: location,
  2563. index: nextIndex,
  2564. entries: nextEntries
  2565. });
  2566. });
  2567. }
  2568. function replace(path, state) {
  2569. true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
  2570. var action = 'REPLACE';
  2571. var location = createLocation(path, state, createKey(), history.location);
  2572. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2573. if (!ok) return;
  2574. history.entries[history.index] = location;
  2575. setState({
  2576. action: action,
  2577. location: location
  2578. });
  2579. });
  2580. }
  2581. function go(n) {
  2582. var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
  2583. var action = 'POP';
  2584. var location = history.entries[nextIndex];
  2585. transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
  2586. if (ok) {
  2587. setState({
  2588. action: action,
  2589. location: location,
  2590. index: nextIndex
  2591. });
  2592. } else {
  2593. // Mimic the behavior of DOM histories by
  2594. // causing a render after a cancelled POP.
  2595. setState();
  2596. }
  2597. });
  2598. }
  2599. function goBack() {
  2600. go(-1);
  2601. }
  2602. function goForward() {
  2603. go(1);
  2604. }
  2605. function canGo(n) {
  2606. var nextIndex = history.index + n;
  2607. return nextIndex >= 0 && nextIndex < history.entries.length;
  2608. }
  2609. function block(prompt) {
  2610. if (prompt === void 0) {
  2611. prompt = false;
  2612. }
  2613. return transitionManager.setPrompt(prompt);
  2614. }
  2615. function listen(listener) {
  2616. return transitionManager.appendListener(listener);
  2617. }
  2618. var history = {
  2619. length: entries.length,
  2620. action: 'POP',
  2621. location: entries[index],
  2622. index: index,
  2623. entries: entries,
  2624. createHref: createHref,
  2625. push: push,
  2626. replace: replace,
  2627. go: go,
  2628. goBack: goBack,
  2629. goForward: goForward,
  2630. canGo: canGo,
  2631. block: block,
  2632. listen: listen
  2633. };
  2634. return history;
  2635. }
  2636. /***/ }),
  2637. /***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
  2638. /*!**********************************************************************************!*\
  2639. !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
  2640. \**********************************************************************************/
  2641. /*! dynamic exports provided */
  2642. /*! exports used: default */
  2643. /***/ (function(module, exports, __webpack_require__) {
  2644. "use strict";
  2645. var reactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
  2646. /**
  2647. * Copyright 2015, Yahoo! Inc.
  2648. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  2649. */
  2650. var REACT_STATICS = {
  2651. childContextTypes: true,
  2652. contextType: true,
  2653. contextTypes: true,
  2654. defaultProps: true,
  2655. displayName: true,
  2656. getDefaultProps: true,
  2657. getDerivedStateFromError: true,
  2658. getDerivedStateFromProps: true,
  2659. mixins: true,
  2660. propTypes: true,
  2661. type: true
  2662. };
  2663. var KNOWN_STATICS = {
  2664. name: true,
  2665. length: true,
  2666. prototype: true,
  2667. caller: true,
  2668. callee: true,
  2669. arguments: true,
  2670. arity: true
  2671. };
  2672. var FORWARD_REF_STATICS = {
  2673. '$$typeof': true,
  2674. render: true,
  2675. defaultProps: true,
  2676. displayName: true,
  2677. propTypes: true
  2678. };
  2679. var MEMO_STATICS = {
  2680. '$$typeof': true,
  2681. compare: true,
  2682. defaultProps: true,
  2683. displayName: true,
  2684. propTypes: true,
  2685. type: true
  2686. };
  2687. var TYPE_STATICS = {};
  2688. TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
  2689. TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
  2690. function getStatics(component) {
  2691. // React v16.11 and below
  2692. if (reactIs.isMemo(component)) {
  2693. return MEMO_STATICS;
  2694. } // React v16.12 and above
  2695. return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
  2696. }
  2697. var defineProperty = Object.defineProperty;
  2698. var getOwnPropertyNames = Object.getOwnPropertyNames;
  2699. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  2700. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2701. var getPrototypeOf = Object.getPrototypeOf;
  2702. var objectPrototype = Object.prototype;
  2703. function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
  2704. if (typeof sourceComponent !== 'string') {
  2705. // don't hoist over string (html) components
  2706. if (objectPrototype) {
  2707. var inheritedComponent = getPrototypeOf(sourceComponent);
  2708. if (inheritedComponent && inheritedComponent !== objectPrototype) {
  2709. hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
  2710. }
  2711. }
  2712. var keys = getOwnPropertyNames(sourceComponent);
  2713. if (getOwnPropertySymbols) {
  2714. keys = keys.concat(getOwnPropertySymbols(sourceComponent));
  2715. }
  2716. var targetStatics = getStatics(targetComponent);
  2717. var sourceStatics = getStatics(sourceComponent);
  2718. for (var i = 0; i < keys.length; ++i) {
  2719. var key = keys[i];
  2720. if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
  2721. var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
  2722. try {
  2723. // Avoid failures from read-only properties
  2724. defineProperty(targetComponent, key, descriptor);
  2725. } catch (e) {}
  2726. }
  2727. }
  2728. }
  2729. return targetComponent;
  2730. }
  2731. module.exports = hoistNonReactStatics;
  2732. /***/ }),
  2733. /***/ "./node_modules/inherits/inherits_browser.js":
  2734. /*!***************************************************!*\
  2735. !*** ./node_modules/inherits/inherits_browser.js ***!
  2736. \***************************************************/
  2737. /*! dynamic exports provided */
  2738. /*! all exports used */
  2739. /***/ (function(module, exports) {
  2740. if (typeof Object.create === 'function') {
  2741. // implementation from standard node.js 'util' module
  2742. module.exports = function inherits(ctor, superCtor) {
  2743. if (superCtor) {
  2744. ctor.super_ = superCtor
  2745. ctor.prototype = Object.create(superCtor.prototype, {
  2746. constructor: {
  2747. value: ctor,
  2748. enumerable: false,
  2749. writable: true,
  2750. configurable: true
  2751. }
  2752. })
  2753. }
  2754. };
  2755. } else {
  2756. // old school shim for old browsers
  2757. module.exports = function inherits(ctor, superCtor) {
  2758. if (superCtor) {
  2759. ctor.super_ = superCtor
  2760. var TempCtor = function () {}
  2761. TempCtor.prototype = superCtor.prototype
  2762. ctor.prototype = new TempCtor()
  2763. ctor.prototype.constructor = ctor
  2764. }
  2765. }
  2766. }
  2767. /***/ }),
  2768. /***/ "./node_modules/invariant/browser.js":
  2769. /*!*******************************************!*\
  2770. !*** ./node_modules/invariant/browser.js ***!
  2771. \*******************************************/
  2772. /*! dynamic exports provided */
  2773. /*! exports used: default */
  2774. /***/ (function(module, exports, __webpack_require__) {
  2775. "use strict";
  2776. /**
  2777. * Copyright (c) 2013-present, Facebook, Inc.
  2778. *
  2779. * This source code is licensed under the MIT license found in the
  2780. * LICENSE file in the root directory of this source tree.
  2781. */
  2782. /**
  2783. * Use invariant() to assert state which your program assumes to be true.
  2784. *
  2785. * Provide sprintf-style format (only %s is supported) and arguments
  2786. * to provide information about what broke and what you were
  2787. * expecting.
  2788. *
  2789. * The invariant message will be stripped in production, but the invariant
  2790. * will remain to ensure logic does not differ in production.
  2791. */
  2792. var invariant = function(condition, format, a, b, c, d, e, f) {
  2793. if (true) {
  2794. if (format === undefined) {
  2795. throw new Error('invariant requires an error message argument');
  2796. }
  2797. }
  2798. if (!condition) {
  2799. var error;
  2800. if (format === undefined) {
  2801. error = new Error(
  2802. 'Minified exception occurred; use the non-minified dev environment ' +
  2803. 'for the full error message and additional helpful warnings.'
  2804. );
  2805. } else {
  2806. var args = [a, b, c, d, e, f];
  2807. var argIndex = 0;
  2808. error = new Error(
  2809. format.replace(/%s/g, function() { return args[argIndex++]; })
  2810. );
  2811. error.name = 'Invariant Violation';
  2812. }
  2813. error.framesToPop = 1; // we don't care about invariant's own frame
  2814. throw error;
  2815. }
  2816. };
  2817. module.exports = invariant;
  2818. /***/ }),
  2819. /***/ "./node_modules/isarray/index.js":
  2820. /*!***************************************!*\
  2821. !*** ./node_modules/isarray/index.js ***!
  2822. \***************************************/
  2823. /*! dynamic exports provided */
  2824. /*! all exports used */
  2825. /***/ (function(module, exports) {
  2826. module.exports = Array.isArray || function (arr) {
  2827. return Object.prototype.toString.call(arr) == '[object Array]';
  2828. };
  2829. /***/ }),
  2830. /***/ "./node_modules/json3/lib/json3.js":
  2831. /*!*****************************************!*\
  2832. !*** ./node_modules/json3/lib/json3.js ***!
  2833. \*****************************************/
  2834. /*! dynamic exports provided */
  2835. /*! all exports used */
  2836. /***/ (function(module, exports, __webpack_require__) {
  2837. /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! JSON v3.3.2 | https://bestiejs.github.io/json3 | Copyright 2012-2015, Kit Cambridge, Benjamin Tan | http://kit.mit-license.org */
  2838. ;(function () {
  2839. // Detect the `define` function exposed by asynchronous module loaders. The
  2840. // strict `define` check is necessary for compatibility with `r.js`.
  2841. var isLoader = "function" === "function" && __webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js");
  2842. // A set of types used to distinguish objects from primitives.
  2843. var objectTypes = {
  2844. "function": true,
  2845. "object": true
  2846. };
  2847. // Detect the `exports` object exposed by CommonJS implementations.
  2848. var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
  2849. // Use the `global` object exposed by Node (including Browserify via
  2850. // `insert-module-globals`), Narwhal, and Ringo as the default context,
  2851. // and the `window` object in browsers. Rhino exports a `global` function
  2852. // instead.
  2853. var root = objectTypes[typeof window] && window || this,
  2854. freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == "object" && global;
  2855. if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
  2856. root = freeGlobal;
  2857. }
  2858. // Public: Initializes JSON 3 using the given `context` object, attaching the
  2859. // `stringify` and `parse` functions to the specified `exports` object.
  2860. function runInContext(context, exports) {
  2861. context || (context = root.Object());
  2862. exports || (exports = root.Object());
  2863. // Native constructor aliases.
  2864. var Number = context.Number || root.Number,
  2865. String = context.String || root.String,
  2866. Object = context.Object || root.Object,
  2867. Date = context.Date || root.Date,
  2868. SyntaxError = context.SyntaxError || root.SyntaxError,
  2869. TypeError = context.TypeError || root.TypeError,
  2870. Math = context.Math || root.Math,
  2871. nativeJSON = context.JSON || root.JSON;
  2872. // Delegate to the native `stringify` and `parse` implementations.
  2873. if (typeof nativeJSON == "object" && nativeJSON) {
  2874. exports.stringify = nativeJSON.stringify;
  2875. exports.parse = nativeJSON.parse;
  2876. }
  2877. // Convenience aliases.
  2878. var objectProto = Object.prototype,
  2879. getClass = objectProto.toString,
  2880. isProperty = objectProto.hasOwnProperty,
  2881. undefined;
  2882. // Internal: Contains `try...catch` logic used by other functions.
  2883. // This prevents other functions from being deoptimized.
  2884. function attempt(func, errorFunc) {
  2885. try {
  2886. func();
  2887. } catch (exception) {
  2888. if (errorFunc) {
  2889. errorFunc();
  2890. }
  2891. }
  2892. }
  2893. // Test the `Date#getUTC*` methods. Based on work by @Yaffle.
  2894. var isExtended = new Date(-3509827334573292);
  2895. attempt(function () {
  2896. // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical
  2897. // results for certain dates in Opera >= 10.53.
  2898. isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 &&
  2899. isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;
  2900. });
  2901. // Internal: Determines whether the native `JSON.stringify` and `parse`
  2902. // implementations are spec-compliant. Based on work by Ken Snyder.
  2903. function has(name) {
  2904. if (has[name] != null) {
  2905. // Return cached feature test result.
  2906. return has[name];
  2907. }
  2908. var isSupported;
  2909. if (name == "bug-string-char-index") {
  2910. // IE <= 7 doesn't support accessing string characters using square
  2911. // bracket notation. IE 8 only supports this for primitives.
  2912. isSupported = "a"[0] != "a";
  2913. } else if (name == "json") {
  2914. // Indicates whether both `JSON.stringify` and `JSON.parse` are
  2915. // supported.
  2916. isSupported = has("json-stringify") && has("date-serialization") && has("json-parse");
  2917. } else if (name == "date-serialization") {
  2918. // Indicates whether `Date`s can be serialized accurately by `JSON.stringify`.
  2919. isSupported = has("json-stringify") && isExtended;
  2920. if (isSupported) {
  2921. var stringify = exports.stringify;
  2922. attempt(function () {
  2923. isSupported =
  2924. // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly
  2925. // serialize extended years.
  2926. stringify(new Date(-8.64e15)) == '"-271821-04-20T00:00:00.000Z"' &&
  2927. // The milliseconds are optional in ES 5, but required in 5.1.
  2928. stringify(new Date(8.64e15)) == '"+275760-09-13T00:00:00.000Z"' &&
  2929. // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative
  2930. // four-digit years instead of six-digit years. Credits: @Yaffle.
  2931. stringify(new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' &&
  2932. // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond
  2933. // values less than 1000. Credits: @Yaffle.
  2934. stringify(new Date(-1)) == '"1969-12-31T23:59:59.999Z"';
  2935. });
  2936. }
  2937. } else {
  2938. var value, serialized = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
  2939. // Test `JSON.stringify`.
  2940. if (name == "json-stringify") {
  2941. var stringify = exports.stringify, stringifySupported = typeof stringify == "function";
  2942. if (stringifySupported) {
  2943. // A test function object with a custom `toJSON` method.
  2944. (value = function () {
  2945. return 1;
  2946. }).toJSON = value;
  2947. attempt(function () {
  2948. stringifySupported =
  2949. // Firefox 3.1b1 and b2 serialize string, number, and boolean
  2950. // primitives as object literals.
  2951. stringify(0) === "0" &&
  2952. // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object
  2953. // literals.
  2954. stringify(new Number()) === "0" &&
  2955. stringify(new String()) == '""' &&
  2956. // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or
  2957. // does not define a canonical JSON representation (this applies to
  2958. // objects with `toJSON` properties as well, *unless* they are nested
  2959. // within an object or array).
  2960. stringify(getClass) === undefined &&
  2961. // IE 8 serializes `undefined` as `"undefined"`. Safari <= 5.1.7 and
  2962. // FF 3.1b3 pass this test.
  2963. stringify(undefined) === undefined &&
  2964. // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,
  2965. // respectively, if the value is omitted entirely.
  2966. stringify() === undefined &&
  2967. // FF 3.1b1, 2 throw an error if the given value is not a number,
  2968. // string, array, object, Boolean, or `null` literal. This applies to
  2969. // objects with custom `toJSON` methods as well, unless they are nested
  2970. // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`
  2971. // methods entirely.
  2972. stringify(value) === "1" &&
  2973. stringify([value]) == "[1]" &&
  2974. // Prototype <= 1.6.1 serializes `[undefined]` as `"[]"` instead of
  2975. // `"[null]"`.
  2976. stringify([undefined]) == "[null]" &&
  2977. // YUI 3.0.0b1 fails to serialize `null` literals.
  2978. stringify(null) == "null" &&
  2979. // FF 3.1b1, 2 halts serialization if an array contains a function:
  2980. // `[1, true, getClass, 1]` serializes as "[1,true,],". FF 3.1b3
  2981. // elides non-JSON values from objects and arrays, unless they
  2982. // define custom `toJSON` methods.
  2983. stringify([undefined, getClass, null]) == "[null,null,null]" &&
  2984. // Simple serialization test. FF 3.1b1 uses Unicode escape sequences
  2985. // where character escape codes are expected (e.g., `\b` => `\u0008`).
  2986. stringify({ "a": [value, true, false, null, "\x00\b\n\f\r\t"] }) == serialized &&
  2987. // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.
  2988. stringify(null, value) === "1" &&
  2989. stringify([1, 2], null, 1) == "[\n 1,\n 2\n]";
  2990. }, function () {
  2991. stringifySupported = false;
  2992. });
  2993. }
  2994. isSupported = stringifySupported;
  2995. }
  2996. // Test `JSON.parse`.
  2997. if (name == "json-parse") {
  2998. var parse = exports.parse, parseSupported;
  2999. if (typeof parse == "function") {
  3000. attempt(function () {
  3001. // FF 3.1b1, b2 will throw an exception if a bare literal is provided.
  3002. // Conforming implementations should also coerce the initial argument to
  3003. // a string prior to parsing.
  3004. if (parse("0") === 0 && !parse(false)) {
  3005. // Simple parsing test.
  3006. value = parse(serialized);
  3007. parseSupported = value["a"].length == 5 && value["a"][0] === 1;
  3008. if (parseSupported) {
  3009. attempt(function () {
  3010. // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.
  3011. parseSupported = !parse('"\t"');
  3012. });
  3013. if (parseSupported) {
  3014. attempt(function () {
  3015. // FF 4.0 and 4.0.1 allow leading `+` signs and leading
  3016. // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow
  3017. // certain octal literals.
  3018. parseSupported = parse("01") !== 1;
  3019. });
  3020. }
  3021. if (parseSupported) {
  3022. attempt(function () {
  3023. // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal
  3024. // points. These environments, along with FF 3.1b1 and 2,
  3025. // also allow trailing commas in JSON objects and arrays.
  3026. parseSupported = parse("1.") !== 1;
  3027. });
  3028. }
  3029. }
  3030. }
  3031. }, function () {
  3032. parseSupported = false;
  3033. });
  3034. }
  3035. isSupported = parseSupported;
  3036. }
  3037. }
  3038. return has[name] = !!isSupported;
  3039. }
  3040. has["bug-string-char-index"] = has["date-serialization"] = has["json"] = has["json-stringify"] = has["json-parse"] = null;
  3041. if (!has("json")) {
  3042. // Common `[[Class]]` name aliases.
  3043. var functionClass = "[object Function]",
  3044. dateClass = "[object Date]",
  3045. numberClass = "[object Number]",
  3046. stringClass = "[object String]",
  3047. arrayClass = "[object Array]",
  3048. booleanClass = "[object Boolean]";
  3049. // Detect incomplete support for accessing string characters by index.
  3050. var charIndexBuggy = has("bug-string-char-index");
  3051. // Internal: Normalizes the `for...in` iteration algorithm across
  3052. // environments. Each enumerated key is yielded to a `callback` function.
  3053. var forOwn = function (object, callback) {
  3054. var size = 0, Properties, dontEnums, property;
  3055. // Tests for bugs in the current environment's `for...in` algorithm. The
  3056. // `valueOf` property inherits the non-enumerable flag from
  3057. // `Object.prototype` in older versions of IE, Netscape, and Mozilla.
  3058. (Properties = function () {
  3059. this.valueOf = 0;
  3060. }).prototype.valueOf = 0;
  3061. // Iterate over a new instance of the `Properties` class.
  3062. dontEnums = new Properties();
  3063. for (property in dontEnums) {
  3064. // Ignore all properties inherited from `Object.prototype`.
  3065. if (isProperty.call(dontEnums, property)) {
  3066. size++;
  3067. }
  3068. }
  3069. Properties = dontEnums = null;
  3070. // Normalize the iteration algorithm.
  3071. if (!size) {
  3072. // A list of non-enumerable properties inherited from `Object.prototype`.
  3073. dontEnums = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"];
  3074. // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable
  3075. // properties.
  3076. forOwn = function (object, callback) {
  3077. var isFunction = getClass.call(object) == functionClass, property, length;
  3078. var hasProperty = !isFunction && typeof object.constructor != "function" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;
  3079. for (property in object) {
  3080. // Gecko <= 1.0 enumerates the `prototype` property of functions under
  3081. // certain conditions; IE does not.
  3082. if (!(isFunction && property == "prototype") && hasProperty.call(object, property)) {
  3083. callback(property);
  3084. }
  3085. }
  3086. // Manually invoke the callback for each non-enumerable property.
  3087. for (length = dontEnums.length; property = dontEnums[--length];) {
  3088. if (hasProperty.call(object, property)) {
  3089. callback(property);
  3090. }
  3091. }
  3092. };
  3093. } else {
  3094. // No bugs detected; use the standard `for...in` algorithm.
  3095. forOwn = function (object, callback) {
  3096. var isFunction = getClass.call(object) == functionClass, property, isConstructor;
  3097. for (property in object) {
  3098. if (!(isFunction && property == "prototype") && isProperty.call(object, property) && !(isConstructor = property === "constructor")) {
  3099. callback(property);
  3100. }
  3101. }
  3102. // Manually invoke the callback for the `constructor` property due to
  3103. // cross-environment inconsistencies.
  3104. if (isConstructor || isProperty.call(object, (property = "constructor"))) {
  3105. callback(property);
  3106. }
  3107. };
  3108. }
  3109. return forOwn(object, callback);
  3110. };
  3111. // Public: Serializes a JavaScript `value` as a JSON string. The optional
  3112. // `filter` argument may specify either a function that alters how object and
  3113. // array members are serialized, or an array of strings and numbers that
  3114. // indicates which properties should be serialized. The optional `width`
  3115. // argument may be either a string or number that specifies the indentation
  3116. // level of the output.
  3117. if (!has("json-stringify") && !has("date-serialization")) {
  3118. // Internal: A map of control characters and their escaped equivalents.
  3119. var Escapes = {
  3120. 92: "\\\\",
  3121. 34: '\\"',
  3122. 8: "\\b",
  3123. 12: "\\f",
  3124. 10: "\\n",
  3125. 13: "\\r",
  3126. 9: "\\t"
  3127. };
  3128. // Internal: Converts `value` into a zero-padded string such that its
  3129. // length is at least equal to `width`. The `width` must be <= 6.
  3130. var leadingZeroes = "000000";
  3131. var toPaddedString = function (width, value) {
  3132. // The `|| 0` expression is necessary to work around a bug in
  3133. // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== "0"`.
  3134. return (leadingZeroes + (value || 0)).slice(-width);
  3135. };
  3136. // Internal: Serializes a date object.
  3137. var serializeDate = function (value) {
  3138. var getData, year, month, date, time, hours, minutes, seconds, milliseconds;
  3139. // Define additional utility methods if the `Date` methods are buggy.
  3140. if (!isExtended) {
  3141. var floor = Math.floor;
  3142. // A mapping between the months of the year and the number of days between
  3143. // January 1st and the first of the respective month.
  3144. var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
  3145. // Internal: Calculates the number of days between the Unix epoch and the
  3146. // first day of the given month.
  3147. var getDay = function (year, month) {
  3148. return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);
  3149. };
  3150. getData = function (value) {
  3151. // Manually compute the year, month, date, hours, minutes,
  3152. // seconds, and milliseconds if the `getUTC*` methods are
  3153. // buggy. Adapted from @Yaffle's `date-shim` project.
  3154. date = floor(value / 864e5);
  3155. for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);
  3156. for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);
  3157. date = 1 + date - getDay(year, month);
  3158. // The `time` value specifies the time within the day (see ES
  3159. // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used
  3160. // to compute `A modulo B`, as the `%` operator does not
  3161. // correspond to the `modulo` operation for negative numbers.
  3162. time = (value % 864e5 + 864e5) % 864e5;
  3163. // The hours, minutes, seconds, and milliseconds are obtained by
  3164. // decomposing the time within the day. See section 15.9.1.10.
  3165. hours = floor(time / 36e5) % 24;
  3166. minutes = floor(time / 6e4) % 60;
  3167. seconds = floor(time / 1e3) % 60;
  3168. milliseconds = time % 1e3;
  3169. };
  3170. } else {
  3171. getData = function (value) {
  3172. year = value.getUTCFullYear();
  3173. month = value.getUTCMonth();
  3174. date = value.getUTCDate();
  3175. hours = value.getUTCHours();
  3176. minutes = value.getUTCMinutes();
  3177. seconds = value.getUTCSeconds();
  3178. milliseconds = value.getUTCMilliseconds();
  3179. };
  3180. }
  3181. serializeDate = function (value) {
  3182. if (value > -1 / 0 && value < 1 / 0) {
  3183. // Dates are serialized according to the `Date#toJSON` method
  3184. // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15
  3185. // for the ISO 8601 date time string format.
  3186. getData(value);
  3187. // Serialize extended years correctly.
  3188. value = (year <= 0 || year >= 1e4 ? (year < 0 ? "-" : "+") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) +
  3189. "-" + toPaddedString(2, month + 1) + "-" + toPaddedString(2, date) +
  3190. // Months, dates, hours, minutes, and seconds should have two
  3191. // digits; milliseconds should have three.
  3192. "T" + toPaddedString(2, hours) + ":" + toPaddedString(2, minutes) + ":" + toPaddedString(2, seconds) +
  3193. // Milliseconds are optional in ES 5.0, but required in 5.1.
  3194. "." + toPaddedString(3, milliseconds) + "Z";
  3195. year = month = date = hours = minutes = seconds = milliseconds = null;
  3196. } else {
  3197. value = null;
  3198. }
  3199. return value;
  3200. };
  3201. return serializeDate(value);
  3202. };
  3203. // For environments with `JSON.stringify` but buggy date serialization,
  3204. // we override the native `Date#toJSON` implementation with a
  3205. // spec-compliant one.
  3206. if (has("json-stringify") && !has("date-serialization")) {
  3207. // Internal: the `Date#toJSON` implementation used to override the native one.
  3208. function dateToJSON (key) {
  3209. return serializeDate(this);
  3210. }
  3211. // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.
  3212. var nativeStringify = exports.stringify;
  3213. exports.stringify = function (source, filter, width) {
  3214. var nativeToJSON = Date.prototype.toJSON;
  3215. Date.prototype.toJSON = dateToJSON;
  3216. var result = nativeStringify(source, filter, width);
  3217. Date.prototype.toJSON = nativeToJSON;
  3218. return result;
  3219. }
  3220. } else {
  3221. // Internal: Double-quotes a string `value`, replacing all ASCII control
  3222. // characters (characters with code unit values between 0 and 31) with
  3223. // their escaped equivalents. This is an implementation of the
  3224. // `Quote(value)` operation defined in ES 5.1 section 15.12.3.
  3225. var unicodePrefix = "\\u00";
  3226. var escapeChar = function (character) {
  3227. var charCode = character.charCodeAt(0), escaped = Escapes[charCode];
  3228. if (escaped) {
  3229. return escaped;
  3230. }
  3231. return unicodePrefix + toPaddedString(2, charCode.toString(16));
  3232. };
  3233. var reEscape = /[\x00-\x1f\x22\x5c]/g;
  3234. var quote = function (value) {
  3235. reEscape.lastIndex = 0;
  3236. return '"' +
  3237. (
  3238. reEscape.test(value)
  3239. ? value.replace(reEscape, escapeChar)
  3240. : value
  3241. ) +
  3242. '"';
  3243. };
  3244. // Internal: Recursively serializes an object. Implements the
  3245. // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.
  3246. var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {
  3247. var value, type, className, results, element, index, length, prefix, result;
  3248. attempt(function () {
  3249. // Necessary for host object support.
  3250. value = object[property];
  3251. });
  3252. if (typeof value == "object" && value) {
  3253. if (value.getUTCFullYear && getClass.call(value) == dateClass && value.toJSON === Date.prototype.toJSON) {
  3254. value = serializeDate(value);
  3255. } else if (typeof value.toJSON == "function") {
  3256. value = value.toJSON(property);
  3257. }
  3258. }
  3259. if (callback) {
  3260. // If a replacement function was provided, call it to obtain the value
  3261. // for serialization.
  3262. value = callback.call(object, property, value);
  3263. }
  3264. // Exit early if value is `undefined` or `null`.
  3265. if (value == undefined) {
  3266. return value === undefined ? value : "null";
  3267. }
  3268. type = typeof value;
  3269. // Only call `getClass` if the value is an object.
  3270. if (type == "object") {
  3271. className = getClass.call(value);
  3272. }
  3273. switch (className || type) {
  3274. case "boolean":
  3275. case booleanClass:
  3276. // Booleans are represented literally.
  3277. return "" + value;
  3278. case "number":
  3279. case numberClass:
  3280. // JSON numbers must be finite. `Infinity` and `NaN` are serialized as
  3281. // `"null"`.
  3282. return value > -1 / 0 && value < 1 / 0 ? "" + value : "null";
  3283. case "string":
  3284. case stringClass:
  3285. // Strings are double-quoted and escaped.
  3286. return quote("" + value);
  3287. }
  3288. // Recursively serialize objects and arrays.
  3289. if (typeof value == "object") {
  3290. // Check for cyclic structures. This is a linear search; performance
  3291. // is inversely proportional to the number of unique nested objects.
  3292. for (length = stack.length; length--;) {
  3293. if (stack[length] === value) {
  3294. // Cyclic structures cannot be serialized by `JSON.stringify`.
  3295. throw TypeError();
  3296. }
  3297. }
  3298. // Add the object to the stack of traversed objects.
  3299. stack.push(value);
  3300. results = [];
  3301. // Save the current indentation level and indent one additional level.
  3302. prefix = indentation;
  3303. indentation += whitespace;
  3304. if (className == arrayClass) {
  3305. // Recursively serialize array elements.
  3306. for (index = 0, length = value.length; index < length; index++) {
  3307. element = serialize(index, value, callback, properties, whitespace, indentation, stack);
  3308. results.push(element === undefined ? "null" : element);
  3309. }
  3310. result = results.length ? (whitespace ? "[\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "]" : ("[" + results.join(",") + "]")) : "[]";
  3311. } else {
  3312. // Recursively serialize object members. Members are selected from
  3313. // either a user-specified list of property names, or the object
  3314. // itself.
  3315. forOwn(properties || value, function (property) {
  3316. var element = serialize(property, value, callback, properties, whitespace, indentation, stack);
  3317. if (element !== undefined) {
  3318. // According to ES 5.1 section 15.12.3: "If `gap` {whitespace}
  3319. // is not the empty string, let `member` {quote(property) + ":"}
  3320. // be the concatenation of `member` and the `space` character."
  3321. // The "`space` character" refers to the literal space
  3322. // character, not the `space` {width} argument provided to
  3323. // `JSON.stringify`.
  3324. results.push(quote(property) + ":" + (whitespace ? " " : "") + element);
  3325. }
  3326. });
  3327. result = results.length ? (whitespace ? "{\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "}" : ("{" + results.join(",") + "}")) : "{}";
  3328. }
  3329. // Remove the object from the traversed object stack.
  3330. stack.pop();
  3331. return result;
  3332. }
  3333. };
  3334. // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.
  3335. exports.stringify = function (source, filter, width) {
  3336. var whitespace, callback, properties, className;
  3337. if (objectTypes[typeof filter] && filter) {
  3338. className = getClass.call(filter);
  3339. if (className == functionClass) {
  3340. callback = filter;
  3341. } else if (className == arrayClass) {
  3342. // Convert the property names array into a makeshift set.
  3343. properties = {};
  3344. for (var index = 0, length = filter.length, value; index < length;) {
  3345. value = filter[index++];
  3346. className = getClass.call(value);
  3347. if (className == "[object String]" || className == "[object Number]") {
  3348. properties[value] = 1;
  3349. }
  3350. }
  3351. }
  3352. }
  3353. if (width) {
  3354. className = getClass.call(width);
  3355. if (className == numberClass) {
  3356. // Convert the `width` to an integer and create a string containing
  3357. // `width` number of space characters.
  3358. if ((width -= width % 1) > 0) {
  3359. if (width > 10) {
  3360. width = 10;
  3361. }
  3362. for (whitespace = ""; whitespace.length < width;) {
  3363. whitespace += " ";
  3364. }
  3365. }
  3366. } else if (className == stringClass) {
  3367. whitespace = width.length <= 10 ? width : width.slice(0, 10);
  3368. }
  3369. }
  3370. // Opera <= 7.54u2 discards the values associated with empty string keys
  3371. // (`""`) only if they are used directly within an object member list
  3372. // (e.g., `!("" in { "": 1})`).
  3373. return serialize("", (value = {}, value[""] = source, value), callback, properties, whitespace, "", []);
  3374. };
  3375. }
  3376. }
  3377. // Public: Parses a JSON source string.
  3378. if (!has("json-parse")) {
  3379. var fromCharCode = String.fromCharCode;
  3380. // Internal: A map of escaped control characters and their unescaped
  3381. // equivalents.
  3382. var Unescapes = {
  3383. 92: "\\",
  3384. 34: '"',
  3385. 47: "/",
  3386. 98: "\b",
  3387. 116: "\t",
  3388. 110: "\n",
  3389. 102: "\f",
  3390. 114: "\r"
  3391. };
  3392. // Internal: Stores the parser state.
  3393. var Index, Source;
  3394. // Internal: Resets the parser state and throws a `SyntaxError`.
  3395. var abort = function () {
  3396. Index = Source = null;
  3397. throw SyntaxError();
  3398. };
  3399. // Internal: Returns the next token, or `"$"` if the parser has reached
  3400. // the end of the source string. A token may be a string, number, `null`
  3401. // literal, or Boolean literal.
  3402. var lex = function () {
  3403. var source = Source, length = source.length, value, begin, position, isSigned, charCode;
  3404. while (Index < length) {
  3405. charCode = source.charCodeAt(Index);
  3406. switch (charCode) {
  3407. case 9: case 10: case 13: case 32:
  3408. // Skip whitespace tokens, including tabs, carriage returns, line
  3409. // feeds, and space characters.
  3410. Index++;
  3411. break;
  3412. case 123: case 125: case 91: case 93: case 58: case 44:
  3413. // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at
  3414. // the current position.
  3415. value = charIndexBuggy ? source.charAt(Index) : source[Index];
  3416. Index++;
  3417. return value;
  3418. case 34:
  3419. // `"` delimits a JSON string; advance to the next character and
  3420. // begin parsing the string. String tokens are prefixed with the
  3421. // sentinel `@` character to distinguish them from punctuators and
  3422. // end-of-string tokens.
  3423. for (value = "@", Index++; Index < length;) {
  3424. charCode = source.charCodeAt(Index);
  3425. if (charCode < 32) {
  3426. // Unescaped ASCII control characters (those with a code unit
  3427. // less than the space character) are not permitted.
  3428. abort();
  3429. } else if (charCode == 92) {
  3430. // A reverse solidus (`\`) marks the beginning of an escaped
  3431. // control character (including `"`, `\`, and `/`) or Unicode
  3432. // escape sequence.
  3433. charCode = source.charCodeAt(++Index);
  3434. switch (charCode) {
  3435. case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114:
  3436. // Revive escaped control characters.
  3437. value += Unescapes[charCode];
  3438. Index++;
  3439. break;
  3440. case 117:
  3441. // `\u` marks the beginning of a Unicode escape sequence.
  3442. // Advance to the first character and validate the
  3443. // four-digit code point.
  3444. begin = ++Index;
  3445. for (position = Index + 4; Index < position; Index++) {
  3446. charCode = source.charCodeAt(Index);
  3447. // A valid sequence comprises four hexdigits (case-
  3448. // insensitive) that form a single hexadecimal value.
  3449. if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {
  3450. // Invalid Unicode escape sequence.
  3451. abort();
  3452. }
  3453. }
  3454. // Revive the escaped character.
  3455. value += fromCharCode("0x" + source.slice(begin, Index));
  3456. break;
  3457. default:
  3458. // Invalid escape sequence.
  3459. abort();
  3460. }
  3461. } else {
  3462. if (charCode == 34) {
  3463. // An unescaped double-quote character marks the end of the
  3464. // string.
  3465. break;
  3466. }
  3467. charCode = source.charCodeAt(Index);
  3468. begin = Index;
  3469. // Optimize for the common case where a string is valid.
  3470. while (charCode >= 32 && charCode != 92 && charCode != 34) {
  3471. charCode = source.charCodeAt(++Index);
  3472. }
  3473. // Append the string as-is.
  3474. value += source.slice(begin, Index);
  3475. }
  3476. }
  3477. if (source.charCodeAt(Index) == 34) {
  3478. // Advance to the next character and return the revived string.
  3479. Index++;
  3480. return value;
  3481. }
  3482. // Unterminated string.
  3483. abort();
  3484. default:
  3485. // Parse numbers and literals.
  3486. begin = Index;
  3487. // Advance past the negative sign, if one is specified.
  3488. if (charCode == 45) {
  3489. isSigned = true;
  3490. charCode = source.charCodeAt(++Index);
  3491. }
  3492. // Parse an integer or floating-point value.
  3493. if (charCode >= 48 && charCode <= 57) {
  3494. // Leading zeroes are interpreted as octal literals.
  3495. if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) {
  3496. // Illegal octal literal.
  3497. abort();
  3498. }
  3499. isSigned = false;
  3500. // Parse the integer component.
  3501. for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++);
  3502. // Floats cannot contain a leading decimal point; however, this
  3503. // case is already accounted for by the parser.
  3504. if (source.charCodeAt(Index) == 46) {
  3505. position = ++Index;
  3506. // Parse the decimal component.
  3507. for (; position < length; position++) {
  3508. charCode = source.charCodeAt(position);
  3509. if (charCode < 48 || charCode > 57) {
  3510. break;
  3511. }
  3512. }
  3513. if (position == Index) {
  3514. // Illegal trailing decimal.
  3515. abort();
  3516. }
  3517. Index = position;
  3518. }
  3519. // Parse exponents. The `e` denoting the exponent is
  3520. // case-insensitive.
  3521. charCode = source.charCodeAt(Index);
  3522. if (charCode == 101 || charCode == 69) {
  3523. charCode = source.charCodeAt(++Index);
  3524. // Skip past the sign following the exponent, if one is
  3525. // specified.
  3526. if (charCode == 43 || charCode == 45) {
  3527. Index++;
  3528. }
  3529. // Parse the exponential component.
  3530. for (position = Index; position < length; position++) {
  3531. charCode = source.charCodeAt(position);
  3532. if (charCode < 48 || charCode > 57) {
  3533. break;
  3534. }
  3535. }
  3536. if (position == Index) {
  3537. // Illegal empty exponent.
  3538. abort();
  3539. }
  3540. Index = position;
  3541. }
  3542. // Coerce the parsed value to a JavaScript number.
  3543. return +source.slice(begin, Index);
  3544. }
  3545. // A negative sign may only precede numbers.
  3546. if (isSigned) {
  3547. abort();
  3548. }
  3549. // `true`, `false`, and `null` literals.
  3550. var temp = source.slice(Index, Index + 4);
  3551. if (temp == "true") {
  3552. Index += 4;
  3553. return true;
  3554. } else if (temp == "fals" && source.charCodeAt(Index + 4 ) == 101) {
  3555. Index += 5;
  3556. return false;
  3557. } else if (temp == "null") {
  3558. Index += 4;
  3559. return null;
  3560. }
  3561. // Unrecognized token.
  3562. abort();
  3563. }
  3564. }
  3565. // Return the sentinel `$` character if the parser has reached the end
  3566. // of the source string.
  3567. return "$";
  3568. };
  3569. // Internal: Parses a JSON `value` token.
  3570. var get = function (value) {
  3571. var results, hasMembers;
  3572. if (value == "$") {
  3573. // Unexpected end of input.
  3574. abort();
  3575. }
  3576. if (typeof value == "string") {
  3577. if ((charIndexBuggy ? value.charAt(0) : value[0]) == "@") {
  3578. // Remove the sentinel `@` character.
  3579. return value.slice(1);
  3580. }
  3581. // Parse object and array literals.
  3582. if (value == "[") {
  3583. // Parses a JSON array, returning a new JavaScript array.
  3584. results = [];
  3585. for (;;) {
  3586. value = lex();
  3587. // A closing square bracket marks the end of the array literal.
  3588. if (value == "]") {
  3589. break;
  3590. }
  3591. // If the array literal contains elements, the current token
  3592. // should be a comma separating the previous element from the
  3593. // next.
  3594. if (hasMembers) {
  3595. if (value == ",") {
  3596. value = lex();
  3597. if (value == "]") {
  3598. // Unexpected trailing `,` in array literal.
  3599. abort();
  3600. }
  3601. } else {
  3602. // A `,` must separate each array element.
  3603. abort();
  3604. }
  3605. } else {
  3606. hasMembers = true;
  3607. }
  3608. // Elisions and leading commas are not permitted.
  3609. if (value == ",") {
  3610. abort();
  3611. }
  3612. results.push(get(value));
  3613. }
  3614. return results;
  3615. } else if (value == "{") {
  3616. // Parses a JSON object, returning a new JavaScript object.
  3617. results = {};
  3618. for (;;) {
  3619. value = lex();
  3620. // A closing curly brace marks the end of the object literal.
  3621. if (value == "}") {
  3622. break;
  3623. }
  3624. // If the object literal contains members, the current token
  3625. // should be a comma separator.
  3626. if (hasMembers) {
  3627. if (value == ",") {
  3628. value = lex();
  3629. if (value == "}") {
  3630. // Unexpected trailing `,` in object literal.
  3631. abort();
  3632. }
  3633. } else {
  3634. // A `,` must separate each object member.
  3635. abort();
  3636. }
  3637. } else {
  3638. hasMembers = true;
  3639. }
  3640. // Leading commas are not permitted, object property names must be
  3641. // double-quoted strings, and a `:` must separate each property
  3642. // name and value.
  3643. if (value == "," || typeof value != "string" || (charIndexBuggy ? value.charAt(0) : value[0]) != "@" || lex() != ":") {
  3644. abort();
  3645. }
  3646. results[value.slice(1)] = get(lex());
  3647. }
  3648. return results;
  3649. }
  3650. // Unexpected token encountered.
  3651. abort();
  3652. }
  3653. return value;
  3654. };
  3655. // Internal: Updates a traversed object member.
  3656. var update = function (source, property, callback) {
  3657. var element = walk(source, property, callback);
  3658. if (element === undefined) {
  3659. delete source[property];
  3660. } else {
  3661. source[property] = element;
  3662. }
  3663. };
  3664. // Internal: Recursively traverses a parsed JSON object, invoking the
  3665. // `callback` function for each value. This is an implementation of the
  3666. // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.
  3667. var walk = function (source, property, callback) {
  3668. var value = source[property], length;
  3669. if (typeof value == "object" && value) {
  3670. // `forOwn` can't be used to traverse an array in Opera <= 8.54
  3671. // because its `Object#hasOwnProperty` implementation returns `false`
  3672. // for array indices (e.g., `![1, 2, 3].hasOwnProperty("0")`).
  3673. if (getClass.call(value) == arrayClass) {
  3674. for (length = value.length; length--;) {
  3675. update(getClass, forOwn, value, length, callback);
  3676. }
  3677. } else {
  3678. forOwn(value, function (property) {
  3679. update(value, property, callback);
  3680. });
  3681. }
  3682. }
  3683. return callback.call(source, property, value);
  3684. };
  3685. // Public: `JSON.parse`. See ES 5.1 section 15.12.2.
  3686. exports.parse = function (source, callback) {
  3687. var result, value;
  3688. Index = 0;
  3689. Source = "" + source;
  3690. result = get(lex());
  3691. // If a JSON string contains multiple tokens, it is invalid.
  3692. if (lex() != "$") {
  3693. abort();
  3694. }
  3695. // Reset the parser state.
  3696. Index = Source = null;
  3697. return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[""] = result, value), "", callback) : result;
  3698. };
  3699. }
  3700. }
  3701. exports.runInContext = runInContext;
  3702. return exports;
  3703. }
  3704. if (freeExports && !isLoader) {
  3705. // Export for CommonJS environments.
  3706. runInContext(root, freeExports);
  3707. } else {
  3708. // Export for web browsers and JavaScript engines.
  3709. var nativeJSON = root.JSON,
  3710. previousJSON = root.JSON3,
  3711. isRestored = false;
  3712. var JSON3 = runInContext(root, (root.JSON3 = {
  3713. // Public: Restores the original value of the global `JSON` object and
  3714. // returns a reference to the `JSON3` object.
  3715. "noConflict": function () {
  3716. if (!isRestored) {
  3717. isRestored = true;
  3718. root.JSON = nativeJSON;
  3719. root.JSON3 = previousJSON;
  3720. nativeJSON = previousJSON = null;
  3721. }
  3722. return JSON3;
  3723. }
  3724. }));
  3725. root.JSON = {
  3726. "parse": JSON3.parse,
  3727. "stringify": JSON3.stringify
  3728. };
  3729. }
  3730. // Export for asynchronous module loaders.
  3731. if (isLoader) {
  3732. !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
  3733. return JSON3;
  3734. }.call(exports, __webpack_require__, exports, module),
  3735. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  3736. }
  3737. }).call(this);
  3738. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  3739. /***/ }),
  3740. /***/ "./node_modules/lodash-es/_Symbol.js":
  3741. /*!*******************************************!*\
  3742. !*** ./node_modules/lodash-es/_Symbol.js ***!
  3743. \*******************************************/
  3744. /*! exports provided: default */
  3745. /*! exports used: default */
  3746. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3747. "use strict";
  3748. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(/*! ./_root.js */ "./node_modules/lodash-es/_root.js");
  3749. /** Built-in value references. */
  3750. var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol;
  3751. /* harmony default export */ __webpack_exports__["a"] = (Symbol);
  3752. /***/ }),
  3753. /***/ "./node_modules/lodash-es/_baseGetTag.js":
  3754. /*!***********************************************!*\
  3755. !*** ./node_modules/lodash-es/_baseGetTag.js ***!
  3756. \***********************************************/
  3757. /*! exports provided: default */
  3758. /*! exports used: default */
  3759. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3760. "use strict";
  3761. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/lodash-es/_Symbol.js");
  3762. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(/*! ./_getRawTag.js */ "./node_modules/lodash-es/_getRawTag.js");
  3763. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(/*! ./_objectToString.js */ "./node_modules/lodash-es/_objectToString.js");
  3764. /** `Object#toString` result references. */
  3765. var nullTag = '[object Null]',
  3766. undefinedTag = '[object Undefined]';
  3767. /** Built-in value references. */
  3768. var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined;
  3769. /**
  3770. * The base implementation of `getTag` without fallbacks for buggy environments.
  3771. *
  3772. * @private
  3773. * @param {*} value The value to query.
  3774. * @returns {string} Returns the `toStringTag`.
  3775. */
  3776. function baseGetTag(value) {
  3777. if (value == null) {
  3778. return value === undefined ? undefinedTag : nullTag;
  3779. }
  3780. return (symToStringTag && symToStringTag in Object(value))
  3781. ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value)
  3782. : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value);
  3783. }
  3784. /* harmony default export */ __webpack_exports__["a"] = (baseGetTag);
  3785. /***/ }),
  3786. /***/ "./node_modules/lodash-es/_freeGlobal.js":
  3787. /*!***********************************************!*\
  3788. !*** ./node_modules/lodash-es/_freeGlobal.js ***!
  3789. \***********************************************/
  3790. /*! exports provided: default */
  3791. /*! exports used: default */
  3792. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3793. "use strict";
  3794. /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
  3795. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  3796. /* harmony default export */ __webpack_exports__["a"] = (freeGlobal);
  3797. /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  3798. /***/ }),
  3799. /***/ "./node_modules/lodash-es/_getPrototype.js":
  3800. /*!*************************************************!*\
  3801. !*** ./node_modules/lodash-es/_getPrototype.js ***!
  3802. \*************************************************/
  3803. /*! exports provided: default */
  3804. /*! exports used: default */
  3805. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3806. "use strict";
  3807. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(/*! ./_overArg.js */ "./node_modules/lodash-es/_overArg.js");
  3808. /** Built-in value references. */
  3809. var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object);
  3810. /* harmony default export */ __webpack_exports__["a"] = (getPrototype);
  3811. /***/ }),
  3812. /***/ "./node_modules/lodash-es/_getRawTag.js":
  3813. /*!**********************************************!*\
  3814. !*** ./node_modules/lodash-es/_getRawTag.js ***!
  3815. \**********************************************/
  3816. /*! exports provided: default */
  3817. /*! exports used: default */
  3818. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3819. "use strict";
  3820. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/lodash-es/_Symbol.js");
  3821. /** Used for built-in method references. */
  3822. var objectProto = Object.prototype;
  3823. /** Used to check objects for own properties. */
  3824. var hasOwnProperty = objectProto.hasOwnProperty;
  3825. /**
  3826. * Used to resolve the
  3827. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  3828. * of values.
  3829. */
  3830. var nativeObjectToString = objectProto.toString;
  3831. /** Built-in value references. */
  3832. var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined;
  3833. /**
  3834. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  3835. *
  3836. * @private
  3837. * @param {*} value The value to query.
  3838. * @returns {string} Returns the raw `toStringTag`.
  3839. */
  3840. function getRawTag(value) {
  3841. var isOwn = hasOwnProperty.call(value, symToStringTag),
  3842. tag = value[symToStringTag];
  3843. try {
  3844. value[symToStringTag] = undefined;
  3845. var unmasked = true;
  3846. } catch (e) {}
  3847. var result = nativeObjectToString.call(value);
  3848. if (unmasked) {
  3849. if (isOwn) {
  3850. value[symToStringTag] = tag;
  3851. } else {
  3852. delete value[symToStringTag];
  3853. }
  3854. }
  3855. return result;
  3856. }
  3857. /* harmony default export */ __webpack_exports__["a"] = (getRawTag);
  3858. /***/ }),
  3859. /***/ "./node_modules/lodash-es/_objectToString.js":
  3860. /*!***************************************************!*\
  3861. !*** ./node_modules/lodash-es/_objectToString.js ***!
  3862. \***************************************************/
  3863. /*! exports provided: default */
  3864. /*! exports used: default */
  3865. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3866. "use strict";
  3867. /** Used for built-in method references. */
  3868. var objectProto = Object.prototype;
  3869. /**
  3870. * Used to resolve the
  3871. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  3872. * of values.
  3873. */
  3874. var nativeObjectToString = objectProto.toString;
  3875. /**
  3876. * Converts `value` to a string using `Object.prototype.toString`.
  3877. *
  3878. * @private
  3879. * @param {*} value The value to convert.
  3880. * @returns {string} Returns the converted string.
  3881. */
  3882. function objectToString(value) {
  3883. return nativeObjectToString.call(value);
  3884. }
  3885. /* harmony default export */ __webpack_exports__["a"] = (objectToString);
  3886. /***/ }),
  3887. /***/ "./node_modules/lodash-es/_overArg.js":
  3888. /*!********************************************!*\
  3889. !*** ./node_modules/lodash-es/_overArg.js ***!
  3890. \********************************************/
  3891. /*! exports provided: default */
  3892. /*! exports used: default */
  3893. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3894. "use strict";
  3895. /**
  3896. * Creates a unary function that invokes `func` with its argument transformed.
  3897. *
  3898. * @private
  3899. * @param {Function} func The function to wrap.
  3900. * @param {Function} transform The argument transform.
  3901. * @returns {Function} Returns the new function.
  3902. */
  3903. function overArg(func, transform) {
  3904. return function(arg) {
  3905. return func(transform(arg));
  3906. };
  3907. }
  3908. /* harmony default export */ __webpack_exports__["a"] = (overArg);
  3909. /***/ }),
  3910. /***/ "./node_modules/lodash-es/_root.js":
  3911. /*!*****************************************!*\
  3912. !*** ./node_modules/lodash-es/_root.js ***!
  3913. \*****************************************/
  3914. /*! exports provided: default */
  3915. /*! exports used: default */
  3916. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3917. "use strict";
  3918. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(/*! ./_freeGlobal.js */ "./node_modules/lodash-es/_freeGlobal.js");
  3919. /** Detect free variable `self`. */
  3920. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  3921. /** Used as a reference to the global object. */
  3922. var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')();
  3923. /* harmony default export */ __webpack_exports__["a"] = (root);
  3924. /***/ }),
  3925. /***/ "./node_modules/lodash-es/isObjectLike.js":
  3926. /*!************************************************!*\
  3927. !*** ./node_modules/lodash-es/isObjectLike.js ***!
  3928. \************************************************/
  3929. /*! exports provided: default */
  3930. /*! exports used: default */
  3931. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3932. "use strict";
  3933. /**
  3934. * Checks if `value` is object-like. A value is object-like if it's not `null`
  3935. * and has a `typeof` result of "object".
  3936. *
  3937. * @static
  3938. * @memberOf _
  3939. * @since 4.0.0
  3940. * @category Lang
  3941. * @param {*} value The value to check.
  3942. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  3943. * @example
  3944. *
  3945. * _.isObjectLike({});
  3946. * // => true
  3947. *
  3948. * _.isObjectLike([1, 2, 3]);
  3949. * // => true
  3950. *
  3951. * _.isObjectLike(_.noop);
  3952. * // => false
  3953. *
  3954. * _.isObjectLike(null);
  3955. * // => false
  3956. */
  3957. function isObjectLike(value) {
  3958. return value != null && typeof value == 'object';
  3959. }
  3960. /* harmony default export */ __webpack_exports__["a"] = (isObjectLike);
  3961. /***/ }),
  3962. /***/ "./node_modules/lodash-es/isPlainObject.js":
  3963. /*!*************************************************!*\
  3964. !*** ./node_modules/lodash-es/isPlainObject.js ***!
  3965. \*************************************************/
  3966. /*! exports provided: default */
  3967. /*! exports used: default */
  3968. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3969. "use strict";
  3970. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(/*! ./_baseGetTag.js */ "./node_modules/lodash-es/_baseGetTag.js");
  3971. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(/*! ./_getPrototype.js */ "./node_modules/lodash-es/_getPrototype.js");
  3972. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(/*! ./isObjectLike.js */ "./node_modules/lodash-es/isObjectLike.js");
  3973. /** `Object#toString` result references. */
  3974. var objectTag = '[object Object]';
  3975. /** Used for built-in method references. */
  3976. var funcProto = Function.prototype,
  3977. objectProto = Object.prototype;
  3978. /** Used to resolve the decompiled source of functions. */
  3979. var funcToString = funcProto.toString;
  3980. /** Used to check objects for own properties. */
  3981. var hasOwnProperty = objectProto.hasOwnProperty;
  3982. /** Used to infer the `Object` constructor. */
  3983. var objectCtorString = funcToString.call(Object);
  3984. /**
  3985. * Checks if `value` is a plain object, that is, an object created by the
  3986. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  3987. *
  3988. * @static
  3989. * @memberOf _
  3990. * @since 0.8.0
  3991. * @category Lang
  3992. * @param {*} value The value to check.
  3993. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  3994. * @example
  3995. *
  3996. * function Foo() {
  3997. * this.a = 1;
  3998. * }
  3999. *
  4000. * _.isPlainObject(new Foo);
  4001. * // => false
  4002. *
  4003. * _.isPlainObject([1, 2, 3]);
  4004. * // => false
  4005. *
  4006. * _.isPlainObject({ 'x': 0, 'y': 0 });
  4007. * // => true
  4008. *
  4009. * _.isPlainObject(Object.create(null));
  4010. * // => true
  4011. */
  4012. function isPlainObject(value) {
  4013. if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) {
  4014. return false;
  4015. }
  4016. var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value);
  4017. if (proto === null) {
  4018. return true;
  4019. }
  4020. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  4021. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  4022. funcToString.call(Ctor) == objectCtorString;
  4023. }
  4024. /* harmony default export */ __webpack_exports__["a"] = (isPlainObject);
  4025. /***/ }),
  4026. /***/ "./node_modules/ms/index.js":
  4027. /*!**********************************!*\
  4028. !*** ./node_modules/ms/index.js ***!
  4029. \**********************************/
  4030. /*! dynamic exports provided */
  4031. /*! all exports used */
  4032. /***/ (function(module, exports) {
  4033. /**
  4034. * Helpers.
  4035. */
  4036. var s = 1000;
  4037. var m = s * 60;
  4038. var h = m * 60;
  4039. var d = h * 24;
  4040. var y = d * 365.25;
  4041. /**
  4042. * Parse or format the given `val`.
  4043. *
  4044. * Options:
  4045. *
  4046. * - `long` verbose formatting [false]
  4047. *
  4048. * @param {String|Number} val
  4049. * @param {Object} [options]
  4050. * @throws {Error} throw an error if val is not a non-empty string or a number
  4051. * @return {String|Number}
  4052. * @api public
  4053. */
  4054. module.exports = function(val, options) {
  4055. options = options || {};
  4056. var type = typeof val;
  4057. if (type === 'string' && val.length > 0) {
  4058. return parse(val);
  4059. } else if (type === 'number' && isNaN(val) === false) {
  4060. return options.long ? fmtLong(val) : fmtShort(val);
  4061. }
  4062. throw new Error(
  4063. 'val is not a non-empty string or a valid number. val=' +
  4064. JSON.stringify(val)
  4065. );
  4066. };
  4067. /**
  4068. * Parse the given `str` and return milliseconds.
  4069. *
  4070. * @param {String} str
  4071. * @return {Number}
  4072. * @api private
  4073. */
  4074. function parse(str) {
  4075. str = String(str);
  4076. if (str.length > 100) {
  4077. return;
  4078. }
  4079. var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
  4080. str
  4081. );
  4082. if (!match) {
  4083. return;
  4084. }
  4085. var n = parseFloat(match[1]);
  4086. var type = (match[2] || 'ms').toLowerCase();
  4087. switch (type) {
  4088. case 'years':
  4089. case 'year':
  4090. case 'yrs':
  4091. case 'yr':
  4092. case 'y':
  4093. return n * y;
  4094. case 'days':
  4095. case 'day':
  4096. case 'd':
  4097. return n * d;
  4098. case 'hours':
  4099. case 'hour':
  4100. case 'hrs':
  4101. case 'hr':
  4102. case 'h':
  4103. return n * h;
  4104. case 'minutes':
  4105. case 'minute':
  4106. case 'mins':
  4107. case 'min':
  4108. case 'm':
  4109. return n * m;
  4110. case 'seconds':
  4111. case 'second':
  4112. case 'secs':
  4113. case 'sec':
  4114. case 's':
  4115. return n * s;
  4116. case 'milliseconds':
  4117. case 'millisecond':
  4118. case 'msecs':
  4119. case 'msec':
  4120. case 'ms':
  4121. return n;
  4122. default:
  4123. return undefined;
  4124. }
  4125. }
  4126. /**
  4127. * Short format for `ms`.
  4128. *
  4129. * @param {Number} ms
  4130. * @return {String}
  4131. * @api private
  4132. */
  4133. function fmtShort(ms) {
  4134. if (ms >= d) {
  4135. return Math.round(ms / d) + 'd';
  4136. }
  4137. if (ms >= h) {
  4138. return Math.round(ms / h) + 'h';
  4139. }
  4140. if (ms >= m) {
  4141. return Math.round(ms / m) + 'm';
  4142. }
  4143. if (ms >= s) {
  4144. return Math.round(ms / s) + 's';
  4145. }
  4146. return ms + 'ms';
  4147. }
  4148. /**
  4149. * Long format for `ms`.
  4150. *
  4151. * @param {Number} ms
  4152. * @return {String}
  4153. * @api private
  4154. */
  4155. function fmtLong(ms) {
  4156. return plural(ms, d, 'day') ||
  4157. plural(ms, h, 'hour') ||
  4158. plural(ms, m, 'minute') ||
  4159. plural(ms, s, 'second') ||
  4160. ms + ' ms';
  4161. }
  4162. /**
  4163. * Pluralization helper.
  4164. */
  4165. function plural(ms, n, name) {
  4166. if (ms < n) {
  4167. return;
  4168. }
  4169. if (ms < n * 1.5) {
  4170. return Math.floor(ms / n) + ' ' + name;
  4171. }
  4172. return Math.ceil(ms / n) + ' ' + name + 's';
  4173. }
  4174. /***/ }),
  4175. /***/ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js":
  4176. /*!**************************************************************************!*\
  4177. !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***!
  4178. \**************************************************************************/
  4179. /*! dynamic exports provided */
  4180. /*! all exports used */
  4181. /***/ (function(module, exports, __webpack_require__) {
  4182. /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
  4183. ;(function(root) {
  4184. /** Detect free variables */
  4185. var freeExports = typeof exports == 'object' && exports &&
  4186. !exports.nodeType && exports;
  4187. var freeModule = typeof module == 'object' && module &&
  4188. !module.nodeType && module;
  4189. var freeGlobal = typeof global == 'object' && global;
  4190. if (
  4191. freeGlobal.global === freeGlobal ||
  4192. freeGlobal.window === freeGlobal ||
  4193. freeGlobal.self === freeGlobal
  4194. ) {
  4195. root = freeGlobal;
  4196. }
  4197. /**
  4198. * The `punycode` object.
  4199. * @name punycode
  4200. * @type Object
  4201. */
  4202. var punycode,
  4203. /** Highest positive signed 32-bit float value */
  4204. maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
  4205. /** Bootstring parameters */
  4206. base = 36,
  4207. tMin = 1,
  4208. tMax = 26,
  4209. skew = 38,
  4210. damp = 700,
  4211. initialBias = 72,
  4212. initialN = 128, // 0x80
  4213. delimiter = '-', // '\x2D'
  4214. /** Regular expressions */
  4215. regexPunycode = /^xn--/,
  4216. regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
  4217. regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
  4218. /** Error messages */
  4219. errors = {
  4220. 'overflow': 'Overflow: input needs wider integers to process',
  4221. 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  4222. 'invalid-input': 'Invalid input'
  4223. },
  4224. /** Convenience shortcuts */
  4225. baseMinusTMin = base - tMin,
  4226. floor = Math.floor,
  4227. stringFromCharCode = String.fromCharCode,
  4228. /** Temporary variable */
  4229. key;
  4230. /*--------------------------------------------------------------------------*/
  4231. /**
  4232. * A generic error utility function.
  4233. * @private
  4234. * @param {String} type The error type.
  4235. * @returns {Error} Throws a `RangeError` with the applicable error message.
  4236. */
  4237. function error(type) {
  4238. throw new RangeError(errors[type]);
  4239. }
  4240. /**
  4241. * A generic `Array#map` utility function.
  4242. * @private
  4243. * @param {Array} array The array to iterate over.
  4244. * @param {Function} callback The function that gets called for every array
  4245. * item.
  4246. * @returns {Array} A new array of values returned by the callback function.
  4247. */
  4248. function map(array, fn) {
  4249. var length = array.length;
  4250. var result = [];
  4251. while (length--) {
  4252. result[length] = fn(array[length]);
  4253. }
  4254. return result;
  4255. }
  4256. /**
  4257. * A simple `Array#map`-like wrapper to work with domain name strings or email
  4258. * addresses.
  4259. * @private
  4260. * @param {String} domain The domain name or email address.
  4261. * @param {Function} callback The function that gets called for every
  4262. * character.
  4263. * @returns {Array} A new string of characters returned by the callback
  4264. * function.
  4265. */
  4266. function mapDomain(string, fn) {
  4267. var parts = string.split('@');
  4268. var result = '';
  4269. if (parts.length > 1) {
  4270. // In email addresses, only the domain name should be punycoded. Leave
  4271. // the local part (i.e. everything up to `@`) intact.
  4272. result = parts[0] + '@';
  4273. string = parts[1];
  4274. }
  4275. // Avoid `split(regex)` for IE8 compatibility. See #17.
  4276. string = string.replace(regexSeparators, '\x2E');
  4277. var labels = string.split('.');
  4278. var encoded = map(labels, fn).join('.');
  4279. return result + encoded;
  4280. }
  4281. /**
  4282. * Creates an array containing the numeric code points of each Unicode
  4283. * character in the string. While JavaScript uses UCS-2 internally,
  4284. * this function will convert a pair of surrogate halves (each of which
  4285. * UCS-2 exposes as separate characters) into a single code point,
  4286. * matching UTF-16.
  4287. * @see `punycode.ucs2.encode`
  4288. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  4289. * @memberOf punycode.ucs2
  4290. * @name decode
  4291. * @param {String} string The Unicode input string (UCS-2).
  4292. * @returns {Array} The new array of code points.
  4293. */
  4294. function ucs2decode(string) {
  4295. var output = [],
  4296. counter = 0,
  4297. length = string.length,
  4298. value,
  4299. extra;
  4300. while (counter < length) {
  4301. value = string.charCodeAt(counter++);
  4302. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  4303. // high surrogate, and there is a next character
  4304. extra = string.charCodeAt(counter++);
  4305. if ((extra & 0xFC00) == 0xDC00) { // low surrogate
  4306. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  4307. } else {
  4308. // unmatched surrogate; only append this code unit, in case the next
  4309. // code unit is the high surrogate of a surrogate pair
  4310. output.push(value);
  4311. counter--;
  4312. }
  4313. } else {
  4314. output.push(value);
  4315. }
  4316. }
  4317. return output;
  4318. }
  4319. /**
  4320. * Creates a string based on an array of numeric code points.
  4321. * @see `punycode.ucs2.decode`
  4322. * @memberOf punycode.ucs2
  4323. * @name encode
  4324. * @param {Array} codePoints The array of numeric code points.
  4325. * @returns {String} The new Unicode string (UCS-2).
  4326. */
  4327. function ucs2encode(array) {
  4328. return map(array, function(value) {
  4329. var output = '';
  4330. if (value > 0xFFFF) {
  4331. value -= 0x10000;
  4332. output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
  4333. value = 0xDC00 | value & 0x3FF;
  4334. }
  4335. output += stringFromCharCode(value);
  4336. return output;
  4337. }).join('');
  4338. }
  4339. /**
  4340. * Converts a basic code point into a digit/integer.
  4341. * @see `digitToBasic()`
  4342. * @private
  4343. * @param {Number} codePoint The basic numeric code point value.
  4344. * @returns {Number} The numeric value of a basic code point (for use in
  4345. * representing integers) in the range `0` to `base - 1`, or `base` if
  4346. * the code point does not represent a value.
  4347. */
  4348. function basicToDigit(codePoint) {
  4349. if (codePoint - 48 < 10) {
  4350. return codePoint - 22;
  4351. }
  4352. if (codePoint - 65 < 26) {
  4353. return codePoint - 65;
  4354. }
  4355. if (codePoint - 97 < 26) {
  4356. return codePoint - 97;
  4357. }
  4358. return base;
  4359. }
  4360. /**
  4361. * Converts a digit/integer into a basic code point.
  4362. * @see `basicToDigit()`
  4363. * @private
  4364. * @param {Number} digit The numeric value of a basic code point.
  4365. * @returns {Number} The basic code point whose value (when used for
  4366. * representing integers) is `digit`, which needs to be in the range
  4367. * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
  4368. * used; else, the lowercase form is used. The behavior is undefined
  4369. * if `flag` is non-zero and `digit` has no uppercase form.
  4370. */
  4371. function digitToBasic(digit, flag) {
  4372. // 0..25 map to ASCII a..z or A..Z
  4373. // 26..35 map to ASCII 0..9
  4374. return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
  4375. }
  4376. /**
  4377. * Bias adaptation function as per section 3.4 of RFC 3492.
  4378. * https://tools.ietf.org/html/rfc3492#section-3.4
  4379. * @private
  4380. */
  4381. function adapt(delta, numPoints, firstTime) {
  4382. var k = 0;
  4383. delta = firstTime ? floor(delta / damp) : delta >> 1;
  4384. delta += floor(delta / numPoints);
  4385. for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
  4386. delta = floor(delta / baseMinusTMin);
  4387. }
  4388. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  4389. }
  4390. /**
  4391. * Converts a Punycode string of ASCII-only symbols to a string of Unicode
  4392. * symbols.
  4393. * @memberOf punycode
  4394. * @param {String} input The Punycode string of ASCII-only symbols.
  4395. * @returns {String} The resulting string of Unicode symbols.
  4396. */
  4397. function decode(input) {
  4398. // Don't use UCS-2
  4399. var output = [],
  4400. inputLength = input.length,
  4401. out,
  4402. i = 0,
  4403. n = initialN,
  4404. bias = initialBias,
  4405. basic,
  4406. j,
  4407. index,
  4408. oldi,
  4409. w,
  4410. k,
  4411. digit,
  4412. t,
  4413. /** Cached calculation results */
  4414. baseMinusT;
  4415. // Handle the basic code points: let `basic` be the number of input code
  4416. // points before the last delimiter, or `0` if there is none, then copy
  4417. // the first basic code points to the output.
  4418. basic = input.lastIndexOf(delimiter);
  4419. if (basic < 0) {
  4420. basic = 0;
  4421. }
  4422. for (j = 0; j < basic; ++j) {
  4423. // if it's not a basic code point
  4424. if (input.charCodeAt(j) >= 0x80) {
  4425. error('not-basic');
  4426. }
  4427. output.push(input.charCodeAt(j));
  4428. }
  4429. // Main decoding loop: start just after the last delimiter if any basic code
  4430. // points were copied; start at the beginning otherwise.
  4431. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
  4432. // `index` is the index of the next character to be consumed.
  4433. // Decode a generalized variable-length integer into `delta`,
  4434. // which gets added to `i`. The overflow checking is easier
  4435. // if we increase `i` as we go, then subtract off its starting
  4436. // value at the end to obtain `delta`.
  4437. for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
  4438. if (index >= inputLength) {
  4439. error('invalid-input');
  4440. }
  4441. digit = basicToDigit(input.charCodeAt(index++));
  4442. if (digit >= base || digit > floor((maxInt - i) / w)) {
  4443. error('overflow');
  4444. }
  4445. i += digit * w;
  4446. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  4447. if (digit < t) {
  4448. break;
  4449. }
  4450. baseMinusT = base - t;
  4451. if (w > floor(maxInt / baseMinusT)) {
  4452. error('overflow');
  4453. }
  4454. w *= baseMinusT;
  4455. }
  4456. out = output.length + 1;
  4457. bias = adapt(i - oldi, out, oldi == 0);
  4458. // `i` was supposed to wrap around from `out` to `0`,
  4459. // incrementing `n` each time, so we'll fix that now:
  4460. if (floor(i / out) > maxInt - n) {
  4461. error('overflow');
  4462. }
  4463. n += floor(i / out);
  4464. i %= out;
  4465. // Insert `n` at position `i` of the output
  4466. output.splice(i++, 0, n);
  4467. }
  4468. return ucs2encode(output);
  4469. }
  4470. /**
  4471. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  4472. * Punycode string of ASCII-only symbols.
  4473. * @memberOf punycode
  4474. * @param {String} input The string of Unicode symbols.
  4475. * @returns {String} The resulting Punycode string of ASCII-only symbols.
  4476. */
  4477. function encode(input) {
  4478. var n,
  4479. delta,
  4480. handledCPCount,
  4481. basicLength,
  4482. bias,
  4483. j,
  4484. m,
  4485. q,
  4486. k,
  4487. t,
  4488. currentValue,
  4489. output = [],
  4490. /** `inputLength` will hold the number of code points in `input`. */
  4491. inputLength,
  4492. /** Cached calculation results */
  4493. handledCPCountPlusOne,
  4494. baseMinusT,
  4495. qMinusT;
  4496. // Convert the input in UCS-2 to Unicode
  4497. input = ucs2decode(input);
  4498. // Cache the length
  4499. inputLength = input.length;
  4500. // Initialize the state
  4501. n = initialN;
  4502. delta = 0;
  4503. bias = initialBias;
  4504. // Handle the basic code points
  4505. for (j = 0; j < inputLength; ++j) {
  4506. currentValue = input[j];
  4507. if (currentValue < 0x80) {
  4508. output.push(stringFromCharCode(currentValue));
  4509. }
  4510. }
  4511. handledCPCount = basicLength = output.length;
  4512. // `handledCPCount` is the number of code points that have been handled;
  4513. // `basicLength` is the number of basic code points.
  4514. // Finish the basic string - if it is not empty - with a delimiter
  4515. if (basicLength) {
  4516. output.push(delimiter);
  4517. }
  4518. // Main encoding loop:
  4519. while (handledCPCount < inputLength) {
  4520. // All non-basic code points < n have been handled already. Find the next
  4521. // larger one:
  4522. for (m = maxInt, j = 0; j < inputLength; ++j) {
  4523. currentValue = input[j];
  4524. if (currentValue >= n && currentValue < m) {
  4525. m = currentValue;
  4526. }
  4527. }
  4528. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
  4529. // but guard against overflow
  4530. handledCPCountPlusOne = handledCPCount + 1;
  4531. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  4532. error('overflow');
  4533. }
  4534. delta += (m - n) * handledCPCountPlusOne;
  4535. n = m;
  4536. for (j = 0; j < inputLength; ++j) {
  4537. currentValue = input[j];
  4538. if (currentValue < n && ++delta > maxInt) {
  4539. error('overflow');
  4540. }
  4541. if (currentValue == n) {
  4542. // Represent delta as a generalized variable-length integer
  4543. for (q = delta, k = base; /* no condition */; k += base) {
  4544. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  4545. if (q < t) {
  4546. break;
  4547. }
  4548. qMinusT = q - t;
  4549. baseMinusT = base - t;
  4550. output.push(
  4551. stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
  4552. );
  4553. q = floor(qMinusT / baseMinusT);
  4554. }
  4555. output.push(stringFromCharCode(digitToBasic(q, 0)));
  4556. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  4557. delta = 0;
  4558. ++handledCPCount;
  4559. }
  4560. }
  4561. ++delta;
  4562. ++n;
  4563. }
  4564. return output.join('');
  4565. }
  4566. /**
  4567. * Converts a Punycode string representing a domain name or an email address
  4568. * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
  4569. * it doesn't matter if you call it on a string that has already been
  4570. * converted to Unicode.
  4571. * @memberOf punycode
  4572. * @param {String} input The Punycoded domain name or email address to
  4573. * convert to Unicode.
  4574. * @returns {String} The Unicode representation of the given Punycode
  4575. * string.
  4576. */
  4577. function toUnicode(input) {
  4578. return mapDomain(input, function(string) {
  4579. return regexPunycode.test(string)
  4580. ? decode(string.slice(4).toLowerCase())
  4581. : string;
  4582. });
  4583. }
  4584. /**
  4585. * Converts a Unicode string representing a domain name or an email address to
  4586. * Punycode. Only the non-ASCII parts of the domain name will be converted,
  4587. * i.e. it doesn't matter if you call it with a domain that's already in
  4588. * ASCII.
  4589. * @memberOf punycode
  4590. * @param {String} input The domain name or email address to convert, as a
  4591. * Unicode string.
  4592. * @returns {String} The Punycode representation of the given domain name or
  4593. * email address.
  4594. */
  4595. function toASCII(input) {
  4596. return mapDomain(input, function(string) {
  4597. return regexNonASCII.test(string)
  4598. ? 'xn--' + encode(string)
  4599. : string;
  4600. });
  4601. }
  4602. /*--------------------------------------------------------------------------*/
  4603. /** Define the public API */
  4604. punycode = {
  4605. /**
  4606. * A string representing the current Punycode.js version number.
  4607. * @memberOf punycode
  4608. * @type String
  4609. */
  4610. 'version': '1.4.1',
  4611. /**
  4612. * An object of methods to convert from JavaScript's internal character
  4613. * representation (UCS-2) to Unicode code points, and back.
  4614. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  4615. * @memberOf punycode
  4616. * @type Object
  4617. */
  4618. 'ucs2': {
  4619. 'decode': ucs2decode,
  4620. 'encode': ucs2encode
  4621. },
  4622. 'decode': decode,
  4623. 'encode': encode,
  4624. 'toASCII': toASCII,
  4625. 'toUnicode': toUnicode
  4626. };
  4627. /** Expose `punycode` */
  4628. // Some AMD build optimizers, like r.js, check for specific condition patterns
  4629. // like the following:
  4630. if (
  4631. true
  4632. ) {
  4633. !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
  4634. return punycode;
  4635. }.call(exports, __webpack_require__, exports, module),
  4636. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  4637. } else if (freeExports && freeModule) {
  4638. if (module.exports == freeExports) {
  4639. // in Node.js, io.js, or RingoJS v0.8.0+
  4640. freeModule.exports = punycode;
  4641. } else {
  4642. // in Narwhal or RingoJS v0.7.0-
  4643. for (key in punycode) {
  4644. punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
  4645. }
  4646. }
  4647. } else {
  4648. // in Rhino or a web browser
  4649. root.punycode = punycode;
  4650. }
  4651. }(this));
  4652. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  4653. /***/ }),
  4654. /***/ "./node_modules/object-assign/index.js":
  4655. /*!*********************************************!*\
  4656. !*** ./node_modules/object-assign/index.js ***!
  4657. \*********************************************/
  4658. /*! dynamic exports provided */
  4659. /*! all exports used */
  4660. /***/ (function(module, exports, __webpack_require__) {
  4661. "use strict";
  4662. /*
  4663. object-assign
  4664. (c) Sindre Sorhus
  4665. @license MIT
  4666. */
  4667. /* eslint-disable no-unused-vars */
  4668. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  4669. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4670. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  4671. function toObject(val) {
  4672. if (val === null || val === undefined) {
  4673. throw new TypeError('Object.assign cannot be called with null or undefined');
  4674. }
  4675. return Object(val);
  4676. }
  4677. function shouldUseNative() {
  4678. try {
  4679. if (!Object.assign) {
  4680. return false;
  4681. }
  4682. // Detect buggy property enumeration order in older V8 versions.
  4683. // https://bugs.chromium.org/p/v8/issues/detail?id=4118
  4684. var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
  4685. test1[5] = 'de';
  4686. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  4687. return false;
  4688. }
  4689. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  4690. var test2 = {};
  4691. for (var i = 0; i < 10; i++) {
  4692. test2['_' + String.fromCharCode(i)] = i;
  4693. }
  4694. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  4695. return test2[n];
  4696. });
  4697. if (order2.join('') !== '0123456789') {
  4698. return false;
  4699. }
  4700. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  4701. var test3 = {};
  4702. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  4703. test3[letter] = letter;
  4704. });
  4705. if (Object.keys(Object.assign({}, test3)).join('') !==
  4706. 'abcdefghijklmnopqrst') {
  4707. return false;
  4708. }
  4709. return true;
  4710. } catch (err) {
  4711. // We don't expect any of the above to throw, but better to be safe.
  4712. return false;
  4713. }
  4714. }
  4715. module.exports = shouldUseNative() ? Object.assign : function (target, source) {
  4716. var from;
  4717. var to = toObject(target);
  4718. var symbols;
  4719. for (var s = 1; s < arguments.length; s++) {
  4720. from = Object(arguments[s]);
  4721. for (var key in from) {
  4722. if (hasOwnProperty.call(from, key)) {
  4723. to[key] = from[key];
  4724. }
  4725. }
  4726. if (getOwnPropertySymbols) {
  4727. symbols = getOwnPropertySymbols(from);
  4728. for (var i = 0; i < symbols.length; i++) {
  4729. if (propIsEnumerable.call(from, symbols[i])) {
  4730. to[symbols[i]] = from[symbols[i]];
  4731. }
  4732. }
  4733. }
  4734. }
  4735. return to;
  4736. };
  4737. /***/ }),
  4738. /***/ "./node_modules/path-to-regexp/index.js":
  4739. /*!**********************************************!*\
  4740. !*** ./node_modules/path-to-regexp/index.js ***!
  4741. \**********************************************/
  4742. /*! dynamic exports provided */
  4743. /*! exports used: default */
  4744. /***/ (function(module, exports, __webpack_require__) {
  4745. var isarray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js")
  4746. /**
  4747. * Expose `pathToRegexp`.
  4748. */
  4749. module.exports = pathToRegexp
  4750. module.exports.parse = parse
  4751. module.exports.compile = compile
  4752. module.exports.tokensToFunction = tokensToFunction
  4753. module.exports.tokensToRegExp = tokensToRegExp
  4754. /**
  4755. * The main path matching regexp utility.
  4756. *
  4757. * @type {RegExp}
  4758. */
  4759. var PATH_REGEXP = new RegExp([
  4760. // Match escaped characters that would otherwise appear in future matches.
  4761. // This allows the user to escape special characters that won't transform.
  4762. '(\\\\.)',
  4763. // Match Express-style parameters and un-named parameters with a prefix
  4764. // and optional suffixes. Matches appear as:
  4765. //
  4766. // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
  4767. // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
  4768. // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
  4769. '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
  4770. ].join('|'), 'g')
  4771. /**
  4772. * Parse a string for the raw tokens.
  4773. *
  4774. * @param {string} str
  4775. * @param {Object=} options
  4776. * @return {!Array}
  4777. */
  4778. function parse (str, options) {
  4779. var tokens = []
  4780. var key = 0
  4781. var index = 0
  4782. var path = ''
  4783. var defaultDelimiter = options && options.delimiter || '/'
  4784. var res
  4785. while ((res = PATH_REGEXP.exec(str)) != null) {
  4786. var m = res[0]
  4787. var escaped = res[1]
  4788. var offset = res.index
  4789. path += str.slice(index, offset)
  4790. index = offset + m.length
  4791. // Ignore already escaped sequences.
  4792. if (escaped) {
  4793. path += escaped[1]
  4794. continue
  4795. }
  4796. var next = str[index]
  4797. var prefix = res[2]
  4798. var name = res[3]
  4799. var capture = res[4]
  4800. var group = res[5]
  4801. var modifier = res[6]
  4802. var asterisk = res[7]
  4803. // Push the current path onto the tokens.
  4804. if (path) {
  4805. tokens.push(path)
  4806. path = ''
  4807. }
  4808. var partial = prefix != null && next != null && next !== prefix
  4809. var repeat = modifier === '+' || modifier === '*'
  4810. var optional = modifier === '?' || modifier === '*'
  4811. var delimiter = res[2] || defaultDelimiter
  4812. var pattern = capture || group
  4813. tokens.push({
  4814. name: name || key++,
  4815. prefix: prefix || '',
  4816. delimiter: delimiter,
  4817. optional: optional,
  4818. repeat: repeat,
  4819. partial: partial,
  4820. asterisk: !!asterisk,
  4821. pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
  4822. })
  4823. }
  4824. // Match any characters still remaining.
  4825. if (index < str.length) {
  4826. path += str.substr(index)
  4827. }
  4828. // If the path exists, push it onto the end.
  4829. if (path) {
  4830. tokens.push(path)
  4831. }
  4832. return tokens
  4833. }
  4834. /**
  4835. * Compile a string to a template function for the path.
  4836. *
  4837. * @param {string} str
  4838. * @param {Object=} options
  4839. * @return {!function(Object=, Object=)}
  4840. */
  4841. function compile (str, options) {
  4842. return tokensToFunction(parse(str, options), options)
  4843. }
  4844. /**
  4845. * Prettier encoding of URI path segments.
  4846. *
  4847. * @param {string}
  4848. * @return {string}
  4849. */
  4850. function encodeURIComponentPretty (str) {
  4851. return encodeURI(str).replace(/[\/?#]/g, function (c) {
  4852. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  4853. })
  4854. }
  4855. /**
  4856. * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
  4857. *
  4858. * @param {string}
  4859. * @return {string}
  4860. */
  4861. function encodeAsterisk (str) {
  4862. return encodeURI(str).replace(/[?#]/g, function (c) {
  4863. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  4864. })
  4865. }
  4866. /**
  4867. * Expose a method for transforming tokens into the path function.
  4868. */
  4869. function tokensToFunction (tokens, options) {
  4870. // Compile all the tokens into regexps.
  4871. var matches = new Array(tokens.length)
  4872. // Compile all the patterns before compilation.
  4873. for (var i = 0; i < tokens.length; i++) {
  4874. if (typeof tokens[i] === 'object') {
  4875. matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
  4876. }
  4877. }
  4878. return function (obj, opts) {
  4879. var path = ''
  4880. var data = obj || {}
  4881. var options = opts || {}
  4882. var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
  4883. for (var i = 0; i < tokens.length; i++) {
  4884. var token = tokens[i]
  4885. if (typeof token === 'string') {
  4886. path += token
  4887. continue
  4888. }
  4889. var value = data[token.name]
  4890. var segment
  4891. if (value == null) {
  4892. if (token.optional) {
  4893. // Prepend partial segment prefixes.
  4894. if (token.partial) {
  4895. path += token.prefix
  4896. }
  4897. continue
  4898. } else {
  4899. throw new TypeError('Expected "' + token.name + '" to be defined')
  4900. }
  4901. }
  4902. if (isarray(value)) {
  4903. if (!token.repeat) {
  4904. throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
  4905. }
  4906. if (value.length === 0) {
  4907. if (token.optional) {
  4908. continue
  4909. } else {
  4910. throw new TypeError('Expected "' + token.name + '" to not be empty')
  4911. }
  4912. }
  4913. for (var j = 0; j < value.length; j++) {
  4914. segment = encode(value[j])
  4915. if (!matches[i].test(segment)) {
  4916. throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
  4917. }
  4918. path += (j === 0 ? token.prefix : token.delimiter) + segment
  4919. }
  4920. continue
  4921. }
  4922. segment = token.asterisk ? encodeAsterisk(value) : encode(value)
  4923. if (!matches[i].test(segment)) {
  4924. throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
  4925. }
  4926. path += token.prefix + segment
  4927. }
  4928. return path
  4929. }
  4930. }
  4931. /**
  4932. * Escape a regular expression string.
  4933. *
  4934. * @param {string} str
  4935. * @return {string}
  4936. */
  4937. function escapeString (str) {
  4938. return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
  4939. }
  4940. /**
  4941. * Escape the capturing group by escaping special characters and meaning.
  4942. *
  4943. * @param {string} group
  4944. * @return {string}
  4945. */
  4946. function escapeGroup (group) {
  4947. return group.replace(/([=!:$\/()])/g, '\\$1')
  4948. }
  4949. /**
  4950. * Attach the keys as a property of the regexp.
  4951. *
  4952. * @param {!RegExp} re
  4953. * @param {Array} keys
  4954. * @return {!RegExp}
  4955. */
  4956. function attachKeys (re, keys) {
  4957. re.keys = keys
  4958. return re
  4959. }
  4960. /**
  4961. * Get the flags for a regexp from the options.
  4962. *
  4963. * @param {Object} options
  4964. * @return {string}
  4965. */
  4966. function flags (options) {
  4967. return options && options.sensitive ? '' : 'i'
  4968. }
  4969. /**
  4970. * Pull out keys from a regexp.
  4971. *
  4972. * @param {!RegExp} path
  4973. * @param {!Array} keys
  4974. * @return {!RegExp}
  4975. */
  4976. function regexpToRegexp (path, keys) {
  4977. // Use a negative lookahead to match only capturing groups.
  4978. var groups = path.source.match(/\((?!\?)/g)
  4979. if (groups) {
  4980. for (var i = 0; i < groups.length; i++) {
  4981. keys.push({
  4982. name: i,
  4983. prefix: null,
  4984. delimiter: null,
  4985. optional: false,
  4986. repeat: false,
  4987. partial: false,
  4988. asterisk: false,
  4989. pattern: null
  4990. })
  4991. }
  4992. }
  4993. return attachKeys(path, keys)
  4994. }
  4995. /**
  4996. * Transform an array into a regexp.
  4997. *
  4998. * @param {!Array} path
  4999. * @param {Array} keys
  5000. * @param {!Object} options
  5001. * @return {!RegExp}
  5002. */
  5003. function arrayToRegexp (path, keys, options) {
  5004. var parts = []
  5005. for (var i = 0; i < path.length; i++) {
  5006. parts.push(pathToRegexp(path[i], keys, options).source)
  5007. }
  5008. var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
  5009. return attachKeys(regexp, keys)
  5010. }
  5011. /**
  5012. * Create a path regexp from string input.
  5013. *
  5014. * @param {string} path
  5015. * @param {!Array} keys
  5016. * @param {!Object} options
  5017. * @return {!RegExp}
  5018. */
  5019. function stringToRegexp (path, keys, options) {
  5020. return tokensToRegExp(parse(path, options), keys, options)
  5021. }
  5022. /**
  5023. * Expose a function for taking tokens and returning a RegExp.
  5024. *
  5025. * @param {!Array} tokens
  5026. * @param {(Array|Object)=} keys
  5027. * @param {Object=} options
  5028. * @return {!RegExp}
  5029. */
  5030. function tokensToRegExp (tokens, keys, options) {
  5031. if (!isarray(keys)) {
  5032. options = /** @type {!Object} */ (keys || options)
  5033. keys = []
  5034. }
  5035. options = options || {}
  5036. var strict = options.strict
  5037. var end = options.end !== false
  5038. var route = ''
  5039. // Iterate over the tokens and create our regexp string.
  5040. for (var i = 0; i < tokens.length; i++) {
  5041. var token = tokens[i]
  5042. if (typeof token === 'string') {
  5043. route += escapeString(token)
  5044. } else {
  5045. var prefix = escapeString(token.prefix)
  5046. var capture = '(?:' + token.pattern + ')'
  5047. keys.push(token)
  5048. if (token.repeat) {
  5049. capture += '(?:' + prefix + capture + ')*'
  5050. }
  5051. if (token.optional) {
  5052. if (!token.partial) {
  5053. capture = '(?:' + prefix + '(' + capture + '))?'
  5054. } else {
  5055. capture = prefix + '(' + capture + ')?'
  5056. }
  5057. } else {
  5058. capture = prefix + '(' + capture + ')'
  5059. }
  5060. route += capture
  5061. }
  5062. }
  5063. var delimiter = escapeString(options.delimiter || '/')
  5064. var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
  5065. // In non-strict mode we allow a slash at the end of match. If the path to
  5066. // match already ends with a slash, we remove it for consistency. The slash
  5067. // is valid at the end of a path match, not in the middle. This is important
  5068. // in non-ending mode, where "/test/" shouldn't match "/test//route".
  5069. if (!strict) {
  5070. route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
  5071. }
  5072. if (end) {
  5073. route += '$'
  5074. } else {
  5075. // In non-ending mode, we need the capturing groups to match as much as
  5076. // possible by using a positive lookahead to the end or next path segment.
  5077. route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
  5078. }
  5079. return attachKeys(new RegExp('^' + route, flags(options)), keys)
  5080. }
  5081. /**
  5082. * Normalize the given path string, returning a regular expression.
  5083. *
  5084. * An empty array can be passed in for the keys, which will hold the
  5085. * placeholder key descriptions. For example, using `/user/:id`, `keys` will
  5086. * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
  5087. *
  5088. * @param {(string|RegExp|Array)} path
  5089. * @param {(Array|Object)=} keys
  5090. * @param {Object=} options
  5091. * @return {!RegExp}
  5092. */
  5093. function pathToRegexp (path, keys, options) {
  5094. if (!isarray(keys)) {
  5095. options = /** @type {!Object} */ (keys || options)
  5096. keys = []
  5097. }
  5098. options = options || {}
  5099. if (path instanceof RegExp) {
  5100. return regexpToRegexp(path, /** @type {!Array} */ (keys))
  5101. }
  5102. if (isarray(path)) {
  5103. return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
  5104. }
  5105. return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
  5106. }
  5107. /***/ }),
  5108. /***/ "./node_modules/process/browser.js":
  5109. /*!*****************************************!*\
  5110. !*** ./node_modules/process/browser.js ***!
  5111. \*****************************************/
  5112. /*! dynamic exports provided */
  5113. /*! all exports used */
  5114. /***/ (function(module, exports) {
  5115. // shim for using process in browser
  5116. var process = module.exports = {};
  5117. // cached from whatever global is present so that test runners that stub it
  5118. // don't break things. But we need to wrap it in a try catch in case it is
  5119. // wrapped in strict mode code which doesn't define any globals. It's inside a
  5120. // function because try/catches deoptimize in certain engines.
  5121. var cachedSetTimeout;
  5122. var cachedClearTimeout;
  5123. function defaultSetTimout() {
  5124. throw new Error('setTimeout has not been defined');
  5125. }
  5126. function defaultClearTimeout () {
  5127. throw new Error('clearTimeout has not been defined');
  5128. }
  5129. (function () {
  5130. try {
  5131. if (typeof setTimeout === 'function') {
  5132. cachedSetTimeout = setTimeout;
  5133. } else {
  5134. cachedSetTimeout = defaultSetTimout;
  5135. }
  5136. } catch (e) {
  5137. cachedSetTimeout = defaultSetTimout;
  5138. }
  5139. try {
  5140. if (typeof clearTimeout === 'function') {
  5141. cachedClearTimeout = clearTimeout;
  5142. } else {
  5143. cachedClearTimeout = defaultClearTimeout;
  5144. }
  5145. } catch (e) {
  5146. cachedClearTimeout = defaultClearTimeout;
  5147. }
  5148. } ())
  5149. function runTimeout(fun) {
  5150. if (cachedSetTimeout === setTimeout) {
  5151. //normal enviroments in sane situations
  5152. return setTimeout(fun, 0);
  5153. }
  5154. // if setTimeout wasn't available but was latter defined
  5155. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  5156. cachedSetTimeout = setTimeout;
  5157. return setTimeout(fun, 0);
  5158. }
  5159. try {
  5160. // when when somebody has screwed with setTimeout but no I.E. maddness
  5161. return cachedSetTimeout(fun, 0);
  5162. } catch(e){
  5163. try {
  5164. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  5165. return cachedSetTimeout.call(null, fun, 0);
  5166. } catch(e){
  5167. // 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
  5168. return cachedSetTimeout.call(this, fun, 0);
  5169. }
  5170. }
  5171. }
  5172. function runClearTimeout(marker) {
  5173. if (cachedClearTimeout === clearTimeout) {
  5174. //normal enviroments in sane situations
  5175. return clearTimeout(marker);
  5176. }
  5177. // if clearTimeout wasn't available but was latter defined
  5178. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  5179. cachedClearTimeout = clearTimeout;
  5180. return clearTimeout(marker);
  5181. }
  5182. try {
  5183. // when when somebody has screwed with setTimeout but no I.E. maddness
  5184. return cachedClearTimeout(marker);
  5185. } catch (e){
  5186. try {
  5187. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  5188. return cachedClearTimeout.call(null, marker);
  5189. } catch (e){
  5190. // 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.
  5191. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  5192. return cachedClearTimeout.call(this, marker);
  5193. }
  5194. }
  5195. }
  5196. var queue = [];
  5197. var draining = false;
  5198. var currentQueue;
  5199. var queueIndex = -1;
  5200. function cleanUpNextTick() {
  5201. if (!draining || !currentQueue) {
  5202. return;
  5203. }
  5204. draining = false;
  5205. if (currentQueue.length) {
  5206. queue = currentQueue.concat(queue);
  5207. } else {
  5208. queueIndex = -1;
  5209. }
  5210. if (queue.length) {
  5211. drainQueue();
  5212. }
  5213. }
  5214. function drainQueue() {
  5215. if (draining) {
  5216. return;
  5217. }
  5218. var timeout = runTimeout(cleanUpNextTick);
  5219. draining = true;
  5220. var len = queue.length;
  5221. while(len) {
  5222. currentQueue = queue;
  5223. queue = [];
  5224. while (++queueIndex < len) {
  5225. if (currentQueue) {
  5226. currentQueue[queueIndex].run();
  5227. }
  5228. }
  5229. queueIndex = -1;
  5230. len = queue.length;
  5231. }
  5232. currentQueue = null;
  5233. draining = false;
  5234. runClearTimeout(timeout);
  5235. }
  5236. process.nextTick = function (fun) {
  5237. var args = new Array(arguments.length - 1);
  5238. if (arguments.length > 1) {
  5239. for (var i = 1; i < arguments.length; i++) {
  5240. args[i - 1] = arguments[i];
  5241. }
  5242. }
  5243. queue.push(new Item(fun, args));
  5244. if (queue.length === 1 && !draining) {
  5245. runTimeout(drainQueue);
  5246. }
  5247. };
  5248. // v8 likes predictible objects
  5249. function Item(fun, array) {
  5250. this.fun = fun;
  5251. this.array = array;
  5252. }
  5253. Item.prototype.run = function () {
  5254. this.fun.apply(null, this.array);
  5255. };
  5256. process.title = 'browser';
  5257. process.browser = true;
  5258. process.env = {};
  5259. process.argv = [];
  5260. process.version = ''; // empty string to avoid regexp issues
  5261. process.versions = {};
  5262. function noop() {}
  5263. process.on = noop;
  5264. process.addListener = noop;
  5265. process.once = noop;
  5266. process.off = noop;
  5267. process.removeListener = noop;
  5268. process.removeAllListeners = noop;
  5269. process.emit = noop;
  5270. process.prependListener = noop;
  5271. process.prependOnceListener = noop;
  5272. process.listeners = function (name) { return [] }
  5273. process.binding = function (name) {
  5274. throw new Error('process.binding is not supported');
  5275. };
  5276. process.cwd = function () { return '/' };
  5277. process.chdir = function (dir) {
  5278. throw new Error('process.chdir is not supported');
  5279. };
  5280. process.umask = function() { return 0; };
  5281. /***/ }),
  5282. /***/ "./node_modules/promise/lib/core.js":
  5283. /*!******************************************!*\
  5284. !*** ./node_modules/promise/lib/core.js ***!
  5285. \******************************************/
  5286. /*! dynamic exports provided */
  5287. /*! all exports used */
  5288. /***/ (function(module, exports, __webpack_require__) {
  5289. "use strict";
  5290. var asap = __webpack_require__(/*! asap/raw */ "./node_modules/asap/browser-raw.js");
  5291. function noop() {}
  5292. // States:
  5293. //
  5294. // 0 - pending
  5295. // 1 - fulfilled with _value
  5296. // 2 - rejected with _value
  5297. // 3 - adopted the state of another promise, _value
  5298. //
  5299. // once the state is no longer pending (0) it is immutable
  5300. // All `_` prefixed properties will be reduced to `_{random number}`
  5301. // at build time to obfuscate them and discourage their use.
  5302. // We don't use symbols or Object.defineProperty to fully hide them
  5303. // because the performance isn't good enough.
  5304. // to avoid using try/catch inside critical functions, we
  5305. // extract them to here.
  5306. var LAST_ERROR = null;
  5307. var IS_ERROR = {};
  5308. function getThen(obj) {
  5309. try {
  5310. return obj.then;
  5311. } catch (ex) {
  5312. LAST_ERROR = ex;
  5313. return IS_ERROR;
  5314. }
  5315. }
  5316. function tryCallOne(fn, a) {
  5317. try {
  5318. return fn(a);
  5319. } catch (ex) {
  5320. LAST_ERROR = ex;
  5321. return IS_ERROR;
  5322. }
  5323. }
  5324. function tryCallTwo(fn, a, b) {
  5325. try {
  5326. fn(a, b);
  5327. } catch (ex) {
  5328. LAST_ERROR = ex;
  5329. return IS_ERROR;
  5330. }
  5331. }
  5332. module.exports = Promise;
  5333. function Promise(fn) {
  5334. if (typeof this !== 'object') {
  5335. throw new TypeError('Promises must be constructed via new');
  5336. }
  5337. if (typeof fn !== 'function') {
  5338. throw new TypeError('Promise constructor\'s argument is not a function');
  5339. }
  5340. this._75 = 0;
  5341. this._83 = 0;
  5342. this._18 = null;
  5343. this._38 = null;
  5344. if (fn === noop) return;
  5345. doResolve(fn, this);
  5346. }
  5347. Promise._47 = null;
  5348. Promise._71 = null;
  5349. Promise._44 = noop;
  5350. Promise.prototype.then = function(onFulfilled, onRejected) {
  5351. if (this.constructor !== Promise) {
  5352. return safeThen(this, onFulfilled, onRejected);
  5353. }
  5354. var res = new Promise(noop);
  5355. handle(this, new Handler(onFulfilled, onRejected, res));
  5356. return res;
  5357. };
  5358. function safeThen(self, onFulfilled, onRejected) {
  5359. return new self.constructor(function (resolve, reject) {
  5360. var res = new Promise(noop);
  5361. res.then(resolve, reject);
  5362. handle(self, new Handler(onFulfilled, onRejected, res));
  5363. });
  5364. }
  5365. function handle(self, deferred) {
  5366. while (self._83 === 3) {
  5367. self = self._18;
  5368. }
  5369. if (Promise._47) {
  5370. Promise._47(self);
  5371. }
  5372. if (self._83 === 0) {
  5373. if (self._75 === 0) {
  5374. self._75 = 1;
  5375. self._38 = deferred;
  5376. return;
  5377. }
  5378. if (self._75 === 1) {
  5379. self._75 = 2;
  5380. self._38 = [self._38, deferred];
  5381. return;
  5382. }
  5383. self._38.push(deferred);
  5384. return;
  5385. }
  5386. handleResolved(self, deferred);
  5387. }
  5388. function handleResolved(self, deferred) {
  5389. asap(function() {
  5390. var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;
  5391. if (cb === null) {
  5392. if (self._83 === 1) {
  5393. resolve(deferred.promise, self._18);
  5394. } else {
  5395. reject(deferred.promise, self._18);
  5396. }
  5397. return;
  5398. }
  5399. var ret = tryCallOne(cb, self._18);
  5400. if (ret === IS_ERROR) {
  5401. reject(deferred.promise, LAST_ERROR);
  5402. } else {
  5403. resolve(deferred.promise, ret);
  5404. }
  5405. });
  5406. }
  5407. function resolve(self, newValue) {
  5408. // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
  5409. if (newValue === self) {
  5410. return reject(
  5411. self,
  5412. new TypeError('A promise cannot be resolved with itself.')
  5413. );
  5414. }
  5415. if (
  5416. newValue &&
  5417. (typeof newValue === 'object' || typeof newValue === 'function')
  5418. ) {
  5419. var then = getThen(newValue);
  5420. if (then === IS_ERROR) {
  5421. return reject(self, LAST_ERROR);
  5422. }
  5423. if (
  5424. then === self.then &&
  5425. newValue instanceof Promise
  5426. ) {
  5427. self._83 = 3;
  5428. self._18 = newValue;
  5429. finale(self);
  5430. return;
  5431. } else if (typeof then === 'function') {
  5432. doResolve(then.bind(newValue), self);
  5433. return;
  5434. }
  5435. }
  5436. self._83 = 1;
  5437. self._18 = newValue;
  5438. finale(self);
  5439. }
  5440. function reject(self, newValue) {
  5441. self._83 = 2;
  5442. self._18 = newValue;
  5443. if (Promise._71) {
  5444. Promise._71(self, newValue);
  5445. }
  5446. finale(self);
  5447. }
  5448. function finale(self) {
  5449. if (self._75 === 1) {
  5450. handle(self, self._38);
  5451. self._38 = null;
  5452. }
  5453. if (self._75 === 2) {
  5454. for (var i = 0; i < self._38.length; i++) {
  5455. handle(self, self._38[i]);
  5456. }
  5457. self._38 = null;
  5458. }
  5459. }
  5460. function Handler(onFulfilled, onRejected, promise){
  5461. this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
  5462. this.onRejected = typeof onRejected === 'function' ? onRejected : null;
  5463. this.promise = promise;
  5464. }
  5465. /**
  5466. * Take a potentially misbehaving resolver function and make sure
  5467. * onFulfilled and onRejected are only called once.
  5468. *
  5469. * Makes no guarantees about asynchrony.
  5470. */
  5471. function doResolve(fn, promise) {
  5472. var done = false;
  5473. var res = tryCallTwo(fn, function (value) {
  5474. if (done) return;
  5475. done = true;
  5476. resolve(promise, value);
  5477. }, function (reason) {
  5478. if (done) return;
  5479. done = true;
  5480. reject(promise, reason);
  5481. });
  5482. if (!done && res === IS_ERROR) {
  5483. done = true;
  5484. reject(promise, LAST_ERROR);
  5485. }
  5486. }
  5487. /***/ }),
  5488. /***/ "./node_modules/promise/lib/es6-extensions.js":
  5489. /*!****************************************************!*\
  5490. !*** ./node_modules/promise/lib/es6-extensions.js ***!
  5491. \****************************************************/
  5492. /*! dynamic exports provided */
  5493. /*! all exports used */
  5494. /***/ (function(module, exports, __webpack_require__) {
  5495. "use strict";
  5496. //This file contains the ES6 extensions to the core Promises/A+ API
  5497. var Promise = __webpack_require__(/*! ./core.js */ "./node_modules/promise/lib/core.js");
  5498. module.exports = Promise;
  5499. /* Static Functions */
  5500. var TRUE = valuePromise(true);
  5501. var FALSE = valuePromise(false);
  5502. var NULL = valuePromise(null);
  5503. var UNDEFINED = valuePromise(undefined);
  5504. var ZERO = valuePromise(0);
  5505. var EMPTYSTRING = valuePromise('');
  5506. function valuePromise(value) {
  5507. var p = new Promise(Promise._44);
  5508. p._83 = 1;
  5509. p._18 = value;
  5510. return p;
  5511. }
  5512. Promise.resolve = function (value) {
  5513. if (value instanceof Promise) return value;
  5514. if (value === null) return NULL;
  5515. if (value === undefined) return UNDEFINED;
  5516. if (value === true) return TRUE;
  5517. if (value === false) return FALSE;
  5518. if (value === 0) return ZERO;
  5519. if (value === '') return EMPTYSTRING;
  5520. if (typeof value === 'object' || typeof value === 'function') {
  5521. try {
  5522. var then = value.then;
  5523. if (typeof then === 'function') {
  5524. return new Promise(then.bind(value));
  5525. }
  5526. } catch (ex) {
  5527. return new Promise(function (resolve, reject) {
  5528. reject(ex);
  5529. });
  5530. }
  5531. }
  5532. return valuePromise(value);
  5533. };
  5534. Promise.all = function (arr) {
  5535. var args = Array.prototype.slice.call(arr);
  5536. return new Promise(function (resolve, reject) {
  5537. if (args.length === 0) return resolve([]);
  5538. var remaining = args.length;
  5539. function res(i, val) {
  5540. if (val && (typeof val === 'object' || typeof val === 'function')) {
  5541. if (val instanceof Promise && val.then === Promise.prototype.then) {
  5542. while (val._83 === 3) {
  5543. val = val._18;
  5544. }
  5545. if (val._83 === 1) return res(i, val._18);
  5546. if (val._83 === 2) reject(val._18);
  5547. val.then(function (val) {
  5548. res(i, val);
  5549. }, reject);
  5550. return;
  5551. } else {
  5552. var then = val.then;
  5553. if (typeof then === 'function') {
  5554. var p = new Promise(then.bind(val));
  5555. p.then(function (val) {
  5556. res(i, val);
  5557. }, reject);
  5558. return;
  5559. }
  5560. }
  5561. }
  5562. args[i] = val;
  5563. if (--remaining === 0) {
  5564. resolve(args);
  5565. }
  5566. }
  5567. for (var i = 0; i < args.length; i++) {
  5568. res(i, args[i]);
  5569. }
  5570. });
  5571. };
  5572. Promise.reject = function (value) {
  5573. return new Promise(function (resolve, reject) {
  5574. reject(value);
  5575. });
  5576. };
  5577. Promise.race = function (values) {
  5578. return new Promise(function (resolve, reject) {
  5579. values.forEach(function(value){
  5580. Promise.resolve(value).then(resolve, reject);
  5581. });
  5582. });
  5583. };
  5584. /* Prototype Methods */
  5585. Promise.prototype['catch'] = function (onRejected) {
  5586. return this.then(null, onRejected);
  5587. };
  5588. /***/ }),
  5589. /***/ "./node_modules/promise/lib/rejection-tracking.js":
  5590. /*!********************************************************!*\
  5591. !*** ./node_modules/promise/lib/rejection-tracking.js ***!
  5592. \********************************************************/
  5593. /*! dynamic exports provided */
  5594. /*! all exports used */
  5595. /***/ (function(module, exports, __webpack_require__) {
  5596. "use strict";
  5597. var Promise = __webpack_require__(/*! ./core */ "./node_modules/promise/lib/core.js");
  5598. var DEFAULT_WHITELIST = [
  5599. ReferenceError,
  5600. TypeError,
  5601. RangeError
  5602. ];
  5603. var enabled = false;
  5604. exports.disable = disable;
  5605. function disable() {
  5606. enabled = false;
  5607. Promise._47 = null;
  5608. Promise._71 = null;
  5609. }
  5610. exports.enable = enable;
  5611. function enable(options) {
  5612. options = options || {};
  5613. if (enabled) disable();
  5614. enabled = true;
  5615. var id = 0;
  5616. var displayId = 0;
  5617. var rejections = {};
  5618. Promise._47 = function (promise) {
  5619. if (
  5620. promise._83 === 2 && // IS REJECTED
  5621. rejections[promise._56]
  5622. ) {
  5623. if (rejections[promise._56].logged) {
  5624. onHandled(promise._56);
  5625. } else {
  5626. clearTimeout(rejections[promise._56].timeout);
  5627. }
  5628. delete rejections[promise._56];
  5629. }
  5630. };
  5631. Promise._71 = function (promise, err) {
  5632. if (promise._75 === 0) { // not yet handled
  5633. promise._56 = id++;
  5634. rejections[promise._56] = {
  5635. displayId: null,
  5636. error: err,
  5637. timeout: setTimeout(
  5638. onUnhandled.bind(null, promise._56),
  5639. // For reference errors and type errors, this almost always
  5640. // means the programmer made a mistake, so log them after just
  5641. // 100ms
  5642. // otherwise, wait 2 seconds to see if they get handled
  5643. matchWhitelist(err, DEFAULT_WHITELIST)
  5644. ? 100
  5645. : 2000
  5646. ),
  5647. logged: false
  5648. };
  5649. }
  5650. };
  5651. function onUnhandled(id) {
  5652. if (
  5653. options.allRejections ||
  5654. matchWhitelist(
  5655. rejections[id].error,
  5656. options.whitelist || DEFAULT_WHITELIST
  5657. )
  5658. ) {
  5659. rejections[id].displayId = displayId++;
  5660. if (options.onUnhandled) {
  5661. rejections[id].logged = true;
  5662. options.onUnhandled(
  5663. rejections[id].displayId,
  5664. rejections[id].error
  5665. );
  5666. } else {
  5667. rejections[id].logged = true;
  5668. logError(
  5669. rejections[id].displayId,
  5670. rejections[id].error
  5671. );
  5672. }
  5673. }
  5674. }
  5675. function onHandled(id) {
  5676. if (rejections[id].logged) {
  5677. if (options.onHandled) {
  5678. options.onHandled(rejections[id].displayId, rejections[id].error);
  5679. } else if (!rejections[id].onUnhandled) {
  5680. console.warn(
  5681. 'Promise Rejection Handled (id: ' + rejections[id].displayId + '):'
  5682. );
  5683. console.warn(
  5684. ' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id ' +
  5685. rejections[id].displayId + '.'
  5686. );
  5687. }
  5688. }
  5689. }
  5690. }
  5691. function logError(id, error) {
  5692. console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');
  5693. var errStr = (error && (error.stack || error)) + '';
  5694. errStr.split('\n').forEach(function (line) {
  5695. console.warn(' ' + line);
  5696. });
  5697. }
  5698. function matchWhitelist(error, list) {
  5699. return list.some(function (cls) {
  5700. return error instanceof cls;
  5701. });
  5702. }
  5703. /***/ }),
  5704. /***/ "./node_modules/prop-types/checkPropTypes.js":
  5705. /*!***************************************************!*\
  5706. !*** ./node_modules/prop-types/checkPropTypes.js ***!
  5707. \***************************************************/
  5708. /*! dynamic exports provided */
  5709. /*! all exports used */
  5710. /***/ (function(module, exports, __webpack_require__) {
  5711. "use strict";
  5712. /**
  5713. * Copyright (c) 2013-present, Facebook, Inc.
  5714. *
  5715. * This source code is licensed under the MIT license found in the
  5716. * LICENSE file in the root directory of this source tree.
  5717. */
  5718. var printWarning = function() {};
  5719. if (true) {
  5720. var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
  5721. var loggedTypeFailures = {};
  5722. var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
  5723. printWarning = function(text) {
  5724. var message = 'Warning: ' + text;
  5725. if (typeof console !== 'undefined') {
  5726. console.error(message);
  5727. }
  5728. try {
  5729. // --- Welcome to debugging React ---
  5730. // This error was thrown as a convenience so that you can use this stack
  5731. // to find the callsite that caused this warning to fire.
  5732. throw new Error(message);
  5733. } catch (x) { /**/ }
  5734. };
  5735. }
  5736. /**
  5737. * Assert that the values match with the type specs.
  5738. * Error messages are memorized and will only be shown once.
  5739. *
  5740. * @param {object} typeSpecs Map of name to a ReactPropType
  5741. * @param {object} values Runtime values that need to be type-checked
  5742. * @param {string} location e.g. "prop", "context", "child context"
  5743. * @param {string} componentName Name of the component for error messages.
  5744. * @param {?Function} getStack Returns the component stack.
  5745. * @private
  5746. */
  5747. function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  5748. if (true) {
  5749. for (var typeSpecName in typeSpecs) {
  5750. if (has(typeSpecs, typeSpecName)) {
  5751. var error;
  5752. // Prop type validation may throw. In case they do, we don't want to
  5753. // fail the render phase where it didn't fail before. So we log it.
  5754. // After these have been cleaned up, we'll let them throw.
  5755. try {
  5756. // This is intentionally an invariant that gets caught. It's the same
  5757. // behavior as without this statement except with a better message.
  5758. if (typeof typeSpecs[typeSpecName] !== 'function') {
  5759. var err = Error(
  5760. (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
  5761. 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
  5762. 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
  5763. );
  5764. err.name = 'Invariant Violation';
  5765. throw err;
  5766. }
  5767. error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  5768. } catch (ex) {
  5769. error = ex;
  5770. }
  5771. if (error && !(error instanceof Error)) {
  5772. printWarning(
  5773. (componentName || 'React class') + ': type specification of ' +
  5774. location + ' `' + typeSpecName + '` is invalid; the type checker ' +
  5775. 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
  5776. 'You may have forgotten to pass an argument to the type checker ' +
  5777. 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
  5778. 'shape all require an argument).'
  5779. );
  5780. }
  5781. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  5782. // Only monitor this failure once because there tends to be a lot of the
  5783. // same error.
  5784. loggedTypeFailures[error.message] = true;
  5785. var stack = getStack ? getStack() : '';
  5786. printWarning(
  5787. 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
  5788. );
  5789. }
  5790. }
  5791. }
  5792. }
  5793. }
  5794. /**
  5795. * Resets warning cache when testing.
  5796. *
  5797. * @private
  5798. */
  5799. checkPropTypes.resetWarningCache = function() {
  5800. if (true) {
  5801. loggedTypeFailures = {};
  5802. }
  5803. }
  5804. module.exports = checkPropTypes;
  5805. /***/ }),
  5806. /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
  5807. /*!************************************************************!*\
  5808. !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
  5809. \************************************************************/
  5810. /*! dynamic exports provided */
  5811. /*! all exports used */
  5812. /***/ (function(module, exports, __webpack_require__) {
  5813. "use strict";
  5814. /**
  5815. * Copyright (c) 2013-present, Facebook, Inc.
  5816. *
  5817. * This source code is licensed under the MIT license found in the
  5818. * LICENSE file in the root directory of this source tree.
  5819. */
  5820. var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
  5821. var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
  5822. var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
  5823. var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
  5824. var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
  5825. var printWarning = function() {};
  5826. if (true) {
  5827. printWarning = function(text) {
  5828. var message = 'Warning: ' + text;
  5829. if (typeof console !== 'undefined') {
  5830. console.error(message);
  5831. }
  5832. try {
  5833. // --- Welcome to debugging React ---
  5834. // This error was thrown as a convenience so that you can use this stack
  5835. // to find the callsite that caused this warning to fire.
  5836. throw new Error(message);
  5837. } catch (x) {}
  5838. };
  5839. }
  5840. function emptyFunctionThatReturnsNull() {
  5841. return null;
  5842. }
  5843. module.exports = function(isValidElement, throwOnDirectAccess) {
  5844. /* global Symbol */
  5845. var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  5846. var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  5847. /**
  5848. * Returns the iterator method function contained on the iterable object.
  5849. *
  5850. * Be sure to invoke the function with the iterable as context:
  5851. *
  5852. * var iteratorFn = getIteratorFn(myIterable);
  5853. * if (iteratorFn) {
  5854. * var iterator = iteratorFn.call(myIterable);
  5855. * ...
  5856. * }
  5857. *
  5858. * @param {?object} maybeIterable
  5859. * @return {?function}
  5860. */
  5861. function getIteratorFn(maybeIterable) {
  5862. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  5863. if (typeof iteratorFn === 'function') {
  5864. return iteratorFn;
  5865. }
  5866. }
  5867. /**
  5868. * Collection of methods that allow declaration and validation of props that are
  5869. * supplied to React components. Example usage:
  5870. *
  5871. * var Props = require('ReactPropTypes');
  5872. * var MyArticle = React.createClass({
  5873. * propTypes: {
  5874. * // An optional string prop named "description".
  5875. * description: Props.string,
  5876. *
  5877. * // A required enum prop named "category".
  5878. * category: Props.oneOf(['News','Photos']).isRequired,
  5879. *
  5880. * // A prop named "dialog" that requires an instance of Dialog.
  5881. * dialog: Props.instanceOf(Dialog).isRequired
  5882. * },
  5883. * render: function() { ... }
  5884. * });
  5885. *
  5886. * A more formal specification of how these methods are used:
  5887. *
  5888. * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
  5889. * decl := ReactPropTypes.{type}(.isRequired)?
  5890. *
  5891. * Each and every declaration produces a function with the same signature. This
  5892. * allows the creation of custom validation functions. For example:
  5893. *
  5894. * var MyLink = React.createClass({
  5895. * propTypes: {
  5896. * // An optional string or URI prop named "href".
  5897. * href: function(props, propName, componentName) {
  5898. * var propValue = props[propName];
  5899. * if (propValue != null && typeof propValue !== 'string' &&
  5900. * !(propValue instanceof URI)) {
  5901. * return new Error(
  5902. * 'Expected a string or an URI for ' + propName + ' in ' +
  5903. * componentName
  5904. * );
  5905. * }
  5906. * }
  5907. * },
  5908. * render: function() {...}
  5909. * });
  5910. *
  5911. * @internal
  5912. */
  5913. var ANONYMOUS = '<<anonymous>>';
  5914. // Important!
  5915. // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  5916. var ReactPropTypes = {
  5917. array: createPrimitiveTypeChecker('array'),
  5918. bigint: createPrimitiveTypeChecker('bigint'),
  5919. bool: createPrimitiveTypeChecker('boolean'),
  5920. func: createPrimitiveTypeChecker('function'),
  5921. number: createPrimitiveTypeChecker('number'),
  5922. object: createPrimitiveTypeChecker('object'),
  5923. string: createPrimitiveTypeChecker('string'),
  5924. symbol: createPrimitiveTypeChecker('symbol'),
  5925. any: createAnyTypeChecker(),
  5926. arrayOf: createArrayOfTypeChecker,
  5927. element: createElementTypeChecker(),
  5928. elementType: createElementTypeTypeChecker(),
  5929. instanceOf: createInstanceTypeChecker,
  5930. node: createNodeChecker(),
  5931. objectOf: createObjectOfTypeChecker,
  5932. oneOf: createEnumTypeChecker,
  5933. oneOfType: createUnionTypeChecker,
  5934. shape: createShapeTypeChecker,
  5935. exact: createStrictShapeTypeChecker,
  5936. };
  5937. /**
  5938. * inlined Object.is polyfill to avoid requiring consumers ship their own
  5939. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  5940. */
  5941. /*eslint-disable no-self-compare*/
  5942. function is(x, y) {
  5943. // SameValue algorithm
  5944. if (x === y) {
  5945. // Steps 1-5, 7-10
  5946. // Steps 6.b-6.e: +0 != -0
  5947. return x !== 0 || 1 / x === 1 / y;
  5948. } else {
  5949. // Step 6.a: NaN == NaN
  5950. return x !== x && y !== y;
  5951. }
  5952. }
  5953. /*eslint-enable no-self-compare*/
  5954. /**
  5955. * We use an Error-like object for backward compatibility as people may call
  5956. * PropTypes directly and inspect their output. However, we don't use real
  5957. * Errors anymore. We don't inspect their stack anyway, and creating them
  5958. * is prohibitively expensive if they are created too often, such as what
  5959. * happens in oneOfType() for any type before the one that matched.
  5960. */
  5961. function PropTypeError(message, data) {
  5962. this.message = message;
  5963. this.data = data && typeof data === 'object' ? data: {};
  5964. this.stack = '';
  5965. }
  5966. // Make `instanceof Error` still work for returned errors.
  5967. PropTypeError.prototype = Error.prototype;
  5968. function createChainableTypeChecker(validate) {
  5969. if (true) {
  5970. var manualPropTypeCallCache = {};
  5971. var manualPropTypeWarningCount = 0;
  5972. }
  5973. function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
  5974. componentName = componentName || ANONYMOUS;
  5975. propFullName = propFullName || propName;
  5976. if (secret !== ReactPropTypesSecret) {
  5977. if (throwOnDirectAccess) {
  5978. // New behavior only for users of `prop-types` package
  5979. var err = new Error(
  5980. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  5981. 'Use `PropTypes.checkPropTypes()` to call them. ' +
  5982. 'Read more at http://fb.me/use-check-prop-types'
  5983. );
  5984. err.name = 'Invariant Violation';
  5985. throw err;
  5986. } else if ("development" !== 'production' && typeof console !== 'undefined') {
  5987. // Old behavior for people using React.PropTypes
  5988. var cacheKey = componentName + ':' + propName;
  5989. if (
  5990. !manualPropTypeCallCache[cacheKey] &&
  5991. // Avoid spamming the console because they are often not actionable except for lib authors
  5992. manualPropTypeWarningCount < 3
  5993. ) {
  5994. printWarning(
  5995. 'You are manually calling a React.PropTypes validation ' +
  5996. 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
  5997. 'and will throw in the standalone `prop-types` package. ' +
  5998. 'You may be seeing this warning due to a third-party PropTypes ' +
  5999. 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
  6000. );
  6001. manualPropTypeCallCache[cacheKey] = true;
  6002. manualPropTypeWarningCount++;
  6003. }
  6004. }
  6005. }
  6006. if (props[propName] == null) {
  6007. if (isRequired) {
  6008. if (props[propName] === null) {
  6009. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
  6010. }
  6011. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
  6012. }
  6013. return null;
  6014. } else {
  6015. return validate(props, propName, componentName, location, propFullName);
  6016. }
  6017. }
  6018. var chainedCheckType = checkType.bind(null, false);
  6019. chainedCheckType.isRequired = checkType.bind(null, true);
  6020. return chainedCheckType;
  6021. }
  6022. function createPrimitiveTypeChecker(expectedType) {
  6023. function validate(props, propName, componentName, location, propFullName, secret) {
  6024. var propValue = props[propName];
  6025. var propType = getPropType(propValue);
  6026. if (propType !== expectedType) {
  6027. // `propValue` being instance of, say, date/regexp, pass the 'object'
  6028. // check, but we can offer a more precise error message here rather than
  6029. // 'of type `object`'.
  6030. var preciseType = getPreciseType(propValue);
  6031. return new PropTypeError(
  6032. 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
  6033. {expectedType: expectedType}
  6034. );
  6035. }
  6036. return null;
  6037. }
  6038. return createChainableTypeChecker(validate);
  6039. }
  6040. function createAnyTypeChecker() {
  6041. return createChainableTypeChecker(emptyFunctionThatReturnsNull);
  6042. }
  6043. function createArrayOfTypeChecker(typeChecker) {
  6044. function validate(props, propName, componentName, location, propFullName) {
  6045. if (typeof typeChecker !== 'function') {
  6046. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
  6047. }
  6048. var propValue = props[propName];
  6049. if (!Array.isArray(propValue)) {
  6050. var propType = getPropType(propValue);
  6051. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
  6052. }
  6053. for (var i = 0; i < propValue.length; i++) {
  6054. var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
  6055. if (error instanceof Error) {
  6056. return error;
  6057. }
  6058. }
  6059. return null;
  6060. }
  6061. return createChainableTypeChecker(validate);
  6062. }
  6063. function createElementTypeChecker() {
  6064. function validate(props, propName, componentName, location, propFullName) {
  6065. var propValue = props[propName];
  6066. if (!isValidElement(propValue)) {
  6067. var propType = getPropType(propValue);
  6068. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
  6069. }
  6070. return null;
  6071. }
  6072. return createChainableTypeChecker(validate);
  6073. }
  6074. function createElementTypeTypeChecker() {
  6075. function validate(props, propName, componentName, location, propFullName) {
  6076. var propValue = props[propName];
  6077. if (!ReactIs.isValidElementType(propValue)) {
  6078. var propType = getPropType(propValue);
  6079. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
  6080. }
  6081. return null;
  6082. }
  6083. return createChainableTypeChecker(validate);
  6084. }
  6085. function createInstanceTypeChecker(expectedClass) {
  6086. function validate(props, propName, componentName, location, propFullName) {
  6087. if (!(props[propName] instanceof expectedClass)) {
  6088. var expectedClassName = expectedClass.name || ANONYMOUS;
  6089. var actualClassName = getClassName(props[propName]);
  6090. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
  6091. }
  6092. return null;
  6093. }
  6094. return createChainableTypeChecker(validate);
  6095. }
  6096. function createEnumTypeChecker(expectedValues) {
  6097. if (!Array.isArray(expectedValues)) {
  6098. if (true) {
  6099. if (arguments.length > 1) {
  6100. printWarning(
  6101. 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
  6102. 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
  6103. );
  6104. } else {
  6105. printWarning('Invalid argument supplied to oneOf, expected an array.');
  6106. }
  6107. }
  6108. return emptyFunctionThatReturnsNull;
  6109. }
  6110. function validate(props, propName, componentName, location, propFullName) {
  6111. var propValue = props[propName];
  6112. for (var i = 0; i < expectedValues.length; i++) {
  6113. if (is(propValue, expectedValues[i])) {
  6114. return null;
  6115. }
  6116. }
  6117. var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
  6118. var type = getPreciseType(value);
  6119. if (type === 'symbol') {
  6120. return String(value);
  6121. }
  6122. return value;
  6123. });
  6124. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
  6125. }
  6126. return createChainableTypeChecker(validate);
  6127. }
  6128. function createObjectOfTypeChecker(typeChecker) {
  6129. function validate(props, propName, componentName, location, propFullName) {
  6130. if (typeof typeChecker !== 'function') {
  6131. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
  6132. }
  6133. var propValue = props[propName];
  6134. var propType = getPropType(propValue);
  6135. if (propType !== 'object') {
  6136. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
  6137. }
  6138. for (var key in propValue) {
  6139. if (has(propValue, key)) {
  6140. var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  6141. if (error instanceof Error) {
  6142. return error;
  6143. }
  6144. }
  6145. }
  6146. return null;
  6147. }
  6148. return createChainableTypeChecker(validate);
  6149. }
  6150. function createUnionTypeChecker(arrayOfTypeCheckers) {
  6151. if (!Array.isArray(arrayOfTypeCheckers)) {
  6152. true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
  6153. return emptyFunctionThatReturnsNull;
  6154. }
  6155. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  6156. var checker = arrayOfTypeCheckers[i];
  6157. if (typeof checker !== 'function') {
  6158. printWarning(
  6159. 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
  6160. 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
  6161. );
  6162. return emptyFunctionThatReturnsNull;
  6163. }
  6164. }
  6165. function validate(props, propName, componentName, location, propFullName) {
  6166. var expectedTypes = [];
  6167. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  6168. var checker = arrayOfTypeCheckers[i];
  6169. var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
  6170. if (checkerResult == null) {
  6171. return null;
  6172. }
  6173. if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
  6174. expectedTypes.push(checkerResult.data.expectedType);
  6175. }
  6176. }
  6177. var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
  6178. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
  6179. }
  6180. return createChainableTypeChecker(validate);
  6181. }
  6182. function createNodeChecker() {
  6183. function validate(props, propName, componentName, location, propFullName) {
  6184. if (!isNode(props[propName])) {
  6185. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
  6186. }
  6187. return null;
  6188. }
  6189. return createChainableTypeChecker(validate);
  6190. }
  6191. function invalidValidatorError(componentName, location, propFullName, key, type) {
  6192. return new PropTypeError(
  6193. (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
  6194. 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
  6195. );
  6196. }
  6197. function createShapeTypeChecker(shapeTypes) {
  6198. function validate(props, propName, componentName, location, propFullName) {
  6199. var propValue = props[propName];
  6200. var propType = getPropType(propValue);
  6201. if (propType !== 'object') {
  6202. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  6203. }
  6204. for (var key in shapeTypes) {
  6205. var checker = shapeTypes[key];
  6206. if (typeof checker !== 'function') {
  6207. return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
  6208. }
  6209. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  6210. if (error) {
  6211. return error;
  6212. }
  6213. }
  6214. return null;
  6215. }
  6216. return createChainableTypeChecker(validate);
  6217. }
  6218. function createStrictShapeTypeChecker(shapeTypes) {
  6219. function validate(props, propName, componentName, location, propFullName) {
  6220. var propValue = props[propName];
  6221. var propType = getPropType(propValue);
  6222. if (propType !== 'object') {
  6223. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  6224. }
  6225. // We need to check all keys in case some are required but missing from props.
  6226. var allKeys = assign({}, props[propName], shapeTypes);
  6227. for (var key in allKeys) {
  6228. var checker = shapeTypes[key];
  6229. if (has(shapeTypes, key) && typeof checker !== 'function') {
  6230. return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
  6231. }
  6232. if (!checker) {
  6233. return new PropTypeError(
  6234. 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
  6235. '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
  6236. '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
  6237. );
  6238. }
  6239. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  6240. if (error) {
  6241. return error;
  6242. }
  6243. }
  6244. return null;
  6245. }
  6246. return createChainableTypeChecker(validate);
  6247. }
  6248. function isNode(propValue) {
  6249. switch (typeof propValue) {
  6250. case 'number':
  6251. case 'string':
  6252. case 'undefined':
  6253. return true;
  6254. case 'boolean':
  6255. return !propValue;
  6256. case 'object':
  6257. if (Array.isArray(propValue)) {
  6258. return propValue.every(isNode);
  6259. }
  6260. if (propValue === null || isValidElement(propValue)) {
  6261. return true;
  6262. }
  6263. var iteratorFn = getIteratorFn(propValue);
  6264. if (iteratorFn) {
  6265. var iterator = iteratorFn.call(propValue);
  6266. var step;
  6267. if (iteratorFn !== propValue.entries) {
  6268. while (!(step = iterator.next()).done) {
  6269. if (!isNode(step.value)) {
  6270. return false;
  6271. }
  6272. }
  6273. } else {
  6274. // Iterator will provide entry [k,v] tuples rather than values.
  6275. while (!(step = iterator.next()).done) {
  6276. var entry = step.value;
  6277. if (entry) {
  6278. if (!isNode(entry[1])) {
  6279. return false;
  6280. }
  6281. }
  6282. }
  6283. }
  6284. } else {
  6285. return false;
  6286. }
  6287. return true;
  6288. default:
  6289. return false;
  6290. }
  6291. }
  6292. function isSymbol(propType, propValue) {
  6293. // Native Symbol.
  6294. if (propType === 'symbol') {
  6295. return true;
  6296. }
  6297. // falsy value can't be a Symbol
  6298. if (!propValue) {
  6299. return false;
  6300. }
  6301. // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
  6302. if (propValue['@@toStringTag'] === 'Symbol') {
  6303. return true;
  6304. }
  6305. // Fallback for non-spec compliant Symbols which are polyfilled.
  6306. if (typeof Symbol === 'function' && propValue instanceof Symbol) {
  6307. return true;
  6308. }
  6309. return false;
  6310. }
  6311. // Equivalent of `typeof` but with special handling for array and regexp.
  6312. function getPropType(propValue) {
  6313. var propType = typeof propValue;
  6314. if (Array.isArray(propValue)) {
  6315. return 'array';
  6316. }
  6317. if (propValue instanceof RegExp) {
  6318. // Old webkits (at least until Android 4.0) return 'function' rather than
  6319. // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
  6320. // passes PropTypes.object.
  6321. return 'object';
  6322. }
  6323. if (isSymbol(propType, propValue)) {
  6324. return 'symbol';
  6325. }
  6326. return propType;
  6327. }
  6328. // This handles more types than `getPropType`. Only used for error messages.
  6329. // See `createPrimitiveTypeChecker`.
  6330. function getPreciseType(propValue) {
  6331. if (typeof propValue === 'undefined' || propValue === null) {
  6332. return '' + propValue;
  6333. }
  6334. var propType = getPropType(propValue);
  6335. if (propType === 'object') {
  6336. if (propValue instanceof Date) {
  6337. return 'date';
  6338. } else if (propValue instanceof RegExp) {
  6339. return 'regexp';
  6340. }
  6341. }
  6342. return propType;
  6343. }
  6344. // Returns a string that is postfixed to a warning about an invalid type.
  6345. // For example, "undefined" or "of type array"
  6346. function getPostfixForTypeWarning(value) {
  6347. var type = getPreciseType(value);
  6348. switch (type) {
  6349. case 'array':
  6350. case 'object':
  6351. return 'an ' + type;
  6352. case 'boolean':
  6353. case 'date':
  6354. case 'regexp':
  6355. return 'a ' + type;
  6356. default:
  6357. return type;
  6358. }
  6359. }
  6360. // Returns class name of the object, if any.
  6361. function getClassName(propValue) {
  6362. if (!propValue.constructor || !propValue.constructor.name) {
  6363. return ANONYMOUS;
  6364. }
  6365. return propValue.constructor.name;
  6366. }
  6367. ReactPropTypes.checkPropTypes = checkPropTypes;
  6368. ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
  6369. ReactPropTypes.PropTypes = ReactPropTypes;
  6370. return ReactPropTypes;
  6371. };
  6372. /***/ }),
  6373. /***/ "./node_modules/prop-types/index.js":
  6374. /*!******************************************!*\
  6375. !*** ./node_modules/prop-types/index.js ***!
  6376. \******************************************/
  6377. /*! dynamic exports provided */
  6378. /*! exports used: default */
  6379. /***/ (function(module, exports, __webpack_require__) {
  6380. /**
  6381. * Copyright (c) 2013-present, Facebook, Inc.
  6382. *
  6383. * This source code is licensed under the MIT license found in the
  6384. * LICENSE file in the root directory of this source tree.
  6385. */
  6386. if (true) {
  6387. var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
  6388. // By explicitly using `prop-types` you are opting into new development behavior.
  6389. // http://fb.me/prop-types-in-prod
  6390. var throwOnDirectAccess = true;
  6391. module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
  6392. } else {
  6393. // By explicitly using `prop-types` you are opting into new production behavior.
  6394. // http://fb.me/prop-types-in-prod
  6395. module.exports = require('./factoryWithThrowingShims')();
  6396. }
  6397. /***/ }),
  6398. /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
  6399. /*!*************************************************************!*\
  6400. !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
  6401. \*************************************************************/
  6402. /*! dynamic exports provided */
  6403. /*! all exports used */
  6404. /***/ (function(module, exports, __webpack_require__) {
  6405. "use strict";
  6406. /**
  6407. * Copyright (c) 2013-present, Facebook, Inc.
  6408. *
  6409. * This source code is licensed under the MIT license found in the
  6410. * LICENSE file in the root directory of this source tree.
  6411. */
  6412. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  6413. module.exports = ReactPropTypesSecret;
  6414. /***/ }),
  6415. /***/ "./node_modules/prop-types/lib/has.js":
  6416. /*!********************************************!*\
  6417. !*** ./node_modules/prop-types/lib/has.js ***!
  6418. \********************************************/
  6419. /*! dynamic exports provided */
  6420. /*! all exports used */
  6421. /***/ (function(module, exports) {
  6422. module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
  6423. /***/ }),
  6424. /***/ "./node_modules/querystring-es3/decode.js":
  6425. /*!************************************************!*\
  6426. !*** ./node_modules/querystring-es3/decode.js ***!
  6427. \************************************************/
  6428. /*! dynamic exports provided */
  6429. /*! all exports used */
  6430. /***/ (function(module, exports, __webpack_require__) {
  6431. "use strict";
  6432. // Copyright Joyent, Inc. and other Node contributors.
  6433. //
  6434. // Permission is hereby granted, free of charge, to any person obtaining a
  6435. // copy of this software and associated documentation files (the
  6436. // "Software"), to deal in the Software without restriction, including
  6437. // without limitation the rights to use, copy, modify, merge, publish,
  6438. // distribute, sublicense, and/or sell copies of the Software, and to permit
  6439. // persons to whom the Software is furnished to do so, subject to the
  6440. // following conditions:
  6441. //
  6442. // The above copyright notice and this permission notice shall be included
  6443. // in all copies or substantial portions of the Software.
  6444. //
  6445. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  6446. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  6447. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  6448. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  6449. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  6450. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  6451. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  6452. // If obj.hasOwnProperty has been overridden, then calling
  6453. // obj.hasOwnProperty(prop) will break.
  6454. // See: https://github.com/joyent/node/issues/1707
  6455. function hasOwnProperty(obj, prop) {
  6456. return Object.prototype.hasOwnProperty.call(obj, prop);
  6457. }
  6458. module.exports = function(qs, sep, eq, options) {
  6459. sep = sep || '&';
  6460. eq = eq || '=';
  6461. var obj = {};
  6462. if (typeof qs !== 'string' || qs.length === 0) {
  6463. return obj;
  6464. }
  6465. var regexp = /\+/g;
  6466. qs = qs.split(sep);
  6467. var maxKeys = 1000;
  6468. if (options && typeof options.maxKeys === 'number') {
  6469. maxKeys = options.maxKeys;
  6470. }
  6471. var len = qs.length;
  6472. // maxKeys <= 0 means that we should not limit keys count
  6473. if (maxKeys > 0 && len > maxKeys) {
  6474. len = maxKeys;
  6475. }
  6476. for (var i = 0; i < len; ++i) {
  6477. var x = qs[i].replace(regexp, '%20'),
  6478. idx = x.indexOf(eq),
  6479. kstr, vstr, k, v;
  6480. if (idx >= 0) {
  6481. kstr = x.substr(0, idx);
  6482. vstr = x.substr(idx + 1);
  6483. } else {
  6484. kstr = x;
  6485. vstr = '';
  6486. }
  6487. k = decodeURIComponent(kstr);
  6488. v = decodeURIComponent(vstr);
  6489. if (!hasOwnProperty(obj, k)) {
  6490. obj[k] = v;
  6491. } else if (isArray(obj[k])) {
  6492. obj[k].push(v);
  6493. } else {
  6494. obj[k] = [obj[k], v];
  6495. }
  6496. }
  6497. return obj;
  6498. };
  6499. var isArray = Array.isArray || function (xs) {
  6500. return Object.prototype.toString.call(xs) === '[object Array]';
  6501. };
  6502. /***/ }),
  6503. /***/ "./node_modules/querystring-es3/encode.js":
  6504. /*!************************************************!*\
  6505. !*** ./node_modules/querystring-es3/encode.js ***!
  6506. \************************************************/
  6507. /*! dynamic exports provided */
  6508. /*! all exports used */
  6509. /***/ (function(module, exports, __webpack_require__) {
  6510. "use strict";
  6511. // Copyright Joyent, Inc. and other Node contributors.
  6512. //
  6513. // Permission is hereby granted, free of charge, to any person obtaining a
  6514. // copy of this software and associated documentation files (the
  6515. // "Software"), to deal in the Software without restriction, including
  6516. // without limitation the rights to use, copy, modify, merge, publish,
  6517. // distribute, sublicense, and/or sell copies of the Software, and to permit
  6518. // persons to whom the Software is furnished to do so, subject to the
  6519. // following conditions:
  6520. //
  6521. // The above copyright notice and this permission notice shall be included
  6522. // in all copies or substantial portions of the Software.
  6523. //
  6524. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  6525. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  6526. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  6527. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  6528. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  6529. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  6530. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  6531. var stringifyPrimitive = function(v) {
  6532. switch (typeof v) {
  6533. case 'string':
  6534. return v;
  6535. case 'boolean':
  6536. return v ? 'true' : 'false';
  6537. case 'number':
  6538. return isFinite(v) ? v : '';
  6539. default:
  6540. return '';
  6541. }
  6542. };
  6543. module.exports = function(obj, sep, eq, name) {
  6544. sep = sep || '&';
  6545. eq = eq || '=';
  6546. if (obj === null) {
  6547. obj = undefined;
  6548. }
  6549. if (typeof obj === 'object') {
  6550. return map(objectKeys(obj), function(k) {
  6551. var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
  6552. if (isArray(obj[k])) {
  6553. return map(obj[k], function(v) {
  6554. return ks + encodeURIComponent(stringifyPrimitive(v));
  6555. }).join(sep);
  6556. } else {
  6557. return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
  6558. }
  6559. }).join(sep);
  6560. }
  6561. if (!name) return '';
  6562. return encodeURIComponent(stringifyPrimitive(name)) + eq +
  6563. encodeURIComponent(stringifyPrimitive(obj));
  6564. };
  6565. var isArray = Array.isArray || function (xs) {
  6566. return Object.prototype.toString.call(xs) === '[object Array]';
  6567. };
  6568. function map (xs, f) {
  6569. if (xs.map) return xs.map(f);
  6570. var res = [];
  6571. for (var i = 0; i < xs.length; i++) {
  6572. res.push(f(xs[i], i));
  6573. }
  6574. return res;
  6575. }
  6576. var objectKeys = Object.keys || function (obj) {
  6577. var res = [];
  6578. for (var key in obj) {
  6579. if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
  6580. }
  6581. return res;
  6582. };
  6583. /***/ }),
  6584. /***/ "./node_modules/querystring-es3/index.js":
  6585. /*!***********************************************!*\
  6586. !*** ./node_modules/querystring-es3/index.js ***!
  6587. \***********************************************/
  6588. /*! dynamic exports provided */
  6589. /*! all exports used */
  6590. /***/ (function(module, exports, __webpack_require__) {
  6591. "use strict";
  6592. exports.decode = exports.parse = __webpack_require__(/*! ./decode */ "./node_modules/querystring-es3/decode.js");
  6593. exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ "./node_modules/querystring-es3/encode.js");
  6594. /***/ }),
  6595. /***/ "./node_modules/querystringify/index.js":
  6596. /*!**********************************************!*\
  6597. !*** ./node_modules/querystringify/index.js ***!
  6598. \**********************************************/
  6599. /*! dynamic exports provided */
  6600. /*! all exports used */
  6601. /***/ (function(module, exports, __webpack_require__) {
  6602. "use strict";
  6603. var has = Object.prototype.hasOwnProperty
  6604. , undef;
  6605. /**
  6606. * Decode a URI encoded string.
  6607. *
  6608. * @param {String} input The URI encoded string.
  6609. * @returns {String|Null} The decoded string.
  6610. * @api private
  6611. */
  6612. function decode(input) {
  6613. try {
  6614. return decodeURIComponent(input.replace(/\+/g, ' '));
  6615. } catch (e) {
  6616. return null;
  6617. }
  6618. }
  6619. /**
  6620. * Attempts to encode a given input.
  6621. *
  6622. * @param {String} input The string that needs to be encoded.
  6623. * @returns {String|Null} The encoded string.
  6624. * @api private
  6625. */
  6626. function encode(input) {
  6627. try {
  6628. return encodeURIComponent(input);
  6629. } catch (e) {
  6630. return null;
  6631. }
  6632. }
  6633. /**
  6634. * Simple query string parser.
  6635. *
  6636. * @param {String} query The query string that needs to be parsed.
  6637. * @returns {Object}
  6638. * @api public
  6639. */
  6640. function querystring(query) {
  6641. var parser = /([^=?#&]+)=?([^&]*)/g
  6642. , result = {}
  6643. , part;
  6644. while (part = parser.exec(query)) {
  6645. var key = decode(part[1])
  6646. , value = decode(part[2]);
  6647. //
  6648. // Prevent overriding of existing properties. This ensures that build-in
  6649. // methods like `toString` or __proto__ are not overriden by malicious
  6650. // querystrings.
  6651. //
  6652. // In the case if failed decoding, we want to omit the key/value pairs
  6653. // from the result.
  6654. //
  6655. if (key === null || value === null || key in result) continue;
  6656. result[key] = value;
  6657. }
  6658. return result;
  6659. }
  6660. /**
  6661. * Transform a query string to an object.
  6662. *
  6663. * @param {Object} obj Object that should be transformed.
  6664. * @param {String} prefix Optional prefix.
  6665. * @returns {String}
  6666. * @api public
  6667. */
  6668. function querystringify(obj, prefix) {
  6669. prefix = prefix || '';
  6670. var pairs = []
  6671. , value
  6672. , key;
  6673. //
  6674. // Optionally prefix with a '?' if needed
  6675. //
  6676. if ('string' !== typeof prefix) prefix = '?';
  6677. for (key in obj) {
  6678. if (has.call(obj, key)) {
  6679. value = obj[key];
  6680. //
  6681. // Edge cases where we actually want to encode the value to an empty
  6682. // string instead of the stringified value.
  6683. //
  6684. if (!value && (value === null || value === undef || isNaN(value))) {
  6685. value = '';
  6686. }
  6687. key = encode(key);
  6688. value = encode(value);
  6689. //
  6690. // If we failed to encode the strings, we should bail out as we don't
  6691. // want to add invalid strings to the query.
  6692. //
  6693. if (key === null || value === null) continue;
  6694. pairs.push(key +'='+ value);
  6695. }
  6696. }
  6697. return pairs.length ? prefix + pairs.join('&') : '';
  6698. }
  6699. //
  6700. // Expose the module.
  6701. //
  6702. exports.stringify = querystringify;
  6703. exports.parse = querystring;
  6704. /***/ }),
  6705. /***/ "./node_modules/react-dev-utils/formatWebpackMessages.js":
  6706. /*!***************************************************************!*\
  6707. !*** ./node_modules/react-dev-utils/formatWebpackMessages.js ***!
  6708. \***************************************************************/
  6709. /*! dynamic exports provided */
  6710. /*! all exports used */
  6711. /***/ (function(module, exports, __webpack_require__) {
  6712. "use strict";
  6713. /**
  6714. * Copyright (c) 2015-present, Facebook, Inc.
  6715. *
  6716. * This source code is licensed under the MIT license found in the
  6717. * LICENSE file in the root directory of this source tree.
  6718. */
  6719. // WARNING: this code is untranspiled and is used in browser too.
  6720. // Please make sure any changes are in ES5 or contribute a Babel compile step.
  6721. // Some custom utilities to prettify Webpack output.
  6722. // This is quite hacky and hopefully won't be needed when Webpack fixes this.
  6723. // https://github.com/webpack/webpack/issues/2878
  6724. var chalk = __webpack_require__(/*! chalk */ "./node_modules/chalk/index.js");
  6725. var friendlySyntaxErrorLabel = 'Syntax error:';
  6726. function isLikelyASyntaxError(message) {
  6727. return message.indexOf(friendlySyntaxErrorLabel) !== -1;
  6728. }
  6729. // Cleans up webpack error messages.
  6730. // eslint-disable-next-line no-unused-vars
  6731. function formatMessage(message, isError) {
  6732. var lines = message.split('\n');
  6733. if (lines.length > 2 && lines[1] === '') {
  6734. // Remove extra newline.
  6735. lines.splice(1, 1);
  6736. }
  6737. // Remove webpack-specific loader notation from filename.
  6738. // Before:
  6739. // ./~/css-loader!./~/postcss-loader!./src/App.css
  6740. // After:
  6741. // ./src/App.css
  6742. if (lines[0].lastIndexOf('!') !== -1) {
  6743. lines[0] = lines[0].substr(lines[0].lastIndexOf('!') + 1);
  6744. }
  6745. lines = lines.filter(function(line) {
  6746. // Webpack adds a list of entry points to warning messages:
  6747. // @ ./src/index.js
  6748. // @ multi react-scripts/~/react-dev-utils/webpackHotDevClient.js ...
  6749. // It is misleading (and unrelated to the warnings) so we clean it up.
  6750. // It is only useful for syntax errors but we have beautiful frames for them.
  6751. return line.indexOf(' @ ') !== 0;
  6752. });
  6753. // line #0 is filename
  6754. // line #1 is the main error message
  6755. if (!lines[0] || !lines[1]) {
  6756. return lines.join('\n');
  6757. }
  6758. // Cleans up verbose "module not found" messages for files and packages.
  6759. if (lines[1].indexOf('Module not found: ') === 0) {
  6760. lines = [
  6761. lines[0],
  6762. // Clean up message because "Module not found: " is descriptive enough.
  6763. lines[1]
  6764. .replace("Cannot resolve 'file' or 'directory' ", '')
  6765. .replace('Cannot resolve module ', '')
  6766. .replace('Error: ', '')
  6767. .replace('[CaseSensitivePathsPlugin] ', ''),
  6768. ];
  6769. }
  6770. // Cleans up syntax error messages.
  6771. if (lines[1].indexOf('Module build failed: ') === 0) {
  6772. lines[1] = lines[1].replace(
  6773. 'Module build failed: SyntaxError:',
  6774. friendlySyntaxErrorLabel
  6775. );
  6776. }
  6777. // Clean up export errors.
  6778. // TODO: we should really send a PR to Webpack for this.
  6779. var exportError = /\s*(.+?)\s*(")?export '(.+?)' was not found in '(.+?)'/;
  6780. if (lines[1].match(exportError)) {
  6781. lines[1] = lines[1].replace(
  6782. exportError,
  6783. "$1 '$4' does not contain an export named '$3'."
  6784. );
  6785. }
  6786. lines[0] = chalk.inverse(lines[0]);
  6787. // Reassemble the message.
  6788. message = lines.join('\n');
  6789. // Internal stacks are generally useless so we strip them... with the
  6790. // exception of stacks containing `webpack:` because they're normally
  6791. // from user code generated by WebPack. For more information see
  6792. // https://github.com/facebookincubator/create-react-app/pull/1050
  6793. message = message.replace(
  6794. /^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm,
  6795. ''
  6796. ); // at ... ...:x:y
  6797. return message.trim();
  6798. }
  6799. function formatWebpackMessages(json) {
  6800. var formattedErrors = json.errors.map(function(message) {
  6801. return formatMessage(message, true);
  6802. });
  6803. var formattedWarnings = json.warnings.map(function(message) {
  6804. return formatMessage(message, false);
  6805. });
  6806. var result = {
  6807. errors: formattedErrors,
  6808. warnings: formattedWarnings,
  6809. };
  6810. if (result.errors.some(isLikelyASyntaxError)) {
  6811. // If there are any syntax errors, show just them.
  6812. // This prevents a confusing ESLint parsing error
  6813. // preceding a much more useful Babel syntax error.
  6814. result.errors = result.errors.filter(isLikelyASyntaxError);
  6815. }
  6816. return result;
  6817. }
  6818. module.exports = formatWebpackMessages;
  6819. /***/ }),
  6820. /***/ "./node_modules/react-dev-utils/launchEditorEndpoint.js":
  6821. /*!**************************************************************!*\
  6822. !*** ./node_modules/react-dev-utils/launchEditorEndpoint.js ***!
  6823. \**************************************************************/
  6824. /*! dynamic exports provided */
  6825. /*! all exports used */
  6826. /***/ (function(module, exports, __webpack_require__) {
  6827. "use strict";
  6828. /**
  6829. * Copyright (c) 2015-present, Facebook, Inc.
  6830. *
  6831. * This source code is licensed under the MIT license found in the
  6832. * LICENSE file in the root directory of this source tree.
  6833. */
  6834. // TODO: we might want to make this injectable to support DEV-time non-root URLs.
  6835. module.exports = '/__open-stack-frame-in-editor';
  6836. /***/ }),
  6837. /***/ "./node_modules/react-dev-utils/webpackHotDevClient.js":
  6838. /*!*************************************************************!*\
  6839. !*** ./node_modules/react-dev-utils/webpackHotDevClient.js ***!
  6840. \*************************************************************/
  6841. /*! dynamic exports provided */
  6842. /*! all exports used */
  6843. /***/ (function(module, exports, __webpack_require__) {
  6844. "use strict";
  6845. /**
  6846. * Copyright (c) 2015-present, Facebook, Inc.
  6847. *
  6848. * This source code is licensed under the MIT license found in the
  6849. * LICENSE file in the root directory of this source tree.
  6850. */
  6851. // This alternative WebpackDevServer combines the functionality of:
  6852. // https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js
  6853. // https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js
  6854. // It only supports their simplest configuration (hot updates on same server).
  6855. // It makes some opinionated choices on top, like adding a syntax error overlay
  6856. // that looks similar to our console output. The error overlay is inspired by:
  6857. // https://github.com/glenjamin/webpack-hot-middleware
  6858. var SockJS = __webpack_require__(/*! sockjs-client */ "./node_modules/sockjs-client/lib/entry.js");
  6859. var stripAnsi = __webpack_require__(/*! strip-ansi */ "./node_modules/strip-ansi/index.js");
  6860. var url = __webpack_require__(/*! url */ "./node_modules/url/url.js");
  6861. var launchEditorEndpoint = __webpack_require__(/*! ./launchEditorEndpoint */ "./node_modules/react-dev-utils/launchEditorEndpoint.js");
  6862. var formatWebpackMessages = __webpack_require__(/*! ./formatWebpackMessages */ "./node_modules/react-dev-utils/formatWebpackMessages.js");
  6863. var ErrorOverlay = __webpack_require__(/*! react-error-overlay */ "./node_modules/react-error-overlay/lib/index.js");
  6864. ErrorOverlay.setEditorHandler(function editorHandler(errorLocation) {
  6865. // Keep this sync with errorOverlayMiddleware.js
  6866. fetch(
  6867. launchEditorEndpoint +
  6868. '?fileName=' +
  6869. window.encodeURIComponent(errorLocation.fileName) +
  6870. '&lineNumber=' +
  6871. window.encodeURIComponent(errorLocation.lineNumber || 1)
  6872. );
  6873. });
  6874. // We need to keep track of if there has been a runtime error.
  6875. // Essentially, we cannot guarantee application state was not corrupted by the
  6876. // runtime error. To prevent confusing behavior, we forcibly reload the entire
  6877. // application. This is handled below when we are notified of a compile (code
  6878. // change).
  6879. // See https://github.com/facebookincubator/create-react-app/issues/3096
  6880. var hadRuntimeError = false;
  6881. ErrorOverlay.startReportingRuntimeErrors({
  6882. onError: function() {
  6883. hadRuntimeError = true;
  6884. },
  6885. filename: '/static/js/bundle.js',
  6886. });
  6887. if (module.hot && typeof module.hot.dispose === 'function') {
  6888. module.hot.dispose(function() {
  6889. // TODO: why do we need this?
  6890. ErrorOverlay.stopReportingRuntimeErrors();
  6891. });
  6892. }
  6893. // Connect to WebpackDevServer via a socket.
  6894. var connection = new SockJS(
  6895. url.format({
  6896. protocol: window.location.protocol,
  6897. hostname: window.location.hostname,
  6898. port: window.location.port,
  6899. // Hardcoded in WebpackDevServer
  6900. pathname: '/sockjs-node',
  6901. })
  6902. );
  6903. // Unlike WebpackDevServer client, we won't try to reconnect
  6904. // to avoid spamming the console. Disconnect usually happens
  6905. // when developer stops the server.
  6906. connection.onclose = function() {
  6907. if (typeof console !== 'undefined' && typeof console.info === 'function') {
  6908. console.info(
  6909. 'The development server has disconnected.\nRefresh the page if necessary.'
  6910. );
  6911. }
  6912. };
  6913. // Remember some state related to hot module replacement.
  6914. var isFirstCompilation = true;
  6915. var mostRecentCompilationHash = null;
  6916. var hasCompileErrors = false;
  6917. function clearOutdatedErrors() {
  6918. // Clean up outdated compile errors, if any.
  6919. if (typeof console !== 'undefined' && typeof console.clear === 'function') {
  6920. if (hasCompileErrors) {
  6921. console.clear();
  6922. }
  6923. }
  6924. }
  6925. // Successful compilation.
  6926. function handleSuccess() {
  6927. clearOutdatedErrors();
  6928. var isHotUpdate = !isFirstCompilation;
  6929. isFirstCompilation = false;
  6930. hasCompileErrors = false;
  6931. // Attempt to apply hot updates or reload.
  6932. if (isHotUpdate) {
  6933. tryApplyUpdates(function onHotUpdateSuccess() {
  6934. // Only dismiss it when we're sure it's a hot update.
  6935. // Otherwise it would flicker right before the reload.
  6936. ErrorOverlay.dismissBuildError();
  6937. });
  6938. }
  6939. }
  6940. // Compilation with warnings (e.g. ESLint).
  6941. function handleWarnings(warnings) {
  6942. clearOutdatedErrors();
  6943. var isHotUpdate = !isFirstCompilation;
  6944. isFirstCompilation = false;
  6945. hasCompileErrors = false;
  6946. function printWarnings() {
  6947. // Print warnings to the console.
  6948. var formatted = formatWebpackMessages({
  6949. warnings: warnings,
  6950. errors: [],
  6951. });
  6952. if (typeof console !== 'undefined' && typeof console.warn === 'function') {
  6953. for (var i = 0; i < formatted.warnings.length; i++) {
  6954. if (i === 5) {
  6955. console.warn(
  6956. 'There were more warnings in other files.\n' +
  6957. 'You can find a complete log in the terminal.'
  6958. );
  6959. break;
  6960. }
  6961. console.warn(stripAnsi(formatted.warnings[i]));
  6962. }
  6963. }
  6964. }
  6965. // Attempt to apply hot updates or reload.
  6966. if (isHotUpdate) {
  6967. tryApplyUpdates(function onSuccessfulHotUpdate() {
  6968. // Only print warnings if we aren't refreshing the page.
  6969. // Otherwise they'll disappear right away anyway.
  6970. printWarnings();
  6971. // Only dismiss it when we're sure it's a hot update.
  6972. // Otherwise it would flicker right before the reload.
  6973. ErrorOverlay.dismissBuildError();
  6974. });
  6975. } else {
  6976. // Print initial warnings immediately.
  6977. printWarnings();
  6978. }
  6979. }
  6980. // Compilation with errors (e.g. syntax error or missing modules).
  6981. function handleErrors(errors) {
  6982. clearOutdatedErrors();
  6983. isFirstCompilation = false;
  6984. hasCompileErrors = true;
  6985. // "Massage" webpack messages.
  6986. var formatted = formatWebpackMessages({
  6987. errors: errors,
  6988. warnings: [],
  6989. });
  6990. // Only show the first error.
  6991. ErrorOverlay.reportBuildError(formatted.errors[0]);
  6992. // Also log them to the console.
  6993. if (typeof console !== 'undefined' && typeof console.error === 'function') {
  6994. for (var i = 0; i < formatted.errors.length; i++) {
  6995. console.error(stripAnsi(formatted.errors[i]));
  6996. }
  6997. }
  6998. // Do not attempt to reload now.
  6999. // We will reload on next success instead.
  7000. }
  7001. // There is a newer version of the code available.
  7002. function handleAvailableHash(hash) {
  7003. // Update last known compilation hash.
  7004. mostRecentCompilationHash = hash;
  7005. }
  7006. // Handle messages from the server.
  7007. connection.onmessage = function(e) {
  7008. var message = JSON.parse(e.data);
  7009. switch (message.type) {
  7010. case 'hash':
  7011. handleAvailableHash(message.data);
  7012. break;
  7013. case 'still-ok':
  7014. case 'ok':
  7015. handleSuccess();
  7016. break;
  7017. case 'content-changed':
  7018. // Triggered when a file from `contentBase` changed.
  7019. window.location.reload();
  7020. break;
  7021. case 'warnings':
  7022. handleWarnings(message.data);
  7023. break;
  7024. case 'errors':
  7025. handleErrors(message.data);
  7026. break;
  7027. default:
  7028. // Do nothing.
  7029. }
  7030. };
  7031. // Is there a newer version of this code available?
  7032. function isUpdateAvailable() {
  7033. /* globals __webpack_hash__ */
  7034. // __webpack_hash__ is the hash of the current compilation.
  7035. // It's a global variable injected by Webpack.
  7036. return mostRecentCompilationHash !== __webpack_require__.h();
  7037. }
  7038. // Webpack disallows updates in other states.
  7039. function canApplyUpdates() {
  7040. return module.hot.status() === 'idle';
  7041. }
  7042. // Attempt to update code on the fly, fall back to a hard reload.
  7043. function tryApplyUpdates(onHotUpdateSuccess) {
  7044. if (false) {
  7045. // HotModuleReplacementPlugin is not in Webpack configuration.
  7046. window.location.reload();
  7047. return;
  7048. }
  7049. if (!isUpdateAvailable() || !canApplyUpdates()) {
  7050. return;
  7051. }
  7052. function handleApplyUpdates(err, updatedModules) {
  7053. if (err || !updatedModules || hadRuntimeError) {
  7054. window.location.reload();
  7055. return;
  7056. }
  7057. if (typeof onHotUpdateSuccess === 'function') {
  7058. // Maybe we want to do something.
  7059. onHotUpdateSuccess();
  7060. }
  7061. if (isUpdateAvailable()) {
  7062. // While we were updating, there was a new update! Do it again.
  7063. tryApplyUpdates();
  7064. }
  7065. }
  7066. // https://webpack.github.io/docs/hot-module-replacement.html#check
  7067. var result = module.hot.check(/* autoApply */ true, handleApplyUpdates);
  7068. // // Webpack 2 returns a Promise instead of invoking a callback
  7069. if (result && result.then) {
  7070. result.then(
  7071. function(updatedModules) {
  7072. handleApplyUpdates(null, updatedModules);
  7073. },
  7074. function(err) {
  7075. handleApplyUpdates(err, null);
  7076. }
  7077. );
  7078. }
  7079. }
  7080. /***/ }),
  7081. /***/ "./node_modules/react-dom/cjs/react-dom.development.js":
  7082. /*!*************************************************************!*\
  7083. !*** ./node_modules/react-dom/cjs/react-dom.development.js ***!
  7084. \*************************************************************/
  7085. /*! dynamic exports provided */
  7086. /*! all exports used */
  7087. /***/ (function(module, exports, __webpack_require__) {
  7088. "use strict";
  7089. /** @license React v16.14.0
  7090. * react-dom.development.js
  7091. *
  7092. * Copyright (c) Facebook, Inc. and its affiliates.
  7093. *
  7094. * This source code is licensed under the MIT license found in the
  7095. * LICENSE file in the root directory of this source tree.
  7096. */
  7097. if (true) {
  7098. (function() {
  7099. 'use strict';
  7100. var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  7101. var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
  7102. var Scheduler = __webpack_require__(/*! scheduler */ "./node_modules/scheduler/index.js");
  7103. var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
  7104. var tracing = __webpack_require__(/*! scheduler/tracing */ "./node_modules/scheduler/tracing.js");
  7105. var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
  7106. // Current owner and dispatcher used to share the same ref,
  7107. // but PR #14548 split them out to better support the react-debug-tools package.
  7108. if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
  7109. ReactSharedInternals.ReactCurrentDispatcher = {
  7110. current: null
  7111. };
  7112. }
  7113. if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
  7114. ReactSharedInternals.ReactCurrentBatchConfig = {
  7115. suspense: null
  7116. };
  7117. }
  7118. // by calls to these methods by a Babel plugin.
  7119. //
  7120. // In PROD (or in packages without access to React internals),
  7121. // they are left as they are instead.
  7122. function warn(format) {
  7123. {
  7124. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  7125. args[_key - 1] = arguments[_key];
  7126. }
  7127. printWarning('warn', format, args);
  7128. }
  7129. }
  7130. function error(format) {
  7131. {
  7132. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  7133. args[_key2 - 1] = arguments[_key2];
  7134. }
  7135. printWarning('error', format, args);
  7136. }
  7137. }
  7138. function printWarning(level, format, args) {
  7139. // When changing this logic, you might want to also
  7140. // update consoleWithStackDev.www.js as well.
  7141. {
  7142. var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
  7143. if (!hasExistingStack) {
  7144. var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
  7145. var stack = ReactDebugCurrentFrame.getStackAddendum();
  7146. if (stack !== '') {
  7147. format += '%s';
  7148. args = args.concat([stack]);
  7149. }
  7150. }
  7151. var argsWithFormat = args.map(function (item) {
  7152. return '' + item;
  7153. }); // Careful: RN currently depends on this prefix
  7154. argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
  7155. // breaks IE9: https://github.com/facebook/react/issues/13610
  7156. // eslint-disable-next-line react-internal/no-production-logging
  7157. Function.prototype.apply.call(console[level], console, argsWithFormat);
  7158. try {
  7159. // --- Welcome to debugging React ---
  7160. // This error was thrown as a convenience so that you can use this stack
  7161. // to find the callsite that caused this warning to fire.
  7162. var argIndex = 0;
  7163. var message = 'Warning: ' + format.replace(/%s/g, function () {
  7164. return args[argIndex++];
  7165. });
  7166. throw new Error(message);
  7167. } catch (x) {}
  7168. }
  7169. }
  7170. if (!React) {
  7171. {
  7172. throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." );
  7173. }
  7174. }
  7175. var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
  7176. var funcArgs = Array.prototype.slice.call(arguments, 3);
  7177. try {
  7178. func.apply(context, funcArgs);
  7179. } catch (error) {
  7180. this.onError(error);
  7181. }
  7182. };
  7183. {
  7184. // In DEV mode, we swap out invokeGuardedCallback for a special version
  7185. // that plays more nicely with the browser's DevTools. The idea is to preserve
  7186. // "Pause on exceptions" behavior. Because React wraps all user-provided
  7187. // functions in invokeGuardedCallback, and the production version of
  7188. // invokeGuardedCallback uses a try-catch, all user exceptions are treated
  7189. // like caught exceptions, and the DevTools won't pause unless the developer
  7190. // takes the extra step of enabling pause on caught exceptions. This is
  7191. // unintuitive, though, because even though React has caught the error, from
  7192. // the developer's perspective, the error is uncaught.
  7193. //
  7194. // To preserve the expected "Pause on exceptions" behavior, we don't use a
  7195. // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
  7196. // DOM node, and call the user-provided callback from inside an event handler
  7197. // for that fake event. If the callback throws, the error is "captured" using
  7198. // a global event handler. But because the error happens in a different
  7199. // event loop context, it does not interrupt the normal program flow.
  7200. // Effectively, this gives us try-catch behavior without actually using
  7201. // try-catch. Neat!
  7202. // Check that the browser supports the APIs we need to implement our special
  7203. // DEV version of invokeGuardedCallback
  7204. if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
  7205. var fakeNode = document.createElement('react');
  7206. var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
  7207. // If document doesn't exist we know for sure we will crash in this method
  7208. // when we call document.createEvent(). However this can cause confusing
  7209. // errors: https://github.com/facebookincubator/create-react-app/issues/3482
  7210. // So we preemptively throw with a better message instead.
  7211. if (!(typeof document !== 'undefined')) {
  7212. {
  7213. throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
  7214. }
  7215. }
  7216. var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We
  7217. // set this to true at the beginning, then set it to false right after
  7218. // calling the function. If the function errors, `didError` will never be
  7219. // set to false. This strategy works even if the browser is flaky and
  7220. // fails to call our global error handler, because it doesn't rely on
  7221. // the error event at all.
  7222. var didError = true; // Keeps track of the value of window.event so that we can reset it
  7223. // during the callback to let user code access window.event in the
  7224. // browsers that support it.
  7225. var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
  7226. // dispatching: https://github.com/facebook/react/issues/13688
  7227. var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously
  7228. // dispatch our fake event using `dispatchEvent`. Inside the handler, we
  7229. // call the user-provided callback.
  7230. var funcArgs = Array.prototype.slice.call(arguments, 3);
  7231. function callCallback() {
  7232. // We immediately remove the callback from event listeners so that
  7233. // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
  7234. // nested call would trigger the fake event handlers of any call higher
  7235. // in the stack.
  7236. fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
  7237. // window.event assignment in both IE <= 10 as they throw an error
  7238. // "Member not found" in strict mode, and in Firefox which does not
  7239. // support window.event.
  7240. if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
  7241. window.event = windowEvent;
  7242. }
  7243. func.apply(context, funcArgs);
  7244. didError = false;
  7245. } // Create a global error event handler. We use this to capture the value
  7246. // that was thrown. It's possible that this error handler will fire more
  7247. // than once; for example, if non-React code also calls `dispatchEvent`
  7248. // and a handler for that event throws. We should be resilient to most of
  7249. // those cases. Even if our error event handler fires more than once, the
  7250. // last error event is always used. If the callback actually does error,
  7251. // we know that the last error event is the correct one, because it's not
  7252. // possible for anything else to have happened in between our callback
  7253. // erroring and the code that follows the `dispatchEvent` call below. If
  7254. // the callback doesn't error, but the error event was fired, we know to
  7255. // ignore it because `didError` will be false, as described above.
  7256. var error; // Use this to track whether the error event is ever called.
  7257. var didSetError = false;
  7258. var isCrossOriginError = false;
  7259. function handleWindowError(event) {
  7260. error = event.error;
  7261. didSetError = true;
  7262. if (error === null && event.colno === 0 && event.lineno === 0) {
  7263. isCrossOriginError = true;
  7264. }
  7265. if (event.defaultPrevented) {
  7266. // Some other error handler has prevented default.
  7267. // Browsers silence the error report if this happens.
  7268. // We'll remember this to later decide whether to log it or not.
  7269. if (error != null && typeof error === 'object') {
  7270. try {
  7271. error._suppressLogging = true;
  7272. } catch (inner) {// Ignore.
  7273. }
  7274. }
  7275. }
  7276. } // Create a fake event type.
  7277. var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
  7278. window.addEventListener('error', handleWindowError);
  7279. fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
  7280. // errors, it will trigger our global error handler.
  7281. evt.initEvent(evtType, false, false);
  7282. fakeNode.dispatchEvent(evt);
  7283. if (windowEventDescriptor) {
  7284. Object.defineProperty(window, 'event', windowEventDescriptor);
  7285. }
  7286. if (didError) {
  7287. if (!didSetError) {
  7288. // The callback errored, but the error event never fired.
  7289. error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
  7290. } else if (isCrossOriginError) {
  7291. error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
  7292. }
  7293. this.onError(error);
  7294. } // Remove our event listeners
  7295. window.removeEventListener('error', handleWindowError);
  7296. };
  7297. invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
  7298. }
  7299. }
  7300. var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
  7301. var hasError = false;
  7302. var caughtError = null; // Used by event system to capture/rethrow the first error.
  7303. var hasRethrowError = false;
  7304. var rethrowError = null;
  7305. var reporter = {
  7306. onError: function (error) {
  7307. hasError = true;
  7308. caughtError = error;
  7309. }
  7310. };
  7311. /**
  7312. * Call a function while guarding against errors that happens within it.
  7313. * Returns an error if it throws, otherwise null.
  7314. *
  7315. * In production, this is implemented using a try-catch. The reason we don't
  7316. * use a try-catch directly is so that we can swap out a different
  7317. * implementation in DEV mode.
  7318. *
  7319. * @param {String} name of the guard to use for logging or debugging
  7320. * @param {Function} func The function to invoke
  7321. * @param {*} context The context to use when calling the function
  7322. * @param {...*} args Arguments for function
  7323. */
  7324. function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
  7325. hasError = false;
  7326. caughtError = null;
  7327. invokeGuardedCallbackImpl$1.apply(reporter, arguments);
  7328. }
  7329. /**
  7330. * Same as invokeGuardedCallback, but instead of returning an error, it stores
  7331. * it in a global so it can be rethrown by `rethrowCaughtError` later.
  7332. * TODO: See if caughtError and rethrowError can be unified.
  7333. *
  7334. * @param {String} name of the guard to use for logging or debugging
  7335. * @param {Function} func The function to invoke
  7336. * @param {*} context The context to use when calling the function
  7337. * @param {...*} args Arguments for function
  7338. */
  7339. function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
  7340. invokeGuardedCallback.apply(this, arguments);
  7341. if (hasError) {
  7342. var error = clearCaughtError();
  7343. if (!hasRethrowError) {
  7344. hasRethrowError = true;
  7345. rethrowError = error;
  7346. }
  7347. }
  7348. }
  7349. /**
  7350. * During execution of guarded functions we will capture the first error which
  7351. * we will rethrow to be handled by the top level error handler.
  7352. */
  7353. function rethrowCaughtError() {
  7354. if (hasRethrowError) {
  7355. var error = rethrowError;
  7356. hasRethrowError = false;
  7357. rethrowError = null;
  7358. throw error;
  7359. }
  7360. }
  7361. function hasCaughtError() {
  7362. return hasError;
  7363. }
  7364. function clearCaughtError() {
  7365. if (hasError) {
  7366. var error = caughtError;
  7367. hasError = false;
  7368. caughtError = null;
  7369. return error;
  7370. } else {
  7371. {
  7372. {
  7373. throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
  7374. }
  7375. }
  7376. }
  7377. }
  7378. var getFiberCurrentPropsFromNode = null;
  7379. var getInstanceFromNode = null;
  7380. var getNodeFromInstance = null;
  7381. function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
  7382. getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
  7383. getInstanceFromNode = getInstanceFromNodeImpl;
  7384. getNodeFromInstance = getNodeFromInstanceImpl;
  7385. {
  7386. if (!getNodeFromInstance || !getInstanceFromNode) {
  7387. error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
  7388. }
  7389. }
  7390. }
  7391. var validateEventDispatches;
  7392. {
  7393. validateEventDispatches = function (event) {
  7394. var dispatchListeners = event._dispatchListeners;
  7395. var dispatchInstances = event._dispatchInstances;
  7396. var listenersIsArr = Array.isArray(dispatchListeners);
  7397. var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
  7398. var instancesIsArr = Array.isArray(dispatchInstances);
  7399. var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
  7400. if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {
  7401. error('EventPluginUtils: Invalid `event`.');
  7402. }
  7403. };
  7404. }
  7405. /**
  7406. * Dispatch the event to the listener.
  7407. * @param {SyntheticEvent} event SyntheticEvent to handle
  7408. * @param {function} listener Application-level callback
  7409. * @param {*} inst Internal component instance
  7410. */
  7411. function executeDispatch(event, listener, inst) {
  7412. var type = event.type || 'unknown-event';
  7413. event.currentTarget = getNodeFromInstance(inst);
  7414. invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
  7415. event.currentTarget = null;
  7416. }
  7417. /**
  7418. * Standard/simple iteration through an event's collected dispatches.
  7419. */
  7420. function executeDispatchesInOrder(event) {
  7421. var dispatchListeners = event._dispatchListeners;
  7422. var dispatchInstances = event._dispatchInstances;
  7423. {
  7424. validateEventDispatches(event);
  7425. }
  7426. if (Array.isArray(dispatchListeners)) {
  7427. for (var i = 0; i < dispatchListeners.length; i++) {
  7428. if (event.isPropagationStopped()) {
  7429. break;
  7430. } // Listeners and Instances are two parallel arrays that are always in sync.
  7431. executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
  7432. }
  7433. } else if (dispatchListeners) {
  7434. executeDispatch(event, dispatchListeners, dispatchInstances);
  7435. }
  7436. event._dispatchListeners = null;
  7437. event._dispatchInstances = null;
  7438. }
  7439. var FunctionComponent = 0;
  7440. var ClassComponent = 1;
  7441. var IndeterminateComponent = 2; // Before we know whether it is function or class
  7442. var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
  7443. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
  7444. var HostComponent = 5;
  7445. var HostText = 6;
  7446. var Fragment = 7;
  7447. var Mode = 8;
  7448. var ContextConsumer = 9;
  7449. var ContextProvider = 10;
  7450. var ForwardRef = 11;
  7451. var Profiler = 12;
  7452. var SuspenseComponent = 13;
  7453. var MemoComponent = 14;
  7454. var SimpleMemoComponent = 15;
  7455. var LazyComponent = 16;
  7456. var IncompleteClassComponent = 17;
  7457. var DehydratedFragment = 18;
  7458. var SuspenseListComponent = 19;
  7459. var FundamentalComponent = 20;
  7460. var ScopeComponent = 21;
  7461. var Block = 22;
  7462. /**
  7463. * Injectable ordering of event plugins.
  7464. */
  7465. var eventPluginOrder = null;
  7466. /**
  7467. * Injectable mapping from names to event plugin modules.
  7468. */
  7469. var namesToPlugins = {};
  7470. /**
  7471. * Recomputes the plugin list using the injected plugins and plugin ordering.
  7472. *
  7473. * @private
  7474. */
  7475. function recomputePluginOrdering() {
  7476. if (!eventPluginOrder) {
  7477. // Wait until an `eventPluginOrder` is injected.
  7478. return;
  7479. }
  7480. for (var pluginName in namesToPlugins) {
  7481. var pluginModule = namesToPlugins[pluginName];
  7482. var pluginIndex = eventPluginOrder.indexOf(pluginName);
  7483. if (!(pluginIndex > -1)) {
  7484. {
  7485. throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`." );
  7486. }
  7487. }
  7488. if (plugins[pluginIndex]) {
  7489. continue;
  7490. }
  7491. if (!pluginModule.extractEvents) {
  7492. {
  7493. throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not." );
  7494. }
  7495. }
  7496. plugins[pluginIndex] = pluginModule;
  7497. var publishedEvents = pluginModule.eventTypes;
  7498. for (var eventName in publishedEvents) {
  7499. if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {
  7500. {
  7501. throw Error( "EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`." );
  7502. }
  7503. }
  7504. }
  7505. }
  7506. }
  7507. /**
  7508. * Publishes an event so that it can be dispatched by the supplied plugin.
  7509. *
  7510. * @param {object} dispatchConfig Dispatch configuration for the event.
  7511. * @param {object} PluginModule Plugin publishing the event.
  7512. * @return {boolean} True if the event was successfully published.
  7513. * @private
  7514. */
  7515. function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
  7516. if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {
  7517. {
  7518. throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + eventName + "`." );
  7519. }
  7520. }
  7521. eventNameDispatchConfigs[eventName] = dispatchConfig;
  7522. var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  7523. if (phasedRegistrationNames) {
  7524. for (var phaseName in phasedRegistrationNames) {
  7525. if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
  7526. var phasedRegistrationName = phasedRegistrationNames[phaseName];
  7527. publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
  7528. }
  7529. }
  7530. return true;
  7531. } else if (dispatchConfig.registrationName) {
  7532. publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
  7533. return true;
  7534. }
  7535. return false;
  7536. }
  7537. /**
  7538. * Publishes a registration name that is used to identify dispatched events.
  7539. *
  7540. * @param {string} registrationName Registration name to add.
  7541. * @param {object} PluginModule Plugin publishing the event.
  7542. * @private
  7543. */
  7544. function publishRegistrationName(registrationName, pluginModule, eventName) {
  7545. if (!!registrationNameModules[registrationName]) {
  7546. {
  7547. throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + registrationName + "`." );
  7548. }
  7549. }
  7550. registrationNameModules[registrationName] = pluginModule;
  7551. registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
  7552. {
  7553. var lowerCasedName = registrationName.toLowerCase();
  7554. possibleRegistrationNames[lowerCasedName] = registrationName;
  7555. if (registrationName === 'onDoubleClick') {
  7556. possibleRegistrationNames.ondblclick = registrationName;
  7557. }
  7558. }
  7559. }
  7560. /**
  7561. * Registers plugins so that they can extract and dispatch events.
  7562. */
  7563. /**
  7564. * Ordered list of injected plugins.
  7565. */
  7566. var plugins = [];
  7567. /**
  7568. * Mapping from event name to dispatch config
  7569. */
  7570. var eventNameDispatchConfigs = {};
  7571. /**
  7572. * Mapping from registration name to plugin module
  7573. */
  7574. var registrationNameModules = {};
  7575. /**
  7576. * Mapping from registration name to event name
  7577. */
  7578. var registrationNameDependencies = {};
  7579. /**
  7580. * Mapping from lowercase registration names to the properly cased version,
  7581. * used to warn in the case of missing event handlers. Available
  7582. * only in true.
  7583. * @type {Object}
  7584. */
  7585. var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
  7586. /**
  7587. * Injects an ordering of plugins (by plugin name). This allows the ordering
  7588. * to be decoupled from injection of the actual plugins so that ordering is
  7589. * always deterministic regardless of packaging, on-the-fly injection, etc.
  7590. *
  7591. * @param {array} InjectedEventPluginOrder
  7592. * @internal
  7593. */
  7594. function injectEventPluginOrder(injectedEventPluginOrder) {
  7595. if (!!eventPluginOrder) {
  7596. {
  7597. throw Error( "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React." );
  7598. }
  7599. } // Clone the ordering so it cannot be dynamically mutated.
  7600. eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
  7601. recomputePluginOrdering();
  7602. }
  7603. /**
  7604. * Injects plugins to be used by plugin event system. The plugin names must be
  7605. * in the ordering injected by `injectEventPluginOrder`.
  7606. *
  7607. * Plugins can be injected as part of page initialization or on-the-fly.
  7608. *
  7609. * @param {object} injectedNamesToPlugins Map from names to plugin modules.
  7610. * @internal
  7611. */
  7612. function injectEventPluginsByName(injectedNamesToPlugins) {
  7613. var isOrderingDirty = false;
  7614. for (var pluginName in injectedNamesToPlugins) {
  7615. if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
  7616. continue;
  7617. }
  7618. var pluginModule = injectedNamesToPlugins[pluginName];
  7619. if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
  7620. if (!!namesToPlugins[pluginName]) {
  7621. {
  7622. throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + pluginName + "`." );
  7623. }
  7624. }
  7625. namesToPlugins[pluginName] = pluginModule;
  7626. isOrderingDirty = true;
  7627. }
  7628. }
  7629. if (isOrderingDirty) {
  7630. recomputePluginOrdering();
  7631. }
  7632. }
  7633. var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
  7634. var PLUGIN_EVENT_SYSTEM = 1;
  7635. var IS_REPLAYED = 1 << 5;
  7636. var IS_FIRST_ANCESTOR = 1 << 6;
  7637. var restoreImpl = null;
  7638. var restoreTarget = null;
  7639. var restoreQueue = null;
  7640. function restoreStateOfTarget(target) {
  7641. // We perform this translation at the end of the event loop so that we
  7642. // always receive the correct fiber here
  7643. var internalInstance = getInstanceFromNode(target);
  7644. if (!internalInstance) {
  7645. // Unmounted
  7646. return;
  7647. }
  7648. if (!(typeof restoreImpl === 'function')) {
  7649. {
  7650. throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
  7651. }
  7652. }
  7653. var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
  7654. if (stateNode) {
  7655. var _props = getFiberCurrentPropsFromNode(stateNode);
  7656. restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
  7657. }
  7658. }
  7659. function setRestoreImplementation(impl) {
  7660. restoreImpl = impl;
  7661. }
  7662. function enqueueStateRestore(target) {
  7663. if (restoreTarget) {
  7664. if (restoreQueue) {
  7665. restoreQueue.push(target);
  7666. } else {
  7667. restoreQueue = [target];
  7668. }
  7669. } else {
  7670. restoreTarget = target;
  7671. }
  7672. }
  7673. function needsStateRestore() {
  7674. return restoreTarget !== null || restoreQueue !== null;
  7675. }
  7676. function restoreStateIfNeeded() {
  7677. if (!restoreTarget) {
  7678. return;
  7679. }
  7680. var target = restoreTarget;
  7681. var queuedTargets = restoreQueue;
  7682. restoreTarget = null;
  7683. restoreQueue = null;
  7684. restoreStateOfTarget(target);
  7685. if (queuedTargets) {
  7686. for (var i = 0; i < queuedTargets.length; i++) {
  7687. restoreStateOfTarget(queuedTargets[i]);
  7688. }
  7689. }
  7690. }
  7691. var enableProfilerTimer = true; // Trace which interactions trigger each commit.
  7692. var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
  7693. var enableFundamentalAPI = false; // Experimental Scope support.
  7694. var warnAboutStringRefs = false;
  7695. // the renderer. Such as when we're dispatching events or if third party
  7696. // libraries need to call batchedUpdates. Eventually, this API will go away when
  7697. // everything is batched by default. We'll then have a similar API to opt-out of
  7698. // scheduled work and instead do synchronous work.
  7699. // Defaults
  7700. var batchedUpdatesImpl = function (fn, bookkeeping) {
  7701. return fn(bookkeeping);
  7702. };
  7703. var discreteUpdatesImpl = function (fn, a, b, c, d) {
  7704. return fn(a, b, c, d);
  7705. };
  7706. var flushDiscreteUpdatesImpl = function () {};
  7707. var batchedEventUpdatesImpl = batchedUpdatesImpl;
  7708. var isInsideEventHandler = false;
  7709. var isBatchingEventUpdates = false;
  7710. function finishEventHandler() {
  7711. // Here we wait until all updates have propagated, which is important
  7712. // when using controlled components within layers:
  7713. // https://github.com/facebook/react/issues/1698
  7714. // Then we restore state of any controlled component.
  7715. var controlledComponentsHavePendingUpdates = needsStateRestore();
  7716. if (controlledComponentsHavePendingUpdates) {
  7717. // If a controlled event was fired, we may need to restore the state of
  7718. // the DOM node back to the controlled value. This is necessary when React
  7719. // bails out of the update without touching the DOM.
  7720. flushDiscreteUpdatesImpl();
  7721. restoreStateIfNeeded();
  7722. }
  7723. }
  7724. function batchedUpdates(fn, bookkeeping) {
  7725. if (isInsideEventHandler) {
  7726. // If we are currently inside another batch, we need to wait until it
  7727. // fully completes before restoring state.
  7728. return fn(bookkeeping);
  7729. }
  7730. isInsideEventHandler = true;
  7731. try {
  7732. return batchedUpdatesImpl(fn, bookkeeping);
  7733. } finally {
  7734. isInsideEventHandler = false;
  7735. finishEventHandler();
  7736. }
  7737. }
  7738. function batchedEventUpdates(fn, a, b) {
  7739. if (isBatchingEventUpdates) {
  7740. // If we are currently inside another batch, we need to wait until it
  7741. // fully completes before restoring state.
  7742. return fn(a, b);
  7743. }
  7744. isBatchingEventUpdates = true;
  7745. try {
  7746. return batchedEventUpdatesImpl(fn, a, b);
  7747. } finally {
  7748. isBatchingEventUpdates = false;
  7749. finishEventHandler();
  7750. }
  7751. } // This is for the React Flare event system
  7752. function discreteUpdates(fn, a, b, c, d) {
  7753. var prevIsInsideEventHandler = isInsideEventHandler;
  7754. isInsideEventHandler = true;
  7755. try {
  7756. return discreteUpdatesImpl(fn, a, b, c, d);
  7757. } finally {
  7758. isInsideEventHandler = prevIsInsideEventHandler;
  7759. if (!isInsideEventHandler) {
  7760. finishEventHandler();
  7761. }
  7762. }
  7763. }
  7764. function flushDiscreteUpdatesIfNeeded(timeStamp) {
  7765. // event.timeStamp isn't overly reliable due to inconsistencies in
  7766. // how different browsers have historically provided the time stamp.
  7767. // Some browsers provide high-resolution time stamps for all events,
  7768. // some provide low-resolution time stamps for all events. FF < 52
  7769. // even mixes both time stamps together. Some browsers even report
  7770. // negative time stamps or time stamps that are 0 (iOS9) in some cases.
  7771. // Given we are only comparing two time stamps with equality (!==),
  7772. // we are safe from the resolution differences. If the time stamp is 0
  7773. // we bail-out of preventing the flush, which can affect semantics,
  7774. // such as if an earlier flush removes or adds event listeners that
  7775. // are fired in the subsequent flush. However, this is the same
  7776. // behaviour as we had before this change, so the risks are low.
  7777. if (!isInsideEventHandler && (!enableDeprecatedFlareAPI )) {
  7778. flushDiscreteUpdatesImpl();
  7779. }
  7780. }
  7781. function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
  7782. batchedUpdatesImpl = _batchedUpdatesImpl;
  7783. discreteUpdatesImpl = _discreteUpdatesImpl;
  7784. flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
  7785. batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
  7786. }
  7787. var DiscreteEvent = 0;
  7788. var UserBlockingEvent = 1;
  7789. var ContinuousEvent = 2;
  7790. // A reserved attribute.
  7791. // It is handled by React separately and shouldn't be written to the DOM.
  7792. var RESERVED = 0; // A simple string attribute.
  7793. // Attributes that aren't in the whitelist are presumed to have this type.
  7794. var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
  7795. // "enumerated" attributes with "true" and "false" as possible values.
  7796. // When true, it should be set to a "true" string.
  7797. // When false, it should be set to a "false" string.
  7798. var BOOLEANISH_STRING = 2; // A real boolean attribute.
  7799. // When true, it should be present (set either to an empty string or its name).
  7800. // When false, it should be omitted.
  7801. var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
  7802. // When true, it should be present (set either to an empty string or its name).
  7803. // When false, it should be omitted.
  7804. // For any other value, should be present with that value.
  7805. var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
  7806. // When falsy, it should be removed.
  7807. var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
  7808. // When falsy, it should be removed.
  7809. var POSITIVE_NUMERIC = 6;
  7810. /* eslint-disable max-len */
  7811. 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";
  7812. /* eslint-enable max-len */
  7813. var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
  7814. var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
  7815. var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
  7816. var hasOwnProperty = Object.prototype.hasOwnProperty;
  7817. var illegalAttributeNameCache = {};
  7818. var validatedAttributeNameCache = {};
  7819. function isAttributeNameSafe(attributeName) {
  7820. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
  7821. return true;
  7822. }
  7823. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
  7824. return false;
  7825. }
  7826. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
  7827. validatedAttributeNameCache[attributeName] = true;
  7828. return true;
  7829. }
  7830. illegalAttributeNameCache[attributeName] = true;
  7831. {
  7832. error('Invalid attribute name: `%s`', attributeName);
  7833. }
  7834. return false;
  7835. }
  7836. function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
  7837. if (propertyInfo !== null) {
  7838. return propertyInfo.type === RESERVED;
  7839. }
  7840. if (isCustomComponentTag) {
  7841. return false;
  7842. }
  7843. if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
  7844. return true;
  7845. }
  7846. return false;
  7847. }
  7848. function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
  7849. if (propertyInfo !== null && propertyInfo.type === RESERVED) {
  7850. return false;
  7851. }
  7852. switch (typeof value) {
  7853. case 'function': // $FlowIssue symbol is perfectly valid here
  7854. case 'symbol':
  7855. // eslint-disable-line
  7856. return true;
  7857. case 'boolean':
  7858. {
  7859. if (isCustomComponentTag) {
  7860. return false;
  7861. }
  7862. if (propertyInfo !== null) {
  7863. return !propertyInfo.acceptsBooleans;
  7864. } else {
  7865. var prefix = name.toLowerCase().slice(0, 5);
  7866. return prefix !== 'data-' && prefix !== 'aria-';
  7867. }
  7868. }
  7869. default:
  7870. return false;
  7871. }
  7872. }
  7873. function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
  7874. if (value === null || typeof value === 'undefined') {
  7875. return true;
  7876. }
  7877. if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
  7878. return true;
  7879. }
  7880. if (isCustomComponentTag) {
  7881. return false;
  7882. }
  7883. if (propertyInfo !== null) {
  7884. switch (propertyInfo.type) {
  7885. case BOOLEAN:
  7886. return !value;
  7887. case OVERLOADED_BOOLEAN:
  7888. return value === false;
  7889. case NUMERIC:
  7890. return isNaN(value);
  7891. case POSITIVE_NUMERIC:
  7892. return isNaN(value) || value < 1;
  7893. }
  7894. }
  7895. return false;
  7896. }
  7897. function getPropertyInfo(name) {
  7898. return properties.hasOwnProperty(name) ? properties[name] : null;
  7899. }
  7900. function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
  7901. this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
  7902. this.attributeName = attributeName;
  7903. this.attributeNamespace = attributeNamespace;
  7904. this.mustUseProperty = mustUseProperty;
  7905. this.propertyName = name;
  7906. this.type = type;
  7907. this.sanitizeURL = sanitizeURL;
  7908. } // When adding attributes to this list, be sure to also add them to
  7909. // the `possibleStandardNames` module to ensure casing and incorrect
  7910. // name warnings.
  7911. var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
  7912. var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
  7913. // elements (not just inputs). Now that ReactDOMInput assigns to the
  7914. // defaultValue property -- do we need this?
  7915. 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
  7916. reservedProps.forEach(function (name) {
  7917. properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
  7918. name, // attributeName
  7919. null, // attributeNamespace
  7920. false);
  7921. }); // A few React string attributes have a different name.
  7922. // This is a mapping from React prop names to the attribute names.
  7923. [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
  7924. var name = _ref[0],
  7925. attributeName = _ref[1];
  7926. properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  7927. attributeName, // attributeName
  7928. null, // attributeNamespace
  7929. false);
  7930. }); // These are "enumerated" HTML attributes that accept "true" and "false".
  7931. // In React, we let users pass `true` and `false` even though technically
  7932. // these aren't boolean attributes (they are coerced to strings).
  7933. ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
  7934. properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
  7935. name.toLowerCase(), // attributeName
  7936. null, // attributeNamespace
  7937. false);
  7938. }); // These are "enumerated" SVG attributes that accept "true" and "false".
  7939. // In React, we let users pass `true` and `false` even though technically
  7940. // these aren't boolean attributes (they are coerced to strings).
  7941. // Since these are SVG attributes, their attribute names are case-sensitive.
  7942. ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
  7943. properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
  7944. name, // attributeName
  7945. null, // attributeNamespace
  7946. false);
  7947. }); // These are HTML boolean attributes.
  7948. ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
  7949. // on the client side because the browsers are inconsistent. Instead we call focus().
  7950. 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
  7951. 'itemScope'].forEach(function (name) {
  7952. properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
  7953. name.toLowerCase(), // attributeName
  7954. null, // attributeNamespace
  7955. false);
  7956. }); // These are the few React props that we set as DOM properties
  7957. // rather than attributes. These are all booleans.
  7958. ['checked', // Note: `option.selected` is not updated if `select.multiple` is
  7959. // disabled with `removeAttribute`. We have special logic for handling this.
  7960. 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
  7961. // you'll need to set attributeName to name.toLowerCase()
  7962. // instead in the assignment below.
  7963. ].forEach(function (name) {
  7964. properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
  7965. name, // attributeName
  7966. null, // attributeNamespace
  7967. false);
  7968. }); // These are HTML attributes that are "overloaded booleans": they behave like
  7969. // booleans, but can also accept a string value.
  7970. ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
  7971. // you'll need to set attributeName to name.toLowerCase()
  7972. // instead in the assignment below.
  7973. ].forEach(function (name) {
  7974. properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
  7975. name, // attributeName
  7976. null, // attributeNamespace
  7977. false);
  7978. }); // These are HTML attributes that must be positive numbers.
  7979. ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
  7980. // you'll need to set attributeName to name.toLowerCase()
  7981. // instead in the assignment below.
  7982. ].forEach(function (name) {
  7983. properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
  7984. name, // attributeName
  7985. null, // attributeNamespace
  7986. false);
  7987. }); // These are HTML attributes that must be numbers.
  7988. ['rowSpan', 'start'].forEach(function (name) {
  7989. properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
  7990. name.toLowerCase(), // attributeName
  7991. null, // attributeNamespace
  7992. false);
  7993. });
  7994. var CAMELIZE = /[\-\:]([a-z])/g;
  7995. var capitalize = function (token) {
  7996. return token[1].toUpperCase();
  7997. }; // This is a list of all SVG attributes that need special casing, namespacing,
  7998. // or boolean value assignment. Regular attributes that just accept strings
  7999. // and have the same names are omitted, just like in the HTML whitelist.
  8000. // Some of these attributes can be hard to find. This list was created by
  8001. // scraping the MDN documentation.
  8002. ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
  8003. // you'll need to set attributeName to name.toLowerCase()
  8004. // instead in the assignment below.
  8005. ].forEach(function (attributeName) {
  8006. var name = attributeName.replace(CAMELIZE, capitalize);
  8007. properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  8008. attributeName, null, // attributeNamespace
  8009. false);
  8010. }); // String SVG attributes with the xlink namespace.
  8011. ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
  8012. // you'll need to set attributeName to name.toLowerCase()
  8013. // instead in the assignment below.
  8014. ].forEach(function (attributeName) {
  8015. var name = attributeName.replace(CAMELIZE, capitalize);
  8016. properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  8017. attributeName, 'http://www.w3.org/1999/xlink', false);
  8018. }); // String SVG attributes with the xml namespace.
  8019. ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
  8020. // you'll need to set attributeName to name.toLowerCase()
  8021. // instead in the assignment below.
  8022. ].forEach(function (attributeName) {
  8023. var name = attributeName.replace(CAMELIZE, capitalize);
  8024. properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  8025. attributeName, 'http://www.w3.org/XML/1998/namespace', false);
  8026. }); // These attribute exists both in HTML and SVG.
  8027. // The attribute name is case-sensitive in SVG so we can't just use
  8028. // the React name like we do for attributes that exist only in HTML.
  8029. ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
  8030. properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
  8031. attributeName.toLowerCase(), // attributeName
  8032. null, // attributeNamespace
  8033. false);
  8034. }); // These attributes accept URLs. These must not allow javascript: URLS.
  8035. // These will also need to accept Trusted Types object in the future.
  8036. var xlinkHref = 'xlinkHref';
  8037. properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
  8038. 'xlink:href', 'http://www.w3.org/1999/xlink', true);
  8039. ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
  8040. properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
  8041. attributeName.toLowerCase(), // attributeName
  8042. null, // attributeNamespace
  8043. true);
  8044. });
  8045. var ReactDebugCurrentFrame = null;
  8046. {
  8047. ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
  8048. } // A javascript: URL can contain leading C0 control or \u0020 SPACE,
  8049. // and any newline or tab are filtered out as if they're not part of the URL.
  8050. // https://url.spec.whatwg.org/#url-parsing
  8051. // Tab or newline are defined as \r\n\t:
  8052. // https://infra.spec.whatwg.org/#ascii-tab-or-newline
  8053. // A C0 control is a code point in the range \u0000 NULL to \u001F
  8054. // INFORMATION SEPARATOR ONE, inclusive:
  8055. // https://infra.spec.whatwg.org/#c0-control-or-space
  8056. /* eslint-disable max-len */
  8057. var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
  8058. var didWarn = false;
  8059. function sanitizeURL(url) {
  8060. {
  8061. if (!didWarn && isJavaScriptProtocol.test(url)) {
  8062. didWarn = true;
  8063. error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
  8064. }
  8065. }
  8066. }
  8067. /**
  8068. * Get the value for a property on a node. Only used in DEV for SSR validation.
  8069. * The "expected" argument is used as a hint of what the expected value is.
  8070. * Some properties have multiple equivalent values.
  8071. */
  8072. function getValueForProperty(node, name, expected, propertyInfo) {
  8073. {
  8074. if (propertyInfo.mustUseProperty) {
  8075. var propertyName = propertyInfo.propertyName;
  8076. return node[propertyName];
  8077. } else {
  8078. if ( propertyInfo.sanitizeURL) {
  8079. // If we haven't fully disabled javascript: URLs, and if
  8080. // the hydration is successful of a javascript: URL, we
  8081. // still want to warn on the client.
  8082. sanitizeURL('' + expected);
  8083. }
  8084. var attributeName = propertyInfo.attributeName;
  8085. var stringValue = null;
  8086. if (propertyInfo.type === OVERLOADED_BOOLEAN) {
  8087. if (node.hasAttribute(attributeName)) {
  8088. var value = node.getAttribute(attributeName);
  8089. if (value === '') {
  8090. return true;
  8091. }
  8092. if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
  8093. return value;
  8094. }
  8095. if (value === '' + expected) {
  8096. return expected;
  8097. }
  8098. return value;
  8099. }
  8100. } else if (node.hasAttribute(attributeName)) {
  8101. if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
  8102. // We had an attribute but shouldn't have had one, so read it
  8103. // for the error message.
  8104. return node.getAttribute(attributeName);
  8105. }
  8106. if (propertyInfo.type === BOOLEAN) {
  8107. // If this was a boolean, it doesn't matter what the value is
  8108. // the fact that we have it is the same as the expected.
  8109. return expected;
  8110. } // Even if this property uses a namespace we use getAttribute
  8111. // because we assume its namespaced name is the same as our config.
  8112. // To use getAttributeNS we need the local name which we don't have
  8113. // in our config atm.
  8114. stringValue = node.getAttribute(attributeName);
  8115. }
  8116. if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
  8117. return stringValue === null ? expected : stringValue;
  8118. } else if (stringValue === '' + expected) {
  8119. return expected;
  8120. } else {
  8121. return stringValue;
  8122. }
  8123. }
  8124. }
  8125. }
  8126. /**
  8127. * Get the value for a attribute on a node. Only used in DEV for SSR validation.
  8128. * The third argument is used as a hint of what the expected value is. Some
  8129. * attributes have multiple equivalent values.
  8130. */
  8131. function getValueForAttribute(node, name, expected) {
  8132. {
  8133. if (!isAttributeNameSafe(name)) {
  8134. return;
  8135. }
  8136. if (!node.hasAttribute(name)) {
  8137. return expected === undefined ? undefined : null;
  8138. }
  8139. var value = node.getAttribute(name);
  8140. if (value === '' + expected) {
  8141. return expected;
  8142. }
  8143. return value;
  8144. }
  8145. }
  8146. /**
  8147. * Sets the value for a property on a node.
  8148. *
  8149. * @param {DOMElement} node
  8150. * @param {string} name
  8151. * @param {*} value
  8152. */
  8153. function setValueForProperty(node, name, value, isCustomComponentTag) {
  8154. var propertyInfo = getPropertyInfo(name);
  8155. if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
  8156. return;
  8157. }
  8158. if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
  8159. value = null;
  8160. } // If the prop isn't in the special list, treat it as a simple attribute.
  8161. if (isCustomComponentTag || propertyInfo === null) {
  8162. if (isAttributeNameSafe(name)) {
  8163. var _attributeName = name;
  8164. if (value === null) {
  8165. node.removeAttribute(_attributeName);
  8166. } else {
  8167. node.setAttribute(_attributeName, '' + value);
  8168. }
  8169. }
  8170. return;
  8171. }
  8172. var mustUseProperty = propertyInfo.mustUseProperty;
  8173. if (mustUseProperty) {
  8174. var propertyName = propertyInfo.propertyName;
  8175. if (value === null) {
  8176. var type = propertyInfo.type;
  8177. node[propertyName] = type === BOOLEAN ? false : '';
  8178. } else {
  8179. // Contrary to `setAttribute`, object properties are properly
  8180. // `toString`ed by IE8/9.
  8181. node[propertyName] = value;
  8182. }
  8183. return;
  8184. } // The rest are treated as attributes with special cases.
  8185. var attributeName = propertyInfo.attributeName,
  8186. attributeNamespace = propertyInfo.attributeNamespace;
  8187. if (value === null) {
  8188. node.removeAttribute(attributeName);
  8189. } else {
  8190. var _type = propertyInfo.type;
  8191. var attributeValue;
  8192. if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
  8193. // If attribute type is boolean, we know for sure it won't be an execution sink
  8194. // and we won't require Trusted Type here.
  8195. attributeValue = '';
  8196. } else {
  8197. // `setAttribute` with objects becomes only `[object]` in IE8/9,
  8198. // ('' + value) makes it output the correct toString()-value.
  8199. {
  8200. attributeValue = '' + value;
  8201. }
  8202. if (propertyInfo.sanitizeURL) {
  8203. sanitizeURL(attributeValue.toString());
  8204. }
  8205. }
  8206. if (attributeNamespace) {
  8207. node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
  8208. } else {
  8209. node.setAttribute(attributeName, attributeValue);
  8210. }
  8211. }
  8212. }
  8213. var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
  8214. function describeComponentFrame (name, source, ownerName) {
  8215. var sourceInfo = '';
  8216. if (source) {
  8217. var path = source.fileName;
  8218. var fileName = path.replace(BEFORE_SLASH_RE, '');
  8219. {
  8220. // In DEV, include code for a common special case:
  8221. // prefer "folder/index.js" instead of just "index.js".
  8222. if (/^index\./.test(fileName)) {
  8223. var match = path.match(BEFORE_SLASH_RE);
  8224. if (match) {
  8225. var pathBeforeSlash = match[1];
  8226. if (pathBeforeSlash) {
  8227. var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
  8228. fileName = folderName + '/' + fileName;
  8229. }
  8230. }
  8231. }
  8232. }
  8233. sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
  8234. } else if (ownerName) {
  8235. sourceInfo = ' (created by ' + ownerName + ')';
  8236. }
  8237. return '\n in ' + (name || 'Unknown') + sourceInfo;
  8238. }
  8239. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  8240. // nor polyfill, then a plain number is used for performance.
  8241. var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  8242. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  8243. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  8244. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  8245. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  8246. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  8247. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  8248. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
  8249. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  8250. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  8251. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  8252. var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
  8253. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  8254. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  8255. var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
  8256. var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  8257. var FAUX_ITERATOR_SYMBOL = '@@iterator';
  8258. function getIteratorFn(maybeIterable) {
  8259. if (maybeIterable === null || typeof maybeIterable !== 'object') {
  8260. return null;
  8261. }
  8262. var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
  8263. if (typeof maybeIterator === 'function') {
  8264. return maybeIterator;
  8265. }
  8266. return null;
  8267. }
  8268. var Uninitialized = -1;
  8269. var Pending = 0;
  8270. var Resolved = 1;
  8271. var Rejected = 2;
  8272. function refineResolvedLazyComponent(lazyComponent) {
  8273. return lazyComponent._status === Resolved ? lazyComponent._result : null;
  8274. }
  8275. function initializeLazyComponentType(lazyComponent) {
  8276. if (lazyComponent._status === Uninitialized) {
  8277. lazyComponent._status = Pending;
  8278. var ctor = lazyComponent._ctor;
  8279. var thenable = ctor();
  8280. lazyComponent._result = thenable;
  8281. thenable.then(function (moduleObject) {
  8282. if (lazyComponent._status === Pending) {
  8283. var defaultExport = moduleObject.default;
  8284. {
  8285. if (defaultExport === undefined) {
  8286. error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
  8287. }
  8288. }
  8289. lazyComponent._status = Resolved;
  8290. lazyComponent._result = defaultExport;
  8291. }
  8292. }, function (error) {
  8293. if (lazyComponent._status === Pending) {
  8294. lazyComponent._status = Rejected;
  8295. lazyComponent._result = error;
  8296. }
  8297. });
  8298. }
  8299. }
  8300. function getWrappedName(outerType, innerType, wrapperName) {
  8301. var functionName = innerType.displayName || innerType.name || '';
  8302. return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
  8303. }
  8304. function getComponentName(type) {
  8305. if (type == null) {
  8306. // Host root, text node or just invalid type.
  8307. return null;
  8308. }
  8309. {
  8310. if (typeof type.tag === 'number') {
  8311. error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
  8312. }
  8313. }
  8314. if (typeof type === 'function') {
  8315. return type.displayName || type.name || null;
  8316. }
  8317. if (typeof type === 'string') {
  8318. return type;
  8319. }
  8320. switch (type) {
  8321. case REACT_FRAGMENT_TYPE:
  8322. return 'Fragment';
  8323. case REACT_PORTAL_TYPE:
  8324. return 'Portal';
  8325. case REACT_PROFILER_TYPE:
  8326. return "Profiler";
  8327. case REACT_STRICT_MODE_TYPE:
  8328. return 'StrictMode';
  8329. case REACT_SUSPENSE_TYPE:
  8330. return 'Suspense';
  8331. case REACT_SUSPENSE_LIST_TYPE:
  8332. return 'SuspenseList';
  8333. }
  8334. if (typeof type === 'object') {
  8335. switch (type.$$typeof) {
  8336. case REACT_CONTEXT_TYPE:
  8337. return 'Context.Consumer';
  8338. case REACT_PROVIDER_TYPE:
  8339. return 'Context.Provider';
  8340. case REACT_FORWARD_REF_TYPE:
  8341. return getWrappedName(type, type.render, 'ForwardRef');
  8342. case REACT_MEMO_TYPE:
  8343. return getComponentName(type.type);
  8344. case REACT_BLOCK_TYPE:
  8345. return getComponentName(type.render);
  8346. case REACT_LAZY_TYPE:
  8347. {
  8348. var thenable = type;
  8349. var resolvedThenable = refineResolvedLazyComponent(thenable);
  8350. if (resolvedThenable) {
  8351. return getComponentName(resolvedThenable);
  8352. }
  8353. break;
  8354. }
  8355. }
  8356. }
  8357. return null;
  8358. }
  8359. var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
  8360. function describeFiber(fiber) {
  8361. switch (fiber.tag) {
  8362. case HostRoot:
  8363. case HostPortal:
  8364. case HostText:
  8365. case Fragment:
  8366. case ContextProvider:
  8367. case ContextConsumer:
  8368. return '';
  8369. default:
  8370. var owner = fiber._debugOwner;
  8371. var source = fiber._debugSource;
  8372. var name = getComponentName(fiber.type);
  8373. var ownerName = null;
  8374. if (owner) {
  8375. ownerName = getComponentName(owner.type);
  8376. }
  8377. return describeComponentFrame(name, source, ownerName);
  8378. }
  8379. }
  8380. function getStackByFiberInDevAndProd(workInProgress) {
  8381. var info = '';
  8382. var node = workInProgress;
  8383. do {
  8384. info += describeFiber(node);
  8385. node = node.return;
  8386. } while (node);
  8387. return info;
  8388. }
  8389. var current = null;
  8390. var isRendering = false;
  8391. function getCurrentFiberOwnerNameInDevOrNull() {
  8392. {
  8393. if (current === null) {
  8394. return null;
  8395. }
  8396. var owner = current._debugOwner;
  8397. if (owner !== null && typeof owner !== 'undefined') {
  8398. return getComponentName(owner.type);
  8399. }
  8400. }
  8401. return null;
  8402. }
  8403. function getCurrentFiberStackInDev() {
  8404. {
  8405. if (current === null) {
  8406. return '';
  8407. } // Safe because if current fiber exists, we are reconciling,
  8408. // and it is guaranteed to be the work-in-progress version.
  8409. return getStackByFiberInDevAndProd(current);
  8410. }
  8411. }
  8412. function resetCurrentFiber() {
  8413. {
  8414. ReactDebugCurrentFrame$1.getCurrentStack = null;
  8415. current = null;
  8416. isRendering = false;
  8417. }
  8418. }
  8419. function setCurrentFiber(fiber) {
  8420. {
  8421. ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;
  8422. current = fiber;
  8423. isRendering = false;
  8424. }
  8425. }
  8426. function setIsRendering(rendering) {
  8427. {
  8428. isRendering = rendering;
  8429. }
  8430. }
  8431. // Flow does not allow string concatenation of most non-string types. To work
  8432. // around this limitation, we use an opaque type that can only be obtained by
  8433. // passing the value through getToStringValue first.
  8434. function toString(value) {
  8435. return '' + value;
  8436. }
  8437. function getToStringValue(value) {
  8438. switch (typeof value) {
  8439. case 'boolean':
  8440. case 'number':
  8441. case 'object':
  8442. case 'string':
  8443. case 'undefined':
  8444. return value;
  8445. default:
  8446. // function, symbol are assigned as empty strings
  8447. return '';
  8448. }
  8449. }
  8450. var ReactDebugCurrentFrame$2 = null;
  8451. var ReactControlledValuePropTypes = {
  8452. checkPropTypes: null
  8453. };
  8454. {
  8455. ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
  8456. var hasReadOnlyValue = {
  8457. button: true,
  8458. checkbox: true,
  8459. image: true,
  8460. hidden: true,
  8461. radio: true,
  8462. reset: true,
  8463. submit: true
  8464. };
  8465. var propTypes = {
  8466. value: function (props, propName, componentName) {
  8467. if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
  8468. return null;
  8469. }
  8470. 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`.');
  8471. },
  8472. checked: function (props, propName, componentName) {
  8473. if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
  8474. return null;
  8475. }
  8476. 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`.');
  8477. }
  8478. };
  8479. /**
  8480. * Provide a linked `value` attribute for controlled forms. You should not use
  8481. * this outside of the ReactDOM controlled form components.
  8482. */
  8483. ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
  8484. checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
  8485. };
  8486. }
  8487. function isCheckable(elem) {
  8488. var type = elem.type;
  8489. var nodeName = elem.nodeName;
  8490. return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
  8491. }
  8492. function getTracker(node) {
  8493. return node._valueTracker;
  8494. }
  8495. function detachTracker(node) {
  8496. node._valueTracker = null;
  8497. }
  8498. function getValueFromNode(node) {
  8499. var value = '';
  8500. if (!node) {
  8501. return value;
  8502. }
  8503. if (isCheckable(node)) {
  8504. value = node.checked ? 'true' : 'false';
  8505. } else {
  8506. value = node.value;
  8507. }
  8508. return value;
  8509. }
  8510. function trackValueOnNode(node) {
  8511. var valueField = isCheckable(node) ? 'checked' : 'value';
  8512. var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
  8513. var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
  8514. // and don't track value will cause over reporting of changes,
  8515. // but it's better then a hard failure
  8516. // (needed for certain tests that spyOn input values and Safari)
  8517. if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
  8518. return;
  8519. }
  8520. var get = descriptor.get,
  8521. set = descriptor.set;
  8522. Object.defineProperty(node, valueField, {
  8523. configurable: true,
  8524. get: function () {
  8525. return get.call(this);
  8526. },
  8527. set: function (value) {
  8528. currentValue = '' + value;
  8529. set.call(this, value);
  8530. }
  8531. }); // We could've passed this the first time
  8532. // but it triggers a bug in IE11 and Edge 14/15.
  8533. // Calling defineProperty() again should be equivalent.
  8534. // https://github.com/facebook/react/issues/11768
  8535. Object.defineProperty(node, valueField, {
  8536. enumerable: descriptor.enumerable
  8537. });
  8538. var tracker = {
  8539. getValue: function () {
  8540. return currentValue;
  8541. },
  8542. setValue: function (value) {
  8543. currentValue = '' + value;
  8544. },
  8545. stopTracking: function () {
  8546. detachTracker(node);
  8547. delete node[valueField];
  8548. }
  8549. };
  8550. return tracker;
  8551. }
  8552. function track(node) {
  8553. if (getTracker(node)) {
  8554. return;
  8555. } // TODO: Once it's just Fiber we can move this to node._wrapperState
  8556. node._valueTracker = trackValueOnNode(node);
  8557. }
  8558. function updateValueIfChanged(node) {
  8559. if (!node) {
  8560. return false;
  8561. }
  8562. var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
  8563. // that trying again will succeed
  8564. if (!tracker) {
  8565. return true;
  8566. }
  8567. var lastValue = tracker.getValue();
  8568. var nextValue = getValueFromNode(node);
  8569. if (nextValue !== lastValue) {
  8570. tracker.setValue(nextValue);
  8571. return true;
  8572. }
  8573. return false;
  8574. }
  8575. var didWarnValueDefaultValue = false;
  8576. var didWarnCheckedDefaultChecked = false;
  8577. var didWarnControlledToUncontrolled = false;
  8578. var didWarnUncontrolledToControlled = false;
  8579. function isControlled(props) {
  8580. var usesChecked = props.type === 'checkbox' || props.type === 'radio';
  8581. return usesChecked ? props.checked != null : props.value != null;
  8582. }
  8583. /**
  8584. * Implements an <input> host component that allows setting these optional
  8585. * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
  8586. *
  8587. * If `checked` or `value` are not supplied (or null/undefined), user actions
  8588. * that affect the checked state or value will trigger updates to the element.
  8589. *
  8590. * If they are supplied (and not null/undefined), the rendered element will not
  8591. * trigger updates to the element. Instead, the props must change in order for
  8592. * the rendered element to be updated.
  8593. *
  8594. * The rendered element will be initialized as unchecked (or `defaultChecked`)
  8595. * with an empty value (or `defaultValue`).
  8596. *
  8597. * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
  8598. */
  8599. function getHostProps(element, props) {
  8600. var node = element;
  8601. var checked = props.checked;
  8602. var hostProps = _assign({}, props, {
  8603. defaultChecked: undefined,
  8604. defaultValue: undefined,
  8605. value: undefined,
  8606. checked: checked != null ? checked : node._wrapperState.initialChecked
  8607. });
  8608. return hostProps;
  8609. }
  8610. function initWrapperState(element, props) {
  8611. {
  8612. ReactControlledValuePropTypes.checkPropTypes('input', props);
  8613. if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
  8614. error('%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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
  8615. didWarnCheckedDefaultChecked = true;
  8616. }
  8617. if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
  8618. error('%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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
  8619. didWarnValueDefaultValue = true;
  8620. }
  8621. }
  8622. var node = element;
  8623. var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
  8624. node._wrapperState = {
  8625. initialChecked: props.checked != null ? props.checked : props.defaultChecked,
  8626. initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
  8627. controlled: isControlled(props)
  8628. };
  8629. }
  8630. function updateChecked(element, props) {
  8631. var node = element;
  8632. var checked = props.checked;
  8633. if (checked != null) {
  8634. setValueForProperty(node, 'checked', checked, false);
  8635. }
  8636. }
  8637. function updateWrapper(element, props) {
  8638. var node = element;
  8639. {
  8640. var controlled = isControlled(props);
  8641. if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
  8642. error('A component 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', props.type);
  8643. didWarnUncontrolledToControlled = true;
  8644. }
  8645. if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
  8646. error('A component 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', props.type);
  8647. didWarnControlledToUncontrolled = true;
  8648. }
  8649. }
  8650. updateChecked(element, props);
  8651. var value = getToStringValue(props.value);
  8652. var type = props.type;
  8653. if (value != null) {
  8654. if (type === 'number') {
  8655. if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
  8656. // eslint-disable-next-line
  8657. node.value != value) {
  8658. node.value = toString(value);
  8659. }
  8660. } else if (node.value !== toString(value)) {
  8661. node.value = toString(value);
  8662. }
  8663. } else if (type === 'submit' || type === 'reset') {
  8664. // Submit/reset inputs need the attribute removed completely to avoid
  8665. // blank-text buttons.
  8666. node.removeAttribute('value');
  8667. return;
  8668. }
  8669. {
  8670. // When syncing the value attribute, the value comes from a cascade of
  8671. // properties:
  8672. // 1. The value React property
  8673. // 2. The defaultValue React property
  8674. // 3. Otherwise there should be no change
  8675. if (props.hasOwnProperty('value')) {
  8676. setDefaultValue(node, props.type, value);
  8677. } else if (props.hasOwnProperty('defaultValue')) {
  8678. setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
  8679. }
  8680. }
  8681. {
  8682. // When syncing the checked attribute, it only changes when it needs
  8683. // to be removed, such as transitioning from a checkbox into a text input
  8684. if (props.checked == null && props.defaultChecked != null) {
  8685. node.defaultChecked = !!props.defaultChecked;
  8686. }
  8687. }
  8688. }
  8689. function postMountWrapper(element, props, isHydrating) {
  8690. var node = element; // Do not assign value if it is already set. This prevents user text input
  8691. // from being lost during SSR hydration.
  8692. if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
  8693. var type = props.type;
  8694. var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
  8695. // default value provided by the browser. See: #12872
  8696. if (isButton && (props.value === undefined || props.value === null)) {
  8697. return;
  8698. }
  8699. var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
  8700. // from being lost during SSR hydration.
  8701. if (!isHydrating) {
  8702. {
  8703. // When syncing the value attribute, the value property should use
  8704. // the wrapperState._initialValue property. This uses:
  8705. //
  8706. // 1. The value React property when present
  8707. // 2. The defaultValue React property when present
  8708. // 3. An empty string
  8709. if (initialValue !== node.value) {
  8710. node.value = initialValue;
  8711. }
  8712. }
  8713. }
  8714. {
  8715. // Otherwise, the value attribute is synchronized to the property,
  8716. // so we assign defaultValue to the same thing as the value property
  8717. // assignment step above.
  8718. node.defaultValue = initialValue;
  8719. }
  8720. } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
  8721. // this is needed to work around a chrome bug where setting defaultChecked
  8722. // will sometimes influence the value of checked (even after detachment).
  8723. // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
  8724. // We need to temporarily unset name to avoid disrupting radio button groups.
  8725. var name = node.name;
  8726. if (name !== '') {
  8727. node.name = '';
  8728. }
  8729. {
  8730. // When syncing the checked attribute, both the checked property and
  8731. // attribute are assigned at the same time using defaultChecked. This uses:
  8732. //
  8733. // 1. The checked React property when present
  8734. // 2. The defaultChecked React property when present
  8735. // 3. Otherwise, false
  8736. node.defaultChecked = !node.defaultChecked;
  8737. node.defaultChecked = !!node._wrapperState.initialChecked;
  8738. }
  8739. if (name !== '') {
  8740. node.name = name;
  8741. }
  8742. }
  8743. function restoreControlledState(element, props) {
  8744. var node = element;
  8745. updateWrapper(node, props);
  8746. updateNamedCousins(node, props);
  8747. }
  8748. function updateNamedCousins(rootNode, props) {
  8749. var name = props.name;
  8750. if (props.type === 'radio' && name != null) {
  8751. var queryRoot = rootNode;
  8752. while (queryRoot.parentNode) {
  8753. queryRoot = queryRoot.parentNode;
  8754. } // If `rootNode.form` was non-null, then we could try `form.elements`,
  8755. // but that sometimes behaves strangely in IE8. We could also try using
  8756. // `form.getElementsByName`, but that will only return direct children
  8757. // and won't include inputs that use the HTML5 `form=` attribute. Since
  8758. // the input might not even be in a form. It might not even be in the
  8759. // document. Let's just use the local `querySelectorAll` to ensure we don't
  8760. // miss anything.
  8761. var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
  8762. for (var i = 0; i < group.length; i++) {
  8763. var otherNode = group[i];
  8764. if (otherNode === rootNode || otherNode.form !== rootNode.form) {
  8765. continue;
  8766. } // This will throw if radio buttons rendered by different copies of React
  8767. // and the same name are rendered into the same form (same as #1939).
  8768. // That's probably okay; we don't support it just as we don't support
  8769. // mixing React radio buttons with non-React ones.
  8770. var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
  8771. if (!otherProps) {
  8772. {
  8773. throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." );
  8774. }
  8775. } // We need update the tracked value on the named cousin since the value
  8776. // was changed but the input saw no event or value set
  8777. updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
  8778. // was previously checked to update will cause it to be come re-checked
  8779. // as appropriate.
  8780. updateWrapper(otherNode, otherProps);
  8781. }
  8782. }
  8783. } // In Chrome, assigning defaultValue to certain input types triggers input validation.
  8784. // For number inputs, the display value loses trailing decimal points. For email inputs,
  8785. // Chrome raises "The specified value <x> is not a valid email address".
  8786. //
  8787. // Here we check to see if the defaultValue has actually changed, avoiding these problems
  8788. // when the user is inputting text
  8789. //
  8790. // https://github.com/facebook/react/issues/7253
  8791. function setDefaultValue(node, type, value) {
  8792. if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
  8793. type !== 'number' || node.ownerDocument.activeElement !== node) {
  8794. if (value == null) {
  8795. node.defaultValue = toString(node._wrapperState.initialValue);
  8796. } else if (node.defaultValue !== toString(value)) {
  8797. node.defaultValue = toString(value);
  8798. }
  8799. }
  8800. }
  8801. var didWarnSelectedSetOnOption = false;
  8802. var didWarnInvalidChild = false;
  8803. function flattenChildren(children) {
  8804. var content = ''; // Flatten children. We'll warn if they are invalid
  8805. // during validateProps() which runs for hydration too.
  8806. // Note that this would throw on non-element objects.
  8807. // Elements are stringified (which is normally irrelevant
  8808. // but matters for <fbt>).
  8809. React.Children.forEach(children, function (child) {
  8810. if (child == null) {
  8811. return;
  8812. }
  8813. content += child; // Note: we don't warn about invalid children here.
  8814. // Instead, this is done separately below so that
  8815. // it happens during the hydration codepath too.
  8816. });
  8817. return content;
  8818. }
  8819. /**
  8820. * Implements an <option> host component that warns when `selected` is set.
  8821. */
  8822. function validateProps(element, props) {
  8823. {
  8824. // This mirrors the codepath above, but runs for hydration too.
  8825. // Warn about invalid children here so that client and hydration are consistent.
  8826. // TODO: this seems like it could cause a DEV-only throw for hydration
  8827. // if children contains a non-element object. We should try to avoid that.
  8828. if (typeof props.children === 'object' && props.children !== null) {
  8829. React.Children.forEach(props.children, function (child) {
  8830. if (child == null) {
  8831. return;
  8832. }
  8833. if (typeof child === 'string' || typeof child === 'number') {
  8834. return;
  8835. }
  8836. if (typeof child.type !== 'string') {
  8837. return;
  8838. }
  8839. if (!didWarnInvalidChild) {
  8840. didWarnInvalidChild = true;
  8841. error('Only strings and numbers are supported as <option> children.');
  8842. }
  8843. });
  8844. } // TODO: Remove support for `selected` in <option>.
  8845. if (props.selected != null && !didWarnSelectedSetOnOption) {
  8846. error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
  8847. didWarnSelectedSetOnOption = true;
  8848. }
  8849. }
  8850. }
  8851. function postMountWrapper$1(element, props) {
  8852. // value="" should make a value attribute (#6219)
  8853. if (props.value != null) {
  8854. element.setAttribute('value', toString(getToStringValue(props.value)));
  8855. }
  8856. }
  8857. function getHostProps$1(element, props) {
  8858. var hostProps = _assign({
  8859. children: undefined
  8860. }, props);
  8861. var content = flattenChildren(props.children);
  8862. if (content) {
  8863. hostProps.children = content;
  8864. }
  8865. return hostProps;
  8866. }
  8867. var didWarnValueDefaultValue$1;
  8868. {
  8869. didWarnValueDefaultValue$1 = false;
  8870. }
  8871. function getDeclarationErrorAddendum() {
  8872. var ownerName = getCurrentFiberOwnerNameInDevOrNull();
  8873. if (ownerName) {
  8874. return '\n\nCheck the render method of `' + ownerName + '`.';
  8875. }
  8876. return '';
  8877. }
  8878. var valuePropNames = ['value', 'defaultValue'];
  8879. /**
  8880. * Validation function for `value` and `defaultValue`.
  8881. */
  8882. function checkSelectPropTypes(props) {
  8883. {
  8884. ReactControlledValuePropTypes.checkPropTypes('select', props);
  8885. for (var i = 0; i < valuePropNames.length; i++) {
  8886. var propName = valuePropNames[i];
  8887. if (props[propName] == null) {
  8888. continue;
  8889. }
  8890. var isArray = Array.isArray(props[propName]);
  8891. if (props.multiple && !isArray) {
  8892. error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
  8893. } else if (!props.multiple && isArray) {
  8894. error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
  8895. }
  8896. }
  8897. }
  8898. }
  8899. function updateOptions(node, multiple, propValue, setDefaultSelected) {
  8900. var options = node.options;
  8901. if (multiple) {
  8902. var selectedValues = propValue;
  8903. var selectedValue = {};
  8904. for (var i = 0; i < selectedValues.length; i++) {
  8905. // Prefix to avoid chaos with special keys.
  8906. selectedValue['$' + selectedValues[i]] = true;
  8907. }
  8908. for (var _i = 0; _i < options.length; _i++) {
  8909. var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
  8910. if (options[_i].selected !== selected) {
  8911. options[_i].selected = selected;
  8912. }
  8913. if (selected && setDefaultSelected) {
  8914. options[_i].defaultSelected = true;
  8915. }
  8916. }
  8917. } else {
  8918. // Do not set `select.value` as exact behavior isn't consistent across all
  8919. // browsers for all cases.
  8920. var _selectedValue = toString(getToStringValue(propValue));
  8921. var defaultSelected = null;
  8922. for (var _i2 = 0; _i2 < options.length; _i2++) {
  8923. if (options[_i2].value === _selectedValue) {
  8924. options[_i2].selected = true;
  8925. if (setDefaultSelected) {
  8926. options[_i2].defaultSelected = true;
  8927. }
  8928. return;
  8929. }
  8930. if (defaultSelected === null && !options[_i2].disabled) {
  8931. defaultSelected = options[_i2];
  8932. }
  8933. }
  8934. if (defaultSelected !== null) {
  8935. defaultSelected.selected = true;
  8936. }
  8937. }
  8938. }
  8939. /**
  8940. * Implements a <select> host component that allows optionally setting the
  8941. * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
  8942. * stringable. If `multiple` is true, the prop must be an array of stringables.
  8943. *
  8944. * If `value` is not supplied (or null/undefined), user actions that change the
  8945. * selected option will trigger updates to the rendered options.
  8946. *
  8947. * If it is supplied (and not null/undefined), the rendered options will not
  8948. * update in response to user actions. Instead, the `value` prop must change in
  8949. * order for the rendered options to update.
  8950. *
  8951. * If `defaultValue` is provided, any options with the supplied values will be
  8952. * selected.
  8953. */
  8954. function getHostProps$2(element, props) {
  8955. return _assign({}, props, {
  8956. value: undefined
  8957. });
  8958. }
  8959. function initWrapperState$1(element, props) {
  8960. var node = element;
  8961. {
  8962. checkSelectPropTypes(props);
  8963. }
  8964. node._wrapperState = {
  8965. wasMultiple: !!props.multiple
  8966. };
  8967. {
  8968. if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
  8969. error('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');
  8970. didWarnValueDefaultValue$1 = true;
  8971. }
  8972. }
  8973. }
  8974. function postMountWrapper$2(element, props) {
  8975. var node = element;
  8976. node.multiple = !!props.multiple;
  8977. var value = props.value;
  8978. if (value != null) {
  8979. updateOptions(node, !!props.multiple, value, false);
  8980. } else if (props.defaultValue != null) {
  8981. updateOptions(node, !!props.multiple, props.defaultValue, true);
  8982. }
  8983. }
  8984. function postUpdateWrapper(element, props) {
  8985. var node = element;
  8986. var wasMultiple = node._wrapperState.wasMultiple;
  8987. node._wrapperState.wasMultiple = !!props.multiple;
  8988. var value = props.value;
  8989. if (value != null) {
  8990. updateOptions(node, !!props.multiple, value, false);
  8991. } else if (wasMultiple !== !!props.multiple) {
  8992. // For simplicity, reapply `defaultValue` if `multiple` is toggled.
  8993. if (props.defaultValue != null) {
  8994. updateOptions(node, !!props.multiple, props.defaultValue, true);
  8995. } else {
  8996. // Revert the select back to its default unselected state.
  8997. updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
  8998. }
  8999. }
  9000. }
  9001. function restoreControlledState$1(element, props) {
  9002. var node = element;
  9003. var value = props.value;
  9004. if (value != null) {
  9005. updateOptions(node, !!props.multiple, value, false);
  9006. }
  9007. }
  9008. var didWarnValDefaultVal = false;
  9009. /**
  9010. * Implements a <textarea> host component that allows setting `value`, and
  9011. * `defaultValue`. This differs from the traditional DOM API because value is
  9012. * usually set as PCDATA children.
  9013. *
  9014. * If `value` is not supplied (or null/undefined), user actions that affect the
  9015. * value will trigger updates to the element.
  9016. *
  9017. * If `value` is supplied (and not null/undefined), the rendered element will
  9018. * not trigger updates to the element. Instead, the `value` prop must change in
  9019. * order for the rendered element to be updated.
  9020. *
  9021. * The rendered element will be initialized with an empty value, the prop
  9022. * `defaultValue` if specified, or the children content (deprecated).
  9023. */
  9024. function getHostProps$3(element, props) {
  9025. var node = element;
  9026. if (!(props.dangerouslySetInnerHTML == null)) {
  9027. {
  9028. throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." );
  9029. }
  9030. } // Always set children to the same thing. In IE9, the selection range will
  9031. // get reset if `textContent` is mutated. We could add a check in setTextContent
  9032. // to only set the value if/when the value differs from the node value (which would
  9033. // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
  9034. // solution. The value can be a boolean or object so that's why it's forced
  9035. // to be a string.
  9036. var hostProps = _assign({}, props, {
  9037. value: undefined,
  9038. defaultValue: undefined,
  9039. children: toString(node._wrapperState.initialValue)
  9040. });
  9041. return hostProps;
  9042. }
  9043. function initWrapperState$2(element, props) {
  9044. var node = element;
  9045. {
  9046. ReactControlledValuePropTypes.checkPropTypes('textarea', props);
  9047. if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
  9048. error('%s contains a textarea with both value and defaultValue props. ' + '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', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
  9049. didWarnValDefaultVal = true;
  9050. }
  9051. }
  9052. var initialValue = props.value; // Only bother fetching default value if we're going to use it
  9053. if (initialValue == null) {
  9054. var children = props.children,
  9055. defaultValue = props.defaultValue;
  9056. if (children != null) {
  9057. {
  9058. error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
  9059. }
  9060. {
  9061. if (!(defaultValue == null)) {
  9062. {
  9063. throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
  9064. }
  9065. }
  9066. if (Array.isArray(children)) {
  9067. if (!(children.length <= 1)) {
  9068. {
  9069. throw Error( "<textarea> can only have at most one child." );
  9070. }
  9071. }
  9072. children = children[0];
  9073. }
  9074. defaultValue = children;
  9075. }
  9076. }
  9077. if (defaultValue == null) {
  9078. defaultValue = '';
  9079. }
  9080. initialValue = defaultValue;
  9081. }
  9082. node._wrapperState = {
  9083. initialValue: getToStringValue(initialValue)
  9084. };
  9085. }
  9086. function updateWrapper$1(element, props) {
  9087. var node = element;
  9088. var value = getToStringValue(props.value);
  9089. var defaultValue = getToStringValue(props.defaultValue);
  9090. if (value != null) {
  9091. // Cast `value` to a string to ensure the value is set correctly. While
  9092. // browsers typically do this as necessary, jsdom doesn't.
  9093. var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed
  9094. if (newValue !== node.value) {
  9095. node.value = newValue;
  9096. }
  9097. if (props.defaultValue == null && node.defaultValue !== newValue) {
  9098. node.defaultValue = newValue;
  9099. }
  9100. }
  9101. if (defaultValue != null) {
  9102. node.defaultValue = toString(defaultValue);
  9103. }
  9104. }
  9105. function postMountWrapper$3(element, props) {
  9106. var node = element; // This is in postMount because we need access to the DOM node, which is not
  9107. // available until after the component has mounted.
  9108. var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
  9109. // initial value. In IE10/IE11 there is a bug where the placeholder attribute
  9110. // will populate textContent as well.
  9111. // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
  9112. if (textContent === node._wrapperState.initialValue) {
  9113. if (textContent !== '' && textContent !== null) {
  9114. node.value = textContent;
  9115. }
  9116. }
  9117. }
  9118. function restoreControlledState$2(element, props) {
  9119. // DOM component is still mounted; update
  9120. updateWrapper$1(element, props);
  9121. }
  9122. var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
  9123. var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
  9124. var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
  9125. var Namespaces = {
  9126. html: HTML_NAMESPACE,
  9127. mathml: MATH_NAMESPACE,
  9128. svg: SVG_NAMESPACE
  9129. }; // Assumes there is no parent namespace.
  9130. function getIntrinsicNamespace(type) {
  9131. switch (type) {
  9132. case 'svg':
  9133. return SVG_NAMESPACE;
  9134. case 'math':
  9135. return MATH_NAMESPACE;
  9136. default:
  9137. return HTML_NAMESPACE;
  9138. }
  9139. }
  9140. function getChildNamespace(parentNamespace, type) {
  9141. if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
  9142. // No (or default) parent namespace: potential entry point.
  9143. return getIntrinsicNamespace(type);
  9144. }
  9145. if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
  9146. // We're leaving SVG.
  9147. return HTML_NAMESPACE;
  9148. } // By default, pass namespace below.
  9149. return parentNamespace;
  9150. }
  9151. /* globals MSApp */
  9152. /**
  9153. * Create a function which has 'unsafe' privileges (required by windows8 apps)
  9154. */
  9155. var createMicrosoftUnsafeLocalFunction = function (func) {
  9156. if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
  9157. return function (arg0, arg1, arg2, arg3) {
  9158. MSApp.execUnsafeLocalFunction(function () {
  9159. return func(arg0, arg1, arg2, arg3);
  9160. });
  9161. };
  9162. } else {
  9163. return func;
  9164. }
  9165. };
  9166. var reusableSVGContainer;
  9167. /**
  9168. * Set the innerHTML property of a node
  9169. *
  9170. * @param {DOMElement} node
  9171. * @param {string} html
  9172. * @internal
  9173. */
  9174. var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
  9175. if (node.namespaceURI === Namespaces.svg) {
  9176. if (!('innerHTML' in node)) {
  9177. // IE does not have innerHTML for SVG nodes, so instead we inject the
  9178. // new markup in a temp node and then move the child nodes across into
  9179. // the target node
  9180. reusableSVGContainer = reusableSVGContainer || document.createElement('div');
  9181. reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
  9182. var svgNode = reusableSVGContainer.firstChild;
  9183. while (node.firstChild) {
  9184. node.removeChild(node.firstChild);
  9185. }
  9186. while (svgNode.firstChild) {
  9187. node.appendChild(svgNode.firstChild);
  9188. }
  9189. return;
  9190. }
  9191. }
  9192. node.innerHTML = html;
  9193. });
  9194. /**
  9195. * HTML nodeType values that represent the type of the node
  9196. */
  9197. var ELEMENT_NODE = 1;
  9198. var TEXT_NODE = 3;
  9199. var COMMENT_NODE = 8;
  9200. var DOCUMENT_NODE = 9;
  9201. var DOCUMENT_FRAGMENT_NODE = 11;
  9202. /**
  9203. * Set the textContent property of a node. For text updates, it's faster
  9204. * to set the `nodeValue` of the Text node directly instead of using
  9205. * `.textContent` which will remove the existing node and create a new one.
  9206. *
  9207. * @param {DOMElement} node
  9208. * @param {string} text
  9209. * @internal
  9210. */
  9211. var setTextContent = function (node, text) {
  9212. if (text) {
  9213. var firstChild = node.firstChild;
  9214. if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
  9215. firstChild.nodeValue = text;
  9216. return;
  9217. }
  9218. }
  9219. node.textContent = text;
  9220. };
  9221. // Do not use the below two methods directly!
  9222. // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
  9223. // (It is the only module that is allowed to access these methods.)
  9224. function unsafeCastStringToDOMTopLevelType(topLevelType) {
  9225. return topLevelType;
  9226. }
  9227. function unsafeCastDOMTopLevelTypeToString(topLevelType) {
  9228. return topLevelType;
  9229. }
  9230. /**
  9231. * Generate a mapping of standard vendor prefixes using the defined style property and event name.
  9232. *
  9233. * @param {string} styleProp
  9234. * @param {string} eventName
  9235. * @returns {object}
  9236. */
  9237. function makePrefixMap(styleProp, eventName) {
  9238. var prefixes = {};
  9239. prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  9240. prefixes['Webkit' + styleProp] = 'webkit' + eventName;
  9241. prefixes['Moz' + styleProp] = 'moz' + eventName;
  9242. return prefixes;
  9243. }
  9244. /**
  9245. * A list of event names to a configurable list of vendor prefixes.
  9246. */
  9247. var vendorPrefixes = {
  9248. animationend: makePrefixMap('Animation', 'AnimationEnd'),
  9249. animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
  9250. animationstart: makePrefixMap('Animation', 'AnimationStart'),
  9251. transitionend: makePrefixMap('Transition', 'TransitionEnd')
  9252. };
  9253. /**
  9254. * Event names that have already been detected and prefixed (if applicable).
  9255. */
  9256. var prefixedEventNames = {};
  9257. /**
  9258. * Element to check for prefixes on.
  9259. */
  9260. var style = {};
  9261. /**
  9262. * Bootstrap if a DOM exists.
  9263. */
  9264. if (canUseDOM) {
  9265. style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
  9266. // the un-prefixed "animation" and "transition" properties are defined on the
  9267. // style object but the events that fire will still be prefixed, so we need
  9268. // to check if the un-prefixed events are usable, and if not remove them from the map.
  9269. if (!('AnimationEvent' in window)) {
  9270. delete vendorPrefixes.animationend.animation;
  9271. delete vendorPrefixes.animationiteration.animation;
  9272. delete vendorPrefixes.animationstart.animation;
  9273. } // Same as above
  9274. if (!('TransitionEvent' in window)) {
  9275. delete vendorPrefixes.transitionend.transition;
  9276. }
  9277. }
  9278. /**
  9279. * Attempts to determine the correct vendor prefixed event name.
  9280. *
  9281. * @param {string} eventName
  9282. * @returns {string}
  9283. */
  9284. function getVendorPrefixedEventName(eventName) {
  9285. if (prefixedEventNames[eventName]) {
  9286. return prefixedEventNames[eventName];
  9287. } else if (!vendorPrefixes[eventName]) {
  9288. return eventName;
  9289. }
  9290. var prefixMap = vendorPrefixes[eventName];
  9291. for (var styleProp in prefixMap) {
  9292. if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
  9293. return prefixedEventNames[eventName] = prefixMap[styleProp];
  9294. }
  9295. }
  9296. return eventName;
  9297. }
  9298. /**
  9299. * To identify top level events in ReactDOM, we use constants defined by this
  9300. * module. This is the only module that uses the unsafe* methods to express
  9301. * that the constants actually correspond to the browser event names. This lets
  9302. * us save some bundle size by avoiding a top level type -> event name map.
  9303. * The rest of ReactDOM code should import top level types from this file.
  9304. */
  9305. var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
  9306. var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
  9307. var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
  9308. var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
  9309. var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
  9310. var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
  9311. var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
  9312. var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
  9313. var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
  9314. var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
  9315. var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
  9316. var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
  9317. var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
  9318. var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
  9319. var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
  9320. var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
  9321. var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
  9322. var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
  9323. var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
  9324. var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
  9325. var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
  9326. var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
  9327. var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
  9328. var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
  9329. var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
  9330. var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
  9331. var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
  9332. var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
  9333. var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
  9334. var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
  9335. var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
  9336. var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
  9337. var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
  9338. var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
  9339. var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
  9340. var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
  9341. var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
  9342. var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
  9343. var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
  9344. var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
  9345. var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
  9346. var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
  9347. var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
  9348. var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');
  9349. var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
  9350. var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
  9351. var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
  9352. var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
  9353. var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
  9354. var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
  9355. var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
  9356. var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
  9357. var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
  9358. var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
  9359. var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');
  9360. var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
  9361. var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
  9362. var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
  9363. var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
  9364. var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
  9365. var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
  9366. var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
  9367. var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
  9368. var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
  9369. var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
  9370. var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
  9371. var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
  9372. var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');
  9373. var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
  9374. var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
  9375. var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
  9376. var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
  9377. var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
  9378. var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
  9379. var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
  9380. var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
  9381. var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
  9382. var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
  9383. var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
  9384. var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.
  9385. // Note that events in this list will *not* be listened to at the top level
  9386. // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
  9387. var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];
  9388. function getRawEventName(topLevelType) {
  9389. return unsafeCastDOMTopLevelTypeToString(topLevelType);
  9390. }
  9391. var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore
  9392. var elementListenerMap = new PossiblyWeakMap();
  9393. function getListenerMapForElement(element) {
  9394. var listenerMap = elementListenerMap.get(element);
  9395. if (listenerMap === undefined) {
  9396. listenerMap = new Map();
  9397. elementListenerMap.set(element, listenerMap);
  9398. }
  9399. return listenerMap;
  9400. }
  9401. /**
  9402. * `ReactInstanceMap` maintains a mapping from a public facing stateful
  9403. * instance (key) and the internal representation (value). This allows public
  9404. * methods to accept the user facing instance as an argument and map them back
  9405. * to internal methods.
  9406. *
  9407. * Note that this module is currently shared and assumed to be stateless.
  9408. * If this becomes an actual Map, that will break.
  9409. */
  9410. function get(key) {
  9411. return key._reactInternalFiber;
  9412. }
  9413. function has(key) {
  9414. return key._reactInternalFiber !== undefined;
  9415. }
  9416. function set(key, value) {
  9417. key._reactInternalFiber = value;
  9418. }
  9419. // Don't change these two values. They're used by React Dev Tools.
  9420. var NoEffect =
  9421. /* */
  9422. 0;
  9423. var PerformedWork =
  9424. /* */
  9425. 1; // You can change the rest (and add more).
  9426. var Placement =
  9427. /* */
  9428. 2;
  9429. var Update =
  9430. /* */
  9431. 4;
  9432. var PlacementAndUpdate =
  9433. /* */
  9434. 6;
  9435. var Deletion =
  9436. /* */
  9437. 8;
  9438. var ContentReset =
  9439. /* */
  9440. 16;
  9441. var Callback =
  9442. /* */
  9443. 32;
  9444. var DidCapture =
  9445. /* */
  9446. 64;
  9447. var Ref =
  9448. /* */
  9449. 128;
  9450. var Snapshot =
  9451. /* */
  9452. 256;
  9453. var Passive =
  9454. /* */
  9455. 512;
  9456. var Hydrating =
  9457. /* */
  9458. 1024;
  9459. var HydratingAndUpdate =
  9460. /* */
  9461. 1028; // Passive & Update & Callback & Ref & Snapshot
  9462. var LifecycleEffectMask =
  9463. /* */
  9464. 932; // Union of all host effects
  9465. var HostEffectMask =
  9466. /* */
  9467. 2047;
  9468. var Incomplete =
  9469. /* */
  9470. 2048;
  9471. var ShouldCapture =
  9472. /* */
  9473. 4096;
  9474. var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
  9475. function getNearestMountedFiber(fiber) {
  9476. var node = fiber;
  9477. var nearestMounted = fiber;
  9478. if (!fiber.alternate) {
  9479. // If there is no alternate, this might be a new tree that isn't inserted
  9480. // yet. If it is, then it will have a pending insertion effect on it.
  9481. var nextNode = node;
  9482. do {
  9483. node = nextNode;
  9484. if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {
  9485. // This is an insertion or in-progress hydration. The nearest possible
  9486. // mounted fiber is the parent but we need to continue to figure out
  9487. // if that one is still mounted.
  9488. nearestMounted = node.return;
  9489. }
  9490. nextNode = node.return;
  9491. } while (nextNode);
  9492. } else {
  9493. while (node.return) {
  9494. node = node.return;
  9495. }
  9496. }
  9497. if (node.tag === HostRoot) {
  9498. // TODO: Check if this was a nested HostRoot when used with
  9499. // renderContainerIntoSubtree.
  9500. return nearestMounted;
  9501. } // If we didn't hit the root, that means that we're in an disconnected tree
  9502. // that has been unmounted.
  9503. return null;
  9504. }
  9505. function getSuspenseInstanceFromFiber(fiber) {
  9506. if (fiber.tag === SuspenseComponent) {
  9507. var suspenseState = fiber.memoizedState;
  9508. if (suspenseState === null) {
  9509. var current = fiber.alternate;
  9510. if (current !== null) {
  9511. suspenseState = current.memoizedState;
  9512. }
  9513. }
  9514. if (suspenseState !== null) {
  9515. return suspenseState.dehydrated;
  9516. }
  9517. }
  9518. return null;
  9519. }
  9520. function getContainerFromFiber(fiber) {
  9521. return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
  9522. }
  9523. function isFiberMounted(fiber) {
  9524. return getNearestMountedFiber(fiber) === fiber;
  9525. }
  9526. function isMounted(component) {
  9527. {
  9528. var owner = ReactCurrentOwner.current;
  9529. if (owner !== null && owner.tag === ClassComponent) {
  9530. var ownerFiber = owner;
  9531. var instance = ownerFiber.stateNode;
  9532. if (!instance._warnedAboutRefsInRender) {
  9533. error('%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.', getComponentName(ownerFiber.type) || 'A component');
  9534. }
  9535. instance._warnedAboutRefsInRender = true;
  9536. }
  9537. }
  9538. var fiber = get(component);
  9539. if (!fiber) {
  9540. return false;
  9541. }
  9542. return getNearestMountedFiber(fiber) === fiber;
  9543. }
  9544. function assertIsMounted(fiber) {
  9545. if (!(getNearestMountedFiber(fiber) === fiber)) {
  9546. {
  9547. throw Error( "Unable to find node on an unmounted component." );
  9548. }
  9549. }
  9550. }
  9551. function findCurrentFiberUsingSlowPath(fiber) {
  9552. var alternate = fiber.alternate;
  9553. if (!alternate) {
  9554. // If there is no alternate, then we only need to check if it is mounted.
  9555. var nearestMounted = getNearestMountedFiber(fiber);
  9556. if (!(nearestMounted !== null)) {
  9557. {
  9558. throw Error( "Unable to find node on an unmounted component." );
  9559. }
  9560. }
  9561. if (nearestMounted !== fiber) {
  9562. return null;
  9563. }
  9564. return fiber;
  9565. } // If we have two possible branches, we'll walk backwards up to the root
  9566. // to see what path the root points to. On the way we may hit one of the
  9567. // special cases and we'll deal with them.
  9568. var a = fiber;
  9569. var b = alternate;
  9570. while (true) {
  9571. var parentA = a.return;
  9572. if (parentA === null) {
  9573. // We're at the root.
  9574. break;
  9575. }
  9576. var parentB = parentA.alternate;
  9577. if (parentB === null) {
  9578. // There is no alternate. This is an unusual case. Currently, it only
  9579. // happens when a Suspense component is hidden. An extra fragment fiber
  9580. // is inserted in between the Suspense fiber and its children. Skip
  9581. // over this extra fragment fiber and proceed to the next parent.
  9582. var nextParent = parentA.return;
  9583. if (nextParent !== null) {
  9584. a = b = nextParent;
  9585. continue;
  9586. } // If there's no parent, we're at the root.
  9587. break;
  9588. } // If both copies of the parent fiber point to the same child, we can
  9589. // assume that the child is current. This happens when we bailout on low
  9590. // priority: the bailed out fiber's child reuses the current child.
  9591. if (parentA.child === parentB.child) {
  9592. var child = parentA.child;
  9593. while (child) {
  9594. if (child === a) {
  9595. // We've determined that A is the current branch.
  9596. assertIsMounted(parentA);
  9597. return fiber;
  9598. }
  9599. if (child === b) {
  9600. // We've determined that B is the current branch.
  9601. assertIsMounted(parentA);
  9602. return alternate;
  9603. }
  9604. child = child.sibling;
  9605. } // We should never have an alternate for any mounting node. So the only
  9606. // way this could possibly happen is if this was unmounted, if at all.
  9607. {
  9608. {
  9609. throw Error( "Unable to find node on an unmounted component." );
  9610. }
  9611. }
  9612. }
  9613. if (a.return !== b.return) {
  9614. // The return pointer of A and the return pointer of B point to different
  9615. // fibers. We assume that return pointers never criss-cross, so A must
  9616. // belong to the child set of A.return, and B must belong to the child
  9617. // set of B.return.
  9618. a = parentA;
  9619. b = parentB;
  9620. } else {
  9621. // The return pointers point to the same fiber. We'll have to use the
  9622. // default, slow path: scan the child sets of each parent alternate to see
  9623. // which child belongs to which set.
  9624. //
  9625. // Search parent A's child set
  9626. var didFindChild = false;
  9627. var _child = parentA.child;
  9628. while (_child) {
  9629. if (_child === a) {
  9630. didFindChild = true;
  9631. a = parentA;
  9632. b = parentB;
  9633. break;
  9634. }
  9635. if (_child === b) {
  9636. didFindChild = true;
  9637. b = parentA;
  9638. a = parentB;
  9639. break;
  9640. }
  9641. _child = _child.sibling;
  9642. }
  9643. if (!didFindChild) {
  9644. // Search parent B's child set
  9645. _child = parentB.child;
  9646. while (_child) {
  9647. if (_child === a) {
  9648. didFindChild = true;
  9649. a = parentB;
  9650. b = parentA;
  9651. break;
  9652. }
  9653. if (_child === b) {
  9654. didFindChild = true;
  9655. b = parentB;
  9656. a = parentA;
  9657. break;
  9658. }
  9659. _child = _child.sibling;
  9660. }
  9661. if (!didFindChild) {
  9662. {
  9663. throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
  9664. }
  9665. }
  9666. }
  9667. }
  9668. if (!(a.alternate === b)) {
  9669. {
  9670. throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
  9671. }
  9672. }
  9673. } // If the root is not a host container, we're in a disconnected tree. I.e.
  9674. // unmounted.
  9675. if (!(a.tag === HostRoot)) {
  9676. {
  9677. throw Error( "Unable to find node on an unmounted component." );
  9678. }
  9679. }
  9680. if (a.stateNode.current === a) {
  9681. // We've determined that A is the current branch.
  9682. return fiber;
  9683. } // Otherwise B has to be current branch.
  9684. return alternate;
  9685. }
  9686. function findCurrentHostFiber(parent) {
  9687. var currentParent = findCurrentFiberUsingSlowPath(parent);
  9688. if (!currentParent) {
  9689. return null;
  9690. } // Next we'll drill down this component to find the first HostComponent/Text.
  9691. var node = currentParent;
  9692. while (true) {
  9693. if (node.tag === HostComponent || node.tag === HostText) {
  9694. return node;
  9695. } else if (node.child) {
  9696. node.child.return = node;
  9697. node = node.child;
  9698. continue;
  9699. }
  9700. if (node === currentParent) {
  9701. return null;
  9702. }
  9703. while (!node.sibling) {
  9704. if (!node.return || node.return === currentParent) {
  9705. return null;
  9706. }
  9707. node = node.return;
  9708. }
  9709. node.sibling.return = node.return;
  9710. node = node.sibling;
  9711. } // Flow needs the return null here, but ESLint complains about it.
  9712. // eslint-disable-next-line no-unreachable
  9713. return null;
  9714. }
  9715. function findCurrentHostFiberWithNoPortals(parent) {
  9716. var currentParent = findCurrentFiberUsingSlowPath(parent);
  9717. if (!currentParent) {
  9718. return null;
  9719. } // Next we'll drill down this component to find the first HostComponent/Text.
  9720. var node = currentParent;
  9721. while (true) {
  9722. if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
  9723. return node;
  9724. } else if (node.child && node.tag !== HostPortal) {
  9725. node.child.return = node;
  9726. node = node.child;
  9727. continue;
  9728. }
  9729. if (node === currentParent) {
  9730. return null;
  9731. }
  9732. while (!node.sibling) {
  9733. if (!node.return || node.return === currentParent) {
  9734. return null;
  9735. }
  9736. node = node.return;
  9737. }
  9738. node.sibling.return = node.return;
  9739. node = node.sibling;
  9740. } // Flow needs the return null here, but ESLint complains about it.
  9741. // eslint-disable-next-line no-unreachable
  9742. return null;
  9743. }
  9744. /**
  9745. * Accumulates items that must not be null or undefined into the first one. This
  9746. * is used to conserve memory by avoiding array allocations, and thus sacrifices
  9747. * API cleanness. Since `current` can be null before being passed in and not
  9748. * null after this function, make sure to assign it back to `current`:
  9749. *
  9750. * `a = accumulateInto(a, b);`
  9751. *
  9752. * This API should be sparingly used. Try `accumulate` for something cleaner.
  9753. *
  9754. * @return {*|array<*>} An accumulation of items.
  9755. */
  9756. function accumulateInto(current, next) {
  9757. if (!(next != null)) {
  9758. {
  9759. throw Error( "accumulateInto(...): Accumulated items must not be null or undefined." );
  9760. }
  9761. }
  9762. if (current == null) {
  9763. return next;
  9764. } // Both are not empty. Warning: Never call x.concat(y) when you are not
  9765. // certain that x is an Array (x could be a string with concat method).
  9766. if (Array.isArray(current)) {
  9767. if (Array.isArray(next)) {
  9768. current.push.apply(current, next);
  9769. return current;
  9770. }
  9771. current.push(next);
  9772. return current;
  9773. }
  9774. if (Array.isArray(next)) {
  9775. // A bit too dangerous to mutate `next`.
  9776. return [current].concat(next);
  9777. }
  9778. return [current, next];
  9779. }
  9780. /**
  9781. * @param {array} arr an "accumulation" of items which is either an Array or
  9782. * a single item. Useful when paired with the `accumulate` module. This is a
  9783. * simple utility that allows us to reason about a collection of items, but
  9784. * handling the case when there is exactly one item (and we do not need to
  9785. * allocate an array).
  9786. * @param {function} cb Callback invoked with each element or a collection.
  9787. * @param {?} [scope] Scope used as `this` in a callback.
  9788. */
  9789. function forEachAccumulated(arr, cb, scope) {
  9790. if (Array.isArray(arr)) {
  9791. arr.forEach(cb, scope);
  9792. } else if (arr) {
  9793. cb.call(scope, arr);
  9794. }
  9795. }
  9796. /**
  9797. * Internal queue of events that have accumulated their dispatches and are
  9798. * waiting to have their dispatches executed.
  9799. */
  9800. var eventQueue = null;
  9801. /**
  9802. * Dispatches an event and releases it back into the pool, unless persistent.
  9803. *
  9804. * @param {?object} event Synthetic event to be dispatched.
  9805. * @private
  9806. */
  9807. var executeDispatchesAndRelease = function (event) {
  9808. if (event) {
  9809. executeDispatchesInOrder(event);
  9810. if (!event.isPersistent()) {
  9811. event.constructor.release(event);
  9812. }
  9813. }
  9814. };
  9815. var executeDispatchesAndReleaseTopLevel = function (e) {
  9816. return executeDispatchesAndRelease(e);
  9817. };
  9818. function runEventsInBatch(events) {
  9819. if (events !== null) {
  9820. eventQueue = accumulateInto(eventQueue, events);
  9821. } // Set `eventQueue` to null before processing it so that we can tell if more
  9822. // events get enqueued while processing.
  9823. var processingEventQueue = eventQueue;
  9824. eventQueue = null;
  9825. if (!processingEventQueue) {
  9826. return;
  9827. }
  9828. forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
  9829. if (!!eventQueue) {
  9830. {
  9831. throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." );
  9832. }
  9833. } // This would be a good time to rethrow if any of the event handlers threw.
  9834. rethrowCaughtError();
  9835. }
  9836. /**
  9837. * Gets the target node from a native browser event by accounting for
  9838. * inconsistencies in browser DOM APIs.
  9839. *
  9840. * @param {object} nativeEvent Native browser event.
  9841. * @return {DOMEventTarget} Target node.
  9842. */
  9843. function getEventTarget(nativeEvent) {
  9844. // Fallback to nativeEvent.srcElement for IE9
  9845. // https://github.com/facebook/react/issues/12506
  9846. var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
  9847. if (target.correspondingUseElement) {
  9848. target = target.correspondingUseElement;
  9849. } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
  9850. // @see http://www.quirksmode.org/js/events_properties.html
  9851. return target.nodeType === TEXT_NODE ? target.parentNode : target;
  9852. }
  9853. /**
  9854. * Checks if an event is supported in the current execution environment.
  9855. *
  9856. * NOTE: This will not work correctly for non-generic events such as `change`,
  9857. * `reset`, `load`, `error`, and `select`.
  9858. *
  9859. * Borrows from Modernizr.
  9860. *
  9861. * @param {string} eventNameSuffix Event name, e.g. "click".
  9862. * @return {boolean} True if the event is supported.
  9863. * @internal
  9864. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  9865. */
  9866. function isEventSupported(eventNameSuffix) {
  9867. if (!canUseDOM) {
  9868. return false;
  9869. }
  9870. var eventName = 'on' + eventNameSuffix;
  9871. var isSupported = eventName in document;
  9872. if (!isSupported) {
  9873. var element = document.createElement('div');
  9874. element.setAttribute(eventName, 'return;');
  9875. isSupported = typeof element[eventName] === 'function';
  9876. }
  9877. return isSupported;
  9878. }
  9879. /**
  9880. * Summary of `DOMEventPluginSystem` event handling:
  9881. *
  9882. * - Top-level delegation is used to trap most native browser events. This
  9883. * may only occur in the main thread and is the responsibility of
  9884. * ReactDOMEventListener, which is injected and can therefore support
  9885. * pluggable event sources. This is the only work that occurs in the main
  9886. * thread.
  9887. *
  9888. * - We normalize and de-duplicate events to account for browser quirks. This
  9889. * may be done in the worker thread.
  9890. *
  9891. * - Forward these native events (with the associated top-level type used to
  9892. * trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want
  9893. * to extract any synthetic events.
  9894. *
  9895. * - The `EventPluginRegistry` will then process each event by annotating them with
  9896. * "dispatches", a sequence of listeners and IDs that care about that event.
  9897. *
  9898. * - The `EventPluginRegistry` then dispatches the events.
  9899. *
  9900. * Overview of React and the event system:
  9901. *
  9902. * +------------+ .
  9903. * | DOM | .
  9904. * +------------+ .
  9905. * | .
  9906. * v .
  9907. * +------------+ .
  9908. * | ReactEvent | .
  9909. * | Listener | .
  9910. * +------------+ . +-----------+
  9911. * | . +--------+|SimpleEvent|
  9912. * | . | |Plugin |
  9913. * +-----|------+ . v +-----------+
  9914. * | | | . +--------------+ +------------+
  9915. * | +-----------.--->|PluginRegistry| | Event |
  9916. * | | . | | +-----------+ | Propagators|
  9917. * | ReactEvent | . | | |TapEvent | |------------|
  9918. * | Emitter | . | |<---+|Plugin | |other plugin|
  9919. * | | . | | +-----------+ | utilities |
  9920. * | +-----------.--->| | +------------+
  9921. * | | | . +--------------+
  9922. * +-----|------+ . ^ +-----------+
  9923. * | . | |Enter/Leave|
  9924. * + . +-------+|Plugin |
  9925. * +-------------+ . +-----------+
  9926. * | application | .
  9927. * |-------------| .
  9928. * | | .
  9929. * | | .
  9930. * +-------------+ .
  9931. * .
  9932. * React Core . General Purpose Event Plugin System
  9933. */
  9934. var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
  9935. var callbackBookkeepingPool = [];
  9936. function releaseTopLevelCallbackBookKeeping(instance) {
  9937. instance.topLevelType = null;
  9938. instance.nativeEvent = null;
  9939. instance.targetInst = null;
  9940. instance.ancestors.length = 0;
  9941. if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
  9942. callbackBookkeepingPool.push(instance);
  9943. }
  9944. } // Used to store ancestor hierarchy in top level callback
  9945. function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {
  9946. if (callbackBookkeepingPool.length) {
  9947. var instance = callbackBookkeepingPool.pop();
  9948. instance.topLevelType = topLevelType;
  9949. instance.eventSystemFlags = eventSystemFlags;
  9950. instance.nativeEvent = nativeEvent;
  9951. instance.targetInst = targetInst;
  9952. return instance;
  9953. }
  9954. return {
  9955. topLevelType: topLevelType,
  9956. eventSystemFlags: eventSystemFlags,
  9957. nativeEvent: nativeEvent,
  9958. targetInst: targetInst,
  9959. ancestors: []
  9960. };
  9961. }
  9962. /**
  9963. * Find the deepest React component completely containing the root of the
  9964. * passed-in instance (for use when entire React trees are nested within each
  9965. * other). If React trees are not nested, returns null.
  9966. */
  9967. function findRootContainerNode(inst) {
  9968. if (inst.tag === HostRoot) {
  9969. return inst.stateNode.containerInfo;
  9970. } // TODO: It may be a good idea to cache this to prevent unnecessary DOM
  9971. // traversal, but caching is difficult to do correctly without using a
  9972. // mutation observer to listen for all DOM changes.
  9973. while (inst.return) {
  9974. inst = inst.return;
  9975. }
  9976. if (inst.tag !== HostRoot) {
  9977. // This can happen if we're in a detached tree.
  9978. return null;
  9979. }
  9980. return inst.stateNode.containerInfo;
  9981. }
  9982. /**
  9983. * Allows registered plugins an opportunity to extract events from top-level
  9984. * native browser events.
  9985. *
  9986. * @return {*} An accumulation of synthetic events.
  9987. * @internal
  9988. */
  9989. function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  9990. var events = null;
  9991. for (var i = 0; i < plugins.length; i++) {
  9992. // Not every plugin in the ordering may be loaded at runtime.
  9993. var possiblePlugin = plugins[i];
  9994. if (possiblePlugin) {
  9995. var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
  9996. if (extractedEvents) {
  9997. events = accumulateInto(events, extractedEvents);
  9998. }
  9999. }
  10000. }
  10001. return events;
  10002. }
  10003. function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  10004. var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
  10005. runEventsInBatch(events);
  10006. }
  10007. function handleTopLevel(bookKeeping) {
  10008. var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.
  10009. // It's important that we build the array of ancestors before calling any
  10010. // event handlers, because event handlers can modify the DOM, leading to
  10011. // inconsistencies with ReactMount's node cache. See #1105.
  10012. var ancestor = targetInst;
  10013. do {
  10014. if (!ancestor) {
  10015. var ancestors = bookKeeping.ancestors;
  10016. ancestors.push(ancestor);
  10017. break;
  10018. }
  10019. var root = findRootContainerNode(ancestor);
  10020. if (!root) {
  10021. break;
  10022. }
  10023. var tag = ancestor.tag;
  10024. if (tag === HostComponent || tag === HostText) {
  10025. bookKeeping.ancestors.push(ancestor);
  10026. }
  10027. ancestor = getClosestInstanceFromNode(root);
  10028. } while (ancestor);
  10029. for (var i = 0; i < bookKeeping.ancestors.length; i++) {
  10030. targetInst = bookKeeping.ancestors[i];
  10031. var eventTarget = getEventTarget(bookKeeping.nativeEvent);
  10032. var topLevelType = bookKeeping.topLevelType;
  10033. var nativeEvent = bookKeeping.nativeEvent;
  10034. var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags
  10035. if (i === 0) {
  10036. eventSystemFlags |= IS_FIRST_ANCESTOR;
  10037. }
  10038. runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);
  10039. }
  10040. }
  10041. function dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {
  10042. var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);
  10043. try {
  10044. // Event queue being processed in the same cycle allows
  10045. // `preventDefault`.
  10046. batchedEventUpdates(handleTopLevel, bookKeeping);
  10047. } finally {
  10048. releaseTopLevelCallbackBookKeeping(bookKeeping);
  10049. }
  10050. }
  10051. /**
  10052. * We listen for bubbled touch events on the document object.
  10053. *
  10054. * Firefox v8.01 (and possibly others) exhibited strange behavior when
  10055. * mounting `onmousemove` events at some node that was not the document
  10056. * element. The symptoms were that if your mouse is not moving over something
  10057. * contained within that mount point (for example on the background) the
  10058. * top-level listeners for `onmousemove` won't be called. However, if you
  10059. * register the `mousemove` on the document object, then it will of course
  10060. * catch all `mousemove`s. This along with iOS quirks, justifies restricting
  10061. * top-level listeners to the document object only, at least for these
  10062. * movement types of events and possibly all events.
  10063. *
  10064. * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
  10065. *
  10066. * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
  10067. * they bubble to document.
  10068. *
  10069. * @param {string} registrationName Name of listener (e.g. `onClick`).
  10070. * @param {object} mountAt Container where to mount the listener
  10071. */
  10072. function legacyListenToEvent(registrationName, mountAt) {
  10073. var listenerMap = getListenerMapForElement(mountAt);
  10074. var dependencies = registrationNameDependencies[registrationName];
  10075. for (var i = 0; i < dependencies.length; i++) {
  10076. var dependency = dependencies[i];
  10077. legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);
  10078. }
  10079. }
  10080. function legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {
  10081. if (!listenerMap.has(topLevelType)) {
  10082. switch (topLevelType) {
  10083. case TOP_SCROLL:
  10084. trapCapturedEvent(TOP_SCROLL, mountAt);
  10085. break;
  10086. case TOP_FOCUS:
  10087. case TOP_BLUR:
  10088. trapCapturedEvent(TOP_FOCUS, mountAt);
  10089. trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,
  10090. // but this ensures we mark both as attached rather than just one.
  10091. listenerMap.set(TOP_BLUR, null);
  10092. listenerMap.set(TOP_FOCUS, null);
  10093. break;
  10094. case TOP_CANCEL:
  10095. case TOP_CLOSE:
  10096. if (isEventSupported(getRawEventName(topLevelType))) {
  10097. trapCapturedEvent(topLevelType, mountAt);
  10098. }
  10099. break;
  10100. case TOP_INVALID:
  10101. case TOP_SUBMIT:
  10102. case TOP_RESET:
  10103. // We listen to them on the target DOM elements.
  10104. // Some of them bubble so we don't want them to fire twice.
  10105. break;
  10106. default:
  10107. // By default, listen on the top level to all non-media events.
  10108. // Media events don't bubble so adding the listener wouldn't do anything.
  10109. var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;
  10110. if (!isMediaEvent) {
  10111. trapBubbledEvent(topLevelType, mountAt);
  10112. }
  10113. break;
  10114. }
  10115. listenerMap.set(topLevelType, null);
  10116. }
  10117. }
  10118. function isListeningToAllDependencies(registrationName, mountAt) {
  10119. var listenerMap = getListenerMapForElement(mountAt);
  10120. var dependencies = registrationNameDependencies[registrationName];
  10121. for (var i = 0; i < dependencies.length; i++) {
  10122. var dependency = dependencies[i];
  10123. if (!listenerMap.has(dependency)) {
  10124. return false;
  10125. }
  10126. }
  10127. return true;
  10128. }
  10129. var attemptUserBlockingHydration;
  10130. function setAttemptUserBlockingHydration(fn) {
  10131. attemptUserBlockingHydration = fn;
  10132. }
  10133. var attemptContinuousHydration;
  10134. function setAttemptContinuousHydration(fn) {
  10135. attemptContinuousHydration = fn;
  10136. }
  10137. var attemptHydrationAtCurrentPriority;
  10138. function setAttemptHydrationAtCurrentPriority(fn) {
  10139. attemptHydrationAtCurrentPriority = fn;
  10140. } // TODO: Upgrade this definition once we're on a newer version of Flow that
  10141. var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
  10142. var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
  10143. // if the last target was dehydrated.
  10144. var queuedFocus = null;
  10145. var queuedDrag = null;
  10146. var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
  10147. var queuedPointers = new Map();
  10148. var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
  10149. var queuedExplicitHydrationTargets = [];
  10150. function hasQueuedDiscreteEvents() {
  10151. return queuedDiscreteEvents.length > 0;
  10152. }
  10153. var discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];
  10154. var continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];
  10155. function isReplayableDiscreteEvent(eventType) {
  10156. return discreteReplayableEvents.indexOf(eventType) > -1;
  10157. }
  10158. function trapReplayableEventForDocument(topLevelType, document, listenerMap) {
  10159. legacyListenToTopLevelEvent(topLevelType, document, listenerMap);
  10160. }
  10161. function eagerlyTrapReplayableEvents(container, document) {
  10162. var listenerMapForDoc = getListenerMapForElement(document); // Discrete
  10163. discreteReplayableEvents.forEach(function (topLevelType) {
  10164. trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
  10165. }); // Continuous
  10166. continuousReplayableEvents.forEach(function (topLevelType) {
  10167. trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
  10168. });
  10169. }
  10170. function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  10171. return {
  10172. blockedOn: blockedOn,
  10173. topLevelType: topLevelType,
  10174. eventSystemFlags: eventSystemFlags | IS_REPLAYED,
  10175. nativeEvent: nativeEvent,
  10176. container: container
  10177. };
  10178. }
  10179. function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  10180. var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
  10181. queuedDiscreteEvents.push(queuedEvent);
  10182. } // Resets the replaying for this type of continuous event to no event.
  10183. function clearIfContinuousEvent(topLevelType, nativeEvent) {
  10184. switch (topLevelType) {
  10185. case TOP_FOCUS:
  10186. case TOP_BLUR:
  10187. queuedFocus = null;
  10188. break;
  10189. case TOP_DRAG_ENTER:
  10190. case TOP_DRAG_LEAVE:
  10191. queuedDrag = null;
  10192. break;
  10193. case TOP_MOUSE_OVER:
  10194. case TOP_MOUSE_OUT:
  10195. queuedMouse = null;
  10196. break;
  10197. case TOP_POINTER_OVER:
  10198. case TOP_POINTER_OUT:
  10199. {
  10200. var pointerId = nativeEvent.pointerId;
  10201. queuedPointers.delete(pointerId);
  10202. break;
  10203. }
  10204. case TOP_GOT_POINTER_CAPTURE:
  10205. case TOP_LOST_POINTER_CAPTURE:
  10206. {
  10207. var _pointerId = nativeEvent.pointerId;
  10208. queuedPointerCaptures.delete(_pointerId);
  10209. break;
  10210. }
  10211. }
  10212. }
  10213. function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  10214. if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
  10215. var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
  10216. if (blockedOn !== null) {
  10217. var _fiber2 = getInstanceFromNode$1(blockedOn);
  10218. if (_fiber2 !== null) {
  10219. // Attempt to increase the priority of this target.
  10220. attemptContinuousHydration(_fiber2);
  10221. }
  10222. }
  10223. return queuedEvent;
  10224. } // If we have already queued this exact event, then it's because
  10225. // the different event systems have different DOM event listeners.
  10226. // We can accumulate the flags and store a single event to be
  10227. // replayed.
  10228. existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
  10229. return existingQueuedEvent;
  10230. }
  10231. function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  10232. // These set relatedTarget to null because the replayed event will be treated as if we
  10233. // moved from outside the window (no target) onto the target once it hydrates.
  10234. // Instead of mutating we could clone the event.
  10235. switch (topLevelType) {
  10236. case TOP_FOCUS:
  10237. {
  10238. var focusEvent = nativeEvent;
  10239. queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);
  10240. return true;
  10241. }
  10242. case TOP_DRAG_ENTER:
  10243. {
  10244. var dragEvent = nativeEvent;
  10245. queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);
  10246. return true;
  10247. }
  10248. case TOP_MOUSE_OVER:
  10249. {
  10250. var mouseEvent = nativeEvent;
  10251. queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);
  10252. return true;
  10253. }
  10254. case TOP_POINTER_OVER:
  10255. {
  10256. var pointerEvent = nativeEvent;
  10257. var pointerId = pointerEvent.pointerId;
  10258. queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));
  10259. return true;
  10260. }
  10261. case TOP_GOT_POINTER_CAPTURE:
  10262. {
  10263. var _pointerEvent = nativeEvent;
  10264. var _pointerId2 = _pointerEvent.pointerId;
  10265. queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));
  10266. return true;
  10267. }
  10268. }
  10269. return false;
  10270. } // Check if this target is unblocked. Returns true if it's unblocked.
  10271. function attemptExplicitHydrationTarget(queuedTarget) {
  10272. // TODO: This function shares a lot of logic with attemptToDispatchEvent.
  10273. // Try to unify them. It's a bit tricky since it would require two return
  10274. // values.
  10275. var targetInst = getClosestInstanceFromNode(queuedTarget.target);
  10276. if (targetInst !== null) {
  10277. var nearestMounted = getNearestMountedFiber(targetInst);
  10278. if (nearestMounted !== null) {
  10279. var tag = nearestMounted.tag;
  10280. if (tag === SuspenseComponent) {
  10281. var instance = getSuspenseInstanceFromFiber(nearestMounted);
  10282. if (instance !== null) {
  10283. // We're blocked on hydrating this boundary.
  10284. // Increase its priority.
  10285. queuedTarget.blockedOn = instance;
  10286. Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
  10287. attemptHydrationAtCurrentPriority(nearestMounted);
  10288. });
  10289. return;
  10290. }
  10291. } else if (tag === HostRoot) {
  10292. var root = nearestMounted.stateNode;
  10293. if (root.hydrate) {
  10294. queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
  10295. // a root other than sync.
  10296. return;
  10297. }
  10298. }
  10299. }
  10300. }
  10301. queuedTarget.blockedOn = null;
  10302. }
  10303. function attemptReplayContinuousQueuedEvent(queuedEvent) {
  10304. if (queuedEvent.blockedOn !== null) {
  10305. return false;
  10306. }
  10307. var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);
  10308. if (nextBlockedOn !== null) {
  10309. // We're still blocked. Try again later.
  10310. var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
  10311. if (_fiber3 !== null) {
  10312. attemptContinuousHydration(_fiber3);
  10313. }
  10314. queuedEvent.blockedOn = nextBlockedOn;
  10315. return false;
  10316. }
  10317. return true;
  10318. }
  10319. function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
  10320. if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
  10321. map.delete(key);
  10322. }
  10323. }
  10324. function replayUnblockedEvents() {
  10325. hasScheduledReplayAttempt = false; // First replay discrete events.
  10326. while (queuedDiscreteEvents.length > 0) {
  10327. var nextDiscreteEvent = queuedDiscreteEvents[0];
  10328. if (nextDiscreteEvent.blockedOn !== null) {
  10329. // We're still blocked.
  10330. // Increase the priority of this boundary to unblock
  10331. // the next discrete event.
  10332. var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
  10333. if (_fiber4 !== null) {
  10334. attemptUserBlockingHydration(_fiber4);
  10335. }
  10336. break;
  10337. }
  10338. var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);
  10339. if (nextBlockedOn !== null) {
  10340. // We're still blocked. Try again later.
  10341. nextDiscreteEvent.blockedOn = nextBlockedOn;
  10342. } else {
  10343. // We've successfully replayed the first event. Let's try the next one.
  10344. queuedDiscreteEvents.shift();
  10345. }
  10346. } // Next replay any continuous events.
  10347. if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
  10348. queuedFocus = null;
  10349. }
  10350. if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
  10351. queuedDrag = null;
  10352. }
  10353. if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
  10354. queuedMouse = null;
  10355. }
  10356. queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
  10357. queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
  10358. }
  10359. function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
  10360. if (queuedEvent.blockedOn === unblocked) {
  10361. queuedEvent.blockedOn = null;
  10362. if (!hasScheduledReplayAttempt) {
  10363. hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
  10364. // now unblocked. This first might not actually be unblocked yet.
  10365. // We could check it early to avoid scheduling an unnecessary callback.
  10366. Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
  10367. }
  10368. }
  10369. }
  10370. function retryIfBlockedOn(unblocked) {
  10371. // Mark anything that was blocked on this as no longer blocked
  10372. // and eligible for a replay.
  10373. if (queuedDiscreteEvents.length > 0) {
  10374. scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
  10375. // worth it because we expect very few discrete events to queue up and once
  10376. // we are actually fully unblocked it will be fast to replay them.
  10377. for (var i = 1; i < queuedDiscreteEvents.length; i++) {
  10378. var queuedEvent = queuedDiscreteEvents[i];
  10379. if (queuedEvent.blockedOn === unblocked) {
  10380. queuedEvent.blockedOn = null;
  10381. }
  10382. }
  10383. }
  10384. if (queuedFocus !== null) {
  10385. scheduleCallbackIfUnblocked(queuedFocus, unblocked);
  10386. }
  10387. if (queuedDrag !== null) {
  10388. scheduleCallbackIfUnblocked(queuedDrag, unblocked);
  10389. }
  10390. if (queuedMouse !== null) {
  10391. scheduleCallbackIfUnblocked(queuedMouse, unblocked);
  10392. }
  10393. var unblock = function (queuedEvent) {
  10394. return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
  10395. };
  10396. queuedPointers.forEach(unblock);
  10397. queuedPointerCaptures.forEach(unblock);
  10398. for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
  10399. var queuedTarget = queuedExplicitHydrationTargets[_i];
  10400. if (queuedTarget.blockedOn === unblocked) {
  10401. queuedTarget.blockedOn = null;
  10402. }
  10403. }
  10404. while (queuedExplicitHydrationTargets.length > 0) {
  10405. var nextExplicitTarget = queuedExplicitHydrationTargets[0];
  10406. if (nextExplicitTarget.blockedOn !== null) {
  10407. // We're still blocked.
  10408. break;
  10409. } else {
  10410. attemptExplicitHydrationTarget(nextExplicitTarget);
  10411. if (nextExplicitTarget.blockedOn === null) {
  10412. // We're unblocked.
  10413. queuedExplicitHydrationTargets.shift();
  10414. }
  10415. }
  10416. }
  10417. }
  10418. function addEventBubbleListener(element, eventType, listener) {
  10419. element.addEventListener(eventType, listener, false);
  10420. }
  10421. function addEventCaptureListener(element, eventType, listener) {
  10422. element.addEventListener(eventType, listener, true);
  10423. }
  10424. // do it in two places, which duplicates logic
  10425. // and increases the bundle size, we do it all
  10426. // here once. If we remove or refactor the
  10427. // SimpleEventPlugin, we should also remove or
  10428. // update the below line.
  10429. var simpleEventPluginEventTypes = {};
  10430. var topLevelEventsToDispatchConfig = new Map();
  10431. var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
  10432. // the code required to apply the same logic for event prioritization and that of the
  10433. // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
  10434. // duplication (for which there would be quite a bit). For the events that are not needed
  10435. // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
  10436. // array of top level events.
  10437. // Lastly, we ignore prettier so we can keep the formatting sane.
  10438. // prettier-ignore
  10439. var discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];
  10440. var otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore
  10441. var userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore
  10442. var continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];
  10443. /**
  10444. * Turns
  10445. * ['abort', ...]
  10446. * into
  10447. * eventTypes = {
  10448. * 'abort': {
  10449. * phasedRegistrationNames: {
  10450. * bubbled: 'onAbort',
  10451. * captured: 'onAbortCapture',
  10452. * },
  10453. * dependencies: [TOP_ABORT],
  10454. * },
  10455. * ...
  10456. * };
  10457. * topLevelEventsToDispatchConfig = new Map([
  10458. * [TOP_ABORT, { sameConfig }],
  10459. * ]);
  10460. */
  10461. function processSimpleEventPluginPairsByPriority(eventTypes, priority) {
  10462. // As the event types are in pairs of two, we need to iterate
  10463. // through in twos. The events are in pairs of two to save code
  10464. // and improve init perf of processing this array, as it will
  10465. // result in far fewer object allocations and property accesses
  10466. // if we only use three arrays to process all the categories of
  10467. // instead of tuples.
  10468. for (var i = 0; i < eventTypes.length; i += 2) {
  10469. var topEvent = eventTypes[i];
  10470. var event = eventTypes[i + 1];
  10471. var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
  10472. var onEvent = 'on' + capitalizedEvent;
  10473. var config = {
  10474. phasedRegistrationNames: {
  10475. bubbled: onEvent,
  10476. captured: onEvent + 'Capture'
  10477. },
  10478. dependencies: [topEvent],
  10479. eventPriority: priority
  10480. };
  10481. eventPriorities.set(topEvent, priority);
  10482. topLevelEventsToDispatchConfig.set(topEvent, config);
  10483. simpleEventPluginEventTypes[event] = config;
  10484. }
  10485. }
  10486. function processTopEventPairsByPriority(eventTypes, priority) {
  10487. for (var i = 0; i < eventTypes.length; i++) {
  10488. eventPriorities.set(eventTypes[i], priority);
  10489. }
  10490. } // SimpleEventPlugin
  10491. processSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
  10492. processSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
  10493. processSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin
  10494. processTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);
  10495. function getEventPriorityForPluginSystem(topLevelType) {
  10496. var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might
  10497. // want to warn if we can't detect the priority
  10498. // for the event.
  10499. return priority === undefined ? ContinuousEvent : priority;
  10500. }
  10501. // Intentionally not named imports because Rollup would use dynamic dispatch for
  10502. var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  10503. runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?
  10504. var _enabled = true;
  10505. function setEnabled(enabled) {
  10506. _enabled = !!enabled;
  10507. }
  10508. function isEnabled() {
  10509. return _enabled;
  10510. }
  10511. function trapBubbledEvent(topLevelType, element) {
  10512. trapEventForPluginEventSystem(element, topLevelType, false);
  10513. }
  10514. function trapCapturedEvent(topLevelType, element) {
  10515. trapEventForPluginEventSystem(element, topLevelType, true);
  10516. }
  10517. function trapEventForPluginEventSystem(container, topLevelType, capture) {
  10518. var listener;
  10519. switch (getEventPriorityForPluginSystem(topLevelType)) {
  10520. case DiscreteEvent:
  10521. listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
  10522. break;
  10523. case UserBlockingEvent:
  10524. listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
  10525. break;
  10526. case ContinuousEvent:
  10527. default:
  10528. listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
  10529. break;
  10530. }
  10531. var rawEventName = getRawEventName(topLevelType);
  10532. if (capture) {
  10533. addEventCaptureListener(container, rawEventName, listener);
  10534. } else {
  10535. addEventBubbleListener(container, rawEventName, listener);
  10536. }
  10537. }
  10538. function dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
  10539. flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
  10540. discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);
  10541. }
  10542. function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {
  10543. runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));
  10544. }
  10545. function dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
  10546. if (!_enabled) {
  10547. return;
  10548. }
  10549. if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {
  10550. // If we already have a queue of discrete events, and this is another discrete
  10551. // event, then we can't dispatch it regardless of its target, since they
  10552. // need to dispatch in order.
  10553. queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
  10554. topLevelType, eventSystemFlags, container, nativeEvent);
  10555. return;
  10556. }
  10557. var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);
  10558. if (blockedOn === null) {
  10559. // We successfully dispatched this event.
  10560. clearIfContinuousEvent(topLevelType, nativeEvent);
  10561. return;
  10562. }
  10563. if (isReplayableDiscreteEvent(topLevelType)) {
  10564. // This this to be replayed later once the target is available.
  10565. queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
  10566. return;
  10567. }
  10568. if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {
  10569. return;
  10570. } // We need to clear only if we didn't queue because
  10571. // queueing is accummulative.
  10572. clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,
  10573. // in case the event system needs to trace it.
  10574. {
  10575. dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);
  10576. }
  10577. } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
  10578. function attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
  10579. // TODO: Warn if _enabled is false.
  10580. var nativeEventTarget = getEventTarget(nativeEvent);
  10581. var targetInst = getClosestInstanceFromNode(nativeEventTarget);
  10582. if (targetInst !== null) {
  10583. var nearestMounted = getNearestMountedFiber(targetInst);
  10584. if (nearestMounted === null) {
  10585. // This tree has been unmounted already. Dispatch without a target.
  10586. targetInst = null;
  10587. } else {
  10588. var tag = nearestMounted.tag;
  10589. if (tag === SuspenseComponent) {
  10590. var instance = getSuspenseInstanceFromFiber(nearestMounted);
  10591. if (instance !== null) {
  10592. // Queue the event to be replayed later. Abort dispatching since we
  10593. // don't want this event dispatched twice through the event system.
  10594. // TODO: If this is the first discrete event in the queue. Schedule an increased
  10595. // priority for this boundary.
  10596. return instance;
  10597. } // This shouldn't happen, something went wrong but to avoid blocking
  10598. // the whole system, dispatch the event without a target.
  10599. // TODO: Warn.
  10600. targetInst = null;
  10601. } else if (tag === HostRoot) {
  10602. var root = nearestMounted.stateNode;
  10603. if (root.hydrate) {
  10604. // If this happens during a replay something went wrong and it might block
  10605. // the whole system.
  10606. return getContainerFromFiber(nearestMounted);
  10607. }
  10608. targetInst = null;
  10609. } else if (nearestMounted !== targetInst) {
  10610. // If we get an event (ex: img onload) before committing that
  10611. // component's mount, ignore it for now (that is, treat it as if it was an
  10612. // event on a non-React tree). We might also consider queueing events and
  10613. // dispatching them after the mount.
  10614. targetInst = null;
  10615. }
  10616. }
  10617. }
  10618. {
  10619. dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);
  10620. } // We're not blocked on anything.
  10621. return null;
  10622. }
  10623. // List derived from Gecko source code:
  10624. // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
  10625. var shorthandToLonghand = {
  10626. animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
  10627. background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
  10628. backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
  10629. border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
  10630. borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
  10631. borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
  10632. borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
  10633. borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
  10634. borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
  10635. borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
  10636. borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
  10637. borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
  10638. borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
  10639. borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
  10640. borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
  10641. borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
  10642. borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
  10643. columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
  10644. columns: ['columnCount', 'columnWidth'],
  10645. flex: ['flexBasis', 'flexGrow', 'flexShrink'],
  10646. flexFlow: ['flexDirection', 'flexWrap'],
  10647. font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
  10648. fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
  10649. gap: ['columnGap', 'rowGap'],
  10650. grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
  10651. gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
  10652. gridColumn: ['gridColumnEnd', 'gridColumnStart'],
  10653. gridColumnGap: ['columnGap'],
  10654. gridGap: ['columnGap', 'rowGap'],
  10655. gridRow: ['gridRowEnd', 'gridRowStart'],
  10656. gridRowGap: ['rowGap'],
  10657. gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
  10658. listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
  10659. margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
  10660. marker: ['markerEnd', 'markerMid', 'markerStart'],
  10661. mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
  10662. maskPosition: ['maskPositionX', 'maskPositionY'],
  10663. outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
  10664. overflow: ['overflowX', 'overflowY'],
  10665. padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
  10666. placeContent: ['alignContent', 'justifyContent'],
  10667. placeItems: ['alignItems', 'justifyItems'],
  10668. placeSelf: ['alignSelf', 'justifySelf'],
  10669. textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
  10670. textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
  10671. transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
  10672. wordWrap: ['overflowWrap']
  10673. };
  10674. /**
  10675. * CSS properties which accept numbers but are not in units of "px".
  10676. */
  10677. var isUnitlessNumber = {
  10678. animationIterationCount: true,
  10679. borderImageOutset: true,
  10680. borderImageSlice: true,
  10681. borderImageWidth: true,
  10682. boxFlex: true,
  10683. boxFlexGroup: true,
  10684. boxOrdinalGroup: true,
  10685. columnCount: true,
  10686. columns: true,
  10687. flex: true,
  10688. flexGrow: true,
  10689. flexPositive: true,
  10690. flexShrink: true,
  10691. flexNegative: true,
  10692. flexOrder: true,
  10693. gridArea: true,
  10694. gridRow: true,
  10695. gridRowEnd: true,
  10696. gridRowSpan: true,
  10697. gridRowStart: true,
  10698. gridColumn: true,
  10699. gridColumnEnd: true,
  10700. gridColumnSpan: true,
  10701. gridColumnStart: true,
  10702. fontWeight: true,
  10703. lineClamp: true,
  10704. lineHeight: true,
  10705. opacity: true,
  10706. order: true,
  10707. orphans: true,
  10708. tabSize: true,
  10709. widows: true,
  10710. zIndex: true,
  10711. zoom: true,
  10712. // SVG-related properties
  10713. fillOpacity: true,
  10714. floodOpacity: true,
  10715. stopOpacity: true,
  10716. strokeDasharray: true,
  10717. strokeDashoffset: true,
  10718. strokeMiterlimit: true,
  10719. strokeOpacity: true,
  10720. strokeWidth: true
  10721. };
  10722. /**
  10723. * @param {string} prefix vendor-specific prefix, eg: Webkit
  10724. * @param {string} key style name, eg: transitionDuration
  10725. * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
  10726. * WebkitTransitionDuration
  10727. */
  10728. function prefixKey(prefix, key) {
  10729. return prefix + key.charAt(0).toUpperCase() + key.substring(1);
  10730. }
  10731. /**
  10732. * Support style names that may come passed in prefixed by adding permutations
  10733. * of vendor prefixes.
  10734. */
  10735. var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
  10736. // infinite loop, because it iterates over the newly added props too.
  10737. Object.keys(isUnitlessNumber).forEach(function (prop) {
  10738. prefixes.forEach(function (prefix) {
  10739. isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
  10740. });
  10741. });
  10742. /**
  10743. * Convert a value into the proper css writable value. The style name `name`
  10744. * should be logical (no hyphens), as specified
  10745. * in `CSSProperty.isUnitlessNumber`.
  10746. *
  10747. * @param {string} name CSS property name such as `topMargin`.
  10748. * @param {*} value CSS property value such as `10px`.
  10749. * @return {string} Normalized style value with dimensions applied.
  10750. */
  10751. function dangerousStyleValue(name, value, isCustomProperty) {
  10752. // Note that we've removed escapeTextForBrowser() calls here since the
  10753. // whole string will be escaped when the attribute is injected into
  10754. // the markup. If you provide unsafe user data here they can inject
  10755. // arbitrary CSS which may be problematic (I couldn't repro this):
  10756. // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
  10757. // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
  10758. // This is not an XSS hole but instead a potential CSS injection issue
  10759. // which has lead to a greater discussion about how we're going to
  10760. // trust URLs moving forward. See #2115901
  10761. var isEmpty = value == null || typeof value === 'boolean' || value === '';
  10762. if (isEmpty) {
  10763. return '';
  10764. }
  10765. if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
  10766. return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
  10767. }
  10768. return ('' + value).trim();
  10769. }
  10770. var uppercasePattern = /([A-Z])/g;
  10771. var msPattern = /^ms-/;
  10772. /**
  10773. * Hyphenates a camelcased CSS property name, for example:
  10774. *
  10775. * > hyphenateStyleName('backgroundColor')
  10776. * < "background-color"
  10777. * > hyphenateStyleName('MozTransition')
  10778. * < "-moz-transition"
  10779. * > hyphenateStyleName('msTransition')
  10780. * < "-ms-transition"
  10781. *
  10782. * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
  10783. * is converted to `-ms-`.
  10784. */
  10785. function hyphenateStyleName(name) {
  10786. return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
  10787. }
  10788. var warnValidStyle = function () {};
  10789. {
  10790. // 'msTransform' is correct, but the other prefixes should be capitalized
  10791. var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
  10792. var msPattern$1 = /^-ms-/;
  10793. var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
  10794. var badStyleValueWithSemicolonPattern = /;\s*$/;
  10795. var warnedStyleNames = {};
  10796. var warnedStyleValues = {};
  10797. var warnedForNaNValue = false;
  10798. var warnedForInfinityValue = false;
  10799. var camelize = function (string) {
  10800. return string.replace(hyphenPattern, function (_, character) {
  10801. return character.toUpperCase();
  10802. });
  10803. };
  10804. var warnHyphenatedStyleName = function (name) {
  10805. if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
  10806. return;
  10807. }
  10808. warnedStyleNames[name] = true;
  10809. error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
  10810. // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
  10811. // is converted to lowercase `ms`.
  10812. camelize(name.replace(msPattern$1, 'ms-')));
  10813. };
  10814. var warnBadVendoredStyleName = function (name) {
  10815. if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
  10816. return;
  10817. }
  10818. warnedStyleNames[name] = true;
  10819. error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
  10820. };
  10821. var warnStyleValueWithSemicolon = function (name, value) {
  10822. if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
  10823. return;
  10824. }
  10825. warnedStyleValues[value] = true;
  10826. error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
  10827. };
  10828. var warnStyleValueIsNaN = function (name, value) {
  10829. if (warnedForNaNValue) {
  10830. return;
  10831. }
  10832. warnedForNaNValue = true;
  10833. error('`NaN` is an invalid value for the `%s` css style property.', name);
  10834. };
  10835. var warnStyleValueIsInfinity = function (name, value) {
  10836. if (warnedForInfinityValue) {
  10837. return;
  10838. }
  10839. warnedForInfinityValue = true;
  10840. error('`Infinity` is an invalid value for the `%s` css style property.', name);
  10841. };
  10842. warnValidStyle = function (name, value) {
  10843. if (name.indexOf('-') > -1) {
  10844. warnHyphenatedStyleName(name);
  10845. } else if (badVendoredStyleNamePattern.test(name)) {
  10846. warnBadVendoredStyleName(name);
  10847. } else if (badStyleValueWithSemicolonPattern.test(value)) {
  10848. warnStyleValueWithSemicolon(name, value);
  10849. }
  10850. if (typeof value === 'number') {
  10851. if (isNaN(value)) {
  10852. warnStyleValueIsNaN(name, value);
  10853. } else if (!isFinite(value)) {
  10854. warnStyleValueIsInfinity(name, value);
  10855. }
  10856. }
  10857. };
  10858. }
  10859. var warnValidStyle$1 = warnValidStyle;
  10860. /**
  10861. * Operations for dealing with CSS properties.
  10862. */
  10863. /**
  10864. * This creates a string that is expected to be equivalent to the style
  10865. * attribute generated by server-side rendering. It by-passes warnings and
  10866. * security checks so it's not safe to use this value for anything other than
  10867. * comparison. It is only used in DEV for SSR validation.
  10868. */
  10869. function createDangerousStringForStyles(styles) {
  10870. {
  10871. var serialized = '';
  10872. var delimiter = '';
  10873. for (var styleName in styles) {
  10874. if (!styles.hasOwnProperty(styleName)) {
  10875. continue;
  10876. }
  10877. var styleValue = styles[styleName];
  10878. if (styleValue != null) {
  10879. var isCustomProperty = styleName.indexOf('--') === 0;
  10880. serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
  10881. serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
  10882. delimiter = ';';
  10883. }
  10884. }
  10885. return serialized || null;
  10886. }
  10887. }
  10888. /**
  10889. * Sets the value for multiple styles on a node. If a value is specified as
  10890. * '' (empty string), the corresponding style property will be unset.
  10891. *
  10892. * @param {DOMElement} node
  10893. * @param {object} styles
  10894. */
  10895. function setValueForStyles(node, styles) {
  10896. var style = node.style;
  10897. for (var styleName in styles) {
  10898. if (!styles.hasOwnProperty(styleName)) {
  10899. continue;
  10900. }
  10901. var isCustomProperty = styleName.indexOf('--') === 0;
  10902. {
  10903. if (!isCustomProperty) {
  10904. warnValidStyle$1(styleName, styles[styleName]);
  10905. }
  10906. }
  10907. var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
  10908. if (styleName === 'float') {
  10909. styleName = 'cssFloat';
  10910. }
  10911. if (isCustomProperty) {
  10912. style.setProperty(styleName, styleValue);
  10913. } else {
  10914. style[styleName] = styleValue;
  10915. }
  10916. }
  10917. }
  10918. function isValueEmpty(value) {
  10919. return value == null || typeof value === 'boolean' || value === '';
  10920. }
  10921. /**
  10922. * Given {color: 'red', overflow: 'hidden'} returns {
  10923. * color: 'color',
  10924. * overflowX: 'overflow',
  10925. * overflowY: 'overflow',
  10926. * }. This can be read as "the overflowY property was set by the overflow
  10927. * shorthand". That is, the values are the property that each was derived from.
  10928. */
  10929. function expandShorthandMap(styles) {
  10930. var expanded = {};
  10931. for (var key in styles) {
  10932. var longhands = shorthandToLonghand[key] || [key];
  10933. for (var i = 0; i < longhands.length; i++) {
  10934. expanded[longhands[i]] = key;
  10935. }
  10936. }
  10937. return expanded;
  10938. }
  10939. /**
  10940. * When mixing shorthand and longhand property names, we warn during updates if
  10941. * we expect an incorrect result to occur. In particular, we warn for:
  10942. *
  10943. * Updating a shorthand property (longhand gets overwritten):
  10944. * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
  10945. * becomes .style.font = 'baz'
  10946. * Removing a shorthand property (longhand gets lost too):
  10947. * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
  10948. * becomes .style.font = ''
  10949. * Removing a longhand property (should revert to shorthand; doesn't):
  10950. * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
  10951. * becomes .style.fontVariant = ''
  10952. */
  10953. function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
  10954. {
  10955. if (!nextStyles) {
  10956. return;
  10957. }
  10958. var expandedUpdates = expandShorthandMap(styleUpdates);
  10959. var expandedStyles = expandShorthandMap(nextStyles);
  10960. var warnedAbout = {};
  10961. for (var key in expandedUpdates) {
  10962. var originalKey = expandedUpdates[key];
  10963. var correctOriginalKey = expandedStyles[key];
  10964. if (correctOriginalKey && originalKey !== correctOriginalKey) {
  10965. var warningKey = originalKey + ',' + correctOriginalKey;
  10966. if (warnedAbout[warningKey]) {
  10967. continue;
  10968. }
  10969. warnedAbout[warningKey] = true;
  10970. error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
  10971. }
  10972. }
  10973. }
  10974. }
  10975. // For HTML, certain tags should omit their close tag. We keep a whitelist for
  10976. // those special-case tags.
  10977. var omittedCloseTags = {
  10978. area: true,
  10979. base: true,
  10980. br: true,
  10981. col: true,
  10982. embed: true,
  10983. hr: true,
  10984. img: true,
  10985. input: true,
  10986. keygen: true,
  10987. link: true,
  10988. meta: true,
  10989. param: true,
  10990. source: true,
  10991. track: true,
  10992. wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
  10993. };
  10994. // `omittedCloseTags` except that `menuitem` should still have its closing tag.
  10995. var voidElementTags = _assign({
  10996. menuitem: true
  10997. }, omittedCloseTags);
  10998. var HTML = '__html';
  10999. var ReactDebugCurrentFrame$3 = null;
  11000. {
  11001. ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
  11002. }
  11003. function assertValidProps(tag, props) {
  11004. if (!props) {
  11005. return;
  11006. } // Note the use of `==` which checks for null or undefined.
  11007. if (voidElementTags[tag]) {
  11008. if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
  11009. {
  11010. throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
  11011. }
  11012. }
  11013. }
  11014. if (props.dangerouslySetInnerHTML != null) {
  11015. if (!(props.children == null)) {
  11016. {
  11017. throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
  11018. }
  11019. }
  11020. if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
  11021. {
  11022. throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
  11023. }
  11024. }
  11025. }
  11026. {
  11027. if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
  11028. error('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.');
  11029. }
  11030. }
  11031. if (!(props.style == null || typeof props.style === 'object')) {
  11032. {
  11033. throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
  11034. }
  11035. }
  11036. }
  11037. function isCustomComponent(tagName, props) {
  11038. if (tagName.indexOf('-') === -1) {
  11039. return typeof props.is === 'string';
  11040. }
  11041. switch (tagName) {
  11042. // These are reserved SVG and MathML elements.
  11043. // We don't mind this whitelist too much because we expect it to never grow.
  11044. // The alternative is to track the namespace in a few places which is convoluted.
  11045. // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
  11046. case 'annotation-xml':
  11047. case 'color-profile':
  11048. case 'font-face':
  11049. case 'font-face-src':
  11050. case 'font-face-uri':
  11051. case 'font-face-format':
  11052. case 'font-face-name':
  11053. case 'missing-glyph':
  11054. return false;
  11055. default:
  11056. return true;
  11057. }
  11058. }
  11059. // When adding attributes to the HTML or SVG whitelist, be sure to
  11060. // also add them to this module to ensure casing and incorrect name
  11061. // warnings.
  11062. var possibleStandardNames = {
  11063. // HTML
  11064. accept: 'accept',
  11065. acceptcharset: 'acceptCharset',
  11066. 'accept-charset': 'acceptCharset',
  11067. accesskey: 'accessKey',
  11068. action: 'action',
  11069. allowfullscreen: 'allowFullScreen',
  11070. alt: 'alt',
  11071. as: 'as',
  11072. async: 'async',
  11073. autocapitalize: 'autoCapitalize',
  11074. autocomplete: 'autoComplete',
  11075. autocorrect: 'autoCorrect',
  11076. autofocus: 'autoFocus',
  11077. autoplay: 'autoPlay',
  11078. autosave: 'autoSave',
  11079. capture: 'capture',
  11080. cellpadding: 'cellPadding',
  11081. cellspacing: 'cellSpacing',
  11082. challenge: 'challenge',
  11083. charset: 'charSet',
  11084. checked: 'checked',
  11085. children: 'children',
  11086. cite: 'cite',
  11087. class: 'className',
  11088. classid: 'classID',
  11089. classname: 'className',
  11090. cols: 'cols',
  11091. colspan: 'colSpan',
  11092. content: 'content',
  11093. contenteditable: 'contentEditable',
  11094. contextmenu: 'contextMenu',
  11095. controls: 'controls',
  11096. controlslist: 'controlsList',
  11097. coords: 'coords',
  11098. crossorigin: 'crossOrigin',
  11099. dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
  11100. data: 'data',
  11101. datetime: 'dateTime',
  11102. default: 'default',
  11103. defaultchecked: 'defaultChecked',
  11104. defaultvalue: 'defaultValue',
  11105. defer: 'defer',
  11106. dir: 'dir',
  11107. disabled: 'disabled',
  11108. disablepictureinpicture: 'disablePictureInPicture',
  11109. download: 'download',
  11110. draggable: 'draggable',
  11111. enctype: 'encType',
  11112. for: 'htmlFor',
  11113. form: 'form',
  11114. formmethod: 'formMethod',
  11115. formaction: 'formAction',
  11116. formenctype: 'formEncType',
  11117. formnovalidate: 'formNoValidate',
  11118. formtarget: 'formTarget',
  11119. frameborder: 'frameBorder',
  11120. headers: 'headers',
  11121. height: 'height',
  11122. hidden: 'hidden',
  11123. high: 'high',
  11124. href: 'href',
  11125. hreflang: 'hrefLang',
  11126. htmlfor: 'htmlFor',
  11127. httpequiv: 'httpEquiv',
  11128. 'http-equiv': 'httpEquiv',
  11129. icon: 'icon',
  11130. id: 'id',
  11131. innerhtml: 'innerHTML',
  11132. inputmode: 'inputMode',
  11133. integrity: 'integrity',
  11134. is: 'is',
  11135. itemid: 'itemID',
  11136. itemprop: 'itemProp',
  11137. itemref: 'itemRef',
  11138. itemscope: 'itemScope',
  11139. itemtype: 'itemType',
  11140. keyparams: 'keyParams',
  11141. keytype: 'keyType',
  11142. kind: 'kind',
  11143. label: 'label',
  11144. lang: 'lang',
  11145. list: 'list',
  11146. loop: 'loop',
  11147. low: 'low',
  11148. manifest: 'manifest',
  11149. marginwidth: 'marginWidth',
  11150. marginheight: 'marginHeight',
  11151. max: 'max',
  11152. maxlength: 'maxLength',
  11153. media: 'media',
  11154. mediagroup: 'mediaGroup',
  11155. method: 'method',
  11156. min: 'min',
  11157. minlength: 'minLength',
  11158. multiple: 'multiple',
  11159. muted: 'muted',
  11160. name: 'name',
  11161. nomodule: 'noModule',
  11162. nonce: 'nonce',
  11163. novalidate: 'noValidate',
  11164. open: 'open',
  11165. optimum: 'optimum',
  11166. pattern: 'pattern',
  11167. placeholder: 'placeholder',
  11168. playsinline: 'playsInline',
  11169. poster: 'poster',
  11170. preload: 'preload',
  11171. profile: 'profile',
  11172. radiogroup: 'radioGroup',
  11173. readonly: 'readOnly',
  11174. referrerpolicy: 'referrerPolicy',
  11175. rel: 'rel',
  11176. required: 'required',
  11177. reversed: 'reversed',
  11178. role: 'role',
  11179. rows: 'rows',
  11180. rowspan: 'rowSpan',
  11181. sandbox: 'sandbox',
  11182. scope: 'scope',
  11183. scoped: 'scoped',
  11184. scrolling: 'scrolling',
  11185. seamless: 'seamless',
  11186. selected: 'selected',
  11187. shape: 'shape',
  11188. size: 'size',
  11189. sizes: 'sizes',
  11190. span: 'span',
  11191. spellcheck: 'spellCheck',
  11192. src: 'src',
  11193. srcdoc: 'srcDoc',
  11194. srclang: 'srcLang',
  11195. srcset: 'srcSet',
  11196. start: 'start',
  11197. step: 'step',
  11198. style: 'style',
  11199. summary: 'summary',
  11200. tabindex: 'tabIndex',
  11201. target: 'target',
  11202. title: 'title',
  11203. type: 'type',
  11204. usemap: 'useMap',
  11205. value: 'value',
  11206. width: 'width',
  11207. wmode: 'wmode',
  11208. wrap: 'wrap',
  11209. // SVG
  11210. about: 'about',
  11211. accentheight: 'accentHeight',
  11212. 'accent-height': 'accentHeight',
  11213. accumulate: 'accumulate',
  11214. additive: 'additive',
  11215. alignmentbaseline: 'alignmentBaseline',
  11216. 'alignment-baseline': 'alignmentBaseline',
  11217. allowreorder: 'allowReorder',
  11218. alphabetic: 'alphabetic',
  11219. amplitude: 'amplitude',
  11220. arabicform: 'arabicForm',
  11221. 'arabic-form': 'arabicForm',
  11222. ascent: 'ascent',
  11223. attributename: 'attributeName',
  11224. attributetype: 'attributeType',
  11225. autoreverse: 'autoReverse',
  11226. azimuth: 'azimuth',
  11227. basefrequency: 'baseFrequency',
  11228. baselineshift: 'baselineShift',
  11229. 'baseline-shift': 'baselineShift',
  11230. baseprofile: 'baseProfile',
  11231. bbox: 'bbox',
  11232. begin: 'begin',
  11233. bias: 'bias',
  11234. by: 'by',
  11235. calcmode: 'calcMode',
  11236. capheight: 'capHeight',
  11237. 'cap-height': 'capHeight',
  11238. clip: 'clip',
  11239. clippath: 'clipPath',
  11240. 'clip-path': 'clipPath',
  11241. clippathunits: 'clipPathUnits',
  11242. cliprule: 'clipRule',
  11243. 'clip-rule': 'clipRule',
  11244. color: 'color',
  11245. colorinterpolation: 'colorInterpolation',
  11246. 'color-interpolation': 'colorInterpolation',
  11247. colorinterpolationfilters: 'colorInterpolationFilters',
  11248. 'color-interpolation-filters': 'colorInterpolationFilters',
  11249. colorprofile: 'colorProfile',
  11250. 'color-profile': 'colorProfile',
  11251. colorrendering: 'colorRendering',
  11252. 'color-rendering': 'colorRendering',
  11253. contentscripttype: 'contentScriptType',
  11254. contentstyletype: 'contentStyleType',
  11255. cursor: 'cursor',
  11256. cx: 'cx',
  11257. cy: 'cy',
  11258. d: 'd',
  11259. datatype: 'datatype',
  11260. decelerate: 'decelerate',
  11261. descent: 'descent',
  11262. diffuseconstant: 'diffuseConstant',
  11263. direction: 'direction',
  11264. display: 'display',
  11265. divisor: 'divisor',
  11266. dominantbaseline: 'dominantBaseline',
  11267. 'dominant-baseline': 'dominantBaseline',
  11268. dur: 'dur',
  11269. dx: 'dx',
  11270. dy: 'dy',
  11271. edgemode: 'edgeMode',
  11272. elevation: 'elevation',
  11273. enablebackground: 'enableBackground',
  11274. 'enable-background': 'enableBackground',
  11275. end: 'end',
  11276. exponent: 'exponent',
  11277. externalresourcesrequired: 'externalResourcesRequired',
  11278. fill: 'fill',
  11279. fillopacity: 'fillOpacity',
  11280. 'fill-opacity': 'fillOpacity',
  11281. fillrule: 'fillRule',
  11282. 'fill-rule': 'fillRule',
  11283. filter: 'filter',
  11284. filterres: 'filterRes',
  11285. filterunits: 'filterUnits',
  11286. floodopacity: 'floodOpacity',
  11287. 'flood-opacity': 'floodOpacity',
  11288. floodcolor: 'floodColor',
  11289. 'flood-color': 'floodColor',
  11290. focusable: 'focusable',
  11291. fontfamily: 'fontFamily',
  11292. 'font-family': 'fontFamily',
  11293. fontsize: 'fontSize',
  11294. 'font-size': 'fontSize',
  11295. fontsizeadjust: 'fontSizeAdjust',
  11296. 'font-size-adjust': 'fontSizeAdjust',
  11297. fontstretch: 'fontStretch',
  11298. 'font-stretch': 'fontStretch',
  11299. fontstyle: 'fontStyle',
  11300. 'font-style': 'fontStyle',
  11301. fontvariant: 'fontVariant',
  11302. 'font-variant': 'fontVariant',
  11303. fontweight: 'fontWeight',
  11304. 'font-weight': 'fontWeight',
  11305. format: 'format',
  11306. from: 'from',
  11307. fx: 'fx',
  11308. fy: 'fy',
  11309. g1: 'g1',
  11310. g2: 'g2',
  11311. glyphname: 'glyphName',
  11312. 'glyph-name': 'glyphName',
  11313. glyphorientationhorizontal: 'glyphOrientationHorizontal',
  11314. 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
  11315. glyphorientationvertical: 'glyphOrientationVertical',
  11316. 'glyph-orientation-vertical': 'glyphOrientationVertical',
  11317. glyphref: 'glyphRef',
  11318. gradienttransform: 'gradientTransform',
  11319. gradientunits: 'gradientUnits',
  11320. hanging: 'hanging',
  11321. horizadvx: 'horizAdvX',
  11322. 'horiz-adv-x': 'horizAdvX',
  11323. horizoriginx: 'horizOriginX',
  11324. 'horiz-origin-x': 'horizOriginX',
  11325. ideographic: 'ideographic',
  11326. imagerendering: 'imageRendering',
  11327. 'image-rendering': 'imageRendering',
  11328. in2: 'in2',
  11329. in: 'in',
  11330. inlist: 'inlist',
  11331. intercept: 'intercept',
  11332. k1: 'k1',
  11333. k2: 'k2',
  11334. k3: 'k3',
  11335. k4: 'k4',
  11336. k: 'k',
  11337. kernelmatrix: 'kernelMatrix',
  11338. kernelunitlength: 'kernelUnitLength',
  11339. kerning: 'kerning',
  11340. keypoints: 'keyPoints',
  11341. keysplines: 'keySplines',
  11342. keytimes: 'keyTimes',
  11343. lengthadjust: 'lengthAdjust',
  11344. letterspacing: 'letterSpacing',
  11345. 'letter-spacing': 'letterSpacing',
  11346. lightingcolor: 'lightingColor',
  11347. 'lighting-color': 'lightingColor',
  11348. limitingconeangle: 'limitingConeAngle',
  11349. local: 'local',
  11350. markerend: 'markerEnd',
  11351. 'marker-end': 'markerEnd',
  11352. markerheight: 'markerHeight',
  11353. markermid: 'markerMid',
  11354. 'marker-mid': 'markerMid',
  11355. markerstart: 'markerStart',
  11356. 'marker-start': 'markerStart',
  11357. markerunits: 'markerUnits',
  11358. markerwidth: 'markerWidth',
  11359. mask: 'mask',
  11360. maskcontentunits: 'maskContentUnits',
  11361. maskunits: 'maskUnits',
  11362. mathematical: 'mathematical',
  11363. mode: 'mode',
  11364. numoctaves: 'numOctaves',
  11365. offset: 'offset',
  11366. opacity: 'opacity',
  11367. operator: 'operator',
  11368. order: 'order',
  11369. orient: 'orient',
  11370. orientation: 'orientation',
  11371. origin: 'origin',
  11372. overflow: 'overflow',
  11373. overlineposition: 'overlinePosition',
  11374. 'overline-position': 'overlinePosition',
  11375. overlinethickness: 'overlineThickness',
  11376. 'overline-thickness': 'overlineThickness',
  11377. paintorder: 'paintOrder',
  11378. 'paint-order': 'paintOrder',
  11379. panose1: 'panose1',
  11380. 'panose-1': 'panose1',
  11381. pathlength: 'pathLength',
  11382. patterncontentunits: 'patternContentUnits',
  11383. patterntransform: 'patternTransform',
  11384. patternunits: 'patternUnits',
  11385. pointerevents: 'pointerEvents',
  11386. 'pointer-events': 'pointerEvents',
  11387. points: 'points',
  11388. pointsatx: 'pointsAtX',
  11389. pointsaty: 'pointsAtY',
  11390. pointsatz: 'pointsAtZ',
  11391. prefix: 'prefix',
  11392. preservealpha: 'preserveAlpha',
  11393. preserveaspectratio: 'preserveAspectRatio',
  11394. primitiveunits: 'primitiveUnits',
  11395. property: 'property',
  11396. r: 'r',
  11397. radius: 'radius',
  11398. refx: 'refX',
  11399. refy: 'refY',
  11400. renderingintent: 'renderingIntent',
  11401. 'rendering-intent': 'renderingIntent',
  11402. repeatcount: 'repeatCount',
  11403. repeatdur: 'repeatDur',
  11404. requiredextensions: 'requiredExtensions',
  11405. requiredfeatures: 'requiredFeatures',
  11406. resource: 'resource',
  11407. restart: 'restart',
  11408. result: 'result',
  11409. results: 'results',
  11410. rotate: 'rotate',
  11411. rx: 'rx',
  11412. ry: 'ry',
  11413. scale: 'scale',
  11414. security: 'security',
  11415. seed: 'seed',
  11416. shaperendering: 'shapeRendering',
  11417. 'shape-rendering': 'shapeRendering',
  11418. slope: 'slope',
  11419. spacing: 'spacing',
  11420. specularconstant: 'specularConstant',
  11421. specularexponent: 'specularExponent',
  11422. speed: 'speed',
  11423. spreadmethod: 'spreadMethod',
  11424. startoffset: 'startOffset',
  11425. stddeviation: 'stdDeviation',
  11426. stemh: 'stemh',
  11427. stemv: 'stemv',
  11428. stitchtiles: 'stitchTiles',
  11429. stopcolor: 'stopColor',
  11430. 'stop-color': 'stopColor',
  11431. stopopacity: 'stopOpacity',
  11432. 'stop-opacity': 'stopOpacity',
  11433. strikethroughposition: 'strikethroughPosition',
  11434. 'strikethrough-position': 'strikethroughPosition',
  11435. strikethroughthickness: 'strikethroughThickness',
  11436. 'strikethrough-thickness': 'strikethroughThickness',
  11437. string: 'string',
  11438. stroke: 'stroke',
  11439. strokedasharray: 'strokeDasharray',
  11440. 'stroke-dasharray': 'strokeDasharray',
  11441. strokedashoffset: 'strokeDashoffset',
  11442. 'stroke-dashoffset': 'strokeDashoffset',
  11443. strokelinecap: 'strokeLinecap',
  11444. 'stroke-linecap': 'strokeLinecap',
  11445. strokelinejoin: 'strokeLinejoin',
  11446. 'stroke-linejoin': 'strokeLinejoin',
  11447. strokemiterlimit: 'strokeMiterlimit',
  11448. 'stroke-miterlimit': 'strokeMiterlimit',
  11449. strokewidth: 'strokeWidth',
  11450. 'stroke-width': 'strokeWidth',
  11451. strokeopacity: 'strokeOpacity',
  11452. 'stroke-opacity': 'strokeOpacity',
  11453. suppresscontenteditablewarning: 'suppressContentEditableWarning',
  11454. suppresshydrationwarning: 'suppressHydrationWarning',
  11455. surfacescale: 'surfaceScale',
  11456. systemlanguage: 'systemLanguage',
  11457. tablevalues: 'tableValues',
  11458. targetx: 'targetX',
  11459. targety: 'targetY',
  11460. textanchor: 'textAnchor',
  11461. 'text-anchor': 'textAnchor',
  11462. textdecoration: 'textDecoration',
  11463. 'text-decoration': 'textDecoration',
  11464. textlength: 'textLength',
  11465. textrendering: 'textRendering',
  11466. 'text-rendering': 'textRendering',
  11467. to: 'to',
  11468. transform: 'transform',
  11469. typeof: 'typeof',
  11470. u1: 'u1',
  11471. u2: 'u2',
  11472. underlineposition: 'underlinePosition',
  11473. 'underline-position': 'underlinePosition',
  11474. underlinethickness: 'underlineThickness',
  11475. 'underline-thickness': 'underlineThickness',
  11476. unicode: 'unicode',
  11477. unicodebidi: 'unicodeBidi',
  11478. 'unicode-bidi': 'unicodeBidi',
  11479. unicoderange: 'unicodeRange',
  11480. 'unicode-range': 'unicodeRange',
  11481. unitsperem: 'unitsPerEm',
  11482. 'units-per-em': 'unitsPerEm',
  11483. unselectable: 'unselectable',
  11484. valphabetic: 'vAlphabetic',
  11485. 'v-alphabetic': 'vAlphabetic',
  11486. values: 'values',
  11487. vectoreffect: 'vectorEffect',
  11488. 'vector-effect': 'vectorEffect',
  11489. version: 'version',
  11490. vertadvy: 'vertAdvY',
  11491. 'vert-adv-y': 'vertAdvY',
  11492. vertoriginx: 'vertOriginX',
  11493. 'vert-origin-x': 'vertOriginX',
  11494. vertoriginy: 'vertOriginY',
  11495. 'vert-origin-y': 'vertOriginY',
  11496. vhanging: 'vHanging',
  11497. 'v-hanging': 'vHanging',
  11498. videographic: 'vIdeographic',
  11499. 'v-ideographic': 'vIdeographic',
  11500. viewbox: 'viewBox',
  11501. viewtarget: 'viewTarget',
  11502. visibility: 'visibility',
  11503. vmathematical: 'vMathematical',
  11504. 'v-mathematical': 'vMathematical',
  11505. vocab: 'vocab',
  11506. widths: 'widths',
  11507. wordspacing: 'wordSpacing',
  11508. 'word-spacing': 'wordSpacing',
  11509. writingmode: 'writingMode',
  11510. 'writing-mode': 'writingMode',
  11511. x1: 'x1',
  11512. x2: 'x2',
  11513. x: 'x',
  11514. xchannelselector: 'xChannelSelector',
  11515. xheight: 'xHeight',
  11516. 'x-height': 'xHeight',
  11517. xlinkactuate: 'xlinkActuate',
  11518. 'xlink:actuate': 'xlinkActuate',
  11519. xlinkarcrole: 'xlinkArcrole',
  11520. 'xlink:arcrole': 'xlinkArcrole',
  11521. xlinkhref: 'xlinkHref',
  11522. 'xlink:href': 'xlinkHref',
  11523. xlinkrole: 'xlinkRole',
  11524. 'xlink:role': 'xlinkRole',
  11525. xlinkshow: 'xlinkShow',
  11526. 'xlink:show': 'xlinkShow',
  11527. xlinktitle: 'xlinkTitle',
  11528. 'xlink:title': 'xlinkTitle',
  11529. xlinktype: 'xlinkType',
  11530. 'xlink:type': 'xlinkType',
  11531. xmlbase: 'xmlBase',
  11532. 'xml:base': 'xmlBase',
  11533. xmllang: 'xmlLang',
  11534. 'xml:lang': 'xmlLang',
  11535. xmlns: 'xmlns',
  11536. 'xml:space': 'xmlSpace',
  11537. xmlnsxlink: 'xmlnsXlink',
  11538. 'xmlns:xlink': 'xmlnsXlink',
  11539. xmlspace: 'xmlSpace',
  11540. y1: 'y1',
  11541. y2: 'y2',
  11542. y: 'y',
  11543. ychannelselector: 'yChannelSelector',
  11544. z: 'z',
  11545. zoomandpan: 'zoomAndPan'
  11546. };
  11547. var ariaProperties = {
  11548. 'aria-current': 0,
  11549. // state
  11550. 'aria-details': 0,
  11551. 'aria-disabled': 0,
  11552. // state
  11553. 'aria-hidden': 0,
  11554. // state
  11555. 'aria-invalid': 0,
  11556. // state
  11557. 'aria-keyshortcuts': 0,
  11558. 'aria-label': 0,
  11559. 'aria-roledescription': 0,
  11560. // Widget Attributes
  11561. 'aria-autocomplete': 0,
  11562. 'aria-checked': 0,
  11563. 'aria-expanded': 0,
  11564. 'aria-haspopup': 0,
  11565. 'aria-level': 0,
  11566. 'aria-modal': 0,
  11567. 'aria-multiline': 0,
  11568. 'aria-multiselectable': 0,
  11569. 'aria-orientation': 0,
  11570. 'aria-placeholder': 0,
  11571. 'aria-pressed': 0,
  11572. 'aria-readonly': 0,
  11573. 'aria-required': 0,
  11574. 'aria-selected': 0,
  11575. 'aria-sort': 0,
  11576. 'aria-valuemax': 0,
  11577. 'aria-valuemin': 0,
  11578. 'aria-valuenow': 0,
  11579. 'aria-valuetext': 0,
  11580. // Live Region Attributes
  11581. 'aria-atomic': 0,
  11582. 'aria-busy': 0,
  11583. 'aria-live': 0,
  11584. 'aria-relevant': 0,
  11585. // Drag-and-Drop Attributes
  11586. 'aria-dropeffect': 0,
  11587. 'aria-grabbed': 0,
  11588. // Relationship Attributes
  11589. 'aria-activedescendant': 0,
  11590. 'aria-colcount': 0,
  11591. 'aria-colindex': 0,
  11592. 'aria-colspan': 0,
  11593. 'aria-controls': 0,
  11594. 'aria-describedby': 0,
  11595. 'aria-errormessage': 0,
  11596. 'aria-flowto': 0,
  11597. 'aria-labelledby': 0,
  11598. 'aria-owns': 0,
  11599. 'aria-posinset': 0,
  11600. 'aria-rowcount': 0,
  11601. 'aria-rowindex': 0,
  11602. 'aria-rowspan': 0,
  11603. 'aria-setsize': 0
  11604. };
  11605. var warnedProperties = {};
  11606. var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
  11607. var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
  11608. var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  11609. function validateProperty(tagName, name) {
  11610. {
  11611. if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
  11612. return true;
  11613. }
  11614. if (rARIACamel.test(name)) {
  11615. var ariaName = 'aria-' + name.slice(4).toLowerCase();
  11616. var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
  11617. // DOM properties, then it is an invalid aria-* attribute.
  11618. if (correctName == null) {
  11619. error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
  11620. warnedProperties[name] = true;
  11621. return true;
  11622. } // aria-* attributes should be lowercase; suggest the lowercase version.
  11623. if (name !== correctName) {
  11624. error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
  11625. warnedProperties[name] = true;
  11626. return true;
  11627. }
  11628. }
  11629. if (rARIA.test(name)) {
  11630. var lowerCasedName = name.toLowerCase();
  11631. var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
  11632. // DOM properties, then it is an invalid aria-* attribute.
  11633. if (standardName == null) {
  11634. warnedProperties[name] = true;
  11635. return false;
  11636. } // aria-* attributes should be lowercase; suggest the lowercase version.
  11637. if (name !== standardName) {
  11638. error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
  11639. warnedProperties[name] = true;
  11640. return true;
  11641. }
  11642. }
  11643. }
  11644. return true;
  11645. }
  11646. function warnInvalidARIAProps(type, props) {
  11647. {
  11648. var invalidProps = [];
  11649. for (var key in props) {
  11650. var isValid = validateProperty(type, key);
  11651. if (!isValid) {
  11652. invalidProps.push(key);
  11653. }
  11654. }
  11655. var unknownPropString = invalidProps.map(function (prop) {
  11656. return '`' + prop + '`';
  11657. }).join(', ');
  11658. if (invalidProps.length === 1) {
  11659. error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
  11660. } else if (invalidProps.length > 1) {
  11661. error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
  11662. }
  11663. }
  11664. }
  11665. function validateProperties(type, props) {
  11666. if (isCustomComponent(type, props)) {
  11667. return;
  11668. }
  11669. warnInvalidARIAProps(type, props);
  11670. }
  11671. var didWarnValueNull = false;
  11672. function validateProperties$1(type, props) {
  11673. {
  11674. if (type !== 'input' && type !== 'textarea' && type !== 'select') {
  11675. return;
  11676. }
  11677. if (props != null && props.value === null && !didWarnValueNull) {
  11678. didWarnValueNull = true;
  11679. if (type === 'select' && props.multiple) {
  11680. error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
  11681. } else {
  11682. error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
  11683. }
  11684. }
  11685. }
  11686. }
  11687. var validateProperty$1 = function () {};
  11688. {
  11689. var warnedProperties$1 = {};
  11690. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  11691. var EVENT_NAME_REGEX = /^on./;
  11692. var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
  11693. var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
  11694. var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
  11695. validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
  11696. if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
  11697. return true;
  11698. }
  11699. var lowerCasedName = name.toLowerCase();
  11700. if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
  11701. error('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.');
  11702. warnedProperties$1[name] = true;
  11703. return true;
  11704. } // We can't rely on the event system being injected on the server.
  11705. if (canUseEventSystem) {
  11706. if (registrationNameModules.hasOwnProperty(name)) {
  11707. return true;
  11708. }
  11709. var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
  11710. if (registrationName != null) {
  11711. error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
  11712. warnedProperties$1[name] = true;
  11713. return true;
  11714. }
  11715. if (EVENT_NAME_REGEX.test(name)) {
  11716. error('Unknown event handler property `%s`. It will be ignored.', name);
  11717. warnedProperties$1[name] = true;
  11718. return true;
  11719. }
  11720. } else if (EVENT_NAME_REGEX.test(name)) {
  11721. // If no event plugins have been injected, we are in a server environment.
  11722. // So we can't tell if the event name is correct for sure, but we can filter
  11723. // out known bad ones like `onclick`. We can't suggest a specific replacement though.
  11724. if (INVALID_EVENT_NAME_REGEX.test(name)) {
  11725. error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
  11726. }
  11727. warnedProperties$1[name] = true;
  11728. return true;
  11729. } // Let the ARIA attribute hook validate ARIA attributes
  11730. if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
  11731. return true;
  11732. }
  11733. if (lowerCasedName === 'innerhtml') {
  11734. error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
  11735. warnedProperties$1[name] = true;
  11736. return true;
  11737. }
  11738. if (lowerCasedName === 'aria') {
  11739. error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
  11740. warnedProperties$1[name] = true;
  11741. return true;
  11742. }
  11743. if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
  11744. error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
  11745. warnedProperties$1[name] = true;
  11746. return true;
  11747. }
  11748. if (typeof value === 'number' && isNaN(value)) {
  11749. error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
  11750. warnedProperties$1[name] = true;
  11751. return true;
  11752. }
  11753. var propertyInfo = getPropertyInfo(name);
  11754. var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
  11755. if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
  11756. var standardName = possibleStandardNames[lowerCasedName];
  11757. if (standardName !== name) {
  11758. error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
  11759. warnedProperties$1[name] = true;
  11760. return true;
  11761. }
  11762. } else if (!isReserved && name !== lowerCasedName) {
  11763. // Unknown attributes should have lowercase casing since that's how they
  11764. // will be cased anyway with server rendering.
  11765. error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
  11766. warnedProperties$1[name] = true;
  11767. return true;
  11768. }
  11769. if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
  11770. if (value) {
  11771. error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
  11772. } else {
  11773. error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
  11774. }
  11775. warnedProperties$1[name] = true;
  11776. return true;
  11777. } // Now that we've validated casing, do not validate
  11778. // data types for reserved props
  11779. if (isReserved) {
  11780. return true;
  11781. } // Warn when a known attribute is a bad type
  11782. if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
  11783. warnedProperties$1[name] = true;
  11784. return false;
  11785. } // Warn when passing the strings 'false' or 'true' into a boolean prop
  11786. if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
  11787. error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
  11788. warnedProperties$1[name] = true;
  11789. return true;
  11790. }
  11791. return true;
  11792. };
  11793. }
  11794. var warnUnknownProperties = function (type, props, canUseEventSystem) {
  11795. {
  11796. var unknownProps = [];
  11797. for (var key in props) {
  11798. var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
  11799. if (!isValid) {
  11800. unknownProps.push(key);
  11801. }
  11802. }
  11803. var unknownPropString = unknownProps.map(function (prop) {
  11804. return '`' + prop + '`';
  11805. }).join(', ');
  11806. if (unknownProps.length === 1) {
  11807. error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
  11808. } else if (unknownProps.length > 1) {
  11809. error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
  11810. }
  11811. }
  11812. };
  11813. function validateProperties$2(type, props, canUseEventSystem) {
  11814. if (isCustomComponent(type, props)) {
  11815. return;
  11816. }
  11817. warnUnknownProperties(type, props, canUseEventSystem);
  11818. }
  11819. var didWarnInvalidHydration = false;
  11820. var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
  11821. var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
  11822. var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
  11823. var AUTOFOCUS = 'autoFocus';
  11824. var CHILDREN = 'children';
  11825. var STYLE = 'style';
  11826. var HTML$1 = '__html';
  11827. var HTML_NAMESPACE$1 = Namespaces.html;
  11828. var warnedUnknownTags;
  11829. var suppressHydrationWarning;
  11830. var validatePropertiesInDevelopment;
  11831. var warnForTextDifference;
  11832. var warnForPropDifference;
  11833. var warnForExtraAttributes;
  11834. var warnForInvalidEventListener;
  11835. var canDiffStyleForHydrationWarning;
  11836. var normalizeMarkupForTextOrAttribute;
  11837. var normalizeHTML;
  11838. {
  11839. warnedUnknownTags = {
  11840. // Chrome is the only major browser not shipping <time>. But as of July
  11841. // 2017 it intends to ship it due to widespread usage. We intentionally
  11842. // *don't* warn for <time> even if it's unrecognized by Chrome because
  11843. // it soon will be, and many apps have been using it anyway.
  11844. time: true,
  11845. // There are working polyfills for <dialog>. Let people use it.
  11846. dialog: true,
  11847. // Electron ships a custom <webview> tag to display external web content in
  11848. // an isolated frame and process.
  11849. // This tag is not present in non Electron environments such as JSDom which
  11850. // is often used for testing purposes.
  11851. // @see https://electronjs.org/docs/api/webview-tag
  11852. webview: true
  11853. };
  11854. validatePropertiesInDevelopment = function (type, props) {
  11855. validateProperties(type, props);
  11856. validateProperties$1(type, props);
  11857. validateProperties$2(type, props,
  11858. /* canUseEventSystem */
  11859. true);
  11860. }; // IE 11 parses & normalizes the style attribute as opposed to other
  11861. // browsers. It adds spaces and sorts the properties in some
  11862. // non-alphabetical order. Handling that would require sorting CSS
  11863. // properties in the client & server versions or applying
  11864. // `expectedStyle` to a temporary DOM node to read its `style` attribute
  11865. // normalized. Since it only affects IE, we're skipping style warnings
  11866. // in that browser completely in favor of doing all that work.
  11867. // See https://github.com/facebook/react/issues/11807
  11868. canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.
  11869. // It also can turn \u0000 into \uFFFD inside attributes.
  11870. // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
  11871. // If we have a mismatch, it might be caused by that.
  11872. // We will still patch up in this case but not fire the warning.
  11873. var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
  11874. var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
  11875. normalizeMarkupForTextOrAttribute = function (markup) {
  11876. var markupString = typeof markup === 'string' ? markup : '' + markup;
  11877. return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
  11878. };
  11879. warnForTextDifference = function (serverText, clientText) {
  11880. if (didWarnInvalidHydration) {
  11881. return;
  11882. }
  11883. var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
  11884. var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
  11885. if (normalizedServerText === normalizedClientText) {
  11886. return;
  11887. }
  11888. didWarnInvalidHydration = true;
  11889. error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
  11890. };
  11891. warnForPropDifference = function (propName, serverValue, clientValue) {
  11892. if (didWarnInvalidHydration) {
  11893. return;
  11894. }
  11895. var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
  11896. var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
  11897. if (normalizedServerValue === normalizedClientValue) {
  11898. return;
  11899. }
  11900. didWarnInvalidHydration = true;
  11901. error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
  11902. };
  11903. warnForExtraAttributes = function (attributeNames) {
  11904. if (didWarnInvalidHydration) {
  11905. return;
  11906. }
  11907. didWarnInvalidHydration = true;
  11908. var names = [];
  11909. attributeNames.forEach(function (name) {
  11910. names.push(name);
  11911. });
  11912. error('Extra attributes from the server: %s', names);
  11913. };
  11914. warnForInvalidEventListener = function (registrationName, listener) {
  11915. if (listener === false) {
  11916. error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
  11917. } else {
  11918. error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
  11919. }
  11920. }; // Parse the HTML and read it back to normalize the HTML string so that it
  11921. // can be used for comparison.
  11922. normalizeHTML = function (parent, html) {
  11923. // We could have created a separate document here to avoid
  11924. // re-initializing custom elements if they exist. But this breaks
  11925. // how <noscript> is being handled. So we use the same document.
  11926. // See the discussion in https://github.com/facebook/react/pull/11157.
  11927. var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
  11928. testElement.innerHTML = html;
  11929. return testElement.innerHTML;
  11930. };
  11931. }
  11932. function ensureListeningTo(rootContainerElement, registrationName) {
  11933. var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
  11934. var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
  11935. legacyListenToEvent(registrationName, doc);
  11936. }
  11937. function getOwnerDocumentFromRootContainer(rootContainerElement) {
  11938. return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
  11939. }
  11940. function noop() {}
  11941. function trapClickOnNonInteractiveElement(node) {
  11942. // Mobile Safari does not fire properly bubble click events on
  11943. // non-interactive elements, which means delegated click listeners do not
  11944. // fire. The workaround for this bug involves attaching an empty click
  11945. // listener on the target node.
  11946. // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
  11947. // Just set it using the onclick property so that we don't have to manage any
  11948. // bookkeeping for it. Not sure if we need to clear it when the listener is
  11949. // removed.
  11950. // TODO: Only do this for the relevant Safaris maybe?
  11951. node.onclick = noop;
  11952. }
  11953. function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
  11954. for (var propKey in nextProps) {
  11955. if (!nextProps.hasOwnProperty(propKey)) {
  11956. continue;
  11957. }
  11958. var nextProp = nextProps[propKey];
  11959. if (propKey === STYLE) {
  11960. {
  11961. if (nextProp) {
  11962. // Freeze the next style object so that we can assume it won't be
  11963. // mutated. We have already warned for this in the past.
  11964. Object.freeze(nextProp);
  11965. }
  11966. } // Relies on `updateStylesByID` not mutating `styleUpdates`.
  11967. setValueForStyles(domElement, nextProp);
  11968. } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
  11969. var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
  11970. if (nextHtml != null) {
  11971. setInnerHTML(domElement, nextHtml);
  11972. }
  11973. } else if (propKey === CHILDREN) {
  11974. if (typeof nextProp === 'string') {
  11975. // Avoid setting initial textContent when the text is empty. In IE11 setting
  11976. // textContent on a <textarea> will cause the placeholder to not
  11977. // show within the <textarea> until it has been focused and blurred again.
  11978. // https://github.com/facebook/react/issues/6731#issuecomment-254874553
  11979. var canSetTextContent = tag !== 'textarea' || nextProp !== '';
  11980. if (canSetTextContent) {
  11981. setTextContent(domElement, nextProp);
  11982. }
  11983. } else if (typeof nextProp === 'number') {
  11984. setTextContent(domElement, '' + nextProp);
  11985. }
  11986. } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
  11987. if (nextProp != null) {
  11988. if ( typeof nextProp !== 'function') {
  11989. warnForInvalidEventListener(propKey, nextProp);
  11990. }
  11991. ensureListeningTo(rootContainerElement, propKey);
  11992. }
  11993. } else if (nextProp != null) {
  11994. setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
  11995. }
  11996. }
  11997. }
  11998. function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
  11999. // TODO: Handle wasCustomComponentTag
  12000. for (var i = 0; i < updatePayload.length; i += 2) {
  12001. var propKey = updatePayload[i];
  12002. var propValue = updatePayload[i + 1];
  12003. if (propKey === STYLE) {
  12004. setValueForStyles(domElement, propValue);
  12005. } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
  12006. setInnerHTML(domElement, propValue);
  12007. } else if (propKey === CHILDREN) {
  12008. setTextContent(domElement, propValue);
  12009. } else {
  12010. setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
  12011. }
  12012. }
  12013. }
  12014. function createElement(type, props, rootContainerElement, parentNamespace) {
  12015. var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
  12016. // tags get no namespace.
  12017. var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
  12018. var domElement;
  12019. var namespaceURI = parentNamespace;
  12020. if (namespaceURI === HTML_NAMESPACE$1) {
  12021. namespaceURI = getIntrinsicNamespace(type);
  12022. }
  12023. if (namespaceURI === HTML_NAMESPACE$1) {
  12024. {
  12025. isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
  12026. // allow <SVG> or <mATH>.
  12027. if (!isCustomComponentTag && type !== type.toLowerCase()) {
  12028. error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
  12029. }
  12030. }
  12031. if (type === 'script') {
  12032. // Create the script via .innerHTML so its "parser-inserted" flag is
  12033. // set to true and it does not execute
  12034. var div = ownerDocument.createElement('div');
  12035. div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
  12036. // This is guaranteed to yield a script element.
  12037. var firstChild = div.firstChild;
  12038. domElement = div.removeChild(firstChild);
  12039. } else if (typeof props.is === 'string') {
  12040. // $FlowIssue `createElement` should be updated for Web Components
  12041. domElement = ownerDocument.createElement(type, {
  12042. is: props.is
  12043. });
  12044. } else {
  12045. // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
  12046. // See discussion in https://github.com/facebook/react/pull/6896
  12047. // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
  12048. domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
  12049. // attributes on `select`s needs to be added before `option`s are inserted.
  12050. // This prevents:
  12051. // - a bug where the `select` does not scroll to the correct option because singular
  12052. // `select` elements automatically pick the first item #13222
  12053. // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
  12054. // See https://github.com/facebook/react/issues/13222
  12055. // and https://github.com/facebook/react/issues/14239
  12056. if (type === 'select') {
  12057. var node = domElement;
  12058. if (props.multiple) {
  12059. node.multiple = true;
  12060. } else if (props.size) {
  12061. // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
  12062. // it is possible that no option is selected.
  12063. //
  12064. // This is only necessary when a select in "single selection mode".
  12065. node.size = props.size;
  12066. }
  12067. }
  12068. }
  12069. } else {
  12070. domElement = ownerDocument.createElementNS(namespaceURI, type);
  12071. }
  12072. {
  12073. if (namespaceURI === HTML_NAMESPACE$1) {
  12074. if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
  12075. warnedUnknownTags[type] = true;
  12076. error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
  12077. }
  12078. }
  12079. }
  12080. return domElement;
  12081. }
  12082. function createTextNode(text, rootContainerElement) {
  12083. return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
  12084. }
  12085. function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
  12086. var isCustomComponentTag = isCustomComponent(tag, rawProps);
  12087. {
  12088. validatePropertiesInDevelopment(tag, rawProps);
  12089. } // TODO: Make sure that we check isMounted before firing any of these events.
  12090. var props;
  12091. switch (tag) {
  12092. case 'iframe':
  12093. case 'object':
  12094. case 'embed':
  12095. trapBubbledEvent(TOP_LOAD, domElement);
  12096. props = rawProps;
  12097. break;
  12098. case 'video':
  12099. case 'audio':
  12100. // Create listener for each media event
  12101. for (var i = 0; i < mediaEventTypes.length; i++) {
  12102. trapBubbledEvent(mediaEventTypes[i], domElement);
  12103. }
  12104. props = rawProps;
  12105. break;
  12106. case 'source':
  12107. trapBubbledEvent(TOP_ERROR, domElement);
  12108. props = rawProps;
  12109. break;
  12110. case 'img':
  12111. case 'image':
  12112. case 'link':
  12113. trapBubbledEvent(TOP_ERROR, domElement);
  12114. trapBubbledEvent(TOP_LOAD, domElement);
  12115. props = rawProps;
  12116. break;
  12117. case 'form':
  12118. trapBubbledEvent(TOP_RESET, domElement);
  12119. trapBubbledEvent(TOP_SUBMIT, domElement);
  12120. props = rawProps;
  12121. break;
  12122. case 'details':
  12123. trapBubbledEvent(TOP_TOGGLE, domElement);
  12124. props = rawProps;
  12125. break;
  12126. case 'input':
  12127. initWrapperState(domElement, rawProps);
  12128. props = getHostProps(domElement, rawProps);
  12129. trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
  12130. // to onChange. Even if there is no listener.
  12131. ensureListeningTo(rootContainerElement, 'onChange');
  12132. break;
  12133. case 'option':
  12134. validateProps(domElement, rawProps);
  12135. props = getHostProps$1(domElement, rawProps);
  12136. break;
  12137. case 'select':
  12138. initWrapperState$1(domElement, rawProps);
  12139. props = getHostProps$2(domElement, rawProps);
  12140. trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
  12141. // to onChange. Even if there is no listener.
  12142. ensureListeningTo(rootContainerElement, 'onChange');
  12143. break;
  12144. case 'textarea':
  12145. initWrapperState$2(domElement, rawProps);
  12146. props = getHostProps$3(domElement, rawProps);
  12147. trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
  12148. // to onChange. Even if there is no listener.
  12149. ensureListeningTo(rootContainerElement, 'onChange');
  12150. break;
  12151. default:
  12152. props = rawProps;
  12153. }
  12154. assertValidProps(tag, props);
  12155. setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
  12156. switch (tag) {
  12157. case 'input':
  12158. // TODO: Make sure we check if this is still unmounted or do any clean
  12159. // up necessary since we never stop tracking anymore.
  12160. track(domElement);
  12161. postMountWrapper(domElement, rawProps, false);
  12162. break;
  12163. case 'textarea':
  12164. // TODO: Make sure we check if this is still unmounted or do any clean
  12165. // up necessary since we never stop tracking anymore.
  12166. track(domElement);
  12167. postMountWrapper$3(domElement);
  12168. break;
  12169. case 'option':
  12170. postMountWrapper$1(domElement, rawProps);
  12171. break;
  12172. case 'select':
  12173. postMountWrapper$2(domElement, rawProps);
  12174. break;
  12175. default:
  12176. if (typeof props.onClick === 'function') {
  12177. // TODO: This cast may not be sound for SVG, MathML or custom elements.
  12178. trapClickOnNonInteractiveElement(domElement);
  12179. }
  12180. break;
  12181. }
  12182. } // Calculate the diff between the two objects.
  12183. function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
  12184. {
  12185. validatePropertiesInDevelopment(tag, nextRawProps);
  12186. }
  12187. var updatePayload = null;
  12188. var lastProps;
  12189. var nextProps;
  12190. switch (tag) {
  12191. case 'input':
  12192. lastProps = getHostProps(domElement, lastRawProps);
  12193. nextProps = getHostProps(domElement, nextRawProps);
  12194. updatePayload = [];
  12195. break;
  12196. case 'option':
  12197. lastProps = getHostProps$1(domElement, lastRawProps);
  12198. nextProps = getHostProps$1(domElement, nextRawProps);
  12199. updatePayload = [];
  12200. break;
  12201. case 'select':
  12202. lastProps = getHostProps$2(domElement, lastRawProps);
  12203. nextProps = getHostProps$2(domElement, nextRawProps);
  12204. updatePayload = [];
  12205. break;
  12206. case 'textarea':
  12207. lastProps = getHostProps$3(domElement, lastRawProps);
  12208. nextProps = getHostProps$3(domElement, nextRawProps);
  12209. updatePayload = [];
  12210. break;
  12211. default:
  12212. lastProps = lastRawProps;
  12213. nextProps = nextRawProps;
  12214. if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
  12215. // TODO: This cast may not be sound for SVG, MathML or custom elements.
  12216. trapClickOnNonInteractiveElement(domElement);
  12217. }
  12218. break;
  12219. }
  12220. assertValidProps(tag, nextProps);
  12221. var propKey;
  12222. var styleName;
  12223. var styleUpdates = null;
  12224. for (propKey in lastProps) {
  12225. if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
  12226. continue;
  12227. }
  12228. if (propKey === STYLE) {
  12229. var lastStyle = lastProps[propKey];
  12230. for (styleName in lastStyle) {
  12231. if (lastStyle.hasOwnProperty(styleName)) {
  12232. if (!styleUpdates) {
  12233. styleUpdates = {};
  12234. }
  12235. styleUpdates[styleName] = '';
  12236. }
  12237. }
  12238. } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
  12239. // This is a special case. If any listener updates we need to ensure
  12240. // that the "current" fiber pointer gets updated so we need a commit
  12241. // to update this element.
  12242. if (!updatePayload) {
  12243. updatePayload = [];
  12244. }
  12245. } else {
  12246. // For all other deleted properties we add it to the queue. We use
  12247. // the whitelist in the commit phase instead.
  12248. (updatePayload = updatePayload || []).push(propKey, null);
  12249. }
  12250. }
  12251. for (propKey in nextProps) {
  12252. var nextProp = nextProps[propKey];
  12253. var lastProp = lastProps != null ? lastProps[propKey] : undefined;
  12254. if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
  12255. continue;
  12256. }
  12257. if (propKey === STYLE) {
  12258. {
  12259. if (nextProp) {
  12260. // Freeze the next style object so that we can assume it won't be
  12261. // mutated. We have already warned for this in the past.
  12262. Object.freeze(nextProp);
  12263. }
  12264. }
  12265. if (lastProp) {
  12266. // Unset styles on `lastProp` but not on `nextProp`.
  12267. for (styleName in lastProp) {
  12268. if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
  12269. if (!styleUpdates) {
  12270. styleUpdates = {};
  12271. }
  12272. styleUpdates[styleName] = '';
  12273. }
  12274. } // Update styles that changed since `lastProp`.
  12275. for (styleName in nextProp) {
  12276. if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
  12277. if (!styleUpdates) {
  12278. styleUpdates = {};
  12279. }
  12280. styleUpdates[styleName] = nextProp[styleName];
  12281. }
  12282. }
  12283. } else {
  12284. // Relies on `updateStylesByID` not mutating `styleUpdates`.
  12285. if (!styleUpdates) {
  12286. if (!updatePayload) {
  12287. updatePayload = [];
  12288. }
  12289. updatePayload.push(propKey, styleUpdates);
  12290. }
  12291. styleUpdates = nextProp;
  12292. }
  12293. } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
  12294. var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
  12295. var lastHtml = lastProp ? lastProp[HTML$1] : undefined;
  12296. if (nextHtml != null) {
  12297. if (lastHtml !== nextHtml) {
  12298. (updatePayload = updatePayload || []).push(propKey, nextHtml);
  12299. }
  12300. }
  12301. } else if (propKey === CHILDREN) {
  12302. if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
  12303. (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
  12304. }
  12305. } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
  12306. if (nextProp != null) {
  12307. // We eagerly listen to this even though we haven't committed yet.
  12308. if ( typeof nextProp !== 'function') {
  12309. warnForInvalidEventListener(propKey, nextProp);
  12310. }
  12311. ensureListeningTo(rootContainerElement, propKey);
  12312. }
  12313. if (!updatePayload && lastProp !== nextProp) {
  12314. // This is a special case. If any listener updates we need to ensure
  12315. // that the "current" props pointer gets updated so we need a commit
  12316. // to update this element.
  12317. updatePayload = [];
  12318. }
  12319. } else {
  12320. // For any other property we always add it to the queue and then we
  12321. // filter it out using the whitelist during the commit.
  12322. (updatePayload = updatePayload || []).push(propKey, nextProp);
  12323. }
  12324. }
  12325. if (styleUpdates) {
  12326. {
  12327. validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
  12328. }
  12329. (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
  12330. }
  12331. return updatePayload;
  12332. } // Apply the diff.
  12333. function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
  12334. // Update checked *before* name.
  12335. // In the middle of an update, it is possible to have multiple checked.
  12336. // When a checked radio tries to change name, browser makes another radio's checked false.
  12337. if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
  12338. updateChecked(domElement, nextRawProps);
  12339. }
  12340. var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
  12341. var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
  12342. updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
  12343. // changed.
  12344. switch (tag) {
  12345. case 'input':
  12346. // Update the wrapper around inputs *after* updating props. This has to
  12347. // happen after `updateDOMProperties`. Otherwise HTML5 input validations
  12348. // raise warnings and prevent the new value from being assigned.
  12349. updateWrapper(domElement, nextRawProps);
  12350. break;
  12351. case 'textarea':
  12352. updateWrapper$1(domElement, nextRawProps);
  12353. break;
  12354. case 'select':
  12355. // <select> value update needs to occur after <option> children
  12356. // reconciliation
  12357. postUpdateWrapper(domElement, nextRawProps);
  12358. break;
  12359. }
  12360. }
  12361. function getPossibleStandardName(propName) {
  12362. {
  12363. var lowerCasedName = propName.toLowerCase();
  12364. if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
  12365. return null;
  12366. }
  12367. return possibleStandardNames[lowerCasedName] || null;
  12368. }
  12369. }
  12370. function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
  12371. var isCustomComponentTag;
  12372. var extraAttributeNames;
  12373. {
  12374. suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
  12375. isCustomComponentTag = isCustomComponent(tag, rawProps);
  12376. validatePropertiesInDevelopment(tag, rawProps);
  12377. } // TODO: Make sure that we check isMounted before firing any of these events.
  12378. switch (tag) {
  12379. case 'iframe':
  12380. case 'object':
  12381. case 'embed':
  12382. trapBubbledEvent(TOP_LOAD, domElement);
  12383. break;
  12384. case 'video':
  12385. case 'audio':
  12386. // Create listener for each media event
  12387. for (var i = 0; i < mediaEventTypes.length; i++) {
  12388. trapBubbledEvent(mediaEventTypes[i], domElement);
  12389. }
  12390. break;
  12391. case 'source':
  12392. trapBubbledEvent(TOP_ERROR, domElement);
  12393. break;
  12394. case 'img':
  12395. case 'image':
  12396. case 'link':
  12397. trapBubbledEvent(TOP_ERROR, domElement);
  12398. trapBubbledEvent(TOP_LOAD, domElement);
  12399. break;
  12400. case 'form':
  12401. trapBubbledEvent(TOP_RESET, domElement);
  12402. trapBubbledEvent(TOP_SUBMIT, domElement);
  12403. break;
  12404. case 'details':
  12405. trapBubbledEvent(TOP_TOGGLE, domElement);
  12406. break;
  12407. case 'input':
  12408. initWrapperState(domElement, rawProps);
  12409. trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
  12410. // to onChange. Even if there is no listener.
  12411. ensureListeningTo(rootContainerElement, 'onChange');
  12412. break;
  12413. case 'option':
  12414. validateProps(domElement, rawProps);
  12415. break;
  12416. case 'select':
  12417. initWrapperState$1(domElement, rawProps);
  12418. trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
  12419. // to onChange. Even if there is no listener.
  12420. ensureListeningTo(rootContainerElement, 'onChange');
  12421. break;
  12422. case 'textarea':
  12423. initWrapperState$2(domElement, rawProps);
  12424. trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
  12425. // to onChange. Even if there is no listener.
  12426. ensureListeningTo(rootContainerElement, 'onChange');
  12427. break;
  12428. }
  12429. assertValidProps(tag, rawProps);
  12430. {
  12431. extraAttributeNames = new Set();
  12432. var attributes = domElement.attributes;
  12433. for (var _i = 0; _i < attributes.length; _i++) {
  12434. var name = attributes[_i].name.toLowerCase();
  12435. switch (name) {
  12436. // Built-in SSR attribute is whitelisted
  12437. case 'data-reactroot':
  12438. break;
  12439. // Controlled attributes are not validated
  12440. // TODO: Only ignore them on controlled tags.
  12441. case 'value':
  12442. break;
  12443. case 'checked':
  12444. break;
  12445. case 'selected':
  12446. break;
  12447. default:
  12448. // Intentionally use the original name.
  12449. // See discussion in https://github.com/facebook/react/pull/10676.
  12450. extraAttributeNames.add(attributes[_i].name);
  12451. }
  12452. }
  12453. }
  12454. var updatePayload = null;
  12455. for (var propKey in rawProps) {
  12456. if (!rawProps.hasOwnProperty(propKey)) {
  12457. continue;
  12458. }
  12459. var nextProp = rawProps[propKey];
  12460. if (propKey === CHILDREN) {
  12461. // For text content children we compare against textContent. This
  12462. // might match additional HTML that is hidden when we read it using
  12463. // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
  12464. // satisfies our requirement. Our requirement is not to produce perfect
  12465. // HTML and attributes. Ideally we should preserve structure but it's
  12466. // ok not to if the visible content is still enough to indicate what
  12467. // even listeners these nodes might be wired up to.
  12468. // TODO: Warn if there is more than a single textNode as a child.
  12469. // TODO: Should we use domElement.firstChild.nodeValue to compare?
  12470. if (typeof nextProp === 'string') {
  12471. if (domElement.textContent !== nextProp) {
  12472. if ( !suppressHydrationWarning) {
  12473. warnForTextDifference(domElement.textContent, nextProp);
  12474. }
  12475. updatePayload = [CHILDREN, nextProp];
  12476. }
  12477. } else if (typeof nextProp === 'number') {
  12478. if (domElement.textContent !== '' + nextProp) {
  12479. if ( !suppressHydrationWarning) {
  12480. warnForTextDifference(domElement.textContent, nextProp);
  12481. }
  12482. updatePayload = [CHILDREN, '' + nextProp];
  12483. }
  12484. }
  12485. } else if (registrationNameModules.hasOwnProperty(propKey)) {
  12486. if (nextProp != null) {
  12487. if ( typeof nextProp !== 'function') {
  12488. warnForInvalidEventListener(propKey, nextProp);
  12489. }
  12490. ensureListeningTo(rootContainerElement, propKey);
  12491. }
  12492. } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
  12493. typeof isCustomComponentTag === 'boolean') {
  12494. // Validate that the properties correspond to their expected values.
  12495. var serverValue = void 0;
  12496. var propertyInfo = getPropertyInfo(propKey);
  12497. if (suppressHydrationWarning) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
  12498. // TODO: Only ignore them on controlled tags.
  12499. propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
  12500. var serverHTML = domElement.innerHTML;
  12501. var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
  12502. var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
  12503. if (expectedHTML !== serverHTML) {
  12504. warnForPropDifference(propKey, serverHTML, expectedHTML);
  12505. }
  12506. } else if (propKey === STYLE) {
  12507. // $FlowFixMe - Should be inferred as not undefined.
  12508. extraAttributeNames.delete(propKey);
  12509. if (canDiffStyleForHydrationWarning) {
  12510. var expectedStyle = createDangerousStringForStyles(nextProp);
  12511. serverValue = domElement.getAttribute('style');
  12512. if (expectedStyle !== serverValue) {
  12513. warnForPropDifference(propKey, serverValue, expectedStyle);
  12514. }
  12515. }
  12516. } else if (isCustomComponentTag) {
  12517. // $FlowFixMe - Should be inferred as not undefined.
  12518. extraAttributeNames.delete(propKey.toLowerCase());
  12519. serverValue = getValueForAttribute(domElement, propKey, nextProp);
  12520. if (nextProp !== serverValue) {
  12521. warnForPropDifference(propKey, serverValue, nextProp);
  12522. }
  12523. } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
  12524. var isMismatchDueToBadCasing = false;
  12525. if (propertyInfo !== null) {
  12526. // $FlowFixMe - Should be inferred as not undefined.
  12527. extraAttributeNames.delete(propertyInfo.attributeName);
  12528. serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
  12529. } else {
  12530. var ownNamespace = parentNamespace;
  12531. if (ownNamespace === HTML_NAMESPACE$1) {
  12532. ownNamespace = getIntrinsicNamespace(tag);
  12533. }
  12534. if (ownNamespace === HTML_NAMESPACE$1) {
  12535. // $FlowFixMe - Should be inferred as not undefined.
  12536. extraAttributeNames.delete(propKey.toLowerCase());
  12537. } else {
  12538. var standardName = getPossibleStandardName(propKey);
  12539. if (standardName !== null && standardName !== propKey) {
  12540. // If an SVG prop is supplied with bad casing, it will
  12541. // be successfully parsed from HTML, but will produce a mismatch
  12542. // (and would be incorrectly rendered on the client).
  12543. // However, we already warn about bad casing elsewhere.
  12544. // So we'll skip the misleading extra mismatch warning in this case.
  12545. isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.
  12546. extraAttributeNames.delete(standardName);
  12547. } // $FlowFixMe - Should be inferred as not undefined.
  12548. extraAttributeNames.delete(propKey);
  12549. }
  12550. serverValue = getValueForAttribute(domElement, propKey, nextProp);
  12551. }
  12552. if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
  12553. warnForPropDifference(propKey, serverValue, nextProp);
  12554. }
  12555. }
  12556. }
  12557. }
  12558. {
  12559. // $FlowFixMe - Should be inferred as not undefined.
  12560. if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
  12561. // $FlowFixMe - Should be inferred as not undefined.
  12562. warnForExtraAttributes(extraAttributeNames);
  12563. }
  12564. }
  12565. switch (tag) {
  12566. case 'input':
  12567. // TODO: Make sure we check if this is still unmounted or do any clean
  12568. // up necessary since we never stop tracking anymore.
  12569. track(domElement);
  12570. postMountWrapper(domElement, rawProps, true);
  12571. break;
  12572. case 'textarea':
  12573. // TODO: Make sure we check if this is still unmounted or do any clean
  12574. // up necessary since we never stop tracking anymore.
  12575. track(domElement);
  12576. postMountWrapper$3(domElement);
  12577. break;
  12578. case 'select':
  12579. case 'option':
  12580. // For input and textarea we current always set the value property at
  12581. // post mount to force it to diverge from attributes. However, for
  12582. // option and select we don't quite do the same thing and select
  12583. // is not resilient to the DOM state changing so we don't do that here.
  12584. // TODO: Consider not doing this for input and textarea.
  12585. break;
  12586. default:
  12587. if (typeof rawProps.onClick === 'function') {
  12588. // TODO: This cast may not be sound for SVG, MathML or custom elements.
  12589. trapClickOnNonInteractiveElement(domElement);
  12590. }
  12591. break;
  12592. }
  12593. return updatePayload;
  12594. }
  12595. function diffHydratedText(textNode, text) {
  12596. var isDifferent = textNode.nodeValue !== text;
  12597. return isDifferent;
  12598. }
  12599. function warnForUnmatchedText(textNode, text) {
  12600. {
  12601. warnForTextDifference(textNode.nodeValue, text);
  12602. }
  12603. }
  12604. function warnForDeletedHydratableElement(parentNode, child) {
  12605. {
  12606. if (didWarnInvalidHydration) {
  12607. return;
  12608. }
  12609. didWarnInvalidHydration = true;
  12610. error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
  12611. }
  12612. }
  12613. function warnForDeletedHydratableText(parentNode, child) {
  12614. {
  12615. if (didWarnInvalidHydration) {
  12616. return;
  12617. }
  12618. didWarnInvalidHydration = true;
  12619. error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
  12620. }
  12621. }
  12622. function warnForInsertedHydratedElement(parentNode, tag, props) {
  12623. {
  12624. if (didWarnInvalidHydration) {
  12625. return;
  12626. }
  12627. didWarnInvalidHydration = true;
  12628. error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
  12629. }
  12630. }
  12631. function warnForInsertedHydratedText(parentNode, text) {
  12632. {
  12633. if (text === '') {
  12634. // We expect to insert empty text nodes since they're not represented in
  12635. // the HTML.
  12636. // TODO: Remove this special case if we can just avoid inserting empty
  12637. // text nodes.
  12638. return;
  12639. }
  12640. if (didWarnInvalidHydration) {
  12641. return;
  12642. }
  12643. didWarnInvalidHydration = true;
  12644. error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
  12645. }
  12646. }
  12647. function restoreControlledState$3(domElement, tag, props) {
  12648. switch (tag) {
  12649. case 'input':
  12650. restoreControlledState(domElement, props);
  12651. return;
  12652. case 'textarea':
  12653. restoreControlledState$2(domElement, props);
  12654. return;
  12655. case 'select':
  12656. restoreControlledState$1(domElement, props);
  12657. return;
  12658. }
  12659. }
  12660. function getActiveElement(doc) {
  12661. doc = doc || (typeof document !== 'undefined' ? document : undefined);
  12662. if (typeof doc === 'undefined') {
  12663. return null;
  12664. }
  12665. try {
  12666. return doc.activeElement || doc.body;
  12667. } catch (e) {
  12668. return doc.body;
  12669. }
  12670. }
  12671. /**
  12672. * Given any node return the first leaf node without children.
  12673. *
  12674. * @param {DOMElement|DOMTextNode} node
  12675. * @return {DOMElement|DOMTextNode}
  12676. */
  12677. function getLeafNode(node) {
  12678. while (node && node.firstChild) {
  12679. node = node.firstChild;
  12680. }
  12681. return node;
  12682. }
  12683. /**
  12684. * Get the next sibling within a container. This will walk up the
  12685. * DOM if a node's siblings have been exhausted.
  12686. *
  12687. * @param {DOMElement|DOMTextNode} node
  12688. * @return {?DOMElement|DOMTextNode}
  12689. */
  12690. function getSiblingNode(node) {
  12691. while (node) {
  12692. if (node.nextSibling) {
  12693. return node.nextSibling;
  12694. }
  12695. node = node.parentNode;
  12696. }
  12697. }
  12698. /**
  12699. * Get object describing the nodes which contain characters at offset.
  12700. *
  12701. * @param {DOMElement|DOMTextNode} root
  12702. * @param {number} offset
  12703. * @return {?object}
  12704. */
  12705. function getNodeForCharacterOffset(root, offset) {
  12706. var node = getLeafNode(root);
  12707. var nodeStart = 0;
  12708. var nodeEnd = 0;
  12709. while (node) {
  12710. if (node.nodeType === TEXT_NODE) {
  12711. nodeEnd = nodeStart + node.textContent.length;
  12712. if (nodeStart <= offset && nodeEnd >= offset) {
  12713. return {
  12714. node: node,
  12715. offset: offset - nodeStart
  12716. };
  12717. }
  12718. nodeStart = nodeEnd;
  12719. }
  12720. node = getLeafNode(getSiblingNode(node));
  12721. }
  12722. }
  12723. /**
  12724. * @param {DOMElement} outerNode
  12725. * @return {?object}
  12726. */
  12727. function getOffsets(outerNode) {
  12728. var ownerDocument = outerNode.ownerDocument;
  12729. var win = ownerDocument && ownerDocument.defaultView || window;
  12730. var selection = win.getSelection && win.getSelection();
  12731. if (!selection || selection.rangeCount === 0) {
  12732. return null;
  12733. }
  12734. var anchorNode = selection.anchorNode,
  12735. anchorOffset = selection.anchorOffset,
  12736. focusNode = selection.focusNode,
  12737. focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
  12738. // up/down buttons on an <input type="number">. Anonymous divs do not seem to
  12739. // expose properties, triggering a "Permission denied error" if any of its
  12740. // properties are accessed. The only seemingly possible way to avoid erroring
  12741. // is to access a property that typically works for non-anonymous divs and
  12742. // catch any error that may otherwise arise. See
  12743. // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
  12744. try {
  12745. /* eslint-disable no-unused-expressions */
  12746. anchorNode.nodeType;
  12747. focusNode.nodeType;
  12748. /* eslint-enable no-unused-expressions */
  12749. } catch (e) {
  12750. return null;
  12751. }
  12752. return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
  12753. }
  12754. /**
  12755. * Returns {start, end} where `start` is the character/codepoint index of
  12756. * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
  12757. * `end` is the index of (focusNode, focusOffset).
  12758. *
  12759. * Returns null if you pass in garbage input but we should probably just crash.
  12760. *
  12761. * Exported only for testing.
  12762. */
  12763. function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
  12764. var length = 0;
  12765. var start = -1;
  12766. var end = -1;
  12767. var indexWithinAnchor = 0;
  12768. var indexWithinFocus = 0;
  12769. var node = outerNode;
  12770. var parentNode = null;
  12771. outer: while (true) {
  12772. var next = null;
  12773. while (true) {
  12774. if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
  12775. start = length + anchorOffset;
  12776. }
  12777. if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
  12778. end = length + focusOffset;
  12779. }
  12780. if (node.nodeType === TEXT_NODE) {
  12781. length += node.nodeValue.length;
  12782. }
  12783. if ((next = node.firstChild) === null) {
  12784. break;
  12785. } // Moving from `node` to its first child `next`.
  12786. parentNode = node;
  12787. node = next;
  12788. }
  12789. while (true) {
  12790. if (node === outerNode) {
  12791. // If `outerNode` has children, this is always the second time visiting
  12792. // it. If it has no children, this is still the first loop, and the only
  12793. // valid selection is anchorNode and focusNode both equal to this node
  12794. // and both offsets 0, in which case we will have handled above.
  12795. break outer;
  12796. }
  12797. if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
  12798. start = length;
  12799. }
  12800. if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
  12801. end = length;
  12802. }
  12803. if ((next = node.nextSibling) !== null) {
  12804. break;
  12805. }
  12806. node = parentNode;
  12807. parentNode = node.parentNode;
  12808. } // Moving from `node` to its next sibling `next`.
  12809. node = next;
  12810. }
  12811. if (start === -1 || end === -1) {
  12812. // This should never happen. (Would happen if the anchor/focus nodes aren't
  12813. // actually inside the passed-in node.)
  12814. return null;
  12815. }
  12816. return {
  12817. start: start,
  12818. end: end
  12819. };
  12820. }
  12821. /**
  12822. * In modern non-IE browsers, we can support both forward and backward
  12823. * selections.
  12824. *
  12825. * Note: IE10+ supports the Selection object, but it does not support
  12826. * the `extend` method, which means that even in modern IE, it's not possible
  12827. * to programmatically create a backward selection. Thus, for all IE
  12828. * versions, we use the old IE API to create our selections.
  12829. *
  12830. * @param {DOMElement|DOMTextNode} node
  12831. * @param {object} offsets
  12832. */
  12833. function setOffsets(node, offsets) {
  12834. var doc = node.ownerDocument || document;
  12835. var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
  12836. // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
  12837. // fails when pasting 100+ items)
  12838. if (!win.getSelection) {
  12839. return;
  12840. }
  12841. var selection = win.getSelection();
  12842. var length = node.textContent.length;
  12843. var start = Math.min(offsets.start, length);
  12844. var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
  12845. // Flip backward selections, so we can set with a single range.
  12846. if (!selection.extend && start > end) {
  12847. var temp = end;
  12848. end = start;
  12849. start = temp;
  12850. }
  12851. var startMarker = getNodeForCharacterOffset(node, start);
  12852. var endMarker = getNodeForCharacterOffset(node, end);
  12853. if (startMarker && endMarker) {
  12854. if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
  12855. return;
  12856. }
  12857. var range = doc.createRange();
  12858. range.setStart(startMarker.node, startMarker.offset);
  12859. selection.removeAllRanges();
  12860. if (start > end) {
  12861. selection.addRange(range);
  12862. selection.extend(endMarker.node, endMarker.offset);
  12863. } else {
  12864. range.setEnd(endMarker.node, endMarker.offset);
  12865. selection.addRange(range);
  12866. }
  12867. }
  12868. }
  12869. function isTextNode(node) {
  12870. return node && node.nodeType === TEXT_NODE;
  12871. }
  12872. function containsNode(outerNode, innerNode) {
  12873. if (!outerNode || !innerNode) {
  12874. return false;
  12875. } else if (outerNode === innerNode) {
  12876. return true;
  12877. } else if (isTextNode(outerNode)) {
  12878. return false;
  12879. } else if (isTextNode(innerNode)) {
  12880. return containsNode(outerNode, innerNode.parentNode);
  12881. } else if ('contains' in outerNode) {
  12882. return outerNode.contains(innerNode);
  12883. } else if (outerNode.compareDocumentPosition) {
  12884. return !!(outerNode.compareDocumentPosition(innerNode) & 16);
  12885. } else {
  12886. return false;
  12887. }
  12888. }
  12889. function isInDocument(node) {
  12890. return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
  12891. }
  12892. function isSameOriginFrame(iframe) {
  12893. try {
  12894. // Accessing the contentDocument of a HTMLIframeElement can cause the browser
  12895. // to throw, e.g. if it has a cross-origin src attribute.
  12896. // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
  12897. // iframe.contentDocument.defaultView;
  12898. // A safety way is to access one of the cross origin properties: Window or Location
  12899. // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
  12900. // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
  12901. return typeof iframe.contentWindow.location.href === 'string';
  12902. } catch (err) {
  12903. return false;
  12904. }
  12905. }
  12906. function getActiveElementDeep() {
  12907. var win = window;
  12908. var element = getActiveElement();
  12909. while (element instanceof win.HTMLIFrameElement) {
  12910. if (isSameOriginFrame(element)) {
  12911. win = element.contentWindow;
  12912. } else {
  12913. return element;
  12914. }
  12915. element = getActiveElement(win.document);
  12916. }
  12917. return element;
  12918. }
  12919. /**
  12920. * @ReactInputSelection: React input selection module. Based on Selection.js,
  12921. * but modified to be suitable for react and has a couple of bug fixes (doesn't
  12922. * assume buttons have range selections allowed).
  12923. * Input selection module for React.
  12924. */
  12925. /**
  12926. * @hasSelectionCapabilities: we get the element types that support selection
  12927. * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
  12928. * and `selectionEnd` rows.
  12929. */
  12930. function hasSelectionCapabilities(elem) {
  12931. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  12932. return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
  12933. }
  12934. function getSelectionInformation() {
  12935. var focusedElem = getActiveElementDeep();
  12936. return {
  12937. // Used by Flare
  12938. activeElementDetached: null,
  12939. focusedElem: focusedElem,
  12940. selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
  12941. };
  12942. }
  12943. /**
  12944. * @restoreSelection: If any selection information was potentially lost,
  12945. * restore it. This is useful when performing operations that could remove dom
  12946. * nodes and place them back in, resulting in focus being lost.
  12947. */
  12948. function restoreSelection(priorSelectionInformation) {
  12949. var curFocusedElem = getActiveElementDeep();
  12950. var priorFocusedElem = priorSelectionInformation.focusedElem;
  12951. var priorSelectionRange = priorSelectionInformation.selectionRange;
  12952. if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
  12953. if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
  12954. setSelection(priorFocusedElem, priorSelectionRange);
  12955. } // Focusing a node can change the scroll position, which is undesirable
  12956. var ancestors = [];
  12957. var ancestor = priorFocusedElem;
  12958. while (ancestor = ancestor.parentNode) {
  12959. if (ancestor.nodeType === ELEMENT_NODE) {
  12960. ancestors.push({
  12961. element: ancestor,
  12962. left: ancestor.scrollLeft,
  12963. top: ancestor.scrollTop
  12964. });
  12965. }
  12966. }
  12967. if (typeof priorFocusedElem.focus === 'function') {
  12968. priorFocusedElem.focus();
  12969. }
  12970. for (var i = 0; i < ancestors.length; i++) {
  12971. var info = ancestors[i];
  12972. info.element.scrollLeft = info.left;
  12973. info.element.scrollTop = info.top;
  12974. }
  12975. }
  12976. }
  12977. /**
  12978. * @getSelection: Gets the selection bounds of a focused textarea, input or
  12979. * contentEditable node.
  12980. * -@input: Look up selection bounds of this input
  12981. * -@return {start: selectionStart, end: selectionEnd}
  12982. */
  12983. function getSelection(input) {
  12984. var selection;
  12985. if ('selectionStart' in input) {
  12986. // Modern browser with input or textarea.
  12987. selection = {
  12988. start: input.selectionStart,
  12989. end: input.selectionEnd
  12990. };
  12991. } else {
  12992. // Content editable or old IE textarea.
  12993. selection = getOffsets(input);
  12994. }
  12995. return selection || {
  12996. start: 0,
  12997. end: 0
  12998. };
  12999. }
  13000. /**
  13001. * @setSelection: Sets the selection bounds of a textarea or input and focuses
  13002. * the input.
  13003. * -@input Set selection bounds of this input or textarea
  13004. * -@offsets Object of same form that is returned from get*
  13005. */
  13006. function setSelection(input, offsets) {
  13007. var start = offsets.start,
  13008. end = offsets.end;
  13009. if (end === undefined) {
  13010. end = start;
  13011. }
  13012. if ('selectionStart' in input) {
  13013. input.selectionStart = start;
  13014. input.selectionEnd = Math.min(end, input.value.length);
  13015. } else {
  13016. setOffsets(input, offsets);
  13017. }
  13018. }
  13019. var validateDOMNesting = function () {};
  13020. var updatedAncestorInfo = function () {};
  13021. {
  13022. // This validation code was written based on the HTML5 parsing spec:
  13023. // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
  13024. //
  13025. // Note: this does not catch all invalid nesting, nor does it try to (as it's
  13026. // not clear what practical benefit doing so provides); instead, we warn only
  13027. // for cases where the parser will give a parse tree differing from what React
  13028. // intended. For example, <b><div></div></b> is invalid but we don't warn
  13029. // because it still parses correctly; we do warn for other cases like nested
  13030. // <p> tags where the beginning of the second element implicitly closes the
  13031. // first, causing a confusing mess.
  13032. // https://html.spec.whatwg.org/multipage/syntax.html#special
  13033. 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']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
  13034. var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
  13035. // TODO: Distinguish by namespace here -- for <title>, including it here
  13036. // errs on the side of fewer warnings
  13037. 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
  13038. var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
  13039. var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
  13040. var emptyAncestorInfo = {
  13041. current: null,
  13042. formTag: null,
  13043. aTagInScope: null,
  13044. buttonTagInScope: null,
  13045. nobrTagInScope: null,
  13046. pTagInButtonScope: null,
  13047. listItemTagAutoclosing: null,
  13048. dlItemTagAutoclosing: null
  13049. };
  13050. updatedAncestorInfo = function (oldInfo, tag) {
  13051. var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
  13052. var info = {
  13053. tag: tag
  13054. };
  13055. if (inScopeTags.indexOf(tag) !== -1) {
  13056. ancestorInfo.aTagInScope = null;
  13057. ancestorInfo.buttonTagInScope = null;
  13058. ancestorInfo.nobrTagInScope = null;
  13059. }
  13060. if (buttonScopeTags.indexOf(tag) !== -1) {
  13061. ancestorInfo.pTagInButtonScope = null;
  13062. } // See rules for 'li', 'dd', 'dt' start tags in
  13063. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
  13064. if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
  13065. ancestorInfo.listItemTagAutoclosing = null;
  13066. ancestorInfo.dlItemTagAutoclosing = null;
  13067. }
  13068. ancestorInfo.current = info;
  13069. if (tag === 'form') {
  13070. ancestorInfo.formTag = info;
  13071. }
  13072. if (tag === 'a') {
  13073. ancestorInfo.aTagInScope = info;
  13074. }
  13075. if (tag === 'button') {
  13076. ancestorInfo.buttonTagInScope = info;
  13077. }
  13078. if (tag === 'nobr') {
  13079. ancestorInfo.nobrTagInScope = info;
  13080. }
  13081. if (tag === 'p') {
  13082. ancestorInfo.pTagInButtonScope = info;
  13083. }
  13084. if (tag === 'li') {
  13085. ancestorInfo.listItemTagAutoclosing = info;
  13086. }
  13087. if (tag === 'dd' || tag === 'dt') {
  13088. ancestorInfo.dlItemTagAutoclosing = info;
  13089. }
  13090. return ancestorInfo;
  13091. };
  13092. /**
  13093. * Returns whether
  13094. */
  13095. var isTagValidWithParent = function (tag, parentTag) {
  13096. // First, let's check if we're in an unusual parsing mode...
  13097. switch (parentTag) {
  13098. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
  13099. case 'select':
  13100. return tag === 'option' || tag === 'optgroup' || tag === '#text';
  13101. case 'optgroup':
  13102. return tag === 'option' || tag === '#text';
  13103. // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
  13104. // but
  13105. case 'option':
  13106. return tag === '#text';
  13107. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
  13108. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
  13109. // No special behavior since these rules fall back to "in body" mode for
  13110. // all except special table nodes which cause bad parsing behavior anyway.
  13111. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
  13112. case 'tr':
  13113. return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
  13114. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
  13115. case 'tbody':
  13116. case 'thead':
  13117. case 'tfoot':
  13118. return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
  13119. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
  13120. case 'colgroup':
  13121. return tag === 'col' || tag === 'template';
  13122. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
  13123. case 'table':
  13124. return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
  13125. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
  13126. case 'head':
  13127. return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
  13128. // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
  13129. case 'html':
  13130. return tag === 'head' || tag === 'body' || tag === 'frameset';
  13131. case 'frameset':
  13132. return tag === 'frame';
  13133. case '#document':
  13134. return tag === 'html';
  13135. } // Probably in the "in body" parsing mode, so we outlaw only tag combos
  13136. // where the parsing rules cause implicit opens or closes to be added.
  13137. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
  13138. switch (tag) {
  13139. case 'h1':
  13140. case 'h2':
  13141. case 'h3':
  13142. case 'h4':
  13143. case 'h5':
  13144. case 'h6':
  13145. return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
  13146. case 'rp':
  13147. case 'rt':
  13148. return impliedEndTags.indexOf(parentTag) === -1;
  13149. case 'body':
  13150. case 'caption':
  13151. case 'col':
  13152. case 'colgroup':
  13153. case 'frameset':
  13154. case 'frame':
  13155. case 'head':
  13156. case 'html':
  13157. case 'tbody':
  13158. case 'td':
  13159. case 'tfoot':
  13160. case 'th':
  13161. case 'thead':
  13162. case 'tr':
  13163. // These tags are only valid with a few parents that have special child
  13164. // parsing rules -- if we're down here, then none of those matched and
  13165. // so we allow it only if we don't know what the parent is, as all other
  13166. // cases are invalid.
  13167. return parentTag == null;
  13168. }
  13169. return true;
  13170. };
  13171. /**
  13172. * Returns whether
  13173. */
  13174. var findInvalidAncestorForTag = function (tag, ancestorInfo) {
  13175. switch (tag) {
  13176. case 'address':
  13177. case 'article':
  13178. case 'aside':
  13179. case 'blockquote':
  13180. case 'center':
  13181. case 'details':
  13182. case 'dialog':
  13183. case 'dir':
  13184. case 'div':
  13185. case 'dl':
  13186. case 'fieldset':
  13187. case 'figcaption':
  13188. case 'figure':
  13189. case 'footer':
  13190. case 'header':
  13191. case 'hgroup':
  13192. case 'main':
  13193. case 'menu':
  13194. case 'nav':
  13195. case 'ol':
  13196. case 'p':
  13197. case 'section':
  13198. case 'summary':
  13199. case 'ul':
  13200. case 'pre':
  13201. case 'listing':
  13202. case 'table':
  13203. case 'hr':
  13204. case 'xmp':
  13205. case 'h1':
  13206. case 'h2':
  13207. case 'h3':
  13208. case 'h4':
  13209. case 'h5':
  13210. case 'h6':
  13211. return ancestorInfo.pTagInButtonScope;
  13212. case 'form':
  13213. return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
  13214. case 'li':
  13215. return ancestorInfo.listItemTagAutoclosing;
  13216. case 'dd':
  13217. case 'dt':
  13218. return ancestorInfo.dlItemTagAutoclosing;
  13219. case 'button':
  13220. return ancestorInfo.buttonTagInScope;
  13221. case 'a':
  13222. // Spec says something about storing a list of markers, but it sounds
  13223. // equivalent to this check.
  13224. return ancestorInfo.aTagInScope;
  13225. case 'nobr':
  13226. return ancestorInfo.nobrTagInScope;
  13227. }
  13228. return null;
  13229. };
  13230. var didWarn$1 = {};
  13231. validateDOMNesting = function (childTag, childText, ancestorInfo) {
  13232. ancestorInfo = ancestorInfo || emptyAncestorInfo;
  13233. var parentInfo = ancestorInfo.current;
  13234. var parentTag = parentInfo && parentInfo.tag;
  13235. if (childText != null) {
  13236. if (childTag != null) {
  13237. error('validateDOMNesting: when childText is passed, childTag should be null');
  13238. }
  13239. childTag = '#text';
  13240. }
  13241. var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
  13242. var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
  13243. var invalidParentOrAncestor = invalidParent || invalidAncestor;
  13244. if (!invalidParentOrAncestor) {
  13245. return;
  13246. }
  13247. var ancestorTag = invalidParentOrAncestor.tag;
  13248. var addendum = getCurrentFiberStackInDev();
  13249. var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;
  13250. if (didWarn$1[warnKey]) {
  13251. return;
  13252. }
  13253. didWarn$1[warnKey] = true;
  13254. var tagDisplayName = childTag;
  13255. var whitespaceInfo = '';
  13256. if (childTag === '#text') {
  13257. if (/\S/.test(childText)) {
  13258. tagDisplayName = 'Text nodes';
  13259. } else {
  13260. tagDisplayName = 'Whitespace text nodes';
  13261. whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
  13262. }
  13263. } else {
  13264. tagDisplayName = '<' + childTag + '>';
  13265. }
  13266. if (invalidParent) {
  13267. var info = '';
  13268. if (ancestorTag === 'table' && childTag === 'tr') {
  13269. info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
  13270. }
  13271. error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
  13272. } else {
  13273. error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
  13274. }
  13275. };
  13276. }
  13277. var SUPPRESS_HYDRATION_WARNING$1;
  13278. {
  13279. SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
  13280. }
  13281. var SUSPENSE_START_DATA = '$';
  13282. var SUSPENSE_END_DATA = '/$';
  13283. var SUSPENSE_PENDING_START_DATA = '$?';
  13284. var SUSPENSE_FALLBACK_START_DATA = '$!';
  13285. var STYLE$1 = 'style';
  13286. var eventsEnabled = null;
  13287. var selectionInformation = null;
  13288. function shouldAutoFocusHostComponent(type, props) {
  13289. switch (type) {
  13290. case 'button':
  13291. case 'input':
  13292. case 'select':
  13293. case 'textarea':
  13294. return !!props.autoFocus;
  13295. }
  13296. return false;
  13297. }
  13298. function getRootHostContext(rootContainerInstance) {
  13299. var type;
  13300. var namespace;
  13301. var nodeType = rootContainerInstance.nodeType;
  13302. switch (nodeType) {
  13303. case DOCUMENT_NODE:
  13304. case DOCUMENT_FRAGMENT_NODE:
  13305. {
  13306. type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
  13307. var root = rootContainerInstance.documentElement;
  13308. namespace = root ? root.namespaceURI : getChildNamespace(null, '');
  13309. break;
  13310. }
  13311. default:
  13312. {
  13313. var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
  13314. var ownNamespace = container.namespaceURI || null;
  13315. type = container.tagName;
  13316. namespace = getChildNamespace(ownNamespace, type);
  13317. break;
  13318. }
  13319. }
  13320. {
  13321. var validatedTag = type.toLowerCase();
  13322. var ancestorInfo = updatedAncestorInfo(null, validatedTag);
  13323. return {
  13324. namespace: namespace,
  13325. ancestorInfo: ancestorInfo
  13326. };
  13327. }
  13328. }
  13329. function getChildHostContext(parentHostContext, type, rootContainerInstance) {
  13330. {
  13331. var parentHostContextDev = parentHostContext;
  13332. var namespace = getChildNamespace(parentHostContextDev.namespace, type);
  13333. var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
  13334. return {
  13335. namespace: namespace,
  13336. ancestorInfo: ancestorInfo
  13337. };
  13338. }
  13339. }
  13340. function getPublicInstance(instance) {
  13341. return instance;
  13342. }
  13343. function prepareForCommit(containerInfo) {
  13344. eventsEnabled = isEnabled();
  13345. selectionInformation = getSelectionInformation();
  13346. setEnabled(false);
  13347. }
  13348. function resetAfterCommit(containerInfo) {
  13349. restoreSelection(selectionInformation);
  13350. setEnabled(eventsEnabled);
  13351. eventsEnabled = null;
  13352. selectionInformation = null;
  13353. }
  13354. function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
  13355. var parentNamespace;
  13356. {
  13357. // TODO: take namespace into account when validating.
  13358. var hostContextDev = hostContext;
  13359. validateDOMNesting(type, null, hostContextDev.ancestorInfo);
  13360. if (typeof props.children === 'string' || typeof props.children === 'number') {
  13361. var string = '' + props.children;
  13362. var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
  13363. validateDOMNesting(null, string, ownAncestorInfo);
  13364. }
  13365. parentNamespace = hostContextDev.namespace;
  13366. }
  13367. var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
  13368. precacheFiberNode(internalInstanceHandle, domElement);
  13369. updateFiberProps(domElement, props);
  13370. return domElement;
  13371. }
  13372. function appendInitialChild(parentInstance, child) {
  13373. parentInstance.appendChild(child);
  13374. }
  13375. function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
  13376. setInitialProperties(domElement, type, props, rootContainerInstance);
  13377. return shouldAutoFocusHostComponent(type, props);
  13378. }
  13379. function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
  13380. {
  13381. var hostContextDev = hostContext;
  13382. if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
  13383. var string = '' + newProps.children;
  13384. var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
  13385. validateDOMNesting(null, string, ownAncestorInfo);
  13386. }
  13387. }
  13388. return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
  13389. }
  13390. function shouldSetTextContent(type, props) {
  13391. return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
  13392. }
  13393. function shouldDeprioritizeSubtree(type, props) {
  13394. return !!props.hidden;
  13395. }
  13396. function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
  13397. {
  13398. var hostContextDev = hostContext;
  13399. validateDOMNesting(null, text, hostContextDev.ancestorInfo);
  13400. }
  13401. var textNode = createTextNode(text, rootContainerInstance);
  13402. precacheFiberNode(internalInstanceHandle, textNode);
  13403. return textNode;
  13404. }
  13405. // if a component just imports ReactDOM (e.g. for findDOMNode).
  13406. // Some environments might not have setTimeout or clearTimeout.
  13407. var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
  13408. var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
  13409. var noTimeout = -1; // -------------------
  13410. function commitMount(domElement, type, newProps, internalInstanceHandle) {
  13411. // Despite the naming that might imply otherwise, this method only
  13412. // fires if there is an `Update` effect scheduled during mounting.
  13413. // This happens if `finalizeInitialChildren` returns `true` (which it
  13414. // does to implement the `autoFocus` attribute on the client). But
  13415. // there are also other cases when this might happen (such as patching
  13416. // up text content during hydration mismatch). So we'll check this again.
  13417. if (shouldAutoFocusHostComponent(type, newProps)) {
  13418. domElement.focus();
  13419. }
  13420. }
  13421. function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
  13422. // Update the props handle so that we know which props are the ones with
  13423. // with current event handlers.
  13424. updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.
  13425. updateProperties(domElement, updatePayload, type, oldProps, newProps);
  13426. }
  13427. function resetTextContent(domElement) {
  13428. setTextContent(domElement, '');
  13429. }
  13430. function commitTextUpdate(textInstance, oldText, newText) {
  13431. textInstance.nodeValue = newText;
  13432. }
  13433. function appendChild(parentInstance, child) {
  13434. parentInstance.appendChild(child);
  13435. }
  13436. function appendChildToContainer(container, child) {
  13437. var parentNode;
  13438. if (container.nodeType === COMMENT_NODE) {
  13439. parentNode = container.parentNode;
  13440. parentNode.insertBefore(child, container);
  13441. } else {
  13442. parentNode = container;
  13443. parentNode.appendChild(child);
  13444. } // This container might be used for a portal.
  13445. // If something inside a portal is clicked, that click should bubble
  13446. // through the React tree. However, on Mobile Safari the click would
  13447. // never bubble through the *DOM* tree unless an ancestor with onclick
  13448. // event exists. So we wouldn't see it and dispatch it.
  13449. // This is why we ensure that non React root containers have inline onclick
  13450. // defined.
  13451. // https://github.com/facebook/react/issues/11918
  13452. var reactRootContainer = container._reactRootContainer;
  13453. if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
  13454. // TODO: This cast may not be sound for SVG, MathML or custom elements.
  13455. trapClickOnNonInteractiveElement(parentNode);
  13456. }
  13457. }
  13458. function insertBefore(parentInstance, child, beforeChild) {
  13459. parentInstance.insertBefore(child, beforeChild);
  13460. }
  13461. function insertInContainerBefore(container, child, beforeChild) {
  13462. if (container.nodeType === COMMENT_NODE) {
  13463. container.parentNode.insertBefore(child, beforeChild);
  13464. } else {
  13465. container.insertBefore(child, beforeChild);
  13466. }
  13467. }
  13468. function removeChild(parentInstance, child) {
  13469. parentInstance.removeChild(child);
  13470. }
  13471. function removeChildFromContainer(container, child) {
  13472. if (container.nodeType === COMMENT_NODE) {
  13473. container.parentNode.removeChild(child);
  13474. } else {
  13475. container.removeChild(child);
  13476. }
  13477. }
  13478. function hideInstance(instance) {
  13479. // pass host context to this method?
  13480. instance = instance;
  13481. var style = instance.style;
  13482. if (typeof style.setProperty === 'function') {
  13483. style.setProperty('display', 'none', 'important');
  13484. } else {
  13485. style.display = 'none';
  13486. }
  13487. }
  13488. function hideTextInstance(textInstance) {
  13489. textInstance.nodeValue = '';
  13490. }
  13491. function unhideInstance(instance, props) {
  13492. instance = instance;
  13493. var styleProp = props[STYLE$1];
  13494. var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
  13495. instance.style.display = dangerousStyleValue('display', display);
  13496. }
  13497. function unhideTextInstance(textInstance, text) {
  13498. textInstance.nodeValue = text;
  13499. } // -------------------
  13500. function canHydrateInstance(instance, type, props) {
  13501. if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
  13502. return null;
  13503. } // This has now been refined to an element node.
  13504. return instance;
  13505. }
  13506. function canHydrateTextInstance(instance, text) {
  13507. if (text === '' || instance.nodeType !== TEXT_NODE) {
  13508. // Empty strings are not parsed by HTML so there won't be a correct match here.
  13509. return null;
  13510. } // This has now been refined to a text node.
  13511. return instance;
  13512. }
  13513. function isSuspenseInstancePending(instance) {
  13514. return instance.data === SUSPENSE_PENDING_START_DATA;
  13515. }
  13516. function isSuspenseInstanceFallback(instance) {
  13517. return instance.data === SUSPENSE_FALLBACK_START_DATA;
  13518. }
  13519. function getNextHydratable(node) {
  13520. // Skip non-hydratable nodes.
  13521. for (; node != null; node = node.nextSibling) {
  13522. var nodeType = node.nodeType;
  13523. if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
  13524. break;
  13525. }
  13526. }
  13527. return node;
  13528. }
  13529. function getNextHydratableSibling(instance) {
  13530. return getNextHydratable(instance.nextSibling);
  13531. }
  13532. function getFirstHydratableChild(parentInstance) {
  13533. return getNextHydratable(parentInstance.firstChild);
  13534. }
  13535. function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
  13536. precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
  13537. // get attached.
  13538. updateFiberProps(instance, props);
  13539. var parentNamespace;
  13540. {
  13541. var hostContextDev = hostContext;
  13542. parentNamespace = hostContextDev.namespace;
  13543. }
  13544. return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
  13545. }
  13546. function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
  13547. precacheFiberNode(internalInstanceHandle, textInstance);
  13548. return diffHydratedText(textInstance, text);
  13549. }
  13550. function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
  13551. var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
  13552. // There might be nested nodes so we need to keep track of how
  13553. // deep we are and only break out when we're back on top.
  13554. var depth = 0;
  13555. while (node) {
  13556. if (node.nodeType === COMMENT_NODE) {
  13557. var data = node.data;
  13558. if (data === SUSPENSE_END_DATA) {
  13559. if (depth === 0) {
  13560. return getNextHydratableSibling(node);
  13561. } else {
  13562. depth--;
  13563. }
  13564. } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
  13565. depth++;
  13566. }
  13567. }
  13568. node = node.nextSibling;
  13569. } // TODO: Warn, we didn't find the end comment boundary.
  13570. return null;
  13571. } // Returns the SuspenseInstance if this node is a direct child of a
  13572. // SuspenseInstance. I.e. if its previous sibling is a Comment with
  13573. // SUSPENSE_x_START_DATA. Otherwise, null.
  13574. function getParentSuspenseInstance(targetInstance) {
  13575. var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
  13576. // There might be nested nodes so we need to keep track of how
  13577. // deep we are and only break out when we're back on top.
  13578. var depth = 0;
  13579. while (node) {
  13580. if (node.nodeType === COMMENT_NODE) {
  13581. var data = node.data;
  13582. if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
  13583. if (depth === 0) {
  13584. return node;
  13585. } else {
  13586. depth--;
  13587. }
  13588. } else if (data === SUSPENSE_END_DATA) {
  13589. depth++;
  13590. }
  13591. }
  13592. node = node.previousSibling;
  13593. }
  13594. return null;
  13595. }
  13596. function commitHydratedContainer(container) {
  13597. // Retry if any event replaying was blocked on this.
  13598. retryIfBlockedOn(container);
  13599. }
  13600. function commitHydratedSuspenseInstance(suspenseInstance) {
  13601. // Retry if any event replaying was blocked on this.
  13602. retryIfBlockedOn(suspenseInstance);
  13603. }
  13604. function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
  13605. {
  13606. warnForUnmatchedText(textInstance, text);
  13607. }
  13608. }
  13609. function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
  13610. if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
  13611. warnForUnmatchedText(textInstance, text);
  13612. }
  13613. }
  13614. function didNotHydrateContainerInstance(parentContainer, instance) {
  13615. {
  13616. if (instance.nodeType === ELEMENT_NODE) {
  13617. warnForDeletedHydratableElement(parentContainer, instance);
  13618. } else if (instance.nodeType === COMMENT_NODE) ; else {
  13619. warnForDeletedHydratableText(parentContainer, instance);
  13620. }
  13621. }
  13622. }
  13623. function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
  13624. if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
  13625. if (instance.nodeType === ELEMENT_NODE) {
  13626. warnForDeletedHydratableElement(parentInstance, instance);
  13627. } else if (instance.nodeType === COMMENT_NODE) ; else {
  13628. warnForDeletedHydratableText(parentInstance, instance);
  13629. }
  13630. }
  13631. }
  13632. function didNotFindHydratableContainerInstance(parentContainer, type, props) {
  13633. {
  13634. warnForInsertedHydratedElement(parentContainer, type);
  13635. }
  13636. }
  13637. function didNotFindHydratableContainerTextInstance(parentContainer, text) {
  13638. {
  13639. warnForInsertedHydratedText(parentContainer, text);
  13640. }
  13641. }
  13642. function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
  13643. if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
  13644. warnForInsertedHydratedElement(parentInstance, type);
  13645. }
  13646. }
  13647. function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
  13648. if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
  13649. warnForInsertedHydratedText(parentInstance, text);
  13650. }
  13651. }
  13652. function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
  13653. if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
  13654. }
  13655. var randomKey = Math.random().toString(36).slice(2);
  13656. var internalInstanceKey = '__reactInternalInstance$' + randomKey;
  13657. var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
  13658. var internalContainerInstanceKey = '__reactContainere$' + randomKey;
  13659. function precacheFiberNode(hostInst, node) {
  13660. node[internalInstanceKey] = hostInst;
  13661. }
  13662. function markContainerAsRoot(hostRoot, node) {
  13663. node[internalContainerInstanceKey] = hostRoot;
  13664. }
  13665. function unmarkContainerAsRoot(node) {
  13666. node[internalContainerInstanceKey] = null;
  13667. }
  13668. function isContainerMarkedAsRoot(node) {
  13669. return !!node[internalContainerInstanceKey];
  13670. } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
  13671. // If the target node is part of a hydrated or not yet rendered subtree, then
  13672. // this may also return a SuspenseComponent or HostRoot to indicate that.
  13673. // Conceptually the HostRoot fiber is a child of the Container node. So if you
  13674. // pass the Container node as the targetNode, you will not actually get the
  13675. // HostRoot back. To get to the HostRoot, you need to pass a child of it.
  13676. // The same thing applies to Suspense boundaries.
  13677. function getClosestInstanceFromNode(targetNode) {
  13678. var targetInst = targetNode[internalInstanceKey];
  13679. if (targetInst) {
  13680. // Don't return HostRoot or SuspenseComponent here.
  13681. return targetInst;
  13682. } // If the direct event target isn't a React owned DOM node, we need to look
  13683. // to see if one of its parents is a React owned DOM node.
  13684. var parentNode = targetNode.parentNode;
  13685. while (parentNode) {
  13686. // We'll check if this is a container root that could include
  13687. // React nodes in the future. We need to check this first because
  13688. // if we're a child of a dehydrated container, we need to first
  13689. // find that inner container before moving on to finding the parent
  13690. // instance. Note that we don't check this field on the targetNode
  13691. // itself because the fibers are conceptually between the container
  13692. // node and the first child. It isn't surrounding the container node.
  13693. // If it's not a container, we check if it's an instance.
  13694. targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
  13695. if (targetInst) {
  13696. // Since this wasn't the direct target of the event, we might have
  13697. // stepped past dehydrated DOM nodes to get here. However they could
  13698. // also have been non-React nodes. We need to answer which one.
  13699. // If we the instance doesn't have any children, then there can't be
  13700. // a nested suspense boundary within it. So we can use this as a fast
  13701. // bailout. Most of the time, when people add non-React children to
  13702. // the tree, it is using a ref to a child-less DOM node.
  13703. // Normally we'd only need to check one of the fibers because if it
  13704. // has ever gone from having children to deleting them or vice versa
  13705. // it would have deleted the dehydrated boundary nested inside already.
  13706. // However, since the HostRoot starts out with an alternate it might
  13707. // have one on the alternate so we need to check in case this was a
  13708. // root.
  13709. var alternate = targetInst.alternate;
  13710. if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
  13711. // Next we need to figure out if the node that skipped past is
  13712. // nested within a dehydrated boundary and if so, which one.
  13713. var suspenseInstance = getParentSuspenseInstance(targetNode);
  13714. while (suspenseInstance !== null) {
  13715. // We found a suspense instance. That means that we haven't
  13716. // hydrated it yet. Even though we leave the comments in the
  13717. // DOM after hydrating, and there are boundaries in the DOM
  13718. // that could already be hydrated, we wouldn't have found them
  13719. // through this pass since if the target is hydrated it would
  13720. // have had an internalInstanceKey on it.
  13721. // Let's get the fiber associated with the SuspenseComponent
  13722. // as the deepest instance.
  13723. var targetSuspenseInst = suspenseInstance[internalInstanceKey];
  13724. if (targetSuspenseInst) {
  13725. return targetSuspenseInst;
  13726. } // If we don't find a Fiber on the comment, it might be because
  13727. // we haven't gotten to hydrate it yet. There might still be a
  13728. // parent boundary that hasn't above this one so we need to find
  13729. // the outer most that is known.
  13730. suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
  13731. // host component also hasn't hydrated yet. We can return it
  13732. // below since it will bail out on the isMounted check later.
  13733. }
  13734. }
  13735. return targetInst;
  13736. }
  13737. targetNode = parentNode;
  13738. parentNode = targetNode.parentNode;
  13739. }
  13740. return null;
  13741. }
  13742. /**
  13743. * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
  13744. * instance, or null if the node was not rendered by this React.
  13745. */
  13746. function getInstanceFromNode$1(node) {
  13747. var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
  13748. if (inst) {
  13749. if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
  13750. return inst;
  13751. } else {
  13752. return null;
  13753. }
  13754. }
  13755. return null;
  13756. }
  13757. /**
  13758. * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
  13759. * DOM node.
  13760. */
  13761. function getNodeFromInstance$1(inst) {
  13762. if (inst.tag === HostComponent || inst.tag === HostText) {
  13763. // In Fiber this, is just the state node right now. We assume it will be
  13764. // a host component or host text.
  13765. return inst.stateNode;
  13766. } // Without this first invariant, passing a non-DOM-component triggers the next
  13767. // invariant for a missing parent, which is super confusing.
  13768. {
  13769. {
  13770. throw Error( "getNodeFromInstance: Invalid argument." );
  13771. }
  13772. }
  13773. }
  13774. function getFiberCurrentPropsFromNode$1(node) {
  13775. return node[internalEventHandlersKey] || null;
  13776. }
  13777. function updateFiberProps(node, props) {
  13778. node[internalEventHandlersKey] = props;
  13779. }
  13780. function getParent(inst) {
  13781. do {
  13782. inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
  13783. // That is depending on if we want nested subtrees (layers) to bubble
  13784. // events to their parent. We could also go through parentNode on the
  13785. // host node but that wouldn't work for React Native and doesn't let us
  13786. // do the portal feature.
  13787. } while (inst && inst.tag !== HostComponent);
  13788. if (inst) {
  13789. return inst;
  13790. }
  13791. return null;
  13792. }
  13793. /**
  13794. * Return the lowest common ancestor of A and B, or null if they are in
  13795. * different trees.
  13796. */
  13797. function getLowestCommonAncestor(instA, instB) {
  13798. var depthA = 0;
  13799. for (var tempA = instA; tempA; tempA = getParent(tempA)) {
  13800. depthA++;
  13801. }
  13802. var depthB = 0;
  13803. for (var tempB = instB; tempB; tempB = getParent(tempB)) {
  13804. depthB++;
  13805. } // If A is deeper, crawl up.
  13806. while (depthA - depthB > 0) {
  13807. instA = getParent(instA);
  13808. depthA--;
  13809. } // If B is deeper, crawl up.
  13810. while (depthB - depthA > 0) {
  13811. instB = getParent(instB);
  13812. depthB--;
  13813. } // Walk in lockstep until we find a match.
  13814. var depth = depthA;
  13815. while (depth--) {
  13816. if (instA === instB || instA === instB.alternate) {
  13817. return instA;
  13818. }
  13819. instA = getParent(instA);
  13820. instB = getParent(instB);
  13821. }
  13822. return null;
  13823. }
  13824. /**
  13825. * Simulates the traversal of a two-phase, capture/bubble event dispatch.
  13826. */
  13827. function traverseTwoPhase(inst, fn, arg) {
  13828. var path = [];
  13829. while (inst) {
  13830. path.push(inst);
  13831. inst = getParent(inst);
  13832. }
  13833. var i;
  13834. for (i = path.length; i-- > 0;) {
  13835. fn(path[i], 'captured', arg);
  13836. }
  13837. for (i = 0; i < path.length; i++) {
  13838. fn(path[i], 'bubbled', arg);
  13839. }
  13840. }
  13841. /**
  13842. * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
  13843. * should would receive a `mouseEnter` or `mouseLeave` event.
  13844. *
  13845. * Does not invoke the callback on the nearest common ancestor because nothing
  13846. * "entered" or "left" that element.
  13847. */
  13848. function traverseEnterLeave(from, to, fn, argFrom, argTo) {
  13849. var common = from && to ? getLowestCommonAncestor(from, to) : null;
  13850. var pathFrom = [];
  13851. while (true) {
  13852. if (!from) {
  13853. break;
  13854. }
  13855. if (from === common) {
  13856. break;
  13857. }
  13858. var alternate = from.alternate;
  13859. if (alternate !== null && alternate === common) {
  13860. break;
  13861. }
  13862. pathFrom.push(from);
  13863. from = getParent(from);
  13864. }
  13865. var pathTo = [];
  13866. while (true) {
  13867. if (!to) {
  13868. break;
  13869. }
  13870. if (to === common) {
  13871. break;
  13872. }
  13873. var _alternate = to.alternate;
  13874. if (_alternate !== null && _alternate === common) {
  13875. break;
  13876. }
  13877. pathTo.push(to);
  13878. to = getParent(to);
  13879. }
  13880. for (var i = 0; i < pathFrom.length; i++) {
  13881. fn(pathFrom[i], 'bubbled', argFrom);
  13882. }
  13883. for (var _i = pathTo.length; _i-- > 0;) {
  13884. fn(pathTo[_i], 'captured', argTo);
  13885. }
  13886. }
  13887. function isInteractive(tag) {
  13888. return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
  13889. }
  13890. function shouldPreventMouseEvent(name, type, props) {
  13891. switch (name) {
  13892. case 'onClick':
  13893. case 'onClickCapture':
  13894. case 'onDoubleClick':
  13895. case 'onDoubleClickCapture':
  13896. case 'onMouseDown':
  13897. case 'onMouseDownCapture':
  13898. case 'onMouseMove':
  13899. case 'onMouseMoveCapture':
  13900. case 'onMouseUp':
  13901. case 'onMouseUpCapture':
  13902. case 'onMouseEnter':
  13903. return !!(props.disabled && isInteractive(type));
  13904. default:
  13905. return false;
  13906. }
  13907. }
  13908. /**
  13909. * @param {object} inst The instance, which is the source of events.
  13910. * @param {string} registrationName Name of listener (e.g. `onClick`).
  13911. * @return {?function} The stored callback.
  13912. */
  13913. function getListener(inst, registrationName) {
  13914. var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
  13915. // live here; needs to be moved to a better place soon
  13916. var stateNode = inst.stateNode;
  13917. if (!stateNode) {
  13918. // Work in progress (ex: onload events in incremental mode).
  13919. return null;
  13920. }
  13921. var props = getFiberCurrentPropsFromNode(stateNode);
  13922. if (!props) {
  13923. // Work in progress.
  13924. return null;
  13925. }
  13926. listener = props[registrationName];
  13927. if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
  13928. return null;
  13929. }
  13930. if (!(!listener || typeof listener === 'function')) {
  13931. {
  13932. throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
  13933. }
  13934. }
  13935. return listener;
  13936. }
  13937. /**
  13938. * Some event types have a notion of different registration names for different
  13939. * "phases" of propagation. This finds listeners by a given phase.
  13940. */
  13941. function listenerAtPhase(inst, event, propagationPhase) {
  13942. var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
  13943. return getListener(inst, registrationName);
  13944. }
  13945. /**
  13946. * A small set of propagation patterns, each of which will accept a small amount
  13947. * of information, and generate a set of "dispatch ready event objects" - which
  13948. * are sets of events that have already been annotated with a set of dispatched
  13949. * listener functions/ids. The API is designed this way to discourage these
  13950. * propagation strategies from actually executing the dispatches, since we
  13951. * always want to collect the entire set of dispatches before executing even a
  13952. * single one.
  13953. */
  13954. /**
  13955. * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
  13956. * here, allows us to not have to bind or create functions for each event.
  13957. * Mutating the event's members allows us to not have to create a wrapping
  13958. * "dispatch" object that pairs the event with the listener.
  13959. */
  13960. function accumulateDirectionalDispatches(inst, phase, event) {
  13961. {
  13962. if (!inst) {
  13963. error('Dispatching inst must not be null');
  13964. }
  13965. }
  13966. var listener = listenerAtPhase(inst, event, phase);
  13967. if (listener) {
  13968. event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
  13969. event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
  13970. }
  13971. }
  13972. /**
  13973. * Collect dispatches (must be entirely collected before dispatching - see unit
  13974. * tests). Lazily allocate the array to conserve memory. We must loop through
  13975. * each event and perform the traversal for each one. We cannot perform a
  13976. * single traversal for the entire collection of events because each event may
  13977. * have a different target.
  13978. */
  13979. function accumulateTwoPhaseDispatchesSingle(event) {
  13980. if (event && event.dispatchConfig.phasedRegistrationNames) {
  13981. traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
  13982. }
  13983. }
  13984. /**
  13985. * Accumulates without regard to direction, does not look for phased
  13986. * registration names. Same as `accumulateDirectDispatchesSingle` but without
  13987. * requiring that the `dispatchMarker` be the same as the dispatched ID.
  13988. */
  13989. function accumulateDispatches(inst, ignoredDirection, event) {
  13990. if (inst && event && event.dispatchConfig.registrationName) {
  13991. var registrationName = event.dispatchConfig.registrationName;
  13992. var listener = getListener(inst, registrationName);
  13993. if (listener) {
  13994. event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
  13995. event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
  13996. }
  13997. }
  13998. }
  13999. /**
  14000. * Accumulates dispatches on an `SyntheticEvent`, but only for the
  14001. * `dispatchMarker`.
  14002. * @param {SyntheticEvent} event
  14003. */
  14004. function accumulateDirectDispatchesSingle(event) {
  14005. if (event && event.dispatchConfig.registrationName) {
  14006. accumulateDispatches(event._targetInst, null, event);
  14007. }
  14008. }
  14009. function accumulateTwoPhaseDispatches(events) {
  14010. forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
  14011. }
  14012. function accumulateEnterLeaveDispatches(leave, enter, from, to) {
  14013. traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
  14014. }
  14015. function accumulateDirectDispatches(events) {
  14016. forEachAccumulated(events, accumulateDirectDispatchesSingle);
  14017. }
  14018. /**
  14019. * These variables store information about text content of a target node,
  14020. * allowing comparison of content before and after a given event.
  14021. *
  14022. * Identify the node where selection currently begins, then observe
  14023. * both its text content and its current position in the DOM. Since the
  14024. * browser may natively replace the target node during composition, we can
  14025. * use its position to find its replacement.
  14026. *
  14027. *
  14028. */
  14029. var root = null;
  14030. var startText = null;
  14031. var fallbackText = null;
  14032. function initialize(nativeEventTarget) {
  14033. root = nativeEventTarget;
  14034. startText = getText();
  14035. return true;
  14036. }
  14037. function reset() {
  14038. root = null;
  14039. startText = null;
  14040. fallbackText = null;
  14041. }
  14042. function getData() {
  14043. if (fallbackText) {
  14044. return fallbackText;
  14045. }
  14046. var start;
  14047. var startValue = startText;
  14048. var startLength = startValue.length;
  14049. var end;
  14050. var endValue = getText();
  14051. var endLength = endValue.length;
  14052. for (start = 0; start < startLength; start++) {
  14053. if (startValue[start] !== endValue[start]) {
  14054. break;
  14055. }
  14056. }
  14057. var minEnd = startLength - start;
  14058. for (end = 1; end <= minEnd; end++) {
  14059. if (startValue[startLength - end] !== endValue[endLength - end]) {
  14060. break;
  14061. }
  14062. }
  14063. var sliceTail = end > 1 ? 1 - end : undefined;
  14064. fallbackText = endValue.slice(start, sliceTail);
  14065. return fallbackText;
  14066. }
  14067. function getText() {
  14068. if ('value' in root) {
  14069. return root.value;
  14070. }
  14071. return root.textContent;
  14072. }
  14073. var EVENT_POOL_SIZE = 10;
  14074. /**
  14075. * @interface Event
  14076. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  14077. */
  14078. var EventInterface = {
  14079. type: null,
  14080. target: null,
  14081. // currentTarget is set when dispatching; no use in copying it here
  14082. currentTarget: function () {
  14083. return null;
  14084. },
  14085. eventPhase: null,
  14086. bubbles: null,
  14087. cancelable: null,
  14088. timeStamp: function (event) {
  14089. return event.timeStamp || Date.now();
  14090. },
  14091. defaultPrevented: null,
  14092. isTrusted: null
  14093. };
  14094. function functionThatReturnsTrue() {
  14095. return true;
  14096. }
  14097. function functionThatReturnsFalse() {
  14098. return false;
  14099. }
  14100. /**
  14101. * Synthetic events are dispatched by event plugins, typically in response to a
  14102. * top-level event delegation handler.
  14103. *
  14104. * These systems should generally use pooling to reduce the frequency of garbage
  14105. * collection. The system should check `isPersistent` to determine whether the
  14106. * event should be released into the pool after being dispatched. Users that
  14107. * need a persisted event should invoke `persist`.
  14108. *
  14109. * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
  14110. * normalizing browser quirks. Subclasses do not necessarily have to implement a
  14111. * DOM interface; custom application-specific events can also subclass this.
  14112. *
  14113. * @param {object} dispatchConfig Configuration used to dispatch this event.
  14114. * @param {*} targetInst Marker identifying the event target.
  14115. * @param {object} nativeEvent Native browser event.
  14116. * @param {DOMEventTarget} nativeEventTarget Target node.
  14117. */
  14118. function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
  14119. {
  14120. // these have a getter/setter for warnings
  14121. delete this.nativeEvent;
  14122. delete this.preventDefault;
  14123. delete this.stopPropagation;
  14124. delete this.isDefaultPrevented;
  14125. delete this.isPropagationStopped;
  14126. }
  14127. this.dispatchConfig = dispatchConfig;
  14128. this._targetInst = targetInst;
  14129. this.nativeEvent = nativeEvent;
  14130. var Interface = this.constructor.Interface;
  14131. for (var propName in Interface) {
  14132. if (!Interface.hasOwnProperty(propName)) {
  14133. continue;
  14134. }
  14135. {
  14136. delete this[propName]; // this has a getter/setter for warnings
  14137. }
  14138. var normalize = Interface[propName];
  14139. if (normalize) {
  14140. this[propName] = normalize(nativeEvent);
  14141. } else {
  14142. if (propName === 'target') {
  14143. this.target = nativeEventTarget;
  14144. } else {
  14145. this[propName] = nativeEvent[propName];
  14146. }
  14147. }
  14148. }
  14149. var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
  14150. if (defaultPrevented) {
  14151. this.isDefaultPrevented = functionThatReturnsTrue;
  14152. } else {
  14153. this.isDefaultPrevented = functionThatReturnsFalse;
  14154. }
  14155. this.isPropagationStopped = functionThatReturnsFalse;
  14156. return this;
  14157. }
  14158. _assign(SyntheticEvent.prototype, {
  14159. preventDefault: function () {
  14160. this.defaultPrevented = true;
  14161. var event = this.nativeEvent;
  14162. if (!event) {
  14163. return;
  14164. }
  14165. if (event.preventDefault) {
  14166. event.preventDefault();
  14167. } else if (typeof event.returnValue !== 'unknown') {
  14168. event.returnValue = false;
  14169. }
  14170. this.isDefaultPrevented = functionThatReturnsTrue;
  14171. },
  14172. stopPropagation: function () {
  14173. var event = this.nativeEvent;
  14174. if (!event) {
  14175. return;
  14176. }
  14177. if (event.stopPropagation) {
  14178. event.stopPropagation();
  14179. } else if (typeof event.cancelBubble !== 'unknown') {
  14180. // The ChangeEventPlugin registers a "propertychange" event for
  14181. // IE. This event does not support bubbling or cancelling, and
  14182. // any references to cancelBubble throw "Member not found". A
  14183. // typeof check of "unknown" circumvents this issue (and is also
  14184. // IE specific).
  14185. event.cancelBubble = true;
  14186. }
  14187. this.isPropagationStopped = functionThatReturnsTrue;
  14188. },
  14189. /**
  14190. * We release all dispatched `SyntheticEvent`s after each event loop, adding
  14191. * them back into the pool. This allows a way to hold onto a reference that
  14192. * won't be added back into the pool.
  14193. */
  14194. persist: function () {
  14195. this.isPersistent = functionThatReturnsTrue;
  14196. },
  14197. /**
  14198. * Checks if this event should be released back into the pool.
  14199. *
  14200. * @return {boolean} True if this should not be released, false otherwise.
  14201. */
  14202. isPersistent: functionThatReturnsFalse,
  14203. /**
  14204. * `PooledClass` looks for `destructor` on each instance it releases.
  14205. */
  14206. destructor: function () {
  14207. var Interface = this.constructor.Interface;
  14208. for (var propName in Interface) {
  14209. {
  14210. Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
  14211. }
  14212. }
  14213. this.dispatchConfig = null;
  14214. this._targetInst = null;
  14215. this.nativeEvent = null;
  14216. this.isDefaultPrevented = functionThatReturnsFalse;
  14217. this.isPropagationStopped = functionThatReturnsFalse;
  14218. this._dispatchListeners = null;
  14219. this._dispatchInstances = null;
  14220. {
  14221. Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
  14222. Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
  14223. Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
  14224. Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
  14225. Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
  14226. }
  14227. }
  14228. });
  14229. SyntheticEvent.Interface = EventInterface;
  14230. /**
  14231. * Helper to reduce boilerplate when creating subclasses.
  14232. */
  14233. SyntheticEvent.extend = function (Interface) {
  14234. var Super = this;
  14235. var E = function () {};
  14236. E.prototype = Super.prototype;
  14237. var prototype = new E();
  14238. function Class() {
  14239. return Super.apply(this, arguments);
  14240. }
  14241. _assign(prototype, Class.prototype);
  14242. Class.prototype = prototype;
  14243. Class.prototype.constructor = Class;
  14244. Class.Interface = _assign({}, Super.Interface, Interface);
  14245. Class.extend = Super.extend;
  14246. addEventPoolingTo(Class);
  14247. return Class;
  14248. };
  14249. addEventPoolingTo(SyntheticEvent);
  14250. /**
  14251. * Helper to nullify syntheticEvent instance properties when destructing
  14252. *
  14253. * @param {String} propName
  14254. * @param {?object} getVal
  14255. * @return {object} defineProperty object
  14256. */
  14257. function getPooledWarningPropertyDefinition(propName, getVal) {
  14258. var isFunction = typeof getVal === 'function';
  14259. return {
  14260. configurable: true,
  14261. set: set,
  14262. get: get
  14263. };
  14264. function set(val) {
  14265. var action = isFunction ? 'setting the method' : 'setting the property';
  14266. warn(action, 'This is effectively a no-op');
  14267. return val;
  14268. }
  14269. function get() {
  14270. var action = isFunction ? 'accessing the method' : 'accessing the property';
  14271. var result = isFunction ? 'This is a no-op function' : 'This is set to null';
  14272. warn(action, result);
  14273. return getVal;
  14274. }
  14275. function warn(action, result) {
  14276. {
  14277. error("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);
  14278. }
  14279. }
  14280. }
  14281. function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
  14282. var EventConstructor = this;
  14283. if (EventConstructor.eventPool.length) {
  14284. var instance = EventConstructor.eventPool.pop();
  14285. EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
  14286. return instance;
  14287. }
  14288. return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
  14289. }
  14290. function releasePooledEvent(event) {
  14291. var EventConstructor = this;
  14292. if (!(event instanceof EventConstructor)) {
  14293. {
  14294. throw Error( "Trying to release an event instance into a pool of a different type." );
  14295. }
  14296. }
  14297. event.destructor();
  14298. if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
  14299. EventConstructor.eventPool.push(event);
  14300. }
  14301. }
  14302. function addEventPoolingTo(EventConstructor) {
  14303. EventConstructor.eventPool = [];
  14304. EventConstructor.getPooled = getPooledEvent;
  14305. EventConstructor.release = releasePooledEvent;
  14306. }
  14307. /**
  14308. * @interface Event
  14309. * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
  14310. */
  14311. var SyntheticCompositionEvent = SyntheticEvent.extend({
  14312. data: null
  14313. });
  14314. /**
  14315. * @interface Event
  14316. * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
  14317. * /#events-inputevents
  14318. */
  14319. var SyntheticInputEvent = SyntheticEvent.extend({
  14320. data: null
  14321. });
  14322. var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
  14323. var START_KEYCODE = 229;
  14324. var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
  14325. var documentMode = null;
  14326. if (canUseDOM && 'documentMode' in document) {
  14327. documentMode = document.documentMode;
  14328. } // Webkit offers a very useful `textInput` event that can be used to
  14329. // directly represent `beforeInput`. The IE `textinput` event is not as
  14330. // useful, so we don't use it.
  14331. var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
  14332. // by the native compositionend event may be incorrect. Japanese ideographic
  14333. // spaces, for instance (\u3000) are not recorded correctly.
  14334. var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
  14335. var SPACEBAR_CODE = 32;
  14336. var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names.
  14337. var eventTypes = {
  14338. beforeInput: {
  14339. phasedRegistrationNames: {
  14340. bubbled: 'onBeforeInput',
  14341. captured: 'onBeforeInputCapture'
  14342. },
  14343. dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
  14344. },
  14345. compositionEnd: {
  14346. phasedRegistrationNames: {
  14347. bubbled: 'onCompositionEnd',
  14348. captured: 'onCompositionEndCapture'
  14349. },
  14350. dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  14351. },
  14352. compositionStart: {
  14353. phasedRegistrationNames: {
  14354. bubbled: 'onCompositionStart',
  14355. captured: 'onCompositionStartCapture'
  14356. },
  14357. dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  14358. },
  14359. compositionUpdate: {
  14360. phasedRegistrationNames: {
  14361. bubbled: 'onCompositionUpdate',
  14362. captured: 'onCompositionUpdateCapture'
  14363. },
  14364. dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  14365. }
  14366. }; // Track whether we've ever handled a keypress on the space key.
  14367. var hasSpaceKeypress = false;
  14368. /**
  14369. * Return whether a native keypress event is assumed to be a command.
  14370. * This is required because Firefox fires `keypress` events for key commands
  14371. * (cut, copy, select-all, etc.) even though no character is inserted.
  14372. */
  14373. function isKeypressCommand(nativeEvent) {
  14374. return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
  14375. !(nativeEvent.ctrlKey && nativeEvent.altKey);
  14376. }
  14377. /**
  14378. * Translate native top level events into event types.
  14379. *
  14380. * @param {string} topLevelType
  14381. * @return {object}
  14382. */
  14383. function getCompositionEventType(topLevelType) {
  14384. switch (topLevelType) {
  14385. case TOP_COMPOSITION_START:
  14386. return eventTypes.compositionStart;
  14387. case TOP_COMPOSITION_END:
  14388. return eventTypes.compositionEnd;
  14389. case TOP_COMPOSITION_UPDATE:
  14390. return eventTypes.compositionUpdate;
  14391. }
  14392. }
  14393. /**
  14394. * Does our fallback best-guess model think this event signifies that
  14395. * composition has begun?
  14396. *
  14397. * @param {string} topLevelType
  14398. * @param {object} nativeEvent
  14399. * @return {boolean}
  14400. */
  14401. function isFallbackCompositionStart(topLevelType, nativeEvent) {
  14402. return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;
  14403. }
  14404. /**
  14405. * Does our fallback mode think that this event is the end of composition?
  14406. *
  14407. * @param {string} topLevelType
  14408. * @param {object} nativeEvent
  14409. * @return {boolean}
  14410. */
  14411. function isFallbackCompositionEnd(topLevelType, nativeEvent) {
  14412. switch (topLevelType) {
  14413. case TOP_KEY_UP:
  14414. // Command keys insert or clear IME input.
  14415. return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
  14416. case TOP_KEY_DOWN:
  14417. // Expect IME keyCode on each keydown. If we get any other
  14418. // code we must have exited earlier.
  14419. return nativeEvent.keyCode !== START_KEYCODE;
  14420. case TOP_KEY_PRESS:
  14421. case TOP_MOUSE_DOWN:
  14422. case TOP_BLUR:
  14423. // Events are not possible without cancelling IME.
  14424. return true;
  14425. default:
  14426. return false;
  14427. }
  14428. }
  14429. /**
  14430. * Google Input Tools provides composition data via a CustomEvent,
  14431. * with the `data` property populated in the `detail` object. If this
  14432. * is available on the event object, use it. If not, this is a plain
  14433. * composition event and we have nothing special to extract.
  14434. *
  14435. * @param {object} nativeEvent
  14436. * @return {?string}
  14437. */
  14438. function getDataFromCustomEvent(nativeEvent) {
  14439. var detail = nativeEvent.detail;
  14440. if (typeof detail === 'object' && 'data' in detail) {
  14441. return detail.data;
  14442. }
  14443. return null;
  14444. }
  14445. /**
  14446. * Check if a composition event was triggered by Korean IME.
  14447. * Our fallback mode does not work well with IE's Korean IME,
  14448. * so just use native composition events when Korean IME is used.
  14449. * Although CompositionEvent.locale property is deprecated,
  14450. * it is available in IE, where our fallback mode is enabled.
  14451. *
  14452. * @param {object} nativeEvent
  14453. * @return {boolean}
  14454. */
  14455. function isUsingKoreanIME(nativeEvent) {
  14456. return nativeEvent.locale === 'ko';
  14457. } // Track the current IME composition status, if any.
  14458. var isComposing = false;
  14459. /**
  14460. * @return {?object} A SyntheticCompositionEvent.
  14461. */
  14462. function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  14463. var eventType;
  14464. var fallbackData;
  14465. if (canUseCompositionEvent) {
  14466. eventType = getCompositionEventType(topLevelType);
  14467. } else if (!isComposing) {
  14468. if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
  14469. eventType = eventTypes.compositionStart;
  14470. }
  14471. } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
  14472. eventType = eventTypes.compositionEnd;
  14473. }
  14474. if (!eventType) {
  14475. return null;
  14476. }
  14477. if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
  14478. // The current composition is stored statically and must not be
  14479. // overwritten while composition continues.
  14480. if (!isComposing && eventType === eventTypes.compositionStart) {
  14481. isComposing = initialize(nativeEventTarget);
  14482. } else if (eventType === eventTypes.compositionEnd) {
  14483. if (isComposing) {
  14484. fallbackData = getData();
  14485. }
  14486. }
  14487. }
  14488. var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
  14489. if (fallbackData) {
  14490. // Inject data generated from fallback path into the synthetic event.
  14491. // This matches the property of native CompositionEventInterface.
  14492. event.data = fallbackData;
  14493. } else {
  14494. var customData = getDataFromCustomEvent(nativeEvent);
  14495. if (customData !== null) {
  14496. event.data = customData;
  14497. }
  14498. }
  14499. accumulateTwoPhaseDispatches(event);
  14500. return event;
  14501. }
  14502. /**
  14503. * @param {TopLevelType} topLevelType Number from `TopLevelType`.
  14504. * @param {object} nativeEvent Native browser event.
  14505. * @return {?string} The string corresponding to this `beforeInput` event.
  14506. */
  14507. function getNativeBeforeInputChars(topLevelType, nativeEvent) {
  14508. switch (topLevelType) {
  14509. case TOP_COMPOSITION_END:
  14510. return getDataFromCustomEvent(nativeEvent);
  14511. case TOP_KEY_PRESS:
  14512. /**
  14513. * If native `textInput` events are available, our goal is to make
  14514. * use of them. However, there is a special case: the spacebar key.
  14515. * In Webkit, preventing default on a spacebar `textInput` event
  14516. * cancels character insertion, but it *also* causes the browser
  14517. * to fall back to its default spacebar behavior of scrolling the
  14518. * page.
  14519. *
  14520. * Tracking at:
  14521. * https://code.google.com/p/chromium/issues/detail?id=355103
  14522. *
  14523. * To avoid this issue, use the keypress event as if no `textInput`
  14524. * event is available.
  14525. */
  14526. var which = nativeEvent.which;
  14527. if (which !== SPACEBAR_CODE) {
  14528. return null;
  14529. }
  14530. hasSpaceKeypress = true;
  14531. return SPACEBAR_CHAR;
  14532. case TOP_TEXT_INPUT:
  14533. // Record the characters to be added to the DOM.
  14534. var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
  14535. // it at the keypress level and bail immediately. Android Chrome
  14536. // doesn't give us keycodes, so we need to ignore it.
  14537. if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
  14538. return null;
  14539. }
  14540. return chars;
  14541. default:
  14542. // For other native event types, do nothing.
  14543. return null;
  14544. }
  14545. }
  14546. /**
  14547. * For browsers that do not provide the `textInput` event, extract the
  14548. * appropriate string to use for SyntheticInputEvent.
  14549. *
  14550. * @param {number} topLevelType Number from `TopLevelEventTypes`.
  14551. * @param {object} nativeEvent Native browser event.
  14552. * @return {?string} The fallback string for this `beforeInput` event.
  14553. */
  14554. function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
  14555. // If we are currently composing (IME) and using a fallback to do so,
  14556. // try to extract the composed characters from the fallback object.
  14557. // If composition event is available, we extract a string only at
  14558. // compositionevent, otherwise extract it at fallback events.
  14559. if (isComposing) {
  14560. if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
  14561. var chars = getData();
  14562. reset();
  14563. isComposing = false;
  14564. return chars;
  14565. }
  14566. return null;
  14567. }
  14568. switch (topLevelType) {
  14569. case TOP_PASTE:
  14570. // If a paste event occurs after a keypress, throw out the input
  14571. // chars. Paste events should not lead to BeforeInput events.
  14572. return null;
  14573. case TOP_KEY_PRESS:
  14574. /**
  14575. * As of v27, Firefox may fire keypress events even when no character
  14576. * will be inserted. A few possibilities:
  14577. *
  14578. * - `which` is `0`. Arrow keys, Esc key, etc.
  14579. *
  14580. * - `which` is the pressed key code, but no char is available.
  14581. * Ex: 'AltGr + d` in Polish. There is no modified character for
  14582. * this key combination and no character is inserted into the
  14583. * document, but FF fires the keypress for char code `100` anyway.
  14584. * No `input` event will occur.
  14585. *
  14586. * - `which` is the pressed key code, but a command combination is
  14587. * being used. Ex: `Cmd+C`. No character is inserted, and no
  14588. * `input` event will occur.
  14589. */
  14590. if (!isKeypressCommand(nativeEvent)) {
  14591. // IE fires the `keypress` event when a user types an emoji via
  14592. // Touch keyboard of Windows. In such a case, the `char` property
  14593. // holds an emoji character like `\uD83D\uDE0A`. Because its length
  14594. // is 2, the property `which` does not represent an emoji correctly.
  14595. // In such a case, we directly return the `char` property instead of
  14596. // using `which`.
  14597. if (nativeEvent.char && nativeEvent.char.length > 1) {
  14598. return nativeEvent.char;
  14599. } else if (nativeEvent.which) {
  14600. return String.fromCharCode(nativeEvent.which);
  14601. }
  14602. }
  14603. return null;
  14604. case TOP_COMPOSITION_END:
  14605. return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
  14606. default:
  14607. return null;
  14608. }
  14609. }
  14610. /**
  14611. * Extract a SyntheticInputEvent for `beforeInput`, based on either native
  14612. * `textInput` or fallback behavior.
  14613. *
  14614. * @return {?object} A SyntheticInputEvent.
  14615. */
  14616. function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  14617. var chars;
  14618. if (canUseTextInputEvent) {
  14619. chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
  14620. } else {
  14621. chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
  14622. } // If no characters are being inserted, no BeforeInput event should
  14623. // be fired.
  14624. if (!chars) {
  14625. return null;
  14626. }
  14627. var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
  14628. event.data = chars;
  14629. accumulateTwoPhaseDispatches(event);
  14630. return event;
  14631. }
  14632. /**
  14633. * Create an `onBeforeInput` event to match
  14634. * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
  14635. *
  14636. * This event plugin is based on the native `textInput` event
  14637. * available in Chrome, Safari, Opera, and IE. This event fires after
  14638. * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
  14639. *
  14640. * `beforeInput` is spec'd but not implemented in any browsers, and
  14641. * the `input` event does not provide any useful information about what has
  14642. * actually been added, contrary to the spec. Thus, `textInput` is the best
  14643. * available event to identify the characters that have actually been inserted
  14644. * into the target node.
  14645. *
  14646. * This plugin is also responsible for emitting `composition` events, thus
  14647. * allowing us to share composition fallback code for both `beforeInput` and
  14648. * `composition` event types.
  14649. */
  14650. var BeforeInputEventPlugin = {
  14651. eventTypes: eventTypes,
  14652. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  14653. var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
  14654. var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
  14655. if (composition === null) {
  14656. return beforeInput;
  14657. }
  14658. if (beforeInput === null) {
  14659. return composition;
  14660. }
  14661. return [composition, beforeInput];
  14662. }
  14663. };
  14664. /**
  14665. * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
  14666. */
  14667. var supportedInputTypes = {
  14668. color: true,
  14669. date: true,
  14670. datetime: true,
  14671. 'datetime-local': true,
  14672. email: true,
  14673. month: true,
  14674. number: true,
  14675. password: true,
  14676. range: true,
  14677. search: true,
  14678. tel: true,
  14679. text: true,
  14680. time: true,
  14681. url: true,
  14682. week: true
  14683. };
  14684. function isTextInputElement(elem) {
  14685. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  14686. if (nodeName === 'input') {
  14687. return !!supportedInputTypes[elem.type];
  14688. }
  14689. if (nodeName === 'textarea') {
  14690. return true;
  14691. }
  14692. return false;
  14693. }
  14694. var eventTypes$1 = {
  14695. change: {
  14696. phasedRegistrationNames: {
  14697. bubbled: 'onChange',
  14698. captured: 'onChangeCapture'
  14699. },
  14700. dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
  14701. }
  14702. };
  14703. function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
  14704. var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
  14705. event.type = 'change'; // Flag this event loop as needing state restore.
  14706. enqueueStateRestore(target);
  14707. accumulateTwoPhaseDispatches(event);
  14708. return event;
  14709. }
  14710. /**
  14711. * For IE shims
  14712. */
  14713. var activeElement = null;
  14714. var activeElementInst = null;
  14715. /**
  14716. * SECTION: handle `change` event
  14717. */
  14718. function shouldUseChangeEvent(elem) {
  14719. var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
  14720. return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
  14721. }
  14722. function manualDispatchChangeEvent(nativeEvent) {
  14723. var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
  14724. // other events and have it go through ReactBrowserEventEmitter. Since it
  14725. // doesn't, we manually listen for the events and so we have to enqueue and
  14726. // process the abstract event manually.
  14727. //
  14728. // Batching is necessary here in order to ensure that all event handlers run
  14729. // before the next rerender (including event handlers attached to ancestor
  14730. // elements instead of directly on the input). Without this, controlled
  14731. // components don't work properly in conjunction with event bubbling because
  14732. // the component is rerendered and the value reverted before all the event
  14733. // handlers can run. See https://github.com/facebook/react/issues/708.
  14734. batchedUpdates(runEventInBatch, event);
  14735. }
  14736. function runEventInBatch(event) {
  14737. runEventsInBatch(event);
  14738. }
  14739. function getInstIfValueChanged(targetInst) {
  14740. var targetNode = getNodeFromInstance$1(targetInst);
  14741. if (updateValueIfChanged(targetNode)) {
  14742. return targetInst;
  14743. }
  14744. }
  14745. function getTargetInstForChangeEvent(topLevelType, targetInst) {
  14746. if (topLevelType === TOP_CHANGE) {
  14747. return targetInst;
  14748. }
  14749. }
  14750. /**
  14751. * SECTION: handle `input` event
  14752. */
  14753. var isInputEventSupported = false;
  14754. if (canUseDOM) {
  14755. // IE9 claims to support the input event but fails to trigger it when
  14756. // deleting text, so we ignore its input events.
  14757. isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
  14758. }
  14759. /**
  14760. * (For IE <=9) Starts tracking propertychange events on the passed-in element
  14761. * and override the value property so that we can distinguish user events from
  14762. * value changes in JS.
  14763. */
  14764. function startWatchingForValueChange(target, targetInst) {
  14765. activeElement = target;
  14766. activeElementInst = targetInst;
  14767. activeElement.attachEvent('onpropertychange', handlePropertyChange);
  14768. }
  14769. /**
  14770. * (For IE <=9) Removes the event listeners from the currently-tracked element,
  14771. * if any exists.
  14772. */
  14773. function stopWatchingForValueChange() {
  14774. if (!activeElement) {
  14775. return;
  14776. }
  14777. activeElement.detachEvent('onpropertychange', handlePropertyChange);
  14778. activeElement = null;
  14779. activeElementInst = null;
  14780. }
  14781. /**
  14782. * (For IE <=9) Handles a propertychange event, sending a `change` event if
  14783. * the value of the active element has changed.
  14784. */
  14785. function handlePropertyChange(nativeEvent) {
  14786. if (nativeEvent.propertyName !== 'value') {
  14787. return;
  14788. }
  14789. if (getInstIfValueChanged(activeElementInst)) {
  14790. manualDispatchChangeEvent(nativeEvent);
  14791. }
  14792. }
  14793. function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
  14794. if (topLevelType === TOP_FOCUS) {
  14795. // In IE9, propertychange fires for most input events but is buggy and
  14796. // doesn't fire when text is deleted, but conveniently, selectionchange
  14797. // appears to fire in all of the remaining cases so we catch those and
  14798. // forward the event if the value has changed
  14799. // In either case, we don't want to call the event handler if the value
  14800. // is changed from JS so we redefine a setter for `.value` that updates
  14801. // our activeElementValue variable, allowing us to ignore those changes
  14802. //
  14803. // stopWatching() should be a noop here but we call it just in case we
  14804. // missed a blur event somehow.
  14805. stopWatchingForValueChange();
  14806. startWatchingForValueChange(target, targetInst);
  14807. } else if (topLevelType === TOP_BLUR) {
  14808. stopWatchingForValueChange();
  14809. }
  14810. } // For IE8 and IE9.
  14811. function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
  14812. if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {
  14813. // On the selectionchange event, the target is just document which isn't
  14814. // helpful for us so just check activeElement instead.
  14815. //
  14816. // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
  14817. // propertychange on the first input event after setting `value` from a
  14818. // script and fires only keydown, keypress, keyup. Catching keyup usually
  14819. // gets it and catching keydown lets us fire an event for the first
  14820. // keystroke if user does a key repeat (it'll be a little delayed: right
  14821. // before the second keystroke). Other input methods (e.g., paste) seem to
  14822. // fire selectionchange normally.
  14823. return getInstIfValueChanged(activeElementInst);
  14824. }
  14825. }
  14826. /**
  14827. * SECTION: handle `click` event
  14828. */
  14829. function shouldUseClickEvent(elem) {
  14830. // Use the `click` event to detect changes to checkbox and radio inputs.
  14831. // This approach works across all browsers, whereas `change` does not fire
  14832. // until `blur` in IE8.
  14833. var nodeName = elem.nodeName;
  14834. return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
  14835. }
  14836. function getTargetInstForClickEvent(topLevelType, targetInst) {
  14837. if (topLevelType === TOP_CLICK) {
  14838. return getInstIfValueChanged(targetInst);
  14839. }
  14840. }
  14841. function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
  14842. if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
  14843. return getInstIfValueChanged(targetInst);
  14844. }
  14845. }
  14846. function handleControlledInputBlur(node) {
  14847. var state = node._wrapperState;
  14848. if (!state || !state.controlled || node.type !== 'number') {
  14849. return;
  14850. }
  14851. {
  14852. // If controlled, assign the value attribute to the current value on blur
  14853. setDefaultValue(node, 'number', node.value);
  14854. }
  14855. }
  14856. /**
  14857. * This plugin creates an `onChange` event that normalizes change events
  14858. * across form elements. This event fires at a time when it's possible to
  14859. * change the element's value without seeing a flicker.
  14860. *
  14861. * Supported elements are:
  14862. * - input (see `isTextInputElement`)
  14863. * - textarea
  14864. * - select
  14865. */
  14866. var ChangeEventPlugin = {
  14867. eventTypes: eventTypes$1,
  14868. _isInputEventSupported: isInputEventSupported,
  14869. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  14870. var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
  14871. var getTargetInstFunc, handleEventFunc;
  14872. if (shouldUseChangeEvent(targetNode)) {
  14873. getTargetInstFunc = getTargetInstForChangeEvent;
  14874. } else if (isTextInputElement(targetNode)) {
  14875. if (isInputEventSupported) {
  14876. getTargetInstFunc = getTargetInstForInputOrChangeEvent;
  14877. } else {
  14878. getTargetInstFunc = getTargetInstForInputEventPolyfill;
  14879. handleEventFunc = handleEventsForInputEventPolyfill;
  14880. }
  14881. } else if (shouldUseClickEvent(targetNode)) {
  14882. getTargetInstFunc = getTargetInstForClickEvent;
  14883. }
  14884. if (getTargetInstFunc) {
  14885. var inst = getTargetInstFunc(topLevelType, targetInst);
  14886. if (inst) {
  14887. var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
  14888. return event;
  14889. }
  14890. }
  14891. if (handleEventFunc) {
  14892. handleEventFunc(topLevelType, targetNode, targetInst);
  14893. } // When blurring, set the value attribute for number inputs
  14894. if (topLevelType === TOP_BLUR) {
  14895. handleControlledInputBlur(targetNode);
  14896. }
  14897. }
  14898. };
  14899. var SyntheticUIEvent = SyntheticEvent.extend({
  14900. view: null,
  14901. detail: null
  14902. });
  14903. /**
  14904. * Translation from modifier key to the associated property in the event.
  14905. * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
  14906. */
  14907. var modifierKeyToProp = {
  14908. Alt: 'altKey',
  14909. Control: 'ctrlKey',
  14910. Meta: 'metaKey',
  14911. Shift: 'shiftKey'
  14912. }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
  14913. // getModifierState. If getModifierState is not supported, we map it to a set of
  14914. // modifier keys exposed by the event. In this case, Lock-keys are not supported.
  14915. function modifierStateGetter(keyArg) {
  14916. var syntheticEvent = this;
  14917. var nativeEvent = syntheticEvent.nativeEvent;
  14918. if (nativeEvent.getModifierState) {
  14919. return nativeEvent.getModifierState(keyArg);
  14920. }
  14921. var keyProp = modifierKeyToProp[keyArg];
  14922. return keyProp ? !!nativeEvent[keyProp] : false;
  14923. }
  14924. function getEventModifierState(nativeEvent) {
  14925. return modifierStateGetter;
  14926. }
  14927. var previousScreenX = 0;
  14928. var previousScreenY = 0; // Use flags to signal movementX/Y has already been set
  14929. var isMovementXSet = false;
  14930. var isMovementYSet = false;
  14931. /**
  14932. * @interface MouseEvent
  14933. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  14934. */
  14935. var SyntheticMouseEvent = SyntheticUIEvent.extend({
  14936. screenX: null,
  14937. screenY: null,
  14938. clientX: null,
  14939. clientY: null,
  14940. pageX: null,
  14941. pageY: null,
  14942. ctrlKey: null,
  14943. shiftKey: null,
  14944. altKey: null,
  14945. metaKey: null,
  14946. getModifierState: getEventModifierState,
  14947. button: null,
  14948. buttons: null,
  14949. relatedTarget: function (event) {
  14950. return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
  14951. },
  14952. movementX: function (event) {
  14953. if ('movementX' in event) {
  14954. return event.movementX;
  14955. }
  14956. var screenX = previousScreenX;
  14957. previousScreenX = event.screenX;
  14958. if (!isMovementXSet) {
  14959. isMovementXSet = true;
  14960. return 0;
  14961. }
  14962. return event.type === 'mousemove' ? event.screenX - screenX : 0;
  14963. },
  14964. movementY: function (event) {
  14965. if ('movementY' in event) {
  14966. return event.movementY;
  14967. }
  14968. var screenY = previousScreenY;
  14969. previousScreenY = event.screenY;
  14970. if (!isMovementYSet) {
  14971. isMovementYSet = true;
  14972. return 0;
  14973. }
  14974. return event.type === 'mousemove' ? event.screenY - screenY : 0;
  14975. }
  14976. });
  14977. /**
  14978. * @interface PointerEvent
  14979. * @see http://www.w3.org/TR/pointerevents/
  14980. */
  14981. var SyntheticPointerEvent = SyntheticMouseEvent.extend({
  14982. pointerId: null,
  14983. width: null,
  14984. height: null,
  14985. pressure: null,
  14986. tangentialPressure: null,
  14987. tiltX: null,
  14988. tiltY: null,
  14989. twist: null,
  14990. pointerType: null,
  14991. isPrimary: null
  14992. });
  14993. var eventTypes$2 = {
  14994. mouseEnter: {
  14995. registrationName: 'onMouseEnter',
  14996. dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
  14997. },
  14998. mouseLeave: {
  14999. registrationName: 'onMouseLeave',
  15000. dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
  15001. },
  15002. pointerEnter: {
  15003. registrationName: 'onPointerEnter',
  15004. dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
  15005. },
  15006. pointerLeave: {
  15007. registrationName: 'onPointerLeave',
  15008. dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
  15009. }
  15010. };
  15011. var EnterLeaveEventPlugin = {
  15012. eventTypes: eventTypes$2,
  15013. /**
  15014. * For almost every interaction we care about, there will be both a top-level
  15015. * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
  15016. * we do not extract duplicate events. However, moving the mouse into the
  15017. * browser from outside will not fire a `mouseout` event. In this case, we use
  15018. * the `mouseover` top-level event.
  15019. */
  15020. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  15021. var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
  15022. var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;
  15023. if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0 && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
  15024. // If this is an over event with a target, then we've already dispatched
  15025. // the event in the out event of the other target. If this is replayed,
  15026. // then it's because we couldn't dispatch against this target previously
  15027. // so we have to do it now instead.
  15028. return null;
  15029. }
  15030. if (!isOutEvent && !isOverEvent) {
  15031. // Must not be a mouse or pointer in or out - ignoring.
  15032. return null;
  15033. }
  15034. var win;
  15035. if (nativeEventTarget.window === nativeEventTarget) {
  15036. // `nativeEventTarget` is probably a window object.
  15037. win = nativeEventTarget;
  15038. } else {
  15039. // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
  15040. var doc = nativeEventTarget.ownerDocument;
  15041. if (doc) {
  15042. win = doc.defaultView || doc.parentWindow;
  15043. } else {
  15044. win = window;
  15045. }
  15046. }
  15047. var from;
  15048. var to;
  15049. if (isOutEvent) {
  15050. from = targetInst;
  15051. var related = nativeEvent.relatedTarget || nativeEvent.toElement;
  15052. to = related ? getClosestInstanceFromNode(related) : null;
  15053. if (to !== null) {
  15054. var nearestMounted = getNearestMountedFiber(to);
  15055. if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
  15056. to = null;
  15057. }
  15058. }
  15059. } else {
  15060. // Moving to a node from outside the window.
  15061. from = null;
  15062. to = targetInst;
  15063. }
  15064. if (from === to) {
  15065. // Nothing pertains to our managed components.
  15066. return null;
  15067. }
  15068. var eventInterface, leaveEventType, enterEventType, eventTypePrefix;
  15069. if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
  15070. eventInterface = SyntheticMouseEvent;
  15071. leaveEventType = eventTypes$2.mouseLeave;
  15072. enterEventType = eventTypes$2.mouseEnter;
  15073. eventTypePrefix = 'mouse';
  15074. } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
  15075. eventInterface = SyntheticPointerEvent;
  15076. leaveEventType = eventTypes$2.pointerLeave;
  15077. enterEventType = eventTypes$2.pointerEnter;
  15078. eventTypePrefix = 'pointer';
  15079. }
  15080. var fromNode = from == null ? win : getNodeFromInstance$1(from);
  15081. var toNode = to == null ? win : getNodeFromInstance$1(to);
  15082. var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
  15083. leave.type = eventTypePrefix + 'leave';
  15084. leave.target = fromNode;
  15085. leave.relatedTarget = toNode;
  15086. var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);
  15087. enter.type = eventTypePrefix + 'enter';
  15088. enter.target = toNode;
  15089. enter.relatedTarget = fromNode;
  15090. accumulateEnterLeaveDispatches(leave, enter, from, to); // If we are not processing the first ancestor, then we
  15091. // should not process the same nativeEvent again, as we
  15092. // will have already processed it in the first ancestor.
  15093. if ((eventSystemFlags & IS_FIRST_ANCESTOR) === 0) {
  15094. return [leave];
  15095. }
  15096. return [leave, enter];
  15097. }
  15098. };
  15099. /**
  15100. * inlined Object.is polyfill to avoid requiring consumers ship their own
  15101. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  15102. */
  15103. function is(x, y) {
  15104. return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
  15105. ;
  15106. }
  15107. var objectIs = typeof Object.is === 'function' ? Object.is : is;
  15108. var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  15109. /**
  15110. * Performs equality by iterating through keys on an object and returning false
  15111. * when any key has values which are not strictly equal between the arguments.
  15112. * Returns true when the values of all keys are strictly equal.
  15113. */
  15114. function shallowEqual(objA, objB) {
  15115. if (objectIs(objA, objB)) {
  15116. return true;
  15117. }
  15118. if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
  15119. return false;
  15120. }
  15121. var keysA = Object.keys(objA);
  15122. var keysB = Object.keys(objB);
  15123. if (keysA.length !== keysB.length) {
  15124. return false;
  15125. } // Test for A's keys different from B.
  15126. for (var i = 0; i < keysA.length; i++) {
  15127. if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
  15128. return false;
  15129. }
  15130. }
  15131. return true;
  15132. }
  15133. var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
  15134. var eventTypes$3 = {
  15135. select: {
  15136. phasedRegistrationNames: {
  15137. bubbled: 'onSelect',
  15138. captured: 'onSelectCapture'
  15139. },
  15140. dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
  15141. }
  15142. };
  15143. var activeElement$1 = null;
  15144. var activeElementInst$1 = null;
  15145. var lastSelection = null;
  15146. var mouseDown = false;
  15147. /**
  15148. * Get an object which is a unique representation of the current selection.
  15149. *
  15150. * The return value will not be consistent across nodes or browsers, but
  15151. * two identical selections on the same node will return identical objects.
  15152. *
  15153. * @param {DOMElement} node
  15154. * @return {object}
  15155. */
  15156. function getSelection$1(node) {
  15157. if ('selectionStart' in node && hasSelectionCapabilities(node)) {
  15158. return {
  15159. start: node.selectionStart,
  15160. end: node.selectionEnd
  15161. };
  15162. } else {
  15163. var win = node.ownerDocument && node.ownerDocument.defaultView || window;
  15164. var selection = win.getSelection();
  15165. return {
  15166. anchorNode: selection.anchorNode,
  15167. anchorOffset: selection.anchorOffset,
  15168. focusNode: selection.focusNode,
  15169. focusOffset: selection.focusOffset
  15170. };
  15171. }
  15172. }
  15173. /**
  15174. * Get document associated with the event target.
  15175. *
  15176. * @param {object} nativeEventTarget
  15177. * @return {Document}
  15178. */
  15179. function getEventTargetDocument(eventTarget) {
  15180. return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
  15181. }
  15182. /**
  15183. * Poll selection to see whether it's changed.
  15184. *
  15185. * @param {object} nativeEvent
  15186. * @param {object} nativeEventTarget
  15187. * @return {?SyntheticEvent}
  15188. */
  15189. function constructSelectEvent(nativeEvent, nativeEventTarget) {
  15190. // Ensure we have the right element, and that the user is not dragging a
  15191. // selection (this matches native `select` event behavior). In HTML5, select
  15192. // fires only on input and textarea thus if there's no focused element we
  15193. // won't dispatch.
  15194. var doc = getEventTargetDocument(nativeEventTarget);
  15195. if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
  15196. return null;
  15197. } // Only fire when selection has actually changed.
  15198. var currentSelection = getSelection$1(activeElement$1);
  15199. if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
  15200. lastSelection = currentSelection;
  15201. var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
  15202. syntheticEvent.type = 'select';
  15203. syntheticEvent.target = activeElement$1;
  15204. accumulateTwoPhaseDispatches(syntheticEvent);
  15205. return syntheticEvent;
  15206. }
  15207. return null;
  15208. }
  15209. /**
  15210. * This plugin creates an `onSelect` event that normalizes select events
  15211. * across form elements.
  15212. *
  15213. * Supported elements are:
  15214. * - input (see `isTextInputElement`)
  15215. * - textarea
  15216. * - contentEditable
  15217. *
  15218. * This differs from native browser implementations in the following ways:
  15219. * - Fires on contentEditable fields as well as inputs.
  15220. * - Fires for collapsed selection.
  15221. * - Fires after user input.
  15222. */
  15223. var SelectEventPlugin = {
  15224. eventTypes: eventTypes$3,
  15225. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, container) {
  15226. var containerOrDoc = container || getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do
  15227. // not extract events. See #3639.
  15228. if (!containerOrDoc || !isListeningToAllDependencies('onSelect', containerOrDoc)) {
  15229. return null;
  15230. }
  15231. var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
  15232. switch (topLevelType) {
  15233. // Track the input node that has focus.
  15234. case TOP_FOCUS:
  15235. if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
  15236. activeElement$1 = targetNode;
  15237. activeElementInst$1 = targetInst;
  15238. lastSelection = null;
  15239. }
  15240. break;
  15241. case TOP_BLUR:
  15242. activeElement$1 = null;
  15243. activeElementInst$1 = null;
  15244. lastSelection = null;
  15245. break;
  15246. // Don't fire the event while the user is dragging. This matches the
  15247. // semantics of the native select event.
  15248. case TOP_MOUSE_DOWN:
  15249. mouseDown = true;
  15250. break;
  15251. case TOP_CONTEXT_MENU:
  15252. case TOP_MOUSE_UP:
  15253. case TOP_DRAG_END:
  15254. mouseDown = false;
  15255. return constructSelectEvent(nativeEvent, nativeEventTarget);
  15256. // Chrome and IE fire non-standard event when selection is changed (and
  15257. // sometimes when it hasn't). IE's event fires out of order with respect
  15258. // to key and input events on deletion, so we discard it.
  15259. //
  15260. // Firefox doesn't support selectionchange, so check selection status
  15261. // after each key entry. The selection changes after keydown and before
  15262. // keyup, but we check on keydown as well in the case of holding down a
  15263. // key, when multiple keydown events are fired but only one keyup is.
  15264. // This is also our approach for IE handling, for the reason above.
  15265. case TOP_SELECTION_CHANGE:
  15266. if (skipSelectionChangeEvent) {
  15267. break;
  15268. }
  15269. // falls through
  15270. case TOP_KEY_DOWN:
  15271. case TOP_KEY_UP:
  15272. return constructSelectEvent(nativeEvent, nativeEventTarget);
  15273. }
  15274. return null;
  15275. }
  15276. };
  15277. /**
  15278. * @interface Event
  15279. * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
  15280. * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
  15281. */
  15282. var SyntheticAnimationEvent = SyntheticEvent.extend({
  15283. animationName: null,
  15284. elapsedTime: null,
  15285. pseudoElement: null
  15286. });
  15287. /**
  15288. * @interface Event
  15289. * @see http://www.w3.org/TR/clipboard-apis/
  15290. */
  15291. var SyntheticClipboardEvent = SyntheticEvent.extend({
  15292. clipboardData: function (event) {
  15293. return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
  15294. }
  15295. });
  15296. /**
  15297. * @interface FocusEvent
  15298. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  15299. */
  15300. var SyntheticFocusEvent = SyntheticUIEvent.extend({
  15301. relatedTarget: null
  15302. });
  15303. /**
  15304. * `charCode` represents the actual "character code" and is safe to use with
  15305. * `String.fromCharCode`. As such, only keys that correspond to printable
  15306. * characters produce a valid `charCode`, the only exception to this is Enter.
  15307. * The Tab-key is considered non-printable and does not have a `charCode`,
  15308. * presumably because it does not produce a tab-character in browsers.
  15309. *
  15310. * @param {object} nativeEvent Native browser event.
  15311. * @return {number} Normalized `charCode` property.
  15312. */
  15313. function getEventCharCode(nativeEvent) {
  15314. var charCode;
  15315. var keyCode = nativeEvent.keyCode;
  15316. if ('charCode' in nativeEvent) {
  15317. charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
  15318. if (charCode === 0 && keyCode === 13) {
  15319. charCode = 13;
  15320. }
  15321. } else {
  15322. // IE8 does not implement `charCode`, but `keyCode` has the correct value.
  15323. charCode = keyCode;
  15324. } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
  15325. // report Enter as charCode 10 when ctrl is pressed.
  15326. if (charCode === 10) {
  15327. charCode = 13;
  15328. } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
  15329. // Must not discard the (non-)printable Enter-key.
  15330. if (charCode >= 32 || charCode === 13) {
  15331. return charCode;
  15332. }
  15333. return 0;
  15334. }
  15335. /**
  15336. * Normalization of deprecated HTML5 `key` values
  15337. * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
  15338. */
  15339. var normalizeKey = {
  15340. Esc: 'Escape',
  15341. Spacebar: ' ',
  15342. Left: 'ArrowLeft',
  15343. Up: 'ArrowUp',
  15344. Right: 'ArrowRight',
  15345. Down: 'ArrowDown',
  15346. Del: 'Delete',
  15347. Win: 'OS',
  15348. Menu: 'ContextMenu',
  15349. Apps: 'ContextMenu',
  15350. Scroll: 'ScrollLock',
  15351. MozPrintableKey: 'Unidentified'
  15352. };
  15353. /**
  15354. * Translation from legacy `keyCode` to HTML5 `key`
  15355. * Only special keys supported, all others depend on keyboard layout or browser
  15356. * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
  15357. */
  15358. var translateToKey = {
  15359. '8': 'Backspace',
  15360. '9': 'Tab',
  15361. '12': 'Clear',
  15362. '13': 'Enter',
  15363. '16': 'Shift',
  15364. '17': 'Control',
  15365. '18': 'Alt',
  15366. '19': 'Pause',
  15367. '20': 'CapsLock',
  15368. '27': 'Escape',
  15369. '32': ' ',
  15370. '33': 'PageUp',
  15371. '34': 'PageDown',
  15372. '35': 'End',
  15373. '36': 'Home',
  15374. '37': 'ArrowLeft',
  15375. '38': 'ArrowUp',
  15376. '39': 'ArrowRight',
  15377. '40': 'ArrowDown',
  15378. '45': 'Insert',
  15379. '46': 'Delete',
  15380. '112': 'F1',
  15381. '113': 'F2',
  15382. '114': 'F3',
  15383. '115': 'F4',
  15384. '116': 'F5',
  15385. '117': 'F6',
  15386. '118': 'F7',
  15387. '119': 'F8',
  15388. '120': 'F9',
  15389. '121': 'F10',
  15390. '122': 'F11',
  15391. '123': 'F12',
  15392. '144': 'NumLock',
  15393. '145': 'ScrollLock',
  15394. '224': 'Meta'
  15395. };
  15396. /**
  15397. * @param {object} nativeEvent Native browser event.
  15398. * @return {string} Normalized `key` property.
  15399. */
  15400. function getEventKey(nativeEvent) {
  15401. if (nativeEvent.key) {
  15402. // Normalize inconsistent values reported by browsers due to
  15403. // implementations of a working draft specification.
  15404. // FireFox implements `key` but returns `MozPrintableKey` for all
  15405. // printable characters (normalized to `Unidentified`), ignore it.
  15406. var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
  15407. if (key !== 'Unidentified') {
  15408. return key;
  15409. }
  15410. } // Browser does not implement `key`, polyfill as much of it as we can.
  15411. if (nativeEvent.type === 'keypress') {
  15412. var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
  15413. // thus be captured by `keypress`, no other non-printable key should.
  15414. return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
  15415. }
  15416. if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
  15417. // While user keyboard layout determines the actual meaning of each
  15418. // `keyCode` value, almost all function keys have a universal value.
  15419. return translateToKey[nativeEvent.keyCode] || 'Unidentified';
  15420. }
  15421. return '';
  15422. }
  15423. /**
  15424. * @interface KeyboardEvent
  15425. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  15426. */
  15427. var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
  15428. key: getEventKey,
  15429. location: null,
  15430. ctrlKey: null,
  15431. shiftKey: null,
  15432. altKey: null,
  15433. metaKey: null,
  15434. repeat: null,
  15435. locale: null,
  15436. getModifierState: getEventModifierState,
  15437. // Legacy Interface
  15438. charCode: function (event) {
  15439. // `charCode` is the result of a KeyPress event and represents the value of
  15440. // the actual printable character.
  15441. // KeyPress is deprecated, but its replacement is not yet final and not
  15442. // implemented in any major browser. Only KeyPress has charCode.
  15443. if (event.type === 'keypress') {
  15444. return getEventCharCode(event);
  15445. }
  15446. return 0;
  15447. },
  15448. keyCode: function (event) {
  15449. // `keyCode` is the result of a KeyDown/Up event and represents the value of
  15450. // physical keyboard key.
  15451. // The actual meaning of the value depends on the users' keyboard layout
  15452. // which cannot be detected. Assuming that it is a US keyboard layout
  15453. // provides a surprisingly accurate mapping for US and European users.
  15454. // Due to this, it is left to the user to implement at this time.
  15455. if (event.type === 'keydown' || event.type === 'keyup') {
  15456. return event.keyCode;
  15457. }
  15458. return 0;
  15459. },
  15460. which: function (event) {
  15461. // `which` is an alias for either `keyCode` or `charCode` depending on the
  15462. // type of the event.
  15463. if (event.type === 'keypress') {
  15464. return getEventCharCode(event);
  15465. }
  15466. if (event.type === 'keydown' || event.type === 'keyup') {
  15467. return event.keyCode;
  15468. }
  15469. return 0;
  15470. }
  15471. });
  15472. /**
  15473. * @interface DragEvent
  15474. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  15475. */
  15476. var SyntheticDragEvent = SyntheticMouseEvent.extend({
  15477. dataTransfer: null
  15478. });
  15479. /**
  15480. * @interface TouchEvent
  15481. * @see http://www.w3.org/TR/touch-events/
  15482. */
  15483. var SyntheticTouchEvent = SyntheticUIEvent.extend({
  15484. touches: null,
  15485. targetTouches: null,
  15486. changedTouches: null,
  15487. altKey: null,
  15488. metaKey: null,
  15489. ctrlKey: null,
  15490. shiftKey: null,
  15491. getModifierState: getEventModifierState
  15492. });
  15493. /**
  15494. * @interface Event
  15495. * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
  15496. * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
  15497. */
  15498. var SyntheticTransitionEvent = SyntheticEvent.extend({
  15499. propertyName: null,
  15500. elapsedTime: null,
  15501. pseudoElement: null
  15502. });
  15503. /**
  15504. * @interface WheelEvent
  15505. * @see http://www.w3.org/TR/DOM-Level-3-Events/
  15506. */
  15507. var SyntheticWheelEvent = SyntheticMouseEvent.extend({
  15508. deltaX: function (event) {
  15509. return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
  15510. 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
  15511. },
  15512. deltaY: function (event) {
  15513. return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
  15514. 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
  15515. 'wheelDelta' in event ? -event.wheelDelta : 0;
  15516. },
  15517. deltaZ: null,
  15518. // Browsers without "deltaMode" is reporting in raw wheel delta where one
  15519. // notch on the scroll is always +/- 120, roughly equivalent to pixels.
  15520. // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
  15521. // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
  15522. deltaMode: null
  15523. });
  15524. var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];
  15525. var SimpleEventPlugin = {
  15526. // simpleEventPluginEventTypes gets populated from
  15527. // the DOMEventProperties module.
  15528. eventTypes: simpleEventPluginEventTypes,
  15529. extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  15530. var dispatchConfig = topLevelEventsToDispatchConfig.get(topLevelType);
  15531. if (!dispatchConfig) {
  15532. return null;
  15533. }
  15534. var EventConstructor;
  15535. switch (topLevelType) {
  15536. case TOP_KEY_PRESS:
  15537. // Firefox creates a keypress event for function keys too. This removes
  15538. // the unwanted keypress events. Enter is however both printable and
  15539. // non-printable. One would expect Tab to be as well (but it isn't).
  15540. if (getEventCharCode(nativeEvent) === 0) {
  15541. return null;
  15542. }
  15543. /* falls through */
  15544. case TOP_KEY_DOWN:
  15545. case TOP_KEY_UP:
  15546. EventConstructor = SyntheticKeyboardEvent;
  15547. break;
  15548. case TOP_BLUR:
  15549. case TOP_FOCUS:
  15550. EventConstructor = SyntheticFocusEvent;
  15551. break;
  15552. case TOP_CLICK:
  15553. // Firefox creates a click event on right mouse clicks. This removes the
  15554. // unwanted click events.
  15555. if (nativeEvent.button === 2) {
  15556. return null;
  15557. }
  15558. /* falls through */
  15559. case TOP_AUX_CLICK:
  15560. case TOP_DOUBLE_CLICK:
  15561. case TOP_MOUSE_DOWN:
  15562. case TOP_MOUSE_MOVE:
  15563. case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events
  15564. /* falls through */
  15565. case TOP_MOUSE_OUT:
  15566. case TOP_MOUSE_OVER:
  15567. case TOP_CONTEXT_MENU:
  15568. EventConstructor = SyntheticMouseEvent;
  15569. break;
  15570. case TOP_DRAG:
  15571. case TOP_DRAG_END:
  15572. case TOP_DRAG_ENTER:
  15573. case TOP_DRAG_EXIT:
  15574. case TOP_DRAG_LEAVE:
  15575. case TOP_DRAG_OVER:
  15576. case TOP_DRAG_START:
  15577. case TOP_DROP:
  15578. EventConstructor = SyntheticDragEvent;
  15579. break;
  15580. case TOP_TOUCH_CANCEL:
  15581. case TOP_TOUCH_END:
  15582. case TOP_TOUCH_MOVE:
  15583. case TOP_TOUCH_START:
  15584. EventConstructor = SyntheticTouchEvent;
  15585. break;
  15586. case TOP_ANIMATION_END:
  15587. case TOP_ANIMATION_ITERATION:
  15588. case TOP_ANIMATION_START:
  15589. EventConstructor = SyntheticAnimationEvent;
  15590. break;
  15591. case TOP_TRANSITION_END:
  15592. EventConstructor = SyntheticTransitionEvent;
  15593. break;
  15594. case TOP_SCROLL:
  15595. EventConstructor = SyntheticUIEvent;
  15596. break;
  15597. case TOP_WHEEL:
  15598. EventConstructor = SyntheticWheelEvent;
  15599. break;
  15600. case TOP_COPY:
  15601. case TOP_CUT:
  15602. case TOP_PASTE:
  15603. EventConstructor = SyntheticClipboardEvent;
  15604. break;
  15605. case TOP_GOT_POINTER_CAPTURE:
  15606. case TOP_LOST_POINTER_CAPTURE:
  15607. case TOP_POINTER_CANCEL:
  15608. case TOP_POINTER_DOWN:
  15609. case TOP_POINTER_MOVE:
  15610. case TOP_POINTER_OUT:
  15611. case TOP_POINTER_OVER:
  15612. case TOP_POINTER_UP:
  15613. EventConstructor = SyntheticPointerEvent;
  15614. break;
  15615. default:
  15616. {
  15617. if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
  15618. error('SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
  15619. }
  15620. } // HTML Events
  15621. // @see http://www.w3.org/TR/html5/index.html#events-0
  15622. EventConstructor = SyntheticEvent;
  15623. break;
  15624. }
  15625. var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
  15626. accumulateTwoPhaseDispatches(event);
  15627. return event;
  15628. }
  15629. };
  15630. /**
  15631. * Specifies a deterministic ordering of `EventPlugin`s. A convenient way to
  15632. * reason about plugins, without having to package every one of them. This
  15633. * is better than having plugins be ordered in the same order that they
  15634. * are injected because that ordering would be influenced by the packaging order.
  15635. * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
  15636. * preventing default on events is convenient in `SimpleEventPlugin` handlers.
  15637. */
  15638. var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
  15639. /**
  15640. * Inject modules for resolving DOM hierarchy and plugin ordering.
  15641. */
  15642. injectEventPluginOrder(DOMEventPluginOrder);
  15643. setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
  15644. /**
  15645. * Some important event plugins included by default (without having to require
  15646. * them).
  15647. */
  15648. injectEventPluginsByName({
  15649. SimpleEventPlugin: SimpleEventPlugin,
  15650. EnterLeaveEventPlugin: EnterLeaveEventPlugin,
  15651. ChangeEventPlugin: ChangeEventPlugin,
  15652. SelectEventPlugin: SelectEventPlugin,
  15653. BeforeInputEventPlugin: BeforeInputEventPlugin
  15654. });
  15655. // Prefix measurements so that it's possible to filter them.
  15656. // Longer prefixes are hard to read in DevTools.
  15657. var reactEmoji = "\u269B";
  15658. var warningEmoji = "\u26D4";
  15659. var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause.
  15660. // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
  15661. var currentFiber = null; // If we're in the middle of user code, which fiber and method is it?
  15662. // Reusing `currentFiber` would be confusing for this because user code fiber
  15663. // can change during commit phase too, but we don't need to unwind it (since
  15664. // lifecycles in the commit phase don't resemble a tree).
  15665. var currentPhase = null;
  15666. var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem,
  15667. // so we will keep track of it, and include it in the report.
  15668. // Track commits caused by cascading updates.
  15669. var isCommitting = false;
  15670. var hasScheduledUpdateInCurrentCommit = false;
  15671. var hasScheduledUpdateInCurrentPhase = false;
  15672. var commitCountInCurrentWorkLoop = 0;
  15673. var effectCountInCurrentCommit = 0;
  15674. // to avoid stretch the commit phase with measurement overhead.
  15675. var labelsInCurrentCommit = new Set();
  15676. var formatMarkName = function (markName) {
  15677. return reactEmoji + " " + markName;
  15678. };
  15679. var formatLabel = function (label, warning) {
  15680. var prefix = warning ? warningEmoji + " " : reactEmoji + " ";
  15681. var suffix = warning ? " Warning: " + warning : '';
  15682. return "" + prefix + label + suffix;
  15683. };
  15684. var beginMark = function (markName) {
  15685. performance.mark(formatMarkName(markName));
  15686. };
  15687. var clearMark = function (markName) {
  15688. performance.clearMarks(formatMarkName(markName));
  15689. };
  15690. var endMark = function (label, markName, warning) {
  15691. var formattedMarkName = formatMarkName(markName);
  15692. var formattedLabel = formatLabel(label, warning);
  15693. try {
  15694. performance.measure(formattedLabel, formattedMarkName);
  15695. } catch (err) {} // If previous mark was missing for some reason, this will throw.
  15696. // This could only happen if React crashed in an unexpected place earlier.
  15697. // Don't pile on with more errors.
  15698. // Clear marks immediately to avoid growing buffer.
  15699. performance.clearMarks(formattedMarkName);
  15700. performance.clearMeasures(formattedLabel);
  15701. };
  15702. var getFiberMarkName = function (label, debugID) {
  15703. return label + " (#" + debugID + ")";
  15704. };
  15705. var getFiberLabel = function (componentName, isMounted, phase) {
  15706. if (phase === null) {
  15707. // These are composite component total time measurements.
  15708. return componentName + " [" + (isMounted ? 'update' : 'mount') + "]";
  15709. } else {
  15710. // Composite component methods.
  15711. return componentName + "." + phase;
  15712. }
  15713. };
  15714. var beginFiberMark = function (fiber, phase) {
  15715. var componentName = getComponentName(fiber.type) || 'Unknown';
  15716. var debugID = fiber._debugID;
  15717. var isMounted = fiber.alternate !== null;
  15718. var label = getFiberLabel(componentName, isMounted, phase);
  15719. if (isCommitting && labelsInCurrentCommit.has(label)) {
  15720. // During the commit phase, we don't show duplicate labels because
  15721. // there is a fixed overhead for every measurement, and we don't
  15722. // want to stretch the commit phase beyond necessary.
  15723. return false;
  15724. }
  15725. labelsInCurrentCommit.add(label);
  15726. var markName = getFiberMarkName(label, debugID);
  15727. beginMark(markName);
  15728. return true;
  15729. };
  15730. var clearFiberMark = function (fiber, phase) {
  15731. var componentName = getComponentName(fiber.type) || 'Unknown';
  15732. var debugID = fiber._debugID;
  15733. var isMounted = fiber.alternate !== null;
  15734. var label = getFiberLabel(componentName, isMounted, phase);
  15735. var markName = getFiberMarkName(label, debugID);
  15736. clearMark(markName);
  15737. };
  15738. var endFiberMark = function (fiber, phase, warning) {
  15739. var componentName = getComponentName(fiber.type) || 'Unknown';
  15740. var debugID = fiber._debugID;
  15741. var isMounted = fiber.alternate !== null;
  15742. var label = getFiberLabel(componentName, isMounted, phase);
  15743. var markName = getFiberMarkName(label, debugID);
  15744. endMark(label, markName, warning);
  15745. };
  15746. var shouldIgnoreFiber = function (fiber) {
  15747. // Host components should be skipped in the timeline.
  15748. // We could check typeof fiber.type, but does this work with RN?
  15749. switch (fiber.tag) {
  15750. case HostRoot:
  15751. case HostComponent:
  15752. case HostText:
  15753. case HostPortal:
  15754. case Fragment:
  15755. case ContextProvider:
  15756. case ContextConsumer:
  15757. case Mode:
  15758. return true;
  15759. default:
  15760. return false;
  15761. }
  15762. };
  15763. var clearPendingPhaseMeasurement = function () {
  15764. if (currentPhase !== null && currentPhaseFiber !== null) {
  15765. clearFiberMark(currentPhaseFiber, currentPhase);
  15766. }
  15767. currentPhaseFiber = null;
  15768. currentPhase = null;
  15769. hasScheduledUpdateInCurrentPhase = false;
  15770. };
  15771. var pauseTimers = function () {
  15772. // Stops all currently active measurements so that they can be resumed
  15773. // if we continue in a later deferred loop from the same unit of work.
  15774. var fiber = currentFiber;
  15775. while (fiber) {
  15776. if (fiber._debugIsCurrentlyTiming) {
  15777. endFiberMark(fiber, null, null);
  15778. }
  15779. fiber = fiber.return;
  15780. }
  15781. };
  15782. var resumeTimersRecursively = function (fiber) {
  15783. if (fiber.return !== null) {
  15784. resumeTimersRecursively(fiber.return);
  15785. }
  15786. if (fiber._debugIsCurrentlyTiming) {
  15787. beginFiberMark(fiber, null);
  15788. }
  15789. };
  15790. var resumeTimers = function () {
  15791. // Resumes all measurements that were active during the last deferred loop.
  15792. if (currentFiber !== null) {
  15793. resumeTimersRecursively(currentFiber);
  15794. }
  15795. };
  15796. function recordEffect() {
  15797. {
  15798. effectCountInCurrentCommit++;
  15799. }
  15800. }
  15801. function recordScheduleUpdate() {
  15802. {
  15803. if (isCommitting) {
  15804. hasScheduledUpdateInCurrentCommit = true;
  15805. }
  15806. if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
  15807. hasScheduledUpdateInCurrentPhase = true;
  15808. }
  15809. }
  15810. }
  15811. function startWorkTimer(fiber) {
  15812. {
  15813. if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
  15814. return;
  15815. } // If we pause, this is the fiber to unwind from.
  15816. currentFiber = fiber;
  15817. if (!beginFiberMark(fiber, null)) {
  15818. return;
  15819. }
  15820. fiber._debugIsCurrentlyTiming = true;
  15821. }
  15822. }
  15823. function cancelWorkTimer(fiber) {
  15824. {
  15825. if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
  15826. return;
  15827. } // Remember we shouldn't complete measurement for this fiber.
  15828. // Otherwise flamechart will be deep even for small updates.
  15829. fiber._debugIsCurrentlyTiming = false;
  15830. clearFiberMark(fiber, null);
  15831. }
  15832. }
  15833. function stopWorkTimer(fiber) {
  15834. {
  15835. if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
  15836. return;
  15837. } // If we pause, its parent is the fiber to unwind from.
  15838. currentFiber = fiber.return;
  15839. if (!fiber._debugIsCurrentlyTiming) {
  15840. return;
  15841. }
  15842. fiber._debugIsCurrentlyTiming = false;
  15843. endFiberMark(fiber, null, null);
  15844. }
  15845. }
  15846. function stopFailedWorkTimer(fiber) {
  15847. {
  15848. if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
  15849. return;
  15850. } // If we pause, its parent is the fiber to unwind from.
  15851. currentFiber = fiber.return;
  15852. if (!fiber._debugIsCurrentlyTiming) {
  15853. return;
  15854. }
  15855. fiber._debugIsCurrentlyTiming = false;
  15856. var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
  15857. endFiberMark(fiber, null, warning);
  15858. }
  15859. }
  15860. function startPhaseTimer(fiber, phase) {
  15861. {
  15862. if (!supportsUserTiming) {
  15863. return;
  15864. }
  15865. clearPendingPhaseMeasurement();
  15866. if (!beginFiberMark(fiber, phase)) {
  15867. return;
  15868. }
  15869. currentPhaseFiber = fiber;
  15870. currentPhase = phase;
  15871. }
  15872. }
  15873. function stopPhaseTimer() {
  15874. {
  15875. if (!supportsUserTiming) {
  15876. return;
  15877. }
  15878. if (currentPhase !== null && currentPhaseFiber !== null) {
  15879. var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
  15880. endFiberMark(currentPhaseFiber, currentPhase, warning);
  15881. }
  15882. currentPhase = null;
  15883. currentPhaseFiber = null;
  15884. }
  15885. }
  15886. function startWorkLoopTimer(nextUnitOfWork) {
  15887. {
  15888. currentFiber = nextUnitOfWork;
  15889. if (!supportsUserTiming) {
  15890. return;
  15891. }
  15892. commitCountInCurrentWorkLoop = 0; // This is top level call.
  15893. // Any other measurements are performed within.
  15894. beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop.
  15895. resumeTimers();
  15896. }
  15897. }
  15898. function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
  15899. {
  15900. if (!supportsUserTiming) {
  15901. return;
  15902. }
  15903. var warning = null;
  15904. if (interruptedBy !== null) {
  15905. if (interruptedBy.tag === HostRoot) {
  15906. warning = 'A top-level update interrupted the previous render';
  15907. } else {
  15908. var componentName = getComponentName(interruptedBy.type) || 'Unknown';
  15909. warning = "An update to " + componentName + " interrupted the previous render";
  15910. }
  15911. } else if (commitCountInCurrentWorkLoop > 1) {
  15912. warning = 'There were cascading updates';
  15913. }
  15914. commitCountInCurrentWorkLoop = 0;
  15915. var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.
  15916. pauseTimers();
  15917. endMark(label, '(React Tree Reconciliation)', warning);
  15918. }
  15919. }
  15920. function startCommitTimer() {
  15921. {
  15922. if (!supportsUserTiming) {
  15923. return;
  15924. }
  15925. isCommitting = true;
  15926. hasScheduledUpdateInCurrentCommit = false;
  15927. labelsInCurrentCommit.clear();
  15928. beginMark('(Committing Changes)');
  15929. }
  15930. }
  15931. function stopCommitTimer() {
  15932. {
  15933. if (!supportsUserTiming) {
  15934. return;
  15935. }
  15936. var warning = null;
  15937. if (hasScheduledUpdateInCurrentCommit) {
  15938. warning = 'Lifecycle hook scheduled a cascading update';
  15939. } else if (commitCountInCurrentWorkLoop > 0) {
  15940. warning = 'Caused by a cascading update in earlier commit';
  15941. }
  15942. hasScheduledUpdateInCurrentCommit = false;
  15943. commitCountInCurrentWorkLoop++;
  15944. isCommitting = false;
  15945. labelsInCurrentCommit.clear();
  15946. endMark('(Committing Changes)', '(Committing Changes)', warning);
  15947. }
  15948. }
  15949. function startCommitSnapshotEffectsTimer() {
  15950. {
  15951. if (!supportsUserTiming) {
  15952. return;
  15953. }
  15954. effectCountInCurrentCommit = 0;
  15955. beginMark('(Committing Snapshot Effects)');
  15956. }
  15957. }
  15958. function stopCommitSnapshotEffectsTimer() {
  15959. {
  15960. if (!supportsUserTiming) {
  15961. return;
  15962. }
  15963. var count = effectCountInCurrentCommit;
  15964. effectCountInCurrentCommit = 0;
  15965. endMark("(Committing Snapshot Effects: " + count + " Total)", '(Committing Snapshot Effects)', null);
  15966. }
  15967. }
  15968. function startCommitHostEffectsTimer() {
  15969. {
  15970. if (!supportsUserTiming) {
  15971. return;
  15972. }
  15973. effectCountInCurrentCommit = 0;
  15974. beginMark('(Committing Host Effects)');
  15975. }
  15976. }
  15977. function stopCommitHostEffectsTimer() {
  15978. {
  15979. if (!supportsUserTiming) {
  15980. return;
  15981. }
  15982. var count = effectCountInCurrentCommit;
  15983. effectCountInCurrentCommit = 0;
  15984. endMark("(Committing Host Effects: " + count + " Total)", '(Committing Host Effects)', null);
  15985. }
  15986. }
  15987. function startCommitLifeCyclesTimer() {
  15988. {
  15989. if (!supportsUserTiming) {
  15990. return;
  15991. }
  15992. effectCountInCurrentCommit = 0;
  15993. beginMark('(Calling Lifecycle Methods)');
  15994. }
  15995. }
  15996. function stopCommitLifeCyclesTimer() {
  15997. {
  15998. if (!supportsUserTiming) {
  15999. return;
  16000. }
  16001. var count = effectCountInCurrentCommit;
  16002. effectCountInCurrentCommit = 0;
  16003. endMark("(Calling Lifecycle Methods: " + count + " Total)", '(Calling Lifecycle Methods)', null);
  16004. }
  16005. }
  16006. var valueStack = [];
  16007. var fiberStack;
  16008. {
  16009. fiberStack = [];
  16010. }
  16011. var index = -1;
  16012. function createCursor(defaultValue) {
  16013. return {
  16014. current: defaultValue
  16015. };
  16016. }
  16017. function pop(cursor, fiber) {
  16018. if (index < 0) {
  16019. {
  16020. error('Unexpected pop.');
  16021. }
  16022. return;
  16023. }
  16024. {
  16025. if (fiber !== fiberStack[index]) {
  16026. error('Unexpected Fiber popped.');
  16027. }
  16028. }
  16029. cursor.current = valueStack[index];
  16030. valueStack[index] = null;
  16031. {
  16032. fiberStack[index] = null;
  16033. }
  16034. index--;
  16035. }
  16036. function push(cursor, value, fiber) {
  16037. index++;
  16038. valueStack[index] = cursor.current;
  16039. {
  16040. fiberStack[index] = fiber;
  16041. }
  16042. cursor.current = value;
  16043. }
  16044. var warnedAboutMissingGetChildContext;
  16045. {
  16046. warnedAboutMissingGetChildContext = {};
  16047. }
  16048. var emptyContextObject = {};
  16049. {
  16050. Object.freeze(emptyContextObject);
  16051. } // A cursor to the current merged context object on the stack.
  16052. var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
  16053. var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
  16054. // We use this to get access to the parent context after we have already
  16055. // pushed the next context provider, and now need to merge their contexts.
  16056. var previousContext = emptyContextObject;
  16057. function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
  16058. {
  16059. if (didPushOwnContextIfProvider && isContextProvider(Component)) {
  16060. // If the fiber is a context provider itself, when we read its context
  16061. // we may have already pushed its own child context on the stack. A context
  16062. // provider should not "see" its own child context. Therefore we read the
  16063. // previous (parent) context instead for a context provider.
  16064. return previousContext;
  16065. }
  16066. return contextStackCursor.current;
  16067. }
  16068. }
  16069. function cacheContext(workInProgress, unmaskedContext, maskedContext) {
  16070. {
  16071. var instance = workInProgress.stateNode;
  16072. instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
  16073. instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
  16074. }
  16075. }
  16076. function getMaskedContext(workInProgress, unmaskedContext) {
  16077. {
  16078. var type = workInProgress.type;
  16079. var contextTypes = type.contextTypes;
  16080. if (!contextTypes) {
  16081. return emptyContextObject;
  16082. } // Avoid recreating masked context unless unmasked context has changed.
  16083. // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
  16084. // This may trigger infinite loops if componentWillReceiveProps calls setState.
  16085. var instance = workInProgress.stateNode;
  16086. if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
  16087. return instance.__reactInternalMemoizedMaskedChildContext;
  16088. }
  16089. var context = {};
  16090. for (var key in contextTypes) {
  16091. context[key] = unmaskedContext[key];
  16092. }
  16093. {
  16094. var name = getComponentName(type) || 'Unknown';
  16095. checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
  16096. } // Cache unmasked context so we can avoid recreating masked context unless necessary.
  16097. // Context is created before the class component is instantiated so check for instance.
  16098. if (instance) {
  16099. cacheContext(workInProgress, unmaskedContext, context);
  16100. }
  16101. return context;
  16102. }
  16103. }
  16104. function hasContextChanged() {
  16105. {
  16106. return didPerformWorkStackCursor.current;
  16107. }
  16108. }
  16109. function isContextProvider(type) {
  16110. {
  16111. var childContextTypes = type.childContextTypes;
  16112. return childContextTypes !== null && childContextTypes !== undefined;
  16113. }
  16114. }
  16115. function popContext(fiber) {
  16116. {
  16117. pop(didPerformWorkStackCursor, fiber);
  16118. pop(contextStackCursor, fiber);
  16119. }
  16120. }
  16121. function popTopLevelContextObject(fiber) {
  16122. {
  16123. pop(didPerformWorkStackCursor, fiber);
  16124. pop(contextStackCursor, fiber);
  16125. }
  16126. }
  16127. function pushTopLevelContextObject(fiber, context, didChange) {
  16128. {
  16129. if (!(contextStackCursor.current === emptyContextObject)) {
  16130. {
  16131. throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." );
  16132. }
  16133. }
  16134. push(contextStackCursor, context, fiber);
  16135. push(didPerformWorkStackCursor, didChange, fiber);
  16136. }
  16137. }
  16138. function processChildContext(fiber, type, parentContext) {
  16139. {
  16140. var instance = fiber.stateNode;
  16141. var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
  16142. // It has only been added in Fiber to match the (unintentional) behavior in Stack.
  16143. if (typeof instance.getChildContext !== 'function') {
  16144. {
  16145. var componentName = getComponentName(type) || 'Unknown';
  16146. if (!warnedAboutMissingGetChildContext[componentName]) {
  16147. warnedAboutMissingGetChildContext[componentName] = true;
  16148. error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
  16149. }
  16150. }
  16151. return parentContext;
  16152. }
  16153. var childContext;
  16154. startPhaseTimer(fiber, 'getChildContext');
  16155. childContext = instance.getChildContext();
  16156. stopPhaseTimer();
  16157. for (var contextKey in childContext) {
  16158. if (!(contextKey in childContextTypes)) {
  16159. {
  16160. throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
  16161. }
  16162. }
  16163. }
  16164. {
  16165. var name = getComponentName(type) || 'Unknown';
  16166. checkPropTypes(childContextTypes, childContext, 'child context', name, // In practice, there is one case in which we won't get a stack. It's when
  16167. // somebody calls unstable_renderSubtreeIntoContainer() and we process
  16168. // context from the parent component instance. The stack will be missing
  16169. // because it's outside of the reconciliation, and so the pointer has not
  16170. // been set. This is rare and doesn't matter. We'll also remove that API.
  16171. getCurrentFiberStackInDev);
  16172. }
  16173. return _assign({}, parentContext, {}, childContext);
  16174. }
  16175. }
  16176. function pushContextProvider(workInProgress) {
  16177. {
  16178. var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
  16179. // If the instance does not exist yet, we will push null at first,
  16180. // and replace it on the stack later when invalidating the context.
  16181. var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
  16182. // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
  16183. previousContext = contextStackCursor.current;
  16184. push(contextStackCursor, memoizedMergedChildContext, workInProgress);
  16185. push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
  16186. return true;
  16187. }
  16188. }
  16189. function invalidateContextProvider(workInProgress, type, didChange) {
  16190. {
  16191. var instance = workInProgress.stateNode;
  16192. if (!instance) {
  16193. {
  16194. throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." );
  16195. }
  16196. }
  16197. if (didChange) {
  16198. // Merge parent and own context.
  16199. // Skip this if we're not updating due to sCU.
  16200. // This avoids unnecessarily recomputing memoized values.
  16201. var mergedContext = processChildContext(workInProgress, type, previousContext);
  16202. instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
  16203. // It is important to unwind the context in the reverse order.
  16204. pop(didPerformWorkStackCursor, workInProgress);
  16205. pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.
  16206. push(contextStackCursor, mergedContext, workInProgress);
  16207. push(didPerformWorkStackCursor, didChange, workInProgress);
  16208. } else {
  16209. pop(didPerformWorkStackCursor, workInProgress);
  16210. push(didPerformWorkStackCursor, didChange, workInProgress);
  16211. }
  16212. }
  16213. }
  16214. function findCurrentUnmaskedContext(fiber) {
  16215. {
  16216. // Currently this is only used with renderSubtreeIntoContainer; not sure if it
  16217. // makes sense elsewhere
  16218. if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
  16219. {
  16220. throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." );
  16221. }
  16222. }
  16223. var node = fiber;
  16224. do {
  16225. switch (node.tag) {
  16226. case HostRoot:
  16227. return node.stateNode.context;
  16228. case ClassComponent:
  16229. {
  16230. var Component = node.type;
  16231. if (isContextProvider(Component)) {
  16232. return node.stateNode.__reactInternalMemoizedMergedChildContext;
  16233. }
  16234. break;
  16235. }
  16236. }
  16237. node = node.return;
  16238. } while (node !== null);
  16239. {
  16240. {
  16241. throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
  16242. }
  16243. }
  16244. }
  16245. }
  16246. var LegacyRoot = 0;
  16247. var BlockingRoot = 1;
  16248. var ConcurrentRoot = 2;
  16249. var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
  16250. Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
  16251. Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
  16252. Scheduler_shouldYield = Scheduler.unstable_shouldYield,
  16253. Scheduler_requestPaint = Scheduler.unstable_requestPaint,
  16254. Scheduler_now = Scheduler.unstable_now,
  16255. Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
  16256. Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
  16257. Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  16258. Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
  16259. Scheduler_LowPriority = Scheduler.unstable_LowPriority,
  16260. Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
  16261. {
  16262. // Provide explicit error message when production+profiling bundle of e.g.
  16263. // react-dom is used with production (non-profiling) bundle of
  16264. // scheduler/tracing
  16265. if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
  16266. {
  16267. throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" );
  16268. }
  16269. }
  16270. }
  16271. var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use
  16272. // ascending numbers so we can compare them like numbers. They start at 90 to
  16273. // avoid clashing with Scheduler's priorities.
  16274. var ImmediatePriority = 99;
  16275. var UserBlockingPriority$1 = 98;
  16276. var NormalPriority = 97;
  16277. var LowPriority = 96;
  16278. var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
  16279. var NoPriority = 90;
  16280. var shouldYield = Scheduler_shouldYield;
  16281. var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
  16282. Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
  16283. var syncQueue = null;
  16284. var immediateQueueCallbackNode = null;
  16285. var isFlushingSyncQueue = false;
  16286. var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
  16287. // This will be the case for modern browsers that support `performance.now`. In
  16288. // older browsers, Scheduler falls back to `Date.now`, which returns a Unix
  16289. // timestamp. In that case, subtract the module initialization time to simulate
  16290. // the behavior of performance.now and keep our times small enough to fit
  16291. // within 32 bits.
  16292. // TODO: Consider lifting this into Scheduler.
  16293. var now = initialTimeMs < 10000 ? Scheduler_now : function () {
  16294. return Scheduler_now() - initialTimeMs;
  16295. };
  16296. function getCurrentPriorityLevel() {
  16297. switch (Scheduler_getCurrentPriorityLevel()) {
  16298. case Scheduler_ImmediatePriority:
  16299. return ImmediatePriority;
  16300. case Scheduler_UserBlockingPriority:
  16301. return UserBlockingPriority$1;
  16302. case Scheduler_NormalPriority:
  16303. return NormalPriority;
  16304. case Scheduler_LowPriority:
  16305. return LowPriority;
  16306. case Scheduler_IdlePriority:
  16307. return IdlePriority;
  16308. default:
  16309. {
  16310. {
  16311. throw Error( "Unknown priority level." );
  16312. }
  16313. }
  16314. }
  16315. }
  16316. function reactPriorityToSchedulerPriority(reactPriorityLevel) {
  16317. switch (reactPriorityLevel) {
  16318. case ImmediatePriority:
  16319. return Scheduler_ImmediatePriority;
  16320. case UserBlockingPriority$1:
  16321. return Scheduler_UserBlockingPriority;
  16322. case NormalPriority:
  16323. return Scheduler_NormalPriority;
  16324. case LowPriority:
  16325. return Scheduler_LowPriority;
  16326. case IdlePriority:
  16327. return Scheduler_IdlePriority;
  16328. default:
  16329. {
  16330. {
  16331. throw Error( "Unknown priority level." );
  16332. }
  16333. }
  16334. }
  16335. }
  16336. function runWithPriority$1(reactPriorityLevel, fn) {
  16337. var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  16338. return Scheduler_runWithPriority(priorityLevel, fn);
  16339. }
  16340. function scheduleCallback(reactPriorityLevel, callback, options) {
  16341. var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  16342. return Scheduler_scheduleCallback(priorityLevel, callback, options);
  16343. }
  16344. function scheduleSyncCallback(callback) {
  16345. // Push this callback into an internal queue. We'll flush these either in
  16346. // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
  16347. if (syncQueue === null) {
  16348. syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.
  16349. immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
  16350. } else {
  16351. // Push onto existing queue. Don't need to schedule a callback because
  16352. // we already scheduled one when we created the queue.
  16353. syncQueue.push(callback);
  16354. }
  16355. return fakeCallbackNode;
  16356. }
  16357. function cancelCallback(callbackNode) {
  16358. if (callbackNode !== fakeCallbackNode) {
  16359. Scheduler_cancelCallback(callbackNode);
  16360. }
  16361. }
  16362. function flushSyncCallbackQueue() {
  16363. if (immediateQueueCallbackNode !== null) {
  16364. var node = immediateQueueCallbackNode;
  16365. immediateQueueCallbackNode = null;
  16366. Scheduler_cancelCallback(node);
  16367. }
  16368. flushSyncCallbackQueueImpl();
  16369. }
  16370. function flushSyncCallbackQueueImpl() {
  16371. if (!isFlushingSyncQueue && syncQueue !== null) {
  16372. // Prevent re-entrancy.
  16373. isFlushingSyncQueue = true;
  16374. var i = 0;
  16375. try {
  16376. var _isSync = true;
  16377. var queue = syncQueue;
  16378. runWithPriority$1(ImmediatePriority, function () {
  16379. for (; i < queue.length; i++) {
  16380. var callback = queue[i];
  16381. do {
  16382. callback = callback(_isSync);
  16383. } while (callback !== null);
  16384. }
  16385. });
  16386. syncQueue = null;
  16387. } catch (error) {
  16388. // If something throws, leave the remaining callbacks on the queue.
  16389. if (syncQueue !== null) {
  16390. syncQueue = syncQueue.slice(i + 1);
  16391. } // Resume flushing in the next tick
  16392. Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
  16393. throw error;
  16394. } finally {
  16395. isFlushingSyncQueue = false;
  16396. }
  16397. }
  16398. }
  16399. var NoMode = 0;
  16400. var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
  16401. // tag instead
  16402. var BlockingMode = 2;
  16403. var ConcurrentMode = 4;
  16404. var ProfileMode = 8;
  16405. // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
  16406. // Math.pow(2, 30) - 1
  16407. // 0b111111111111111111111111111111
  16408. var MAX_SIGNED_31_BIT_INT = 1073741823;
  16409. var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that
  16410. // Never work can be committed in an inconsistent state without tearing the UI.
  16411. // The main example is offscreen content, like a hidden subtree. So one possible
  16412. // name is Offscreen. However, it also includes dehydrated Suspense boundaries,
  16413. // which are inconsistent in the sense that they haven't finished yet, but
  16414. // aren't visibly inconsistent because the server rendered HTML matches what the
  16415. // hydrated tree would look like.
  16416. var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in
  16417. // order to be consistent.
  16418. var Idle = 2; // Continuous Hydration is slightly higher than Idle and is used to increase
  16419. // priority of hover targets.
  16420. var ContinuousHydration = 3;
  16421. var Sync = MAX_SIGNED_31_BIT_INT;
  16422. var Batched = Sync - 1;
  16423. var UNIT_SIZE = 10;
  16424. var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms.
  16425. function msToExpirationTime(ms) {
  16426. // Always subtract from the offset so that we don't clash with the magic number for NoWork.
  16427. return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
  16428. }
  16429. function expirationTimeToMs(expirationTime) {
  16430. return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
  16431. }
  16432. function ceiling(num, precision) {
  16433. return ((num / precision | 0) + 1) * precision;
  16434. }
  16435. function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
  16436. return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
  16437. } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update
  16438. // the names to reflect.
  16439. var LOW_PRIORITY_EXPIRATION = 5000;
  16440. var LOW_PRIORITY_BATCH_SIZE = 250;
  16441. function computeAsyncExpiration(currentTime) {
  16442. return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
  16443. }
  16444. function computeSuspenseExpiration(currentTime, timeoutMs) {
  16445. // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?
  16446. return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);
  16447. } // We intentionally set a higher expiration time for interactive updates in
  16448. // dev than in production.
  16449. //
  16450. // If the main thread is being blocked so long that you hit the expiration,
  16451. // it's a problem that could be solved with better scheduling.
  16452. //
  16453. // People will be more likely to notice this and fix it with the long
  16454. // expiration time in development.
  16455. //
  16456. // In production we opt for better UX at the risk of masking scheduling
  16457. // problems, by expiring fast.
  16458. var HIGH_PRIORITY_EXPIRATION = 500 ;
  16459. var HIGH_PRIORITY_BATCH_SIZE = 100;
  16460. function computeInteractiveExpiration(currentTime) {
  16461. return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
  16462. }
  16463. function inferPriorityFromExpirationTime(currentTime, expirationTime) {
  16464. if (expirationTime === Sync) {
  16465. return ImmediatePriority;
  16466. }
  16467. if (expirationTime === Never || expirationTime === Idle) {
  16468. return IdlePriority;
  16469. }
  16470. var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);
  16471. if (msUntil <= 0) {
  16472. return ImmediatePriority;
  16473. }
  16474. if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {
  16475. return UserBlockingPriority$1;
  16476. }
  16477. if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {
  16478. return NormalPriority;
  16479. } // TODO: Handle LowPriority
  16480. // Assume anything lower has idle priority
  16481. return IdlePriority;
  16482. }
  16483. var ReactStrictModeWarnings = {
  16484. recordUnsafeLifecycleWarnings: function (fiber, instance) {},
  16485. flushPendingUnsafeLifecycleWarnings: function () {},
  16486. recordLegacyContextWarning: function (fiber, instance) {},
  16487. flushLegacyContextWarning: function () {},
  16488. discardPendingWarnings: function () {}
  16489. };
  16490. {
  16491. var findStrictRoot = function (fiber) {
  16492. var maybeStrictRoot = null;
  16493. var node = fiber;
  16494. while (node !== null) {
  16495. if (node.mode & StrictMode) {
  16496. maybeStrictRoot = node;
  16497. }
  16498. node = node.return;
  16499. }
  16500. return maybeStrictRoot;
  16501. };
  16502. var setToSortedString = function (set) {
  16503. var array = [];
  16504. set.forEach(function (value) {
  16505. array.push(value);
  16506. });
  16507. return array.sort().join(', ');
  16508. };
  16509. var pendingComponentWillMountWarnings = [];
  16510. var pendingUNSAFE_ComponentWillMountWarnings = [];
  16511. var pendingComponentWillReceivePropsWarnings = [];
  16512. var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
  16513. var pendingComponentWillUpdateWarnings = [];
  16514. var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.
  16515. var didWarnAboutUnsafeLifecycles = new Set();
  16516. ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
  16517. // Dedup strategy: Warn once per component.
  16518. if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
  16519. return;
  16520. }
  16521. if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
  16522. instance.componentWillMount.__suppressDeprecationWarning !== true) {
  16523. pendingComponentWillMountWarnings.push(fiber);
  16524. }
  16525. if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
  16526. pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
  16527. }
  16528. if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
  16529. pendingComponentWillReceivePropsWarnings.push(fiber);
  16530. }
  16531. if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
  16532. pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
  16533. }
  16534. if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
  16535. pendingComponentWillUpdateWarnings.push(fiber);
  16536. }
  16537. if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
  16538. pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
  16539. }
  16540. };
  16541. ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
  16542. // We do an initial pass to gather component names
  16543. var componentWillMountUniqueNames = new Set();
  16544. if (pendingComponentWillMountWarnings.length > 0) {
  16545. pendingComponentWillMountWarnings.forEach(function (fiber) {
  16546. componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
  16547. didWarnAboutUnsafeLifecycles.add(fiber.type);
  16548. });
  16549. pendingComponentWillMountWarnings = [];
  16550. }
  16551. var UNSAFE_componentWillMountUniqueNames = new Set();
  16552. if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
  16553. pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
  16554. UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
  16555. didWarnAboutUnsafeLifecycles.add(fiber.type);
  16556. });
  16557. pendingUNSAFE_ComponentWillMountWarnings = [];
  16558. }
  16559. var componentWillReceivePropsUniqueNames = new Set();
  16560. if (pendingComponentWillReceivePropsWarnings.length > 0) {
  16561. pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
  16562. componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
  16563. didWarnAboutUnsafeLifecycles.add(fiber.type);
  16564. });
  16565. pendingComponentWillReceivePropsWarnings = [];
  16566. }
  16567. var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
  16568. if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
  16569. pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
  16570. UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
  16571. didWarnAboutUnsafeLifecycles.add(fiber.type);
  16572. });
  16573. pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
  16574. }
  16575. var componentWillUpdateUniqueNames = new Set();
  16576. if (pendingComponentWillUpdateWarnings.length > 0) {
  16577. pendingComponentWillUpdateWarnings.forEach(function (fiber) {
  16578. componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
  16579. didWarnAboutUnsafeLifecycles.add(fiber.type);
  16580. });
  16581. pendingComponentWillUpdateWarnings = [];
  16582. }
  16583. var UNSAFE_componentWillUpdateUniqueNames = new Set();
  16584. if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
  16585. pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
  16586. UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
  16587. didWarnAboutUnsafeLifecycles.add(fiber.type);
  16588. });
  16589. pendingUNSAFE_ComponentWillUpdateWarnings = [];
  16590. } // Finally, we flush all the warnings
  16591. // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
  16592. if (UNSAFE_componentWillMountUniqueNames.size > 0) {
  16593. var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
  16594. error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
  16595. }
  16596. if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
  16597. var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
  16598. error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
  16599. }
  16600. if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
  16601. var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
  16602. error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
  16603. }
  16604. if (componentWillMountUniqueNames.size > 0) {
  16605. var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
  16606. warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
  16607. }
  16608. if (componentWillReceivePropsUniqueNames.size > 0) {
  16609. var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
  16610. warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
  16611. }
  16612. if (componentWillUpdateUniqueNames.size > 0) {
  16613. var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
  16614. warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
  16615. }
  16616. };
  16617. var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.
  16618. var didWarnAboutLegacyContext = new Set();
  16619. ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
  16620. var strictRoot = findStrictRoot(fiber);
  16621. if (strictRoot === null) {
  16622. error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
  16623. return;
  16624. } // Dedup strategy: Warn once per component.
  16625. if (didWarnAboutLegacyContext.has(fiber.type)) {
  16626. return;
  16627. }
  16628. var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
  16629. if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
  16630. if (warningsForRoot === undefined) {
  16631. warningsForRoot = [];
  16632. pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
  16633. }
  16634. warningsForRoot.push(fiber);
  16635. }
  16636. };
  16637. ReactStrictModeWarnings.flushLegacyContextWarning = function () {
  16638. pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
  16639. if (fiberArray.length === 0) {
  16640. return;
  16641. }
  16642. var firstFiber = fiberArray[0];
  16643. var uniqueNames = new Set();
  16644. fiberArray.forEach(function (fiber) {
  16645. uniqueNames.add(getComponentName(fiber.type) || 'Component');
  16646. didWarnAboutLegacyContext.add(fiber.type);
  16647. });
  16648. var sortedNames = setToSortedString(uniqueNames);
  16649. var firstComponentStack = getStackByFiberInDevAndProd(firstFiber);
  16650. error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + '%s', sortedNames, firstComponentStack);
  16651. });
  16652. };
  16653. ReactStrictModeWarnings.discardPendingWarnings = function () {
  16654. pendingComponentWillMountWarnings = [];
  16655. pendingUNSAFE_ComponentWillMountWarnings = [];
  16656. pendingComponentWillReceivePropsWarnings = [];
  16657. pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
  16658. pendingComponentWillUpdateWarnings = [];
  16659. pendingUNSAFE_ComponentWillUpdateWarnings = [];
  16660. pendingLegacyContextWarning = new Map();
  16661. };
  16662. }
  16663. var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
  16664. var failedBoundaries = null;
  16665. var setRefreshHandler = function (handler) {
  16666. {
  16667. resolveFamily = handler;
  16668. }
  16669. };
  16670. function resolveFunctionForHotReloading(type) {
  16671. {
  16672. if (resolveFamily === null) {
  16673. // Hot reloading is disabled.
  16674. return type;
  16675. }
  16676. var family = resolveFamily(type);
  16677. if (family === undefined) {
  16678. return type;
  16679. } // Use the latest known implementation.
  16680. return family.current;
  16681. }
  16682. }
  16683. function resolveClassForHotReloading(type) {
  16684. // No implementation differences.
  16685. return resolveFunctionForHotReloading(type);
  16686. }
  16687. function resolveForwardRefForHotReloading(type) {
  16688. {
  16689. if (resolveFamily === null) {
  16690. // Hot reloading is disabled.
  16691. return type;
  16692. }
  16693. var family = resolveFamily(type);
  16694. if (family === undefined) {
  16695. // Check if we're dealing with a real forwardRef. Don't want to crash early.
  16696. if (type !== null && type !== undefined && typeof type.render === 'function') {
  16697. // ForwardRef is special because its resolved .type is an object,
  16698. // but it's possible that we only have its inner render function in the map.
  16699. // If that inner render function is different, we'll build a new forwardRef type.
  16700. var currentRender = resolveFunctionForHotReloading(type.render);
  16701. if (type.render !== currentRender) {
  16702. var syntheticType = {
  16703. $$typeof: REACT_FORWARD_REF_TYPE,
  16704. render: currentRender
  16705. };
  16706. if (type.displayName !== undefined) {
  16707. syntheticType.displayName = type.displayName;
  16708. }
  16709. return syntheticType;
  16710. }
  16711. }
  16712. return type;
  16713. } // Use the latest known implementation.
  16714. return family.current;
  16715. }
  16716. }
  16717. function isCompatibleFamilyForHotReloading(fiber, element) {
  16718. {
  16719. if (resolveFamily === null) {
  16720. // Hot reloading is disabled.
  16721. return false;
  16722. }
  16723. var prevType = fiber.elementType;
  16724. var nextType = element.type; // If we got here, we know types aren't === equal.
  16725. var needsCompareFamilies = false;
  16726. var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
  16727. switch (fiber.tag) {
  16728. case ClassComponent:
  16729. {
  16730. if (typeof nextType === 'function') {
  16731. needsCompareFamilies = true;
  16732. }
  16733. break;
  16734. }
  16735. case FunctionComponent:
  16736. {
  16737. if (typeof nextType === 'function') {
  16738. needsCompareFamilies = true;
  16739. } else if ($$typeofNextType === REACT_LAZY_TYPE) {
  16740. // We don't know the inner type yet.
  16741. // We're going to assume that the lazy inner type is stable,
  16742. // and so it is sufficient to avoid reconciling it away.
  16743. // We're not going to unwrap or actually use the new lazy type.
  16744. needsCompareFamilies = true;
  16745. }
  16746. break;
  16747. }
  16748. case ForwardRef:
  16749. {
  16750. if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
  16751. needsCompareFamilies = true;
  16752. } else if ($$typeofNextType === REACT_LAZY_TYPE) {
  16753. needsCompareFamilies = true;
  16754. }
  16755. break;
  16756. }
  16757. case MemoComponent:
  16758. case SimpleMemoComponent:
  16759. {
  16760. if ($$typeofNextType === REACT_MEMO_TYPE) {
  16761. // TODO: if it was but can no longer be simple,
  16762. // we shouldn't set this.
  16763. needsCompareFamilies = true;
  16764. } else if ($$typeofNextType === REACT_LAZY_TYPE) {
  16765. needsCompareFamilies = true;
  16766. }
  16767. break;
  16768. }
  16769. default:
  16770. return false;
  16771. } // Check if both types have a family and it's the same one.
  16772. if (needsCompareFamilies) {
  16773. // Note: memo() and forwardRef() we'll compare outer rather than inner type.
  16774. // This means both of them need to be registered to preserve state.
  16775. // If we unwrapped and compared the inner types for wrappers instead,
  16776. // then we would risk falsely saying two separate memo(Foo)
  16777. // calls are equivalent because they wrap the same Foo function.
  16778. var prevFamily = resolveFamily(prevType);
  16779. if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
  16780. return true;
  16781. }
  16782. }
  16783. return false;
  16784. }
  16785. }
  16786. function markFailedErrorBoundaryForHotReloading(fiber) {
  16787. {
  16788. if (resolveFamily === null) {
  16789. // Hot reloading is disabled.
  16790. return;
  16791. }
  16792. if (typeof WeakSet !== 'function') {
  16793. return;
  16794. }
  16795. if (failedBoundaries === null) {
  16796. failedBoundaries = new WeakSet();
  16797. }
  16798. failedBoundaries.add(fiber);
  16799. }
  16800. }
  16801. var scheduleRefresh = function (root, update) {
  16802. {
  16803. if (resolveFamily === null) {
  16804. // Hot reloading is disabled.
  16805. return;
  16806. }
  16807. var staleFamilies = update.staleFamilies,
  16808. updatedFamilies = update.updatedFamilies;
  16809. flushPassiveEffects();
  16810. flushSync(function () {
  16811. scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
  16812. });
  16813. }
  16814. };
  16815. var scheduleRoot = function (root, element) {
  16816. {
  16817. if (root.context !== emptyContextObject) {
  16818. // Super edge case: root has a legacy _renderSubtree context
  16819. // but we don't know the parentComponent so we can't pass it.
  16820. // Just ignore. We'll delete this with _renderSubtree code path later.
  16821. return;
  16822. }
  16823. flushPassiveEffects();
  16824. syncUpdates(function () {
  16825. updateContainer(element, root, null, null);
  16826. });
  16827. }
  16828. };
  16829. function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
  16830. {
  16831. var alternate = fiber.alternate,
  16832. child = fiber.child,
  16833. sibling = fiber.sibling,
  16834. tag = fiber.tag,
  16835. type = fiber.type;
  16836. var candidateType = null;
  16837. switch (tag) {
  16838. case FunctionComponent:
  16839. case SimpleMemoComponent:
  16840. case ClassComponent:
  16841. candidateType = type;
  16842. break;
  16843. case ForwardRef:
  16844. candidateType = type.render;
  16845. break;
  16846. }
  16847. if (resolveFamily === null) {
  16848. throw new Error('Expected resolveFamily to be set during hot reload.');
  16849. }
  16850. var needsRender = false;
  16851. var needsRemount = false;
  16852. if (candidateType !== null) {
  16853. var family = resolveFamily(candidateType);
  16854. if (family !== undefined) {
  16855. if (staleFamilies.has(family)) {
  16856. needsRemount = true;
  16857. } else if (updatedFamilies.has(family)) {
  16858. if (tag === ClassComponent) {
  16859. needsRemount = true;
  16860. } else {
  16861. needsRender = true;
  16862. }
  16863. }
  16864. }
  16865. }
  16866. if (failedBoundaries !== null) {
  16867. if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
  16868. needsRemount = true;
  16869. }
  16870. }
  16871. if (needsRemount) {
  16872. fiber._debugNeedsRemount = true;
  16873. }
  16874. if (needsRemount || needsRender) {
  16875. scheduleWork(fiber, Sync);
  16876. }
  16877. if (child !== null && !needsRemount) {
  16878. scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
  16879. }
  16880. if (sibling !== null) {
  16881. scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
  16882. }
  16883. }
  16884. }
  16885. var findHostInstancesForRefresh = function (root, families) {
  16886. {
  16887. var hostInstances = new Set();
  16888. var types = new Set(families.map(function (family) {
  16889. return family.current;
  16890. }));
  16891. findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
  16892. return hostInstances;
  16893. }
  16894. };
  16895. function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
  16896. {
  16897. var child = fiber.child,
  16898. sibling = fiber.sibling,
  16899. tag = fiber.tag,
  16900. type = fiber.type;
  16901. var candidateType = null;
  16902. switch (tag) {
  16903. case FunctionComponent:
  16904. case SimpleMemoComponent:
  16905. case ClassComponent:
  16906. candidateType = type;
  16907. break;
  16908. case ForwardRef:
  16909. candidateType = type.render;
  16910. break;
  16911. }
  16912. var didMatch = false;
  16913. if (candidateType !== null) {
  16914. if (types.has(candidateType)) {
  16915. didMatch = true;
  16916. }
  16917. }
  16918. if (didMatch) {
  16919. // We have a match. This only drills down to the closest host components.
  16920. // There's no need to search deeper because for the purpose of giving
  16921. // visual feedback, "flashing" outermost parent rectangles is sufficient.
  16922. findHostInstancesForFiberShallowly(fiber, hostInstances);
  16923. } else {
  16924. // If there's no match, maybe there will be one further down in the child tree.
  16925. if (child !== null) {
  16926. findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
  16927. }
  16928. }
  16929. if (sibling !== null) {
  16930. findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
  16931. }
  16932. }
  16933. }
  16934. function findHostInstancesForFiberShallowly(fiber, hostInstances) {
  16935. {
  16936. var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
  16937. if (foundHostInstances) {
  16938. return;
  16939. } // If we didn't find any host children, fallback to closest host parent.
  16940. var node = fiber;
  16941. while (true) {
  16942. switch (node.tag) {
  16943. case HostComponent:
  16944. hostInstances.add(node.stateNode);
  16945. return;
  16946. case HostPortal:
  16947. hostInstances.add(node.stateNode.containerInfo);
  16948. return;
  16949. case HostRoot:
  16950. hostInstances.add(node.stateNode.containerInfo);
  16951. return;
  16952. }
  16953. if (node.return === null) {
  16954. throw new Error('Expected to reach root first.');
  16955. }
  16956. node = node.return;
  16957. }
  16958. }
  16959. }
  16960. function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
  16961. {
  16962. var node = fiber;
  16963. var foundHostInstances = false;
  16964. while (true) {
  16965. if (node.tag === HostComponent) {
  16966. // We got a match.
  16967. foundHostInstances = true;
  16968. hostInstances.add(node.stateNode); // There may still be more, so keep searching.
  16969. } else if (node.child !== null) {
  16970. node.child.return = node;
  16971. node = node.child;
  16972. continue;
  16973. }
  16974. if (node === fiber) {
  16975. return foundHostInstances;
  16976. }
  16977. while (node.sibling === null) {
  16978. if (node.return === null || node.return === fiber) {
  16979. return foundHostInstances;
  16980. }
  16981. node = node.return;
  16982. }
  16983. node.sibling.return = node.return;
  16984. node = node.sibling;
  16985. }
  16986. }
  16987. return false;
  16988. }
  16989. function resolveDefaultProps(Component, baseProps) {
  16990. if (Component && Component.defaultProps) {
  16991. // Resolve default props. Taken from ReactElement
  16992. var props = _assign({}, baseProps);
  16993. var defaultProps = Component.defaultProps;
  16994. for (var propName in defaultProps) {
  16995. if (props[propName] === undefined) {
  16996. props[propName] = defaultProps[propName];
  16997. }
  16998. }
  16999. return props;
  17000. }
  17001. return baseProps;
  17002. }
  17003. function readLazyComponentType(lazyComponent) {
  17004. initializeLazyComponentType(lazyComponent);
  17005. if (lazyComponent._status !== Resolved) {
  17006. throw lazyComponent._result;
  17007. }
  17008. return lazyComponent._result;
  17009. }
  17010. var valueCursor = createCursor(null);
  17011. var rendererSigil;
  17012. {
  17013. // Use this to detect multiple renderers using the same context
  17014. rendererSigil = {};
  17015. }
  17016. var currentlyRenderingFiber = null;
  17017. var lastContextDependency = null;
  17018. var lastContextWithAllBitsObserved = null;
  17019. var isDisallowedContextReadInDEV = false;
  17020. function resetContextDependencies() {
  17021. // This is called right before React yields execution, to ensure `readContext`
  17022. // cannot be called outside the render phase.
  17023. currentlyRenderingFiber = null;
  17024. lastContextDependency = null;
  17025. lastContextWithAllBitsObserved = null;
  17026. {
  17027. isDisallowedContextReadInDEV = false;
  17028. }
  17029. }
  17030. function enterDisallowedContextReadInDEV() {
  17031. {
  17032. isDisallowedContextReadInDEV = true;
  17033. }
  17034. }
  17035. function exitDisallowedContextReadInDEV() {
  17036. {
  17037. isDisallowedContextReadInDEV = false;
  17038. }
  17039. }
  17040. function pushProvider(providerFiber, nextValue) {
  17041. var context = providerFiber.type._context;
  17042. {
  17043. push(valueCursor, context._currentValue, providerFiber);
  17044. context._currentValue = nextValue;
  17045. {
  17046. if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
  17047. error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
  17048. }
  17049. context._currentRenderer = rendererSigil;
  17050. }
  17051. }
  17052. }
  17053. function popProvider(providerFiber) {
  17054. var currentValue = valueCursor.current;
  17055. pop(valueCursor, providerFiber);
  17056. var context = providerFiber.type._context;
  17057. {
  17058. context._currentValue = currentValue;
  17059. }
  17060. }
  17061. function calculateChangedBits(context, newValue, oldValue) {
  17062. if (objectIs(oldValue, newValue)) {
  17063. // No change
  17064. return 0;
  17065. } else {
  17066. var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
  17067. {
  17068. if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
  17069. error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
  17070. }
  17071. }
  17072. return changedBits | 0;
  17073. }
  17074. }
  17075. function scheduleWorkOnParentPath(parent, renderExpirationTime) {
  17076. // Update the child expiration time of all the ancestors, including
  17077. // the alternates.
  17078. var node = parent;
  17079. while (node !== null) {
  17080. var alternate = node.alternate;
  17081. if (node.childExpirationTime < renderExpirationTime) {
  17082. node.childExpirationTime = renderExpirationTime;
  17083. if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
  17084. alternate.childExpirationTime = renderExpirationTime;
  17085. }
  17086. } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
  17087. alternate.childExpirationTime = renderExpirationTime;
  17088. } else {
  17089. // Neither alternate was updated, which means the rest of the
  17090. // ancestor path already has sufficient priority.
  17091. break;
  17092. }
  17093. node = node.return;
  17094. }
  17095. }
  17096. function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
  17097. var fiber = workInProgress.child;
  17098. if (fiber !== null) {
  17099. // Set the return pointer of the child to the work-in-progress fiber.
  17100. fiber.return = workInProgress;
  17101. }
  17102. while (fiber !== null) {
  17103. var nextFiber = void 0; // Visit this fiber.
  17104. var list = fiber.dependencies;
  17105. if (list !== null) {
  17106. nextFiber = fiber.child;
  17107. var dependency = list.firstContext;
  17108. while (dependency !== null) {
  17109. // Check if the context matches.
  17110. if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
  17111. // Match! Schedule an update on this fiber.
  17112. if (fiber.tag === ClassComponent) {
  17113. // Schedule a force update on the work-in-progress.
  17114. var update = createUpdate(renderExpirationTime, null);
  17115. update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
  17116. // update to the current fiber, too, which means it will persist even if
  17117. // this render is thrown away. Since it's a race condition, not sure it's
  17118. // worth fixing.
  17119. enqueueUpdate(fiber, update);
  17120. }
  17121. if (fiber.expirationTime < renderExpirationTime) {
  17122. fiber.expirationTime = renderExpirationTime;
  17123. }
  17124. var alternate = fiber.alternate;
  17125. if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
  17126. alternate.expirationTime = renderExpirationTime;
  17127. }
  17128. scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too.
  17129. if (list.expirationTime < renderExpirationTime) {
  17130. list.expirationTime = renderExpirationTime;
  17131. } // Since we already found a match, we can stop traversing the
  17132. // dependency list.
  17133. break;
  17134. }
  17135. dependency = dependency.next;
  17136. }
  17137. } else if (fiber.tag === ContextProvider) {
  17138. // Don't scan deeper if this is a matching provider
  17139. nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
  17140. } else {
  17141. // Traverse down.
  17142. nextFiber = fiber.child;
  17143. }
  17144. if (nextFiber !== null) {
  17145. // Set the return pointer of the child to the work-in-progress fiber.
  17146. nextFiber.return = fiber;
  17147. } else {
  17148. // No child. Traverse to next sibling.
  17149. nextFiber = fiber;
  17150. while (nextFiber !== null) {
  17151. if (nextFiber === workInProgress) {
  17152. // We're back to the root of this subtree. Exit.
  17153. nextFiber = null;
  17154. break;
  17155. }
  17156. var sibling = nextFiber.sibling;
  17157. if (sibling !== null) {
  17158. // Set the return pointer of the sibling to the work-in-progress fiber.
  17159. sibling.return = nextFiber.return;
  17160. nextFiber = sibling;
  17161. break;
  17162. } // No more siblings. Traverse up.
  17163. nextFiber = nextFiber.return;
  17164. }
  17165. }
  17166. fiber = nextFiber;
  17167. }
  17168. }
  17169. function prepareToReadContext(workInProgress, renderExpirationTime) {
  17170. currentlyRenderingFiber = workInProgress;
  17171. lastContextDependency = null;
  17172. lastContextWithAllBitsObserved = null;
  17173. var dependencies = workInProgress.dependencies;
  17174. if (dependencies !== null) {
  17175. var firstContext = dependencies.firstContext;
  17176. if (firstContext !== null) {
  17177. if (dependencies.expirationTime >= renderExpirationTime) {
  17178. // Context list has a pending update. Mark that this fiber performed work.
  17179. markWorkInProgressReceivedUpdate();
  17180. } // Reset the work-in-progress list
  17181. dependencies.firstContext = null;
  17182. }
  17183. }
  17184. }
  17185. function readContext(context, observedBits) {
  17186. {
  17187. // This warning would fire if you read context inside a Hook like useMemo.
  17188. // Unlike the class check below, it's not enforced in production for perf.
  17189. if (isDisallowedContextReadInDEV) {
  17190. error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
  17191. }
  17192. }
  17193. if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
  17194. var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.
  17195. if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
  17196. // Observe all updates.
  17197. lastContextWithAllBitsObserved = context;
  17198. resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
  17199. } else {
  17200. resolvedObservedBits = observedBits;
  17201. }
  17202. var contextItem = {
  17203. context: context,
  17204. observedBits: resolvedObservedBits,
  17205. next: null
  17206. };
  17207. if (lastContextDependency === null) {
  17208. if (!(currentlyRenderingFiber !== null)) {
  17209. {
  17210. throw Error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." );
  17211. }
  17212. } // This is the first dependency for this component. Create a new list.
  17213. lastContextDependency = contextItem;
  17214. currentlyRenderingFiber.dependencies = {
  17215. expirationTime: NoWork,
  17216. firstContext: contextItem,
  17217. responders: null
  17218. };
  17219. } else {
  17220. // Append a new context item.
  17221. lastContextDependency = lastContextDependency.next = contextItem;
  17222. }
  17223. }
  17224. return context._currentValue ;
  17225. }
  17226. var UpdateState = 0;
  17227. var ReplaceState = 1;
  17228. var ForceUpdate = 2;
  17229. var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
  17230. // It should only be read right after calling `processUpdateQueue`, via
  17231. // `checkHasForceUpdateAfterProcessing`.
  17232. var hasForceUpdate = false;
  17233. var didWarnUpdateInsideUpdate;
  17234. var currentlyProcessingQueue;
  17235. {
  17236. didWarnUpdateInsideUpdate = false;
  17237. currentlyProcessingQueue = null;
  17238. }
  17239. function initializeUpdateQueue(fiber) {
  17240. var queue = {
  17241. baseState: fiber.memoizedState,
  17242. baseQueue: null,
  17243. shared: {
  17244. pending: null
  17245. },
  17246. effects: null
  17247. };
  17248. fiber.updateQueue = queue;
  17249. }
  17250. function cloneUpdateQueue(current, workInProgress) {
  17251. // Clone the update queue from current. Unless it's already a clone.
  17252. var queue = workInProgress.updateQueue;
  17253. var currentQueue = current.updateQueue;
  17254. if (queue === currentQueue) {
  17255. var clone = {
  17256. baseState: currentQueue.baseState,
  17257. baseQueue: currentQueue.baseQueue,
  17258. shared: currentQueue.shared,
  17259. effects: currentQueue.effects
  17260. };
  17261. workInProgress.updateQueue = clone;
  17262. }
  17263. }
  17264. function createUpdate(expirationTime, suspenseConfig) {
  17265. var update = {
  17266. expirationTime: expirationTime,
  17267. suspenseConfig: suspenseConfig,
  17268. tag: UpdateState,
  17269. payload: null,
  17270. callback: null,
  17271. next: null
  17272. };
  17273. update.next = update;
  17274. {
  17275. update.priority = getCurrentPriorityLevel();
  17276. }
  17277. return update;
  17278. }
  17279. function enqueueUpdate(fiber, update) {
  17280. var updateQueue = fiber.updateQueue;
  17281. if (updateQueue === null) {
  17282. // Only occurs if the fiber has been unmounted.
  17283. return;
  17284. }
  17285. var sharedQueue = updateQueue.shared;
  17286. var pending = sharedQueue.pending;
  17287. if (pending === null) {
  17288. // This is the first update. Create a circular list.
  17289. update.next = update;
  17290. } else {
  17291. update.next = pending.next;
  17292. pending.next = update;
  17293. }
  17294. sharedQueue.pending = update;
  17295. {
  17296. if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
  17297. error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
  17298. didWarnUpdateInsideUpdate = true;
  17299. }
  17300. }
  17301. }
  17302. function enqueueCapturedUpdate(workInProgress, update) {
  17303. var current = workInProgress.alternate;
  17304. if (current !== null) {
  17305. // Ensure the work-in-progress queue is a clone
  17306. cloneUpdateQueue(current, workInProgress);
  17307. } // Captured updates go only on the work-in-progress queue.
  17308. var queue = workInProgress.updateQueue; // Append the update to the end of the list.
  17309. var last = queue.baseQueue;
  17310. if (last === null) {
  17311. queue.baseQueue = update.next = update;
  17312. update.next = update;
  17313. } else {
  17314. update.next = last.next;
  17315. last.next = update;
  17316. }
  17317. }
  17318. function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
  17319. switch (update.tag) {
  17320. case ReplaceState:
  17321. {
  17322. var payload = update.payload;
  17323. if (typeof payload === 'function') {
  17324. // Updater function
  17325. {
  17326. enterDisallowedContextReadInDEV();
  17327. if ( workInProgress.mode & StrictMode) {
  17328. payload.call(instance, prevState, nextProps);
  17329. }
  17330. }
  17331. var nextState = payload.call(instance, prevState, nextProps);
  17332. {
  17333. exitDisallowedContextReadInDEV();
  17334. }
  17335. return nextState;
  17336. } // State object
  17337. return payload;
  17338. }
  17339. case CaptureUpdate:
  17340. {
  17341. workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
  17342. }
  17343. // Intentional fallthrough
  17344. case UpdateState:
  17345. {
  17346. var _payload = update.payload;
  17347. var partialState;
  17348. if (typeof _payload === 'function') {
  17349. // Updater function
  17350. {
  17351. enterDisallowedContextReadInDEV();
  17352. if ( workInProgress.mode & StrictMode) {
  17353. _payload.call(instance, prevState, nextProps);
  17354. }
  17355. }
  17356. partialState = _payload.call(instance, prevState, nextProps);
  17357. {
  17358. exitDisallowedContextReadInDEV();
  17359. }
  17360. } else {
  17361. // Partial state object
  17362. partialState = _payload;
  17363. }
  17364. if (partialState === null || partialState === undefined) {
  17365. // Null and undefined are treated as no-ops.
  17366. return prevState;
  17367. } // Merge the partial state and the previous state.
  17368. return _assign({}, prevState, partialState);
  17369. }
  17370. case ForceUpdate:
  17371. {
  17372. hasForceUpdate = true;
  17373. return prevState;
  17374. }
  17375. }
  17376. return prevState;
  17377. }
  17378. function processUpdateQueue(workInProgress, props, instance, renderExpirationTime) {
  17379. // This is always non-null on a ClassComponent or HostRoot
  17380. var queue = workInProgress.updateQueue;
  17381. hasForceUpdate = false;
  17382. {
  17383. currentlyProcessingQueue = queue.shared;
  17384. } // The last rebase update that is NOT part of the base state.
  17385. var baseQueue = queue.baseQueue; // The last pending update that hasn't been processed yet.
  17386. var pendingQueue = queue.shared.pending;
  17387. if (pendingQueue !== null) {
  17388. // We have new updates that haven't been processed yet.
  17389. // We'll add them to the base queue.
  17390. if (baseQueue !== null) {
  17391. // Merge the pending queue and the base queue.
  17392. var baseFirst = baseQueue.next;
  17393. var pendingFirst = pendingQueue.next;
  17394. baseQueue.next = pendingFirst;
  17395. pendingQueue.next = baseFirst;
  17396. }
  17397. baseQueue = pendingQueue;
  17398. queue.shared.pending = null; // TODO: Pass `current` as argument
  17399. var current = workInProgress.alternate;
  17400. if (current !== null) {
  17401. var currentQueue = current.updateQueue;
  17402. if (currentQueue !== null) {
  17403. currentQueue.baseQueue = pendingQueue;
  17404. }
  17405. }
  17406. } // These values may change as we process the queue.
  17407. if (baseQueue !== null) {
  17408. var first = baseQueue.next; // Iterate through the list of updates to compute the result.
  17409. var newState = queue.baseState;
  17410. var newExpirationTime = NoWork;
  17411. var newBaseState = null;
  17412. var newBaseQueueFirst = null;
  17413. var newBaseQueueLast = null;
  17414. if (first !== null) {
  17415. var update = first;
  17416. do {
  17417. var updateExpirationTime = update.expirationTime;
  17418. if (updateExpirationTime < renderExpirationTime) {
  17419. // Priority is insufficient. Skip this update. If this is the first
  17420. // skipped update, the previous update/state is the new base
  17421. // update/state.
  17422. var clone = {
  17423. expirationTime: update.expirationTime,
  17424. suspenseConfig: update.suspenseConfig,
  17425. tag: update.tag,
  17426. payload: update.payload,
  17427. callback: update.callback,
  17428. next: null
  17429. };
  17430. if (newBaseQueueLast === null) {
  17431. newBaseQueueFirst = newBaseQueueLast = clone;
  17432. newBaseState = newState;
  17433. } else {
  17434. newBaseQueueLast = newBaseQueueLast.next = clone;
  17435. } // Update the remaining priority in the queue.
  17436. if (updateExpirationTime > newExpirationTime) {
  17437. newExpirationTime = updateExpirationTime;
  17438. }
  17439. } else {
  17440. // This update does have sufficient priority.
  17441. if (newBaseQueueLast !== null) {
  17442. var _clone = {
  17443. expirationTime: Sync,
  17444. // This update is going to be committed so we never want uncommit it.
  17445. suspenseConfig: update.suspenseConfig,
  17446. tag: update.tag,
  17447. payload: update.payload,
  17448. callback: update.callback,
  17449. next: null
  17450. };
  17451. newBaseQueueLast = newBaseQueueLast.next = _clone;
  17452. } // Mark the event time of this update as relevant to this render pass.
  17453. // TODO: This should ideally use the true event time of this update rather than
  17454. // its priority which is a derived and not reverseable value.
  17455. // TODO: We should skip this update if it was already committed but currently
  17456. // we have no way of detecting the difference between a committed and suspended
  17457. // update here.
  17458. markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
  17459. newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
  17460. var callback = update.callback;
  17461. if (callback !== null) {
  17462. workInProgress.effectTag |= Callback;
  17463. var effects = queue.effects;
  17464. if (effects === null) {
  17465. queue.effects = [update];
  17466. } else {
  17467. effects.push(update);
  17468. }
  17469. }
  17470. }
  17471. update = update.next;
  17472. if (update === null || update === first) {
  17473. pendingQueue = queue.shared.pending;
  17474. if (pendingQueue === null) {
  17475. break;
  17476. } else {
  17477. // An update was scheduled from inside a reducer. Add the new
  17478. // pending updates to the end of the list and keep processing.
  17479. update = baseQueue.next = pendingQueue.next;
  17480. pendingQueue.next = first;
  17481. queue.baseQueue = baseQueue = pendingQueue;
  17482. queue.shared.pending = null;
  17483. }
  17484. }
  17485. } while (true);
  17486. }
  17487. if (newBaseQueueLast === null) {
  17488. newBaseState = newState;
  17489. } else {
  17490. newBaseQueueLast.next = newBaseQueueFirst;
  17491. }
  17492. queue.baseState = newBaseState;
  17493. queue.baseQueue = newBaseQueueLast; // Set the remaining expiration time to be whatever is remaining in the queue.
  17494. // This should be fine because the only two other things that contribute to
  17495. // expiration time are props and context. We're already in the middle of the
  17496. // begin phase by the time we start processing the queue, so we've already
  17497. // dealt with the props. Context in components that specify
  17498. // shouldComponentUpdate is tricky; but we'll have to account for
  17499. // that regardless.
  17500. markUnprocessedUpdateTime(newExpirationTime);
  17501. workInProgress.expirationTime = newExpirationTime;
  17502. workInProgress.memoizedState = newState;
  17503. }
  17504. {
  17505. currentlyProcessingQueue = null;
  17506. }
  17507. }
  17508. function callCallback(callback, context) {
  17509. if (!(typeof callback === 'function')) {
  17510. {
  17511. throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback );
  17512. }
  17513. }
  17514. callback.call(context);
  17515. }
  17516. function resetHasForceUpdateBeforeProcessing() {
  17517. hasForceUpdate = false;
  17518. }
  17519. function checkHasForceUpdateAfterProcessing() {
  17520. return hasForceUpdate;
  17521. }
  17522. function commitUpdateQueue(finishedWork, finishedQueue, instance) {
  17523. // Commit the effects
  17524. var effects = finishedQueue.effects;
  17525. finishedQueue.effects = null;
  17526. if (effects !== null) {
  17527. for (var i = 0; i < effects.length; i++) {
  17528. var effect = effects[i];
  17529. var callback = effect.callback;
  17530. if (callback !== null) {
  17531. effect.callback = null;
  17532. callCallback(callback, instance);
  17533. }
  17534. }
  17535. }
  17536. }
  17537. var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
  17538. function requestCurrentSuspenseConfig() {
  17539. return ReactCurrentBatchConfig.suspense;
  17540. }
  17541. var fakeInternalInstance = {};
  17542. var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
  17543. // We'll use it to determine whether we need to initialize legacy refs.
  17544. var emptyRefsObject = new React.Component().refs;
  17545. var didWarnAboutStateAssignmentForComponent;
  17546. var didWarnAboutUninitializedState;
  17547. var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
  17548. var didWarnAboutLegacyLifecyclesAndDerivedState;
  17549. var didWarnAboutUndefinedDerivedState;
  17550. var warnOnUndefinedDerivedState;
  17551. var warnOnInvalidCallback;
  17552. var didWarnAboutDirectlyAssigningPropsToState;
  17553. var didWarnAboutContextTypeAndContextTypes;
  17554. var didWarnAboutInvalidateContextType;
  17555. {
  17556. didWarnAboutStateAssignmentForComponent = new Set();
  17557. didWarnAboutUninitializedState = new Set();
  17558. didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
  17559. didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
  17560. didWarnAboutDirectlyAssigningPropsToState = new Set();
  17561. didWarnAboutUndefinedDerivedState = new Set();
  17562. didWarnAboutContextTypeAndContextTypes = new Set();
  17563. didWarnAboutInvalidateContextType = new Set();
  17564. var didWarnOnInvalidCallback = new Set();
  17565. warnOnInvalidCallback = function (callback, callerName) {
  17566. if (callback === null || typeof callback === 'function') {
  17567. return;
  17568. }
  17569. var key = callerName + "_" + callback;
  17570. if (!didWarnOnInvalidCallback.has(key)) {
  17571. didWarnOnInvalidCallback.add(key);
  17572. error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
  17573. }
  17574. };
  17575. warnOnUndefinedDerivedState = function (type, partialState) {
  17576. if (partialState === undefined) {
  17577. var componentName = getComponentName(type) || 'Component';
  17578. if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
  17579. didWarnAboutUndefinedDerivedState.add(componentName);
  17580. error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
  17581. }
  17582. }
  17583. }; // This is so gross but it's at least non-critical and can be removed if
  17584. // it causes problems. This is meant to give a nicer error message for
  17585. // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
  17586. // ...)) which otherwise throws a "_processChildContext is not a function"
  17587. // exception.
  17588. Object.defineProperty(fakeInternalInstance, '_processChildContext', {
  17589. enumerable: false,
  17590. value: function () {
  17591. {
  17592. {
  17593. throw Error( "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)." );
  17594. }
  17595. }
  17596. }
  17597. });
  17598. Object.freeze(fakeInternalInstance);
  17599. }
  17600. function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
  17601. var prevState = workInProgress.memoizedState;
  17602. {
  17603. if ( workInProgress.mode & StrictMode) {
  17604. // Invoke the function an extra time to help detect side-effects.
  17605. getDerivedStateFromProps(nextProps, prevState);
  17606. }
  17607. }
  17608. var partialState = getDerivedStateFromProps(nextProps, prevState);
  17609. {
  17610. warnOnUndefinedDerivedState(ctor, partialState);
  17611. } // Merge the partial state and the previous state.
  17612. var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
  17613. workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
  17614. // base state.
  17615. if (workInProgress.expirationTime === NoWork) {
  17616. // Queue is always non-null for classes
  17617. var updateQueue = workInProgress.updateQueue;
  17618. updateQueue.baseState = memoizedState;
  17619. }
  17620. }
  17621. var classComponentUpdater = {
  17622. isMounted: isMounted,
  17623. enqueueSetState: function (inst, payload, callback) {
  17624. var fiber = get(inst);
  17625. var currentTime = requestCurrentTimeForUpdate();
  17626. var suspenseConfig = requestCurrentSuspenseConfig();
  17627. var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  17628. var update = createUpdate(expirationTime, suspenseConfig);
  17629. update.payload = payload;
  17630. if (callback !== undefined && callback !== null) {
  17631. {
  17632. warnOnInvalidCallback(callback, 'setState');
  17633. }
  17634. update.callback = callback;
  17635. }
  17636. enqueueUpdate(fiber, update);
  17637. scheduleWork(fiber, expirationTime);
  17638. },
  17639. enqueueReplaceState: function (inst, payload, callback) {
  17640. var fiber = get(inst);
  17641. var currentTime = requestCurrentTimeForUpdate();
  17642. var suspenseConfig = requestCurrentSuspenseConfig();
  17643. var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  17644. var update = createUpdate(expirationTime, suspenseConfig);
  17645. update.tag = ReplaceState;
  17646. update.payload = payload;
  17647. if (callback !== undefined && callback !== null) {
  17648. {
  17649. warnOnInvalidCallback(callback, 'replaceState');
  17650. }
  17651. update.callback = callback;
  17652. }
  17653. enqueueUpdate(fiber, update);
  17654. scheduleWork(fiber, expirationTime);
  17655. },
  17656. enqueueForceUpdate: function (inst, callback) {
  17657. var fiber = get(inst);
  17658. var currentTime = requestCurrentTimeForUpdate();
  17659. var suspenseConfig = requestCurrentSuspenseConfig();
  17660. var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  17661. var update = createUpdate(expirationTime, suspenseConfig);
  17662. update.tag = ForceUpdate;
  17663. if (callback !== undefined && callback !== null) {
  17664. {
  17665. warnOnInvalidCallback(callback, 'forceUpdate');
  17666. }
  17667. update.callback = callback;
  17668. }
  17669. enqueueUpdate(fiber, update);
  17670. scheduleWork(fiber, expirationTime);
  17671. }
  17672. };
  17673. function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
  17674. var instance = workInProgress.stateNode;
  17675. if (typeof instance.shouldComponentUpdate === 'function') {
  17676. {
  17677. if ( workInProgress.mode & StrictMode) {
  17678. // Invoke the function an extra time to help detect side-effects.
  17679. instance.shouldComponentUpdate(newProps, newState, nextContext);
  17680. }
  17681. }
  17682. startPhaseTimer(workInProgress, 'shouldComponentUpdate');
  17683. var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
  17684. stopPhaseTimer();
  17685. {
  17686. if (shouldUpdate === undefined) {
  17687. error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
  17688. }
  17689. }
  17690. return shouldUpdate;
  17691. }
  17692. if (ctor.prototype && ctor.prototype.isPureReactComponent) {
  17693. return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
  17694. }
  17695. return true;
  17696. }
  17697. function checkClassInstance(workInProgress, ctor, newProps) {
  17698. var instance = workInProgress.stateNode;
  17699. {
  17700. var name = getComponentName(ctor) || 'Component';
  17701. var renderPresent = instance.render;
  17702. if (!renderPresent) {
  17703. if (ctor.prototype && typeof ctor.prototype.render === 'function') {
  17704. error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
  17705. } else {
  17706. error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
  17707. }
  17708. }
  17709. if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
  17710. error('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?', name);
  17711. }
  17712. if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
  17713. error('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.', name);
  17714. }
  17715. if (instance.propTypes) {
  17716. error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
  17717. }
  17718. if (instance.contextType) {
  17719. error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
  17720. }
  17721. {
  17722. if (instance.contextTypes) {
  17723. error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
  17724. }
  17725. if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
  17726. didWarnAboutContextTypeAndContextTypes.add(ctor);
  17727. error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
  17728. }
  17729. }
  17730. if (typeof instance.componentShouldUpdate === 'function') {
  17731. error('%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.', name);
  17732. }
  17733. if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
  17734. error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
  17735. }
  17736. if (typeof instance.componentDidUnmount === 'function') {
  17737. error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
  17738. }
  17739. if (typeof instance.componentDidReceiveProps === 'function') {
  17740. error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
  17741. }
  17742. if (typeof instance.componentWillRecieveProps === 'function') {
  17743. error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
  17744. }
  17745. if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
  17746. error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
  17747. }
  17748. var hasMutatedProps = instance.props !== newProps;
  17749. if (instance.props !== undefined && hasMutatedProps) {
  17750. error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
  17751. }
  17752. if (instance.defaultProps) {
  17753. error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
  17754. }
  17755. if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
  17756. didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
  17757. error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
  17758. }
  17759. if (typeof instance.getDerivedStateFromProps === 'function') {
  17760. error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
  17761. }
  17762. if (typeof instance.getDerivedStateFromError === 'function') {
  17763. error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
  17764. }
  17765. if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
  17766. error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
  17767. }
  17768. var _state = instance.state;
  17769. if (_state && (typeof _state !== 'object' || isArray(_state))) {
  17770. error('%s.state: must be set to an object or null', name);
  17771. }
  17772. if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
  17773. error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
  17774. }
  17775. }
  17776. }
  17777. function adoptClassInstance(workInProgress, instance) {
  17778. instance.updater = classComponentUpdater;
  17779. workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
  17780. set(instance, workInProgress);
  17781. {
  17782. instance._reactInternalInstance = fakeInternalInstance;
  17783. }
  17784. }
  17785. function constructClassInstance(workInProgress, ctor, props) {
  17786. var isLegacyContextConsumer = false;
  17787. var unmaskedContext = emptyContextObject;
  17788. var context = emptyContextObject;
  17789. var contextType = ctor.contextType;
  17790. {
  17791. if ('contextType' in ctor) {
  17792. var isValid = // Allow null for conditional declaration
  17793. contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
  17794. if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
  17795. didWarnAboutInvalidateContextType.add(ctor);
  17796. var addendum = '';
  17797. if (contextType === undefined) {
  17798. addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
  17799. } else if (typeof contextType !== 'object') {
  17800. addendum = ' However, it is set to a ' + typeof contextType + '.';
  17801. } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
  17802. addendum = ' Did you accidentally pass the Context.Provider instead?';
  17803. } else if (contextType._context !== undefined) {
  17804. // <Context.Consumer>
  17805. addendum = ' Did you accidentally pass the Context.Consumer instead?';
  17806. } else {
  17807. addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
  17808. }
  17809. error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
  17810. }
  17811. }
  17812. }
  17813. if (typeof contextType === 'object' && contextType !== null) {
  17814. context = readContext(contextType);
  17815. } else {
  17816. unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
  17817. var contextTypes = ctor.contextTypes;
  17818. isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
  17819. context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
  17820. } // Instantiate twice to help detect side-effects.
  17821. {
  17822. if ( workInProgress.mode & StrictMode) {
  17823. new ctor(props, context); // eslint-disable-line no-new
  17824. }
  17825. }
  17826. var instance = new ctor(props, context);
  17827. var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
  17828. adoptClassInstance(workInProgress, instance);
  17829. {
  17830. if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
  17831. var componentName = getComponentName(ctor) || 'Component';
  17832. if (!didWarnAboutUninitializedState.has(componentName)) {
  17833. didWarnAboutUninitializedState.add(componentName);
  17834. error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
  17835. }
  17836. } // If new component APIs are defined, "unsafe" lifecycles won't be called.
  17837. // Warn about these lifecycles if they are present.
  17838. // Don't warn about react-lifecycles-compat polyfilled methods though.
  17839. if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
  17840. var foundWillMountName = null;
  17841. var foundWillReceivePropsName = null;
  17842. var foundWillUpdateName = null;
  17843. if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
  17844. foundWillMountName = 'componentWillMount';
  17845. } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
  17846. foundWillMountName = 'UNSAFE_componentWillMount';
  17847. }
  17848. if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
  17849. foundWillReceivePropsName = 'componentWillReceiveProps';
  17850. } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
  17851. foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
  17852. }
  17853. if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
  17854. foundWillUpdateName = 'componentWillUpdate';
  17855. } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
  17856. foundWillUpdateName = 'UNSAFE_componentWillUpdate';
  17857. }
  17858. if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
  17859. var _componentName = getComponentName(ctor) || 'Component';
  17860. var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
  17861. if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
  17862. didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
  17863. error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
  17864. }
  17865. }
  17866. }
  17867. } // Cache unmasked context so we can avoid recreating masked context unless necessary.
  17868. // ReactFiberContext usually updates this cache but can't for newly-created instances.
  17869. if (isLegacyContextConsumer) {
  17870. cacheContext(workInProgress, unmaskedContext, context);
  17871. }
  17872. return instance;
  17873. }
  17874. function callComponentWillMount(workInProgress, instance) {
  17875. startPhaseTimer(workInProgress, 'componentWillMount');
  17876. var oldState = instance.state;
  17877. if (typeof instance.componentWillMount === 'function') {
  17878. instance.componentWillMount();
  17879. }
  17880. if (typeof instance.UNSAFE_componentWillMount === 'function') {
  17881. instance.UNSAFE_componentWillMount();
  17882. }
  17883. stopPhaseTimer();
  17884. if (oldState !== instance.state) {
  17885. {
  17886. error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
  17887. }
  17888. classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  17889. }
  17890. }
  17891. function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
  17892. var oldState = instance.state;
  17893. startPhaseTimer(workInProgress, 'componentWillReceiveProps');
  17894. if (typeof instance.componentWillReceiveProps === 'function') {
  17895. instance.componentWillReceiveProps(newProps, nextContext);
  17896. }
  17897. if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
  17898. instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  17899. }
  17900. stopPhaseTimer();
  17901. if (instance.state !== oldState) {
  17902. {
  17903. var componentName = getComponentName(workInProgress.type) || 'Component';
  17904. if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
  17905. didWarnAboutStateAssignmentForComponent.add(componentName);
  17906. error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
  17907. }
  17908. }
  17909. classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  17910. }
  17911. } // Invokes the mount life-cycles on a previously never rendered instance.
  17912. function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
  17913. {
  17914. checkClassInstance(workInProgress, ctor, newProps);
  17915. }
  17916. var instance = workInProgress.stateNode;
  17917. instance.props = newProps;
  17918. instance.state = workInProgress.memoizedState;
  17919. instance.refs = emptyRefsObject;
  17920. initializeUpdateQueue(workInProgress);
  17921. var contextType = ctor.contextType;
  17922. if (typeof contextType === 'object' && contextType !== null) {
  17923. instance.context = readContext(contextType);
  17924. } else {
  17925. var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
  17926. instance.context = getMaskedContext(workInProgress, unmaskedContext);
  17927. }
  17928. {
  17929. if (instance.state === newProps) {
  17930. var componentName = getComponentName(ctor) || 'Component';
  17931. if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
  17932. didWarnAboutDirectlyAssigningPropsToState.add(componentName);
  17933. error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
  17934. }
  17935. }
  17936. if (workInProgress.mode & StrictMode) {
  17937. ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
  17938. }
  17939. {
  17940. ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
  17941. }
  17942. }
  17943. processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  17944. instance.state = workInProgress.memoizedState;
  17945. var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  17946. if (typeof getDerivedStateFromProps === 'function') {
  17947. applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
  17948. instance.state = workInProgress.memoizedState;
  17949. } // In order to support react-lifecycles-compat polyfilled components,
  17950. // Unsafe lifecycles should not be invoked for components using the new APIs.
  17951. if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
  17952. callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
  17953. // process them now.
  17954. processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  17955. instance.state = workInProgress.memoizedState;
  17956. }
  17957. if (typeof instance.componentDidMount === 'function') {
  17958. workInProgress.effectTag |= Update;
  17959. }
  17960. }
  17961. function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
  17962. var instance = workInProgress.stateNode;
  17963. var oldProps = workInProgress.memoizedProps;
  17964. instance.props = oldProps;
  17965. var oldContext = instance.context;
  17966. var contextType = ctor.contextType;
  17967. var nextContext = emptyContextObject;
  17968. if (typeof contextType === 'object' && contextType !== null) {
  17969. nextContext = readContext(contextType);
  17970. } else {
  17971. var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
  17972. nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
  17973. }
  17974. var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  17975. var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
  17976. // ever the previously attempted to render - not the "current". However,
  17977. // during componentDidUpdate we pass the "current" props.
  17978. // In order to support react-lifecycles-compat polyfilled components,
  17979. // Unsafe lifecycles should not be invoked for components using the new APIs.
  17980. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
  17981. if (oldProps !== newProps || oldContext !== nextContext) {
  17982. callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
  17983. }
  17984. }
  17985. resetHasForceUpdateBeforeProcessing();
  17986. var oldState = workInProgress.memoizedState;
  17987. var newState = instance.state = oldState;
  17988. processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  17989. newState = workInProgress.memoizedState;
  17990. if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
  17991. // If an update was already in progress, we should schedule an Update
  17992. // effect even though we're bailing out, so that cWU/cDU are called.
  17993. if (typeof instance.componentDidMount === 'function') {
  17994. workInProgress.effectTag |= Update;
  17995. }
  17996. return false;
  17997. }
  17998. if (typeof getDerivedStateFromProps === 'function') {
  17999. applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
  18000. newState = workInProgress.memoizedState;
  18001. }
  18002. var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
  18003. if (shouldUpdate) {
  18004. // In order to support react-lifecycles-compat polyfilled components,
  18005. // Unsafe lifecycles should not be invoked for components using the new APIs.
  18006. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
  18007. startPhaseTimer(workInProgress, 'componentWillMount');
  18008. if (typeof instance.componentWillMount === 'function') {
  18009. instance.componentWillMount();
  18010. }
  18011. if (typeof instance.UNSAFE_componentWillMount === 'function') {
  18012. instance.UNSAFE_componentWillMount();
  18013. }
  18014. stopPhaseTimer();
  18015. }
  18016. if (typeof instance.componentDidMount === 'function') {
  18017. workInProgress.effectTag |= Update;
  18018. }
  18019. } else {
  18020. // If an update was already in progress, we should schedule an Update
  18021. // effect even though we're bailing out, so that cWU/cDU are called.
  18022. if (typeof instance.componentDidMount === 'function') {
  18023. workInProgress.effectTag |= Update;
  18024. } // If shouldComponentUpdate returned false, we should still update the
  18025. // memoized state to indicate that this work can be reused.
  18026. workInProgress.memoizedProps = newProps;
  18027. workInProgress.memoizedState = newState;
  18028. } // Update the existing instance's state, props, and context pointers even
  18029. // if shouldComponentUpdate returns false.
  18030. instance.props = newProps;
  18031. instance.state = newState;
  18032. instance.context = nextContext;
  18033. return shouldUpdate;
  18034. } // Invokes the update life-cycles and returns false if it shouldn't rerender.
  18035. function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
  18036. var instance = workInProgress.stateNode;
  18037. cloneUpdateQueue(current, workInProgress);
  18038. var oldProps = workInProgress.memoizedProps;
  18039. instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);
  18040. var oldContext = instance.context;
  18041. var contextType = ctor.contextType;
  18042. var nextContext = emptyContextObject;
  18043. if (typeof contextType === 'object' && contextType !== null) {
  18044. nextContext = readContext(contextType);
  18045. } else {
  18046. var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
  18047. nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
  18048. }
  18049. var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  18050. var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
  18051. // ever the previously attempted to render - not the "current". However,
  18052. // during componentDidUpdate we pass the "current" props.
  18053. // In order to support react-lifecycles-compat polyfilled components,
  18054. // Unsafe lifecycles should not be invoked for components using the new APIs.
  18055. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
  18056. if (oldProps !== newProps || oldContext !== nextContext) {
  18057. callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
  18058. }
  18059. }
  18060. resetHasForceUpdateBeforeProcessing();
  18061. var oldState = workInProgress.memoizedState;
  18062. var newState = instance.state = oldState;
  18063. processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  18064. newState = workInProgress.memoizedState;
  18065. if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
  18066. // If an update was already in progress, we should schedule an Update
  18067. // effect even though we're bailing out, so that cWU/cDU are called.
  18068. if (typeof instance.componentDidUpdate === 'function') {
  18069. if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
  18070. workInProgress.effectTag |= Update;
  18071. }
  18072. }
  18073. if (typeof instance.getSnapshotBeforeUpdate === 'function') {
  18074. if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
  18075. workInProgress.effectTag |= Snapshot;
  18076. }
  18077. }
  18078. return false;
  18079. }
  18080. if (typeof getDerivedStateFromProps === 'function') {
  18081. applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
  18082. newState = workInProgress.memoizedState;
  18083. }
  18084. var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
  18085. if (shouldUpdate) {
  18086. // In order to support react-lifecycles-compat polyfilled components,
  18087. // Unsafe lifecycles should not be invoked for components using the new APIs.
  18088. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
  18089. startPhaseTimer(workInProgress, 'componentWillUpdate');
  18090. if (typeof instance.componentWillUpdate === 'function') {
  18091. instance.componentWillUpdate(newProps, newState, nextContext);
  18092. }
  18093. if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
  18094. instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
  18095. }
  18096. stopPhaseTimer();
  18097. }
  18098. if (typeof instance.componentDidUpdate === 'function') {
  18099. workInProgress.effectTag |= Update;
  18100. }
  18101. if (typeof instance.getSnapshotBeforeUpdate === 'function') {
  18102. workInProgress.effectTag |= Snapshot;
  18103. }
  18104. } else {
  18105. // If an update was already in progress, we should schedule an Update
  18106. // effect even though we're bailing out, so that cWU/cDU are called.
  18107. if (typeof instance.componentDidUpdate === 'function') {
  18108. if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
  18109. workInProgress.effectTag |= Update;
  18110. }
  18111. }
  18112. if (typeof instance.getSnapshotBeforeUpdate === 'function') {
  18113. if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
  18114. workInProgress.effectTag |= Snapshot;
  18115. }
  18116. } // If shouldComponentUpdate returned false, we should still update the
  18117. // memoized props/state to indicate that this work can be reused.
  18118. workInProgress.memoizedProps = newProps;
  18119. workInProgress.memoizedState = newState;
  18120. } // Update the existing instance's state, props, and context pointers even
  18121. // if shouldComponentUpdate returns false.
  18122. instance.props = newProps;
  18123. instance.state = newState;
  18124. instance.context = nextContext;
  18125. return shouldUpdate;
  18126. }
  18127. var didWarnAboutMaps;
  18128. var didWarnAboutGenerators;
  18129. var didWarnAboutStringRefs;
  18130. var ownerHasKeyUseWarning;
  18131. var ownerHasFunctionTypeWarning;
  18132. var warnForMissingKey = function (child) {};
  18133. {
  18134. didWarnAboutMaps = false;
  18135. didWarnAboutGenerators = false;
  18136. didWarnAboutStringRefs = {};
  18137. /**
  18138. * Warn if there's no key explicitly set on dynamic arrays of children or
  18139. * object keys are not valid. This allows us to keep track of children between
  18140. * updates.
  18141. */
  18142. ownerHasKeyUseWarning = {};
  18143. ownerHasFunctionTypeWarning = {};
  18144. warnForMissingKey = function (child) {
  18145. if (child === null || typeof child !== 'object') {
  18146. return;
  18147. }
  18148. if (!child._store || child._store.validated || child.key != null) {
  18149. return;
  18150. }
  18151. if (!(typeof child._store === 'object')) {
  18152. {
  18153. throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." );
  18154. }
  18155. }
  18156. child._store.validated = true;
  18157. var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
  18158. if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
  18159. return;
  18160. }
  18161. ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
  18162. error('Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
  18163. };
  18164. }
  18165. var isArray$1 = Array.isArray;
  18166. function coerceRef(returnFiber, current, element) {
  18167. var mixedRef = element.ref;
  18168. if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
  18169. {
  18170. // TODO: Clean this up once we turn on the string ref warning for
  18171. // everyone, because the strict mode case will no longer be relevant
  18172. if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
  18173. // because these cannot be automatically converted to an arrow function
  18174. // using a codemod. Therefore, we don't have to warn about string refs again.
  18175. !(element._owner && element._self && element._owner.stateNode !== element._self)) {
  18176. var componentName = getComponentName(returnFiber.type) || 'Component';
  18177. if (!didWarnAboutStringRefs[componentName]) {
  18178. {
  18179. error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref%s', mixedRef, getStackByFiberInDevAndProd(returnFiber));
  18180. }
  18181. didWarnAboutStringRefs[componentName] = true;
  18182. }
  18183. }
  18184. }
  18185. if (element._owner) {
  18186. var owner = element._owner;
  18187. var inst;
  18188. if (owner) {
  18189. var ownerFiber = owner;
  18190. if (!(ownerFiber.tag === ClassComponent)) {
  18191. {
  18192. throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref" );
  18193. }
  18194. }
  18195. inst = ownerFiber.stateNode;
  18196. }
  18197. if (!inst) {
  18198. {
  18199. throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." );
  18200. }
  18201. }
  18202. var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref
  18203. if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
  18204. return current.ref;
  18205. }
  18206. var ref = function (value) {
  18207. var refs = inst.refs;
  18208. if (refs === emptyRefsObject) {
  18209. // This is a lazy pooled frozen object, so we need to initialize.
  18210. refs = inst.refs = {};
  18211. }
  18212. if (value === null) {
  18213. delete refs[stringRef];
  18214. } else {
  18215. refs[stringRef] = value;
  18216. }
  18217. };
  18218. ref._stringRef = stringRef;
  18219. return ref;
  18220. } else {
  18221. if (!(typeof mixedRef === 'string')) {
  18222. {
  18223. throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
  18224. }
  18225. }
  18226. if (!element._owner) {
  18227. {
  18228. throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information." );
  18229. }
  18230. }
  18231. }
  18232. }
  18233. return mixedRef;
  18234. }
  18235. function throwOnInvalidObjectType(returnFiber, newChild) {
  18236. if (returnFiber.type !== 'textarea') {
  18237. var addendum = '';
  18238. {
  18239. addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
  18240. }
  18241. {
  18242. {
  18243. throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + ")." + addendum );
  18244. }
  18245. }
  18246. }
  18247. }
  18248. function warnOnFunctionType() {
  18249. {
  18250. var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();
  18251. if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
  18252. return;
  18253. }
  18254. ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;
  18255. error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
  18256. }
  18257. } // This wrapper function exists because I expect to clone the code in each path
  18258. // to be able to optimize each path individually by branching early. This needs
  18259. // a compiler or we can do it manually. Helpers that don't need this branching
  18260. // live outside of this function.
  18261. function ChildReconciler(shouldTrackSideEffects) {
  18262. function deleteChild(returnFiber, childToDelete) {
  18263. if (!shouldTrackSideEffects) {
  18264. // Noop.
  18265. return;
  18266. } // Deletions are added in reversed order so we add it to the front.
  18267. // At this point, the return fiber's effect list is empty except for
  18268. // deletions, so we can just append the deletion to the list. The remaining
  18269. // effects aren't added until the complete phase. Once we implement
  18270. // resuming, this may not be true.
  18271. var last = returnFiber.lastEffect;
  18272. if (last !== null) {
  18273. last.nextEffect = childToDelete;
  18274. returnFiber.lastEffect = childToDelete;
  18275. } else {
  18276. returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
  18277. }
  18278. childToDelete.nextEffect = null;
  18279. childToDelete.effectTag = Deletion;
  18280. }
  18281. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  18282. if (!shouldTrackSideEffects) {
  18283. // Noop.
  18284. return null;
  18285. } // TODO: For the shouldClone case, this could be micro-optimized a bit by
  18286. // assuming that after the first child we've already added everything.
  18287. var childToDelete = currentFirstChild;
  18288. while (childToDelete !== null) {
  18289. deleteChild(returnFiber, childToDelete);
  18290. childToDelete = childToDelete.sibling;
  18291. }
  18292. return null;
  18293. }
  18294. function mapRemainingChildren(returnFiber, currentFirstChild) {
  18295. // Add the remaining children to a temporary map so that we can find them by
  18296. // keys quickly. Implicit (null) keys get added to this set with their index
  18297. // instead.
  18298. var existingChildren = new Map();
  18299. var existingChild = currentFirstChild;
  18300. while (existingChild !== null) {
  18301. if (existingChild.key !== null) {
  18302. existingChildren.set(existingChild.key, existingChild);
  18303. } else {
  18304. existingChildren.set(existingChild.index, existingChild);
  18305. }
  18306. existingChild = existingChild.sibling;
  18307. }
  18308. return existingChildren;
  18309. }
  18310. function useFiber(fiber, pendingProps) {
  18311. // We currently set sibling to null and index to 0 here because it is easy
  18312. // to forget to do before returning it. E.g. for the single child case.
  18313. var clone = createWorkInProgress(fiber, pendingProps);
  18314. clone.index = 0;
  18315. clone.sibling = null;
  18316. return clone;
  18317. }
  18318. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  18319. newFiber.index = newIndex;
  18320. if (!shouldTrackSideEffects) {
  18321. // Noop.
  18322. return lastPlacedIndex;
  18323. }
  18324. var current = newFiber.alternate;
  18325. if (current !== null) {
  18326. var oldIndex = current.index;
  18327. if (oldIndex < lastPlacedIndex) {
  18328. // This is a move.
  18329. newFiber.effectTag = Placement;
  18330. return lastPlacedIndex;
  18331. } else {
  18332. // This item can stay in place.
  18333. return oldIndex;
  18334. }
  18335. } else {
  18336. // This is an insertion.
  18337. newFiber.effectTag = Placement;
  18338. return lastPlacedIndex;
  18339. }
  18340. }
  18341. function placeSingleChild(newFiber) {
  18342. // This is simpler for the single child case. We only need to do a
  18343. // placement for inserting new children.
  18344. if (shouldTrackSideEffects && newFiber.alternate === null) {
  18345. newFiber.effectTag = Placement;
  18346. }
  18347. return newFiber;
  18348. }
  18349. function updateTextNode(returnFiber, current, textContent, expirationTime) {
  18350. if (current === null || current.tag !== HostText) {
  18351. // Insert
  18352. var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
  18353. created.return = returnFiber;
  18354. return created;
  18355. } else {
  18356. // Update
  18357. var existing = useFiber(current, textContent);
  18358. existing.return = returnFiber;
  18359. return existing;
  18360. }
  18361. }
  18362. function updateElement(returnFiber, current, element, expirationTime) {
  18363. if (current !== null) {
  18364. if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
  18365. isCompatibleFamilyForHotReloading(current, element) )) {
  18366. // Move based on index
  18367. var existing = useFiber(current, element.props);
  18368. existing.ref = coerceRef(returnFiber, current, element);
  18369. existing.return = returnFiber;
  18370. {
  18371. existing._debugSource = element._source;
  18372. existing._debugOwner = element._owner;
  18373. }
  18374. return existing;
  18375. }
  18376. } // Insert
  18377. var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
  18378. created.ref = coerceRef(returnFiber, current, element);
  18379. created.return = returnFiber;
  18380. return created;
  18381. }
  18382. function updatePortal(returnFiber, current, portal, expirationTime) {
  18383. if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
  18384. // Insert
  18385. var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
  18386. created.return = returnFiber;
  18387. return created;
  18388. } else {
  18389. // Update
  18390. var existing = useFiber(current, portal.children || []);
  18391. existing.return = returnFiber;
  18392. return existing;
  18393. }
  18394. }
  18395. function updateFragment(returnFiber, current, fragment, expirationTime, key) {
  18396. if (current === null || current.tag !== Fragment) {
  18397. // Insert
  18398. var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
  18399. created.return = returnFiber;
  18400. return created;
  18401. } else {
  18402. // Update
  18403. var existing = useFiber(current, fragment);
  18404. existing.return = returnFiber;
  18405. return existing;
  18406. }
  18407. }
  18408. function createChild(returnFiber, newChild, expirationTime) {
  18409. if (typeof newChild === 'string' || typeof newChild === 'number') {
  18410. // Text nodes don't have keys. If the previous node is implicitly keyed
  18411. // we can continue to replace it without aborting even if it is not a text
  18412. // node.
  18413. var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
  18414. created.return = returnFiber;
  18415. return created;
  18416. }
  18417. if (typeof newChild === 'object' && newChild !== null) {
  18418. switch (newChild.$$typeof) {
  18419. case REACT_ELEMENT_TYPE:
  18420. {
  18421. var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
  18422. _created.ref = coerceRef(returnFiber, null, newChild);
  18423. _created.return = returnFiber;
  18424. return _created;
  18425. }
  18426. case REACT_PORTAL_TYPE:
  18427. {
  18428. var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
  18429. _created2.return = returnFiber;
  18430. return _created2;
  18431. }
  18432. }
  18433. if (isArray$1(newChild) || getIteratorFn(newChild)) {
  18434. var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
  18435. _created3.return = returnFiber;
  18436. return _created3;
  18437. }
  18438. throwOnInvalidObjectType(returnFiber, newChild);
  18439. }
  18440. {
  18441. if (typeof newChild === 'function') {
  18442. warnOnFunctionType();
  18443. }
  18444. }
  18445. return null;
  18446. }
  18447. function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
  18448. // Update the fiber if the keys match, otherwise return null.
  18449. var key = oldFiber !== null ? oldFiber.key : null;
  18450. if (typeof newChild === 'string' || typeof newChild === 'number') {
  18451. // Text nodes don't have keys. If the previous node is implicitly keyed
  18452. // we can continue to replace it without aborting even if it is not a text
  18453. // node.
  18454. if (key !== null) {
  18455. return null;
  18456. }
  18457. return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
  18458. }
  18459. if (typeof newChild === 'object' && newChild !== null) {
  18460. switch (newChild.$$typeof) {
  18461. case REACT_ELEMENT_TYPE:
  18462. {
  18463. if (newChild.key === key) {
  18464. if (newChild.type === REACT_FRAGMENT_TYPE) {
  18465. return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
  18466. }
  18467. return updateElement(returnFiber, oldFiber, newChild, expirationTime);
  18468. } else {
  18469. return null;
  18470. }
  18471. }
  18472. case REACT_PORTAL_TYPE:
  18473. {
  18474. if (newChild.key === key) {
  18475. return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
  18476. } else {
  18477. return null;
  18478. }
  18479. }
  18480. }
  18481. if (isArray$1(newChild) || getIteratorFn(newChild)) {
  18482. if (key !== null) {
  18483. return null;
  18484. }
  18485. return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
  18486. }
  18487. throwOnInvalidObjectType(returnFiber, newChild);
  18488. }
  18489. {
  18490. if (typeof newChild === 'function') {
  18491. warnOnFunctionType();
  18492. }
  18493. }
  18494. return null;
  18495. }
  18496. function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
  18497. if (typeof newChild === 'string' || typeof newChild === 'number') {
  18498. // Text nodes don't have keys, so we neither have to check the old nor
  18499. // new node for the key. If both are text nodes, they match.
  18500. var matchedFiber = existingChildren.get(newIdx) || null;
  18501. return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
  18502. }
  18503. if (typeof newChild === 'object' && newChild !== null) {
  18504. switch (newChild.$$typeof) {
  18505. case REACT_ELEMENT_TYPE:
  18506. {
  18507. var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
  18508. if (newChild.type === REACT_FRAGMENT_TYPE) {
  18509. return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
  18510. }
  18511. return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
  18512. }
  18513. case REACT_PORTAL_TYPE:
  18514. {
  18515. var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
  18516. return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
  18517. }
  18518. }
  18519. if (isArray$1(newChild) || getIteratorFn(newChild)) {
  18520. var _matchedFiber3 = existingChildren.get(newIdx) || null;
  18521. return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
  18522. }
  18523. throwOnInvalidObjectType(returnFiber, newChild);
  18524. }
  18525. {
  18526. if (typeof newChild === 'function') {
  18527. warnOnFunctionType();
  18528. }
  18529. }
  18530. return null;
  18531. }
  18532. /**
  18533. * Warns if there is a duplicate or missing key
  18534. */
  18535. function warnOnInvalidKey(child, knownKeys) {
  18536. {
  18537. if (typeof child !== 'object' || child === null) {
  18538. return knownKeys;
  18539. }
  18540. switch (child.$$typeof) {
  18541. case REACT_ELEMENT_TYPE:
  18542. case REACT_PORTAL_TYPE:
  18543. warnForMissingKey(child);
  18544. var key = child.key;
  18545. if (typeof key !== 'string') {
  18546. break;
  18547. }
  18548. if (knownKeys === null) {
  18549. knownKeys = new Set();
  18550. knownKeys.add(key);
  18551. break;
  18552. }
  18553. if (!knownKeys.has(key)) {
  18554. knownKeys.add(key);
  18555. break;
  18556. }
  18557. error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
  18558. break;
  18559. }
  18560. }
  18561. return knownKeys;
  18562. }
  18563. function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
  18564. // This algorithm can't optimize by searching from both ends since we
  18565. // don't have backpointers on fibers. I'm trying to see how far we can get
  18566. // with that model. If it ends up not being worth the tradeoffs, we can
  18567. // add it later.
  18568. // Even with a two ended optimization, we'd want to optimize for the case
  18569. // where there are few changes and brute force the comparison instead of
  18570. // going for the Map. It'd like to explore hitting that path first in
  18571. // forward-only mode and only go for the Map once we notice that we need
  18572. // lots of look ahead. This doesn't handle reversal as well as two ended
  18573. // search but that's unusual. Besides, for the two ended optimization to
  18574. // work on Iterables, we'd need to copy the whole set.
  18575. // In this first iteration, we'll just live with hitting the bad case
  18576. // (adding everything to a Map) in for every insert/move.
  18577. // If you change this code, also update reconcileChildrenIterator() which
  18578. // uses the same algorithm.
  18579. {
  18580. // First, validate keys.
  18581. var knownKeys = null;
  18582. for (var i = 0; i < newChildren.length; i++) {
  18583. var child = newChildren[i];
  18584. knownKeys = warnOnInvalidKey(child, knownKeys);
  18585. }
  18586. }
  18587. var resultingFirstChild = null;
  18588. var previousNewFiber = null;
  18589. var oldFiber = currentFirstChild;
  18590. var lastPlacedIndex = 0;
  18591. var newIdx = 0;
  18592. var nextOldFiber = null;
  18593. for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
  18594. if (oldFiber.index > newIdx) {
  18595. nextOldFiber = oldFiber;
  18596. oldFiber = null;
  18597. } else {
  18598. nextOldFiber = oldFiber.sibling;
  18599. }
  18600. var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
  18601. if (newFiber === null) {
  18602. // TODO: This breaks on empty slots like null children. That's
  18603. // unfortunate because it triggers the slow path all the time. We need
  18604. // a better way to communicate whether this was a miss or null,
  18605. // boolean, undefined, etc.
  18606. if (oldFiber === null) {
  18607. oldFiber = nextOldFiber;
  18608. }
  18609. break;
  18610. }
  18611. if (shouldTrackSideEffects) {
  18612. if (oldFiber && newFiber.alternate === null) {
  18613. // We matched the slot, but we didn't reuse the existing fiber, so we
  18614. // need to delete the existing child.
  18615. deleteChild(returnFiber, oldFiber);
  18616. }
  18617. }
  18618. lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
  18619. if (previousNewFiber === null) {
  18620. // TODO: Move out of the loop. This only happens for the first run.
  18621. resultingFirstChild = newFiber;
  18622. } else {
  18623. // TODO: Defer siblings if we're not at the right index for this slot.
  18624. // I.e. if we had null values before, then we want to defer this
  18625. // for each null value. However, we also don't want to call updateSlot
  18626. // with the previous one.
  18627. previousNewFiber.sibling = newFiber;
  18628. }
  18629. previousNewFiber = newFiber;
  18630. oldFiber = nextOldFiber;
  18631. }
  18632. if (newIdx === newChildren.length) {
  18633. // We've reached the end of the new children. We can delete the rest.
  18634. deleteRemainingChildren(returnFiber, oldFiber);
  18635. return resultingFirstChild;
  18636. }
  18637. if (oldFiber === null) {
  18638. // If we don't have any more existing children we can choose a fast path
  18639. // since the rest will all be insertions.
  18640. for (; newIdx < newChildren.length; newIdx++) {
  18641. var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
  18642. if (_newFiber === null) {
  18643. continue;
  18644. }
  18645. lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
  18646. if (previousNewFiber === null) {
  18647. // TODO: Move out of the loop. This only happens for the first run.
  18648. resultingFirstChild = _newFiber;
  18649. } else {
  18650. previousNewFiber.sibling = _newFiber;
  18651. }
  18652. previousNewFiber = _newFiber;
  18653. }
  18654. return resultingFirstChild;
  18655. } // Add all children to a key map for quick lookups.
  18656. var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
  18657. for (; newIdx < newChildren.length; newIdx++) {
  18658. var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
  18659. if (_newFiber2 !== null) {
  18660. if (shouldTrackSideEffects) {
  18661. if (_newFiber2.alternate !== null) {
  18662. // The new fiber is a work in progress, but if there exists a
  18663. // current, that means that we reused the fiber. We need to delete
  18664. // it from the child list so that we don't add it to the deletion
  18665. // list.
  18666. existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
  18667. }
  18668. }
  18669. lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
  18670. if (previousNewFiber === null) {
  18671. resultingFirstChild = _newFiber2;
  18672. } else {
  18673. previousNewFiber.sibling = _newFiber2;
  18674. }
  18675. previousNewFiber = _newFiber2;
  18676. }
  18677. }
  18678. if (shouldTrackSideEffects) {
  18679. // Any existing children that weren't consumed above were deleted. We need
  18680. // to add them to the deletion list.
  18681. existingChildren.forEach(function (child) {
  18682. return deleteChild(returnFiber, child);
  18683. });
  18684. }
  18685. return resultingFirstChild;
  18686. }
  18687. function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
  18688. // This is the same implementation as reconcileChildrenArray(),
  18689. // but using the iterator instead.
  18690. var iteratorFn = getIteratorFn(newChildrenIterable);
  18691. if (!(typeof iteratorFn === 'function')) {
  18692. {
  18693. throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." );
  18694. }
  18695. }
  18696. {
  18697. // We don't support rendering Generators because it's a mutation.
  18698. // See https://github.com/facebook/react/issues/12995
  18699. if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
  18700. newChildrenIterable[Symbol.toStringTag] === 'Generator') {
  18701. if (!didWarnAboutGenerators) {
  18702. error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');
  18703. }
  18704. didWarnAboutGenerators = true;
  18705. } // Warn about using Maps as children
  18706. if (newChildrenIterable.entries === iteratorFn) {
  18707. if (!didWarnAboutMaps) {
  18708. error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');
  18709. }
  18710. didWarnAboutMaps = true;
  18711. } // First, validate keys.
  18712. // We'll get a different iterator later for the main pass.
  18713. var _newChildren = iteratorFn.call(newChildrenIterable);
  18714. if (_newChildren) {
  18715. var knownKeys = null;
  18716. var _step = _newChildren.next();
  18717. for (; !_step.done; _step = _newChildren.next()) {
  18718. var child = _step.value;
  18719. knownKeys = warnOnInvalidKey(child, knownKeys);
  18720. }
  18721. }
  18722. }
  18723. var newChildren = iteratorFn.call(newChildrenIterable);
  18724. if (!(newChildren != null)) {
  18725. {
  18726. throw Error( "An iterable object provided no iterator." );
  18727. }
  18728. }
  18729. var resultingFirstChild = null;
  18730. var previousNewFiber = null;
  18731. var oldFiber = currentFirstChild;
  18732. var lastPlacedIndex = 0;
  18733. var newIdx = 0;
  18734. var nextOldFiber = null;
  18735. var step = newChildren.next();
  18736. for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
  18737. if (oldFiber.index > newIdx) {
  18738. nextOldFiber = oldFiber;
  18739. oldFiber = null;
  18740. } else {
  18741. nextOldFiber = oldFiber.sibling;
  18742. }
  18743. var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
  18744. if (newFiber === null) {
  18745. // TODO: This breaks on empty slots like null children. That's
  18746. // unfortunate because it triggers the slow path all the time. We need
  18747. // a better way to communicate whether this was a miss or null,
  18748. // boolean, undefined, etc.
  18749. if (oldFiber === null) {
  18750. oldFiber = nextOldFiber;
  18751. }
  18752. break;
  18753. }
  18754. if (shouldTrackSideEffects) {
  18755. if (oldFiber && newFiber.alternate === null) {
  18756. // We matched the slot, but we didn't reuse the existing fiber, so we
  18757. // need to delete the existing child.
  18758. deleteChild(returnFiber, oldFiber);
  18759. }
  18760. }
  18761. lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
  18762. if (previousNewFiber === null) {
  18763. // TODO: Move out of the loop. This only happens for the first run.
  18764. resultingFirstChild = newFiber;
  18765. } else {
  18766. // TODO: Defer siblings if we're not at the right index for this slot.
  18767. // I.e. if we had null values before, then we want to defer this
  18768. // for each null value. However, we also don't want to call updateSlot
  18769. // with the previous one.
  18770. previousNewFiber.sibling = newFiber;
  18771. }
  18772. previousNewFiber = newFiber;
  18773. oldFiber = nextOldFiber;
  18774. }
  18775. if (step.done) {
  18776. // We've reached the end of the new children. We can delete the rest.
  18777. deleteRemainingChildren(returnFiber, oldFiber);
  18778. return resultingFirstChild;
  18779. }
  18780. if (oldFiber === null) {
  18781. // If we don't have any more existing children we can choose a fast path
  18782. // since the rest will all be insertions.
  18783. for (; !step.done; newIdx++, step = newChildren.next()) {
  18784. var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
  18785. if (_newFiber3 === null) {
  18786. continue;
  18787. }
  18788. lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
  18789. if (previousNewFiber === null) {
  18790. // TODO: Move out of the loop. This only happens for the first run.
  18791. resultingFirstChild = _newFiber3;
  18792. } else {
  18793. previousNewFiber.sibling = _newFiber3;
  18794. }
  18795. previousNewFiber = _newFiber3;
  18796. }
  18797. return resultingFirstChild;
  18798. } // Add all children to a key map for quick lookups.
  18799. var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
  18800. for (; !step.done; newIdx++, step = newChildren.next()) {
  18801. var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
  18802. if (_newFiber4 !== null) {
  18803. if (shouldTrackSideEffects) {
  18804. if (_newFiber4.alternate !== null) {
  18805. // The new fiber is a work in progress, but if there exists a
  18806. // current, that means that we reused the fiber. We need to delete
  18807. // it from the child list so that we don't add it to the deletion
  18808. // list.
  18809. existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
  18810. }
  18811. }
  18812. lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
  18813. if (previousNewFiber === null) {
  18814. resultingFirstChild = _newFiber4;
  18815. } else {
  18816. previousNewFiber.sibling = _newFiber4;
  18817. }
  18818. previousNewFiber = _newFiber4;
  18819. }
  18820. }
  18821. if (shouldTrackSideEffects) {
  18822. // Any existing children that weren't consumed above were deleted. We need
  18823. // to add them to the deletion list.
  18824. existingChildren.forEach(function (child) {
  18825. return deleteChild(returnFiber, child);
  18826. });
  18827. }
  18828. return resultingFirstChild;
  18829. }
  18830. function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
  18831. // There's no need to check for keys on text nodes since we don't have a
  18832. // way to define them.
  18833. if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
  18834. // We already have an existing node so let's just update it and delete
  18835. // the rest.
  18836. deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
  18837. var existing = useFiber(currentFirstChild, textContent);
  18838. existing.return = returnFiber;
  18839. return existing;
  18840. } // The existing first child is not a text node so we need to create one
  18841. // and delete the existing ones.
  18842. deleteRemainingChildren(returnFiber, currentFirstChild);
  18843. var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
  18844. created.return = returnFiber;
  18845. return created;
  18846. }
  18847. function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
  18848. var key = element.key;
  18849. var child = currentFirstChild;
  18850. while (child !== null) {
  18851. // TODO: If key === null and child.key === null, then this only applies to
  18852. // the first item in the list.
  18853. if (child.key === key) {
  18854. switch (child.tag) {
  18855. case Fragment:
  18856. {
  18857. if (element.type === REACT_FRAGMENT_TYPE) {
  18858. deleteRemainingChildren(returnFiber, child.sibling);
  18859. var existing = useFiber(child, element.props.children);
  18860. existing.return = returnFiber;
  18861. {
  18862. existing._debugSource = element._source;
  18863. existing._debugOwner = element._owner;
  18864. }
  18865. return existing;
  18866. }
  18867. break;
  18868. }
  18869. case Block:
  18870. // We intentionally fallthrough here if enableBlocksAPI is not on.
  18871. // eslint-disable-next-lined no-fallthrough
  18872. default:
  18873. {
  18874. if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
  18875. isCompatibleFamilyForHotReloading(child, element) )) {
  18876. deleteRemainingChildren(returnFiber, child.sibling);
  18877. var _existing3 = useFiber(child, element.props);
  18878. _existing3.ref = coerceRef(returnFiber, child, element);
  18879. _existing3.return = returnFiber;
  18880. {
  18881. _existing3._debugSource = element._source;
  18882. _existing3._debugOwner = element._owner;
  18883. }
  18884. return _existing3;
  18885. }
  18886. break;
  18887. }
  18888. } // Didn't match.
  18889. deleteRemainingChildren(returnFiber, child);
  18890. break;
  18891. } else {
  18892. deleteChild(returnFiber, child);
  18893. }
  18894. child = child.sibling;
  18895. }
  18896. if (element.type === REACT_FRAGMENT_TYPE) {
  18897. var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
  18898. created.return = returnFiber;
  18899. return created;
  18900. } else {
  18901. var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
  18902. _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
  18903. _created4.return = returnFiber;
  18904. return _created4;
  18905. }
  18906. }
  18907. function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
  18908. var key = portal.key;
  18909. var child = currentFirstChild;
  18910. while (child !== null) {
  18911. // TODO: If key === null and child.key === null, then this only applies to
  18912. // the first item in the list.
  18913. if (child.key === key) {
  18914. if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
  18915. deleteRemainingChildren(returnFiber, child.sibling);
  18916. var existing = useFiber(child, portal.children || []);
  18917. existing.return = returnFiber;
  18918. return existing;
  18919. } else {
  18920. deleteRemainingChildren(returnFiber, child);
  18921. break;
  18922. }
  18923. } else {
  18924. deleteChild(returnFiber, child);
  18925. }
  18926. child = child.sibling;
  18927. }
  18928. var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
  18929. created.return = returnFiber;
  18930. return created;
  18931. } // This API will tag the children with the side-effect of the reconciliation
  18932. // itself. They will be added to the side-effect list as we pass through the
  18933. // children and the parent.
  18934. function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
  18935. // This function is not recursive.
  18936. // If the top level item is an array, we treat it as a set of children,
  18937. // not as a fragment. Nested arrays on the other hand will be treated as
  18938. // fragment nodes. Recursion happens at the normal flow.
  18939. // Handle top level unkeyed fragments as if they were arrays.
  18940. // This leads to an ambiguity between <>{[...]}</> and <>...</>.
  18941. // We treat the ambiguous cases above the same.
  18942. var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
  18943. if (isUnkeyedTopLevelFragment) {
  18944. newChild = newChild.props.children;
  18945. } // Handle object types
  18946. var isObject = typeof newChild === 'object' && newChild !== null;
  18947. if (isObject) {
  18948. switch (newChild.$$typeof) {
  18949. case REACT_ELEMENT_TYPE:
  18950. return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
  18951. case REACT_PORTAL_TYPE:
  18952. return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
  18953. }
  18954. }
  18955. if (typeof newChild === 'string' || typeof newChild === 'number') {
  18956. return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
  18957. }
  18958. if (isArray$1(newChild)) {
  18959. return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
  18960. }
  18961. if (getIteratorFn(newChild)) {
  18962. return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
  18963. }
  18964. if (isObject) {
  18965. throwOnInvalidObjectType(returnFiber, newChild);
  18966. }
  18967. {
  18968. if (typeof newChild === 'function') {
  18969. warnOnFunctionType();
  18970. }
  18971. }
  18972. if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
  18973. // If the new child is undefined, and the return fiber is a composite
  18974. // component, throw an error. If Fiber return types are disabled,
  18975. // we already threw above.
  18976. switch (returnFiber.tag) {
  18977. case ClassComponent:
  18978. {
  18979. {
  18980. var instance = returnFiber.stateNode;
  18981. if (instance.render._isMockFunction) {
  18982. // We allow auto-mocks to proceed as if they're returning null.
  18983. break;
  18984. }
  18985. }
  18986. }
  18987. // Intentionally fall through to the next case, which handles both
  18988. // functions and classes
  18989. // eslint-disable-next-lined no-fallthrough
  18990. case FunctionComponent:
  18991. {
  18992. var Component = returnFiber.type;
  18993. {
  18994. {
  18995. throw Error( (Component.displayName || Component.name || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
  18996. }
  18997. }
  18998. }
  18999. }
  19000. } // Remaining cases are all treated as empty.
  19001. return deleteRemainingChildren(returnFiber, currentFirstChild);
  19002. }
  19003. return reconcileChildFibers;
  19004. }
  19005. var reconcileChildFibers = ChildReconciler(true);
  19006. var mountChildFibers = ChildReconciler(false);
  19007. function cloneChildFibers(current, workInProgress) {
  19008. if (!(current === null || workInProgress.child === current.child)) {
  19009. {
  19010. throw Error( "Resuming work not yet implemented." );
  19011. }
  19012. }
  19013. if (workInProgress.child === null) {
  19014. return;
  19015. }
  19016. var currentChild = workInProgress.child;
  19017. var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
  19018. workInProgress.child = newChild;
  19019. newChild.return = workInProgress;
  19020. while (currentChild.sibling !== null) {
  19021. currentChild = currentChild.sibling;
  19022. newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
  19023. newChild.return = workInProgress;
  19024. }
  19025. newChild.sibling = null;
  19026. } // Reset a workInProgress child set to prepare it for a second pass.
  19027. function resetChildFibers(workInProgress, renderExpirationTime) {
  19028. var child = workInProgress.child;
  19029. while (child !== null) {
  19030. resetWorkInProgress(child, renderExpirationTime);
  19031. child = child.sibling;
  19032. }
  19033. }
  19034. var NO_CONTEXT = {};
  19035. var contextStackCursor$1 = createCursor(NO_CONTEXT);
  19036. var contextFiberStackCursor = createCursor(NO_CONTEXT);
  19037. var rootInstanceStackCursor = createCursor(NO_CONTEXT);
  19038. function requiredContext(c) {
  19039. if (!(c !== NO_CONTEXT)) {
  19040. {
  19041. throw Error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." );
  19042. }
  19043. }
  19044. return c;
  19045. }
  19046. function getRootHostContainer() {
  19047. var rootInstance = requiredContext(rootInstanceStackCursor.current);
  19048. return rootInstance;
  19049. }
  19050. function pushHostContainer(fiber, nextRootInstance) {
  19051. // Push current root instance onto the stack;
  19052. // This allows us to reset root when portals are popped.
  19053. push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
  19054. // This enables us to pop only Fibers that provide unique contexts.
  19055. push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
  19056. // However, we can't just call getRootHostContext() and push it because
  19057. // we'd have a different number of entries on the stack depending on
  19058. // whether getRootHostContext() throws somewhere in renderer code or not.
  19059. // So we push an empty value first. This lets us safely unwind on errors.
  19060. push(contextStackCursor$1, NO_CONTEXT, fiber);
  19061. var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.
  19062. pop(contextStackCursor$1, fiber);
  19063. push(contextStackCursor$1, nextRootContext, fiber);
  19064. }
  19065. function popHostContainer(fiber) {
  19066. pop(contextStackCursor$1, fiber);
  19067. pop(contextFiberStackCursor, fiber);
  19068. pop(rootInstanceStackCursor, fiber);
  19069. }
  19070. function getHostContext() {
  19071. var context = requiredContext(contextStackCursor$1.current);
  19072. return context;
  19073. }
  19074. function pushHostContext(fiber) {
  19075. var rootInstance = requiredContext(rootInstanceStackCursor.current);
  19076. var context = requiredContext(contextStackCursor$1.current);
  19077. var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
  19078. if (context === nextContext) {
  19079. return;
  19080. } // Track the context and the Fiber that provided it.
  19081. // This enables us to pop only Fibers that provide unique contexts.
  19082. push(contextFiberStackCursor, fiber, fiber);
  19083. push(contextStackCursor$1, nextContext, fiber);
  19084. }
  19085. function popHostContext(fiber) {
  19086. // Do not pop unless this Fiber provided the current context.
  19087. // pushHostContext() only pushes Fibers that provide unique contexts.
  19088. if (contextFiberStackCursor.current !== fiber) {
  19089. return;
  19090. }
  19091. pop(contextStackCursor$1, fiber);
  19092. pop(contextFiberStackCursor, fiber);
  19093. }
  19094. var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
  19095. // inherited deeply down the subtree. The upper bits only affect
  19096. // this immediate suspense boundary and gets reset each new
  19097. // boundary or suspense list.
  19098. var SubtreeSuspenseContextMask = 1; // Subtree Flags:
  19099. // InvisibleParentSuspenseContext indicates that one of our parent Suspense
  19100. // boundaries is not currently showing visible main content.
  19101. // Either because it is already showing a fallback or is not mounted at all.
  19102. // We can use this to determine if it is desirable to trigger a fallback at
  19103. // the parent. If not, then we might need to trigger undesirable boundaries
  19104. // and/or suspend the commit to avoid hiding the parent content.
  19105. var InvisibleParentSuspenseContext = 1; // Shallow Flags:
  19106. // ForceSuspenseFallback can be used by SuspenseList to force newly added
  19107. // items into their fallback state during one of the render passes.
  19108. var ForceSuspenseFallback = 2;
  19109. var suspenseStackCursor = createCursor(DefaultSuspenseContext);
  19110. function hasSuspenseContext(parentContext, flag) {
  19111. return (parentContext & flag) !== 0;
  19112. }
  19113. function setDefaultShallowSuspenseContext(parentContext) {
  19114. return parentContext & SubtreeSuspenseContextMask;
  19115. }
  19116. function setShallowSuspenseContext(parentContext, shallowContext) {
  19117. return parentContext & SubtreeSuspenseContextMask | shallowContext;
  19118. }
  19119. function addSubtreeSuspenseContext(parentContext, subtreeContext) {
  19120. return parentContext | subtreeContext;
  19121. }
  19122. function pushSuspenseContext(fiber, newContext) {
  19123. push(suspenseStackCursor, newContext, fiber);
  19124. }
  19125. function popSuspenseContext(fiber) {
  19126. pop(suspenseStackCursor, fiber);
  19127. }
  19128. function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
  19129. // If it was the primary children that just suspended, capture and render the
  19130. // fallback. Otherwise, don't capture and bubble to the next boundary.
  19131. var nextState = workInProgress.memoizedState;
  19132. if (nextState !== null) {
  19133. if (nextState.dehydrated !== null) {
  19134. // A dehydrated boundary always captures.
  19135. return true;
  19136. }
  19137. return false;
  19138. }
  19139. var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.
  19140. if (props.fallback === undefined) {
  19141. return false;
  19142. } // Regular boundaries always capture.
  19143. if (props.unstable_avoidThisFallback !== true) {
  19144. return true;
  19145. } // If it's a boundary we should avoid, then we prefer to bubble up to the
  19146. // parent boundary if it is currently invisible.
  19147. if (hasInvisibleParent) {
  19148. return false;
  19149. } // If the parent is not able to handle it, we must handle it.
  19150. return true;
  19151. }
  19152. function findFirstSuspended(row) {
  19153. var node = row;
  19154. while (node !== null) {
  19155. if (node.tag === SuspenseComponent) {
  19156. var state = node.memoizedState;
  19157. if (state !== null) {
  19158. var dehydrated = state.dehydrated;
  19159. if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
  19160. return node;
  19161. }
  19162. }
  19163. } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
  19164. // keep track of whether it suspended or not.
  19165. node.memoizedProps.revealOrder !== undefined) {
  19166. var didSuspend = (node.effectTag & DidCapture) !== NoEffect;
  19167. if (didSuspend) {
  19168. return node;
  19169. }
  19170. } else if (node.child !== null) {
  19171. node.child.return = node;
  19172. node = node.child;
  19173. continue;
  19174. }
  19175. if (node === row) {
  19176. return null;
  19177. }
  19178. while (node.sibling === null) {
  19179. if (node.return === null || node.return === row) {
  19180. return null;
  19181. }
  19182. node = node.return;
  19183. }
  19184. node.sibling.return = node.return;
  19185. node = node.sibling;
  19186. }
  19187. return null;
  19188. }
  19189. function createDeprecatedResponderListener(responder, props) {
  19190. var eventResponderListener = {
  19191. responder: responder,
  19192. props: props
  19193. };
  19194. {
  19195. Object.freeze(eventResponderListener);
  19196. }
  19197. return eventResponderListener;
  19198. }
  19199. var HasEffect =
  19200. /* */
  19201. 1; // Represents the phase in which the effect (not the clean-up) fires.
  19202. var Layout =
  19203. /* */
  19204. 2;
  19205. var Passive$1 =
  19206. /* */
  19207. 4;
  19208. var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
  19209. ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
  19210. var didWarnAboutMismatchedHooksForComponent;
  19211. {
  19212. didWarnAboutMismatchedHooksForComponent = new Set();
  19213. }
  19214. // These are set right before calling the component.
  19215. var renderExpirationTime = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from
  19216. // the work-in-progress hook.
  19217. var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
  19218. // current hook list is the list that belongs to the current fiber. The
  19219. // work-in-progress hook list is a new list that will be added to the
  19220. // work-in-progress fiber.
  19221. var currentHook = null;
  19222. var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
  19223. // does not get reset if we do another render pass; only when we're completely
  19224. // finished evaluating this component. This is an optimization so we know
  19225. // whether we need to clear render phase updates after a throw.
  19226. var didScheduleRenderPhaseUpdate = false;
  19227. var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
  19228. var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
  19229. // The list stores the order of hooks used during the initial render (mount).
  19230. // Subsequent renders (updates) reference this list.
  19231. var hookTypesDev = null;
  19232. var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
  19233. // the dependencies for Hooks that need them (e.g. useEffect or useMemo).
  19234. // When true, such Hooks will always be "remounted". Only used during hot reload.
  19235. var ignorePreviousDependencies = false;
  19236. function mountHookTypesDev() {
  19237. {
  19238. var hookName = currentHookNameInDev;
  19239. if (hookTypesDev === null) {
  19240. hookTypesDev = [hookName];
  19241. } else {
  19242. hookTypesDev.push(hookName);
  19243. }
  19244. }
  19245. }
  19246. function updateHookTypesDev() {
  19247. {
  19248. var hookName = currentHookNameInDev;
  19249. if (hookTypesDev !== null) {
  19250. hookTypesUpdateIndexDev++;
  19251. if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
  19252. warnOnHookMismatchInDev(hookName);
  19253. }
  19254. }
  19255. }
  19256. }
  19257. function checkDepsAreArrayDev(deps) {
  19258. {
  19259. if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
  19260. // Verify deps, but only on mount to avoid extra checks.
  19261. // It's unlikely their type would change as usually you define them inline.
  19262. error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
  19263. }
  19264. }
  19265. }
  19266. function warnOnHookMismatchInDev(currentHookName) {
  19267. {
  19268. var componentName = getComponentName(currentlyRenderingFiber$1.type);
  19269. if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
  19270. didWarnAboutMismatchedHooksForComponent.add(componentName);
  19271. if (hookTypesDev !== null) {
  19272. var table = '';
  19273. var secondColumnStart = 30;
  19274. for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
  19275. var oldHookName = hookTypesDev[i];
  19276. var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
  19277. var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
  19278. // lol @ IE not supporting String#repeat
  19279. while (row.length < secondColumnStart) {
  19280. row += ' ';
  19281. }
  19282. row += newHookName + '\n';
  19283. table += row;
  19284. }
  19285. error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
  19286. }
  19287. }
  19288. }
  19289. }
  19290. function throwInvalidHookError() {
  19291. {
  19292. {
  19293. throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
  19294. }
  19295. }
  19296. }
  19297. function areHookInputsEqual(nextDeps, prevDeps) {
  19298. {
  19299. if (ignorePreviousDependencies) {
  19300. // Only true when this component is being hot reloaded.
  19301. return false;
  19302. }
  19303. }
  19304. if (prevDeps === null) {
  19305. {
  19306. error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
  19307. }
  19308. return false;
  19309. }
  19310. {
  19311. // Don't bother comparing lengths in prod because these arrays should be
  19312. // passed inline.
  19313. if (nextDeps.length !== prevDeps.length) {
  19314. error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
  19315. }
  19316. }
  19317. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
  19318. if (objectIs(nextDeps[i], prevDeps[i])) {
  19319. continue;
  19320. }
  19321. return false;
  19322. }
  19323. return true;
  19324. }
  19325. function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderExpirationTime) {
  19326. renderExpirationTime = nextRenderExpirationTime;
  19327. currentlyRenderingFiber$1 = workInProgress;
  19328. {
  19329. hookTypesDev = current !== null ? current._debugHookTypes : null;
  19330. hookTypesUpdateIndexDev = -1; // Used for hot reloading:
  19331. ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
  19332. }
  19333. workInProgress.memoizedState = null;
  19334. workInProgress.updateQueue = null;
  19335. workInProgress.expirationTime = NoWork; // The following should have already been reset
  19336. // currentHook = null;
  19337. // workInProgressHook = null;
  19338. // didScheduleRenderPhaseUpdate = false;
  19339. // TODO Warn if no hooks are used at all during mount, then some are used during update.
  19340. // Currently we will identify the update render as a mount because memoizedState === null.
  19341. // This is tricky because it's valid for certain types of components (e.g. React.lazy)
  19342. // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
  19343. // Non-stateful hooks (e.g. context) don't get added to memoizedState,
  19344. // so memoizedState would be null during updates and mounts.
  19345. {
  19346. if (current !== null && current.memoizedState !== null) {
  19347. ReactCurrentDispatcher.current = HooksDispatcherOnUpdateInDEV;
  19348. } else if (hookTypesDev !== null) {
  19349. // This dispatcher handles an edge case where a component is updating,
  19350. // but no stateful hooks have been used.
  19351. // We want to match the production code behavior (which will use HooksDispatcherOnMount),
  19352. // but with the extra DEV validation to ensure hooks ordering hasn't changed.
  19353. // This dispatcher does that.
  19354. ReactCurrentDispatcher.current = HooksDispatcherOnMountWithHookTypesInDEV;
  19355. } else {
  19356. ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;
  19357. }
  19358. }
  19359. var children = Component(props, secondArg); // Check if there was a render phase update
  19360. if (workInProgress.expirationTime === renderExpirationTime) {
  19361. // Keep rendering in a loop for as long as render phase updates continue to
  19362. // be scheduled. Use a counter to prevent infinite loops.
  19363. var numberOfReRenders = 0;
  19364. do {
  19365. workInProgress.expirationTime = NoWork;
  19366. if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
  19367. {
  19368. throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
  19369. }
  19370. }
  19371. numberOfReRenders += 1;
  19372. {
  19373. // Even when hot reloading, allow dependencies to stabilize
  19374. // after first render to prevent infinite render phase updates.
  19375. ignorePreviousDependencies = false;
  19376. } // Start over from the beginning of the list
  19377. currentHook = null;
  19378. workInProgressHook = null;
  19379. workInProgress.updateQueue = null;
  19380. {
  19381. // Also validate hook order for cascading updates.
  19382. hookTypesUpdateIndexDev = -1;
  19383. }
  19384. ReactCurrentDispatcher.current = HooksDispatcherOnRerenderInDEV ;
  19385. children = Component(props, secondArg);
  19386. } while (workInProgress.expirationTime === renderExpirationTime);
  19387. } // We can assume the previous dispatcher is always this one, since we set it
  19388. // at the beginning of the render phase and there's no re-entrancy.
  19389. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  19390. {
  19391. workInProgress._debugHookTypes = hookTypesDev;
  19392. } // This check uses currentHook so that it works the same in DEV and prod bundles.
  19393. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
  19394. var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
  19395. renderExpirationTime = NoWork;
  19396. currentlyRenderingFiber$1 = null;
  19397. currentHook = null;
  19398. workInProgressHook = null;
  19399. {
  19400. currentHookNameInDev = null;
  19401. hookTypesDev = null;
  19402. hookTypesUpdateIndexDev = -1;
  19403. }
  19404. didScheduleRenderPhaseUpdate = false;
  19405. if (!!didRenderTooFewHooks) {
  19406. {
  19407. throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." );
  19408. }
  19409. }
  19410. return children;
  19411. }
  19412. function bailoutHooks(current, workInProgress, expirationTime) {
  19413. workInProgress.updateQueue = current.updateQueue;
  19414. workInProgress.effectTag &= ~(Passive | Update);
  19415. if (current.expirationTime <= expirationTime) {
  19416. current.expirationTime = NoWork;
  19417. }
  19418. }
  19419. function resetHooksAfterThrow() {
  19420. // We can assume the previous dispatcher is always this one, since we set it
  19421. // at the beginning of the render phase and there's no re-entrancy.
  19422. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  19423. if (didScheduleRenderPhaseUpdate) {
  19424. // There were render phase updates. These are only valid for this render
  19425. // phase, which we are now aborting. Remove the updates from the queues so
  19426. // they do not persist to the next render. Do not remove updates from hooks
  19427. // that weren't processed.
  19428. //
  19429. // Only reset the updates from the queue if it has a clone. If it does
  19430. // not have a clone, that means it wasn't processed, and the updates were
  19431. // scheduled before we entered the render phase.
  19432. var hook = currentlyRenderingFiber$1.memoizedState;
  19433. while (hook !== null) {
  19434. var queue = hook.queue;
  19435. if (queue !== null) {
  19436. queue.pending = null;
  19437. }
  19438. hook = hook.next;
  19439. }
  19440. }
  19441. renderExpirationTime = NoWork;
  19442. currentlyRenderingFiber$1 = null;
  19443. currentHook = null;
  19444. workInProgressHook = null;
  19445. {
  19446. hookTypesDev = null;
  19447. hookTypesUpdateIndexDev = -1;
  19448. currentHookNameInDev = null;
  19449. }
  19450. didScheduleRenderPhaseUpdate = false;
  19451. }
  19452. function mountWorkInProgressHook() {
  19453. var hook = {
  19454. memoizedState: null,
  19455. baseState: null,
  19456. baseQueue: null,
  19457. queue: null,
  19458. next: null
  19459. };
  19460. if (workInProgressHook === null) {
  19461. // This is the first hook in the list
  19462. currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
  19463. } else {
  19464. // Append to the end of the list
  19465. workInProgressHook = workInProgressHook.next = hook;
  19466. }
  19467. return workInProgressHook;
  19468. }
  19469. function updateWorkInProgressHook() {
  19470. // This function is used both for updates and for re-renders triggered by a
  19471. // render phase update. It assumes there is either a current hook we can
  19472. // clone, or a work-in-progress hook from a previous render pass that we can
  19473. // use as a base. When we reach the end of the base list, we must switch to
  19474. // the dispatcher used for mounts.
  19475. var nextCurrentHook;
  19476. if (currentHook === null) {
  19477. var current = currentlyRenderingFiber$1.alternate;
  19478. if (current !== null) {
  19479. nextCurrentHook = current.memoizedState;
  19480. } else {
  19481. nextCurrentHook = null;
  19482. }
  19483. } else {
  19484. nextCurrentHook = currentHook.next;
  19485. }
  19486. var nextWorkInProgressHook;
  19487. if (workInProgressHook === null) {
  19488. nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
  19489. } else {
  19490. nextWorkInProgressHook = workInProgressHook.next;
  19491. }
  19492. if (nextWorkInProgressHook !== null) {
  19493. // There's already a work-in-progress. Reuse it.
  19494. workInProgressHook = nextWorkInProgressHook;
  19495. nextWorkInProgressHook = workInProgressHook.next;
  19496. currentHook = nextCurrentHook;
  19497. } else {
  19498. // Clone from the current hook.
  19499. if (!(nextCurrentHook !== null)) {
  19500. {
  19501. throw Error( "Rendered more hooks than during the previous render." );
  19502. }
  19503. }
  19504. currentHook = nextCurrentHook;
  19505. var newHook = {
  19506. memoizedState: currentHook.memoizedState,
  19507. baseState: currentHook.baseState,
  19508. baseQueue: currentHook.baseQueue,
  19509. queue: currentHook.queue,
  19510. next: null
  19511. };
  19512. if (workInProgressHook === null) {
  19513. // This is the first hook in the list.
  19514. currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
  19515. } else {
  19516. // Append to the end of the list.
  19517. workInProgressHook = workInProgressHook.next = newHook;
  19518. }
  19519. }
  19520. return workInProgressHook;
  19521. }
  19522. function createFunctionComponentUpdateQueue() {
  19523. return {
  19524. lastEffect: null
  19525. };
  19526. }
  19527. function basicStateReducer(state, action) {
  19528. // $FlowFixMe: Flow doesn't like mixed types
  19529. return typeof action === 'function' ? action(state) : action;
  19530. }
  19531. function mountReducer(reducer, initialArg, init) {
  19532. var hook = mountWorkInProgressHook();
  19533. var initialState;
  19534. if (init !== undefined) {
  19535. initialState = init(initialArg);
  19536. } else {
  19537. initialState = initialArg;
  19538. }
  19539. hook.memoizedState = hook.baseState = initialState;
  19540. var queue = hook.queue = {
  19541. pending: null,
  19542. dispatch: null,
  19543. lastRenderedReducer: reducer,
  19544. lastRenderedState: initialState
  19545. };
  19546. var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
  19547. return [hook.memoizedState, dispatch];
  19548. }
  19549. function updateReducer(reducer, initialArg, init) {
  19550. var hook = updateWorkInProgressHook();
  19551. var queue = hook.queue;
  19552. if (!(queue !== null)) {
  19553. {
  19554. throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
  19555. }
  19556. }
  19557. queue.lastRenderedReducer = reducer;
  19558. var current = currentHook; // The last rebase update that is NOT part of the base state.
  19559. var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.
  19560. var pendingQueue = queue.pending;
  19561. if (pendingQueue !== null) {
  19562. // We have new updates that haven't been processed yet.
  19563. // We'll add them to the base queue.
  19564. if (baseQueue !== null) {
  19565. // Merge the pending queue and the base queue.
  19566. var baseFirst = baseQueue.next;
  19567. var pendingFirst = pendingQueue.next;
  19568. baseQueue.next = pendingFirst;
  19569. pendingQueue.next = baseFirst;
  19570. }
  19571. current.baseQueue = baseQueue = pendingQueue;
  19572. queue.pending = null;
  19573. }
  19574. if (baseQueue !== null) {
  19575. // We have a queue to process.
  19576. var first = baseQueue.next;
  19577. var newState = current.baseState;
  19578. var newBaseState = null;
  19579. var newBaseQueueFirst = null;
  19580. var newBaseQueueLast = null;
  19581. var update = first;
  19582. do {
  19583. var updateExpirationTime = update.expirationTime;
  19584. if (updateExpirationTime < renderExpirationTime) {
  19585. // Priority is insufficient. Skip this update. If this is the first
  19586. // skipped update, the previous update/state is the new base
  19587. // update/state.
  19588. var clone = {
  19589. expirationTime: update.expirationTime,
  19590. suspenseConfig: update.suspenseConfig,
  19591. action: update.action,
  19592. eagerReducer: update.eagerReducer,
  19593. eagerState: update.eagerState,
  19594. next: null
  19595. };
  19596. if (newBaseQueueLast === null) {
  19597. newBaseQueueFirst = newBaseQueueLast = clone;
  19598. newBaseState = newState;
  19599. } else {
  19600. newBaseQueueLast = newBaseQueueLast.next = clone;
  19601. } // Update the remaining priority in the queue.
  19602. if (updateExpirationTime > currentlyRenderingFiber$1.expirationTime) {
  19603. currentlyRenderingFiber$1.expirationTime = updateExpirationTime;
  19604. markUnprocessedUpdateTime(updateExpirationTime);
  19605. }
  19606. } else {
  19607. // This update does have sufficient priority.
  19608. if (newBaseQueueLast !== null) {
  19609. var _clone = {
  19610. expirationTime: Sync,
  19611. // This update is going to be committed so we never want uncommit it.
  19612. suspenseConfig: update.suspenseConfig,
  19613. action: update.action,
  19614. eagerReducer: update.eagerReducer,
  19615. eagerState: update.eagerState,
  19616. next: null
  19617. };
  19618. newBaseQueueLast = newBaseQueueLast.next = _clone;
  19619. } // Mark the event time of this update as relevant to this render pass.
  19620. // TODO: This should ideally use the true event time of this update rather than
  19621. // its priority which is a derived and not reverseable value.
  19622. // TODO: We should skip this update if it was already committed but currently
  19623. // we have no way of detecting the difference between a committed and suspended
  19624. // update here.
  19625. markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
  19626. if (update.eagerReducer === reducer) {
  19627. // If this update was processed eagerly, and its reducer matches the
  19628. // current reducer, we can use the eagerly computed state.
  19629. newState = update.eagerState;
  19630. } else {
  19631. var action = update.action;
  19632. newState = reducer(newState, action);
  19633. }
  19634. }
  19635. update = update.next;
  19636. } while (update !== null && update !== first);
  19637. if (newBaseQueueLast === null) {
  19638. newBaseState = newState;
  19639. } else {
  19640. newBaseQueueLast.next = newBaseQueueFirst;
  19641. } // Mark that the fiber performed work, but only if the new state is
  19642. // different from the current state.
  19643. if (!objectIs(newState, hook.memoizedState)) {
  19644. markWorkInProgressReceivedUpdate();
  19645. }
  19646. hook.memoizedState = newState;
  19647. hook.baseState = newBaseState;
  19648. hook.baseQueue = newBaseQueueLast;
  19649. queue.lastRenderedState = newState;
  19650. }
  19651. var dispatch = queue.dispatch;
  19652. return [hook.memoizedState, dispatch];
  19653. }
  19654. function rerenderReducer(reducer, initialArg, init) {
  19655. var hook = updateWorkInProgressHook();
  19656. var queue = hook.queue;
  19657. if (!(queue !== null)) {
  19658. {
  19659. throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
  19660. }
  19661. }
  19662. queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
  19663. // work-in-progress hook.
  19664. var dispatch = queue.dispatch;
  19665. var lastRenderPhaseUpdate = queue.pending;
  19666. var newState = hook.memoizedState;
  19667. if (lastRenderPhaseUpdate !== null) {
  19668. // The queue doesn't persist past this render pass.
  19669. queue.pending = null;
  19670. var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
  19671. var update = firstRenderPhaseUpdate;
  19672. do {
  19673. // Process this render phase update. We don't have to check the
  19674. // priority because it will always be the same as the current
  19675. // render's.
  19676. var action = update.action;
  19677. newState = reducer(newState, action);
  19678. update = update.next;
  19679. } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
  19680. // different from the current state.
  19681. if (!objectIs(newState, hook.memoizedState)) {
  19682. markWorkInProgressReceivedUpdate();
  19683. }
  19684. hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
  19685. // the base state unless the queue is empty.
  19686. // TODO: Not sure if this is the desired semantics, but it's what we
  19687. // do for gDSFP. I can't remember why.
  19688. if (hook.baseQueue === null) {
  19689. hook.baseState = newState;
  19690. }
  19691. queue.lastRenderedState = newState;
  19692. }
  19693. return [newState, dispatch];
  19694. }
  19695. function mountState(initialState) {
  19696. var hook = mountWorkInProgressHook();
  19697. if (typeof initialState === 'function') {
  19698. // $FlowFixMe: Flow doesn't like mixed types
  19699. initialState = initialState();
  19700. }
  19701. hook.memoizedState = hook.baseState = initialState;
  19702. var queue = hook.queue = {
  19703. pending: null,
  19704. dispatch: null,
  19705. lastRenderedReducer: basicStateReducer,
  19706. lastRenderedState: initialState
  19707. };
  19708. var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
  19709. return [hook.memoizedState, dispatch];
  19710. }
  19711. function updateState(initialState) {
  19712. return updateReducer(basicStateReducer);
  19713. }
  19714. function rerenderState(initialState) {
  19715. return rerenderReducer(basicStateReducer);
  19716. }
  19717. function pushEffect(tag, create, destroy, deps) {
  19718. var effect = {
  19719. tag: tag,
  19720. create: create,
  19721. destroy: destroy,
  19722. deps: deps,
  19723. // Circular
  19724. next: null
  19725. };
  19726. var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
  19727. if (componentUpdateQueue === null) {
  19728. componentUpdateQueue = createFunctionComponentUpdateQueue();
  19729. currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
  19730. componentUpdateQueue.lastEffect = effect.next = effect;
  19731. } else {
  19732. var lastEffect = componentUpdateQueue.lastEffect;
  19733. if (lastEffect === null) {
  19734. componentUpdateQueue.lastEffect = effect.next = effect;
  19735. } else {
  19736. var firstEffect = lastEffect.next;
  19737. lastEffect.next = effect;
  19738. effect.next = firstEffect;
  19739. componentUpdateQueue.lastEffect = effect;
  19740. }
  19741. }
  19742. return effect;
  19743. }
  19744. function mountRef(initialValue) {
  19745. var hook = mountWorkInProgressHook();
  19746. var ref = {
  19747. current: initialValue
  19748. };
  19749. {
  19750. Object.seal(ref);
  19751. }
  19752. hook.memoizedState = ref;
  19753. return ref;
  19754. }
  19755. function updateRef(initialValue) {
  19756. var hook = updateWorkInProgressHook();
  19757. return hook.memoizedState;
  19758. }
  19759. function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  19760. var hook = mountWorkInProgressHook();
  19761. var nextDeps = deps === undefined ? null : deps;
  19762. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  19763. hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, undefined, nextDeps);
  19764. }
  19765. function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  19766. var hook = updateWorkInProgressHook();
  19767. var nextDeps = deps === undefined ? null : deps;
  19768. var destroy = undefined;
  19769. if (currentHook !== null) {
  19770. var prevEffect = currentHook.memoizedState;
  19771. destroy = prevEffect.destroy;
  19772. if (nextDeps !== null) {
  19773. var prevDeps = prevEffect.deps;
  19774. if (areHookInputsEqual(nextDeps, prevDeps)) {
  19775. pushEffect(hookEffectTag, create, destroy, nextDeps);
  19776. return;
  19777. }
  19778. }
  19779. }
  19780. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  19781. hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, destroy, nextDeps);
  19782. }
  19783. function mountEffect(create, deps) {
  19784. {
  19785. // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
  19786. if ('undefined' !== typeof jest) {
  19787. warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
  19788. }
  19789. }
  19790. return mountEffectImpl(Update | Passive, Passive$1, create, deps);
  19791. }
  19792. function updateEffect(create, deps) {
  19793. {
  19794. // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
  19795. if ('undefined' !== typeof jest) {
  19796. warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
  19797. }
  19798. }
  19799. return updateEffectImpl(Update | Passive, Passive$1, create, deps);
  19800. }
  19801. function mountLayoutEffect(create, deps) {
  19802. return mountEffectImpl(Update, Layout, create, deps);
  19803. }
  19804. function updateLayoutEffect(create, deps) {
  19805. return updateEffectImpl(Update, Layout, create, deps);
  19806. }
  19807. function imperativeHandleEffect(create, ref) {
  19808. if (typeof ref === 'function') {
  19809. var refCallback = ref;
  19810. var _inst = create();
  19811. refCallback(_inst);
  19812. return function () {
  19813. refCallback(null);
  19814. };
  19815. } else if (ref !== null && ref !== undefined) {
  19816. var refObject = ref;
  19817. {
  19818. if (!refObject.hasOwnProperty('current')) {
  19819. error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
  19820. }
  19821. }
  19822. var _inst2 = create();
  19823. refObject.current = _inst2;
  19824. return function () {
  19825. refObject.current = null;
  19826. };
  19827. }
  19828. }
  19829. function mountImperativeHandle(ref, create, deps) {
  19830. {
  19831. if (typeof create !== 'function') {
  19832. error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
  19833. }
  19834. } // TODO: If deps are provided, should we skip comparing the ref itself?
  19835. var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
  19836. return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
  19837. }
  19838. function updateImperativeHandle(ref, create, deps) {
  19839. {
  19840. if (typeof create !== 'function') {
  19841. error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
  19842. }
  19843. } // TODO: If deps are provided, should we skip comparing the ref itself?
  19844. var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
  19845. return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
  19846. }
  19847. function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
  19848. // The react-debug-hooks package injects its own implementation
  19849. // so that e.g. DevTools can display custom hook values.
  19850. }
  19851. var updateDebugValue = mountDebugValue;
  19852. function mountCallback(callback, deps) {
  19853. var hook = mountWorkInProgressHook();
  19854. var nextDeps = deps === undefined ? null : deps;
  19855. hook.memoizedState = [callback, nextDeps];
  19856. return callback;
  19857. }
  19858. function updateCallback(callback, deps) {
  19859. var hook = updateWorkInProgressHook();
  19860. var nextDeps = deps === undefined ? null : deps;
  19861. var prevState = hook.memoizedState;
  19862. if (prevState !== null) {
  19863. if (nextDeps !== null) {
  19864. var prevDeps = prevState[1];
  19865. if (areHookInputsEqual(nextDeps, prevDeps)) {
  19866. return prevState[0];
  19867. }
  19868. }
  19869. }
  19870. hook.memoizedState = [callback, nextDeps];
  19871. return callback;
  19872. }
  19873. function mountMemo(nextCreate, deps) {
  19874. var hook = mountWorkInProgressHook();
  19875. var nextDeps = deps === undefined ? null : deps;
  19876. var nextValue = nextCreate();
  19877. hook.memoizedState = [nextValue, nextDeps];
  19878. return nextValue;
  19879. }
  19880. function updateMemo(nextCreate, deps) {
  19881. var hook = updateWorkInProgressHook();
  19882. var nextDeps = deps === undefined ? null : deps;
  19883. var prevState = hook.memoizedState;
  19884. if (prevState !== null) {
  19885. // Assume these are defined. If they're not, areHookInputsEqual will warn.
  19886. if (nextDeps !== null) {
  19887. var prevDeps = prevState[1];
  19888. if (areHookInputsEqual(nextDeps, prevDeps)) {
  19889. return prevState[0];
  19890. }
  19891. }
  19892. }
  19893. var nextValue = nextCreate();
  19894. hook.memoizedState = [nextValue, nextDeps];
  19895. return nextValue;
  19896. }
  19897. function mountDeferredValue(value, config) {
  19898. var _mountState = mountState(value),
  19899. prevValue = _mountState[0],
  19900. setValue = _mountState[1];
  19901. mountEffect(function () {
  19902. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  19903. ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
  19904. try {
  19905. setValue(value);
  19906. } finally {
  19907. ReactCurrentBatchConfig$1.suspense = previousConfig;
  19908. }
  19909. }, [value, config]);
  19910. return prevValue;
  19911. }
  19912. function updateDeferredValue(value, config) {
  19913. var _updateState = updateState(),
  19914. prevValue = _updateState[0],
  19915. setValue = _updateState[1];
  19916. updateEffect(function () {
  19917. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  19918. ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
  19919. try {
  19920. setValue(value);
  19921. } finally {
  19922. ReactCurrentBatchConfig$1.suspense = previousConfig;
  19923. }
  19924. }, [value, config]);
  19925. return prevValue;
  19926. }
  19927. function rerenderDeferredValue(value, config) {
  19928. var _rerenderState = rerenderState(),
  19929. prevValue = _rerenderState[0],
  19930. setValue = _rerenderState[1];
  19931. updateEffect(function () {
  19932. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  19933. ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
  19934. try {
  19935. setValue(value);
  19936. } finally {
  19937. ReactCurrentBatchConfig$1.suspense = previousConfig;
  19938. }
  19939. }, [value, config]);
  19940. return prevValue;
  19941. }
  19942. function startTransition(setPending, config, callback) {
  19943. var priorityLevel = getCurrentPriorityLevel();
  19944. runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {
  19945. setPending(true);
  19946. });
  19947. runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {
  19948. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  19949. ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
  19950. try {
  19951. setPending(false);
  19952. callback();
  19953. } finally {
  19954. ReactCurrentBatchConfig$1.suspense = previousConfig;
  19955. }
  19956. });
  19957. }
  19958. function mountTransition(config) {
  19959. var _mountState2 = mountState(false),
  19960. isPending = _mountState2[0],
  19961. setPending = _mountState2[1];
  19962. var start = mountCallback(startTransition.bind(null, setPending, config), [setPending, config]);
  19963. return [start, isPending];
  19964. }
  19965. function updateTransition(config) {
  19966. var _updateState2 = updateState(),
  19967. isPending = _updateState2[0],
  19968. setPending = _updateState2[1];
  19969. var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
  19970. return [start, isPending];
  19971. }
  19972. function rerenderTransition(config) {
  19973. var _rerenderState2 = rerenderState(),
  19974. isPending = _rerenderState2[0],
  19975. setPending = _rerenderState2[1];
  19976. var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
  19977. return [start, isPending];
  19978. }
  19979. function dispatchAction(fiber, queue, action) {
  19980. {
  19981. if (typeof arguments[3] === 'function') {
  19982. error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
  19983. }
  19984. }
  19985. var currentTime = requestCurrentTimeForUpdate();
  19986. var suspenseConfig = requestCurrentSuspenseConfig();
  19987. var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  19988. var update = {
  19989. expirationTime: expirationTime,
  19990. suspenseConfig: suspenseConfig,
  19991. action: action,
  19992. eagerReducer: null,
  19993. eagerState: null,
  19994. next: null
  19995. };
  19996. {
  19997. update.priority = getCurrentPriorityLevel();
  19998. } // Append the update to the end of the list.
  19999. var pending = queue.pending;
  20000. if (pending === null) {
  20001. // This is the first update. Create a circular list.
  20002. update.next = update;
  20003. } else {
  20004. update.next = pending.next;
  20005. pending.next = update;
  20006. }
  20007. queue.pending = update;
  20008. var alternate = fiber.alternate;
  20009. if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
  20010. // This is a render phase update. Stash it in a lazily-created map of
  20011. // queue -> linked list of updates. After this render pass, we'll restart
  20012. // and apply the stashed updates on top of the work-in-progress hook.
  20013. didScheduleRenderPhaseUpdate = true;
  20014. update.expirationTime = renderExpirationTime;
  20015. currentlyRenderingFiber$1.expirationTime = renderExpirationTime;
  20016. } else {
  20017. if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {
  20018. // The queue is currently empty, which means we can eagerly compute the
  20019. // next state before entering the render phase. If the new state is the
  20020. // same as the current state, we may be able to bail out entirely.
  20021. var lastRenderedReducer = queue.lastRenderedReducer;
  20022. if (lastRenderedReducer !== null) {
  20023. var prevDispatcher;
  20024. {
  20025. prevDispatcher = ReactCurrentDispatcher.current;
  20026. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20027. }
  20028. try {
  20029. var currentState = queue.lastRenderedState;
  20030. var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
  20031. // it, on the update object. If the reducer hasn't changed by the
  20032. // time we enter the render phase, then the eager state can be used
  20033. // without calling the reducer again.
  20034. update.eagerReducer = lastRenderedReducer;
  20035. update.eagerState = eagerState;
  20036. if (objectIs(eagerState, currentState)) {
  20037. // Fast path. We can bail out without scheduling React to re-render.
  20038. // It's still possible that we'll need to rebase this update later,
  20039. // if the component re-renders for a different reason and by that
  20040. // time the reducer has changed.
  20041. return;
  20042. }
  20043. } catch (error) {// Suppress the error. It will throw again in the render phase.
  20044. } finally {
  20045. {
  20046. ReactCurrentDispatcher.current = prevDispatcher;
  20047. }
  20048. }
  20049. }
  20050. }
  20051. {
  20052. // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
  20053. if ('undefined' !== typeof jest) {
  20054. warnIfNotScopedWithMatchingAct(fiber);
  20055. warnIfNotCurrentlyActingUpdatesInDev(fiber);
  20056. }
  20057. }
  20058. scheduleWork(fiber, expirationTime);
  20059. }
  20060. }
  20061. var ContextOnlyDispatcher = {
  20062. readContext: readContext,
  20063. useCallback: throwInvalidHookError,
  20064. useContext: throwInvalidHookError,
  20065. useEffect: throwInvalidHookError,
  20066. useImperativeHandle: throwInvalidHookError,
  20067. useLayoutEffect: throwInvalidHookError,
  20068. useMemo: throwInvalidHookError,
  20069. useReducer: throwInvalidHookError,
  20070. useRef: throwInvalidHookError,
  20071. useState: throwInvalidHookError,
  20072. useDebugValue: throwInvalidHookError,
  20073. useResponder: throwInvalidHookError,
  20074. useDeferredValue: throwInvalidHookError,
  20075. useTransition: throwInvalidHookError
  20076. };
  20077. var HooksDispatcherOnMountInDEV = null;
  20078. var HooksDispatcherOnMountWithHookTypesInDEV = null;
  20079. var HooksDispatcherOnUpdateInDEV = null;
  20080. var HooksDispatcherOnRerenderInDEV = null;
  20081. var InvalidNestedHooksDispatcherOnMountInDEV = null;
  20082. var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
  20083. var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
  20084. {
  20085. var warnInvalidContextAccess = function () {
  20086. error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
  20087. };
  20088. var warnInvalidHookAccess = function () {
  20089. error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
  20090. };
  20091. HooksDispatcherOnMountInDEV = {
  20092. readContext: function (context, observedBits) {
  20093. return readContext(context, observedBits);
  20094. },
  20095. useCallback: function (callback, deps) {
  20096. currentHookNameInDev = 'useCallback';
  20097. mountHookTypesDev();
  20098. checkDepsAreArrayDev(deps);
  20099. return mountCallback(callback, deps);
  20100. },
  20101. useContext: function (context, observedBits) {
  20102. currentHookNameInDev = 'useContext';
  20103. mountHookTypesDev();
  20104. return readContext(context, observedBits);
  20105. },
  20106. useEffect: function (create, deps) {
  20107. currentHookNameInDev = 'useEffect';
  20108. mountHookTypesDev();
  20109. checkDepsAreArrayDev(deps);
  20110. return mountEffect(create, deps);
  20111. },
  20112. useImperativeHandle: function (ref, create, deps) {
  20113. currentHookNameInDev = 'useImperativeHandle';
  20114. mountHookTypesDev();
  20115. checkDepsAreArrayDev(deps);
  20116. return mountImperativeHandle(ref, create, deps);
  20117. },
  20118. useLayoutEffect: function (create, deps) {
  20119. currentHookNameInDev = 'useLayoutEffect';
  20120. mountHookTypesDev();
  20121. checkDepsAreArrayDev(deps);
  20122. return mountLayoutEffect(create, deps);
  20123. },
  20124. useMemo: function (create, deps) {
  20125. currentHookNameInDev = 'useMemo';
  20126. mountHookTypesDev();
  20127. checkDepsAreArrayDev(deps);
  20128. var prevDispatcher = ReactCurrentDispatcher.current;
  20129. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20130. try {
  20131. return mountMemo(create, deps);
  20132. } finally {
  20133. ReactCurrentDispatcher.current = prevDispatcher;
  20134. }
  20135. },
  20136. useReducer: function (reducer, initialArg, init) {
  20137. currentHookNameInDev = 'useReducer';
  20138. mountHookTypesDev();
  20139. var prevDispatcher = ReactCurrentDispatcher.current;
  20140. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20141. try {
  20142. return mountReducer(reducer, initialArg, init);
  20143. } finally {
  20144. ReactCurrentDispatcher.current = prevDispatcher;
  20145. }
  20146. },
  20147. useRef: function (initialValue) {
  20148. currentHookNameInDev = 'useRef';
  20149. mountHookTypesDev();
  20150. return mountRef(initialValue);
  20151. },
  20152. useState: function (initialState) {
  20153. currentHookNameInDev = 'useState';
  20154. mountHookTypesDev();
  20155. var prevDispatcher = ReactCurrentDispatcher.current;
  20156. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20157. try {
  20158. return mountState(initialState);
  20159. } finally {
  20160. ReactCurrentDispatcher.current = prevDispatcher;
  20161. }
  20162. },
  20163. useDebugValue: function (value, formatterFn) {
  20164. currentHookNameInDev = 'useDebugValue';
  20165. mountHookTypesDev();
  20166. return mountDebugValue();
  20167. },
  20168. useResponder: function (responder, props) {
  20169. currentHookNameInDev = 'useResponder';
  20170. mountHookTypesDev();
  20171. return createDeprecatedResponderListener(responder, props);
  20172. },
  20173. useDeferredValue: function (value, config) {
  20174. currentHookNameInDev = 'useDeferredValue';
  20175. mountHookTypesDev();
  20176. return mountDeferredValue(value, config);
  20177. },
  20178. useTransition: function (config) {
  20179. currentHookNameInDev = 'useTransition';
  20180. mountHookTypesDev();
  20181. return mountTransition(config);
  20182. }
  20183. };
  20184. HooksDispatcherOnMountWithHookTypesInDEV = {
  20185. readContext: function (context, observedBits) {
  20186. return readContext(context, observedBits);
  20187. },
  20188. useCallback: function (callback, deps) {
  20189. currentHookNameInDev = 'useCallback';
  20190. updateHookTypesDev();
  20191. return mountCallback(callback, deps);
  20192. },
  20193. useContext: function (context, observedBits) {
  20194. currentHookNameInDev = 'useContext';
  20195. updateHookTypesDev();
  20196. return readContext(context, observedBits);
  20197. },
  20198. useEffect: function (create, deps) {
  20199. currentHookNameInDev = 'useEffect';
  20200. updateHookTypesDev();
  20201. return mountEffect(create, deps);
  20202. },
  20203. useImperativeHandle: function (ref, create, deps) {
  20204. currentHookNameInDev = 'useImperativeHandle';
  20205. updateHookTypesDev();
  20206. return mountImperativeHandle(ref, create, deps);
  20207. },
  20208. useLayoutEffect: function (create, deps) {
  20209. currentHookNameInDev = 'useLayoutEffect';
  20210. updateHookTypesDev();
  20211. return mountLayoutEffect(create, deps);
  20212. },
  20213. useMemo: function (create, deps) {
  20214. currentHookNameInDev = 'useMemo';
  20215. updateHookTypesDev();
  20216. var prevDispatcher = ReactCurrentDispatcher.current;
  20217. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20218. try {
  20219. return mountMemo(create, deps);
  20220. } finally {
  20221. ReactCurrentDispatcher.current = prevDispatcher;
  20222. }
  20223. },
  20224. useReducer: function (reducer, initialArg, init) {
  20225. currentHookNameInDev = 'useReducer';
  20226. updateHookTypesDev();
  20227. var prevDispatcher = ReactCurrentDispatcher.current;
  20228. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20229. try {
  20230. return mountReducer(reducer, initialArg, init);
  20231. } finally {
  20232. ReactCurrentDispatcher.current = prevDispatcher;
  20233. }
  20234. },
  20235. useRef: function (initialValue) {
  20236. currentHookNameInDev = 'useRef';
  20237. updateHookTypesDev();
  20238. return mountRef(initialValue);
  20239. },
  20240. useState: function (initialState) {
  20241. currentHookNameInDev = 'useState';
  20242. updateHookTypesDev();
  20243. var prevDispatcher = ReactCurrentDispatcher.current;
  20244. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20245. try {
  20246. return mountState(initialState);
  20247. } finally {
  20248. ReactCurrentDispatcher.current = prevDispatcher;
  20249. }
  20250. },
  20251. useDebugValue: function (value, formatterFn) {
  20252. currentHookNameInDev = 'useDebugValue';
  20253. updateHookTypesDev();
  20254. return mountDebugValue();
  20255. },
  20256. useResponder: function (responder, props) {
  20257. currentHookNameInDev = 'useResponder';
  20258. updateHookTypesDev();
  20259. return createDeprecatedResponderListener(responder, props);
  20260. },
  20261. useDeferredValue: function (value, config) {
  20262. currentHookNameInDev = 'useDeferredValue';
  20263. updateHookTypesDev();
  20264. return mountDeferredValue(value, config);
  20265. },
  20266. useTransition: function (config) {
  20267. currentHookNameInDev = 'useTransition';
  20268. updateHookTypesDev();
  20269. return mountTransition(config);
  20270. }
  20271. };
  20272. HooksDispatcherOnUpdateInDEV = {
  20273. readContext: function (context, observedBits) {
  20274. return readContext(context, observedBits);
  20275. },
  20276. useCallback: function (callback, deps) {
  20277. currentHookNameInDev = 'useCallback';
  20278. updateHookTypesDev();
  20279. return updateCallback(callback, deps);
  20280. },
  20281. useContext: function (context, observedBits) {
  20282. currentHookNameInDev = 'useContext';
  20283. updateHookTypesDev();
  20284. return readContext(context, observedBits);
  20285. },
  20286. useEffect: function (create, deps) {
  20287. currentHookNameInDev = 'useEffect';
  20288. updateHookTypesDev();
  20289. return updateEffect(create, deps);
  20290. },
  20291. useImperativeHandle: function (ref, create, deps) {
  20292. currentHookNameInDev = 'useImperativeHandle';
  20293. updateHookTypesDev();
  20294. return updateImperativeHandle(ref, create, deps);
  20295. },
  20296. useLayoutEffect: function (create, deps) {
  20297. currentHookNameInDev = 'useLayoutEffect';
  20298. updateHookTypesDev();
  20299. return updateLayoutEffect(create, deps);
  20300. },
  20301. useMemo: function (create, deps) {
  20302. currentHookNameInDev = 'useMemo';
  20303. updateHookTypesDev();
  20304. var prevDispatcher = ReactCurrentDispatcher.current;
  20305. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20306. try {
  20307. return updateMemo(create, deps);
  20308. } finally {
  20309. ReactCurrentDispatcher.current = prevDispatcher;
  20310. }
  20311. },
  20312. useReducer: function (reducer, initialArg, init) {
  20313. currentHookNameInDev = 'useReducer';
  20314. updateHookTypesDev();
  20315. var prevDispatcher = ReactCurrentDispatcher.current;
  20316. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20317. try {
  20318. return updateReducer(reducer, initialArg, init);
  20319. } finally {
  20320. ReactCurrentDispatcher.current = prevDispatcher;
  20321. }
  20322. },
  20323. useRef: function (initialValue) {
  20324. currentHookNameInDev = 'useRef';
  20325. updateHookTypesDev();
  20326. return updateRef();
  20327. },
  20328. useState: function (initialState) {
  20329. currentHookNameInDev = 'useState';
  20330. updateHookTypesDev();
  20331. var prevDispatcher = ReactCurrentDispatcher.current;
  20332. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20333. try {
  20334. return updateState(initialState);
  20335. } finally {
  20336. ReactCurrentDispatcher.current = prevDispatcher;
  20337. }
  20338. },
  20339. useDebugValue: function (value, formatterFn) {
  20340. currentHookNameInDev = 'useDebugValue';
  20341. updateHookTypesDev();
  20342. return updateDebugValue();
  20343. },
  20344. useResponder: function (responder, props) {
  20345. currentHookNameInDev = 'useResponder';
  20346. updateHookTypesDev();
  20347. return createDeprecatedResponderListener(responder, props);
  20348. },
  20349. useDeferredValue: function (value, config) {
  20350. currentHookNameInDev = 'useDeferredValue';
  20351. updateHookTypesDev();
  20352. return updateDeferredValue(value, config);
  20353. },
  20354. useTransition: function (config) {
  20355. currentHookNameInDev = 'useTransition';
  20356. updateHookTypesDev();
  20357. return updateTransition(config);
  20358. }
  20359. };
  20360. HooksDispatcherOnRerenderInDEV = {
  20361. readContext: function (context, observedBits) {
  20362. return readContext(context, observedBits);
  20363. },
  20364. useCallback: function (callback, deps) {
  20365. currentHookNameInDev = 'useCallback';
  20366. updateHookTypesDev();
  20367. return updateCallback(callback, deps);
  20368. },
  20369. useContext: function (context, observedBits) {
  20370. currentHookNameInDev = 'useContext';
  20371. updateHookTypesDev();
  20372. return readContext(context, observedBits);
  20373. },
  20374. useEffect: function (create, deps) {
  20375. currentHookNameInDev = 'useEffect';
  20376. updateHookTypesDev();
  20377. return updateEffect(create, deps);
  20378. },
  20379. useImperativeHandle: function (ref, create, deps) {
  20380. currentHookNameInDev = 'useImperativeHandle';
  20381. updateHookTypesDev();
  20382. return updateImperativeHandle(ref, create, deps);
  20383. },
  20384. useLayoutEffect: function (create, deps) {
  20385. currentHookNameInDev = 'useLayoutEffect';
  20386. updateHookTypesDev();
  20387. return updateLayoutEffect(create, deps);
  20388. },
  20389. useMemo: function (create, deps) {
  20390. currentHookNameInDev = 'useMemo';
  20391. updateHookTypesDev();
  20392. var prevDispatcher = ReactCurrentDispatcher.current;
  20393. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
  20394. try {
  20395. return updateMemo(create, deps);
  20396. } finally {
  20397. ReactCurrentDispatcher.current = prevDispatcher;
  20398. }
  20399. },
  20400. useReducer: function (reducer, initialArg, init) {
  20401. currentHookNameInDev = 'useReducer';
  20402. updateHookTypesDev();
  20403. var prevDispatcher = ReactCurrentDispatcher.current;
  20404. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
  20405. try {
  20406. return rerenderReducer(reducer, initialArg, init);
  20407. } finally {
  20408. ReactCurrentDispatcher.current = prevDispatcher;
  20409. }
  20410. },
  20411. useRef: function (initialValue) {
  20412. currentHookNameInDev = 'useRef';
  20413. updateHookTypesDev();
  20414. return updateRef();
  20415. },
  20416. useState: function (initialState) {
  20417. currentHookNameInDev = 'useState';
  20418. updateHookTypesDev();
  20419. var prevDispatcher = ReactCurrentDispatcher.current;
  20420. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
  20421. try {
  20422. return rerenderState(initialState);
  20423. } finally {
  20424. ReactCurrentDispatcher.current = prevDispatcher;
  20425. }
  20426. },
  20427. useDebugValue: function (value, formatterFn) {
  20428. currentHookNameInDev = 'useDebugValue';
  20429. updateHookTypesDev();
  20430. return updateDebugValue();
  20431. },
  20432. useResponder: function (responder, props) {
  20433. currentHookNameInDev = 'useResponder';
  20434. updateHookTypesDev();
  20435. return createDeprecatedResponderListener(responder, props);
  20436. },
  20437. useDeferredValue: function (value, config) {
  20438. currentHookNameInDev = 'useDeferredValue';
  20439. updateHookTypesDev();
  20440. return rerenderDeferredValue(value, config);
  20441. },
  20442. useTransition: function (config) {
  20443. currentHookNameInDev = 'useTransition';
  20444. updateHookTypesDev();
  20445. return rerenderTransition(config);
  20446. }
  20447. };
  20448. InvalidNestedHooksDispatcherOnMountInDEV = {
  20449. readContext: function (context, observedBits) {
  20450. warnInvalidContextAccess();
  20451. return readContext(context, observedBits);
  20452. },
  20453. useCallback: function (callback, deps) {
  20454. currentHookNameInDev = 'useCallback';
  20455. warnInvalidHookAccess();
  20456. mountHookTypesDev();
  20457. return mountCallback(callback, deps);
  20458. },
  20459. useContext: function (context, observedBits) {
  20460. currentHookNameInDev = 'useContext';
  20461. warnInvalidHookAccess();
  20462. mountHookTypesDev();
  20463. return readContext(context, observedBits);
  20464. },
  20465. useEffect: function (create, deps) {
  20466. currentHookNameInDev = 'useEffect';
  20467. warnInvalidHookAccess();
  20468. mountHookTypesDev();
  20469. return mountEffect(create, deps);
  20470. },
  20471. useImperativeHandle: function (ref, create, deps) {
  20472. currentHookNameInDev = 'useImperativeHandle';
  20473. warnInvalidHookAccess();
  20474. mountHookTypesDev();
  20475. return mountImperativeHandle(ref, create, deps);
  20476. },
  20477. useLayoutEffect: function (create, deps) {
  20478. currentHookNameInDev = 'useLayoutEffect';
  20479. warnInvalidHookAccess();
  20480. mountHookTypesDev();
  20481. return mountLayoutEffect(create, deps);
  20482. },
  20483. useMemo: function (create, deps) {
  20484. currentHookNameInDev = 'useMemo';
  20485. warnInvalidHookAccess();
  20486. mountHookTypesDev();
  20487. var prevDispatcher = ReactCurrentDispatcher.current;
  20488. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20489. try {
  20490. return mountMemo(create, deps);
  20491. } finally {
  20492. ReactCurrentDispatcher.current = prevDispatcher;
  20493. }
  20494. },
  20495. useReducer: function (reducer, initialArg, init) {
  20496. currentHookNameInDev = 'useReducer';
  20497. warnInvalidHookAccess();
  20498. mountHookTypesDev();
  20499. var prevDispatcher = ReactCurrentDispatcher.current;
  20500. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20501. try {
  20502. return mountReducer(reducer, initialArg, init);
  20503. } finally {
  20504. ReactCurrentDispatcher.current = prevDispatcher;
  20505. }
  20506. },
  20507. useRef: function (initialValue) {
  20508. currentHookNameInDev = 'useRef';
  20509. warnInvalidHookAccess();
  20510. mountHookTypesDev();
  20511. return mountRef(initialValue);
  20512. },
  20513. useState: function (initialState) {
  20514. currentHookNameInDev = 'useState';
  20515. warnInvalidHookAccess();
  20516. mountHookTypesDev();
  20517. var prevDispatcher = ReactCurrentDispatcher.current;
  20518. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
  20519. try {
  20520. return mountState(initialState);
  20521. } finally {
  20522. ReactCurrentDispatcher.current = prevDispatcher;
  20523. }
  20524. },
  20525. useDebugValue: function (value, formatterFn) {
  20526. currentHookNameInDev = 'useDebugValue';
  20527. warnInvalidHookAccess();
  20528. mountHookTypesDev();
  20529. return mountDebugValue();
  20530. },
  20531. useResponder: function (responder, props) {
  20532. currentHookNameInDev = 'useResponder';
  20533. warnInvalidHookAccess();
  20534. mountHookTypesDev();
  20535. return createDeprecatedResponderListener(responder, props);
  20536. },
  20537. useDeferredValue: function (value, config) {
  20538. currentHookNameInDev = 'useDeferredValue';
  20539. warnInvalidHookAccess();
  20540. mountHookTypesDev();
  20541. return mountDeferredValue(value, config);
  20542. },
  20543. useTransition: function (config) {
  20544. currentHookNameInDev = 'useTransition';
  20545. warnInvalidHookAccess();
  20546. mountHookTypesDev();
  20547. return mountTransition(config);
  20548. }
  20549. };
  20550. InvalidNestedHooksDispatcherOnUpdateInDEV = {
  20551. readContext: function (context, observedBits) {
  20552. warnInvalidContextAccess();
  20553. return readContext(context, observedBits);
  20554. },
  20555. useCallback: function (callback, deps) {
  20556. currentHookNameInDev = 'useCallback';
  20557. warnInvalidHookAccess();
  20558. updateHookTypesDev();
  20559. return updateCallback(callback, deps);
  20560. },
  20561. useContext: function (context, observedBits) {
  20562. currentHookNameInDev = 'useContext';
  20563. warnInvalidHookAccess();
  20564. updateHookTypesDev();
  20565. return readContext(context, observedBits);
  20566. },
  20567. useEffect: function (create, deps) {
  20568. currentHookNameInDev = 'useEffect';
  20569. warnInvalidHookAccess();
  20570. updateHookTypesDev();
  20571. return updateEffect(create, deps);
  20572. },
  20573. useImperativeHandle: function (ref, create, deps) {
  20574. currentHookNameInDev = 'useImperativeHandle';
  20575. warnInvalidHookAccess();
  20576. updateHookTypesDev();
  20577. return updateImperativeHandle(ref, create, deps);
  20578. },
  20579. useLayoutEffect: function (create, deps) {
  20580. currentHookNameInDev = 'useLayoutEffect';
  20581. warnInvalidHookAccess();
  20582. updateHookTypesDev();
  20583. return updateLayoutEffect(create, deps);
  20584. },
  20585. useMemo: function (create, deps) {
  20586. currentHookNameInDev = 'useMemo';
  20587. warnInvalidHookAccess();
  20588. updateHookTypesDev();
  20589. var prevDispatcher = ReactCurrentDispatcher.current;
  20590. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20591. try {
  20592. return updateMemo(create, deps);
  20593. } finally {
  20594. ReactCurrentDispatcher.current = prevDispatcher;
  20595. }
  20596. },
  20597. useReducer: function (reducer, initialArg, init) {
  20598. currentHookNameInDev = 'useReducer';
  20599. warnInvalidHookAccess();
  20600. updateHookTypesDev();
  20601. var prevDispatcher = ReactCurrentDispatcher.current;
  20602. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20603. try {
  20604. return updateReducer(reducer, initialArg, init);
  20605. } finally {
  20606. ReactCurrentDispatcher.current = prevDispatcher;
  20607. }
  20608. },
  20609. useRef: function (initialValue) {
  20610. currentHookNameInDev = 'useRef';
  20611. warnInvalidHookAccess();
  20612. updateHookTypesDev();
  20613. return updateRef();
  20614. },
  20615. useState: function (initialState) {
  20616. currentHookNameInDev = 'useState';
  20617. warnInvalidHookAccess();
  20618. updateHookTypesDev();
  20619. var prevDispatcher = ReactCurrentDispatcher.current;
  20620. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20621. try {
  20622. return updateState(initialState);
  20623. } finally {
  20624. ReactCurrentDispatcher.current = prevDispatcher;
  20625. }
  20626. },
  20627. useDebugValue: function (value, formatterFn) {
  20628. currentHookNameInDev = 'useDebugValue';
  20629. warnInvalidHookAccess();
  20630. updateHookTypesDev();
  20631. return updateDebugValue();
  20632. },
  20633. useResponder: function (responder, props) {
  20634. currentHookNameInDev = 'useResponder';
  20635. warnInvalidHookAccess();
  20636. updateHookTypesDev();
  20637. return createDeprecatedResponderListener(responder, props);
  20638. },
  20639. useDeferredValue: function (value, config) {
  20640. currentHookNameInDev = 'useDeferredValue';
  20641. warnInvalidHookAccess();
  20642. updateHookTypesDev();
  20643. return updateDeferredValue(value, config);
  20644. },
  20645. useTransition: function (config) {
  20646. currentHookNameInDev = 'useTransition';
  20647. warnInvalidHookAccess();
  20648. updateHookTypesDev();
  20649. return updateTransition(config);
  20650. }
  20651. };
  20652. InvalidNestedHooksDispatcherOnRerenderInDEV = {
  20653. readContext: function (context, observedBits) {
  20654. warnInvalidContextAccess();
  20655. return readContext(context, observedBits);
  20656. },
  20657. useCallback: function (callback, deps) {
  20658. currentHookNameInDev = 'useCallback';
  20659. warnInvalidHookAccess();
  20660. updateHookTypesDev();
  20661. return updateCallback(callback, deps);
  20662. },
  20663. useContext: function (context, observedBits) {
  20664. currentHookNameInDev = 'useContext';
  20665. warnInvalidHookAccess();
  20666. updateHookTypesDev();
  20667. return readContext(context, observedBits);
  20668. },
  20669. useEffect: function (create, deps) {
  20670. currentHookNameInDev = 'useEffect';
  20671. warnInvalidHookAccess();
  20672. updateHookTypesDev();
  20673. return updateEffect(create, deps);
  20674. },
  20675. useImperativeHandle: function (ref, create, deps) {
  20676. currentHookNameInDev = 'useImperativeHandle';
  20677. warnInvalidHookAccess();
  20678. updateHookTypesDev();
  20679. return updateImperativeHandle(ref, create, deps);
  20680. },
  20681. useLayoutEffect: function (create, deps) {
  20682. currentHookNameInDev = 'useLayoutEffect';
  20683. warnInvalidHookAccess();
  20684. updateHookTypesDev();
  20685. return updateLayoutEffect(create, deps);
  20686. },
  20687. useMemo: function (create, deps) {
  20688. currentHookNameInDev = 'useMemo';
  20689. warnInvalidHookAccess();
  20690. updateHookTypesDev();
  20691. var prevDispatcher = ReactCurrentDispatcher.current;
  20692. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20693. try {
  20694. return updateMemo(create, deps);
  20695. } finally {
  20696. ReactCurrentDispatcher.current = prevDispatcher;
  20697. }
  20698. },
  20699. useReducer: function (reducer, initialArg, init) {
  20700. currentHookNameInDev = 'useReducer';
  20701. warnInvalidHookAccess();
  20702. updateHookTypesDev();
  20703. var prevDispatcher = ReactCurrentDispatcher.current;
  20704. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20705. try {
  20706. return rerenderReducer(reducer, initialArg, init);
  20707. } finally {
  20708. ReactCurrentDispatcher.current = prevDispatcher;
  20709. }
  20710. },
  20711. useRef: function (initialValue) {
  20712. currentHookNameInDev = 'useRef';
  20713. warnInvalidHookAccess();
  20714. updateHookTypesDev();
  20715. return updateRef();
  20716. },
  20717. useState: function (initialState) {
  20718. currentHookNameInDev = 'useState';
  20719. warnInvalidHookAccess();
  20720. updateHookTypesDev();
  20721. var prevDispatcher = ReactCurrentDispatcher.current;
  20722. ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
  20723. try {
  20724. return rerenderState(initialState);
  20725. } finally {
  20726. ReactCurrentDispatcher.current = prevDispatcher;
  20727. }
  20728. },
  20729. useDebugValue: function (value, formatterFn) {
  20730. currentHookNameInDev = 'useDebugValue';
  20731. warnInvalidHookAccess();
  20732. updateHookTypesDev();
  20733. return updateDebugValue();
  20734. },
  20735. useResponder: function (responder, props) {
  20736. currentHookNameInDev = 'useResponder';
  20737. warnInvalidHookAccess();
  20738. updateHookTypesDev();
  20739. return createDeprecatedResponderListener(responder, props);
  20740. },
  20741. useDeferredValue: function (value, config) {
  20742. currentHookNameInDev = 'useDeferredValue';
  20743. warnInvalidHookAccess();
  20744. updateHookTypesDev();
  20745. return rerenderDeferredValue(value, config);
  20746. },
  20747. useTransition: function (config) {
  20748. currentHookNameInDev = 'useTransition';
  20749. warnInvalidHookAccess();
  20750. updateHookTypesDev();
  20751. return rerenderTransition(config);
  20752. }
  20753. };
  20754. }
  20755. var now$1 = Scheduler.unstable_now;
  20756. var commitTime = 0;
  20757. var profilerStartTime = -1;
  20758. function getCommitTime() {
  20759. return commitTime;
  20760. }
  20761. function recordCommitTime() {
  20762. commitTime = now$1();
  20763. }
  20764. function startProfilerTimer(fiber) {
  20765. profilerStartTime = now$1();
  20766. if (fiber.actualStartTime < 0) {
  20767. fiber.actualStartTime = now$1();
  20768. }
  20769. }
  20770. function stopProfilerTimerIfRunning(fiber) {
  20771. profilerStartTime = -1;
  20772. }
  20773. function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
  20774. if (profilerStartTime >= 0) {
  20775. var elapsedTime = now$1() - profilerStartTime;
  20776. fiber.actualDuration += elapsedTime;
  20777. if (overrideBaseTime) {
  20778. fiber.selfBaseDuration = elapsedTime;
  20779. }
  20780. profilerStartTime = -1;
  20781. }
  20782. }
  20783. // This may have been an insertion or a hydration.
  20784. var hydrationParentFiber = null;
  20785. var nextHydratableInstance = null;
  20786. var isHydrating = false;
  20787. function enterHydrationState(fiber) {
  20788. var parentInstance = fiber.stateNode.containerInfo;
  20789. nextHydratableInstance = getFirstHydratableChild(parentInstance);
  20790. hydrationParentFiber = fiber;
  20791. isHydrating = true;
  20792. return true;
  20793. }
  20794. function deleteHydratableInstance(returnFiber, instance) {
  20795. {
  20796. switch (returnFiber.tag) {
  20797. case HostRoot:
  20798. didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
  20799. break;
  20800. case HostComponent:
  20801. didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
  20802. break;
  20803. }
  20804. }
  20805. var childToDelete = createFiberFromHostInstanceForDeletion();
  20806. childToDelete.stateNode = instance;
  20807. childToDelete.return = returnFiber;
  20808. childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
  20809. // these children are not part of the reconciliation list of children.
  20810. // Even if we abort and rereconcile the children, that will try to hydrate
  20811. // again and the nodes are still in the host tree so these will be
  20812. // recreated.
  20813. if (returnFiber.lastEffect !== null) {
  20814. returnFiber.lastEffect.nextEffect = childToDelete;
  20815. returnFiber.lastEffect = childToDelete;
  20816. } else {
  20817. returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
  20818. }
  20819. }
  20820. function insertNonHydratedInstance(returnFiber, fiber) {
  20821. fiber.effectTag = fiber.effectTag & ~Hydrating | Placement;
  20822. {
  20823. switch (returnFiber.tag) {
  20824. case HostRoot:
  20825. {
  20826. var parentContainer = returnFiber.stateNode.containerInfo;
  20827. switch (fiber.tag) {
  20828. case HostComponent:
  20829. var type = fiber.type;
  20830. var props = fiber.pendingProps;
  20831. didNotFindHydratableContainerInstance(parentContainer, type);
  20832. break;
  20833. case HostText:
  20834. var text = fiber.pendingProps;
  20835. didNotFindHydratableContainerTextInstance(parentContainer, text);
  20836. break;
  20837. }
  20838. break;
  20839. }
  20840. case HostComponent:
  20841. {
  20842. var parentType = returnFiber.type;
  20843. var parentProps = returnFiber.memoizedProps;
  20844. var parentInstance = returnFiber.stateNode;
  20845. switch (fiber.tag) {
  20846. case HostComponent:
  20847. var _type = fiber.type;
  20848. var _props = fiber.pendingProps;
  20849. didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
  20850. break;
  20851. case HostText:
  20852. var _text = fiber.pendingProps;
  20853. didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
  20854. break;
  20855. case SuspenseComponent:
  20856. didNotFindHydratableSuspenseInstance(parentType, parentProps);
  20857. break;
  20858. }
  20859. break;
  20860. }
  20861. default:
  20862. return;
  20863. }
  20864. }
  20865. }
  20866. function tryHydrate(fiber, nextInstance) {
  20867. switch (fiber.tag) {
  20868. case HostComponent:
  20869. {
  20870. var type = fiber.type;
  20871. var props = fiber.pendingProps;
  20872. var instance = canHydrateInstance(nextInstance, type);
  20873. if (instance !== null) {
  20874. fiber.stateNode = instance;
  20875. return true;
  20876. }
  20877. return false;
  20878. }
  20879. case HostText:
  20880. {
  20881. var text = fiber.pendingProps;
  20882. var textInstance = canHydrateTextInstance(nextInstance, text);
  20883. if (textInstance !== null) {
  20884. fiber.stateNode = textInstance;
  20885. return true;
  20886. }
  20887. return false;
  20888. }
  20889. case SuspenseComponent:
  20890. {
  20891. return false;
  20892. }
  20893. default:
  20894. return false;
  20895. }
  20896. }
  20897. function tryToClaimNextHydratableInstance(fiber) {
  20898. if (!isHydrating) {
  20899. return;
  20900. }
  20901. var nextInstance = nextHydratableInstance;
  20902. if (!nextInstance) {
  20903. // Nothing to hydrate. Make it an insertion.
  20904. insertNonHydratedInstance(hydrationParentFiber, fiber);
  20905. isHydrating = false;
  20906. hydrationParentFiber = fiber;
  20907. return;
  20908. }
  20909. var firstAttemptedInstance = nextInstance;
  20910. if (!tryHydrate(fiber, nextInstance)) {
  20911. // If we can't hydrate this instance let's try the next one.
  20912. // We use this as a heuristic. It's based on intuition and not data so it
  20913. // might be flawed or unnecessary.
  20914. nextInstance = getNextHydratableSibling(firstAttemptedInstance);
  20915. if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
  20916. // Nothing to hydrate. Make it an insertion.
  20917. insertNonHydratedInstance(hydrationParentFiber, fiber);
  20918. isHydrating = false;
  20919. hydrationParentFiber = fiber;
  20920. return;
  20921. } // We matched the next one, we'll now assume that the first one was
  20922. // superfluous and we'll delete it. Since we can't eagerly delete it
  20923. // we'll have to schedule a deletion. To do that, this node needs a dummy
  20924. // fiber associated with it.
  20925. deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
  20926. }
  20927. hydrationParentFiber = fiber;
  20928. nextHydratableInstance = getFirstHydratableChild(nextInstance);
  20929. }
  20930. function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
  20931. var instance = fiber.stateNode;
  20932. var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
  20933. fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
  20934. // is a new ref we mark this as an update.
  20935. if (updatePayload !== null) {
  20936. return true;
  20937. }
  20938. return false;
  20939. }
  20940. function prepareToHydrateHostTextInstance(fiber) {
  20941. var textInstance = fiber.stateNode;
  20942. var textContent = fiber.memoizedProps;
  20943. var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
  20944. {
  20945. if (shouldUpdate) {
  20946. // We assume that prepareToHydrateHostTextInstance is called in a context where the
  20947. // hydration parent is the parent host component of this host text.
  20948. var returnFiber = hydrationParentFiber;
  20949. if (returnFiber !== null) {
  20950. switch (returnFiber.tag) {
  20951. case HostRoot:
  20952. {
  20953. var parentContainer = returnFiber.stateNode.containerInfo;
  20954. didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
  20955. break;
  20956. }
  20957. case HostComponent:
  20958. {
  20959. var parentType = returnFiber.type;
  20960. var parentProps = returnFiber.memoizedProps;
  20961. var parentInstance = returnFiber.stateNode;
  20962. didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
  20963. break;
  20964. }
  20965. }
  20966. }
  20967. }
  20968. }
  20969. return shouldUpdate;
  20970. }
  20971. function skipPastDehydratedSuspenseInstance(fiber) {
  20972. var suspenseState = fiber.memoizedState;
  20973. var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
  20974. if (!suspenseInstance) {
  20975. {
  20976. throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
  20977. }
  20978. }
  20979. return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
  20980. }
  20981. function popToNextHostParent(fiber) {
  20982. var parent = fiber.return;
  20983. while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
  20984. parent = parent.return;
  20985. }
  20986. hydrationParentFiber = parent;
  20987. }
  20988. function popHydrationState(fiber) {
  20989. if (fiber !== hydrationParentFiber) {
  20990. // We're deeper than the current hydration context, inside an inserted
  20991. // tree.
  20992. return false;
  20993. }
  20994. if (!isHydrating) {
  20995. // If we're not currently hydrating but we're in a hydration context, then
  20996. // we were an insertion and now need to pop up reenter hydration of our
  20997. // siblings.
  20998. popToNextHostParent(fiber);
  20999. isHydrating = true;
  21000. return false;
  21001. }
  21002. var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
  21003. // We only do this deeper than head and body since they tend to have random
  21004. // other nodes in them. We also ignore components with pure text content in
  21005. // side of them.
  21006. // TODO: Better heuristic.
  21007. if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
  21008. var nextInstance = nextHydratableInstance;
  21009. while (nextInstance) {
  21010. deleteHydratableInstance(fiber, nextInstance);
  21011. nextInstance = getNextHydratableSibling(nextInstance);
  21012. }
  21013. }
  21014. popToNextHostParent(fiber);
  21015. if (fiber.tag === SuspenseComponent) {
  21016. nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
  21017. } else {
  21018. nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
  21019. }
  21020. return true;
  21021. }
  21022. function resetHydrationState() {
  21023. hydrationParentFiber = null;
  21024. nextHydratableInstance = null;
  21025. isHydrating = false;
  21026. }
  21027. var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
  21028. var didReceiveUpdate = false;
  21029. var didWarnAboutBadClass;
  21030. var didWarnAboutModulePatternComponent;
  21031. var didWarnAboutContextTypeOnFunctionComponent;
  21032. var didWarnAboutGetDerivedStateOnFunctionComponent;
  21033. var didWarnAboutFunctionRefs;
  21034. var didWarnAboutReassigningProps;
  21035. var didWarnAboutRevealOrder;
  21036. var didWarnAboutTailOptions;
  21037. {
  21038. didWarnAboutBadClass = {};
  21039. didWarnAboutModulePatternComponent = {};
  21040. didWarnAboutContextTypeOnFunctionComponent = {};
  21041. didWarnAboutGetDerivedStateOnFunctionComponent = {};
  21042. didWarnAboutFunctionRefs = {};
  21043. didWarnAboutReassigningProps = false;
  21044. didWarnAboutRevealOrder = {};
  21045. didWarnAboutTailOptions = {};
  21046. }
  21047. function reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {
  21048. if (current === null) {
  21049. // If this is a fresh new component that hasn't been rendered yet, we
  21050. // won't update its child set by applying minimal side-effects. Instead,
  21051. // we will add them all to the child before it gets rendered. That means
  21052. // we can optimize this reconciliation pass by not tracking side-effects.
  21053. workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  21054. } else {
  21055. // If the current child is the same as the work in progress, it means that
  21056. // we haven't yet started any work on these children. Therefore, we use
  21057. // the clone algorithm to create a copy of all the current children.
  21058. // If we had any progressed work already, that is invalid at this point so
  21059. // let's throw it out.
  21060. workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
  21061. }
  21062. }
  21063. function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {
  21064. // This function is fork of reconcileChildren. It's used in cases where we
  21065. // want to reconcile without matching against the existing set. This has the
  21066. // effect of all current children being unmounted; even if the type and key
  21067. // are the same, the old child is unmounted and a new child is created.
  21068. //
  21069. // To do this, we're going to go through the reconcile algorithm twice. In
  21070. // the first pass, we schedule a deletion for all the current children by
  21071. // passing null.
  21072. workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderExpirationTime); // In the second pass, we mount the new children. The trick here is that we
  21073. // pass null in place of where we usually pass the current child set. This has
  21074. // the effect of remounting all children regardless of whether their
  21075. // identities match.
  21076. workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  21077. }
  21078. function updateForwardRef(current, workInProgress, Component, nextProps, renderExpirationTime) {
  21079. // TODO: current can be non-null here even if the component
  21080. // hasn't yet mounted. This happens after the first render suspends.
  21081. // We'll need to figure out if this is fine or can cause issues.
  21082. {
  21083. if (workInProgress.type !== workInProgress.elementType) {
  21084. // Lazy component props can't be validated in createElement
  21085. // because they're only guaranteed to be resolved here.
  21086. var innerPropTypes = Component.propTypes;
  21087. if (innerPropTypes) {
  21088. checkPropTypes(innerPropTypes, nextProps, // Resolved props
  21089. 'prop', getComponentName(Component), getCurrentFiberStackInDev);
  21090. }
  21091. }
  21092. }
  21093. var render = Component.render;
  21094. var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
  21095. var nextChildren;
  21096. prepareToReadContext(workInProgress, renderExpirationTime);
  21097. {
  21098. ReactCurrentOwner$1.current = workInProgress;
  21099. setIsRendering(true);
  21100. nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
  21101. if ( workInProgress.mode & StrictMode) {
  21102. // Only double-render components with Hooks
  21103. if (workInProgress.memoizedState !== null) {
  21104. nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
  21105. }
  21106. }
  21107. setIsRendering(false);
  21108. }
  21109. if (current !== null && !didReceiveUpdate) {
  21110. bailoutHooks(current, workInProgress, renderExpirationTime);
  21111. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  21112. } // React DevTools reads this flag.
  21113. workInProgress.effectTag |= PerformedWork;
  21114. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21115. return workInProgress.child;
  21116. }
  21117. function updateMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
  21118. if (current === null) {
  21119. var type = Component.type;
  21120. if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
  21121. Component.defaultProps === undefined) {
  21122. var resolvedType = type;
  21123. {
  21124. resolvedType = resolveFunctionForHotReloading(type);
  21125. } // If this is a plain function component without default props,
  21126. // and with only the default shallow comparison, we upgrade it
  21127. // to a SimpleMemoComponent to allow fast path updates.
  21128. workInProgress.tag = SimpleMemoComponent;
  21129. workInProgress.type = resolvedType;
  21130. {
  21131. validateFunctionComponentInDev(workInProgress, type);
  21132. }
  21133. return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);
  21134. }
  21135. {
  21136. var innerPropTypes = type.propTypes;
  21137. if (innerPropTypes) {
  21138. // Inner memo component props aren't currently validated in createElement.
  21139. // We could move it there, but we'd still need this for lazy code path.
  21140. checkPropTypes(innerPropTypes, nextProps, // Resolved props
  21141. 'prop', getComponentName(type), getCurrentFiberStackInDev);
  21142. }
  21143. }
  21144. var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
  21145. child.ref = workInProgress.ref;
  21146. child.return = workInProgress;
  21147. workInProgress.child = child;
  21148. return child;
  21149. }
  21150. {
  21151. var _type = Component.type;
  21152. var _innerPropTypes = _type.propTypes;
  21153. if (_innerPropTypes) {
  21154. // Inner memo component props aren't currently validated in createElement.
  21155. // We could move it there, but we'd still need this for lazy code path.
  21156. checkPropTypes(_innerPropTypes, nextProps, // Resolved props
  21157. 'prop', getComponentName(_type), getCurrentFiberStackInDev);
  21158. }
  21159. }
  21160. var currentChild = current.child; // This is always exactly one child
  21161. if (updateExpirationTime < renderExpirationTime) {
  21162. // This will be the props with resolved defaultProps,
  21163. // unlike current.memoizedProps which will be the unresolved ones.
  21164. var prevProps = currentChild.memoizedProps; // Default to shallow comparison
  21165. var compare = Component.compare;
  21166. compare = compare !== null ? compare : shallowEqual;
  21167. if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
  21168. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  21169. }
  21170. } // React DevTools reads this flag.
  21171. workInProgress.effectTag |= PerformedWork;
  21172. var newChild = createWorkInProgress(currentChild, nextProps);
  21173. newChild.ref = workInProgress.ref;
  21174. newChild.return = workInProgress;
  21175. workInProgress.child = newChild;
  21176. return newChild;
  21177. }
  21178. function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
  21179. // TODO: current can be non-null here even if the component
  21180. // hasn't yet mounted. This happens when the inner render suspends.
  21181. // We'll need to figure out if this is fine or can cause issues.
  21182. {
  21183. if (workInProgress.type !== workInProgress.elementType) {
  21184. // Lazy component props can't be validated in createElement
  21185. // because they're only guaranteed to be resolved here.
  21186. var outerMemoType = workInProgress.elementType;
  21187. if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
  21188. // We warn when you define propTypes on lazy()
  21189. // so let's just skip over it to find memo() outer wrapper.
  21190. // Inner props for memo are validated later.
  21191. outerMemoType = refineResolvedLazyComponent(outerMemoType);
  21192. }
  21193. var outerPropTypes = outerMemoType && outerMemoType.propTypes;
  21194. if (outerPropTypes) {
  21195. checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
  21196. 'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
  21197. } // Inner propTypes will be validated in the function component path.
  21198. }
  21199. }
  21200. if (current !== null) {
  21201. var prevProps = current.memoizedProps;
  21202. if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
  21203. workInProgress.type === current.type )) {
  21204. didReceiveUpdate = false;
  21205. if (updateExpirationTime < renderExpirationTime) {
  21206. // The pending update priority was cleared at the beginning of
  21207. // beginWork. We're about to bail out, but there might be additional
  21208. // updates at a lower priority. Usually, the priority level of the
  21209. // remaining updates is accumlated during the evaluation of the
  21210. // component (i.e. when processing the update queue). But since since
  21211. // we're bailing out early *without* evaluating the component, we need
  21212. // to account for it here, too. Reset to the value of the current fiber.
  21213. // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
  21214. // because a MemoComponent fiber does not have hooks or an update queue;
  21215. // rather, it wraps around an inner component, which may or may not
  21216. // contains hooks.
  21217. // TODO: Move the reset at in beginWork out of the common path so that
  21218. // this is no longer necessary.
  21219. workInProgress.expirationTime = current.expirationTime;
  21220. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  21221. }
  21222. }
  21223. }
  21224. return updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime);
  21225. }
  21226. function updateFragment(current, workInProgress, renderExpirationTime) {
  21227. var nextChildren = workInProgress.pendingProps;
  21228. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21229. return workInProgress.child;
  21230. }
  21231. function updateMode(current, workInProgress, renderExpirationTime) {
  21232. var nextChildren = workInProgress.pendingProps.children;
  21233. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21234. return workInProgress.child;
  21235. }
  21236. function updateProfiler(current, workInProgress, renderExpirationTime) {
  21237. {
  21238. workInProgress.effectTag |= Update;
  21239. }
  21240. var nextProps = workInProgress.pendingProps;
  21241. var nextChildren = nextProps.children;
  21242. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21243. return workInProgress.child;
  21244. }
  21245. function markRef(current, workInProgress) {
  21246. var ref = workInProgress.ref;
  21247. if (current === null && ref !== null || current !== null && current.ref !== ref) {
  21248. // Schedule a Ref effect
  21249. workInProgress.effectTag |= Ref;
  21250. }
  21251. }
  21252. function updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
  21253. {
  21254. if (workInProgress.type !== workInProgress.elementType) {
  21255. // Lazy component props can't be validated in createElement
  21256. // because they're only guaranteed to be resolved here.
  21257. var innerPropTypes = Component.propTypes;
  21258. if (innerPropTypes) {
  21259. checkPropTypes(innerPropTypes, nextProps, // Resolved props
  21260. 'prop', getComponentName(Component), getCurrentFiberStackInDev);
  21261. }
  21262. }
  21263. }
  21264. var context;
  21265. {
  21266. var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
  21267. context = getMaskedContext(workInProgress, unmaskedContext);
  21268. }
  21269. var nextChildren;
  21270. prepareToReadContext(workInProgress, renderExpirationTime);
  21271. {
  21272. ReactCurrentOwner$1.current = workInProgress;
  21273. setIsRendering(true);
  21274. nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
  21275. if ( workInProgress.mode & StrictMode) {
  21276. // Only double-render components with Hooks
  21277. if (workInProgress.memoizedState !== null) {
  21278. nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
  21279. }
  21280. }
  21281. setIsRendering(false);
  21282. }
  21283. if (current !== null && !didReceiveUpdate) {
  21284. bailoutHooks(current, workInProgress, renderExpirationTime);
  21285. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  21286. } // React DevTools reads this flag.
  21287. workInProgress.effectTag |= PerformedWork;
  21288. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21289. return workInProgress.child;
  21290. }
  21291. function updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
  21292. {
  21293. if (workInProgress.type !== workInProgress.elementType) {
  21294. // Lazy component props can't be validated in createElement
  21295. // because they're only guaranteed to be resolved here.
  21296. var innerPropTypes = Component.propTypes;
  21297. if (innerPropTypes) {
  21298. checkPropTypes(innerPropTypes, nextProps, // Resolved props
  21299. 'prop', getComponentName(Component), getCurrentFiberStackInDev);
  21300. }
  21301. }
  21302. } // Push context providers early to prevent context stack mismatches.
  21303. // During mounting we don't know the child context yet as the instance doesn't exist.
  21304. // We will invalidate the child context in finishClassComponent() right after rendering.
  21305. var hasContext;
  21306. if (isContextProvider(Component)) {
  21307. hasContext = true;
  21308. pushContextProvider(workInProgress);
  21309. } else {
  21310. hasContext = false;
  21311. }
  21312. prepareToReadContext(workInProgress, renderExpirationTime);
  21313. var instance = workInProgress.stateNode;
  21314. var shouldUpdate;
  21315. if (instance === null) {
  21316. if (current !== null) {
  21317. // A class component without an instance only mounts if it suspended
  21318. // inside a non-concurrent tree, in an inconsistent state. We want to
  21319. // treat it like a new mount, even though an empty version of it already
  21320. // committed. Disconnect the alternate pointers.
  21321. current.alternate = null;
  21322. workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
  21323. workInProgress.effectTag |= Placement;
  21324. } // In the initial pass we might need to construct the instance.
  21325. constructClassInstance(workInProgress, Component, nextProps);
  21326. mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
  21327. shouldUpdate = true;
  21328. } else if (current === null) {
  21329. // In a resume, we'll already have an instance we can reuse.
  21330. shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
  21331. } else {
  21332. shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderExpirationTime);
  21333. }
  21334. var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
  21335. {
  21336. var inst = workInProgress.stateNode;
  21337. if (inst.props !== nextProps) {
  21338. if (!didWarnAboutReassigningProps) {
  21339. error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
  21340. }
  21341. didWarnAboutReassigningProps = true;
  21342. }
  21343. }
  21344. return nextUnitOfWork;
  21345. }
  21346. function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
  21347. // Refs should update even if shouldComponentUpdate returns false
  21348. markRef(current, workInProgress);
  21349. var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;
  21350. if (!shouldUpdate && !didCaptureError) {
  21351. // Context providers should defer to sCU for rendering
  21352. if (hasContext) {
  21353. invalidateContextProvider(workInProgress, Component, false);
  21354. }
  21355. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  21356. }
  21357. var instance = workInProgress.stateNode; // Rerender
  21358. ReactCurrentOwner$1.current = workInProgress;
  21359. var nextChildren;
  21360. if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
  21361. // If we captured an error, but getDerivedStateFromError is not defined,
  21362. // unmount all the children. componentDidCatch will schedule an update to
  21363. // re-render a fallback. This is temporary until we migrate everyone to
  21364. // the new API.
  21365. // TODO: Warn in a future release.
  21366. nextChildren = null;
  21367. {
  21368. stopProfilerTimerIfRunning();
  21369. }
  21370. } else {
  21371. {
  21372. setIsRendering(true);
  21373. nextChildren = instance.render();
  21374. if ( workInProgress.mode & StrictMode) {
  21375. instance.render();
  21376. }
  21377. setIsRendering(false);
  21378. }
  21379. } // React DevTools reads this flag.
  21380. workInProgress.effectTag |= PerformedWork;
  21381. if (current !== null && didCaptureError) {
  21382. // If we're recovering from an error, reconcile without reusing any of
  21383. // the existing children. Conceptually, the normal children and the children
  21384. // that are shown on error are two different sets, so we shouldn't reuse
  21385. // normal children even if their identities match.
  21386. forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime);
  21387. } else {
  21388. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21389. } // Memoize state using the values we just used to render.
  21390. // TODO: Restructure so we never read values from the instance.
  21391. workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.
  21392. if (hasContext) {
  21393. invalidateContextProvider(workInProgress, Component, true);
  21394. }
  21395. return workInProgress.child;
  21396. }
  21397. function pushHostRootContext(workInProgress) {
  21398. var root = workInProgress.stateNode;
  21399. if (root.pendingContext) {
  21400. pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
  21401. } else if (root.context) {
  21402. // Should always be set
  21403. pushTopLevelContextObject(workInProgress, root.context, false);
  21404. }
  21405. pushHostContainer(workInProgress, root.containerInfo);
  21406. }
  21407. function updateHostRoot(current, workInProgress, renderExpirationTime) {
  21408. pushHostRootContext(workInProgress);
  21409. var updateQueue = workInProgress.updateQueue;
  21410. if (!(current !== null && updateQueue !== null)) {
  21411. {
  21412. throw Error( "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue." );
  21413. }
  21414. }
  21415. var nextProps = workInProgress.pendingProps;
  21416. var prevState = workInProgress.memoizedState;
  21417. var prevChildren = prevState !== null ? prevState.element : null;
  21418. cloneUpdateQueue(current, workInProgress);
  21419. processUpdateQueue(workInProgress, nextProps, null, renderExpirationTime);
  21420. var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
  21421. // being called "element".
  21422. var nextChildren = nextState.element;
  21423. if (nextChildren === prevChildren) {
  21424. // If the state is the same as before, that's a bailout because we had
  21425. // no work that expires at this time.
  21426. resetHydrationState();
  21427. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  21428. }
  21429. var root = workInProgress.stateNode;
  21430. if (root.hydrate && enterHydrationState(workInProgress)) {
  21431. // If we don't have any current children this might be the first pass.
  21432. // We always try to hydrate. If this isn't a hydration pass there won't
  21433. // be any children to hydrate which is effectively the same thing as
  21434. // not hydrating.
  21435. var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  21436. workInProgress.child = child;
  21437. var node = child;
  21438. while (node) {
  21439. // Mark each child as hydrating. This is a fast path to know whether this
  21440. // tree is part of a hydrating tree. This is used to determine if a child
  21441. // node has fully mounted yet, and for scheduling event replaying.
  21442. // Conceptually this is similar to Placement in that a new subtree is
  21443. // inserted into the React tree here. It just happens to not need DOM
  21444. // mutations because it already exists.
  21445. node.effectTag = node.effectTag & ~Placement | Hydrating;
  21446. node = node.sibling;
  21447. }
  21448. } else {
  21449. // Otherwise reset hydration state in case we aborted and resumed another
  21450. // root.
  21451. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21452. resetHydrationState();
  21453. }
  21454. return workInProgress.child;
  21455. }
  21456. function updateHostComponent(current, workInProgress, renderExpirationTime) {
  21457. pushHostContext(workInProgress);
  21458. if (current === null) {
  21459. tryToClaimNextHydratableInstance(workInProgress);
  21460. }
  21461. var type = workInProgress.type;
  21462. var nextProps = workInProgress.pendingProps;
  21463. var prevProps = current !== null ? current.memoizedProps : null;
  21464. var nextChildren = nextProps.children;
  21465. var isDirectTextChild = shouldSetTextContent(type, nextProps);
  21466. if (isDirectTextChild) {
  21467. // We special case a direct text child of a host node. This is a common
  21468. // case. We won't handle it as a reified child. We will instead handle
  21469. // this in the host environment that also has access to this prop. That
  21470. // avoids allocating another HostText fiber and traversing it.
  21471. nextChildren = null;
  21472. } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
  21473. // If we're switching from a direct text child to a normal child, or to
  21474. // empty, we need to schedule the text content to be reset.
  21475. workInProgress.effectTag |= ContentReset;
  21476. }
  21477. markRef(current, workInProgress); // Check the host config to see if the children are offscreen/hidden.
  21478. if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {
  21479. {
  21480. markSpawnedWork(Never);
  21481. } // Schedule this fiber to re-render at offscreen priority. Then bailout.
  21482. workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
  21483. return null;
  21484. }
  21485. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  21486. return workInProgress.child;
  21487. }
  21488. function updateHostText(current, workInProgress) {
  21489. if (current === null) {
  21490. tryToClaimNextHydratableInstance(workInProgress);
  21491. } // Nothing to do here. This is terminal. We'll do the completion step
  21492. // immediately after.
  21493. return null;
  21494. }
  21495. function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
  21496. if (_current !== null) {
  21497. // A lazy component only mounts if it suspended inside a non-
  21498. // concurrent tree, in an inconsistent state. We want to treat it like
  21499. // a new mount, even though an empty version of it already committed.
  21500. // Disconnect the alternate pointers.
  21501. _current.alternate = null;
  21502. workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
  21503. workInProgress.effectTag |= Placement;
  21504. }
  21505. var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet.
  21506. // Cancel and resume right after we know the tag.
  21507. cancelWorkTimer(workInProgress);
  21508. var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type.
  21509. workInProgress.type = Component;
  21510. var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
  21511. startWorkTimer(workInProgress);
  21512. var resolvedProps = resolveDefaultProps(Component, props);
  21513. var child;
  21514. switch (resolvedTag) {
  21515. case FunctionComponent:
  21516. {
  21517. {
  21518. validateFunctionComponentInDev(workInProgress, Component);
  21519. workInProgress.type = Component = resolveFunctionForHotReloading(Component);
  21520. }
  21521. child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
  21522. return child;
  21523. }
  21524. case ClassComponent:
  21525. {
  21526. {
  21527. workInProgress.type = Component = resolveClassForHotReloading(Component);
  21528. }
  21529. child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
  21530. return child;
  21531. }
  21532. case ForwardRef:
  21533. {
  21534. {
  21535. workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
  21536. }
  21537. child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
  21538. return child;
  21539. }
  21540. case MemoComponent:
  21541. {
  21542. {
  21543. if (workInProgress.type !== workInProgress.elementType) {
  21544. var outerPropTypes = Component.propTypes;
  21545. if (outerPropTypes) {
  21546. checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
  21547. 'prop', getComponentName(Component), getCurrentFiberStackInDev);
  21548. }
  21549. }
  21550. }
  21551. child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
  21552. updateExpirationTime, renderExpirationTime);
  21553. return child;
  21554. }
  21555. }
  21556. var hint = '';
  21557. {
  21558. if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
  21559. hint = ' Did you wrap a component in React.lazy() more than once?';
  21560. }
  21561. } // This message intentionally doesn't mention ForwardRef or MemoComponent
  21562. // because the fact that it's a separate type of work is an
  21563. // implementation detail.
  21564. {
  21565. {
  21566. throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint );
  21567. }
  21568. }
  21569. }
  21570. function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
  21571. if (_current !== null) {
  21572. // An incomplete component only mounts if it suspended inside a non-
  21573. // concurrent tree, in an inconsistent state. We want to treat it like
  21574. // a new mount, even though an empty version of it already committed.
  21575. // Disconnect the alternate pointers.
  21576. _current.alternate = null;
  21577. workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
  21578. workInProgress.effectTag |= Placement;
  21579. } // Promote the fiber to a class and try rendering again.
  21580. workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
  21581. // Push context providers early to prevent context stack mismatches.
  21582. // During mounting we don't know the child context yet as the instance doesn't exist.
  21583. // We will invalidate the child context in finishClassComponent() right after rendering.
  21584. var hasContext;
  21585. if (isContextProvider(Component)) {
  21586. hasContext = true;
  21587. pushContextProvider(workInProgress);
  21588. } else {
  21589. hasContext = false;
  21590. }
  21591. prepareToReadContext(workInProgress, renderExpirationTime);
  21592. constructClassInstance(workInProgress, Component, nextProps);
  21593. mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
  21594. return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
  21595. }
  21596. function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
  21597. if (_current !== null) {
  21598. // An indeterminate component only mounts if it suspended inside a non-
  21599. // concurrent tree, in an inconsistent state. We want to treat it like
  21600. // a new mount, even though an empty version of it already committed.
  21601. // Disconnect the alternate pointers.
  21602. _current.alternate = null;
  21603. workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
  21604. workInProgress.effectTag |= Placement;
  21605. }
  21606. var props = workInProgress.pendingProps;
  21607. var context;
  21608. {
  21609. var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
  21610. context = getMaskedContext(workInProgress, unmaskedContext);
  21611. }
  21612. prepareToReadContext(workInProgress, renderExpirationTime);
  21613. var value;
  21614. {
  21615. if (Component.prototype && typeof Component.prototype.render === 'function') {
  21616. var componentName = getComponentName(Component) || 'Unknown';
  21617. if (!didWarnAboutBadClass[componentName]) {
  21618. error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
  21619. didWarnAboutBadClass[componentName] = true;
  21620. }
  21621. }
  21622. if (workInProgress.mode & StrictMode) {
  21623. ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
  21624. }
  21625. setIsRendering(true);
  21626. ReactCurrentOwner$1.current = workInProgress;
  21627. value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
  21628. setIsRendering(false);
  21629. } // React DevTools reads this flag.
  21630. workInProgress.effectTag |= PerformedWork;
  21631. if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
  21632. {
  21633. var _componentName = getComponentName(Component) || 'Unknown';
  21634. if (!didWarnAboutModulePatternComponent[_componentName]) {
  21635. error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);
  21636. didWarnAboutModulePatternComponent[_componentName] = true;
  21637. }
  21638. } // Proceed under the assumption that this is a class instance
  21639. workInProgress.tag = ClassComponent; // Throw out any hooks that were used.
  21640. workInProgress.memoizedState = null;
  21641. workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
  21642. // During mounting we don't know the child context yet as the instance doesn't exist.
  21643. // We will invalidate the child context in finishClassComponent() right after rendering.
  21644. var hasContext = false;
  21645. if (isContextProvider(Component)) {
  21646. hasContext = true;
  21647. pushContextProvider(workInProgress);
  21648. } else {
  21649. hasContext = false;
  21650. }
  21651. workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
  21652. initializeUpdateQueue(workInProgress);
  21653. var getDerivedStateFromProps = Component.getDerivedStateFromProps;
  21654. if (typeof getDerivedStateFromProps === 'function') {
  21655. applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
  21656. }
  21657. adoptClassInstance(workInProgress, value);
  21658. mountClassInstance(workInProgress, Component, props, renderExpirationTime);
  21659. return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
  21660. } else {
  21661. // Proceed under the assumption that this is a function component
  21662. workInProgress.tag = FunctionComponent;
  21663. {
  21664. if ( workInProgress.mode & StrictMode) {
  21665. // Only double-render components with Hooks
  21666. if (workInProgress.memoizedState !== null) {
  21667. value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
  21668. }
  21669. }
  21670. }
  21671. reconcileChildren(null, workInProgress, value, renderExpirationTime);
  21672. {
  21673. validateFunctionComponentInDev(workInProgress, Component);
  21674. }
  21675. return workInProgress.child;
  21676. }
  21677. }
  21678. function validateFunctionComponentInDev(workInProgress, Component) {
  21679. {
  21680. if (Component) {
  21681. if (Component.childContextTypes) {
  21682. error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
  21683. }
  21684. }
  21685. if (workInProgress.ref !== null) {
  21686. var info = '';
  21687. var ownerName = getCurrentFiberOwnerNameInDevOrNull();
  21688. if (ownerName) {
  21689. info += '\n\nCheck the render method of `' + ownerName + '`.';
  21690. }
  21691. var warningKey = ownerName || workInProgress._debugID || '';
  21692. var debugSource = workInProgress._debugSource;
  21693. if (debugSource) {
  21694. warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
  21695. }
  21696. if (!didWarnAboutFunctionRefs[warningKey]) {
  21697. didWarnAboutFunctionRefs[warningKey] = true;
  21698. error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
  21699. }
  21700. }
  21701. if (typeof Component.getDerivedStateFromProps === 'function') {
  21702. var _componentName2 = getComponentName(Component) || 'Unknown';
  21703. if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {
  21704. error('%s: Function components do not support getDerivedStateFromProps.', _componentName2);
  21705. didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;
  21706. }
  21707. }
  21708. if (typeof Component.contextType === 'object' && Component.contextType !== null) {
  21709. var _componentName3 = getComponentName(Component) || 'Unknown';
  21710. if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
  21711. error('%s: Function components do not support contextType.', _componentName3);
  21712. didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
  21713. }
  21714. }
  21715. }
  21716. }
  21717. var SUSPENDED_MARKER = {
  21718. dehydrated: null,
  21719. retryTime: NoWork
  21720. };
  21721. function shouldRemainOnFallback(suspenseContext, current, workInProgress) {
  21722. // If the context is telling us that we should show a fallback, and we're not
  21723. // already showing content, then we should show the fallback instead.
  21724. return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current === null || current.memoizedState !== null);
  21725. }
  21726. function updateSuspenseComponent(current, workInProgress, renderExpirationTime) {
  21727. var mode = workInProgress.mode;
  21728. var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
  21729. {
  21730. if (shouldSuspend(workInProgress)) {
  21731. workInProgress.effectTag |= DidCapture;
  21732. }
  21733. }
  21734. var suspenseContext = suspenseStackCursor.current;
  21735. var nextDidTimeout = false;
  21736. var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect;
  21737. if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
  21738. // Something in this boundary's subtree already suspended. Switch to
  21739. // rendering the fallback children.
  21740. nextDidTimeout = true;
  21741. workInProgress.effectTag &= ~DidCapture;
  21742. } else {
  21743. // Attempting the main content
  21744. if (current === null || current.memoizedState !== null) {
  21745. // This is a new mount or this boundary is already showing a fallback state.
  21746. // Mark this subtree context as having at least one invisible parent that could
  21747. // handle the fallback state.
  21748. // Boundaries without fallbacks or should be avoided are not considered since
  21749. // they cannot handle preferred fallback states.
  21750. if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {
  21751. suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
  21752. }
  21753. }
  21754. }
  21755. suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
  21756. pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to
  21757. // showing the fallback children in place of the "primary" children.
  21758. // However, we don't want to delete the primary children because then their
  21759. // state will be lost (both the React state and the host state, e.g.
  21760. // uncontrolled form inputs). Instead we keep them mounted and hide them.
  21761. // Both the fallback children AND the primary children are rendered at the
  21762. // same time. Once the primary children are un-suspended, we can delete
  21763. // the fallback children — don't need to preserve their state.
  21764. //
  21765. // The two sets of children are siblings in the host environment, but
  21766. // semantically, for purposes of reconciliation, they are two separate sets.
  21767. // So we store them using two fragment fibers.
  21768. //
  21769. // However, we want to avoid allocating extra fibers for every placeholder.
  21770. // They're only necessary when the children time out, because that's the
  21771. // only time when both sets are mounted.
  21772. //
  21773. // So, the extra fragment fibers are only used if the children time out.
  21774. // Otherwise, we render the primary children directly. This requires some
  21775. // custom reconciliation logic to preserve the state of the primary
  21776. // children. It's essentially a very basic form of re-parenting.
  21777. if (current === null) {
  21778. // If we're currently hydrating, try to hydrate this boundary.
  21779. // But only if this has a fallback.
  21780. if (nextProps.fallback !== undefined) {
  21781. tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
  21782. } // This is the initial mount. This branch is pretty simple because there's
  21783. // no previous state that needs to be preserved.
  21784. if (nextDidTimeout) {
  21785. // Mount separate fragments for primary and fallback children.
  21786. var nextFallbackChildren = nextProps.fallback;
  21787. var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
  21788. primaryChildFragment.return = workInProgress;
  21789. if ((workInProgress.mode & BlockingMode) === NoMode) {
  21790. // Outside of blocking mode, we commit the effects from the
  21791. // partially completed, timed-out tree, too.
  21792. var progressedState = workInProgress.memoizedState;
  21793. var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
  21794. primaryChildFragment.child = progressedPrimaryChild;
  21795. var progressedChild = progressedPrimaryChild;
  21796. while (progressedChild !== null) {
  21797. progressedChild.return = primaryChildFragment;
  21798. progressedChild = progressedChild.sibling;
  21799. }
  21800. }
  21801. var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
  21802. fallbackChildFragment.return = workInProgress;
  21803. primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the
  21804. // fallback children.
  21805. workInProgress.memoizedState = SUSPENDED_MARKER;
  21806. workInProgress.child = primaryChildFragment;
  21807. return fallbackChildFragment;
  21808. } else {
  21809. // Mount the primary children without an intermediate fragment fiber.
  21810. var nextPrimaryChildren = nextProps.children;
  21811. workInProgress.memoizedState = null;
  21812. return workInProgress.child = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
  21813. }
  21814. } else {
  21815. // This is an update. This branch is more complicated because we need to
  21816. // ensure the state of the primary children is preserved.
  21817. var prevState = current.memoizedState;
  21818. if (prevState !== null) {
  21819. // wrapped in a fragment fiber.
  21820. var currentPrimaryChildFragment = current.child;
  21821. var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
  21822. if (nextDidTimeout) {
  21823. // Still timed out. Reuse the current primary children by cloning
  21824. // its fragment. We're going to skip over these entirely.
  21825. var _nextFallbackChildren2 = nextProps.fallback;
  21826. var _primaryChildFragment2 = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps);
  21827. _primaryChildFragment2.return = workInProgress;
  21828. if ((workInProgress.mode & BlockingMode) === NoMode) {
  21829. // Outside of blocking mode, we commit the effects from the
  21830. // partially completed, timed-out tree, too.
  21831. var _progressedState = workInProgress.memoizedState;
  21832. var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;
  21833. if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
  21834. _primaryChildFragment2.child = _progressedPrimaryChild;
  21835. var _progressedChild2 = _progressedPrimaryChild;
  21836. while (_progressedChild2 !== null) {
  21837. _progressedChild2.return = _primaryChildFragment2;
  21838. _progressedChild2 = _progressedChild2.sibling;
  21839. }
  21840. }
  21841. } // Because primaryChildFragment is a new fiber that we're inserting as the
  21842. // parent of a new tree, we need to set its treeBaseDuration.
  21843. if ( workInProgress.mode & ProfileMode) {
  21844. // treeBaseDuration is the sum of all the child tree base durations.
  21845. var _treeBaseDuration = 0;
  21846. var _hiddenChild = _primaryChildFragment2.child;
  21847. while (_hiddenChild !== null) {
  21848. _treeBaseDuration += _hiddenChild.treeBaseDuration;
  21849. _hiddenChild = _hiddenChild.sibling;
  21850. }
  21851. _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
  21852. } // Clone the fallback child fragment, too. These we'll continue
  21853. // working on.
  21854. var _fallbackChildFragment2 = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren2);
  21855. _fallbackChildFragment2.return = workInProgress;
  21856. _primaryChildFragment2.sibling = _fallbackChildFragment2;
  21857. _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
  21858. // fallback children.
  21859. workInProgress.memoizedState = SUSPENDED_MARKER;
  21860. workInProgress.child = _primaryChildFragment2;
  21861. return _fallbackChildFragment2;
  21862. } else {
  21863. // No longer suspended. Switch back to showing the primary children,
  21864. // and remove the intermediate fragment fiber.
  21865. var _nextPrimaryChildren = nextProps.children;
  21866. var currentPrimaryChild = currentPrimaryChildFragment.child;
  21867. var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime); // If this render doesn't suspend, we need to delete the fallback
  21868. // children. Wait until the complete phase, after we've confirmed the
  21869. // fallback is no longer needed.
  21870. // TODO: Would it be better to store the fallback fragment on
  21871. // the stateNode?
  21872. // Continue rendering the children, like we normally do.
  21873. workInProgress.memoizedState = null;
  21874. return workInProgress.child = primaryChild;
  21875. }
  21876. } else {
  21877. // The current tree has not already timed out. That means the primary
  21878. // children are not wrapped in a fragment fiber.
  21879. var _currentPrimaryChild = current.child;
  21880. if (nextDidTimeout) {
  21881. // Timed out. Wrap the children in a fragment fiber to keep them
  21882. // separate from the fallback children.
  21883. var _nextFallbackChildren3 = nextProps.fallback;
  21884. var _primaryChildFragment3 = createFiberFromFragment( // It shouldn't matter what the pending props are because we aren't
  21885. // going to render this fragment.
  21886. null, mode, NoWork, null);
  21887. _primaryChildFragment3.return = workInProgress;
  21888. _primaryChildFragment3.child = _currentPrimaryChild;
  21889. if (_currentPrimaryChild !== null) {
  21890. _currentPrimaryChild.return = _primaryChildFragment3;
  21891. } // Even though we're creating a new fiber, there are no new children,
  21892. // because we're reusing an already mounted tree. So we don't need to
  21893. // schedule a placement.
  21894. // primaryChildFragment.effectTag |= Placement;
  21895. if ((workInProgress.mode & BlockingMode) === NoMode) {
  21896. // Outside of blocking mode, we commit the effects from the
  21897. // partially completed, timed-out tree, too.
  21898. var _progressedState2 = workInProgress.memoizedState;
  21899. var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;
  21900. _primaryChildFragment3.child = _progressedPrimaryChild2;
  21901. var _progressedChild3 = _progressedPrimaryChild2;
  21902. while (_progressedChild3 !== null) {
  21903. _progressedChild3.return = _primaryChildFragment3;
  21904. _progressedChild3 = _progressedChild3.sibling;
  21905. }
  21906. } // Because primaryChildFragment is a new fiber that we're inserting as the
  21907. // parent of a new tree, we need to set its treeBaseDuration.
  21908. if ( workInProgress.mode & ProfileMode) {
  21909. // treeBaseDuration is the sum of all the child tree base durations.
  21910. var _treeBaseDuration2 = 0;
  21911. var _hiddenChild2 = _primaryChildFragment3.child;
  21912. while (_hiddenChild2 !== null) {
  21913. _treeBaseDuration2 += _hiddenChild2.treeBaseDuration;
  21914. _hiddenChild2 = _hiddenChild2.sibling;
  21915. }
  21916. _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2;
  21917. } // Create a fragment from the fallback children, too.
  21918. var _fallbackChildFragment3 = createFiberFromFragment(_nextFallbackChildren3, mode, renderExpirationTime, null);
  21919. _fallbackChildFragment3.return = workInProgress;
  21920. _primaryChildFragment3.sibling = _fallbackChildFragment3;
  21921. _fallbackChildFragment3.effectTag |= Placement;
  21922. _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
  21923. // fallback children.
  21924. workInProgress.memoizedState = SUSPENDED_MARKER;
  21925. workInProgress.child = _primaryChildFragment3;
  21926. return _fallbackChildFragment3;
  21927. } else {
  21928. // Still haven't timed out. Continue rendering the children, like we
  21929. // normally do.
  21930. workInProgress.memoizedState = null;
  21931. var _nextPrimaryChildren2 = nextProps.children;
  21932. return workInProgress.child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
  21933. }
  21934. }
  21935. }
  21936. }
  21937. function scheduleWorkOnFiber(fiber, renderExpirationTime) {
  21938. if (fiber.expirationTime < renderExpirationTime) {
  21939. fiber.expirationTime = renderExpirationTime;
  21940. }
  21941. var alternate = fiber.alternate;
  21942. if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
  21943. alternate.expirationTime = renderExpirationTime;
  21944. }
  21945. scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
  21946. }
  21947. function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {
  21948. // Mark any Suspense boundaries with fallbacks as having work to do.
  21949. // If they were previously forced into fallbacks, they may now be able
  21950. // to unblock.
  21951. var node = firstChild;
  21952. while (node !== null) {
  21953. if (node.tag === SuspenseComponent) {
  21954. var state = node.memoizedState;
  21955. if (state !== null) {
  21956. scheduleWorkOnFiber(node, renderExpirationTime);
  21957. }
  21958. } else if (node.tag === SuspenseListComponent) {
  21959. // If the tail is hidden there might not be an Suspense boundaries
  21960. // to schedule work on. In this case we have to schedule it on the
  21961. // list itself.
  21962. // We don't have to traverse to the children of the list since
  21963. // the list will propagate the change when it rerenders.
  21964. scheduleWorkOnFiber(node, renderExpirationTime);
  21965. } else if (node.child !== null) {
  21966. node.child.return = node;
  21967. node = node.child;
  21968. continue;
  21969. }
  21970. if (node === workInProgress) {
  21971. return;
  21972. }
  21973. while (node.sibling === null) {
  21974. if (node.return === null || node.return === workInProgress) {
  21975. return;
  21976. }
  21977. node = node.return;
  21978. }
  21979. node.sibling.return = node.return;
  21980. node = node.sibling;
  21981. }
  21982. }
  21983. function findLastContentRow(firstChild) {
  21984. // This is going to find the last row among these children that is already
  21985. // showing content on the screen, as opposed to being in fallback state or
  21986. // new. If a row has multiple Suspense boundaries, any of them being in the
  21987. // fallback state, counts as the whole row being in a fallback state.
  21988. // Note that the "rows" will be workInProgress, but any nested children
  21989. // will still be current since we haven't rendered them yet. The mounted
  21990. // order may not be the same as the new order. We use the new order.
  21991. var row = firstChild;
  21992. var lastContentRow = null;
  21993. while (row !== null) {
  21994. var currentRow = row.alternate; // New rows can't be content rows.
  21995. if (currentRow !== null && findFirstSuspended(currentRow) === null) {
  21996. lastContentRow = row;
  21997. }
  21998. row = row.sibling;
  21999. }
  22000. return lastContentRow;
  22001. }
  22002. function validateRevealOrder(revealOrder) {
  22003. {
  22004. if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
  22005. didWarnAboutRevealOrder[revealOrder] = true;
  22006. if (typeof revealOrder === 'string') {
  22007. switch (revealOrder.toLowerCase()) {
  22008. case 'together':
  22009. case 'forwards':
  22010. case 'backwards':
  22011. {
  22012. error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
  22013. break;
  22014. }
  22015. case 'forward':
  22016. case 'backward':
  22017. {
  22018. error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
  22019. break;
  22020. }
  22021. default:
  22022. error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
  22023. break;
  22024. }
  22025. } else {
  22026. error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
  22027. }
  22028. }
  22029. }
  22030. }
  22031. function validateTailOptions(tailMode, revealOrder) {
  22032. {
  22033. if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
  22034. if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
  22035. didWarnAboutTailOptions[tailMode] = true;
  22036. error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
  22037. } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
  22038. didWarnAboutTailOptions[tailMode] = true;
  22039. error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
  22040. }
  22041. }
  22042. }
  22043. }
  22044. function validateSuspenseListNestedChild(childSlot, index) {
  22045. {
  22046. var isArray = Array.isArray(childSlot);
  22047. var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';
  22048. if (isArray || isIterable) {
  22049. var type = isArray ? 'array' : 'iterable';
  22050. error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);
  22051. return false;
  22052. }
  22053. }
  22054. return true;
  22055. }
  22056. function validateSuspenseListChildren(children, revealOrder) {
  22057. {
  22058. if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
  22059. if (Array.isArray(children)) {
  22060. for (var i = 0; i < children.length; i++) {
  22061. if (!validateSuspenseListNestedChild(children[i], i)) {
  22062. return;
  22063. }
  22064. }
  22065. } else {
  22066. var iteratorFn = getIteratorFn(children);
  22067. if (typeof iteratorFn === 'function') {
  22068. var childrenIterator = iteratorFn.call(children);
  22069. if (childrenIterator) {
  22070. var step = childrenIterator.next();
  22071. var _i = 0;
  22072. for (; !step.done; step = childrenIterator.next()) {
  22073. if (!validateSuspenseListNestedChild(step.value, _i)) {
  22074. return;
  22075. }
  22076. _i++;
  22077. }
  22078. }
  22079. } else {
  22080. error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
  22081. }
  22082. }
  22083. }
  22084. }
  22085. }
  22086. function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {
  22087. var renderState = workInProgress.memoizedState;
  22088. if (renderState === null) {
  22089. workInProgress.memoizedState = {
  22090. isBackwards: isBackwards,
  22091. rendering: null,
  22092. renderingStartTime: 0,
  22093. last: lastContentRow,
  22094. tail: tail,
  22095. tailExpiration: 0,
  22096. tailMode: tailMode,
  22097. lastEffect: lastEffectBeforeRendering
  22098. };
  22099. } else {
  22100. // We can reuse the existing object from previous renders.
  22101. renderState.isBackwards = isBackwards;
  22102. renderState.rendering = null;
  22103. renderState.renderingStartTime = 0;
  22104. renderState.last = lastContentRow;
  22105. renderState.tail = tail;
  22106. renderState.tailExpiration = 0;
  22107. renderState.tailMode = tailMode;
  22108. renderState.lastEffect = lastEffectBeforeRendering;
  22109. }
  22110. } // This can end up rendering this component multiple passes.
  22111. // The first pass splits the children fibers into two sets. A head and tail.
  22112. // We first render the head. If anything is in fallback state, we do another
  22113. // pass through beginWork to rerender all children (including the tail) with
  22114. // the force suspend context. If the first render didn't have anything in
  22115. // in fallback state. Then we render each row in the tail one-by-one.
  22116. // That happens in the completeWork phase without going back to beginWork.
  22117. function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {
  22118. var nextProps = workInProgress.pendingProps;
  22119. var revealOrder = nextProps.revealOrder;
  22120. var tailMode = nextProps.tail;
  22121. var newChildren = nextProps.children;
  22122. validateRevealOrder(revealOrder);
  22123. validateTailOptions(tailMode, revealOrder);
  22124. validateSuspenseListChildren(newChildren, revealOrder);
  22125. reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
  22126. var suspenseContext = suspenseStackCursor.current;
  22127. var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
  22128. if (shouldForceFallback) {
  22129. suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
  22130. workInProgress.effectTag |= DidCapture;
  22131. } else {
  22132. var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;
  22133. if (didSuspendBefore) {
  22134. // If we previously forced a fallback, we need to schedule work
  22135. // on any nested boundaries to let them know to try to render
  22136. // again. This is the same as context updating.
  22137. propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);
  22138. }
  22139. suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
  22140. }
  22141. pushSuspenseContext(workInProgress, suspenseContext);
  22142. if ((workInProgress.mode & BlockingMode) === NoMode) {
  22143. // Outside of blocking mode, SuspenseList doesn't work so we just
  22144. // use make it a noop by treating it as the default revealOrder.
  22145. workInProgress.memoizedState = null;
  22146. } else {
  22147. switch (revealOrder) {
  22148. case 'forwards':
  22149. {
  22150. var lastContentRow = findLastContentRow(workInProgress.child);
  22151. var tail;
  22152. if (lastContentRow === null) {
  22153. // The whole list is part of the tail.
  22154. // TODO: We could fast path by just rendering the tail now.
  22155. tail = workInProgress.child;
  22156. workInProgress.child = null;
  22157. } else {
  22158. // Disconnect the tail rows after the content row.
  22159. // We're going to render them separately later.
  22160. tail = lastContentRow.sibling;
  22161. lastContentRow.sibling = null;
  22162. }
  22163. initSuspenseListRenderState(workInProgress, false, // isBackwards
  22164. tail, lastContentRow, tailMode, workInProgress.lastEffect);
  22165. break;
  22166. }
  22167. case 'backwards':
  22168. {
  22169. // We're going to find the first row that has existing content.
  22170. // At the same time we're going to reverse the list of everything
  22171. // we pass in the meantime. That's going to be our tail in reverse
  22172. // order.
  22173. var _tail = null;
  22174. var row = workInProgress.child;
  22175. workInProgress.child = null;
  22176. while (row !== null) {
  22177. var currentRow = row.alternate; // New rows can't be content rows.
  22178. if (currentRow !== null && findFirstSuspended(currentRow) === null) {
  22179. // This is the beginning of the main content.
  22180. workInProgress.child = row;
  22181. break;
  22182. }
  22183. var nextRow = row.sibling;
  22184. row.sibling = _tail;
  22185. _tail = row;
  22186. row = nextRow;
  22187. } // TODO: If workInProgress.child is null, we can continue on the tail immediately.
  22188. initSuspenseListRenderState(workInProgress, true, // isBackwards
  22189. _tail, null, // last
  22190. tailMode, workInProgress.lastEffect);
  22191. break;
  22192. }
  22193. case 'together':
  22194. {
  22195. initSuspenseListRenderState(workInProgress, false, // isBackwards
  22196. null, // tail
  22197. null, // last
  22198. undefined, workInProgress.lastEffect);
  22199. break;
  22200. }
  22201. default:
  22202. {
  22203. // The default reveal order is the same as not having
  22204. // a boundary.
  22205. workInProgress.memoizedState = null;
  22206. }
  22207. }
  22208. }
  22209. return workInProgress.child;
  22210. }
  22211. function updatePortalComponent(current, workInProgress, renderExpirationTime) {
  22212. pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  22213. var nextChildren = workInProgress.pendingProps;
  22214. if (current === null) {
  22215. // Portals are special because we don't append the children during mount
  22216. // but at commit. Therefore we need to track insertions which the normal
  22217. // flow doesn't do during mount. This doesn't happen at the root because
  22218. // the root always starts with a "current" with a null child.
  22219. // TODO: Consider unifying this with how the root works.
  22220. workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  22221. } else {
  22222. reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  22223. }
  22224. return workInProgress.child;
  22225. }
  22226. function updateContextProvider(current, workInProgress, renderExpirationTime) {
  22227. var providerType = workInProgress.type;
  22228. var context = providerType._context;
  22229. var newProps = workInProgress.pendingProps;
  22230. var oldProps = workInProgress.memoizedProps;
  22231. var newValue = newProps.value;
  22232. {
  22233. var providerPropTypes = workInProgress.type.propTypes;
  22234. if (providerPropTypes) {
  22235. checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
  22236. }
  22237. }
  22238. pushProvider(workInProgress, newValue);
  22239. if (oldProps !== null) {
  22240. var oldValue = oldProps.value;
  22241. var changedBits = calculateChangedBits(context, newValue, oldValue);
  22242. if (changedBits === 0) {
  22243. // No change. Bailout early if children are the same.
  22244. if (oldProps.children === newProps.children && !hasContextChanged()) {
  22245. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  22246. }
  22247. } else {
  22248. // The context value changed. Search for matching consumers and schedule
  22249. // them to update.
  22250. propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
  22251. }
  22252. }
  22253. var newChildren = newProps.children;
  22254. reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
  22255. return workInProgress.child;
  22256. }
  22257. var hasWarnedAboutUsingContextAsConsumer = false;
  22258. function updateContextConsumer(current, workInProgress, renderExpirationTime) {
  22259. var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
  22260. // DEV mode, we create a separate object for Context.Consumer that acts
  22261. // like a proxy to Context. This proxy object adds unnecessary code in PROD
  22262. // so we use the old behaviour (Context.Consumer references Context) to
  22263. // reduce size and overhead. The separate object references context via
  22264. // a property called "_context", which also gives us the ability to check
  22265. // in DEV mode if this property exists or not and warn if it does not.
  22266. {
  22267. if (context._context === undefined) {
  22268. // This may be because it's a Context (rather than a Consumer).
  22269. // Or it may be because it's older React where they're the same thing.
  22270. // We only want to warn if we're sure it's a new React.
  22271. if (context !== context.Consumer) {
  22272. if (!hasWarnedAboutUsingContextAsConsumer) {
  22273. hasWarnedAboutUsingContextAsConsumer = true;
  22274. error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
  22275. }
  22276. }
  22277. } else {
  22278. context = context._context;
  22279. }
  22280. }
  22281. var newProps = workInProgress.pendingProps;
  22282. var render = newProps.children;
  22283. {
  22284. if (typeof render !== 'function') {
  22285. error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');
  22286. }
  22287. }
  22288. prepareToReadContext(workInProgress, renderExpirationTime);
  22289. var newValue = readContext(context, newProps.unstable_observedBits);
  22290. var newChildren;
  22291. {
  22292. ReactCurrentOwner$1.current = workInProgress;
  22293. setIsRendering(true);
  22294. newChildren = render(newValue);
  22295. setIsRendering(false);
  22296. } // React DevTools reads this flag.
  22297. workInProgress.effectTag |= PerformedWork;
  22298. reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
  22299. return workInProgress.child;
  22300. }
  22301. function markWorkInProgressReceivedUpdate() {
  22302. didReceiveUpdate = true;
  22303. }
  22304. function bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime) {
  22305. cancelWorkTimer(workInProgress);
  22306. if (current !== null) {
  22307. // Reuse previous dependencies
  22308. workInProgress.dependencies = current.dependencies;
  22309. }
  22310. {
  22311. // Don't update "base" render times for bailouts.
  22312. stopProfilerTimerIfRunning();
  22313. }
  22314. var updateExpirationTime = workInProgress.expirationTime;
  22315. if (updateExpirationTime !== NoWork) {
  22316. markUnprocessedUpdateTime(updateExpirationTime);
  22317. } // Check if the children have any pending work.
  22318. var childExpirationTime = workInProgress.childExpirationTime;
  22319. if (childExpirationTime < renderExpirationTime) {
  22320. // The children don't have any work either. We can skip them.
  22321. // TODO: Once we add back resuming, we should check if the children are
  22322. // a work-in-progress set. If so, we need to transfer their effects.
  22323. return null;
  22324. } else {
  22325. // This fiber doesn't have work, but its subtree does. Clone the child
  22326. // fibers and continue.
  22327. cloneChildFibers(current, workInProgress);
  22328. return workInProgress.child;
  22329. }
  22330. }
  22331. function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
  22332. {
  22333. var returnFiber = oldWorkInProgress.return;
  22334. if (returnFiber === null) {
  22335. throw new Error('Cannot swap the root fiber.');
  22336. } // Disconnect from the old current.
  22337. // It will get deleted.
  22338. current.alternate = null;
  22339. oldWorkInProgress.alternate = null; // Connect to the new tree.
  22340. newWorkInProgress.index = oldWorkInProgress.index;
  22341. newWorkInProgress.sibling = oldWorkInProgress.sibling;
  22342. newWorkInProgress.return = oldWorkInProgress.return;
  22343. newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.
  22344. if (oldWorkInProgress === returnFiber.child) {
  22345. returnFiber.child = newWorkInProgress;
  22346. } else {
  22347. var prevSibling = returnFiber.child;
  22348. if (prevSibling === null) {
  22349. throw new Error('Expected parent to have a child.');
  22350. }
  22351. while (prevSibling.sibling !== oldWorkInProgress) {
  22352. prevSibling = prevSibling.sibling;
  22353. if (prevSibling === null) {
  22354. throw new Error('Expected to find the previous sibling.');
  22355. }
  22356. }
  22357. prevSibling.sibling = newWorkInProgress;
  22358. } // Delete the old fiber and place the new one.
  22359. // Since the old fiber is disconnected, we have to schedule it manually.
  22360. var last = returnFiber.lastEffect;
  22361. if (last !== null) {
  22362. last.nextEffect = current;
  22363. returnFiber.lastEffect = current;
  22364. } else {
  22365. returnFiber.firstEffect = returnFiber.lastEffect = current;
  22366. }
  22367. current.nextEffect = null;
  22368. current.effectTag = Deletion;
  22369. newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber.
  22370. return newWorkInProgress;
  22371. }
  22372. }
  22373. function beginWork(current, workInProgress, renderExpirationTime) {
  22374. var updateExpirationTime = workInProgress.expirationTime;
  22375. {
  22376. if (workInProgress._debugNeedsRemount && current !== null) {
  22377. // This will restart the begin phase with a new fiber.
  22378. return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));
  22379. }
  22380. }
  22381. if (current !== null) {
  22382. var oldProps = current.memoizedProps;
  22383. var newProps = workInProgress.pendingProps;
  22384. if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
  22385. workInProgress.type !== current.type )) {
  22386. // If props or context changed, mark the fiber as having performed work.
  22387. // This may be unset if the props are determined to be equal later (memo).
  22388. didReceiveUpdate = true;
  22389. } else if (updateExpirationTime < renderExpirationTime) {
  22390. didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
  22391. // the begin phase. There's still some bookkeeping we that needs to be done
  22392. // in this optimized path, mostly pushing stuff onto the stack.
  22393. switch (workInProgress.tag) {
  22394. case HostRoot:
  22395. pushHostRootContext(workInProgress);
  22396. resetHydrationState();
  22397. break;
  22398. case HostComponent:
  22399. pushHostContext(workInProgress);
  22400. if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {
  22401. {
  22402. markSpawnedWork(Never);
  22403. } // Schedule this fiber to re-render at offscreen priority. Then bailout.
  22404. workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
  22405. return null;
  22406. }
  22407. break;
  22408. case ClassComponent:
  22409. {
  22410. var Component = workInProgress.type;
  22411. if (isContextProvider(Component)) {
  22412. pushContextProvider(workInProgress);
  22413. }
  22414. break;
  22415. }
  22416. case HostPortal:
  22417. pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  22418. break;
  22419. case ContextProvider:
  22420. {
  22421. var newValue = workInProgress.memoizedProps.value;
  22422. pushProvider(workInProgress, newValue);
  22423. break;
  22424. }
  22425. case Profiler:
  22426. {
  22427. // Profiler should only call onRender when one of its descendants actually rendered.
  22428. var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
  22429. if (hasChildWork) {
  22430. workInProgress.effectTag |= Update;
  22431. }
  22432. }
  22433. break;
  22434. case SuspenseComponent:
  22435. {
  22436. var state = workInProgress.memoizedState;
  22437. if (state !== null) {
  22438. // whether to retry the primary children, or to skip over it and
  22439. // go straight to the fallback. Check the priority of the primary
  22440. // child fragment.
  22441. var primaryChildFragment = workInProgress.child;
  22442. var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;
  22443. if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
  22444. // The primary children have pending work. Use the normal path
  22445. // to attempt to render the primary children again.
  22446. return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
  22447. } else {
  22448. pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
  22449. // priority. Bailout.
  22450. var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  22451. if (child !== null) {
  22452. // The fallback children have pending work. Skip over the
  22453. // primary children and work on the fallback.
  22454. return child.sibling;
  22455. } else {
  22456. return null;
  22457. }
  22458. }
  22459. } else {
  22460. pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
  22461. }
  22462. break;
  22463. }
  22464. case SuspenseListComponent:
  22465. {
  22466. var didSuspendBefore = (current.effectTag & DidCapture) !== NoEffect;
  22467. var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
  22468. if (didSuspendBefore) {
  22469. if (_hasChildWork) {
  22470. // If something was in fallback state last time, and we have all the
  22471. // same children then we're still in progressive loading state.
  22472. // Something might get unblocked by state updates or retries in the
  22473. // tree which will affect the tail. So we need to use the normal
  22474. // path to compute the correct tail.
  22475. return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
  22476. } // If none of the children had any work, that means that none of
  22477. // them got retried so they'll still be blocked in the same way
  22478. // as before. We can fast bail out.
  22479. workInProgress.effectTag |= DidCapture;
  22480. } // If nothing suspended before and we're rendering the same children,
  22481. // then the tail doesn't matter. Anything new that suspends will work
  22482. // in the "together" mode, so we can continue from the state we had.
  22483. var renderState = workInProgress.memoizedState;
  22484. if (renderState !== null) {
  22485. // Reset to the "together" mode in case we've started a different
  22486. // update in the past but didn't complete it.
  22487. renderState.rendering = null;
  22488. renderState.tail = null;
  22489. }
  22490. pushSuspenseContext(workInProgress, suspenseStackCursor.current);
  22491. if (_hasChildWork) {
  22492. break;
  22493. } else {
  22494. // If none of the children had any work, that means that none of
  22495. // them got retried so they'll still be blocked in the same way
  22496. // as before. We can fast bail out.
  22497. return null;
  22498. }
  22499. }
  22500. }
  22501. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  22502. } else {
  22503. // An update was scheduled on this fiber, but there are no new props
  22504. // nor legacy context. Set this to false. If an update queue or context
  22505. // consumer produces a changed value, it will set this to true. Otherwise,
  22506. // the component will assume the children have not changed and bail out.
  22507. didReceiveUpdate = false;
  22508. }
  22509. } else {
  22510. didReceiveUpdate = false;
  22511. } // Before entering the begin phase, clear pending update priority.
  22512. // TODO: This assumes that we're about to evaluate the component and process
  22513. // the update queue. However, there's an exception: SimpleMemoComponent
  22514. // sometimes bails out later in the begin phase. This indicates that we should
  22515. // move this assignment out of the common path and into each branch.
  22516. workInProgress.expirationTime = NoWork;
  22517. switch (workInProgress.tag) {
  22518. case IndeterminateComponent:
  22519. {
  22520. return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);
  22521. }
  22522. case LazyComponent:
  22523. {
  22524. var elementType = workInProgress.elementType;
  22525. return mountLazyComponent(current, workInProgress, elementType, updateExpirationTime, renderExpirationTime);
  22526. }
  22527. case FunctionComponent:
  22528. {
  22529. var _Component = workInProgress.type;
  22530. var unresolvedProps = workInProgress.pendingProps;
  22531. var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
  22532. return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);
  22533. }
  22534. case ClassComponent:
  22535. {
  22536. var _Component2 = workInProgress.type;
  22537. var _unresolvedProps = workInProgress.pendingProps;
  22538. var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
  22539. return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
  22540. }
  22541. case HostRoot:
  22542. return updateHostRoot(current, workInProgress, renderExpirationTime);
  22543. case HostComponent:
  22544. return updateHostComponent(current, workInProgress, renderExpirationTime);
  22545. case HostText:
  22546. return updateHostText(current, workInProgress);
  22547. case SuspenseComponent:
  22548. return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
  22549. case HostPortal:
  22550. return updatePortalComponent(current, workInProgress, renderExpirationTime);
  22551. case ForwardRef:
  22552. {
  22553. var type = workInProgress.type;
  22554. var _unresolvedProps2 = workInProgress.pendingProps;
  22555. var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
  22556. return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderExpirationTime);
  22557. }
  22558. case Fragment:
  22559. return updateFragment(current, workInProgress, renderExpirationTime);
  22560. case Mode:
  22561. return updateMode(current, workInProgress, renderExpirationTime);
  22562. case Profiler:
  22563. return updateProfiler(current, workInProgress, renderExpirationTime);
  22564. case ContextProvider:
  22565. return updateContextProvider(current, workInProgress, renderExpirationTime);
  22566. case ContextConsumer:
  22567. return updateContextConsumer(current, workInProgress, renderExpirationTime);
  22568. case MemoComponent:
  22569. {
  22570. var _type2 = workInProgress.type;
  22571. var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.
  22572. var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
  22573. {
  22574. if (workInProgress.type !== workInProgress.elementType) {
  22575. var outerPropTypes = _type2.propTypes;
  22576. if (outerPropTypes) {
  22577. checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
  22578. 'prop', getComponentName(_type2), getCurrentFiberStackInDev);
  22579. }
  22580. }
  22581. }
  22582. _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
  22583. return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
  22584. }
  22585. case SimpleMemoComponent:
  22586. {
  22587. return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
  22588. }
  22589. case IncompleteClassComponent:
  22590. {
  22591. var _Component3 = workInProgress.type;
  22592. var _unresolvedProps4 = workInProgress.pendingProps;
  22593. var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
  22594. return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
  22595. }
  22596. case SuspenseListComponent:
  22597. {
  22598. return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
  22599. }
  22600. }
  22601. {
  22602. {
  22603. throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
  22604. }
  22605. }
  22606. }
  22607. function markUpdate(workInProgress) {
  22608. // Tag the fiber with an update effect. This turns a Placement into
  22609. // a PlacementAndUpdate.
  22610. workInProgress.effectTag |= Update;
  22611. }
  22612. function markRef$1(workInProgress) {
  22613. workInProgress.effectTag |= Ref;
  22614. }
  22615. var appendAllChildren;
  22616. var updateHostContainer;
  22617. var updateHostComponent$1;
  22618. var updateHostText$1;
  22619. {
  22620. // Mutation mode
  22621. appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
  22622. // We only have the top Fiber that was created but we need recurse down its
  22623. // children to find all the terminal nodes.
  22624. var node = workInProgress.child;
  22625. while (node !== null) {
  22626. if (node.tag === HostComponent || node.tag === HostText) {
  22627. appendInitialChild(parent, node.stateNode);
  22628. } else if (node.tag === HostPortal) ; else if (node.child !== null) {
  22629. node.child.return = node;
  22630. node = node.child;
  22631. continue;
  22632. }
  22633. if (node === workInProgress) {
  22634. return;
  22635. }
  22636. while (node.sibling === null) {
  22637. if (node.return === null || node.return === workInProgress) {
  22638. return;
  22639. }
  22640. node = node.return;
  22641. }
  22642. node.sibling.return = node.return;
  22643. node = node.sibling;
  22644. }
  22645. };
  22646. updateHostContainer = function (workInProgress) {// Noop
  22647. };
  22648. updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
  22649. // If we have an alternate, that means this is an update and we need to
  22650. // schedule a side-effect to do the updates.
  22651. var oldProps = current.memoizedProps;
  22652. if (oldProps === newProps) {
  22653. // In mutation mode, this is sufficient for a bailout because
  22654. // we won't touch this node even if children changed.
  22655. return;
  22656. } // If we get updated because one of our children updated, we don't
  22657. // have newProps so we'll have to reuse them.
  22658. // TODO: Split the update API as separate for the props vs. children.
  22659. // Even better would be if children weren't special cased at all tho.
  22660. var instance = workInProgress.stateNode;
  22661. var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
  22662. // component is hitting the resume path. Figure out why. Possibly
  22663. // related to `hidden`.
  22664. var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.
  22665. workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
  22666. // is a new ref we mark this as an update. All the work is done in commitWork.
  22667. if (updatePayload) {
  22668. markUpdate(workInProgress);
  22669. }
  22670. };
  22671. updateHostText$1 = function (current, workInProgress, oldText, newText) {
  22672. // If the text differs, mark it as an update. All the work in done in commitWork.
  22673. if (oldText !== newText) {
  22674. markUpdate(workInProgress);
  22675. }
  22676. };
  22677. }
  22678. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  22679. switch (renderState.tailMode) {
  22680. case 'hidden':
  22681. {
  22682. // Any insertions at the end of the tail list after this point
  22683. // should be invisible. If there are already mounted boundaries
  22684. // anything before them are not considered for collapsing.
  22685. // Therefore we need to go through the whole tail to find if
  22686. // there are any.
  22687. var tailNode = renderState.tail;
  22688. var lastTailNode = null;
  22689. while (tailNode !== null) {
  22690. if (tailNode.alternate !== null) {
  22691. lastTailNode = tailNode;
  22692. }
  22693. tailNode = tailNode.sibling;
  22694. } // Next we're simply going to delete all insertions after the
  22695. // last rendered item.
  22696. if (lastTailNode === null) {
  22697. // All remaining items in the tail are insertions.
  22698. renderState.tail = null;
  22699. } else {
  22700. // Detach the insertion after the last node that was already
  22701. // inserted.
  22702. lastTailNode.sibling = null;
  22703. }
  22704. break;
  22705. }
  22706. case 'collapsed':
  22707. {
  22708. // Any insertions at the end of the tail list after this point
  22709. // should be invisible. If there are already mounted boundaries
  22710. // anything before them are not considered for collapsing.
  22711. // Therefore we need to go through the whole tail to find if
  22712. // there are any.
  22713. var _tailNode = renderState.tail;
  22714. var _lastTailNode = null;
  22715. while (_tailNode !== null) {
  22716. if (_tailNode.alternate !== null) {
  22717. _lastTailNode = _tailNode;
  22718. }
  22719. _tailNode = _tailNode.sibling;
  22720. } // Next we're simply going to delete all insertions after the
  22721. // last rendered item.
  22722. if (_lastTailNode === null) {
  22723. // All remaining items in the tail are insertions.
  22724. if (!hasRenderedATailFallback && renderState.tail !== null) {
  22725. // We suspended during the head. We want to show at least one
  22726. // row at the tail. So we'll keep on and cut off the rest.
  22727. renderState.tail.sibling = null;
  22728. } else {
  22729. renderState.tail = null;
  22730. }
  22731. } else {
  22732. // Detach the insertion after the last node that was already
  22733. // inserted.
  22734. _lastTailNode.sibling = null;
  22735. }
  22736. break;
  22737. }
  22738. }
  22739. }
  22740. function completeWork(current, workInProgress, renderExpirationTime) {
  22741. var newProps = workInProgress.pendingProps;
  22742. switch (workInProgress.tag) {
  22743. case IndeterminateComponent:
  22744. case LazyComponent:
  22745. case SimpleMemoComponent:
  22746. case FunctionComponent:
  22747. case ForwardRef:
  22748. case Fragment:
  22749. case Mode:
  22750. case Profiler:
  22751. case ContextConsumer:
  22752. case MemoComponent:
  22753. return null;
  22754. case ClassComponent:
  22755. {
  22756. var Component = workInProgress.type;
  22757. if (isContextProvider(Component)) {
  22758. popContext(workInProgress);
  22759. }
  22760. return null;
  22761. }
  22762. case HostRoot:
  22763. {
  22764. popHostContainer(workInProgress);
  22765. popTopLevelContextObject(workInProgress);
  22766. var fiberRoot = workInProgress.stateNode;
  22767. if (fiberRoot.pendingContext) {
  22768. fiberRoot.context = fiberRoot.pendingContext;
  22769. fiberRoot.pendingContext = null;
  22770. }
  22771. if (current === null || current.child === null) {
  22772. // If we hydrated, pop so that we can delete any remaining children
  22773. // that weren't hydrated.
  22774. var wasHydrated = popHydrationState(workInProgress);
  22775. if (wasHydrated) {
  22776. // If we hydrated, then we'll need to schedule an update for
  22777. // the commit side-effects on the root.
  22778. markUpdate(workInProgress);
  22779. }
  22780. }
  22781. updateHostContainer(workInProgress);
  22782. return null;
  22783. }
  22784. case HostComponent:
  22785. {
  22786. popHostContext(workInProgress);
  22787. var rootContainerInstance = getRootHostContainer();
  22788. var type = workInProgress.type;
  22789. if (current !== null && workInProgress.stateNode != null) {
  22790. updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
  22791. if (current.ref !== workInProgress.ref) {
  22792. markRef$1(workInProgress);
  22793. }
  22794. } else {
  22795. if (!newProps) {
  22796. if (!(workInProgress.stateNode !== null)) {
  22797. {
  22798. throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
  22799. }
  22800. } // This can happen when we abort work.
  22801. return null;
  22802. }
  22803. var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
  22804. // "stack" as the parent. Then append children as we go in beginWork
  22805. // or completeWork depending on whether we want to add them top->down or
  22806. // bottom->up. Top->down is faster in IE11.
  22807. var _wasHydrated = popHydrationState(workInProgress);
  22808. if (_wasHydrated) {
  22809. // TODO: Move this and createInstance step into the beginPhase
  22810. // to consolidate.
  22811. if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
  22812. // If changes to the hydrated node need to be applied at the
  22813. // commit-phase we mark this as such.
  22814. markUpdate(workInProgress);
  22815. }
  22816. } else {
  22817. var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
  22818. appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners
  22819. workInProgress.stateNode = instance;
  22820. // (eg DOM renderer supports auto-focus for certain elements).
  22821. // Make sure such renderers get scheduled for later work.
  22822. if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
  22823. markUpdate(workInProgress);
  22824. }
  22825. }
  22826. if (workInProgress.ref !== null) {
  22827. // If there is a ref on a host node we need to schedule a callback
  22828. markRef$1(workInProgress);
  22829. }
  22830. }
  22831. return null;
  22832. }
  22833. case HostText:
  22834. {
  22835. var newText = newProps;
  22836. if (current && workInProgress.stateNode != null) {
  22837. var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
  22838. // to schedule a side-effect to do the updates.
  22839. updateHostText$1(current, workInProgress, oldText, newText);
  22840. } else {
  22841. if (typeof newText !== 'string') {
  22842. if (!(workInProgress.stateNode !== null)) {
  22843. {
  22844. throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
  22845. }
  22846. } // This can happen when we abort work.
  22847. }
  22848. var _rootContainerInstance = getRootHostContainer();
  22849. var _currentHostContext = getHostContext();
  22850. var _wasHydrated2 = popHydrationState(workInProgress);
  22851. if (_wasHydrated2) {
  22852. if (prepareToHydrateHostTextInstance(workInProgress)) {
  22853. markUpdate(workInProgress);
  22854. }
  22855. } else {
  22856. workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
  22857. }
  22858. }
  22859. return null;
  22860. }
  22861. case SuspenseComponent:
  22862. {
  22863. popSuspenseContext(workInProgress);
  22864. var nextState = workInProgress.memoizedState;
  22865. if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
  22866. // Something suspended. Re-render with the fallback children.
  22867. workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.
  22868. return workInProgress;
  22869. }
  22870. var nextDidTimeout = nextState !== null;
  22871. var prevDidTimeout = false;
  22872. if (current === null) {
  22873. if (workInProgress.memoizedProps.fallback !== undefined) {
  22874. popHydrationState(workInProgress);
  22875. }
  22876. } else {
  22877. var prevState = current.memoizedState;
  22878. prevDidTimeout = prevState !== null;
  22879. if (!nextDidTimeout && prevState !== null) {
  22880. // We just switched from the fallback to the normal children.
  22881. // Delete the fallback.
  22882. // TODO: Would it be better to store the fallback fragment on
  22883. // the stateNode during the begin phase?
  22884. var currentFallbackChild = current.child.sibling;
  22885. if (currentFallbackChild !== null) {
  22886. // Deletions go at the beginning of the return fiber's effect list
  22887. var first = workInProgress.firstEffect;
  22888. if (first !== null) {
  22889. workInProgress.firstEffect = currentFallbackChild;
  22890. currentFallbackChild.nextEffect = first;
  22891. } else {
  22892. workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
  22893. currentFallbackChild.nextEffect = null;
  22894. }
  22895. currentFallbackChild.effectTag = Deletion;
  22896. }
  22897. }
  22898. }
  22899. if (nextDidTimeout && !prevDidTimeout) {
  22900. // If this subtreee is running in blocking mode we can suspend,
  22901. // otherwise we won't suspend.
  22902. // TODO: This will still suspend a synchronous tree if anything
  22903. // in the concurrent tree already suspended during this render.
  22904. // This is a known bug.
  22905. if ((workInProgress.mode & BlockingMode) !== NoMode) {
  22906. // TODO: Move this back to throwException because this is too late
  22907. // if this is a large tree which is common for initial loads. We
  22908. // don't know if we should restart a render or not until we get
  22909. // this marker, and this is too late.
  22910. // If this render already had a ping or lower pri updates,
  22911. // and this is the first time we know we're going to suspend we
  22912. // should be able to immediately restart from within throwException.
  22913. var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;
  22914. if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
  22915. // If this was in an invisible tree or a new render, then showing
  22916. // this boundary is ok.
  22917. renderDidSuspend();
  22918. } else {
  22919. // Otherwise, we're going to have to hide content so we should
  22920. // suspend for longer if possible.
  22921. renderDidSuspendDelayIfPossible();
  22922. }
  22923. }
  22924. }
  22925. {
  22926. // TODO: Only schedule updates if these values are non equal, i.e. it changed.
  22927. if (nextDidTimeout || prevDidTimeout) {
  22928. // If this boundary just timed out, schedule an effect to attach a
  22929. // retry listener to the promise. This flag is also used to hide the
  22930. // primary children. In mutation mode, we also need the flag to
  22931. // *unhide* children that were previously hidden, so check if this
  22932. // is currently timed out, too.
  22933. workInProgress.effectTag |= Update;
  22934. }
  22935. }
  22936. return null;
  22937. }
  22938. case HostPortal:
  22939. popHostContainer(workInProgress);
  22940. updateHostContainer(workInProgress);
  22941. return null;
  22942. case ContextProvider:
  22943. // Pop provider fiber
  22944. popProvider(workInProgress);
  22945. return null;
  22946. case IncompleteClassComponent:
  22947. {
  22948. // Same as class component case. I put it down here so that the tags are
  22949. // sequential to ensure this switch is compiled to a jump table.
  22950. var _Component = workInProgress.type;
  22951. if (isContextProvider(_Component)) {
  22952. popContext(workInProgress);
  22953. }
  22954. return null;
  22955. }
  22956. case SuspenseListComponent:
  22957. {
  22958. popSuspenseContext(workInProgress);
  22959. var renderState = workInProgress.memoizedState;
  22960. if (renderState === null) {
  22961. // We're running in the default, "independent" mode.
  22962. // We don't do anything in this mode.
  22963. return null;
  22964. }
  22965. var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;
  22966. var renderedTail = renderState.rendering;
  22967. if (renderedTail === null) {
  22968. // We just rendered the head.
  22969. if (!didSuspendAlready) {
  22970. // This is the first pass. We need to figure out if anything is still
  22971. // suspended in the rendered set.
  22972. // If new content unsuspended, but there's still some content that
  22973. // didn't. Then we need to do a second pass that forces everything
  22974. // to keep showing their fallbacks.
  22975. // We might be suspended if something in this render pass suspended, or
  22976. // something in the previous committed pass suspended. Otherwise,
  22977. // there's no chance so we can skip the expensive call to
  22978. // findFirstSuspended.
  22979. var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);
  22980. if (!cannotBeSuspended) {
  22981. var row = workInProgress.child;
  22982. while (row !== null) {
  22983. var suspended = findFirstSuspended(row);
  22984. if (suspended !== null) {
  22985. didSuspendAlready = true;
  22986. workInProgress.effectTag |= DidCapture;
  22987. cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
  22988. // part of the second pass. In that case nothing will subscribe to
  22989. // its thennables. Instead, we'll transfer its thennables to the
  22990. // SuspenseList so that it can retry if they resolve.
  22991. // There might be multiple of these in the list but since we're
  22992. // going to wait for all of them anyway, it doesn't really matter
  22993. // which ones gets to ping. In theory we could get clever and keep
  22994. // track of how many dependencies remain but it gets tricky because
  22995. // in the meantime, we can add/remove/change items and dependencies.
  22996. // We might bail out of the loop before finding any but that
  22997. // doesn't matter since that means that the other boundaries that
  22998. // we did find already has their listeners attached.
  22999. var newThennables = suspended.updateQueue;
  23000. if (newThennables !== null) {
  23001. workInProgress.updateQueue = newThennables;
  23002. workInProgress.effectTag |= Update;
  23003. } // Rerender the whole list, but this time, we'll force fallbacks
  23004. // to stay in place.
  23005. // Reset the effect list before doing the second pass since that's now invalid.
  23006. if (renderState.lastEffect === null) {
  23007. workInProgress.firstEffect = null;
  23008. }
  23009. workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
  23010. resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately
  23011. // rerender the children.
  23012. pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
  23013. return workInProgress.child;
  23014. }
  23015. row = row.sibling;
  23016. }
  23017. }
  23018. } else {
  23019. cutOffTailIfNeeded(renderState, false);
  23020. } // Next we're going to render the tail.
  23021. } else {
  23022. // Append the rendered row to the child list.
  23023. if (!didSuspendAlready) {
  23024. var _suspended = findFirstSuspended(renderedTail);
  23025. if (_suspended !== null) {
  23026. workInProgress.effectTag |= DidCapture;
  23027. didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
  23028. // get lost if this row ends up dropped during a second pass.
  23029. var _newThennables = _suspended.updateQueue;
  23030. if (_newThennables !== null) {
  23031. workInProgress.updateQueue = _newThennables;
  23032. workInProgress.effectTag |= Update;
  23033. }
  23034. cutOffTailIfNeeded(renderState, true); // This might have been modified.
  23035. if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {
  23036. // We need to delete the row we just rendered.
  23037. // Reset the effect list to what it was before we rendered this
  23038. // child. The nested children have already appended themselves.
  23039. var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
  23040. if (lastEffect !== null) {
  23041. lastEffect.nextEffect = null;
  23042. } // We're done.
  23043. return null;
  23044. }
  23045. } else if ( // The time it took to render last row is greater than time until
  23046. // the expiration.
  23047. now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {
  23048. // We have now passed our CPU deadline and we'll just give up further
  23049. // attempts to render the main content and only render fallbacks.
  23050. // The assumption is that this is usually faster.
  23051. workInProgress.effectTag |= DidCapture;
  23052. didSuspendAlready = true;
  23053. cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
  23054. // to get it started back up to attempt the next item. If we can show
  23055. // them, then they really have the same priority as this render.
  23056. // So we'll pick it back up the very next render pass once we've had
  23057. // an opportunity to yield for paint.
  23058. var nextPriority = renderExpirationTime - 1;
  23059. workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;
  23060. {
  23061. markSpawnedWork(nextPriority);
  23062. }
  23063. }
  23064. }
  23065. if (renderState.isBackwards) {
  23066. // The effect list of the backwards tail will have been added
  23067. // to the end. This breaks the guarantee that life-cycles fire in
  23068. // sibling order but that isn't a strong guarantee promised by React.
  23069. // Especially since these might also just pop in during future commits.
  23070. // Append to the beginning of the list.
  23071. renderedTail.sibling = workInProgress.child;
  23072. workInProgress.child = renderedTail;
  23073. } else {
  23074. var previousSibling = renderState.last;
  23075. if (previousSibling !== null) {
  23076. previousSibling.sibling = renderedTail;
  23077. } else {
  23078. workInProgress.child = renderedTail;
  23079. }
  23080. renderState.last = renderedTail;
  23081. }
  23082. }
  23083. if (renderState.tail !== null) {
  23084. // We still have tail rows to render.
  23085. if (renderState.tailExpiration === 0) {
  23086. // Heuristic for how long we're willing to spend rendering rows
  23087. // until we just give up and show what we have so far.
  23088. var TAIL_EXPIRATION_TIMEOUT_MS = 500;
  23089. renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this
  23090. // is a per component value. It should really be since the start
  23091. // of the total render or last commit. Consider using something like
  23092. // globalMostRecentFallbackTime. That doesn't account for being
  23093. // suspended for part of the time or when it's a new render.
  23094. // It should probably use a global start time value instead.
  23095. } // Pop a row.
  23096. var next = renderState.tail;
  23097. renderState.rendering = next;
  23098. renderState.tail = next.sibling;
  23099. renderState.lastEffect = workInProgress.lastEffect;
  23100. renderState.renderingStartTime = now();
  23101. next.sibling = null; // Restore the context.
  23102. // TODO: We can probably just avoid popping it instead and only
  23103. // setting it the first time we go from not suspended to suspended.
  23104. var suspenseContext = suspenseStackCursor.current;
  23105. if (didSuspendAlready) {
  23106. suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
  23107. } else {
  23108. suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
  23109. }
  23110. pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
  23111. return next;
  23112. }
  23113. return null;
  23114. }
  23115. }
  23116. {
  23117. {
  23118. throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
  23119. }
  23120. }
  23121. }
  23122. function unwindWork(workInProgress, renderExpirationTime) {
  23123. switch (workInProgress.tag) {
  23124. case ClassComponent:
  23125. {
  23126. var Component = workInProgress.type;
  23127. if (isContextProvider(Component)) {
  23128. popContext(workInProgress);
  23129. }
  23130. var effectTag = workInProgress.effectTag;
  23131. if (effectTag & ShouldCapture) {
  23132. workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
  23133. return workInProgress;
  23134. }
  23135. return null;
  23136. }
  23137. case HostRoot:
  23138. {
  23139. popHostContainer(workInProgress);
  23140. popTopLevelContextObject(workInProgress);
  23141. var _effectTag = workInProgress.effectTag;
  23142. if (!((_effectTag & DidCapture) === NoEffect)) {
  23143. {
  23144. throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
  23145. }
  23146. }
  23147. workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
  23148. return workInProgress;
  23149. }
  23150. case HostComponent:
  23151. {
  23152. // TODO: popHydrationState
  23153. popHostContext(workInProgress);
  23154. return null;
  23155. }
  23156. case SuspenseComponent:
  23157. {
  23158. popSuspenseContext(workInProgress);
  23159. var _effectTag2 = workInProgress.effectTag;
  23160. if (_effectTag2 & ShouldCapture) {
  23161. workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
  23162. return workInProgress;
  23163. }
  23164. return null;
  23165. }
  23166. case SuspenseListComponent:
  23167. {
  23168. popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
  23169. // caught by a nested boundary. If not, it should bubble through.
  23170. return null;
  23171. }
  23172. case HostPortal:
  23173. popHostContainer(workInProgress);
  23174. return null;
  23175. case ContextProvider:
  23176. popProvider(workInProgress);
  23177. return null;
  23178. default:
  23179. return null;
  23180. }
  23181. }
  23182. function unwindInterruptedWork(interruptedWork) {
  23183. switch (interruptedWork.tag) {
  23184. case ClassComponent:
  23185. {
  23186. var childContextTypes = interruptedWork.type.childContextTypes;
  23187. if (childContextTypes !== null && childContextTypes !== undefined) {
  23188. popContext(interruptedWork);
  23189. }
  23190. break;
  23191. }
  23192. case HostRoot:
  23193. {
  23194. popHostContainer(interruptedWork);
  23195. popTopLevelContextObject(interruptedWork);
  23196. break;
  23197. }
  23198. case HostComponent:
  23199. {
  23200. popHostContext(interruptedWork);
  23201. break;
  23202. }
  23203. case HostPortal:
  23204. popHostContainer(interruptedWork);
  23205. break;
  23206. case SuspenseComponent:
  23207. popSuspenseContext(interruptedWork);
  23208. break;
  23209. case SuspenseListComponent:
  23210. popSuspenseContext(interruptedWork);
  23211. break;
  23212. case ContextProvider:
  23213. popProvider(interruptedWork);
  23214. break;
  23215. }
  23216. }
  23217. function createCapturedValue(value, source) {
  23218. // If the value is an error, call this function immediately after it is thrown
  23219. // so the stack is accurate.
  23220. return {
  23221. value: value,
  23222. source: source,
  23223. stack: getStackByFiberInDevAndProd(source)
  23224. };
  23225. }
  23226. function logCapturedError(capturedError) {
  23227. var error = capturedError.error;
  23228. {
  23229. var componentName = capturedError.componentName,
  23230. componentStack = capturedError.componentStack,
  23231. errorBoundaryName = capturedError.errorBoundaryName,
  23232. errorBoundaryFound = capturedError.errorBoundaryFound,
  23233. willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling
  23234. // `preventDefault()` in window `error` handler.
  23235. // We record this information as an expando on the error.
  23236. if (error != null && error._suppressLogging) {
  23237. if (errorBoundaryFound && willRetry) {
  23238. // The error is recoverable and was silenced.
  23239. // Ignore it and don't print the stack addendum.
  23240. // This is handy for testing error boundaries without noise.
  23241. return;
  23242. } // The error is fatal. Since the silencing might have
  23243. // been accidental, we'll surface it anyway.
  23244. // However, the browser would have silenced the original error
  23245. // so we'll print it first, and then print the stack addendum.
  23246. console['error'](error); // Don't transform to our wrapper
  23247. // For a more detailed description of this block, see:
  23248. // https://github.com/facebook/react/pull/13384
  23249. }
  23250. var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
  23251. var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
  23252. if (errorBoundaryFound && errorBoundaryName) {
  23253. if (willRetry) {
  23254. errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
  23255. } else {
  23256. errorBoundaryMessage = "This error was initially handled by the error boundary " + errorBoundaryName + ".\n" + "Recreating the tree from scratch failed so React will unmount the tree.";
  23257. }
  23258. } else {
  23259. errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
  23260. }
  23261. var combinedMessage = "" + componentNameMessage + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
  23262. // We don't include the original error message and JS stack because the browser
  23263. // has already printed it. Even if the application swallows the error, it is still
  23264. // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
  23265. console['error'](combinedMessage); // Don't transform to our wrapper
  23266. }
  23267. }
  23268. var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
  23269. {
  23270. didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
  23271. }
  23272. var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
  23273. function logError(boundary, errorInfo) {
  23274. var source = errorInfo.source;
  23275. var stack = errorInfo.stack;
  23276. if (stack === null && source !== null) {
  23277. stack = getStackByFiberInDevAndProd(source);
  23278. }
  23279. var capturedError = {
  23280. componentName: source !== null ? getComponentName(source.type) : null,
  23281. componentStack: stack !== null ? stack : '',
  23282. error: errorInfo.value,
  23283. errorBoundary: null,
  23284. errorBoundaryName: null,
  23285. errorBoundaryFound: false,
  23286. willRetry: false
  23287. };
  23288. if (boundary !== null && boundary.tag === ClassComponent) {
  23289. capturedError.errorBoundary = boundary.stateNode;
  23290. capturedError.errorBoundaryName = getComponentName(boundary.type);
  23291. capturedError.errorBoundaryFound = true;
  23292. capturedError.willRetry = true;
  23293. }
  23294. try {
  23295. logCapturedError(capturedError);
  23296. } catch (e) {
  23297. // This method must not throw, or React internal state will get messed up.
  23298. // If console.error is overridden, or logCapturedError() shows a dialog that throws,
  23299. // we want to report this error outside of the normal stack as a last resort.
  23300. // https://github.com/facebook/react/issues/13188
  23301. setTimeout(function () {
  23302. throw e;
  23303. });
  23304. }
  23305. }
  23306. var callComponentWillUnmountWithTimer = function (current, instance) {
  23307. startPhaseTimer(current, 'componentWillUnmount');
  23308. instance.props = current.memoizedProps;
  23309. instance.state = current.memoizedState;
  23310. instance.componentWillUnmount();
  23311. stopPhaseTimer();
  23312. }; // Capture errors so they don't interrupt unmounting.
  23313. function safelyCallComponentWillUnmount(current, instance) {
  23314. {
  23315. invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);
  23316. if (hasCaughtError()) {
  23317. var unmountError = clearCaughtError();
  23318. captureCommitPhaseError(current, unmountError);
  23319. }
  23320. }
  23321. }
  23322. function safelyDetachRef(current) {
  23323. var ref = current.ref;
  23324. if (ref !== null) {
  23325. if (typeof ref === 'function') {
  23326. {
  23327. invokeGuardedCallback(null, ref, null, null);
  23328. if (hasCaughtError()) {
  23329. var refError = clearCaughtError();
  23330. captureCommitPhaseError(current, refError);
  23331. }
  23332. }
  23333. } else {
  23334. ref.current = null;
  23335. }
  23336. }
  23337. }
  23338. function safelyCallDestroy(current, destroy) {
  23339. {
  23340. invokeGuardedCallback(null, destroy, null);
  23341. if (hasCaughtError()) {
  23342. var error = clearCaughtError();
  23343. captureCommitPhaseError(current, error);
  23344. }
  23345. }
  23346. }
  23347. function commitBeforeMutationLifeCycles(current, finishedWork) {
  23348. switch (finishedWork.tag) {
  23349. case FunctionComponent:
  23350. case ForwardRef:
  23351. case SimpleMemoComponent:
  23352. case Block:
  23353. {
  23354. return;
  23355. }
  23356. case ClassComponent:
  23357. {
  23358. if (finishedWork.effectTag & Snapshot) {
  23359. if (current !== null) {
  23360. var prevProps = current.memoizedProps;
  23361. var prevState = current.memoizedState;
  23362. startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
  23363. var instance = finishedWork.stateNode; // We could update instance props and state here,
  23364. // but instead we rely on them being set during last render.
  23365. // TODO: revisit this when we implement resuming.
  23366. {
  23367. if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
  23368. if (instance.props !== finishedWork.memoizedProps) {
  23369. error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23370. }
  23371. if (instance.state !== finishedWork.memoizedState) {
  23372. error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23373. }
  23374. }
  23375. }
  23376. var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
  23377. {
  23378. var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
  23379. if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
  23380. didWarnSet.add(finishedWork.type);
  23381. error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
  23382. }
  23383. }
  23384. instance.__reactInternalSnapshotBeforeUpdate = snapshot;
  23385. stopPhaseTimer();
  23386. }
  23387. }
  23388. return;
  23389. }
  23390. case HostRoot:
  23391. case HostComponent:
  23392. case HostText:
  23393. case HostPortal:
  23394. case IncompleteClassComponent:
  23395. // Nothing to do for these component types
  23396. return;
  23397. }
  23398. {
  23399. {
  23400. throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
  23401. }
  23402. }
  23403. }
  23404. function commitHookEffectListUnmount(tag, finishedWork) {
  23405. var updateQueue = finishedWork.updateQueue;
  23406. var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
  23407. if (lastEffect !== null) {
  23408. var firstEffect = lastEffect.next;
  23409. var effect = firstEffect;
  23410. do {
  23411. if ((effect.tag & tag) === tag) {
  23412. // Unmount
  23413. var destroy = effect.destroy;
  23414. effect.destroy = undefined;
  23415. if (destroy !== undefined) {
  23416. destroy();
  23417. }
  23418. }
  23419. effect = effect.next;
  23420. } while (effect !== firstEffect);
  23421. }
  23422. }
  23423. function commitHookEffectListMount(tag, finishedWork) {
  23424. var updateQueue = finishedWork.updateQueue;
  23425. var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
  23426. if (lastEffect !== null) {
  23427. var firstEffect = lastEffect.next;
  23428. var effect = firstEffect;
  23429. do {
  23430. if ((effect.tag & tag) === tag) {
  23431. // Mount
  23432. var create = effect.create;
  23433. effect.destroy = create();
  23434. {
  23435. var destroy = effect.destroy;
  23436. if (destroy !== undefined && typeof destroy !== 'function') {
  23437. var addendum = void 0;
  23438. if (destroy === null) {
  23439. addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
  23440. } else if (typeof destroy.then === 'function') {
  23441. addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
  23442. } else {
  23443. addendum = ' You returned: ' + destroy;
  23444. }
  23445. error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
  23446. }
  23447. }
  23448. }
  23449. effect = effect.next;
  23450. } while (effect !== firstEffect);
  23451. }
  23452. }
  23453. function commitPassiveHookEffects(finishedWork) {
  23454. if ((finishedWork.effectTag & Passive) !== NoEffect) {
  23455. switch (finishedWork.tag) {
  23456. case FunctionComponent:
  23457. case ForwardRef:
  23458. case SimpleMemoComponent:
  23459. case Block:
  23460. {
  23461. // TODO (#17945) We should call all passive destroy functions (for all fibers)
  23462. // before calling any create functions. The current approach only serializes
  23463. // these for a single fiber.
  23464. commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);
  23465. commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
  23466. break;
  23467. }
  23468. }
  23469. }
  23470. }
  23471. function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {
  23472. switch (finishedWork.tag) {
  23473. case FunctionComponent:
  23474. case ForwardRef:
  23475. case SimpleMemoComponent:
  23476. case Block:
  23477. {
  23478. // At this point layout effects have already been destroyed (during mutation phase).
  23479. // This is done to prevent sibling component effects from interfering with each other,
  23480. // e.g. a destroy function in one component should never override a ref set
  23481. // by a create function in another component during the same commit.
  23482. commitHookEffectListMount(Layout | HasEffect, finishedWork);
  23483. return;
  23484. }
  23485. case ClassComponent:
  23486. {
  23487. var instance = finishedWork.stateNode;
  23488. if (finishedWork.effectTag & Update) {
  23489. if (current === null) {
  23490. startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,
  23491. // but instead we rely on them being set during last render.
  23492. // TODO: revisit this when we implement resuming.
  23493. {
  23494. if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
  23495. if (instance.props !== finishedWork.memoizedProps) {
  23496. error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23497. }
  23498. if (instance.state !== finishedWork.memoizedState) {
  23499. error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23500. }
  23501. }
  23502. }
  23503. instance.componentDidMount();
  23504. stopPhaseTimer();
  23505. } else {
  23506. var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
  23507. var prevState = current.memoizedState;
  23508. startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,
  23509. // but instead we rely on them being set during last render.
  23510. // TODO: revisit this when we implement resuming.
  23511. {
  23512. if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
  23513. if (instance.props !== finishedWork.memoizedProps) {
  23514. error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23515. }
  23516. if (instance.state !== finishedWork.memoizedState) {
  23517. error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23518. }
  23519. }
  23520. }
  23521. instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
  23522. stopPhaseTimer();
  23523. }
  23524. }
  23525. var updateQueue = finishedWork.updateQueue;
  23526. if (updateQueue !== null) {
  23527. {
  23528. if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
  23529. if (instance.props !== finishedWork.memoizedProps) {
  23530. error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23531. }
  23532. if (instance.state !== finishedWork.memoizedState) {
  23533. error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
  23534. }
  23535. }
  23536. } // We could update instance props and state here,
  23537. // but instead we rely on them being set during last render.
  23538. // TODO: revisit this when we implement resuming.
  23539. commitUpdateQueue(finishedWork, updateQueue, instance);
  23540. }
  23541. return;
  23542. }
  23543. case HostRoot:
  23544. {
  23545. var _updateQueue = finishedWork.updateQueue;
  23546. if (_updateQueue !== null) {
  23547. var _instance = null;
  23548. if (finishedWork.child !== null) {
  23549. switch (finishedWork.child.tag) {
  23550. case HostComponent:
  23551. _instance = getPublicInstance(finishedWork.child.stateNode);
  23552. break;
  23553. case ClassComponent:
  23554. _instance = finishedWork.child.stateNode;
  23555. break;
  23556. }
  23557. }
  23558. commitUpdateQueue(finishedWork, _updateQueue, _instance);
  23559. }
  23560. return;
  23561. }
  23562. case HostComponent:
  23563. {
  23564. var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
  23565. // (eg DOM renderer may schedule auto-focus for inputs and form controls).
  23566. // These effects should only be committed when components are first mounted,
  23567. // aka when there is no current/alternate.
  23568. if (current === null && finishedWork.effectTag & Update) {
  23569. var type = finishedWork.type;
  23570. var props = finishedWork.memoizedProps;
  23571. commitMount(_instance2, type, props);
  23572. }
  23573. return;
  23574. }
  23575. case HostText:
  23576. {
  23577. // We have no life-cycles associated with text.
  23578. return;
  23579. }
  23580. case HostPortal:
  23581. {
  23582. // We have no life-cycles associated with portals.
  23583. return;
  23584. }
  23585. case Profiler:
  23586. {
  23587. {
  23588. var onRender = finishedWork.memoizedProps.onRender;
  23589. if (typeof onRender === 'function') {
  23590. {
  23591. onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
  23592. }
  23593. }
  23594. }
  23595. return;
  23596. }
  23597. case SuspenseComponent:
  23598. {
  23599. commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  23600. return;
  23601. }
  23602. case SuspenseListComponent:
  23603. case IncompleteClassComponent:
  23604. case FundamentalComponent:
  23605. case ScopeComponent:
  23606. return;
  23607. }
  23608. {
  23609. {
  23610. throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
  23611. }
  23612. }
  23613. }
  23614. function hideOrUnhideAllChildren(finishedWork, isHidden) {
  23615. {
  23616. // We only have the top Fiber that was inserted but we need to recurse down its
  23617. // children to find all the terminal nodes.
  23618. var node = finishedWork;
  23619. while (true) {
  23620. if (node.tag === HostComponent) {
  23621. var instance = node.stateNode;
  23622. if (isHidden) {
  23623. hideInstance(instance);
  23624. } else {
  23625. unhideInstance(node.stateNode, node.memoizedProps);
  23626. }
  23627. } else if (node.tag === HostText) {
  23628. var _instance3 = node.stateNode;
  23629. if (isHidden) {
  23630. hideTextInstance(_instance3);
  23631. } else {
  23632. unhideTextInstance(_instance3, node.memoizedProps);
  23633. }
  23634. } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {
  23635. // Found a nested Suspense component that timed out. Skip over the
  23636. // primary child fragment, which should remain hidden.
  23637. var fallbackChildFragment = node.child.sibling;
  23638. fallbackChildFragment.return = node;
  23639. node = fallbackChildFragment;
  23640. continue;
  23641. } else if (node.child !== null) {
  23642. node.child.return = node;
  23643. node = node.child;
  23644. continue;
  23645. }
  23646. if (node === finishedWork) {
  23647. return;
  23648. }
  23649. while (node.sibling === null) {
  23650. if (node.return === null || node.return === finishedWork) {
  23651. return;
  23652. }
  23653. node = node.return;
  23654. }
  23655. node.sibling.return = node.return;
  23656. node = node.sibling;
  23657. }
  23658. }
  23659. }
  23660. function commitAttachRef(finishedWork) {
  23661. var ref = finishedWork.ref;
  23662. if (ref !== null) {
  23663. var instance = finishedWork.stateNode;
  23664. var instanceToUse;
  23665. switch (finishedWork.tag) {
  23666. case HostComponent:
  23667. instanceToUse = getPublicInstance(instance);
  23668. break;
  23669. default:
  23670. instanceToUse = instance;
  23671. } // Moved outside to ensure DCE works with this flag
  23672. if (typeof ref === 'function') {
  23673. ref(instanceToUse);
  23674. } else {
  23675. {
  23676. if (!ref.hasOwnProperty('current')) {
  23677. error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
  23678. }
  23679. }
  23680. ref.current = instanceToUse;
  23681. }
  23682. }
  23683. }
  23684. function commitDetachRef(current) {
  23685. var currentRef = current.ref;
  23686. if (currentRef !== null) {
  23687. if (typeof currentRef === 'function') {
  23688. currentRef(null);
  23689. } else {
  23690. currentRef.current = null;
  23691. }
  23692. }
  23693. } // User-originating errors (lifecycles and refs) should not interrupt
  23694. // deletion, so don't let them throw. Host-originating errors should
  23695. // interrupt deletion, so it's okay
  23696. function commitUnmount(finishedRoot, current, renderPriorityLevel) {
  23697. onCommitUnmount(current);
  23698. switch (current.tag) {
  23699. case FunctionComponent:
  23700. case ForwardRef:
  23701. case MemoComponent:
  23702. case SimpleMemoComponent:
  23703. case Block:
  23704. {
  23705. var updateQueue = current.updateQueue;
  23706. if (updateQueue !== null) {
  23707. var lastEffect = updateQueue.lastEffect;
  23708. if (lastEffect !== null) {
  23709. var firstEffect = lastEffect.next;
  23710. {
  23711. // When the owner fiber is deleted, the destroy function of a passive
  23712. // effect hook is called during the synchronous commit phase. This is
  23713. // a concession to implementation complexity. Calling it in the
  23714. // passive effect phase (like they usually are, when dependencies
  23715. // change during an update) would require either traversing the
  23716. // children of the deleted fiber again, or including unmount effects
  23717. // as part of the fiber effect list.
  23718. //
  23719. // Because this is during the sync commit phase, we need to change
  23720. // the priority.
  23721. //
  23722. // TODO: Reconsider this implementation trade off.
  23723. var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
  23724. runWithPriority$1(priorityLevel, function () {
  23725. var effect = firstEffect;
  23726. do {
  23727. var _destroy = effect.destroy;
  23728. if (_destroy !== undefined) {
  23729. safelyCallDestroy(current, _destroy);
  23730. }
  23731. effect = effect.next;
  23732. } while (effect !== firstEffect);
  23733. });
  23734. }
  23735. }
  23736. }
  23737. return;
  23738. }
  23739. case ClassComponent:
  23740. {
  23741. safelyDetachRef(current);
  23742. var instance = current.stateNode;
  23743. if (typeof instance.componentWillUnmount === 'function') {
  23744. safelyCallComponentWillUnmount(current, instance);
  23745. }
  23746. return;
  23747. }
  23748. case HostComponent:
  23749. {
  23750. safelyDetachRef(current);
  23751. return;
  23752. }
  23753. case HostPortal:
  23754. {
  23755. // TODO: this is recursive.
  23756. // We are also not using this parent because
  23757. // the portal will get pushed immediately.
  23758. {
  23759. unmountHostComponents(finishedRoot, current, renderPriorityLevel);
  23760. }
  23761. return;
  23762. }
  23763. case FundamentalComponent:
  23764. {
  23765. return;
  23766. }
  23767. case DehydratedFragment:
  23768. {
  23769. return;
  23770. }
  23771. case ScopeComponent:
  23772. {
  23773. return;
  23774. }
  23775. }
  23776. }
  23777. function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
  23778. // While we're inside a removed host node we don't want to call
  23779. // removeChild on the inner nodes because they're removed by the top
  23780. // call anyway. We also want to call componentWillUnmount on all
  23781. // composites before this host node is removed from the tree. Therefore
  23782. // we do an inner loop while we're still inside the host node.
  23783. var node = root;
  23784. while (true) {
  23785. commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.
  23786. // Skip portals because commitUnmount() currently visits them recursively.
  23787. if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
  23788. // If we don't use mutation we drill down into portals here instead.
  23789. node.tag !== HostPortal)) {
  23790. node.child.return = node;
  23791. node = node.child;
  23792. continue;
  23793. }
  23794. if (node === root) {
  23795. return;
  23796. }
  23797. while (node.sibling === null) {
  23798. if (node.return === null || node.return === root) {
  23799. return;
  23800. }
  23801. node = node.return;
  23802. }
  23803. node.sibling.return = node.return;
  23804. node = node.sibling;
  23805. }
  23806. }
  23807. function detachFiber(current) {
  23808. var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we
  23809. // should clear the child pointer of the parent alternate to let this
  23810. // get GC:ed but we don't know which for sure which parent is the current
  23811. // one so we'll settle for GC:ing the subtree of this child. This child
  23812. // itself will be GC:ed when the parent updates the next time.
  23813. current.return = null;
  23814. current.child = null;
  23815. current.memoizedState = null;
  23816. current.updateQueue = null;
  23817. current.dependencies = null;
  23818. current.alternate = null;
  23819. current.firstEffect = null;
  23820. current.lastEffect = null;
  23821. current.pendingProps = null;
  23822. current.memoizedProps = null;
  23823. current.stateNode = null;
  23824. if (alternate !== null) {
  23825. detachFiber(alternate);
  23826. }
  23827. }
  23828. function getHostParentFiber(fiber) {
  23829. var parent = fiber.return;
  23830. while (parent !== null) {
  23831. if (isHostParent(parent)) {
  23832. return parent;
  23833. }
  23834. parent = parent.return;
  23835. }
  23836. {
  23837. {
  23838. throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
  23839. }
  23840. }
  23841. }
  23842. function isHostParent(fiber) {
  23843. return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
  23844. }
  23845. function getHostSibling(fiber) {
  23846. // We're going to search forward into the tree until we find a sibling host
  23847. // node. Unfortunately, if multiple insertions are done in a row we have to
  23848. // search past them. This leads to exponential search for the next sibling.
  23849. // TODO: Find a more efficient way to do this.
  23850. var node = fiber;
  23851. siblings: while (true) {
  23852. // If we didn't find anything, let's try the next sibling.
  23853. while (node.sibling === null) {
  23854. if (node.return === null || isHostParent(node.return)) {
  23855. // If we pop out of the root or hit the parent the fiber we are the
  23856. // last sibling.
  23857. return null;
  23858. }
  23859. node = node.return;
  23860. }
  23861. node.sibling.return = node.return;
  23862. node = node.sibling;
  23863. while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
  23864. // If it is not host node and, we might have a host node inside it.
  23865. // Try to search down until we find one.
  23866. if (node.effectTag & Placement) {
  23867. // If we don't have a child, try the siblings instead.
  23868. continue siblings;
  23869. } // If we don't have a child, try the siblings instead.
  23870. // We also skip portals because they are not part of this host tree.
  23871. if (node.child === null || node.tag === HostPortal) {
  23872. continue siblings;
  23873. } else {
  23874. node.child.return = node;
  23875. node = node.child;
  23876. }
  23877. } // Check if this host node is stable or about to be placed.
  23878. if (!(node.effectTag & Placement)) {
  23879. // Found it!
  23880. return node.stateNode;
  23881. }
  23882. }
  23883. }
  23884. function commitPlacement(finishedWork) {
  23885. var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.
  23886. var parent;
  23887. var isContainer;
  23888. var parentStateNode = parentFiber.stateNode;
  23889. switch (parentFiber.tag) {
  23890. case HostComponent:
  23891. parent = parentStateNode;
  23892. isContainer = false;
  23893. break;
  23894. case HostRoot:
  23895. parent = parentStateNode.containerInfo;
  23896. isContainer = true;
  23897. break;
  23898. case HostPortal:
  23899. parent = parentStateNode.containerInfo;
  23900. isContainer = true;
  23901. break;
  23902. case FundamentalComponent:
  23903. // eslint-disable-next-line-no-fallthrough
  23904. default:
  23905. {
  23906. {
  23907. throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
  23908. }
  23909. }
  23910. }
  23911. if (parentFiber.effectTag & ContentReset) {
  23912. // Reset the text content of the parent before doing any insertions
  23913. resetTextContent(parent); // Clear ContentReset from the effect tag
  23914. parentFiber.effectTag &= ~ContentReset;
  23915. }
  23916. var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
  23917. // children to find all the terminal nodes.
  23918. if (isContainer) {
  23919. insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
  23920. } else {
  23921. insertOrAppendPlacementNode(finishedWork, before, parent);
  23922. }
  23923. }
  23924. function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  23925. var tag = node.tag;
  23926. var isHost = tag === HostComponent || tag === HostText;
  23927. if (isHost || enableFundamentalAPI ) {
  23928. var stateNode = isHost ? node.stateNode : node.stateNode.instance;
  23929. if (before) {
  23930. insertInContainerBefore(parent, stateNode, before);
  23931. } else {
  23932. appendChildToContainer(parent, stateNode);
  23933. }
  23934. } else if (tag === HostPortal) ; else {
  23935. var child = node.child;
  23936. if (child !== null) {
  23937. insertOrAppendPlacementNodeIntoContainer(child, before, parent);
  23938. var sibling = child.sibling;
  23939. while (sibling !== null) {
  23940. insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
  23941. sibling = sibling.sibling;
  23942. }
  23943. }
  23944. }
  23945. }
  23946. function insertOrAppendPlacementNode(node, before, parent) {
  23947. var tag = node.tag;
  23948. var isHost = tag === HostComponent || tag === HostText;
  23949. if (isHost || enableFundamentalAPI ) {
  23950. var stateNode = isHost ? node.stateNode : node.stateNode.instance;
  23951. if (before) {
  23952. insertBefore(parent, stateNode, before);
  23953. } else {
  23954. appendChild(parent, stateNode);
  23955. }
  23956. } else if (tag === HostPortal) ; else {
  23957. var child = node.child;
  23958. if (child !== null) {
  23959. insertOrAppendPlacementNode(child, before, parent);
  23960. var sibling = child.sibling;
  23961. while (sibling !== null) {
  23962. insertOrAppendPlacementNode(sibling, before, parent);
  23963. sibling = sibling.sibling;
  23964. }
  23965. }
  23966. }
  23967. }
  23968. function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
  23969. // We only have the top Fiber that was deleted but we need to recurse down its
  23970. // children to find all the terminal nodes.
  23971. var node = current; // Each iteration, currentParent is populated with node's host parent if not
  23972. // currentParentIsValid.
  23973. var currentParentIsValid = false; // Note: these two variables *must* always be updated together.
  23974. var currentParent;
  23975. var currentParentIsContainer;
  23976. while (true) {
  23977. if (!currentParentIsValid) {
  23978. var parent = node.return;
  23979. findParent: while (true) {
  23980. if (!(parent !== null)) {
  23981. {
  23982. throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
  23983. }
  23984. }
  23985. var parentStateNode = parent.stateNode;
  23986. switch (parent.tag) {
  23987. case HostComponent:
  23988. currentParent = parentStateNode;
  23989. currentParentIsContainer = false;
  23990. break findParent;
  23991. case HostRoot:
  23992. currentParent = parentStateNode.containerInfo;
  23993. currentParentIsContainer = true;
  23994. break findParent;
  23995. case HostPortal:
  23996. currentParent = parentStateNode.containerInfo;
  23997. currentParentIsContainer = true;
  23998. break findParent;
  23999. }
  24000. parent = parent.return;
  24001. }
  24002. currentParentIsValid = true;
  24003. }
  24004. if (node.tag === HostComponent || node.tag === HostText) {
  24005. commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the
  24006. // node from the tree.
  24007. if (currentParentIsContainer) {
  24008. removeChildFromContainer(currentParent, node.stateNode);
  24009. } else {
  24010. removeChild(currentParent, node.stateNode);
  24011. } // Don't visit children because we already visited them.
  24012. } else if (node.tag === HostPortal) {
  24013. if (node.child !== null) {
  24014. // When we go into a portal, it becomes the parent to remove from.
  24015. // We will reassign it back when we pop the portal on the way up.
  24016. currentParent = node.stateNode.containerInfo;
  24017. currentParentIsContainer = true; // Visit children because portals might contain host components.
  24018. node.child.return = node;
  24019. node = node.child;
  24020. continue;
  24021. }
  24022. } else {
  24023. commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.
  24024. if (node.child !== null) {
  24025. node.child.return = node;
  24026. node = node.child;
  24027. continue;
  24028. }
  24029. }
  24030. if (node === current) {
  24031. return;
  24032. }
  24033. while (node.sibling === null) {
  24034. if (node.return === null || node.return === current) {
  24035. return;
  24036. }
  24037. node = node.return;
  24038. if (node.tag === HostPortal) {
  24039. // When we go out of the portal, we need to restore the parent.
  24040. // Since we don't keep a stack of them, we will search for it.
  24041. currentParentIsValid = false;
  24042. }
  24043. }
  24044. node.sibling.return = node.return;
  24045. node = node.sibling;
  24046. }
  24047. }
  24048. function commitDeletion(finishedRoot, current, renderPriorityLevel) {
  24049. {
  24050. // Recursively delete all host nodes from the parent.
  24051. // Detach refs and call componentWillUnmount() on the whole subtree.
  24052. unmountHostComponents(finishedRoot, current, renderPriorityLevel);
  24053. }
  24054. detachFiber(current);
  24055. }
  24056. function commitWork(current, finishedWork) {
  24057. switch (finishedWork.tag) {
  24058. case FunctionComponent:
  24059. case ForwardRef:
  24060. case MemoComponent:
  24061. case SimpleMemoComponent:
  24062. case Block:
  24063. {
  24064. // Layout effects are destroyed during the mutation phase so that all
  24065. // destroy functions for all fibers are called before any create functions.
  24066. // This prevents sibling component effects from interfering with each other,
  24067. // e.g. a destroy function in one component should never override a ref set
  24068. // by a create function in another component during the same commit.
  24069. commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
  24070. return;
  24071. }
  24072. case ClassComponent:
  24073. {
  24074. return;
  24075. }
  24076. case HostComponent:
  24077. {
  24078. var instance = finishedWork.stateNode;
  24079. if (instance != null) {
  24080. // Commit the work prepared earlier.
  24081. var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
  24082. // as the newProps. The updatePayload will contain the real change in
  24083. // this case.
  24084. var oldProps = current !== null ? current.memoizedProps : newProps;
  24085. var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.
  24086. var updatePayload = finishedWork.updateQueue;
  24087. finishedWork.updateQueue = null;
  24088. if (updatePayload !== null) {
  24089. commitUpdate(instance, updatePayload, type, oldProps, newProps);
  24090. }
  24091. }
  24092. return;
  24093. }
  24094. case HostText:
  24095. {
  24096. if (!(finishedWork.stateNode !== null)) {
  24097. {
  24098. throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." );
  24099. }
  24100. }
  24101. var textInstance = finishedWork.stateNode;
  24102. var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
  24103. // as the newProps. The updatePayload will contain the real change in
  24104. // this case.
  24105. var oldText = current !== null ? current.memoizedProps : newText;
  24106. commitTextUpdate(textInstance, oldText, newText);
  24107. return;
  24108. }
  24109. case HostRoot:
  24110. {
  24111. {
  24112. var _root = finishedWork.stateNode;
  24113. if (_root.hydrate) {
  24114. // We've just hydrated. No need to hydrate again.
  24115. _root.hydrate = false;
  24116. commitHydratedContainer(_root.containerInfo);
  24117. }
  24118. }
  24119. return;
  24120. }
  24121. case Profiler:
  24122. {
  24123. return;
  24124. }
  24125. case SuspenseComponent:
  24126. {
  24127. commitSuspenseComponent(finishedWork);
  24128. attachSuspenseRetryListeners(finishedWork);
  24129. return;
  24130. }
  24131. case SuspenseListComponent:
  24132. {
  24133. attachSuspenseRetryListeners(finishedWork);
  24134. return;
  24135. }
  24136. case IncompleteClassComponent:
  24137. {
  24138. return;
  24139. }
  24140. }
  24141. {
  24142. {
  24143. throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
  24144. }
  24145. }
  24146. }
  24147. function commitSuspenseComponent(finishedWork) {
  24148. var newState = finishedWork.memoizedState;
  24149. var newDidTimeout;
  24150. var primaryChildParent = finishedWork;
  24151. if (newState === null) {
  24152. newDidTimeout = false;
  24153. } else {
  24154. newDidTimeout = true;
  24155. primaryChildParent = finishedWork.child;
  24156. markCommitTimeOfFallback();
  24157. }
  24158. if ( primaryChildParent !== null) {
  24159. hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
  24160. }
  24161. }
  24162. function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
  24163. var newState = finishedWork.memoizedState;
  24164. if (newState === null) {
  24165. var current = finishedWork.alternate;
  24166. if (current !== null) {
  24167. var prevState = current.memoizedState;
  24168. if (prevState !== null) {
  24169. var suspenseInstance = prevState.dehydrated;
  24170. if (suspenseInstance !== null) {
  24171. commitHydratedSuspenseInstance(suspenseInstance);
  24172. }
  24173. }
  24174. }
  24175. }
  24176. }
  24177. function attachSuspenseRetryListeners(finishedWork) {
  24178. // If this boundary just timed out, then it will have a set of thenables.
  24179. // For each thenable, attach a listener so that when it resolves, React
  24180. // attempts to re-render the boundary in the primary (pre-timeout) state.
  24181. var thenables = finishedWork.updateQueue;
  24182. if (thenables !== null) {
  24183. finishedWork.updateQueue = null;
  24184. var retryCache = finishedWork.stateNode;
  24185. if (retryCache === null) {
  24186. retryCache = finishedWork.stateNode = new PossiblyWeakSet();
  24187. }
  24188. thenables.forEach(function (thenable) {
  24189. // Memoize using the boundary fiber to prevent redundant listeners.
  24190. var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
  24191. if (!retryCache.has(thenable)) {
  24192. {
  24193. if (thenable.__reactDoNotTraceInteractions !== true) {
  24194. retry = tracing.unstable_wrap(retry);
  24195. }
  24196. }
  24197. retryCache.add(thenable);
  24198. thenable.then(retry, retry);
  24199. }
  24200. });
  24201. }
  24202. }
  24203. function commitResetTextContent(current) {
  24204. resetTextContent(current.stateNode);
  24205. }
  24206. var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
  24207. function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
  24208. var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.
  24209. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
  24210. // being called "element".
  24211. update.payload = {
  24212. element: null
  24213. };
  24214. var error = errorInfo.value;
  24215. update.callback = function () {
  24216. onUncaughtError(error);
  24217. logError(fiber, errorInfo);
  24218. };
  24219. return update;
  24220. }
  24221. function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
  24222. var update = createUpdate(expirationTime, null);
  24223. update.tag = CaptureUpdate;
  24224. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  24225. if (typeof getDerivedStateFromError === 'function') {
  24226. var error$1 = errorInfo.value;
  24227. update.payload = function () {
  24228. logError(fiber, errorInfo);
  24229. return getDerivedStateFromError(error$1);
  24230. };
  24231. }
  24232. var inst = fiber.stateNode;
  24233. if (inst !== null && typeof inst.componentDidCatch === 'function') {
  24234. update.callback = function callback() {
  24235. {
  24236. markFailedErrorBoundaryForHotReloading(fiber);
  24237. }
  24238. if (typeof getDerivedStateFromError !== 'function') {
  24239. // To preserve the preexisting retry behavior of error boundaries,
  24240. // we keep track of which ones already failed during this batch.
  24241. // This gets reset before we yield back to the browser.
  24242. // TODO: Warn in strict mode if getDerivedStateFromError is
  24243. // not defined.
  24244. markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
  24245. logError(fiber, errorInfo);
  24246. }
  24247. var error$1 = errorInfo.value;
  24248. var stack = errorInfo.stack;
  24249. this.componentDidCatch(error$1, {
  24250. componentStack: stack !== null ? stack : ''
  24251. });
  24252. {
  24253. if (typeof getDerivedStateFromError !== 'function') {
  24254. // If componentDidCatch is the only error boundary method defined,
  24255. // then it needs to call setState to recover from errors.
  24256. // If no state update is scheduled then the boundary will swallow the error.
  24257. if (fiber.expirationTime !== Sync) {
  24258. error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
  24259. }
  24260. }
  24261. }
  24262. };
  24263. } else {
  24264. update.callback = function () {
  24265. markFailedErrorBoundaryForHotReloading(fiber);
  24266. };
  24267. }
  24268. return update;
  24269. }
  24270. function attachPingListener(root, renderExpirationTime, thenable) {
  24271. // Attach a listener to the promise to "ping" the root and retry. But
  24272. // only if one does not already exist for the current render expiration
  24273. // time (which acts like a "thread ID" here).
  24274. var pingCache = root.pingCache;
  24275. var threadIDs;
  24276. if (pingCache === null) {
  24277. pingCache = root.pingCache = new PossiblyWeakMap$1();
  24278. threadIDs = new Set();
  24279. pingCache.set(thenable, threadIDs);
  24280. } else {
  24281. threadIDs = pingCache.get(thenable);
  24282. if (threadIDs === undefined) {
  24283. threadIDs = new Set();
  24284. pingCache.set(thenable, threadIDs);
  24285. }
  24286. }
  24287. if (!threadIDs.has(renderExpirationTime)) {
  24288. // Memoize using the thread ID to prevent redundant listeners.
  24289. threadIDs.add(renderExpirationTime);
  24290. var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
  24291. thenable.then(ping, ping);
  24292. }
  24293. }
  24294. function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
  24295. // The source fiber did not complete.
  24296. sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.
  24297. sourceFiber.firstEffect = sourceFiber.lastEffect = null;
  24298. if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
  24299. // This is a thenable.
  24300. var thenable = value;
  24301. if ((sourceFiber.mode & BlockingMode) === NoMode) {
  24302. // Reset the memoizedState to what it was before we attempted
  24303. // to render it.
  24304. var currentSource = sourceFiber.alternate;
  24305. if (currentSource) {
  24306. sourceFiber.updateQueue = currentSource.updateQueue;
  24307. sourceFiber.memoizedState = currentSource.memoizedState;
  24308. sourceFiber.expirationTime = currentSource.expirationTime;
  24309. } else {
  24310. sourceFiber.updateQueue = null;
  24311. sourceFiber.memoizedState = null;
  24312. }
  24313. }
  24314. var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
  24315. var _workInProgress = returnFiber;
  24316. do {
  24317. if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
  24318. // Found the nearest boundary.
  24319. // Stash the promise on the boundary fiber. If the boundary times out, we'll
  24320. // attach another listener to flip the boundary back to its normal state.
  24321. var thenables = _workInProgress.updateQueue;
  24322. if (thenables === null) {
  24323. var updateQueue = new Set();
  24324. updateQueue.add(thenable);
  24325. _workInProgress.updateQueue = updateQueue;
  24326. } else {
  24327. thenables.add(thenable);
  24328. } // If the boundary is outside of blocking mode, we should *not*
  24329. // suspend the commit. Pretend as if the suspended component rendered
  24330. // null and keep rendering. In the commit phase, we'll schedule a
  24331. // subsequent synchronous update to re-render the Suspense.
  24332. //
  24333. // Note: It doesn't matter whether the component that suspended was
  24334. // inside a blocking mode tree. If the Suspense is outside of it, we
  24335. // should *not* suspend the commit.
  24336. if ((_workInProgress.mode & BlockingMode) === NoMode) {
  24337. _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.
  24338. // But we shouldn't call any lifecycle methods or callbacks. Remove
  24339. // all lifecycle effect tags.
  24340. sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);
  24341. if (sourceFiber.tag === ClassComponent) {
  24342. var currentSourceFiber = sourceFiber.alternate;
  24343. if (currentSourceFiber === null) {
  24344. // This is a new mount. Change the tag so it's not mistaken for a
  24345. // completed class component. For example, we should not call
  24346. // componentWillUnmount if it is deleted.
  24347. sourceFiber.tag = IncompleteClassComponent;
  24348. } else {
  24349. // When we try rendering again, we should not reuse the current fiber,
  24350. // since it's known to be in an inconsistent state. Use a force update to
  24351. // prevent a bail out.
  24352. var update = createUpdate(Sync, null);
  24353. update.tag = ForceUpdate;
  24354. enqueueUpdate(sourceFiber, update);
  24355. }
  24356. } // The source fiber did not complete. Mark it with Sync priority to
  24357. // indicate that it still has pending work.
  24358. sourceFiber.expirationTime = Sync; // Exit without suspending.
  24359. return;
  24360. } // Confirmed that the boundary is in a concurrent mode tree. Continue
  24361. // with the normal suspend path.
  24362. //
  24363. // After this we'll use a set of heuristics to determine whether this
  24364. // render pass will run to completion or restart or "suspend" the commit.
  24365. // The actual logic for this is spread out in different places.
  24366. //
  24367. // This first principle is that if we're going to suspend when we complete
  24368. // a root, then we should also restart if we get an update or ping that
  24369. // might unsuspend it, and vice versa. The only reason to suspend is
  24370. // because you think you might want to restart before committing. However,
  24371. // it doesn't make sense to restart only while in the period we're suspended.
  24372. //
  24373. // Restarting too aggressively is also not good because it starves out any
  24374. // intermediate loading state. So we use heuristics to determine when.
  24375. // Suspense Heuristics
  24376. //
  24377. // If nothing threw a Promise or all the same fallbacks are already showing,
  24378. // then don't suspend/restart.
  24379. //
  24380. // If this is an initial render of a new tree of Suspense boundaries and
  24381. // those trigger a fallback, then don't suspend/restart. We want to ensure
  24382. // that we can show the initial loading state as quickly as possible.
  24383. //
  24384. // If we hit a "Delayed" case, such as when we'd switch from content back into
  24385. // a fallback, then we should always suspend/restart. SuspenseConfig applies to
  24386. // this case. If none is defined, JND is used instead.
  24387. //
  24388. // If we're already showing a fallback and it gets "retried", allowing us to show
  24389. // another level, but there's still an inner boundary that would show a fallback,
  24390. // then we suspend/restart for 500ms since the last time we showed a fallback
  24391. // anywhere in the tree. This effectively throttles progressive loading into a
  24392. // consistent train of commits. This also gives us an opportunity to restart to
  24393. // get to the completed state slightly earlier.
  24394. //
  24395. // If there's ambiguity due to batching it's resolved in preference of:
  24396. // 1) "delayed", 2) "initial render", 3) "retry".
  24397. //
  24398. // We want to ensure that a "busy" state doesn't get force committed. We want to
  24399. // ensure that new initial loading states can commit as soon as possible.
  24400. attachPingListener(root, renderExpirationTime, thenable);
  24401. _workInProgress.effectTag |= ShouldCapture;
  24402. _workInProgress.expirationTime = renderExpirationTime;
  24403. return;
  24404. } // This boundary already captured during this render. Continue to the next
  24405. // boundary.
  24406. _workInProgress = _workInProgress.return;
  24407. } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
  24408. // TODO: Use invariant so the message is stripped in prod?
  24409. value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
  24410. } // We didn't find a boundary that could handle this type of exception. Start
  24411. // over and traverse parent path again, this time treating the exception
  24412. // as an error.
  24413. renderDidError();
  24414. value = createCapturedValue(value, sourceFiber);
  24415. var workInProgress = returnFiber;
  24416. do {
  24417. switch (workInProgress.tag) {
  24418. case HostRoot:
  24419. {
  24420. var _errorInfo = value;
  24421. workInProgress.effectTag |= ShouldCapture;
  24422. workInProgress.expirationTime = renderExpirationTime;
  24423. var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
  24424. enqueueCapturedUpdate(workInProgress, _update);
  24425. return;
  24426. }
  24427. case ClassComponent:
  24428. // Capture and retry
  24429. var errorInfo = value;
  24430. var ctor = workInProgress.type;
  24431. var instance = workInProgress.stateNode;
  24432. if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
  24433. workInProgress.effectTag |= ShouldCapture;
  24434. workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state
  24435. var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
  24436. enqueueCapturedUpdate(workInProgress, _update2);
  24437. return;
  24438. }
  24439. break;
  24440. }
  24441. workInProgress = workInProgress.return;
  24442. } while (workInProgress !== null);
  24443. }
  24444. var ceil = Math.ceil;
  24445. var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
  24446. ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
  24447. IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
  24448. var NoContext =
  24449. /* */
  24450. 0;
  24451. var BatchedContext =
  24452. /* */
  24453. 1;
  24454. var EventContext =
  24455. /* */
  24456. 2;
  24457. var DiscreteEventContext =
  24458. /* */
  24459. 4;
  24460. var LegacyUnbatchedContext =
  24461. /* */
  24462. 8;
  24463. var RenderContext =
  24464. /* */
  24465. 16;
  24466. var CommitContext =
  24467. /* */
  24468. 32;
  24469. var RootIncomplete = 0;
  24470. var RootFatalErrored = 1;
  24471. var RootErrored = 2;
  24472. var RootSuspended = 3;
  24473. var RootSuspendedWithDelay = 4;
  24474. var RootCompleted = 5;
  24475. // Describes where we are in the React execution stack
  24476. var executionContext = NoContext; // The root we're working on
  24477. var workInProgressRoot = null; // The fiber we're working on
  24478. var workInProgress = null; // The expiration time we're rendering
  24479. var renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.
  24480. var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
  24481. var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.
  24482. // This is conceptually a time stamp but expressed in terms of an ExpirationTime
  24483. // because we deal mostly with expiration times in the hot path, so this avoids
  24484. // the conversion happening in the hot path.
  24485. var workInProgressRootLatestProcessedExpirationTime = Sync;
  24486. var workInProgressRootLatestSuspenseTimeout = Sync;
  24487. var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only
  24488. // includes unprocessed updates, not work in bailed out children.
  24489. var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.
  24490. // This flag determines if it might be worthwhile to restart if an opportunity
  24491. // happens latere.
  24492. var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train
  24493. // model where we don't commit new loading states in too quick succession.
  24494. var globalMostRecentFallbackTime = 0;
  24495. var FALLBACK_THROTTLE_MS = 500;
  24496. var nextEffect = null;
  24497. var hasUncaughtError = false;
  24498. var firstUncaughtError = null;
  24499. var legacyErrorBoundariesThatAlreadyFailed = null;
  24500. var rootDoesHavePassiveEffects = false;
  24501. var rootWithPendingPassiveEffects = null;
  24502. var pendingPassiveEffectsRenderPriority = NoPriority;
  24503. var pendingPassiveEffectsExpirationTime = NoWork;
  24504. var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
  24505. var NESTED_UPDATE_LIMIT = 50;
  24506. var nestedUpdateCount = 0;
  24507. var rootWithNestedUpdates = null;
  24508. var NESTED_PASSIVE_UPDATE_LIMIT = 50;
  24509. var nestedPassiveUpdateCount = 0;
  24510. var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times
  24511. // during the commit phase. This enables them to be traced across components
  24512. // that spawn new work during render. E.g. hidden boundaries, suspended SSR
  24513. // hydration or SuspenseList.
  24514. var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start
  24515. // time). However, if two updates are scheduled within the same event, we
  24516. // should treat their start times as simultaneous, even if the actual clock
  24517. // time has advanced between the first and second call.
  24518. // In other words, because expiration times determine how updates are batched,
  24519. // we want all updates of like priority that occur within the same event to
  24520. // receive the same expiration time. Otherwise we get tearing.
  24521. var currentEventTime = NoWork;
  24522. function requestCurrentTimeForUpdate() {
  24523. if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
  24524. // We're inside React, so it's fine to read the actual time.
  24525. return msToExpirationTime(now());
  24526. } // We're not inside React, so we may be in the middle of a browser event.
  24527. if (currentEventTime !== NoWork) {
  24528. // Use the same start time for all updates until we enter React again.
  24529. return currentEventTime;
  24530. } // This is the first update since React yielded. Compute a new start time.
  24531. currentEventTime = msToExpirationTime(now());
  24532. return currentEventTime;
  24533. }
  24534. function getCurrentTime() {
  24535. return msToExpirationTime(now());
  24536. }
  24537. function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
  24538. var mode = fiber.mode;
  24539. if ((mode & BlockingMode) === NoMode) {
  24540. return Sync;
  24541. }
  24542. var priorityLevel = getCurrentPriorityLevel();
  24543. if ((mode & ConcurrentMode) === NoMode) {
  24544. return priorityLevel === ImmediatePriority ? Sync : Batched;
  24545. }
  24546. if ((executionContext & RenderContext) !== NoContext) {
  24547. // Use whatever time we're already rendering
  24548. // TODO: Should there be a way to opt out, like with `runWithPriority`?
  24549. return renderExpirationTime$1;
  24550. }
  24551. var expirationTime;
  24552. if (suspenseConfig !== null) {
  24553. // Compute an expiration time based on the Suspense timeout.
  24554. expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
  24555. } else {
  24556. // Compute an expiration time based on the Scheduler priority.
  24557. switch (priorityLevel) {
  24558. case ImmediatePriority:
  24559. expirationTime = Sync;
  24560. break;
  24561. case UserBlockingPriority$1:
  24562. // TODO: Rename this to computeUserBlockingExpiration
  24563. expirationTime = computeInteractiveExpiration(currentTime);
  24564. break;
  24565. case NormalPriority:
  24566. case LowPriority:
  24567. // TODO: Handle LowPriority
  24568. // TODO: Rename this to... something better.
  24569. expirationTime = computeAsyncExpiration(currentTime);
  24570. break;
  24571. case IdlePriority:
  24572. expirationTime = Idle;
  24573. break;
  24574. default:
  24575. {
  24576. {
  24577. throw Error( "Expected a valid priority level" );
  24578. }
  24579. }
  24580. }
  24581. } // If we're in the middle of rendering a tree, do not update at the same
  24582. // expiration time that is already rendering.
  24583. // TODO: We shouldn't have to do this if the update is on a different root.
  24584. // Refactor computeExpirationForFiber + scheduleUpdate so we have access to
  24585. // the root when we check for this condition.
  24586. if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {
  24587. // This is a trick to move this update into a separate batch
  24588. expirationTime -= 1;
  24589. }
  24590. return expirationTime;
  24591. }
  24592. function scheduleUpdateOnFiber(fiber, expirationTime) {
  24593. checkForNestedUpdates();
  24594. warnAboutRenderPhaseUpdatesInDEV(fiber);
  24595. var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
  24596. if (root === null) {
  24597. warnAboutUpdateOnUnmountedFiberInDEV(fiber);
  24598. return;
  24599. }
  24600. checkForInterruption(fiber, expirationTime);
  24601. recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the
  24602. // priority as an argument to that function and this one.
  24603. var priorityLevel = getCurrentPriorityLevel();
  24604. if (expirationTime === Sync) {
  24605. if ( // Check if we're inside unbatchedUpdates
  24606. (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
  24607. (executionContext & (RenderContext | CommitContext)) === NoContext) {
  24608. // Register pending interactions on the root to avoid losing traced interaction data.
  24609. schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
  24610. // root inside of batchedUpdates should be synchronous, but layout updates
  24611. // should be deferred until the end of the batch.
  24612. performSyncWorkOnRoot(root);
  24613. } else {
  24614. ensureRootIsScheduled(root);
  24615. schedulePendingInteractions(root, expirationTime);
  24616. if (executionContext === NoContext) {
  24617. // Flush the synchronous work now, unless we're already working or inside
  24618. // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
  24619. // scheduleCallbackForFiber to preserve the ability to schedule a callback
  24620. // without immediately flushing it. We only do this for user-initiated
  24621. // updates, to preserve historical behavior of legacy mode.
  24622. flushSyncCallbackQueue();
  24623. }
  24624. }
  24625. } else {
  24626. ensureRootIsScheduled(root);
  24627. schedulePendingInteractions(root, expirationTime);
  24628. }
  24629. if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
  24630. // discrete, even inside a discrete event.
  24631. priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {
  24632. // This is the result of a discrete event. Track the lowest priority
  24633. // discrete update per root so we can flush them early, if needed.
  24634. if (rootsWithPendingDiscreteUpdates === null) {
  24635. rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);
  24636. } else {
  24637. var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);
  24638. if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {
  24639. rootsWithPendingDiscreteUpdates.set(root, expirationTime);
  24640. }
  24641. }
  24642. }
  24643. }
  24644. var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending
  24645. // work without treating it as a typical update that originates from an event;
  24646. // e.g. retrying a Suspense boundary isn't an update, but it does schedule work
  24647. // on a fiber.
  24648. function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
  24649. // Update the source fiber's expiration time
  24650. if (fiber.expirationTime < expirationTime) {
  24651. fiber.expirationTime = expirationTime;
  24652. }
  24653. var alternate = fiber.alternate;
  24654. if (alternate !== null && alternate.expirationTime < expirationTime) {
  24655. alternate.expirationTime = expirationTime;
  24656. } // Walk the parent path to the root and update the child expiration time.
  24657. var node = fiber.return;
  24658. var root = null;
  24659. if (node === null && fiber.tag === HostRoot) {
  24660. root = fiber.stateNode;
  24661. } else {
  24662. while (node !== null) {
  24663. alternate = node.alternate;
  24664. if (node.childExpirationTime < expirationTime) {
  24665. node.childExpirationTime = expirationTime;
  24666. if (alternate !== null && alternate.childExpirationTime < expirationTime) {
  24667. alternate.childExpirationTime = expirationTime;
  24668. }
  24669. } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
  24670. alternate.childExpirationTime = expirationTime;
  24671. }
  24672. if (node.return === null && node.tag === HostRoot) {
  24673. root = node.stateNode;
  24674. break;
  24675. }
  24676. node = node.return;
  24677. }
  24678. }
  24679. if (root !== null) {
  24680. if (workInProgressRoot === root) {
  24681. // Received an update to a tree that's in the middle of rendering. Mark
  24682. // that's unprocessed work on this root.
  24683. markUnprocessedUpdateTime(expirationTime);
  24684. if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
  24685. // The root already suspended with a delay, which means this render
  24686. // definitely won't finish. Since we have a new update, let's mark it as
  24687. // suspended now, right before marking the incoming update. This has the
  24688. // effect of interrupting the current render and switching to the update.
  24689. // TODO: This happens to work when receiving an update during the render
  24690. // phase, because of the trick inside computeExpirationForFiber to
  24691. // subtract 1 from `renderExpirationTime` to move it into a
  24692. // separate bucket. But we should probably model it with an exception,
  24693. // using the same mechanism we use to force hydration of a subtree.
  24694. // TODO: This does not account for low pri updates that were already
  24695. // scheduled before the root started rendering. Need to track the next
  24696. // pending expiration time (perhaps by backtracking the return path) and
  24697. // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.
  24698. markRootSuspendedAtTime(root, renderExpirationTime$1);
  24699. }
  24700. } // Mark that the root has a pending update.
  24701. markRootUpdatedAtTime(root, expirationTime);
  24702. }
  24703. return root;
  24704. }
  24705. function getNextRootExpirationTimeToWorkOn(root) {
  24706. // Determines the next expiration time that the root should render, taking
  24707. // into account levels that may be suspended, or levels that may have
  24708. // received a ping.
  24709. var lastExpiredTime = root.lastExpiredTime;
  24710. if (lastExpiredTime !== NoWork) {
  24711. return lastExpiredTime;
  24712. } // "Pending" refers to any update that hasn't committed yet, including if it
  24713. // suspended. The "suspended" range is therefore a subset.
  24714. var firstPendingTime = root.firstPendingTime;
  24715. if (!isRootSuspendedAtTime(root, firstPendingTime)) {
  24716. // The highest priority pending time is not suspended. Let's work on that.
  24717. return firstPendingTime;
  24718. } // If the first pending time is suspended, check if there's a lower priority
  24719. // pending level that we know about. Or check if we received a ping. Work
  24720. // on whichever is higher priority.
  24721. var lastPingedTime = root.lastPingedTime;
  24722. var nextKnownPendingLevel = root.nextKnownPendingLevel;
  24723. var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;
  24724. if ( nextLevel <= Idle && firstPendingTime !== nextLevel) {
  24725. // Don't work on Idle/Never priority unless everything else is committed.
  24726. return NoWork;
  24727. }
  24728. return nextLevel;
  24729. } // Use this function to schedule a task for a root. There's only one task per
  24730. // root; if a task was already scheduled, we'll check to make sure the
  24731. // expiration time of the existing task is the same as the expiration time of
  24732. // the next level that the root has work on. This function is called on every
  24733. // update, and right before exiting a task.
  24734. function ensureRootIsScheduled(root) {
  24735. var lastExpiredTime = root.lastExpiredTime;
  24736. if (lastExpiredTime !== NoWork) {
  24737. // Special case: Expired work should flush synchronously.
  24738. root.callbackExpirationTime = Sync;
  24739. root.callbackPriority = ImmediatePriority;
  24740. root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
  24741. return;
  24742. }
  24743. var expirationTime = getNextRootExpirationTimeToWorkOn(root);
  24744. var existingCallbackNode = root.callbackNode;
  24745. if (expirationTime === NoWork) {
  24746. // There's nothing to work on.
  24747. if (existingCallbackNode !== null) {
  24748. root.callbackNode = null;
  24749. root.callbackExpirationTime = NoWork;
  24750. root.callbackPriority = NoPriority;
  24751. }
  24752. return;
  24753. } // TODO: If this is an update, we already read the current time. Pass the
  24754. // time as an argument.
  24755. var currentTime = requestCurrentTimeForUpdate();
  24756. var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and
  24757. // expiration time. Otherwise, we'll cancel it and schedule a new one.
  24758. if (existingCallbackNode !== null) {
  24759. var existingCallbackPriority = root.callbackPriority;
  24760. var existingCallbackExpirationTime = root.callbackExpirationTime;
  24761. if ( // Callback must have the exact same expiration time.
  24762. existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.
  24763. existingCallbackPriority >= priorityLevel) {
  24764. // Existing callback is sufficient.
  24765. return;
  24766. } // Need to schedule a new task.
  24767. // TODO: Instead of scheduling a new task, we should be able to change the
  24768. // priority of the existing one.
  24769. cancelCallback(existingCallbackNode);
  24770. }
  24771. root.callbackExpirationTime = expirationTime;
  24772. root.callbackPriority = priorityLevel;
  24773. var callbackNode;
  24774. if (expirationTime === Sync) {
  24775. // Sync React callbacks are scheduled on a special internal queue
  24776. callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
  24777. } else {
  24778. callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects
  24779. // ordering because tasks are processed in timeout order.
  24780. {
  24781. timeout: expirationTimeToMs(expirationTime) - now()
  24782. });
  24783. }
  24784. root.callbackNode = callbackNode;
  24785. } // This is the entry point for every concurrent task, i.e. anything that
  24786. // goes through Scheduler.
  24787. function performConcurrentWorkOnRoot(root, didTimeout) {
  24788. // Since we know we're in a React event, we can clear the current
  24789. // event time. The next update will compute a new event time.
  24790. currentEventTime = NoWork;
  24791. if (didTimeout) {
  24792. // The render task took too long to complete. Mark the current time as
  24793. // expired to synchronously render all expired work in a single batch.
  24794. var currentTime = requestCurrentTimeForUpdate();
  24795. markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.
  24796. ensureRootIsScheduled(root);
  24797. return null;
  24798. } // Determine the next expiration time to work on, using the fields stored
  24799. // on the root.
  24800. var expirationTime = getNextRootExpirationTimeToWorkOn(root);
  24801. if (expirationTime !== NoWork) {
  24802. var originalCallbackNode = root.callbackNode;
  24803. if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
  24804. {
  24805. throw Error( "Should not already be working." );
  24806. }
  24807. }
  24808. flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
  24809. // and prepare a fresh one. Otherwise we'll continue where we left off.
  24810. if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
  24811. prepareFreshStack(root, expirationTime);
  24812. startWorkOnPendingInteractions(root, expirationTime);
  24813. } // If we have a work-in-progress fiber, it means there's still work to do
  24814. // in this root.
  24815. if (workInProgress !== null) {
  24816. var prevExecutionContext = executionContext;
  24817. executionContext |= RenderContext;
  24818. var prevDispatcher = pushDispatcher();
  24819. var prevInteractions = pushInteractions(root);
  24820. startWorkLoopTimer(workInProgress);
  24821. do {
  24822. try {
  24823. workLoopConcurrent();
  24824. break;
  24825. } catch (thrownValue) {
  24826. handleError(root, thrownValue);
  24827. }
  24828. } while (true);
  24829. resetContextDependencies();
  24830. executionContext = prevExecutionContext;
  24831. popDispatcher(prevDispatcher);
  24832. {
  24833. popInteractions(prevInteractions);
  24834. }
  24835. if (workInProgressRootExitStatus === RootFatalErrored) {
  24836. var fatalError = workInProgressRootFatalError;
  24837. stopInterruptedWorkLoopTimer();
  24838. prepareFreshStack(root, expirationTime);
  24839. markRootSuspendedAtTime(root, expirationTime);
  24840. ensureRootIsScheduled(root);
  24841. throw fatalError;
  24842. }
  24843. if (workInProgress !== null) {
  24844. // There's still work left over. Exit without committing.
  24845. stopInterruptedWorkLoopTimer();
  24846. } else {
  24847. // We now have a consistent tree. The next step is either to commit it,
  24848. // or, if something suspended, wait to commit it after a timeout.
  24849. stopFinishedWorkLoopTimer();
  24850. var finishedWork = root.finishedWork = root.current.alternate;
  24851. root.finishedExpirationTime = expirationTime;
  24852. finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);
  24853. }
  24854. ensureRootIsScheduled(root);
  24855. if (root.callbackNode === originalCallbackNode) {
  24856. // The task node scheduled for this root is the same one that's
  24857. // currently executed. Need to return a continuation.
  24858. return performConcurrentWorkOnRoot.bind(null, root);
  24859. }
  24860. }
  24861. }
  24862. return null;
  24863. }
  24864. function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {
  24865. // Set this to null to indicate there's no in-progress render.
  24866. workInProgressRoot = null;
  24867. switch (exitStatus) {
  24868. case RootIncomplete:
  24869. case RootFatalErrored:
  24870. {
  24871. {
  24872. {
  24873. throw Error( "Root did not complete. This is a bug in React." );
  24874. }
  24875. }
  24876. }
  24877. // Flow knows about invariant, so it complains if I add a break
  24878. // statement, but eslint doesn't know about invariant, so it complains
  24879. // if I do. eslint-disable-next-line no-fallthrough
  24880. case RootErrored:
  24881. {
  24882. // If this was an async render, the error may have happened due to
  24883. // a mutation in a concurrent event. Try rendering one more time,
  24884. // synchronously, to see if the error goes away. If there are
  24885. // lower priority updates, let's include those, too, in case they
  24886. // fix the inconsistency. Render at Idle to include all updates.
  24887. // If it was Idle or Never or some not-yet-invented time, render
  24888. // at that time.
  24889. markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous
  24890. // and therefore not hit this path again.
  24891. break;
  24892. }
  24893. case RootSuspended:
  24894. {
  24895. markRootSuspendedAtTime(root, expirationTime);
  24896. var lastSuspendedTime = root.lastSuspendedTime;
  24897. if (expirationTime === lastSuspendedTime) {
  24898. root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
  24899. } // We have an acceptable loading state. We need to figure out if we
  24900. // should immediately commit it or wait a bit.
  24901. // If we have processed new updates during this render, we may now
  24902. // have a new loading state ready. We want to ensure that we commit
  24903. // that as soon as possible.
  24904. var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;
  24905. if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope
  24906. !( IsThisRendererActing.current)) {
  24907. // If we have not processed any new updates during this pass, then
  24908. // this is either a retry of an existing fallback state or a
  24909. // hidden tree. Hidden trees shouldn't be batched with other work
  24910. // and after that's fixed it can only be a retry. We're going to
  24911. // throttle committing retries so that we don't show too many
  24912. // loading states too quickly.
  24913. var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
  24914. if (msUntilTimeout > 10) {
  24915. if (workInProgressRootHasPendingPing) {
  24916. var lastPingedTime = root.lastPingedTime;
  24917. if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {
  24918. // This render was pinged but we didn't get to restart
  24919. // earlier so try restarting now instead.
  24920. root.lastPingedTime = expirationTime;
  24921. prepareFreshStack(root, expirationTime);
  24922. break;
  24923. }
  24924. }
  24925. var nextTime = getNextRootExpirationTimeToWorkOn(root);
  24926. if (nextTime !== NoWork && nextTime !== expirationTime) {
  24927. // There's additional work on this root.
  24928. break;
  24929. }
  24930. if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {
  24931. // We should prefer to render the fallback of at the last
  24932. // suspended level. Ping the last suspended level to try
  24933. // rendering it again.
  24934. root.lastPingedTime = lastSuspendedTime;
  24935. break;
  24936. } // The render is suspended, it hasn't timed out, and there's no
  24937. // lower priority work to do. Instead of committing the fallback
  24938. // immediately, wait for more data to arrive.
  24939. root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
  24940. break;
  24941. }
  24942. } // The work expired. Commit immediately.
  24943. commitRoot(root);
  24944. break;
  24945. }
  24946. case RootSuspendedWithDelay:
  24947. {
  24948. markRootSuspendedAtTime(root, expirationTime);
  24949. var _lastSuspendedTime = root.lastSuspendedTime;
  24950. if (expirationTime === _lastSuspendedTime) {
  24951. root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
  24952. }
  24953. if ( // do not delay if we're inside an act() scope
  24954. !( IsThisRendererActing.current)) {
  24955. // We're suspended in a state that should be avoided. We'll try to
  24956. // avoid committing it for as long as the timeouts let us.
  24957. if (workInProgressRootHasPendingPing) {
  24958. var _lastPingedTime = root.lastPingedTime;
  24959. if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {
  24960. // This render was pinged but we didn't get to restart earlier
  24961. // so try restarting now instead.
  24962. root.lastPingedTime = expirationTime;
  24963. prepareFreshStack(root, expirationTime);
  24964. break;
  24965. }
  24966. }
  24967. var _nextTime = getNextRootExpirationTimeToWorkOn(root);
  24968. if (_nextTime !== NoWork && _nextTime !== expirationTime) {
  24969. // There's additional work on this root.
  24970. break;
  24971. }
  24972. if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {
  24973. // We should prefer to render the fallback of at the last
  24974. // suspended level. Ping the last suspended level to try
  24975. // rendering it again.
  24976. root.lastPingedTime = _lastSuspendedTime;
  24977. break;
  24978. }
  24979. var _msUntilTimeout;
  24980. if (workInProgressRootLatestSuspenseTimeout !== Sync) {
  24981. // We have processed a suspense config whose expiration time we
  24982. // can use as the timeout.
  24983. _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();
  24984. } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {
  24985. // This should never normally happen because only new updates
  24986. // cause delayed states, so we should have processed something.
  24987. // However, this could also happen in an offscreen tree.
  24988. _msUntilTimeout = 0;
  24989. } else {
  24990. // If we don't have a suspense config, we're going to use a
  24991. // heuristic to determine how long we can suspend.
  24992. var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);
  24993. var currentTimeMs = now();
  24994. var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;
  24995. var timeElapsed = currentTimeMs - eventTimeMs;
  24996. if (timeElapsed < 0) {
  24997. // We get this wrong some time since we estimate the time.
  24998. timeElapsed = 0;
  24999. }
  25000. _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the
  25001. // event time is exact instead of inferred from expiration time
  25002. // we don't need this.
  25003. if (timeUntilExpirationMs < _msUntilTimeout) {
  25004. _msUntilTimeout = timeUntilExpirationMs;
  25005. }
  25006. } // Don't bother with a very short suspense time.
  25007. if (_msUntilTimeout > 10) {
  25008. // The render is suspended, it hasn't timed out, and there's no
  25009. // lower priority work to do. Instead of committing the fallback
  25010. // immediately, wait for more data to arrive.
  25011. root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
  25012. break;
  25013. }
  25014. } // The work expired. Commit immediately.
  25015. commitRoot(root);
  25016. break;
  25017. }
  25018. case RootCompleted:
  25019. {
  25020. // The work completed. Ready to commit.
  25021. if ( // do not delay if we're inside an act() scope
  25022. !( IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {
  25023. // If we have exceeded the minimum loading delay, which probably
  25024. // means we have shown a spinner already, we might have to suspend
  25025. // a bit longer to ensure that the spinner is shown for
  25026. // enough time.
  25027. var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);
  25028. if (_msUntilTimeout2 > 10) {
  25029. markRootSuspendedAtTime(root, expirationTime);
  25030. root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);
  25031. break;
  25032. }
  25033. }
  25034. commitRoot(root);
  25035. break;
  25036. }
  25037. default:
  25038. {
  25039. {
  25040. {
  25041. throw Error( "Unknown root exit status." );
  25042. }
  25043. }
  25044. }
  25045. }
  25046. } // This is the entry point for synchronous tasks that don't go
  25047. // through Scheduler
  25048. function performSyncWorkOnRoot(root) {
  25049. // Check if there's expired work on this root. Otherwise, render at Sync.
  25050. var lastExpiredTime = root.lastExpiredTime;
  25051. var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;
  25052. if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
  25053. {
  25054. throw Error( "Should not already be working." );
  25055. }
  25056. }
  25057. flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
  25058. // and prepare a fresh one. Otherwise we'll continue where we left off.
  25059. if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
  25060. prepareFreshStack(root, expirationTime);
  25061. startWorkOnPendingInteractions(root, expirationTime);
  25062. } // If we have a work-in-progress fiber, it means there's still work to do
  25063. // in this root.
  25064. if (workInProgress !== null) {
  25065. var prevExecutionContext = executionContext;
  25066. executionContext |= RenderContext;
  25067. var prevDispatcher = pushDispatcher();
  25068. var prevInteractions = pushInteractions(root);
  25069. startWorkLoopTimer(workInProgress);
  25070. do {
  25071. try {
  25072. workLoopSync();
  25073. break;
  25074. } catch (thrownValue) {
  25075. handleError(root, thrownValue);
  25076. }
  25077. } while (true);
  25078. resetContextDependencies();
  25079. executionContext = prevExecutionContext;
  25080. popDispatcher(prevDispatcher);
  25081. {
  25082. popInteractions(prevInteractions);
  25083. }
  25084. if (workInProgressRootExitStatus === RootFatalErrored) {
  25085. var fatalError = workInProgressRootFatalError;
  25086. stopInterruptedWorkLoopTimer();
  25087. prepareFreshStack(root, expirationTime);
  25088. markRootSuspendedAtTime(root, expirationTime);
  25089. ensureRootIsScheduled(root);
  25090. throw fatalError;
  25091. }
  25092. if (workInProgress !== null) {
  25093. // This is a sync render, so we should have finished the whole tree.
  25094. {
  25095. {
  25096. throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
  25097. }
  25098. }
  25099. } else {
  25100. // We now have a consistent tree. Because this is a sync render, we
  25101. // will commit it even if something suspended.
  25102. stopFinishedWorkLoopTimer();
  25103. root.finishedWork = root.current.alternate;
  25104. root.finishedExpirationTime = expirationTime;
  25105. finishSyncRender(root);
  25106. } // Before exiting, make sure there's a callback scheduled for the next
  25107. // pending level.
  25108. ensureRootIsScheduled(root);
  25109. }
  25110. return null;
  25111. }
  25112. function finishSyncRender(root) {
  25113. // Set this to null to indicate there's no in-progress render.
  25114. workInProgressRoot = null;
  25115. commitRoot(root);
  25116. }
  25117. function flushDiscreteUpdates() {
  25118. // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
  25119. // However, `act` uses `batchedUpdates`, so there's no way to distinguish
  25120. // those two cases. Need to fix this before exposing flushDiscreteUpdates
  25121. // as a public API.
  25122. if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
  25123. {
  25124. if ((executionContext & RenderContext) !== NoContext) {
  25125. error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
  25126. }
  25127. } // We're already rendering, so we can't synchronously flush pending work.
  25128. // This is probably a nested event dispatch triggered by a lifecycle/effect,
  25129. // like `el.focus()`. Exit.
  25130. return;
  25131. }
  25132. flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that
  25133. // they fire before the next serial event.
  25134. flushPassiveEffects();
  25135. }
  25136. function syncUpdates(fn, a, b, c) {
  25137. return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));
  25138. }
  25139. function flushPendingDiscreteUpdates() {
  25140. if (rootsWithPendingDiscreteUpdates !== null) {
  25141. // For each root with pending discrete updates, schedule a callback to
  25142. // immediately flush them.
  25143. var roots = rootsWithPendingDiscreteUpdates;
  25144. rootsWithPendingDiscreteUpdates = null;
  25145. roots.forEach(function (expirationTime, root) {
  25146. markRootExpiredAtTime(root, expirationTime);
  25147. ensureRootIsScheduled(root);
  25148. }); // Now flush the immediate queue.
  25149. flushSyncCallbackQueue();
  25150. }
  25151. }
  25152. function batchedUpdates$1(fn, a) {
  25153. var prevExecutionContext = executionContext;
  25154. executionContext |= BatchedContext;
  25155. try {
  25156. return fn(a);
  25157. } finally {
  25158. executionContext = prevExecutionContext;
  25159. if (executionContext === NoContext) {
  25160. // Flush the immediate callbacks that were scheduled during this batch
  25161. flushSyncCallbackQueue();
  25162. }
  25163. }
  25164. }
  25165. function batchedEventUpdates$1(fn, a) {
  25166. var prevExecutionContext = executionContext;
  25167. executionContext |= EventContext;
  25168. try {
  25169. return fn(a);
  25170. } finally {
  25171. executionContext = prevExecutionContext;
  25172. if (executionContext === NoContext) {
  25173. // Flush the immediate callbacks that were scheduled during this batch
  25174. flushSyncCallbackQueue();
  25175. }
  25176. }
  25177. }
  25178. function discreteUpdates$1(fn, a, b, c, d) {
  25179. var prevExecutionContext = executionContext;
  25180. executionContext |= DiscreteEventContext;
  25181. try {
  25182. // Should this
  25183. return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));
  25184. } finally {
  25185. executionContext = prevExecutionContext;
  25186. if (executionContext === NoContext) {
  25187. // Flush the immediate callbacks that were scheduled during this batch
  25188. flushSyncCallbackQueue();
  25189. }
  25190. }
  25191. }
  25192. function unbatchedUpdates(fn, a) {
  25193. var prevExecutionContext = executionContext;
  25194. executionContext &= ~BatchedContext;
  25195. executionContext |= LegacyUnbatchedContext;
  25196. try {
  25197. return fn(a);
  25198. } finally {
  25199. executionContext = prevExecutionContext;
  25200. if (executionContext === NoContext) {
  25201. // Flush the immediate callbacks that were scheduled during this batch
  25202. flushSyncCallbackQueue();
  25203. }
  25204. }
  25205. }
  25206. function flushSync(fn, a) {
  25207. if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
  25208. {
  25209. {
  25210. throw Error( "flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering." );
  25211. }
  25212. }
  25213. }
  25214. var prevExecutionContext = executionContext;
  25215. executionContext |= BatchedContext;
  25216. try {
  25217. return runWithPriority$1(ImmediatePriority, fn.bind(null, a));
  25218. } finally {
  25219. executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
  25220. // Note that this will happen even if batchedUpdates is higher up
  25221. // the stack.
  25222. flushSyncCallbackQueue();
  25223. }
  25224. }
  25225. function prepareFreshStack(root, expirationTime) {
  25226. root.finishedWork = null;
  25227. root.finishedExpirationTime = NoWork;
  25228. var timeoutHandle = root.timeoutHandle;
  25229. if (timeoutHandle !== noTimeout) {
  25230. // The root previous suspended and scheduled a timeout to commit a fallback
  25231. // state. Now that we have additional work, cancel the timeout.
  25232. root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
  25233. cancelTimeout(timeoutHandle);
  25234. }
  25235. if (workInProgress !== null) {
  25236. var interruptedWork = workInProgress.return;
  25237. while (interruptedWork !== null) {
  25238. unwindInterruptedWork(interruptedWork);
  25239. interruptedWork = interruptedWork.return;
  25240. }
  25241. }
  25242. workInProgressRoot = root;
  25243. workInProgress = createWorkInProgress(root.current, null);
  25244. renderExpirationTime$1 = expirationTime;
  25245. workInProgressRootExitStatus = RootIncomplete;
  25246. workInProgressRootFatalError = null;
  25247. workInProgressRootLatestProcessedExpirationTime = Sync;
  25248. workInProgressRootLatestSuspenseTimeout = Sync;
  25249. workInProgressRootCanSuspendUsingConfig = null;
  25250. workInProgressRootNextUnprocessedUpdateTime = NoWork;
  25251. workInProgressRootHasPendingPing = false;
  25252. {
  25253. spawnedWorkDuringRender = null;
  25254. }
  25255. {
  25256. ReactStrictModeWarnings.discardPendingWarnings();
  25257. }
  25258. }
  25259. function handleError(root, thrownValue) {
  25260. do {
  25261. try {
  25262. // Reset module-level state that was set during the render phase.
  25263. resetContextDependencies();
  25264. resetHooksAfterThrow();
  25265. resetCurrentFiber();
  25266. if (workInProgress === null || workInProgress.return === null) {
  25267. // Expected to be working on a non-root fiber. This is a fatal error
  25268. // because there's no ancestor that can handle it; the root is
  25269. // supposed to capture all errors that weren't caught by an error
  25270. // boundary.
  25271. workInProgressRootExitStatus = RootFatalErrored;
  25272. workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
  25273. // sibling, or the parent if there are no siblings. But since the root
  25274. // has no siblings nor a parent, we set it to null. Usually this is
  25275. // handled by `completeUnitOfWork` or `unwindWork`, but since we're
  25276. // interntionally not calling those, we need set it here.
  25277. // TODO: Consider calling `unwindWork` to pop the contexts.
  25278. workInProgress = null;
  25279. return null;
  25280. }
  25281. if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
  25282. // Record the time spent rendering before an error was thrown. This
  25283. // avoids inaccurate Profiler durations in the case of a
  25284. // suspended render.
  25285. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
  25286. }
  25287. throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);
  25288. workInProgress = completeUnitOfWork(workInProgress);
  25289. } catch (yetAnotherThrownValue) {
  25290. // Something in the return path also threw.
  25291. thrownValue = yetAnotherThrownValue;
  25292. continue;
  25293. } // Return to the normal work loop.
  25294. return;
  25295. } while (true);
  25296. }
  25297. function pushDispatcher(root) {
  25298. var prevDispatcher = ReactCurrentDispatcher$1.current;
  25299. ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
  25300. if (prevDispatcher === null) {
  25301. // The React isomorphic package does not include a default dispatcher.
  25302. // Instead the first renderer will lazily attach one, in order to give
  25303. // nicer error messages.
  25304. return ContextOnlyDispatcher;
  25305. } else {
  25306. return prevDispatcher;
  25307. }
  25308. }
  25309. function popDispatcher(prevDispatcher) {
  25310. ReactCurrentDispatcher$1.current = prevDispatcher;
  25311. }
  25312. function pushInteractions(root) {
  25313. {
  25314. var prevInteractions = tracing.__interactionsRef.current;
  25315. tracing.__interactionsRef.current = root.memoizedInteractions;
  25316. return prevInteractions;
  25317. }
  25318. }
  25319. function popInteractions(prevInteractions) {
  25320. {
  25321. tracing.__interactionsRef.current = prevInteractions;
  25322. }
  25323. }
  25324. function markCommitTimeOfFallback() {
  25325. globalMostRecentFallbackTime = now();
  25326. }
  25327. function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
  25328. if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {
  25329. workInProgressRootLatestProcessedExpirationTime = expirationTime;
  25330. }
  25331. if (suspenseConfig !== null) {
  25332. if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {
  25333. workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.
  25334. workInProgressRootCanSuspendUsingConfig = suspenseConfig;
  25335. }
  25336. }
  25337. }
  25338. function markUnprocessedUpdateTime(expirationTime) {
  25339. if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {
  25340. workInProgressRootNextUnprocessedUpdateTime = expirationTime;
  25341. }
  25342. }
  25343. function renderDidSuspend() {
  25344. if (workInProgressRootExitStatus === RootIncomplete) {
  25345. workInProgressRootExitStatus = RootSuspended;
  25346. }
  25347. }
  25348. function renderDidSuspendDelayIfPossible() {
  25349. if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
  25350. workInProgressRootExitStatus = RootSuspendedWithDelay;
  25351. } // Check if there's a lower priority update somewhere else in the tree.
  25352. if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {
  25353. // Mark the current render as suspended, and then mark that there's a
  25354. // pending update.
  25355. // TODO: This should immediately interrupt the current render, instead
  25356. // of waiting until the next time we yield.
  25357. markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);
  25358. markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);
  25359. }
  25360. }
  25361. function renderDidError() {
  25362. if (workInProgressRootExitStatus !== RootCompleted) {
  25363. workInProgressRootExitStatus = RootErrored;
  25364. }
  25365. } // Called during render to determine if anything has suspended.
  25366. // Returns false if we're not sure.
  25367. function renderHasNotSuspendedYet() {
  25368. // If something errored or completed, we can't really be sure,
  25369. // so those are false.
  25370. return workInProgressRootExitStatus === RootIncomplete;
  25371. }
  25372. function inferTimeFromExpirationTime(expirationTime) {
  25373. // We don't know exactly when the update was scheduled, but we can infer an
  25374. // approximate start time from the expiration time.
  25375. var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
  25376. return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
  25377. }
  25378. function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {
  25379. // We don't know exactly when the update was scheduled, but we can infer an
  25380. // approximate start time from the expiration time by subtracting the timeout
  25381. // that was added to the event time.
  25382. var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
  25383. return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
  25384. } // The work loop is an extremely hot path. Tell Closure not to inline it.
  25385. /** @noinline */
  25386. function workLoopSync() {
  25387. // Already timed out, so perform work without checking if we need to yield.
  25388. while (workInProgress !== null) {
  25389. workInProgress = performUnitOfWork(workInProgress);
  25390. }
  25391. }
  25392. /** @noinline */
  25393. function workLoopConcurrent() {
  25394. // Perform work until Scheduler asks us to yield
  25395. while (workInProgress !== null && !shouldYield()) {
  25396. workInProgress = performUnitOfWork(workInProgress);
  25397. }
  25398. }
  25399. function performUnitOfWork(unitOfWork) {
  25400. // The current, flushed, state of this fiber is the alternate. Ideally
  25401. // nothing should rely on this, but relying on it here means that we don't
  25402. // need an additional field on the work in progress.
  25403. var current = unitOfWork.alternate;
  25404. startWorkTimer(unitOfWork);
  25405. setCurrentFiber(unitOfWork);
  25406. var next;
  25407. if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
  25408. startProfilerTimer(unitOfWork);
  25409. next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
  25410. stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
  25411. } else {
  25412. next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
  25413. }
  25414. resetCurrentFiber();
  25415. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  25416. if (next === null) {
  25417. // If this doesn't spawn new work, complete the current work.
  25418. next = completeUnitOfWork(unitOfWork);
  25419. }
  25420. ReactCurrentOwner$2.current = null;
  25421. return next;
  25422. }
  25423. function completeUnitOfWork(unitOfWork) {
  25424. // Attempt to complete the current unit of work, then move to the next
  25425. // sibling. If there are no more siblings, return to the parent fiber.
  25426. workInProgress = unitOfWork;
  25427. do {
  25428. // The current, flushed, state of this fiber is the alternate. Ideally
  25429. // nothing should rely on this, but relying on it here means that we don't
  25430. // need an additional field on the work in progress.
  25431. var current = workInProgress.alternate;
  25432. var returnFiber = workInProgress.return; // Check if the work completed or if something threw.
  25433. if ((workInProgress.effectTag & Incomplete) === NoEffect) {
  25434. setCurrentFiber(workInProgress);
  25435. var next = void 0;
  25436. if ( (workInProgress.mode & ProfileMode) === NoMode) {
  25437. next = completeWork(current, workInProgress, renderExpirationTime$1);
  25438. } else {
  25439. startProfilerTimer(workInProgress);
  25440. next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.
  25441. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
  25442. }
  25443. stopWorkTimer(workInProgress);
  25444. resetCurrentFiber();
  25445. resetChildExpirationTime(workInProgress);
  25446. if (next !== null) {
  25447. // Completing this fiber spawned new work. Work on that next.
  25448. return next;
  25449. }
  25450. if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
  25451. (returnFiber.effectTag & Incomplete) === NoEffect) {
  25452. // Append all the effects of the subtree and this fiber onto the effect
  25453. // list of the parent. The completion order of the children affects the
  25454. // side-effect order.
  25455. if (returnFiber.firstEffect === null) {
  25456. returnFiber.firstEffect = workInProgress.firstEffect;
  25457. }
  25458. if (workInProgress.lastEffect !== null) {
  25459. if (returnFiber.lastEffect !== null) {
  25460. returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
  25461. }
  25462. returnFiber.lastEffect = workInProgress.lastEffect;
  25463. } // If this fiber had side-effects, we append it AFTER the children's
  25464. // side-effects. We can perform certain side-effects earlier if needed,
  25465. // by doing multiple passes over the effect list. We don't want to
  25466. // schedule our own side-effect on our own list because if end up
  25467. // reusing children we'll schedule this effect onto itself since we're
  25468. // at the end.
  25469. var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect
  25470. // list. PerformedWork effect is read by React DevTools but shouldn't be
  25471. // committed.
  25472. if (effectTag > PerformedWork) {
  25473. if (returnFiber.lastEffect !== null) {
  25474. returnFiber.lastEffect.nextEffect = workInProgress;
  25475. } else {
  25476. returnFiber.firstEffect = workInProgress;
  25477. }
  25478. returnFiber.lastEffect = workInProgress;
  25479. }
  25480. }
  25481. } else {
  25482. // This fiber did not complete because something threw. Pop values off
  25483. // the stack without entering the complete phase. If this is a boundary,
  25484. // capture values if possible.
  25485. var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.
  25486. if ( (workInProgress.mode & ProfileMode) !== NoMode) {
  25487. // Record the render duration for the fiber that errored.
  25488. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing.
  25489. var actualDuration = workInProgress.actualDuration;
  25490. var child = workInProgress.child;
  25491. while (child !== null) {
  25492. actualDuration += child.actualDuration;
  25493. child = child.sibling;
  25494. }
  25495. workInProgress.actualDuration = actualDuration;
  25496. }
  25497. if (_next !== null) {
  25498. // If completing this work spawned new work, do that next. We'll come
  25499. // back here again.
  25500. // Since we're restarting, remove anything that is not a host effect
  25501. // from the effect tag.
  25502. // TODO: The name stopFailedWorkTimer is misleading because Suspense
  25503. // also captures and restarts.
  25504. stopFailedWorkTimer(workInProgress);
  25505. _next.effectTag &= HostEffectMask;
  25506. return _next;
  25507. }
  25508. stopWorkTimer(workInProgress);
  25509. if (returnFiber !== null) {
  25510. // Mark the parent fiber as incomplete and clear its effect list.
  25511. returnFiber.firstEffect = returnFiber.lastEffect = null;
  25512. returnFiber.effectTag |= Incomplete;
  25513. }
  25514. }
  25515. var siblingFiber = workInProgress.sibling;
  25516. if (siblingFiber !== null) {
  25517. // If there is more work to do in this returnFiber, do that next.
  25518. return siblingFiber;
  25519. } // Otherwise, return to the parent
  25520. workInProgress = returnFiber;
  25521. } while (workInProgress !== null); // We've reached the root.
  25522. if (workInProgressRootExitStatus === RootIncomplete) {
  25523. workInProgressRootExitStatus = RootCompleted;
  25524. }
  25525. return null;
  25526. }
  25527. function getRemainingExpirationTime(fiber) {
  25528. var updateExpirationTime = fiber.expirationTime;
  25529. var childExpirationTime = fiber.childExpirationTime;
  25530. return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime;
  25531. }
  25532. function resetChildExpirationTime(completedWork) {
  25533. if (renderExpirationTime$1 !== Never && completedWork.childExpirationTime === Never) {
  25534. // The children of this component are hidden. Don't bubble their
  25535. // expiration times.
  25536. return;
  25537. }
  25538. var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time.
  25539. if ( (completedWork.mode & ProfileMode) !== NoMode) {
  25540. // In profiling mode, resetChildExpirationTime is also used to reset
  25541. // profiler durations.
  25542. var actualDuration = completedWork.actualDuration;
  25543. var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will
  25544. // only be updated if work is done on the fiber (i.e. it doesn't bailout).
  25545. // When work is done, it should bubble to the parent's actualDuration. If
  25546. // the fiber has not been cloned though, (meaning no work was done), then
  25547. // this value will reflect the amount of time spent working on a previous
  25548. // render. In that case it should not bubble. We determine whether it was
  25549. // cloned by comparing the child pointer.
  25550. var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;
  25551. var child = completedWork.child;
  25552. while (child !== null) {
  25553. var childUpdateExpirationTime = child.expirationTime;
  25554. var childChildExpirationTime = child.childExpirationTime;
  25555. if (childUpdateExpirationTime > newChildExpirationTime) {
  25556. newChildExpirationTime = childUpdateExpirationTime;
  25557. }
  25558. if (childChildExpirationTime > newChildExpirationTime) {
  25559. newChildExpirationTime = childChildExpirationTime;
  25560. }
  25561. if (shouldBubbleActualDurations) {
  25562. actualDuration += child.actualDuration;
  25563. }
  25564. treeBaseDuration += child.treeBaseDuration;
  25565. child = child.sibling;
  25566. }
  25567. completedWork.actualDuration = actualDuration;
  25568. completedWork.treeBaseDuration = treeBaseDuration;
  25569. } else {
  25570. var _child = completedWork.child;
  25571. while (_child !== null) {
  25572. var _childUpdateExpirationTime = _child.expirationTime;
  25573. var _childChildExpirationTime = _child.childExpirationTime;
  25574. if (_childUpdateExpirationTime > newChildExpirationTime) {
  25575. newChildExpirationTime = _childUpdateExpirationTime;
  25576. }
  25577. if (_childChildExpirationTime > newChildExpirationTime) {
  25578. newChildExpirationTime = _childChildExpirationTime;
  25579. }
  25580. _child = _child.sibling;
  25581. }
  25582. }
  25583. completedWork.childExpirationTime = newChildExpirationTime;
  25584. }
  25585. function commitRoot(root) {
  25586. var renderPriorityLevel = getCurrentPriorityLevel();
  25587. runWithPriority$1(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));
  25588. return null;
  25589. }
  25590. function commitRootImpl(root, renderPriorityLevel) {
  25591. do {
  25592. // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
  25593. // means `flushPassiveEffects` will sometimes result in additional
  25594. // passive effects. So we need to keep flushing in a loop until there are
  25595. // no more pending effects.
  25596. // TODO: Might be better if `flushPassiveEffects` did not automatically
  25597. // flush synchronous work at the end, to avoid factoring hazards like this.
  25598. flushPassiveEffects();
  25599. } while (rootWithPendingPassiveEffects !== null);
  25600. flushRenderPhaseStrictModeWarningsInDEV();
  25601. if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
  25602. {
  25603. throw Error( "Should not already be working." );
  25604. }
  25605. }
  25606. var finishedWork = root.finishedWork;
  25607. var expirationTime = root.finishedExpirationTime;
  25608. if (finishedWork === null) {
  25609. return null;
  25610. }
  25611. root.finishedWork = null;
  25612. root.finishedExpirationTime = NoWork;
  25613. if (!(finishedWork !== root.current)) {
  25614. {
  25615. throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." );
  25616. }
  25617. } // commitRoot never returns a continuation; it always finishes synchronously.
  25618. // So we can clear these now to allow a new callback to be scheduled.
  25619. root.callbackNode = null;
  25620. root.callbackExpirationTime = NoWork;
  25621. root.callbackPriority = NoPriority;
  25622. root.nextKnownPendingLevel = NoWork;
  25623. startCommitTimer(); // Update the first and last pending times on this root. The new first
  25624. // pending time is whatever is left on the root fiber.
  25625. var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork);
  25626. markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit);
  25627. if (root === workInProgressRoot) {
  25628. // We can reset these now that they are finished.
  25629. workInProgressRoot = null;
  25630. workInProgress = null;
  25631. renderExpirationTime$1 = NoWork;
  25632. } // This indicates that the last root we worked on is not the same one that
  25633. // we're committing now. This most commonly happens when a suspended root
  25634. // times out.
  25635. // Get the list of effects.
  25636. var firstEffect;
  25637. if (finishedWork.effectTag > PerformedWork) {
  25638. // A fiber's effect list consists only of its children, not itself. So if
  25639. // the root has an effect, we need to add it to the end of the list. The
  25640. // resulting list is the set that would belong to the root's parent, if it
  25641. // had one; that is, all the effects in the tree including the root.
  25642. if (finishedWork.lastEffect !== null) {
  25643. finishedWork.lastEffect.nextEffect = finishedWork;
  25644. firstEffect = finishedWork.firstEffect;
  25645. } else {
  25646. firstEffect = finishedWork;
  25647. }
  25648. } else {
  25649. // There is no effect on the root.
  25650. firstEffect = finishedWork.firstEffect;
  25651. }
  25652. if (firstEffect !== null) {
  25653. var prevExecutionContext = executionContext;
  25654. executionContext |= CommitContext;
  25655. var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles
  25656. ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
  25657. // of the effect list for each phase: all mutation effects come before all
  25658. // layout effects, and so on.
  25659. // The first phase a "before mutation" phase. We use this phase to read the
  25660. // state of the host tree right before we mutate it. This is where
  25661. // getSnapshotBeforeUpdate is called.
  25662. startCommitSnapshotEffectsTimer();
  25663. prepareForCommit(root.containerInfo);
  25664. nextEffect = firstEffect;
  25665. do {
  25666. {
  25667. invokeGuardedCallback(null, commitBeforeMutationEffects, null);
  25668. if (hasCaughtError()) {
  25669. if (!(nextEffect !== null)) {
  25670. {
  25671. throw Error( "Should be working on an effect." );
  25672. }
  25673. }
  25674. var error = clearCaughtError();
  25675. captureCommitPhaseError(nextEffect, error);
  25676. nextEffect = nextEffect.nextEffect;
  25677. }
  25678. }
  25679. } while (nextEffect !== null);
  25680. stopCommitSnapshotEffectsTimer();
  25681. {
  25682. // Mark the current commit time to be shared by all Profilers in this
  25683. // batch. This enables them to be grouped later.
  25684. recordCommitTime();
  25685. } // The next phase is the mutation phase, where we mutate the host tree.
  25686. startCommitHostEffectsTimer();
  25687. nextEffect = firstEffect;
  25688. do {
  25689. {
  25690. invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);
  25691. if (hasCaughtError()) {
  25692. if (!(nextEffect !== null)) {
  25693. {
  25694. throw Error( "Should be working on an effect." );
  25695. }
  25696. }
  25697. var _error = clearCaughtError();
  25698. captureCommitPhaseError(nextEffect, _error);
  25699. nextEffect = nextEffect.nextEffect;
  25700. }
  25701. }
  25702. } while (nextEffect !== null);
  25703. stopCommitHostEffectsTimer();
  25704. resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
  25705. // the mutation phase, so that the previous tree is still current during
  25706. // componentWillUnmount, but before the layout phase, so that the finished
  25707. // work is current during componentDidMount/Update.
  25708. root.current = finishedWork; // The next phase is the layout phase, where we call effects that read
  25709. // the host tree after it's been mutated. The idiomatic use case for this is
  25710. // layout, but class component lifecycles also fire here for legacy reasons.
  25711. startCommitLifeCyclesTimer();
  25712. nextEffect = firstEffect;
  25713. do {
  25714. {
  25715. invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);
  25716. if (hasCaughtError()) {
  25717. if (!(nextEffect !== null)) {
  25718. {
  25719. throw Error( "Should be working on an effect." );
  25720. }
  25721. }
  25722. var _error2 = clearCaughtError();
  25723. captureCommitPhaseError(nextEffect, _error2);
  25724. nextEffect = nextEffect.nextEffect;
  25725. }
  25726. }
  25727. } while (nextEffect !== null);
  25728. stopCommitLifeCyclesTimer();
  25729. nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
  25730. // opportunity to paint.
  25731. requestPaint();
  25732. {
  25733. popInteractions(prevInteractions);
  25734. }
  25735. executionContext = prevExecutionContext;
  25736. } else {
  25737. // No effects.
  25738. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
  25739. // no effects.
  25740. // TODO: Maybe there's a better way to report this.
  25741. startCommitSnapshotEffectsTimer();
  25742. stopCommitSnapshotEffectsTimer();
  25743. {
  25744. recordCommitTime();
  25745. }
  25746. startCommitHostEffectsTimer();
  25747. stopCommitHostEffectsTimer();
  25748. startCommitLifeCyclesTimer();
  25749. stopCommitLifeCyclesTimer();
  25750. }
  25751. stopCommitTimer();
  25752. var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
  25753. if (rootDoesHavePassiveEffects) {
  25754. // This commit has passive effects. Stash a reference to them. But don't
  25755. // schedule a callback until after flushing layout work.
  25756. rootDoesHavePassiveEffects = false;
  25757. rootWithPendingPassiveEffects = root;
  25758. pendingPassiveEffectsExpirationTime = expirationTime;
  25759. pendingPassiveEffectsRenderPriority = renderPriorityLevel;
  25760. } else {
  25761. // We are done with the effect chain at this point so let's clear the
  25762. // nextEffect pointers to assist with GC. If we have passive effects, we'll
  25763. // clear this in flushPassiveEffects.
  25764. nextEffect = firstEffect;
  25765. while (nextEffect !== null) {
  25766. var nextNextEffect = nextEffect.nextEffect;
  25767. nextEffect.nextEffect = null;
  25768. nextEffect = nextNextEffect;
  25769. }
  25770. } // Check if there's remaining work on this root
  25771. var remainingExpirationTime = root.firstPendingTime;
  25772. if (remainingExpirationTime !== NoWork) {
  25773. {
  25774. if (spawnedWorkDuringRender !== null) {
  25775. var expirationTimes = spawnedWorkDuringRender;
  25776. spawnedWorkDuringRender = null;
  25777. for (var i = 0; i < expirationTimes.length; i++) {
  25778. scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
  25779. }
  25780. }
  25781. schedulePendingInteractions(root, remainingExpirationTime);
  25782. }
  25783. } else {
  25784. // If there's no remaining work, we can clear the set of already failed
  25785. // error boundaries.
  25786. legacyErrorBoundariesThatAlreadyFailed = null;
  25787. }
  25788. {
  25789. if (!rootDidHavePassiveEffects) {
  25790. // If there are no passive effects, then we can complete the pending interactions.
  25791. // Otherwise, we'll wait until after the passive effects are flushed.
  25792. // Wait to do this until after remaining work has been scheduled,
  25793. // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
  25794. finishPendingInteractions(root, expirationTime);
  25795. }
  25796. }
  25797. if (remainingExpirationTime === Sync) {
  25798. // Count the number of times the root synchronously re-renders without
  25799. // finishing. If there are too many, it indicates an infinite update loop.
  25800. if (root === rootWithNestedUpdates) {
  25801. nestedUpdateCount++;
  25802. } else {
  25803. nestedUpdateCount = 0;
  25804. rootWithNestedUpdates = root;
  25805. }
  25806. } else {
  25807. nestedUpdateCount = 0;
  25808. }
  25809. onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any
  25810. // additional work on this root is scheduled.
  25811. ensureRootIsScheduled(root);
  25812. if (hasUncaughtError) {
  25813. hasUncaughtError = false;
  25814. var _error3 = firstUncaughtError;
  25815. firstUncaughtError = null;
  25816. throw _error3;
  25817. }
  25818. if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
  25819. // This is a legacy edge case. We just committed the initial mount of
  25820. // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
  25821. // synchronously, but layout updates should be deferred until the end
  25822. // of the batch.
  25823. return null;
  25824. } // If layout work was scheduled, flush it now.
  25825. flushSyncCallbackQueue();
  25826. return null;
  25827. }
  25828. function commitBeforeMutationEffects() {
  25829. while (nextEffect !== null) {
  25830. var effectTag = nextEffect.effectTag;
  25831. if ((effectTag & Snapshot) !== NoEffect) {
  25832. setCurrentFiber(nextEffect);
  25833. recordEffect();
  25834. var current = nextEffect.alternate;
  25835. commitBeforeMutationLifeCycles(current, nextEffect);
  25836. resetCurrentFiber();
  25837. }
  25838. if ((effectTag & Passive) !== NoEffect) {
  25839. // If there are passive effects, schedule a callback to flush at
  25840. // the earliest opportunity.
  25841. if (!rootDoesHavePassiveEffects) {
  25842. rootDoesHavePassiveEffects = true;
  25843. scheduleCallback(NormalPriority, function () {
  25844. flushPassiveEffects();
  25845. return null;
  25846. });
  25847. }
  25848. }
  25849. nextEffect = nextEffect.nextEffect;
  25850. }
  25851. }
  25852. function commitMutationEffects(root, renderPriorityLevel) {
  25853. // TODO: Should probably move the bulk of this function to commitWork.
  25854. while (nextEffect !== null) {
  25855. setCurrentFiber(nextEffect);
  25856. var effectTag = nextEffect.effectTag;
  25857. if (effectTag & ContentReset) {
  25858. commitResetTextContent(nextEffect);
  25859. }
  25860. if (effectTag & Ref) {
  25861. var current = nextEffect.alternate;
  25862. if (current !== null) {
  25863. commitDetachRef(current);
  25864. }
  25865. } // The following switch statement is only concerned about placement,
  25866. // updates, and deletions. To avoid needing to add a case for every possible
  25867. // bitmap value, we remove the secondary effects from the effect tag and
  25868. // switch on that value.
  25869. var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating);
  25870. switch (primaryEffectTag) {
  25871. case Placement:
  25872. {
  25873. commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
  25874. // inserted, before any life-cycles like componentDidMount gets called.
  25875. // TODO: findDOMNode doesn't rely on this any more but isMounted does
  25876. // and isMounted is deprecated anyway so we should be able to kill this.
  25877. nextEffect.effectTag &= ~Placement;
  25878. break;
  25879. }
  25880. case PlacementAndUpdate:
  25881. {
  25882. // Placement
  25883. commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
  25884. // inserted, before any life-cycles like componentDidMount gets called.
  25885. nextEffect.effectTag &= ~Placement; // Update
  25886. var _current = nextEffect.alternate;
  25887. commitWork(_current, nextEffect);
  25888. break;
  25889. }
  25890. case Hydrating:
  25891. {
  25892. nextEffect.effectTag &= ~Hydrating;
  25893. break;
  25894. }
  25895. case HydratingAndUpdate:
  25896. {
  25897. nextEffect.effectTag &= ~Hydrating; // Update
  25898. var _current2 = nextEffect.alternate;
  25899. commitWork(_current2, nextEffect);
  25900. break;
  25901. }
  25902. case Update:
  25903. {
  25904. var _current3 = nextEffect.alternate;
  25905. commitWork(_current3, nextEffect);
  25906. break;
  25907. }
  25908. case Deletion:
  25909. {
  25910. commitDeletion(root, nextEffect, renderPriorityLevel);
  25911. break;
  25912. }
  25913. } // TODO: Only record a mutation effect if primaryEffectTag is non-zero.
  25914. recordEffect();
  25915. resetCurrentFiber();
  25916. nextEffect = nextEffect.nextEffect;
  25917. }
  25918. }
  25919. function commitLayoutEffects(root, committedExpirationTime) {
  25920. // TODO: Should probably move the bulk of this function to commitWork.
  25921. while (nextEffect !== null) {
  25922. setCurrentFiber(nextEffect);
  25923. var effectTag = nextEffect.effectTag;
  25924. if (effectTag & (Update | Callback)) {
  25925. recordEffect();
  25926. var current = nextEffect.alternate;
  25927. commitLifeCycles(root, current, nextEffect);
  25928. }
  25929. if (effectTag & Ref) {
  25930. recordEffect();
  25931. commitAttachRef(nextEffect);
  25932. }
  25933. resetCurrentFiber();
  25934. nextEffect = nextEffect.nextEffect;
  25935. }
  25936. }
  25937. function flushPassiveEffects() {
  25938. if (pendingPassiveEffectsRenderPriority !== NoPriority) {
  25939. var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority ? NormalPriority : pendingPassiveEffectsRenderPriority;
  25940. pendingPassiveEffectsRenderPriority = NoPriority;
  25941. return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
  25942. }
  25943. }
  25944. function flushPassiveEffectsImpl() {
  25945. if (rootWithPendingPassiveEffects === null) {
  25946. return false;
  25947. }
  25948. var root = rootWithPendingPassiveEffects;
  25949. var expirationTime = pendingPassiveEffectsExpirationTime;
  25950. rootWithPendingPassiveEffects = null;
  25951. pendingPassiveEffectsExpirationTime = NoWork;
  25952. if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
  25953. {
  25954. throw Error( "Cannot flush passive effects while already rendering." );
  25955. }
  25956. }
  25957. var prevExecutionContext = executionContext;
  25958. executionContext |= CommitContext;
  25959. var prevInteractions = pushInteractions(root);
  25960. {
  25961. // Note: This currently assumes there are no passive effects on the root fiber
  25962. // because the root is not part of its own effect list.
  25963. // This could change in the future.
  25964. var _effect2 = root.current.firstEffect;
  25965. while (_effect2 !== null) {
  25966. {
  25967. setCurrentFiber(_effect2);
  25968. invokeGuardedCallback(null, commitPassiveHookEffects, null, _effect2);
  25969. if (hasCaughtError()) {
  25970. if (!(_effect2 !== null)) {
  25971. {
  25972. throw Error( "Should be working on an effect." );
  25973. }
  25974. }
  25975. var _error5 = clearCaughtError();
  25976. captureCommitPhaseError(_effect2, _error5);
  25977. }
  25978. resetCurrentFiber();
  25979. }
  25980. var nextNextEffect = _effect2.nextEffect; // Remove nextEffect pointer to assist GC
  25981. _effect2.nextEffect = null;
  25982. _effect2 = nextNextEffect;
  25983. }
  25984. }
  25985. {
  25986. popInteractions(prevInteractions);
  25987. finishPendingInteractions(root, expirationTime);
  25988. }
  25989. executionContext = prevExecutionContext;
  25990. flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this
  25991. // exceeds the limit, we'll fire a warning.
  25992. nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
  25993. return true;
  25994. }
  25995. function isAlreadyFailedLegacyErrorBoundary(instance) {
  25996. return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
  25997. }
  25998. function markLegacyErrorBoundaryAsFailed(instance) {
  25999. if (legacyErrorBoundariesThatAlreadyFailed === null) {
  26000. legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
  26001. } else {
  26002. legacyErrorBoundariesThatAlreadyFailed.add(instance);
  26003. }
  26004. }
  26005. function prepareToThrowUncaughtError(error) {
  26006. if (!hasUncaughtError) {
  26007. hasUncaughtError = true;
  26008. firstUncaughtError = error;
  26009. }
  26010. }
  26011. var onUncaughtError = prepareToThrowUncaughtError;
  26012. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  26013. var errorInfo = createCapturedValue(error, sourceFiber);
  26014. var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);
  26015. enqueueUpdate(rootFiber, update);
  26016. var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);
  26017. if (root !== null) {
  26018. ensureRootIsScheduled(root);
  26019. schedulePendingInteractions(root, Sync);
  26020. }
  26021. }
  26022. function captureCommitPhaseError(sourceFiber, error) {
  26023. if (sourceFiber.tag === HostRoot) {
  26024. // Error was thrown at the root. There is no parent, so the root
  26025. // itself should capture it.
  26026. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  26027. return;
  26028. }
  26029. var fiber = sourceFiber.return;
  26030. while (fiber !== null) {
  26031. if (fiber.tag === HostRoot) {
  26032. captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
  26033. return;
  26034. } else if (fiber.tag === ClassComponent) {
  26035. var ctor = fiber.type;
  26036. var instance = fiber.stateNode;
  26037. if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
  26038. var errorInfo = createCapturedValue(error, sourceFiber);
  26039. var update = createClassErrorUpdate(fiber, errorInfo, // TODO: This is always sync
  26040. Sync);
  26041. enqueueUpdate(fiber, update);
  26042. var root = markUpdateTimeFromFiberToRoot(fiber, Sync);
  26043. if (root !== null) {
  26044. ensureRootIsScheduled(root);
  26045. schedulePendingInteractions(root, Sync);
  26046. }
  26047. return;
  26048. }
  26049. }
  26050. fiber = fiber.return;
  26051. }
  26052. }
  26053. function pingSuspendedRoot(root, thenable, suspendedTime) {
  26054. var pingCache = root.pingCache;
  26055. if (pingCache !== null) {
  26056. // The thenable resolved, so we no longer need to memoize, because it will
  26057. // never be thrown again.
  26058. pingCache.delete(thenable);
  26059. }
  26060. if (workInProgressRoot === root && renderExpirationTime$1 === suspendedTime) {
  26061. // Received a ping at the same priority level at which we're currently
  26062. // rendering. We might want to restart this render. This should mirror
  26063. // the logic of whether or not a root suspends once it completes.
  26064. // TODO: If we're rendering sync either due to Sync, Batched or expired,
  26065. // we should probably never restart.
  26066. // If we're suspended with delay, we'll always suspend so we can always
  26067. // restart. If we're suspended without any updates, it might be a retry.
  26068. // If it's early in the retry we can restart. We can't know for sure
  26069. // whether we'll eventually process an update during this render pass,
  26070. // but it's somewhat unlikely that we get to a ping before that, since
  26071. // getting to the root most update is usually very fast.
  26072. if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
  26073. // Restart from the root. Don't need to schedule a ping because
  26074. // we're already working on this tree.
  26075. prepareFreshStack(root, renderExpirationTime$1);
  26076. } else {
  26077. // Even though we can't restart right now, we might get an
  26078. // opportunity later. So we mark this render as having a ping.
  26079. workInProgressRootHasPendingPing = true;
  26080. }
  26081. return;
  26082. }
  26083. if (!isRootSuspendedAtTime(root, suspendedTime)) {
  26084. // The root is no longer suspended at this time.
  26085. return;
  26086. }
  26087. var lastPingedTime = root.lastPingedTime;
  26088. if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) {
  26089. // There's already a lower priority ping scheduled.
  26090. return;
  26091. } // Mark the time at which this ping was scheduled.
  26092. root.lastPingedTime = suspendedTime;
  26093. ensureRootIsScheduled(root);
  26094. schedulePendingInteractions(root, suspendedTime);
  26095. }
  26096. function retryTimedOutBoundary(boundaryFiber, retryTime) {
  26097. // The boundary fiber (a Suspense component or SuspenseList component)
  26098. // previously was rendered in its fallback state. One of the promises that
  26099. // suspended it has resolved, which means at least part of the tree was
  26100. // likely unblocked. Try rendering again, at a new expiration time.
  26101. if (retryTime === NoWork) {
  26102. var suspenseConfig = null; // Retries don't carry over the already committed update.
  26103. var currentTime = requestCurrentTimeForUpdate();
  26104. retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);
  26105. } // TODO: Special case idle priority?
  26106. var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);
  26107. if (root !== null) {
  26108. ensureRootIsScheduled(root);
  26109. schedulePendingInteractions(root, retryTime);
  26110. }
  26111. }
  26112. function resolveRetryThenable(boundaryFiber, thenable) {
  26113. var retryTime = NoWork; // Default
  26114. var retryCache;
  26115. {
  26116. retryCache = boundaryFiber.stateNode;
  26117. }
  26118. if (retryCache !== null) {
  26119. // The thenable resolved, so we no longer need to memoize, because it will
  26120. // never be thrown again.
  26121. retryCache.delete(thenable);
  26122. }
  26123. retryTimedOutBoundary(boundaryFiber, retryTime);
  26124. } // Computes the next Just Noticeable Difference (JND) boundary.
  26125. // The theory is that a person can't tell the difference between small differences in time.
  26126. // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
  26127. // difference in the experience. However, waiting for longer might mean that we can avoid
  26128. // showing an intermediate loading state. The longer we have already waited, the harder it
  26129. // is to tell small differences in time. Therefore, the longer we've already waited,
  26130. // the longer we can wait additionally. At some point we have to give up though.
  26131. // We pick a train model where the next boundary commits at a consistent schedule.
  26132. // These particular numbers are vague estimates. We expect to adjust them based on research.
  26133. function jnd(timeElapsed) {
  26134. return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
  26135. }
  26136. function computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {
  26137. var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;
  26138. if (busyMinDurationMs <= 0) {
  26139. return 0;
  26140. }
  26141. var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire.
  26142. var currentTimeMs = now();
  26143. var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);
  26144. var timeElapsed = currentTimeMs - eventTimeMs;
  26145. if (timeElapsed <= busyDelayMs) {
  26146. // If we haven't yet waited longer than the initial delay, we don't
  26147. // have to wait any additional time.
  26148. return 0;
  26149. }
  26150. var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`.
  26151. return msUntilTimeout;
  26152. }
  26153. function checkForNestedUpdates() {
  26154. if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
  26155. nestedUpdateCount = 0;
  26156. rootWithNestedUpdates = null;
  26157. {
  26158. {
  26159. throw Error( "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." );
  26160. }
  26161. }
  26162. }
  26163. {
  26164. if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
  26165. nestedPassiveUpdateCount = 0;
  26166. error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
  26167. }
  26168. }
  26169. }
  26170. function flushRenderPhaseStrictModeWarningsInDEV() {
  26171. {
  26172. ReactStrictModeWarnings.flushLegacyContextWarning();
  26173. {
  26174. ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
  26175. }
  26176. }
  26177. }
  26178. function stopFinishedWorkLoopTimer() {
  26179. var didCompleteRoot = true;
  26180. stopWorkLoopTimer(interruptedBy, didCompleteRoot);
  26181. interruptedBy = null;
  26182. }
  26183. function stopInterruptedWorkLoopTimer() {
  26184. // TODO: Track which fiber caused the interruption.
  26185. var didCompleteRoot = false;
  26186. stopWorkLoopTimer(interruptedBy, didCompleteRoot);
  26187. interruptedBy = null;
  26188. }
  26189. function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {
  26190. if ( workInProgressRoot !== null && updateExpirationTime > renderExpirationTime$1) {
  26191. interruptedBy = fiberThatReceivedUpdate;
  26192. }
  26193. }
  26194. var didWarnStateUpdateForUnmountedComponent = null;
  26195. function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
  26196. {
  26197. var tag = fiber.tag;
  26198. if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
  26199. // Only warn for user-defined components, not internal ones like Suspense.
  26200. return;
  26201. }
  26202. // the problematic code almost always lies inside that component.
  26203. var componentName = getComponentName(fiber.type) || 'ReactComponent';
  26204. if (didWarnStateUpdateForUnmountedComponent !== null) {
  26205. if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
  26206. return;
  26207. }
  26208. didWarnStateUpdateForUnmountedComponent.add(componentName);
  26209. } else {
  26210. didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
  26211. }
  26212. error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
  26213. }
  26214. }
  26215. var beginWork$1;
  26216. {
  26217. var dummyFiber = null;
  26218. beginWork$1 = function (current, unitOfWork, expirationTime) {
  26219. // If a component throws an error, we replay it again in a synchronously
  26220. // dispatched event, so that the debugger will treat it as an uncaught
  26221. // error See ReactErrorUtils for more information.
  26222. // Before entering the begin phase, copy the work-in-progress onto a dummy
  26223. // fiber. If beginWork throws, we'll use this to reset the state.
  26224. var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
  26225. try {
  26226. return beginWork(current, unitOfWork, expirationTime);
  26227. } catch (originalError) {
  26228. if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
  26229. // Don't replay promises. Treat everything else like an error.
  26230. throw originalError;
  26231. } // Keep this code in sync with handleError; any changes here must have
  26232. // corresponding changes there.
  26233. resetContextDependencies();
  26234. resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
  26235. // same fiber again.
  26236. // Unwind the failed stack frame
  26237. unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.
  26238. assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
  26239. if ( unitOfWork.mode & ProfileMode) {
  26240. // Reset the profiler timer.
  26241. startProfilerTimer(unitOfWork);
  26242. } // Run beginWork again.
  26243. invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);
  26244. if (hasCaughtError()) {
  26245. var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
  26246. // Rethrow this error instead of the original one.
  26247. throw replayError;
  26248. } else {
  26249. // This branch is reachable if the render phase is impure.
  26250. throw originalError;
  26251. }
  26252. }
  26253. };
  26254. }
  26255. var didWarnAboutUpdateInRender = false;
  26256. var didWarnAboutUpdateInRenderForAnotherComponent;
  26257. {
  26258. didWarnAboutUpdateInRenderForAnotherComponent = new Set();
  26259. }
  26260. function warnAboutRenderPhaseUpdatesInDEV(fiber) {
  26261. {
  26262. if (isRendering && (executionContext & RenderContext) !== NoContext) {
  26263. switch (fiber.tag) {
  26264. case FunctionComponent:
  26265. case ForwardRef:
  26266. case SimpleMemoComponent:
  26267. {
  26268. var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.
  26269. var dedupeKey = renderingComponentName;
  26270. if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
  26271. didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
  26272. var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
  26273. error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
  26274. }
  26275. break;
  26276. }
  26277. case ClassComponent:
  26278. {
  26279. if (!didWarnAboutUpdateInRender) {
  26280. error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
  26281. didWarnAboutUpdateInRender = true;
  26282. }
  26283. break;
  26284. }
  26285. }
  26286. }
  26287. }
  26288. } // a 'shared' variable that changes when act() opens/closes in tests.
  26289. var IsThisRendererActing = {
  26290. current: false
  26291. };
  26292. function warnIfNotScopedWithMatchingAct(fiber) {
  26293. {
  26294. if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
  26295. error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + "import {act} from 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + "import TestRenderer from 'react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));
  26296. }
  26297. }
  26298. }
  26299. function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
  26300. {
  26301. if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
  26302. error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
  26303. }
  26304. }
  26305. }
  26306. function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
  26307. {
  26308. if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
  26309. error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
  26310. }
  26311. }
  26312. }
  26313. var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.
  26314. var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked
  26315. // scheduler is the actual recommendation. The alternative could be a testing build,
  26316. // a new lib, or whatever; we dunno just yet. This message is for early adopters
  26317. // to get their tests right.
  26318. function warnIfUnmockedScheduler(fiber) {
  26319. {
  26320. if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {
  26321. if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
  26322. didWarnAboutUnmockedScheduler = true;
  26323. error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
  26324. }
  26325. }
  26326. }
  26327. }
  26328. function computeThreadID(root, expirationTime) {
  26329. // Interaction threads are unique per root and expiration time.
  26330. return expirationTime * 1000 + root.interactionThreadID;
  26331. }
  26332. function markSpawnedWork(expirationTime) {
  26333. if (spawnedWorkDuringRender === null) {
  26334. spawnedWorkDuringRender = [expirationTime];
  26335. } else {
  26336. spawnedWorkDuringRender.push(expirationTime);
  26337. }
  26338. }
  26339. function scheduleInteractions(root, expirationTime, interactions) {
  26340. if (interactions.size > 0) {
  26341. var pendingInteractionMap = root.pendingInteractionMap;
  26342. var pendingInteractions = pendingInteractionMap.get(expirationTime);
  26343. if (pendingInteractions != null) {
  26344. interactions.forEach(function (interaction) {
  26345. if (!pendingInteractions.has(interaction)) {
  26346. // Update the pending async work count for previously unscheduled interaction.
  26347. interaction.__count++;
  26348. }
  26349. pendingInteractions.add(interaction);
  26350. });
  26351. } else {
  26352. pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions.
  26353. interactions.forEach(function (interaction) {
  26354. interaction.__count++;
  26355. });
  26356. }
  26357. var subscriber = tracing.__subscriberRef.current;
  26358. if (subscriber !== null) {
  26359. var threadID = computeThreadID(root, expirationTime);
  26360. subscriber.onWorkScheduled(interactions, threadID);
  26361. }
  26362. }
  26363. }
  26364. function schedulePendingInteractions(root, expirationTime) {
  26365. scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
  26366. }
  26367. function startWorkOnPendingInteractions(root, expirationTime) {
  26368. // we can accurately attribute time spent working on it, And so that cascading
  26369. // work triggered during the render phase will be associated with it.
  26370. var interactions = new Set();
  26371. root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
  26372. if (scheduledExpirationTime >= expirationTime) {
  26373. scheduledInteractions.forEach(function (interaction) {
  26374. return interactions.add(interaction);
  26375. });
  26376. }
  26377. }); // Store the current set of interactions on the FiberRoot for a few reasons:
  26378. // We can re-use it in hot functions like performConcurrentWorkOnRoot()
  26379. // without having to recalculate it. We will also use it in commitWork() to
  26380. // pass to any Profiler onRender() hooks. This also provides DevTools with a
  26381. // way to access it when the onCommitRoot() hook is called.
  26382. root.memoizedInteractions = interactions;
  26383. if (interactions.size > 0) {
  26384. var subscriber = tracing.__subscriberRef.current;
  26385. if (subscriber !== null) {
  26386. var threadID = computeThreadID(root, expirationTime);
  26387. try {
  26388. subscriber.onWorkStarted(interactions, threadID);
  26389. } catch (error) {
  26390. // If the subscriber throws, rethrow it in a separate task
  26391. scheduleCallback(ImmediatePriority, function () {
  26392. throw error;
  26393. });
  26394. }
  26395. }
  26396. }
  26397. }
  26398. function finishPendingInteractions(root, committedExpirationTime) {
  26399. var earliestRemainingTimeAfterCommit = root.firstPendingTime;
  26400. var subscriber;
  26401. try {
  26402. subscriber = tracing.__subscriberRef.current;
  26403. if (subscriber !== null && root.memoizedInteractions.size > 0) {
  26404. var threadID = computeThreadID(root, committedExpirationTime);
  26405. subscriber.onWorkStopped(root.memoizedInteractions, threadID);
  26406. }
  26407. } catch (error) {
  26408. // If the subscriber throws, rethrow it in a separate task
  26409. scheduleCallback(ImmediatePriority, function () {
  26410. throw error;
  26411. });
  26412. } finally {
  26413. // Clear completed interactions from the pending Map.
  26414. // Unless the render was suspended or cascading work was scheduled,
  26415. // In which case– leave pending interactions until the subsequent render.
  26416. var pendingInteractionMap = root.pendingInteractionMap;
  26417. pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
  26418. // Only decrement the pending interaction count if we're done.
  26419. // If there's still work at the current priority,
  26420. // That indicates that we are waiting for suspense data.
  26421. if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
  26422. pendingInteractionMap.delete(scheduledExpirationTime);
  26423. scheduledInteractions.forEach(function (interaction) {
  26424. interaction.__count--;
  26425. if (subscriber !== null && interaction.__count === 0) {
  26426. try {
  26427. subscriber.onInteractionScheduledWorkCompleted(interaction);
  26428. } catch (error) {
  26429. // If the subscriber throws, rethrow it in a separate task
  26430. scheduleCallback(ImmediatePriority, function () {
  26431. throw error;
  26432. });
  26433. }
  26434. }
  26435. });
  26436. }
  26437. });
  26438. }
  26439. }
  26440. var onScheduleFiberRoot = null;
  26441. var onCommitFiberRoot = null;
  26442. var onCommitFiberUnmount = null;
  26443. var hasLoggedError = false;
  26444. var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
  26445. function injectInternals(internals) {
  26446. if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
  26447. // No DevTools
  26448. return false;
  26449. }
  26450. var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  26451. if (hook.isDisabled) {
  26452. // This isn't a real property on the hook, but it can be set to opt out
  26453. // of DevTools integration and associated warnings and logs.
  26454. // https://github.com/facebook/react/issues/3877
  26455. return true;
  26456. }
  26457. if (!hook.supportsFiber) {
  26458. {
  26459. error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
  26460. } // DevTools exists, even though it doesn't support Fiber.
  26461. return true;
  26462. }
  26463. try {
  26464. var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
  26465. if (true) {
  26466. // Only used by Fast Refresh
  26467. if (typeof hook.onScheduleFiberRoot === 'function') {
  26468. onScheduleFiberRoot = function (root, children) {
  26469. try {
  26470. hook.onScheduleFiberRoot(rendererID, root, children);
  26471. } catch (err) {
  26472. if (true && !hasLoggedError) {
  26473. hasLoggedError = true;
  26474. error('React instrumentation encountered an error: %s', err);
  26475. }
  26476. }
  26477. };
  26478. }
  26479. }
  26480. onCommitFiberRoot = function (root, expirationTime) {
  26481. try {
  26482. var didError = (root.current.effectTag & DidCapture) === DidCapture;
  26483. if (enableProfilerTimer) {
  26484. var currentTime = getCurrentTime();
  26485. var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);
  26486. hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
  26487. } else {
  26488. hook.onCommitFiberRoot(rendererID, root, undefined, didError);
  26489. }
  26490. } catch (err) {
  26491. if (true) {
  26492. if (!hasLoggedError) {
  26493. hasLoggedError = true;
  26494. error('React instrumentation encountered an error: %s', err);
  26495. }
  26496. }
  26497. }
  26498. };
  26499. onCommitFiberUnmount = function (fiber) {
  26500. try {
  26501. hook.onCommitFiberUnmount(rendererID, fiber);
  26502. } catch (err) {
  26503. if (true) {
  26504. if (!hasLoggedError) {
  26505. hasLoggedError = true;
  26506. error('React instrumentation encountered an error: %s', err);
  26507. }
  26508. }
  26509. }
  26510. };
  26511. } catch (err) {
  26512. // Catch all errors because it is unsafe to throw during initialization.
  26513. {
  26514. error('React instrumentation encountered an error: %s.', err);
  26515. }
  26516. } // DevTools exists
  26517. return true;
  26518. }
  26519. function onScheduleRoot(root, children) {
  26520. if (typeof onScheduleFiberRoot === 'function') {
  26521. onScheduleFiberRoot(root, children);
  26522. }
  26523. }
  26524. function onCommitRoot(root, expirationTime) {
  26525. if (typeof onCommitFiberRoot === 'function') {
  26526. onCommitFiberRoot(root, expirationTime);
  26527. }
  26528. }
  26529. function onCommitUnmount(fiber) {
  26530. if (typeof onCommitFiberUnmount === 'function') {
  26531. onCommitFiberUnmount(fiber);
  26532. }
  26533. }
  26534. var hasBadMapPolyfill;
  26535. {
  26536. hasBadMapPolyfill = false;
  26537. try {
  26538. var nonExtensibleObject = Object.preventExtensions({});
  26539. var testMap = new Map([[nonExtensibleObject, null]]);
  26540. var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused.
  26541. // https://github.com/rollup/rollup/issues/1771
  26542. // TODO: we can remove these if Rollup fixes the bug.
  26543. testMap.set(0, 0);
  26544. testSet.add(0);
  26545. } catch (e) {
  26546. // TODO: Consider warning about bad polyfills
  26547. hasBadMapPolyfill = true;
  26548. }
  26549. }
  26550. var debugCounter = 1;
  26551. function FiberNode(tag, pendingProps, key, mode) {
  26552. // Instance
  26553. this.tag = tag;
  26554. this.key = key;
  26555. this.elementType = null;
  26556. this.type = null;
  26557. this.stateNode = null; // Fiber
  26558. this.return = null;
  26559. this.child = null;
  26560. this.sibling = null;
  26561. this.index = 0;
  26562. this.ref = null;
  26563. this.pendingProps = pendingProps;
  26564. this.memoizedProps = null;
  26565. this.updateQueue = null;
  26566. this.memoizedState = null;
  26567. this.dependencies = null;
  26568. this.mode = mode; // Effects
  26569. this.effectTag = NoEffect;
  26570. this.nextEffect = null;
  26571. this.firstEffect = null;
  26572. this.lastEffect = null;
  26573. this.expirationTime = NoWork;
  26574. this.childExpirationTime = NoWork;
  26575. this.alternate = null;
  26576. {
  26577. // Note: The following is done to avoid a v8 performance cliff.
  26578. //
  26579. // Initializing the fields below to smis and later updating them with
  26580. // double values will cause Fibers to end up having separate shapes.
  26581. // This behavior/bug has something to do with Object.preventExtension().
  26582. // Fortunately this only impacts DEV builds.
  26583. // Unfortunately it makes React unusably slow for some applications.
  26584. // To work around this, initialize the fields below with doubles.
  26585. //
  26586. // Learn more about this here:
  26587. // https://github.com/facebook/react/issues/14365
  26588. // https://bugs.chromium.org/p/v8/issues/detail?id=8538
  26589. this.actualDuration = Number.NaN;
  26590. this.actualStartTime = Number.NaN;
  26591. this.selfBaseDuration = Number.NaN;
  26592. this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
  26593. // This won't trigger the performance cliff mentioned above,
  26594. // and it simplifies other profiler code (including DevTools).
  26595. this.actualDuration = 0;
  26596. this.actualStartTime = -1;
  26597. this.selfBaseDuration = 0;
  26598. this.treeBaseDuration = 0;
  26599. } // This is normally DEV-only except www when it adds listeners.
  26600. // TODO: remove the User Timing integration in favor of Root Events.
  26601. {
  26602. this._debugID = debugCounter++;
  26603. this._debugIsCurrentlyTiming = false;
  26604. }
  26605. {
  26606. this._debugSource = null;
  26607. this._debugOwner = null;
  26608. this._debugNeedsRemount = false;
  26609. this._debugHookTypes = null;
  26610. if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
  26611. Object.preventExtensions(this);
  26612. }
  26613. }
  26614. } // This is a constructor function, rather than a POJO constructor, still
  26615. // please ensure we do the following:
  26616. // 1) Nobody should add any instance methods on this. Instance methods can be
  26617. // more difficult to predict when they get optimized and they are almost
  26618. // never inlined properly in static compilers.
  26619. // 2) Nobody should rely on `instanceof Fiber` for type testing. We should
  26620. // always know when it is a fiber.
  26621. // 3) We might want to experiment with using numeric keys since they are easier
  26622. // to optimize in a non-JIT environment.
  26623. // 4) We can easily go from a constructor to a createFiber object literal if that
  26624. // is faster.
  26625. // 5) It should be easy to port this to a C struct and keep a C implementation
  26626. // compatible.
  26627. var createFiber = function (tag, pendingProps, key, mode) {
  26628. // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
  26629. return new FiberNode(tag, pendingProps, key, mode);
  26630. };
  26631. function shouldConstruct(Component) {
  26632. var prototype = Component.prototype;
  26633. return !!(prototype && prototype.isReactComponent);
  26634. }
  26635. function isSimpleFunctionComponent(type) {
  26636. return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
  26637. }
  26638. function resolveLazyComponentTag(Component) {
  26639. if (typeof Component === 'function') {
  26640. return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
  26641. } else if (Component !== undefined && Component !== null) {
  26642. var $$typeof = Component.$$typeof;
  26643. if ($$typeof === REACT_FORWARD_REF_TYPE) {
  26644. return ForwardRef;
  26645. }
  26646. if ($$typeof === REACT_MEMO_TYPE) {
  26647. return MemoComponent;
  26648. }
  26649. }
  26650. return IndeterminateComponent;
  26651. } // This is used to create an alternate fiber to do work on.
  26652. function createWorkInProgress(current, pendingProps) {
  26653. var workInProgress = current.alternate;
  26654. if (workInProgress === null) {
  26655. // We use a double buffering pooling technique because we know that we'll
  26656. // only ever need at most two versions of a tree. We pool the "other" unused
  26657. // node that we're free to reuse. This is lazily created to avoid allocating
  26658. // extra objects for things that are never updated. It also allow us to
  26659. // reclaim the extra memory if needed.
  26660. workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
  26661. workInProgress.elementType = current.elementType;
  26662. workInProgress.type = current.type;
  26663. workInProgress.stateNode = current.stateNode;
  26664. {
  26665. // DEV-only fields
  26666. {
  26667. workInProgress._debugID = current._debugID;
  26668. }
  26669. workInProgress._debugSource = current._debugSource;
  26670. workInProgress._debugOwner = current._debugOwner;
  26671. workInProgress._debugHookTypes = current._debugHookTypes;
  26672. }
  26673. workInProgress.alternate = current;
  26674. current.alternate = workInProgress;
  26675. } else {
  26676. workInProgress.pendingProps = pendingProps; // We already have an alternate.
  26677. // Reset the effect tag.
  26678. workInProgress.effectTag = NoEffect; // The effect list is no longer valid.
  26679. workInProgress.nextEffect = null;
  26680. workInProgress.firstEffect = null;
  26681. workInProgress.lastEffect = null;
  26682. {
  26683. // We intentionally reset, rather than copy, actualDuration & actualStartTime.
  26684. // This prevents time from endlessly accumulating in new commits.
  26685. // This has the downside of resetting values for different priority renders,
  26686. // But works for yielding (the common case) and should support resuming.
  26687. workInProgress.actualDuration = 0;
  26688. workInProgress.actualStartTime = -1;
  26689. }
  26690. }
  26691. workInProgress.childExpirationTime = current.childExpirationTime;
  26692. workInProgress.expirationTime = current.expirationTime;
  26693. workInProgress.child = current.child;
  26694. workInProgress.memoizedProps = current.memoizedProps;
  26695. workInProgress.memoizedState = current.memoizedState;
  26696. workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
  26697. // it cannot be shared with the current fiber.
  26698. var currentDependencies = current.dependencies;
  26699. workInProgress.dependencies = currentDependencies === null ? null : {
  26700. expirationTime: currentDependencies.expirationTime,
  26701. firstContext: currentDependencies.firstContext,
  26702. responders: currentDependencies.responders
  26703. }; // These will be overridden during the parent's reconciliation
  26704. workInProgress.sibling = current.sibling;
  26705. workInProgress.index = current.index;
  26706. workInProgress.ref = current.ref;
  26707. {
  26708. workInProgress.selfBaseDuration = current.selfBaseDuration;
  26709. workInProgress.treeBaseDuration = current.treeBaseDuration;
  26710. }
  26711. {
  26712. workInProgress._debugNeedsRemount = current._debugNeedsRemount;
  26713. switch (workInProgress.tag) {
  26714. case IndeterminateComponent:
  26715. case FunctionComponent:
  26716. case SimpleMemoComponent:
  26717. workInProgress.type = resolveFunctionForHotReloading(current.type);
  26718. break;
  26719. case ClassComponent:
  26720. workInProgress.type = resolveClassForHotReloading(current.type);
  26721. break;
  26722. case ForwardRef:
  26723. workInProgress.type = resolveForwardRefForHotReloading(current.type);
  26724. break;
  26725. }
  26726. }
  26727. return workInProgress;
  26728. } // Used to reuse a Fiber for a second pass.
  26729. function resetWorkInProgress(workInProgress, renderExpirationTime) {
  26730. // This resets the Fiber to what createFiber or createWorkInProgress would
  26731. // have set the values to before during the first pass. Ideally this wouldn't
  26732. // be necessary but unfortunately many code paths reads from the workInProgress
  26733. // when they should be reading from current and writing to workInProgress.
  26734. // We assume pendingProps, index, key, ref, return are still untouched to
  26735. // avoid doing another reconciliation.
  26736. // Reset the effect tag but keep any Placement tags, since that's something
  26737. // that child fiber is setting, not the reconciliation.
  26738. workInProgress.effectTag &= Placement; // The effect list is no longer valid.
  26739. workInProgress.nextEffect = null;
  26740. workInProgress.firstEffect = null;
  26741. workInProgress.lastEffect = null;
  26742. var current = workInProgress.alternate;
  26743. if (current === null) {
  26744. // Reset to createFiber's initial values.
  26745. workInProgress.childExpirationTime = NoWork;
  26746. workInProgress.expirationTime = renderExpirationTime;
  26747. workInProgress.child = null;
  26748. workInProgress.memoizedProps = null;
  26749. workInProgress.memoizedState = null;
  26750. workInProgress.updateQueue = null;
  26751. workInProgress.dependencies = null;
  26752. {
  26753. // Note: We don't reset the actualTime counts. It's useful to accumulate
  26754. // actual time across multiple render passes.
  26755. workInProgress.selfBaseDuration = 0;
  26756. workInProgress.treeBaseDuration = 0;
  26757. }
  26758. } else {
  26759. // Reset to the cloned values that createWorkInProgress would've.
  26760. workInProgress.childExpirationTime = current.childExpirationTime;
  26761. workInProgress.expirationTime = current.expirationTime;
  26762. workInProgress.child = current.child;
  26763. workInProgress.memoizedProps = current.memoizedProps;
  26764. workInProgress.memoizedState = current.memoizedState;
  26765. workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
  26766. // it cannot be shared with the current fiber.
  26767. var currentDependencies = current.dependencies;
  26768. workInProgress.dependencies = currentDependencies === null ? null : {
  26769. expirationTime: currentDependencies.expirationTime,
  26770. firstContext: currentDependencies.firstContext,
  26771. responders: currentDependencies.responders
  26772. };
  26773. {
  26774. // Note: We don't reset the actualTime counts. It's useful to accumulate
  26775. // actual time across multiple render passes.
  26776. workInProgress.selfBaseDuration = current.selfBaseDuration;
  26777. workInProgress.treeBaseDuration = current.treeBaseDuration;
  26778. }
  26779. }
  26780. return workInProgress;
  26781. }
  26782. function createHostRootFiber(tag) {
  26783. var mode;
  26784. if (tag === ConcurrentRoot) {
  26785. mode = ConcurrentMode | BlockingMode | StrictMode;
  26786. } else if (tag === BlockingRoot) {
  26787. mode = BlockingMode | StrictMode;
  26788. } else {
  26789. mode = NoMode;
  26790. }
  26791. if ( isDevToolsPresent) {
  26792. // Always collect profile timings when DevTools are present.
  26793. // This enables DevTools to start capturing timing at any point–
  26794. // Without some nodes in the tree having empty base times.
  26795. mode |= ProfileMode;
  26796. }
  26797. return createFiber(HostRoot, null, null, mode);
  26798. }
  26799. function createFiberFromTypeAndProps(type, // React$ElementType
  26800. key, pendingProps, owner, mode, expirationTime) {
  26801. var fiber;
  26802. var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
  26803. var resolvedType = type;
  26804. if (typeof type === 'function') {
  26805. if (shouldConstruct(type)) {
  26806. fiberTag = ClassComponent;
  26807. {
  26808. resolvedType = resolveClassForHotReloading(resolvedType);
  26809. }
  26810. } else {
  26811. {
  26812. resolvedType = resolveFunctionForHotReloading(resolvedType);
  26813. }
  26814. }
  26815. } else if (typeof type === 'string') {
  26816. fiberTag = HostComponent;
  26817. } else {
  26818. getTag: switch (type) {
  26819. case REACT_FRAGMENT_TYPE:
  26820. return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
  26821. case REACT_CONCURRENT_MODE_TYPE:
  26822. fiberTag = Mode;
  26823. mode |= ConcurrentMode | BlockingMode | StrictMode;
  26824. break;
  26825. case REACT_STRICT_MODE_TYPE:
  26826. fiberTag = Mode;
  26827. mode |= StrictMode;
  26828. break;
  26829. case REACT_PROFILER_TYPE:
  26830. return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
  26831. case REACT_SUSPENSE_TYPE:
  26832. return createFiberFromSuspense(pendingProps, mode, expirationTime, key);
  26833. case REACT_SUSPENSE_LIST_TYPE:
  26834. return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);
  26835. default:
  26836. {
  26837. if (typeof type === 'object' && type !== null) {
  26838. switch (type.$$typeof) {
  26839. case REACT_PROVIDER_TYPE:
  26840. fiberTag = ContextProvider;
  26841. break getTag;
  26842. case REACT_CONTEXT_TYPE:
  26843. // This is a consumer
  26844. fiberTag = ContextConsumer;
  26845. break getTag;
  26846. case REACT_FORWARD_REF_TYPE:
  26847. fiberTag = ForwardRef;
  26848. {
  26849. resolvedType = resolveForwardRefForHotReloading(resolvedType);
  26850. }
  26851. break getTag;
  26852. case REACT_MEMO_TYPE:
  26853. fiberTag = MemoComponent;
  26854. break getTag;
  26855. case REACT_LAZY_TYPE:
  26856. fiberTag = LazyComponent;
  26857. resolvedType = null;
  26858. break getTag;
  26859. case REACT_BLOCK_TYPE:
  26860. fiberTag = Block;
  26861. break getTag;
  26862. }
  26863. }
  26864. var info = '';
  26865. {
  26866. if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
  26867. info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
  26868. }
  26869. var ownerName = owner ? getComponentName(owner.type) : null;
  26870. if (ownerName) {
  26871. info += '\n\nCheck the render method of `' + ownerName + '`.';
  26872. }
  26873. }
  26874. {
  26875. {
  26876. throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (type == null ? type : typeof type) + "." + info );
  26877. }
  26878. }
  26879. }
  26880. }
  26881. }
  26882. fiber = createFiber(fiberTag, pendingProps, key, mode);
  26883. fiber.elementType = type;
  26884. fiber.type = resolvedType;
  26885. fiber.expirationTime = expirationTime;
  26886. return fiber;
  26887. }
  26888. function createFiberFromElement(element, mode, expirationTime) {
  26889. var owner = null;
  26890. {
  26891. owner = element._owner;
  26892. }
  26893. var type = element.type;
  26894. var key = element.key;
  26895. var pendingProps = element.props;
  26896. var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);
  26897. {
  26898. fiber._debugSource = element._source;
  26899. fiber._debugOwner = element._owner;
  26900. }
  26901. return fiber;
  26902. }
  26903. function createFiberFromFragment(elements, mode, expirationTime, key) {
  26904. var fiber = createFiber(Fragment, elements, key, mode);
  26905. fiber.expirationTime = expirationTime;
  26906. return fiber;
  26907. }
  26908. function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
  26909. {
  26910. if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
  26911. error('Profiler must specify an "id" string and "onRender" function as props');
  26912. }
  26913. }
  26914. var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.
  26915. fiber.elementType = REACT_PROFILER_TYPE;
  26916. fiber.type = REACT_PROFILER_TYPE;
  26917. fiber.expirationTime = expirationTime;
  26918. return fiber;
  26919. }
  26920. function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
  26921. var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
  26922. // This needs to be fixed in getComponentName so that it relies on the tag
  26923. // instead.
  26924. fiber.type = REACT_SUSPENSE_TYPE;
  26925. fiber.elementType = REACT_SUSPENSE_TYPE;
  26926. fiber.expirationTime = expirationTime;
  26927. return fiber;
  26928. }
  26929. function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {
  26930. var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
  26931. {
  26932. // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
  26933. // This needs to be fixed in getComponentName so that it relies on the tag
  26934. // instead.
  26935. fiber.type = REACT_SUSPENSE_LIST_TYPE;
  26936. }
  26937. fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
  26938. fiber.expirationTime = expirationTime;
  26939. return fiber;
  26940. }
  26941. function createFiberFromText(content, mode, expirationTime) {
  26942. var fiber = createFiber(HostText, content, null, mode);
  26943. fiber.expirationTime = expirationTime;
  26944. return fiber;
  26945. }
  26946. function createFiberFromHostInstanceForDeletion() {
  26947. var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.
  26948. fiber.elementType = 'DELETED';
  26949. fiber.type = 'DELETED';
  26950. return fiber;
  26951. }
  26952. function createFiberFromPortal(portal, mode, expirationTime) {
  26953. var pendingProps = portal.children !== null ? portal.children : [];
  26954. var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
  26955. fiber.expirationTime = expirationTime;
  26956. fiber.stateNode = {
  26957. containerInfo: portal.containerInfo,
  26958. pendingChildren: null,
  26959. // Used by persistent updates
  26960. implementation: portal.implementation
  26961. };
  26962. return fiber;
  26963. } // Used for stashing WIP properties to replay failed work in DEV.
  26964. function assignFiberPropertiesInDEV(target, source) {
  26965. if (target === null) {
  26966. // This Fiber's initial properties will always be overwritten.
  26967. // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
  26968. target = createFiber(IndeterminateComponent, null, null, NoMode);
  26969. } // This is intentionally written as a list of all properties.
  26970. // We tried to use Object.assign() instead but this is called in
  26971. // the hottest path, and Object.assign() was too slow:
  26972. // https://github.com/facebook/react/issues/12502
  26973. // This code is DEV-only so size is not a concern.
  26974. target.tag = source.tag;
  26975. target.key = source.key;
  26976. target.elementType = source.elementType;
  26977. target.type = source.type;
  26978. target.stateNode = source.stateNode;
  26979. target.return = source.return;
  26980. target.child = source.child;
  26981. target.sibling = source.sibling;
  26982. target.index = source.index;
  26983. target.ref = source.ref;
  26984. target.pendingProps = source.pendingProps;
  26985. target.memoizedProps = source.memoizedProps;
  26986. target.updateQueue = source.updateQueue;
  26987. target.memoizedState = source.memoizedState;
  26988. target.dependencies = source.dependencies;
  26989. target.mode = source.mode;
  26990. target.effectTag = source.effectTag;
  26991. target.nextEffect = source.nextEffect;
  26992. target.firstEffect = source.firstEffect;
  26993. target.lastEffect = source.lastEffect;
  26994. target.expirationTime = source.expirationTime;
  26995. target.childExpirationTime = source.childExpirationTime;
  26996. target.alternate = source.alternate;
  26997. {
  26998. target.actualDuration = source.actualDuration;
  26999. target.actualStartTime = source.actualStartTime;
  27000. target.selfBaseDuration = source.selfBaseDuration;
  27001. target.treeBaseDuration = source.treeBaseDuration;
  27002. }
  27003. {
  27004. target._debugID = source._debugID;
  27005. }
  27006. target._debugSource = source._debugSource;
  27007. target._debugOwner = source._debugOwner;
  27008. target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
  27009. target._debugNeedsRemount = source._debugNeedsRemount;
  27010. target._debugHookTypes = source._debugHookTypes;
  27011. return target;
  27012. }
  27013. function FiberRootNode(containerInfo, tag, hydrate) {
  27014. this.tag = tag;
  27015. this.current = null;
  27016. this.containerInfo = containerInfo;
  27017. this.pendingChildren = null;
  27018. this.pingCache = null;
  27019. this.finishedExpirationTime = NoWork;
  27020. this.finishedWork = null;
  27021. this.timeoutHandle = noTimeout;
  27022. this.context = null;
  27023. this.pendingContext = null;
  27024. this.hydrate = hydrate;
  27025. this.callbackNode = null;
  27026. this.callbackPriority = NoPriority;
  27027. this.firstPendingTime = NoWork;
  27028. this.firstSuspendedTime = NoWork;
  27029. this.lastSuspendedTime = NoWork;
  27030. this.nextKnownPendingLevel = NoWork;
  27031. this.lastPingedTime = NoWork;
  27032. this.lastExpiredTime = NoWork;
  27033. {
  27034. this.interactionThreadID = tracing.unstable_getThreadID();
  27035. this.memoizedInteractions = new Set();
  27036. this.pendingInteractionMap = new Map();
  27037. }
  27038. }
  27039. function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
  27040. var root = new FiberRootNode(containerInfo, tag, hydrate);
  27041. // stateNode is any.
  27042. var uninitializedFiber = createHostRootFiber(tag);
  27043. root.current = uninitializedFiber;
  27044. uninitializedFiber.stateNode = root;
  27045. initializeUpdateQueue(uninitializedFiber);
  27046. return root;
  27047. }
  27048. function isRootSuspendedAtTime(root, expirationTime) {
  27049. var firstSuspendedTime = root.firstSuspendedTime;
  27050. var lastSuspendedTime = root.lastSuspendedTime;
  27051. return firstSuspendedTime !== NoWork && firstSuspendedTime >= expirationTime && lastSuspendedTime <= expirationTime;
  27052. }
  27053. function markRootSuspendedAtTime(root, expirationTime) {
  27054. var firstSuspendedTime = root.firstSuspendedTime;
  27055. var lastSuspendedTime = root.lastSuspendedTime;
  27056. if (firstSuspendedTime < expirationTime) {
  27057. root.firstSuspendedTime = expirationTime;
  27058. }
  27059. if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) {
  27060. root.lastSuspendedTime = expirationTime;
  27061. }
  27062. if (expirationTime <= root.lastPingedTime) {
  27063. root.lastPingedTime = NoWork;
  27064. }
  27065. if (expirationTime <= root.lastExpiredTime) {
  27066. root.lastExpiredTime = NoWork;
  27067. }
  27068. }
  27069. function markRootUpdatedAtTime(root, expirationTime) {
  27070. // Update the range of pending times
  27071. var firstPendingTime = root.firstPendingTime;
  27072. if (expirationTime > firstPendingTime) {
  27073. root.firstPendingTime = expirationTime;
  27074. } // Update the range of suspended times. Treat everything lower priority or
  27075. // equal to this update as unsuspended.
  27076. var firstSuspendedTime = root.firstSuspendedTime;
  27077. if (firstSuspendedTime !== NoWork) {
  27078. if (expirationTime >= firstSuspendedTime) {
  27079. // The entire suspended range is now unsuspended.
  27080. root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
  27081. } else if (expirationTime >= root.lastSuspendedTime) {
  27082. root.lastSuspendedTime = expirationTime + 1;
  27083. } // This is a pending level. Check if it's higher priority than the next
  27084. // known pending level.
  27085. if (expirationTime > root.nextKnownPendingLevel) {
  27086. root.nextKnownPendingLevel = expirationTime;
  27087. }
  27088. }
  27089. }
  27090. function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) {
  27091. // Update the range of pending times
  27092. root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or
  27093. // equal to this update as unsuspended.
  27094. if (finishedExpirationTime <= root.lastSuspendedTime) {
  27095. // The entire suspended range is now unsuspended.
  27096. root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
  27097. } else if (finishedExpirationTime <= root.firstSuspendedTime) {
  27098. // Part of the suspended range is now unsuspended. Narrow the range to
  27099. // include everything between the unsuspended time (non-inclusive) and the
  27100. // last suspended time.
  27101. root.firstSuspendedTime = finishedExpirationTime - 1;
  27102. }
  27103. if (finishedExpirationTime <= root.lastPingedTime) {
  27104. // Clear the pinged time
  27105. root.lastPingedTime = NoWork;
  27106. }
  27107. if (finishedExpirationTime <= root.lastExpiredTime) {
  27108. // Clear the expired time
  27109. root.lastExpiredTime = NoWork;
  27110. }
  27111. }
  27112. function markRootExpiredAtTime(root, expirationTime) {
  27113. var lastExpiredTime = root.lastExpiredTime;
  27114. if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) {
  27115. root.lastExpiredTime = expirationTime;
  27116. }
  27117. }
  27118. var didWarnAboutNestedUpdates;
  27119. var didWarnAboutFindNodeInStrictMode;
  27120. {
  27121. didWarnAboutNestedUpdates = false;
  27122. didWarnAboutFindNodeInStrictMode = {};
  27123. }
  27124. function getContextForSubtree(parentComponent) {
  27125. if (!parentComponent) {
  27126. return emptyContextObject;
  27127. }
  27128. var fiber = get(parentComponent);
  27129. var parentContext = findCurrentUnmaskedContext(fiber);
  27130. if (fiber.tag === ClassComponent) {
  27131. var Component = fiber.type;
  27132. if (isContextProvider(Component)) {
  27133. return processChildContext(fiber, Component, parentContext);
  27134. }
  27135. }
  27136. return parentContext;
  27137. }
  27138. function findHostInstanceWithWarning(component, methodName) {
  27139. {
  27140. var fiber = get(component);
  27141. if (fiber === undefined) {
  27142. if (typeof component.render === 'function') {
  27143. {
  27144. {
  27145. throw Error( "Unable to find node on an unmounted component." );
  27146. }
  27147. }
  27148. } else {
  27149. {
  27150. {
  27151. throw Error( "Argument appears to not be a ReactComponent. Keys: " + Object.keys(component) );
  27152. }
  27153. }
  27154. }
  27155. }
  27156. var hostFiber = findCurrentHostFiber(fiber);
  27157. if (hostFiber === null) {
  27158. return null;
  27159. }
  27160. if (hostFiber.mode & StrictMode) {
  27161. var componentName = getComponentName(fiber.type) || 'Component';
  27162. if (!didWarnAboutFindNodeInStrictMode[componentName]) {
  27163. didWarnAboutFindNodeInStrictMode[componentName] = true;
  27164. if (fiber.mode & StrictMode) {
  27165. error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
  27166. } else {
  27167. error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
  27168. }
  27169. }
  27170. }
  27171. return hostFiber.stateNode;
  27172. }
  27173. }
  27174. function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {
  27175. return createFiberRoot(containerInfo, tag, hydrate);
  27176. }
  27177. function updateContainer(element, container, parentComponent, callback) {
  27178. {
  27179. onScheduleRoot(container, element);
  27180. }
  27181. var current$1 = container.current;
  27182. var currentTime = requestCurrentTimeForUpdate();
  27183. {
  27184. // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
  27185. if ('undefined' !== typeof jest) {
  27186. warnIfUnmockedScheduler(current$1);
  27187. warnIfNotScopedWithMatchingAct(current$1);
  27188. }
  27189. }
  27190. var suspenseConfig = requestCurrentSuspenseConfig();
  27191. var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig);
  27192. var context = getContextForSubtree(parentComponent);
  27193. if (container.context === null) {
  27194. container.context = context;
  27195. } else {
  27196. container.pendingContext = context;
  27197. }
  27198. {
  27199. if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
  27200. didWarnAboutNestedUpdates = true;
  27201. error('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.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
  27202. }
  27203. }
  27204. var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property
  27205. // being called "element".
  27206. update.payload = {
  27207. element: element
  27208. };
  27209. callback = callback === undefined ? null : callback;
  27210. if (callback !== null) {
  27211. {
  27212. if (typeof callback !== 'function') {
  27213. error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
  27214. }
  27215. }
  27216. update.callback = callback;
  27217. }
  27218. enqueueUpdate(current$1, update);
  27219. scheduleWork(current$1, expirationTime);
  27220. return expirationTime;
  27221. }
  27222. function getPublicRootInstance(container) {
  27223. var containerFiber = container.current;
  27224. if (!containerFiber.child) {
  27225. return null;
  27226. }
  27227. switch (containerFiber.child.tag) {
  27228. case HostComponent:
  27229. return getPublicInstance(containerFiber.child.stateNode);
  27230. default:
  27231. return containerFiber.child.stateNode;
  27232. }
  27233. }
  27234. function markRetryTimeImpl(fiber, retryTime) {
  27235. var suspenseState = fiber.memoizedState;
  27236. if (suspenseState !== null && suspenseState.dehydrated !== null) {
  27237. if (suspenseState.retryTime < retryTime) {
  27238. suspenseState.retryTime = retryTime;
  27239. }
  27240. }
  27241. } // Increases the priority of thennables when they resolve within this boundary.
  27242. function markRetryTimeIfNotHydrated(fiber, retryTime) {
  27243. markRetryTimeImpl(fiber, retryTime);
  27244. var alternate = fiber.alternate;
  27245. if (alternate) {
  27246. markRetryTimeImpl(alternate, retryTime);
  27247. }
  27248. }
  27249. function attemptUserBlockingHydration$1(fiber) {
  27250. if (fiber.tag !== SuspenseComponent) {
  27251. // We ignore HostRoots here because we can't increase
  27252. // their priority and they should not suspend on I/O,
  27253. // since you have to wrap anything that might suspend in
  27254. // Suspense.
  27255. return;
  27256. }
  27257. var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate());
  27258. scheduleWork(fiber, expTime);
  27259. markRetryTimeIfNotHydrated(fiber, expTime);
  27260. }
  27261. function attemptContinuousHydration$1(fiber) {
  27262. if (fiber.tag !== SuspenseComponent) {
  27263. // We ignore HostRoots here because we can't increase
  27264. // their priority and they should not suspend on I/O,
  27265. // since you have to wrap anything that might suspend in
  27266. // Suspense.
  27267. return;
  27268. }
  27269. scheduleWork(fiber, ContinuousHydration);
  27270. markRetryTimeIfNotHydrated(fiber, ContinuousHydration);
  27271. }
  27272. function attemptHydrationAtCurrentPriority$1(fiber) {
  27273. if (fiber.tag !== SuspenseComponent) {
  27274. // We ignore HostRoots here because we can't increase
  27275. // their priority other than synchronously flush it.
  27276. return;
  27277. }
  27278. var currentTime = requestCurrentTimeForUpdate();
  27279. var expTime = computeExpirationForFiber(currentTime, fiber, null);
  27280. scheduleWork(fiber, expTime);
  27281. markRetryTimeIfNotHydrated(fiber, expTime);
  27282. }
  27283. function findHostInstanceWithNoPortals(fiber) {
  27284. var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
  27285. if (hostFiber === null) {
  27286. return null;
  27287. }
  27288. if (hostFiber.tag === FundamentalComponent) {
  27289. return hostFiber.stateNode.instance;
  27290. }
  27291. return hostFiber.stateNode;
  27292. }
  27293. var shouldSuspendImpl = function (fiber) {
  27294. return false;
  27295. };
  27296. function shouldSuspend(fiber) {
  27297. return shouldSuspendImpl(fiber);
  27298. }
  27299. var overrideHookState = null;
  27300. var overrideProps = null;
  27301. var scheduleUpdate = null;
  27302. var setSuspenseHandler = null;
  27303. {
  27304. var copyWithSetImpl = function (obj, path, idx, value) {
  27305. if (idx >= path.length) {
  27306. return value;
  27307. }
  27308. var key = path[idx];
  27309. var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here
  27310. updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
  27311. return updated;
  27312. };
  27313. var copyWithSet = function (obj, path, value) {
  27314. return copyWithSetImpl(obj, path, 0, value);
  27315. }; // Support DevTools editable values for useState and useReducer.
  27316. overrideHookState = function (fiber, id, path, value) {
  27317. // For now, the "id" of stateful hooks is just the stateful hook index.
  27318. // This may change in the future with e.g. nested hooks.
  27319. var currentHook = fiber.memoizedState;
  27320. while (currentHook !== null && id > 0) {
  27321. currentHook = currentHook.next;
  27322. id--;
  27323. }
  27324. if (currentHook !== null) {
  27325. var newState = copyWithSet(currentHook.memoizedState, path, value);
  27326. currentHook.memoizedState = newState;
  27327. currentHook.baseState = newState; // We aren't actually adding an update to the queue,
  27328. // because there is no update we can add for useReducer hooks that won't trigger an error.
  27329. // (There's no appropriate action type for DevTools overrides.)
  27330. // As a result though, React will see the scheduled update as a noop and bailout.
  27331. // Shallow cloning props works as a workaround for now to bypass the bailout check.
  27332. fiber.memoizedProps = _assign({}, fiber.memoizedProps);
  27333. scheduleWork(fiber, Sync);
  27334. }
  27335. }; // Support DevTools props for function components, forwardRef, memo, host components, etc.
  27336. overrideProps = function (fiber, path, value) {
  27337. fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
  27338. if (fiber.alternate) {
  27339. fiber.alternate.pendingProps = fiber.pendingProps;
  27340. }
  27341. scheduleWork(fiber, Sync);
  27342. };
  27343. scheduleUpdate = function (fiber) {
  27344. scheduleWork(fiber, Sync);
  27345. };
  27346. setSuspenseHandler = function (newShouldSuspendImpl) {
  27347. shouldSuspendImpl = newShouldSuspendImpl;
  27348. };
  27349. }
  27350. function injectIntoDevTools(devToolsConfig) {
  27351. var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
  27352. var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
  27353. return injectInternals(_assign({}, devToolsConfig, {
  27354. overrideHookState: overrideHookState,
  27355. overrideProps: overrideProps,
  27356. setSuspenseHandler: setSuspenseHandler,
  27357. scheduleUpdate: scheduleUpdate,
  27358. currentDispatcherRef: ReactCurrentDispatcher,
  27359. findHostInstanceByFiber: function (fiber) {
  27360. var hostFiber = findCurrentHostFiber(fiber);
  27361. if (hostFiber === null) {
  27362. return null;
  27363. }
  27364. return hostFiber.stateNode;
  27365. },
  27366. findFiberByHostInstance: function (instance) {
  27367. if (!findFiberByHostInstance) {
  27368. // Might not be implemented by the renderer.
  27369. return null;
  27370. }
  27371. return findFiberByHostInstance(instance);
  27372. },
  27373. // React Refresh
  27374. findHostInstancesForRefresh: findHostInstancesForRefresh ,
  27375. scheduleRefresh: scheduleRefresh ,
  27376. scheduleRoot: scheduleRoot ,
  27377. setRefreshHandler: setRefreshHandler ,
  27378. // Enables DevTools to append owner stacks to error messages in DEV mode.
  27379. getCurrentFiber: function () {
  27380. return current;
  27381. }
  27382. }));
  27383. }
  27384. var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing;
  27385. function ReactDOMRoot(container, options) {
  27386. this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
  27387. }
  27388. function ReactDOMBlockingRoot(container, tag, options) {
  27389. this._internalRoot = createRootImpl(container, tag, options);
  27390. }
  27391. ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {
  27392. var root = this._internalRoot;
  27393. {
  27394. if (typeof arguments[1] === 'function') {
  27395. error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
  27396. }
  27397. var container = root.containerInfo;
  27398. if (container.nodeType !== COMMENT_NODE) {
  27399. var hostInstance = findHostInstanceWithNoPortals(root.current);
  27400. if (hostInstance) {
  27401. if (hostInstance.parentNode !== container) {
  27402. error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
  27403. }
  27404. }
  27405. }
  27406. }
  27407. updateContainer(children, root, null, null);
  27408. };
  27409. ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {
  27410. {
  27411. if (typeof arguments[0] === 'function') {
  27412. error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
  27413. }
  27414. }
  27415. var root = this._internalRoot;
  27416. var container = root.containerInfo;
  27417. updateContainer(null, root, null, function () {
  27418. unmarkContainerAsRoot(container);
  27419. });
  27420. };
  27421. function createRootImpl(container, tag, options) {
  27422. // Tag is either LegacyRoot or Concurrent Root
  27423. var hydrate = options != null && options.hydrate === true;
  27424. var hydrationCallbacks = options != null && options.hydrationOptions || null;
  27425. var root = createContainer(container, tag, hydrate);
  27426. markContainerAsRoot(root.current, container);
  27427. if (hydrate && tag !== LegacyRoot) {
  27428. var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;
  27429. eagerlyTrapReplayableEvents(container, doc);
  27430. }
  27431. return root;
  27432. }
  27433. function createLegacyRoot(container, options) {
  27434. return new ReactDOMBlockingRoot(container, LegacyRoot, options);
  27435. }
  27436. function isValidContainer(node) {
  27437. return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
  27438. }
  27439. var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
  27440. var topLevelUpdateWarnings;
  27441. var warnedAboutHydrateAPI = false;
  27442. {
  27443. topLevelUpdateWarnings = function (container) {
  27444. if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
  27445. var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
  27446. if (hostInstance) {
  27447. if (hostInstance.parentNode !== container) {
  27448. error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
  27449. }
  27450. }
  27451. }
  27452. var isRootRenderedBySomeReact = !!container._reactRootContainer;
  27453. var rootEl = getReactRootElementInContainer(container);
  27454. var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
  27455. if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
  27456. error('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.');
  27457. }
  27458. if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
  27459. error('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.');
  27460. }
  27461. };
  27462. }
  27463. function getReactRootElementInContainer(container) {
  27464. if (!container) {
  27465. return null;
  27466. }
  27467. if (container.nodeType === DOCUMENT_NODE) {
  27468. return container.documentElement;
  27469. } else {
  27470. return container.firstChild;
  27471. }
  27472. }
  27473. function shouldHydrateDueToLegacyHeuristic(container) {
  27474. var rootElement = getReactRootElementInContainer(container);
  27475. return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
  27476. }
  27477. function legacyCreateRootFromDOMContainer(container, forceHydrate) {
  27478. var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.
  27479. if (!shouldHydrate) {
  27480. var warned = false;
  27481. var rootSibling;
  27482. while (rootSibling = container.lastChild) {
  27483. {
  27484. if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
  27485. warned = true;
  27486. error('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.');
  27487. }
  27488. }
  27489. container.removeChild(rootSibling);
  27490. }
  27491. }
  27492. {
  27493. if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
  27494. warnedAboutHydrateAPI = true;
  27495. warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
  27496. }
  27497. }
  27498. return createLegacyRoot(container, shouldHydrate ? {
  27499. hydrate: true
  27500. } : undefined);
  27501. }
  27502. function warnOnInvalidCallback$1(callback, callerName) {
  27503. {
  27504. if (callback !== null && typeof callback !== 'function') {
  27505. error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
  27506. }
  27507. }
  27508. }
  27509. function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
  27510. {
  27511. topLevelUpdateWarnings(container);
  27512. warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
  27513. } // TODO: Without `any` type, Flow says "Property cannot be accessed on any
  27514. // member of intersection type." Whyyyyyy.
  27515. var root = container._reactRootContainer;
  27516. var fiberRoot;
  27517. if (!root) {
  27518. // Initial mount
  27519. root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
  27520. fiberRoot = root._internalRoot;
  27521. if (typeof callback === 'function') {
  27522. var originalCallback = callback;
  27523. callback = function () {
  27524. var instance = getPublicRootInstance(fiberRoot);
  27525. originalCallback.call(instance);
  27526. };
  27527. } // Initial mount should not be batched.
  27528. unbatchedUpdates(function () {
  27529. updateContainer(children, fiberRoot, parentComponent, callback);
  27530. });
  27531. } else {
  27532. fiberRoot = root._internalRoot;
  27533. if (typeof callback === 'function') {
  27534. var _originalCallback = callback;
  27535. callback = function () {
  27536. var instance = getPublicRootInstance(fiberRoot);
  27537. _originalCallback.call(instance);
  27538. };
  27539. } // Update
  27540. updateContainer(children, fiberRoot, parentComponent, callback);
  27541. }
  27542. return getPublicRootInstance(fiberRoot);
  27543. }
  27544. function findDOMNode(componentOrElement) {
  27545. {
  27546. var owner = ReactCurrentOwner$3.current;
  27547. if (owner !== null && owner.stateNode !== null) {
  27548. var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
  27549. if (!warnedAboutRefsInRender) {
  27550. error('%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.', getComponentName(owner.type) || 'A component');
  27551. }
  27552. owner.stateNode._warnedAboutRefsInRender = true;
  27553. }
  27554. }
  27555. if (componentOrElement == null) {
  27556. return null;
  27557. }
  27558. if (componentOrElement.nodeType === ELEMENT_NODE) {
  27559. return componentOrElement;
  27560. }
  27561. {
  27562. return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
  27563. }
  27564. }
  27565. function hydrate(element, container, callback) {
  27566. if (!isValidContainer(container)) {
  27567. {
  27568. throw Error( "Target container is not a DOM element." );
  27569. }
  27570. }
  27571. {
  27572. var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
  27573. if (isModernRoot) {
  27574. error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');
  27575. }
  27576. } // TODO: throw or warn if we couldn't hydrate?
  27577. return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
  27578. }
  27579. function render(element, container, callback) {
  27580. if (!isValidContainer(container)) {
  27581. {
  27582. throw Error( "Target container is not a DOM element." );
  27583. }
  27584. }
  27585. {
  27586. var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
  27587. if (isModernRoot) {
  27588. error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
  27589. }
  27590. }
  27591. return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
  27592. }
  27593. function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
  27594. if (!isValidContainer(containerNode)) {
  27595. {
  27596. throw Error( "Target container is not a DOM element." );
  27597. }
  27598. }
  27599. if (!(parentComponent != null && has(parentComponent))) {
  27600. {
  27601. throw Error( "parentComponent must be a valid React Component" );
  27602. }
  27603. }
  27604. return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
  27605. }
  27606. function unmountComponentAtNode(container) {
  27607. if (!isValidContainer(container)) {
  27608. {
  27609. throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." );
  27610. }
  27611. }
  27612. {
  27613. var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
  27614. if (isModernRoot) {
  27615. error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');
  27616. }
  27617. }
  27618. if (container._reactRootContainer) {
  27619. {
  27620. var rootEl = getReactRootElementInContainer(container);
  27621. var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
  27622. if (renderedByDifferentReact) {
  27623. error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
  27624. }
  27625. } // Unmount should not be batched.
  27626. unbatchedUpdates(function () {
  27627. legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
  27628. // $FlowFixMe This should probably use `delete container._reactRootContainer`
  27629. container._reactRootContainer = null;
  27630. unmarkContainerAsRoot(container);
  27631. });
  27632. }); // If you call unmountComponentAtNode twice in quick succession, you'll
  27633. // get `true` twice. That's probably fine?
  27634. return true;
  27635. } else {
  27636. {
  27637. var _rootEl = getReactRootElementInContainer(container);
  27638. var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node.
  27639. var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
  27640. if (hasNonRootReactChild) {
  27641. error("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.');
  27642. }
  27643. }
  27644. return false;
  27645. }
  27646. }
  27647. function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
  27648. implementation) {
  27649. var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
  27650. return {
  27651. // This tag allow us to uniquely identify this as a React Portal
  27652. $$typeof: REACT_PORTAL_TYPE,
  27653. key: key == null ? null : '' + key,
  27654. children: children,
  27655. containerInfo: containerInfo,
  27656. implementation: implementation
  27657. };
  27658. }
  27659. var ReactVersion = '16.14.0';
  27660. setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
  27661. setAttemptContinuousHydration(attemptContinuousHydration$1);
  27662. setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
  27663. var didWarnAboutUnstableCreatePortal = false;
  27664. {
  27665. if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
  27666. Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
  27667. Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
  27668. error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
  27669. }
  27670. }
  27671. setRestoreImplementation(restoreControlledState$3);
  27672. setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);
  27673. function createPortal$1(children, container) {
  27674. var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  27675. if (!isValidContainer(container)) {
  27676. {
  27677. throw Error( "Target container is not a DOM element." );
  27678. }
  27679. } // TODO: pass ReactDOM portal implementation as third argument
  27680. // $FlowFixMe The Flow type is opaque but there's no way to actually create it.
  27681. return createPortal(children, container, null, key);
  27682. }
  27683. function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
  27684. return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
  27685. }
  27686. function unstable_createPortal(children, container) {
  27687. var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  27688. {
  27689. if (!didWarnAboutUnstableCreatePortal) {
  27690. didWarnAboutUnstableCreatePortal = true;
  27691. warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
  27692. }
  27693. }
  27694. return createPortal$1(children, container, key);
  27695. }
  27696. var Internals = {
  27697. // Keep in sync with ReactDOMUnstableNativeDependencies.js
  27698. // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
  27699. Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
  27700. };
  27701. var foundDevTools = injectIntoDevTools({
  27702. findFiberByHostInstance: getClosestInstanceFromNode,
  27703. bundleType: 1 ,
  27704. version: ReactVersion,
  27705. rendererPackageName: 'react-dom'
  27706. });
  27707. {
  27708. if (!foundDevTools && canUseDOM && window.top === window.self) {
  27709. // If we're in Chrome or Firefox, provide a download link if not installed.
  27710. if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
  27711. var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.
  27712. if (/^(https?|file):$/.test(protocol)) {
  27713. // eslint-disable-next-line react-internal/no-production-logging
  27714. console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');
  27715. }
  27716. }
  27717. }
  27718. }
  27719. exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
  27720. exports.createPortal = createPortal$1;
  27721. exports.findDOMNode = findDOMNode;
  27722. exports.flushSync = flushSync;
  27723. exports.hydrate = hydrate;
  27724. exports.render = render;
  27725. exports.unmountComponentAtNode = unmountComponentAtNode;
  27726. exports.unstable_batchedUpdates = batchedUpdates$1;
  27727. exports.unstable_createPortal = unstable_createPortal;
  27728. exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
  27729. exports.version = ReactVersion;
  27730. })();
  27731. }
  27732. /***/ }),
  27733. /***/ "./node_modules/react-dom/index.js":
  27734. /*!*****************************************!*\
  27735. !*** ./node_modules/react-dom/index.js ***!
  27736. \*****************************************/
  27737. /*! dynamic exports provided */
  27738. /*! exports used: default */
  27739. /***/ (function(module, exports, __webpack_require__) {
  27740. "use strict";
  27741. function checkDCE() {
  27742. /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
  27743. if (
  27744. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
  27745. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
  27746. ) {
  27747. return;
  27748. }
  27749. if (true) {
  27750. // This branch is unreachable because this function is only called
  27751. // in production, but the condition is true only in development.
  27752. // Therefore if the branch is still here, dead code elimination wasn't
  27753. // properly applied.
  27754. // Don't change the message. React DevTools relies on it. Also make sure
  27755. // this message doesn't occur elsewhere in this function, or it will cause
  27756. // a false positive.
  27757. throw new Error('^_^');
  27758. }
  27759. try {
  27760. // Verify that the code above has been dead code eliminated (DCE'd).
  27761. __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
  27762. } catch (err) {
  27763. // DevTools shouldn't crash React, no matter what.
  27764. // We should still report in case we break this code.
  27765. console.error(err);
  27766. }
  27767. }
  27768. if (false) {
  27769. // DCE check should happen before ReactDOM bundle executes so that
  27770. // DevTools can report bad minification during injection.
  27771. checkDCE();
  27772. module.exports = require('./cjs/react-dom.production.min.js');
  27773. } else {
  27774. module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ "./node_modules/react-dom/cjs/react-dom.development.js");
  27775. }
  27776. /***/ }),
  27777. /***/ "./node_modules/react-error-overlay/lib/index.js":
  27778. /*!*******************************************************!*\
  27779. !*** ./node_modules/react-error-overlay/lib/index.js ***!
  27780. \*******************************************************/
  27781. /*! dynamic exports provided */
  27782. /*! all exports used */
  27783. /***/ (function(module, exports, __webpack_require__) {
  27784. (function webpackUniversalModuleDefinition(root, factory) {
  27785. if(true)
  27786. module.exports = factory();
  27787. else if(typeof define === 'function' && define.amd)
  27788. define([], factory);
  27789. else if(typeof exports === 'object')
  27790. exports["ReactErrorOverlay"] = factory();
  27791. else
  27792. root["ReactErrorOverlay"] = factory();
  27793. })(this, function() {
  27794. return /******/ (function(modules) { // webpackBootstrap
  27795. /******/ // The module cache
  27796. /******/ var installedModules = {};
  27797. /******/
  27798. /******/ // The require function
  27799. /******/ function __webpack_require__(moduleId) {
  27800. /******/
  27801. /******/ // Check if module is in cache
  27802. /******/ if(installedModules[moduleId]) {
  27803. /******/ return installedModules[moduleId].exports;
  27804. /******/ }
  27805. /******/ // Create a new module (and put it into the cache)
  27806. /******/ var module = installedModules[moduleId] = {
  27807. /******/ i: moduleId,
  27808. /******/ l: false,
  27809. /******/ exports: {}
  27810. /******/ };
  27811. /******/
  27812. /******/ // Execute the module function
  27813. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  27814. /******/
  27815. /******/ // Flag the module as loaded
  27816. /******/ module.l = true;
  27817. /******/
  27818. /******/ // Return the exports of the module
  27819. /******/ return module.exports;
  27820. /******/ }
  27821. /******/
  27822. /******/
  27823. /******/ // expose the modules object (__webpack_modules__)
  27824. /******/ __webpack_require__.m = modules;
  27825. /******/
  27826. /******/ // expose the module cache
  27827. /******/ __webpack_require__.c = installedModules;
  27828. /******/
  27829. /******/ // define getter function for harmony exports
  27830. /******/ __webpack_require__.d = function(exports, name, getter) {
  27831. /******/ if(!__webpack_require__.o(exports, name)) {
  27832. /******/ Object.defineProperty(exports, name, {
  27833. /******/ configurable: false,
  27834. /******/ enumerable: true,
  27835. /******/ get: getter
  27836. /******/ });
  27837. /******/ }
  27838. /******/ };
  27839. /******/
  27840. /******/ // getDefaultExport function for compatibility with non-harmony modules
  27841. /******/ __webpack_require__.n = function(module) {
  27842. /******/ var getter = module && module.__esModule ?
  27843. /******/ function getDefault() { return module['default']; } :
  27844. /******/ function getModuleExports() { return module; };
  27845. /******/ __webpack_require__.d(getter, 'a', getter);
  27846. /******/ return getter;
  27847. /******/ };
  27848. /******/
  27849. /******/ // Object.prototype.hasOwnProperty.call
  27850. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  27851. /******/
  27852. /******/ // __webpack_public_path__
  27853. /******/ __webpack_require__.p = "";
  27854. /******/
  27855. /******/ // Load entry module and return exports
  27856. /******/ return __webpack_require__(__webpack_require__.s = 9);
  27857. /******/ })
  27858. /************************************************************************/
  27859. /******/ ([
  27860. /* 0 */
  27861. /***/ (function(module, exports) {
  27862. /* -*- Mode: js; js-indent-level: 2; -*- */
  27863. /*
  27864. * Copyright 2011 Mozilla Foundation and contributors
  27865. * Licensed under the New BSD license. See LICENSE or:
  27866. * http://opensource.org/licenses/BSD-3-Clause
  27867. */
  27868. /**
  27869. * This is a helper function for getting values from parameter/options
  27870. * objects.
  27871. *
  27872. * @param args The object we are extracting values from
  27873. * @param name The name of the property we are getting.
  27874. * @param defaultValue An optional value to return if the property is missing
  27875. * from the object. If this is not specified and the property is missing, an
  27876. * error will be thrown.
  27877. */
  27878. function getArg(aArgs, aName, aDefaultValue) {
  27879. if (aName in aArgs) {
  27880. return aArgs[aName];
  27881. } else if (arguments.length === 3) {
  27882. return aDefaultValue;
  27883. } else {
  27884. throw new Error('"' + aName + '" is a required argument.');
  27885. }
  27886. }
  27887. exports.getArg = getArg;
  27888. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
  27889. var dataUrlRegexp = /^data:.+\,.+$/;
  27890. function urlParse(aUrl) {
  27891. var match = aUrl.match(urlRegexp);
  27892. if (!match) {
  27893. return null;
  27894. }
  27895. return {
  27896. scheme: match[1],
  27897. auth: match[2],
  27898. host: match[3],
  27899. port: match[4],
  27900. path: match[5]
  27901. };
  27902. }
  27903. exports.urlParse = urlParse;
  27904. function urlGenerate(aParsedUrl) {
  27905. var url = '';
  27906. if (aParsedUrl.scheme) {
  27907. url += aParsedUrl.scheme + ':';
  27908. }
  27909. url += '//';
  27910. if (aParsedUrl.auth) {
  27911. url += aParsedUrl.auth + '@';
  27912. }
  27913. if (aParsedUrl.host) {
  27914. url += aParsedUrl.host;
  27915. }
  27916. if (aParsedUrl.port) {
  27917. url += ":" + aParsedUrl.port
  27918. }
  27919. if (aParsedUrl.path) {
  27920. url += aParsedUrl.path;
  27921. }
  27922. return url;
  27923. }
  27924. exports.urlGenerate = urlGenerate;
  27925. /**
  27926. * Normalizes a path, or the path portion of a URL:
  27927. *
  27928. * - Replaces consecutive slashes with one slash.
  27929. * - Removes unnecessary '.' parts.
  27930. * - Removes unnecessary '<dir>/..' parts.
  27931. *
  27932. * Based on code in the Node.js 'path' core module.
  27933. *
  27934. * @param aPath The path or url to normalize.
  27935. */
  27936. function normalize(aPath) {
  27937. var path = aPath;
  27938. var url = urlParse(aPath);
  27939. if (url) {
  27940. if (!url.path) {
  27941. return aPath;
  27942. }
  27943. path = url.path;
  27944. }
  27945. var isAbsolute = exports.isAbsolute(path);
  27946. var parts = path.split(/\/+/);
  27947. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  27948. part = parts[i];
  27949. if (part === '.') {
  27950. parts.splice(i, 1);
  27951. } else if (part === '..') {
  27952. up++;
  27953. } else if (up > 0) {
  27954. if (part === '') {
  27955. // The first part is blank if the path is absolute. Trying to go
  27956. // above the root is a no-op. Therefore we can remove all '..' parts
  27957. // directly after the root.
  27958. parts.splice(i + 1, up);
  27959. up = 0;
  27960. } else {
  27961. parts.splice(i, 2);
  27962. up--;
  27963. }
  27964. }
  27965. }
  27966. path = parts.join('/');
  27967. if (path === '') {
  27968. path = isAbsolute ? '/' : '.';
  27969. }
  27970. if (url) {
  27971. url.path = path;
  27972. return urlGenerate(url);
  27973. }
  27974. return path;
  27975. }
  27976. exports.normalize = normalize;
  27977. /**
  27978. * Joins two paths/URLs.
  27979. *
  27980. * @param aRoot The root path or URL.
  27981. * @param aPath The path or URL to be joined with the root.
  27982. *
  27983. * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
  27984. * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
  27985. * first.
  27986. * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
  27987. * is updated with the result and aRoot is returned. Otherwise the result
  27988. * is returned.
  27989. * - If aPath is absolute, the result is aPath.
  27990. * - Otherwise the two paths are joined with a slash.
  27991. * - Joining for example 'http://' and 'www.example.com' is also supported.
  27992. */
  27993. function join(aRoot, aPath) {
  27994. if (aRoot === "") {
  27995. aRoot = ".";
  27996. }
  27997. if (aPath === "") {
  27998. aPath = ".";
  27999. }
  28000. var aPathUrl = urlParse(aPath);
  28001. var aRootUrl = urlParse(aRoot);
  28002. if (aRootUrl) {
  28003. aRoot = aRootUrl.path || '/';
  28004. }
  28005. // `join(foo, '//www.example.org')`
  28006. if (aPathUrl && !aPathUrl.scheme) {
  28007. if (aRootUrl) {
  28008. aPathUrl.scheme = aRootUrl.scheme;
  28009. }
  28010. return urlGenerate(aPathUrl);
  28011. }
  28012. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  28013. return aPath;
  28014. }
  28015. // `join('http://', 'www.example.com')`
  28016. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  28017. aRootUrl.host = aPath;
  28018. return urlGenerate(aRootUrl);
  28019. }
  28020. var joined = aPath.charAt(0) === '/'
  28021. ? aPath
  28022. : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
  28023. if (aRootUrl) {
  28024. aRootUrl.path = joined;
  28025. return urlGenerate(aRootUrl);
  28026. }
  28027. return joined;
  28028. }
  28029. exports.join = join;
  28030. exports.isAbsolute = function (aPath) {
  28031. return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
  28032. };
  28033. /**
  28034. * Make a path relative to a URL or another path.
  28035. *
  28036. * @param aRoot The root path or URL.
  28037. * @param aPath The path or URL to be made relative to aRoot.
  28038. */
  28039. function relative(aRoot, aPath) {
  28040. if (aRoot === "") {
  28041. aRoot = ".";
  28042. }
  28043. aRoot = aRoot.replace(/\/$/, '');
  28044. // It is possible for the path to be above the root. In this case, simply
  28045. // checking whether the root is a prefix of the path won't work. Instead, we
  28046. // need to remove components from the root one by one, until either we find
  28047. // a prefix that fits, or we run out of components to remove.
  28048. var level = 0;
  28049. while (aPath.indexOf(aRoot + '/') !== 0) {
  28050. var index = aRoot.lastIndexOf("/");
  28051. if (index < 0) {
  28052. return aPath;
  28053. }
  28054. // If the only part of the root that is left is the scheme (i.e. http://,
  28055. // file:///, etc.), one or more slashes (/), or simply nothing at all, we
  28056. // have exhausted all components, so the path is not relative to the root.
  28057. aRoot = aRoot.slice(0, index);
  28058. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  28059. return aPath;
  28060. }
  28061. ++level;
  28062. }
  28063. // Make sure we add a "../" for each component we removed from the root.
  28064. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  28065. }
  28066. exports.relative = relative;
  28067. var supportsNullProto = (function () {
  28068. var obj = Object.create(null);
  28069. return !('__proto__' in obj);
  28070. }());
  28071. function identity (s) {
  28072. return s;
  28073. }
  28074. /**
  28075. * Because behavior goes wacky when you set `__proto__` on objects, we
  28076. * have to prefix all the strings in our set with an arbitrary character.
  28077. *
  28078. * See https://github.com/mozilla/source-map/pull/31 and
  28079. * https://github.com/mozilla/source-map/issues/30
  28080. *
  28081. * @param String aStr
  28082. */
  28083. function toSetString(aStr) {
  28084. if (isProtoString(aStr)) {
  28085. return '$' + aStr;
  28086. }
  28087. return aStr;
  28088. }
  28089. exports.toSetString = supportsNullProto ? identity : toSetString;
  28090. function fromSetString(aStr) {
  28091. if (isProtoString(aStr)) {
  28092. return aStr.slice(1);
  28093. }
  28094. return aStr;
  28095. }
  28096. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  28097. function isProtoString(s) {
  28098. if (!s) {
  28099. return false;
  28100. }
  28101. var length = s.length;
  28102. if (length < 9 /* "__proto__".length */) {
  28103. return false;
  28104. }
  28105. if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
  28106. s.charCodeAt(length - 2) !== 95 /* '_' */ ||
  28107. s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
  28108. s.charCodeAt(length - 4) !== 116 /* 't' */ ||
  28109. s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
  28110. s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
  28111. s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
  28112. s.charCodeAt(length - 8) !== 95 /* '_' */ ||
  28113. s.charCodeAt(length - 9) !== 95 /* '_' */) {
  28114. return false;
  28115. }
  28116. for (var i = length - 10; i >= 0; i--) {
  28117. if (s.charCodeAt(i) !== 36 /* '$' */) {
  28118. return false;
  28119. }
  28120. }
  28121. return true;
  28122. }
  28123. /**
  28124. * Comparator between two mappings where the original positions are compared.
  28125. *
  28126. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  28127. * mappings with the same original source/line/column, but different generated
  28128. * line and column the same. Useful when searching for a mapping with a
  28129. * stubbed out mapping.
  28130. */
  28131. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  28132. var cmp = mappingA.source - mappingB.source;
  28133. if (cmp !== 0) {
  28134. return cmp;
  28135. }
  28136. cmp = mappingA.originalLine - mappingB.originalLine;
  28137. if (cmp !== 0) {
  28138. return cmp;
  28139. }
  28140. cmp = mappingA.originalColumn - mappingB.originalColumn;
  28141. if (cmp !== 0 || onlyCompareOriginal) {
  28142. return cmp;
  28143. }
  28144. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  28145. if (cmp !== 0) {
  28146. return cmp;
  28147. }
  28148. cmp = mappingA.generatedLine - mappingB.generatedLine;
  28149. if (cmp !== 0) {
  28150. return cmp;
  28151. }
  28152. return mappingA.name - mappingB.name;
  28153. }
  28154. exports.compareByOriginalPositions = compareByOriginalPositions;
  28155. /**
  28156. * Comparator between two mappings with deflated source and name indices where
  28157. * the generated positions are compared.
  28158. *
  28159. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  28160. * mappings with the same generated line and column, but different
  28161. * source/name/original line and column the same. Useful when searching for a
  28162. * mapping with a stubbed out mapping.
  28163. */
  28164. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  28165. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  28166. if (cmp !== 0) {
  28167. return cmp;
  28168. }
  28169. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  28170. if (cmp !== 0 || onlyCompareGenerated) {
  28171. return cmp;
  28172. }
  28173. cmp = mappingA.source - mappingB.source;
  28174. if (cmp !== 0) {
  28175. return cmp;
  28176. }
  28177. cmp = mappingA.originalLine - mappingB.originalLine;
  28178. if (cmp !== 0) {
  28179. return cmp;
  28180. }
  28181. cmp = mappingA.originalColumn - mappingB.originalColumn;
  28182. if (cmp !== 0) {
  28183. return cmp;
  28184. }
  28185. return mappingA.name - mappingB.name;
  28186. }
  28187. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  28188. function strcmp(aStr1, aStr2) {
  28189. if (aStr1 === aStr2) {
  28190. return 0;
  28191. }
  28192. if (aStr1 > aStr2) {
  28193. return 1;
  28194. }
  28195. return -1;
  28196. }
  28197. /**
  28198. * Comparator between two mappings with inflated source and name strings where
  28199. * the generated positions are compared.
  28200. */
  28201. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  28202. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  28203. if (cmp !== 0) {
  28204. return cmp;
  28205. }
  28206. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  28207. if (cmp !== 0) {
  28208. return cmp;
  28209. }
  28210. cmp = strcmp(mappingA.source, mappingB.source);
  28211. if (cmp !== 0) {
  28212. return cmp;
  28213. }
  28214. cmp = mappingA.originalLine - mappingB.originalLine;
  28215. if (cmp !== 0) {
  28216. return cmp;
  28217. }
  28218. cmp = mappingA.originalColumn - mappingB.originalColumn;
  28219. if (cmp !== 0) {
  28220. return cmp;
  28221. }
  28222. return strcmp(mappingA.name, mappingB.name);
  28223. }
  28224. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  28225. /***/ }),
  28226. /* 1 */
  28227. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  28228. "use strict";
  28229. /* unused harmony export StackFrame */
  28230. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ScriptLine; });
  28231. 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; }; }();
  28232. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  28233. /**
  28234. * Copyright (c) 2015-present, Facebook, Inc.
  28235. *
  28236. * This source code is licensed under the MIT license found in the
  28237. * LICENSE file in the root directory of this source tree.
  28238. */
  28239. /** A container holding a script line. */
  28240. var ScriptLine =
  28241. /** The content (or value) of this line of source. */
  28242. function ScriptLine(lineNumber, content) {
  28243. var highlight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  28244. _classCallCheck(this, ScriptLine);
  28245. this.lineNumber = lineNumber;
  28246. this.content = content;
  28247. this.highlight = highlight;
  28248. }
  28249. /** Whether or not this line should be highlighted. Particularly useful for error reporting with context. */
  28250. /** The line number of this line of source. */
  28251. ;
  28252. /**
  28253. * A representation of a stack frame.
  28254. */
  28255. var StackFrame = function () {
  28256. function StackFrame() {
  28257. var functionName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  28258. var fileName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  28259. var lineNumber = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  28260. var columnNumber = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
  28261. var scriptCode = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
  28262. var sourceFunctionName = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
  28263. var sourceFileName = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
  28264. var sourceLineNumber = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
  28265. var sourceColumnNumber = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
  28266. var sourceScriptCode = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : null;
  28267. _classCallCheck(this, StackFrame);
  28268. if (functionName && functionName.indexOf('Object.') === 0) {
  28269. functionName = functionName.slice('Object.'.length);
  28270. }
  28271. if (
  28272. // Chrome has a bug with inferring function.name:
  28273. // https://github.com/facebookincubator/create-react-app/issues/2097
  28274. // Let's ignore a meaningless name we get for top-level modules.
  28275. functionName === 'friendlySyntaxErrorLabel' || functionName === 'exports.__esModule' || functionName === '<anonymous>' || !functionName) {
  28276. functionName = null;
  28277. }
  28278. this.functionName = functionName;
  28279. this.fileName = fileName;
  28280. this.lineNumber = lineNumber;
  28281. this.columnNumber = columnNumber;
  28282. this._originalFunctionName = sourceFunctionName;
  28283. this._originalFileName = sourceFileName;
  28284. this._originalLineNumber = sourceLineNumber;
  28285. this._originalColumnNumber = sourceColumnNumber;
  28286. this._scriptCode = scriptCode;
  28287. this._originalScriptCode = sourceScriptCode;
  28288. }
  28289. /**
  28290. * Returns the name of this function.
  28291. */
  28292. _createClass(StackFrame, [{
  28293. key: 'getFunctionName',
  28294. value: function getFunctionName() {
  28295. return this.functionName || '(anonymous function)';
  28296. }
  28297. /**
  28298. * Returns the source of the frame.
  28299. * This contains the file name, line number, and column number when available.
  28300. */
  28301. }, {
  28302. key: 'getSource',
  28303. value: function getSource() {
  28304. var str = '';
  28305. if (this.fileName != null) {
  28306. str += this.fileName + ':';
  28307. }
  28308. if (this.lineNumber != null) {
  28309. str += this.lineNumber + ':';
  28310. }
  28311. if (this.columnNumber != null) {
  28312. str += this.columnNumber + ':';
  28313. }
  28314. return str.slice(0, -1);
  28315. }
  28316. /**
  28317. * Returns a pretty version of this stack frame.
  28318. */
  28319. }, {
  28320. key: 'toString',
  28321. value: function toString() {
  28322. var functionName = this.getFunctionName();
  28323. var source = this.getSource();
  28324. return '' + functionName + (source ? ' (' + source + ')' : '');
  28325. }
  28326. }]);
  28327. return StackFrame;
  28328. }();
  28329. /* harmony default export */ __webpack_exports__["b"] = (StackFrame);
  28330. /***/ }),
  28331. /* 2 */
  28332. /***/ (function(module, exports, __webpack_require__) {
  28333. module.exports = __webpack_require__(19);
  28334. /***/ }),
  28335. /* 3 */
  28336. /***/ (function(module, exports) {
  28337. // shim for using process in browser
  28338. var process = module.exports = {};
  28339. // cached from whatever global is present so that test runners that stub it
  28340. // don't break things. But we need to wrap it in a try catch in case it is
  28341. // wrapped in strict mode code which doesn't define any globals. It's inside a
  28342. // function because try/catches deoptimize in certain engines.
  28343. var cachedSetTimeout;
  28344. var cachedClearTimeout;
  28345. function defaultSetTimout() {
  28346. throw new Error('setTimeout has not been defined');
  28347. }
  28348. function defaultClearTimeout () {
  28349. throw new Error('clearTimeout has not been defined');
  28350. }
  28351. (function () {
  28352. try {
  28353. if (typeof setTimeout === 'function') {
  28354. cachedSetTimeout = setTimeout;
  28355. } else {
  28356. cachedSetTimeout = defaultSetTimout;
  28357. }
  28358. } catch (e) {
  28359. cachedSetTimeout = defaultSetTimout;
  28360. }
  28361. try {
  28362. if (typeof clearTimeout === 'function') {
  28363. cachedClearTimeout = clearTimeout;
  28364. } else {
  28365. cachedClearTimeout = defaultClearTimeout;
  28366. }
  28367. } catch (e) {
  28368. cachedClearTimeout = defaultClearTimeout;
  28369. }
  28370. } ())
  28371. function runTimeout(fun) {
  28372. if (cachedSetTimeout === setTimeout) {
  28373. //normal enviroments in sane situations
  28374. return setTimeout(fun, 0);
  28375. }
  28376. // if setTimeout wasn't available but was latter defined
  28377. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  28378. cachedSetTimeout = setTimeout;
  28379. return setTimeout(fun, 0);
  28380. }
  28381. try {
  28382. // when when somebody has screwed with setTimeout but no I.E. maddness
  28383. return cachedSetTimeout(fun, 0);
  28384. } catch(e){
  28385. try {
  28386. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  28387. return cachedSetTimeout.call(null, fun, 0);
  28388. } catch(e){
  28389. // 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
  28390. return cachedSetTimeout.call(this, fun, 0);
  28391. }
  28392. }
  28393. }
  28394. function runClearTimeout(marker) {
  28395. if (cachedClearTimeout === clearTimeout) {
  28396. //normal enviroments in sane situations
  28397. return clearTimeout(marker);
  28398. }
  28399. // if clearTimeout wasn't available but was latter defined
  28400. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  28401. cachedClearTimeout = clearTimeout;
  28402. return clearTimeout(marker);
  28403. }
  28404. try {
  28405. // when when somebody has screwed with setTimeout but no I.E. maddness
  28406. return cachedClearTimeout(marker);
  28407. } catch (e){
  28408. try {
  28409. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  28410. return cachedClearTimeout.call(null, marker);
  28411. } catch (e){
  28412. // 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.
  28413. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  28414. return cachedClearTimeout.call(this, marker);
  28415. }
  28416. }
  28417. }
  28418. var queue = [];
  28419. var draining = false;
  28420. var currentQueue;
  28421. var queueIndex = -1;
  28422. function cleanUpNextTick() {
  28423. if (!draining || !currentQueue) {
  28424. return;
  28425. }
  28426. draining = false;
  28427. if (currentQueue.length) {
  28428. queue = currentQueue.concat(queue);
  28429. } else {
  28430. queueIndex = -1;
  28431. }
  28432. if (queue.length) {
  28433. drainQueue();
  28434. }
  28435. }
  28436. function drainQueue() {
  28437. if (draining) {
  28438. return;
  28439. }
  28440. var timeout = runTimeout(cleanUpNextTick);
  28441. draining = true;
  28442. var len = queue.length;
  28443. while(len) {
  28444. currentQueue = queue;
  28445. queue = [];
  28446. while (++queueIndex < len) {
  28447. if (currentQueue) {
  28448. currentQueue[queueIndex].run();
  28449. }
  28450. }
  28451. queueIndex = -1;
  28452. len = queue.length;
  28453. }
  28454. currentQueue = null;
  28455. draining = false;
  28456. runClearTimeout(timeout);
  28457. }
  28458. process.nextTick = function (fun) {
  28459. var args = new Array(arguments.length - 1);
  28460. if (arguments.length > 1) {
  28461. for (var i = 1; i < arguments.length; i++) {
  28462. args[i - 1] = arguments[i];
  28463. }
  28464. }
  28465. queue.push(new Item(fun, args));
  28466. if (queue.length === 1 && !draining) {
  28467. runTimeout(drainQueue);
  28468. }
  28469. };
  28470. // v8 likes predictible objects
  28471. function Item(fun, array) {
  28472. this.fun = fun;
  28473. this.array = array;
  28474. }
  28475. Item.prototype.run = function () {
  28476. this.fun.apply(null, this.array);
  28477. };
  28478. process.title = 'browser';
  28479. process.browser = true;
  28480. process.env = {};
  28481. process.argv = [];
  28482. process.version = ''; // empty string to avoid regexp issues
  28483. process.versions = {};
  28484. function noop() {}
  28485. process.on = noop;
  28486. process.addListener = noop;
  28487. process.once = noop;
  28488. process.off = noop;
  28489. process.removeListener = noop;
  28490. process.removeAllListeners = noop;
  28491. process.emit = noop;
  28492. process.prependListener = noop;
  28493. process.prependOnceListener = noop;
  28494. process.listeners = function (name) { return [] }
  28495. process.binding = function (name) {
  28496. throw new Error('process.binding is not supported');
  28497. };
  28498. process.cwd = function () { return '/' };
  28499. process.chdir = function (dir) {
  28500. throw new Error('process.chdir is not supported');
  28501. };
  28502. process.umask = function() { return 0; };
  28503. /***/ }),
  28504. /* 4 */
  28505. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  28506. "use strict";
  28507. /* unused harmony export extractSourceMapUrl */
  28508. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getSourceMap; });
  28509. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(2);
  28510. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
  28511. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_source_map__ = __webpack_require__(21);
  28512. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_source_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_source_map__);
  28513. 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; }; }();
  28514. /**
  28515. * Returns an instance of <code>{@link SourceMap}</code> for a given fileUri and fileContents.
  28516. * @param {string} fileUri The URI of the source file.
  28517. * @param {string} fileContents The contents of the source file.
  28518. */
  28519. var getSourceMap = function () {
  28520. var _ref = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(fileUri, fileContents) {
  28521. var sm, base64, match2, index, url, obj;
  28522. return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
  28523. while (1) {
  28524. switch (_context.prev = _context.next) {
  28525. case 0:
  28526. _context.next = 2;
  28527. return extractSourceMapUrl(fileUri, fileContents);
  28528. case 2:
  28529. sm = _context.sent;
  28530. if (!(sm.indexOf('data:') === 0)) {
  28531. _context.next = 14;
  28532. break;
  28533. }
  28534. base64 = /^data:application\/json;([\w=:"-]+;)*base64,/;
  28535. match2 = sm.match(base64);
  28536. if (match2) {
  28537. _context.next = 8;
  28538. break;
  28539. }
  28540. throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
  28541. case 8:
  28542. sm = sm.substring(match2[0].length);
  28543. sm = window.atob(sm);
  28544. sm = JSON.parse(sm);
  28545. return _context.abrupt('return', new SourceMap(new __WEBPACK_IMPORTED_MODULE_1_source_map__["SourceMapConsumer"](sm)));
  28546. case 14:
  28547. index = fileUri.lastIndexOf('/');
  28548. url = fileUri.substring(0, index + 1) + sm;
  28549. _context.next = 18;
  28550. return fetch(url).then(function (res) {
  28551. return res.json();
  28552. });
  28553. case 18:
  28554. obj = _context.sent;
  28555. return _context.abrupt('return', new SourceMap(new __WEBPACK_IMPORTED_MODULE_1_source_map__["SourceMapConsumer"](obj)));
  28556. case 20:
  28557. case 'end':
  28558. return _context.stop();
  28559. }
  28560. }
  28561. }, _callee, this);
  28562. }));
  28563. return function getSourceMap(_x, _x2) {
  28564. return _ref.apply(this, arguments);
  28565. };
  28566. }();
  28567. function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
  28568. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  28569. /**
  28570. * Copyright (c) 2015-present, Facebook, Inc.
  28571. *
  28572. * This source code is licensed under the MIT license found in the
  28573. * LICENSE file in the root directory of this source tree.
  28574. */
  28575. /**
  28576. * A wrapped instance of a <code>{@link https://github.com/mozilla/source-map SourceMapConsumer}</code>.
  28577. *
  28578. * This exposes methods which will be indifferent to changes made in <code>{@link https://github.com/mozilla/source-map source-map}</code>.
  28579. */
  28580. var SourceMap = function () {
  28581. function SourceMap(sourceMap) {
  28582. _classCallCheck(this, SourceMap);
  28583. this.__source_map = sourceMap;
  28584. }
  28585. /**
  28586. * Returns the original code position for a generated code position.
  28587. * @param {number} line The line of the generated code position.
  28588. * @param {number} column The column of the generated code position.
  28589. */
  28590. _createClass(SourceMap, [{
  28591. key: 'getOriginalPosition',
  28592. value: function getOriginalPosition(line, column) {
  28593. var _source_map$original = this.__source_map.originalPositionFor({
  28594. line: line,
  28595. column: column
  28596. }),
  28597. l = _source_map$original.line,
  28598. c = _source_map$original.column,
  28599. s = _source_map$original.source;
  28600. return { line: l, column: c, source: s };
  28601. }
  28602. /**
  28603. * Returns the generated code position for an original position.
  28604. * @param {string} source The source file of the original code position.
  28605. * @param {number} line The line of the original code position.
  28606. * @param {number} column The column of the original code position.
  28607. */
  28608. }, {
  28609. key: 'getGeneratedPosition',
  28610. value: function getGeneratedPosition(source, line, column) {
  28611. var _source_map$generate = this.__source_map.generatedPositionFor({
  28612. source: source,
  28613. line: line,
  28614. column: column
  28615. }),
  28616. l = _source_map$generate.line,
  28617. c = _source_map$generate.column;
  28618. return {
  28619. line: l,
  28620. column: c
  28621. };
  28622. }
  28623. /**
  28624. * Returns the code for a given source file name.
  28625. * @param {string} sourceName The name of the source file.
  28626. */
  28627. }, {
  28628. key: 'getSource',
  28629. value: function getSource(sourceName) {
  28630. return this.__source_map.sourceContentFor(sourceName);
  28631. }
  28632. }, {
  28633. key: 'getSources',
  28634. value: function getSources() {
  28635. return this.__source_map.sources;
  28636. }
  28637. }]);
  28638. return SourceMap;
  28639. }();
  28640. function extractSourceMapUrl(fileUri, fileContents) {
  28641. var regex = /\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm;
  28642. var match = null;
  28643. for (;;) {
  28644. var next = regex.exec(fileContents);
  28645. if (next == null) {
  28646. break;
  28647. }
  28648. match = next;
  28649. }
  28650. if (!(match && match[1])) {
  28651. return Promise.reject('Cannot find a source map directive for ' + fileUri + '.');
  28652. }
  28653. return Promise.resolve(match[1].toString());
  28654. }
  28655. /* unused harmony default export */ var _unused_webpack_default_export = (getSourceMap);
  28656. /***/ }),
  28657. /* 5 */
  28658. /***/ (function(module, exports, __webpack_require__) {
  28659. /* -*- Mode: js; js-indent-level: 2; -*- */
  28660. /*
  28661. * Copyright 2011 Mozilla Foundation and contributors
  28662. * Licensed under the New BSD license. See LICENSE or:
  28663. * http://opensource.org/licenses/BSD-3-Clause
  28664. */
  28665. var base64VLQ = __webpack_require__(6);
  28666. var util = __webpack_require__(0);
  28667. var ArraySet = __webpack_require__(7).ArraySet;
  28668. var MappingList = __webpack_require__(23).MappingList;
  28669. /**
  28670. * An instance of the SourceMapGenerator represents a source map which is
  28671. * being built incrementally. You may pass an object with the following
  28672. * properties:
  28673. *
  28674. * - file: The filename of the generated source.
  28675. * - sourceRoot: A root for all relative URLs in this source map.
  28676. */
  28677. function SourceMapGenerator(aArgs) {
  28678. if (!aArgs) {
  28679. aArgs = {};
  28680. }
  28681. this._file = util.getArg(aArgs, 'file', null);
  28682. this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
  28683. this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
  28684. this._sources = new ArraySet();
  28685. this._names = new ArraySet();
  28686. this._mappings = new MappingList();
  28687. this._sourcesContents = null;
  28688. }
  28689. SourceMapGenerator.prototype._version = 3;
  28690. /**
  28691. * Creates a new SourceMapGenerator based on a SourceMapConsumer
  28692. *
  28693. * @param aSourceMapConsumer The SourceMap.
  28694. */
  28695. SourceMapGenerator.fromSourceMap =
  28696. function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  28697. var sourceRoot = aSourceMapConsumer.sourceRoot;
  28698. var generator = new SourceMapGenerator({
  28699. file: aSourceMapConsumer.file,
  28700. sourceRoot: sourceRoot
  28701. });
  28702. aSourceMapConsumer.eachMapping(function (mapping) {
  28703. var newMapping = {
  28704. generated: {
  28705. line: mapping.generatedLine,
  28706. column: mapping.generatedColumn
  28707. }
  28708. };
  28709. if (mapping.source != null) {
  28710. newMapping.source = mapping.source;
  28711. if (sourceRoot != null) {
  28712. newMapping.source = util.relative(sourceRoot, newMapping.source);
  28713. }
  28714. newMapping.original = {
  28715. line: mapping.originalLine,
  28716. column: mapping.originalColumn
  28717. };
  28718. if (mapping.name != null) {
  28719. newMapping.name = mapping.name;
  28720. }
  28721. }
  28722. generator.addMapping(newMapping);
  28723. });
  28724. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  28725. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  28726. if (content != null) {
  28727. generator.setSourceContent(sourceFile, content);
  28728. }
  28729. });
  28730. return generator;
  28731. };
  28732. /**
  28733. * Add a single mapping from original source line and column to the generated
  28734. * source's line and column for this source map being created. The mapping
  28735. * object should have the following properties:
  28736. *
  28737. * - generated: An object with the generated line and column positions.
  28738. * - original: An object with the original line and column positions.
  28739. * - source: The original source file (relative to the sourceRoot).
  28740. * - name: An optional original token name for this mapping.
  28741. */
  28742. SourceMapGenerator.prototype.addMapping =
  28743. function SourceMapGenerator_addMapping(aArgs) {
  28744. var generated = util.getArg(aArgs, 'generated');
  28745. var original = util.getArg(aArgs, 'original', null);
  28746. var source = util.getArg(aArgs, 'source', null);
  28747. var name = util.getArg(aArgs, 'name', null);
  28748. if (!this._skipValidation) {
  28749. this._validateMapping(generated, original, source, name);
  28750. }
  28751. if (source != null) {
  28752. source = String(source);
  28753. if (!this._sources.has(source)) {
  28754. this._sources.add(source);
  28755. }
  28756. }
  28757. if (name != null) {
  28758. name = String(name);
  28759. if (!this._names.has(name)) {
  28760. this._names.add(name);
  28761. }
  28762. }
  28763. this._mappings.add({
  28764. generatedLine: generated.line,
  28765. generatedColumn: generated.column,
  28766. originalLine: original != null && original.line,
  28767. originalColumn: original != null && original.column,
  28768. source: source,
  28769. name: name
  28770. });
  28771. };
  28772. /**
  28773. * Set the source content for a source file.
  28774. */
  28775. SourceMapGenerator.prototype.setSourceContent =
  28776. function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  28777. var source = aSourceFile;
  28778. if (this._sourceRoot != null) {
  28779. source = util.relative(this._sourceRoot, source);
  28780. }
  28781. if (aSourceContent != null) {
  28782. // Add the source content to the _sourcesContents map.
  28783. // Create a new _sourcesContents map if the property is null.
  28784. if (!this._sourcesContents) {
  28785. this._sourcesContents = Object.create(null);
  28786. }
  28787. this._sourcesContents[util.toSetString(source)] = aSourceContent;
  28788. } else if (this._sourcesContents) {
  28789. // Remove the source file from the _sourcesContents map.
  28790. // If the _sourcesContents map is empty, set the property to null.
  28791. delete this._sourcesContents[util.toSetString(source)];
  28792. if (Object.keys(this._sourcesContents).length === 0) {
  28793. this._sourcesContents = null;
  28794. }
  28795. }
  28796. };
  28797. /**
  28798. * Applies the mappings of a sub-source-map for a specific source file to the
  28799. * source map being generated. Each mapping to the supplied source file is
  28800. * rewritten using the supplied source map. Note: The resolution for the
  28801. * resulting mappings is the minimium of this map and the supplied map.
  28802. *
  28803. * @param aSourceMapConsumer The source map to be applied.
  28804. * @param aSourceFile Optional. The filename of the source file.
  28805. * If omitted, SourceMapConsumer's file property will be used.
  28806. * @param aSourceMapPath Optional. The dirname of the path to the source map
  28807. * to be applied. If relative, it is relative to the SourceMapConsumer.
  28808. * This parameter is needed when the two source maps aren't in the same
  28809. * directory, and the source map to be applied contains relative source
  28810. * paths. If so, those relative source paths need to be rewritten
  28811. * relative to the SourceMapGenerator.
  28812. */
  28813. SourceMapGenerator.prototype.applySourceMap =
  28814. function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  28815. var sourceFile = aSourceFile;
  28816. // If aSourceFile is omitted, we will use the file property of the SourceMap
  28817. if (aSourceFile == null) {
  28818. if (aSourceMapConsumer.file == null) {
  28819. throw new Error(
  28820. 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
  28821. 'or the source map\'s "file" property. Both were omitted.'
  28822. );
  28823. }
  28824. sourceFile = aSourceMapConsumer.file;
  28825. }
  28826. var sourceRoot = this._sourceRoot;
  28827. // Make "sourceFile" relative if an absolute Url is passed.
  28828. if (sourceRoot != null) {
  28829. sourceFile = util.relative(sourceRoot, sourceFile);
  28830. }
  28831. // Applying the SourceMap can add and remove items from the sources and
  28832. // the names array.
  28833. var newSources = new ArraySet();
  28834. var newNames = new ArraySet();
  28835. // Find mappings for the "sourceFile"
  28836. this._mappings.unsortedForEach(function (mapping) {
  28837. if (mapping.source === sourceFile && mapping.originalLine != null) {
  28838. // Check if it can be mapped by the source map, then update the mapping.
  28839. var original = aSourceMapConsumer.originalPositionFor({
  28840. line: mapping.originalLine,
  28841. column: mapping.originalColumn
  28842. });
  28843. if (original.source != null) {
  28844. // Copy mapping
  28845. mapping.source = original.source;
  28846. if (aSourceMapPath != null) {
  28847. mapping.source = util.join(aSourceMapPath, mapping.source)
  28848. }
  28849. if (sourceRoot != null) {
  28850. mapping.source = util.relative(sourceRoot, mapping.source);
  28851. }
  28852. mapping.originalLine = original.line;
  28853. mapping.originalColumn = original.column;
  28854. if (original.name != null) {
  28855. mapping.name = original.name;
  28856. }
  28857. }
  28858. }
  28859. var source = mapping.source;
  28860. if (source != null && !newSources.has(source)) {
  28861. newSources.add(source);
  28862. }
  28863. var name = mapping.name;
  28864. if (name != null && !newNames.has(name)) {
  28865. newNames.add(name);
  28866. }
  28867. }, this);
  28868. this._sources = newSources;
  28869. this._names = newNames;
  28870. // Copy sourcesContents of applied map.
  28871. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  28872. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  28873. if (content != null) {
  28874. if (aSourceMapPath != null) {
  28875. sourceFile = util.join(aSourceMapPath, sourceFile);
  28876. }
  28877. if (sourceRoot != null) {
  28878. sourceFile = util.relative(sourceRoot, sourceFile);
  28879. }
  28880. this.setSourceContent(sourceFile, content);
  28881. }
  28882. }, this);
  28883. };
  28884. /**
  28885. * A mapping can have one of the three levels of data:
  28886. *
  28887. * 1. Just the generated position.
  28888. * 2. The Generated position, original position, and original source.
  28889. * 3. Generated and original position, original source, as well as a name
  28890. * token.
  28891. *
  28892. * To maintain consistency, we validate that any new mapping being added falls
  28893. * in to one of these categories.
  28894. */
  28895. SourceMapGenerator.prototype._validateMapping =
  28896. function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
  28897. aName) {
  28898. if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
  28899. && aGenerated.line > 0 && aGenerated.column >= 0
  28900. && !aOriginal && !aSource && !aName) {
  28901. // Case 1.
  28902. return;
  28903. }
  28904. else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
  28905. && aOriginal && 'line' in aOriginal && 'column' in aOriginal
  28906. && aGenerated.line > 0 && aGenerated.column >= 0
  28907. && aOriginal.line > 0 && aOriginal.column >= 0
  28908. && aSource) {
  28909. // Cases 2 and 3.
  28910. return;
  28911. }
  28912. else {
  28913. throw new Error('Invalid mapping: ' + JSON.stringify({
  28914. generated: aGenerated,
  28915. source: aSource,
  28916. original: aOriginal,
  28917. name: aName
  28918. }));
  28919. }
  28920. };
  28921. /**
  28922. * Serialize the accumulated mappings in to the stream of base 64 VLQs
  28923. * specified by the source map format.
  28924. */
  28925. SourceMapGenerator.prototype._serializeMappings =
  28926. function SourceMapGenerator_serializeMappings() {
  28927. var previousGeneratedColumn = 0;
  28928. var previousGeneratedLine = 1;
  28929. var previousOriginalColumn = 0;
  28930. var previousOriginalLine = 0;
  28931. var previousName = 0;
  28932. var previousSource = 0;
  28933. var result = '';
  28934. var next;
  28935. var mapping;
  28936. var nameIdx;
  28937. var sourceIdx;
  28938. var mappings = this._mappings.toArray();
  28939. for (var i = 0, len = mappings.length; i < len; i++) {
  28940. mapping = mappings[i];
  28941. next = ''
  28942. if (mapping.generatedLine !== previousGeneratedLine) {
  28943. previousGeneratedColumn = 0;
  28944. while (mapping.generatedLine !== previousGeneratedLine) {
  28945. next += ';';
  28946. previousGeneratedLine++;
  28947. }
  28948. }
  28949. else {
  28950. if (i > 0) {
  28951. if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  28952. continue;
  28953. }
  28954. next += ',';
  28955. }
  28956. }
  28957. next += base64VLQ.encode(mapping.generatedColumn
  28958. - previousGeneratedColumn);
  28959. previousGeneratedColumn = mapping.generatedColumn;
  28960. if (mapping.source != null) {
  28961. sourceIdx = this._sources.indexOf(mapping.source);
  28962. next += base64VLQ.encode(sourceIdx - previousSource);
  28963. previousSource = sourceIdx;
  28964. // lines are stored 0-based in SourceMap spec version 3
  28965. next += base64VLQ.encode(mapping.originalLine - 1
  28966. - previousOriginalLine);
  28967. previousOriginalLine = mapping.originalLine - 1;
  28968. next += base64VLQ.encode(mapping.originalColumn
  28969. - previousOriginalColumn);
  28970. previousOriginalColumn = mapping.originalColumn;
  28971. if (mapping.name != null) {
  28972. nameIdx = this._names.indexOf(mapping.name);
  28973. next += base64VLQ.encode(nameIdx - previousName);
  28974. previousName = nameIdx;
  28975. }
  28976. }
  28977. result += next;
  28978. }
  28979. return result;
  28980. };
  28981. SourceMapGenerator.prototype._generateSourcesContent =
  28982. function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  28983. return aSources.map(function (source) {
  28984. if (!this._sourcesContents) {
  28985. return null;
  28986. }
  28987. if (aSourceRoot != null) {
  28988. source = util.relative(aSourceRoot, source);
  28989. }
  28990. var key = util.toSetString(source);
  28991. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
  28992. ? this._sourcesContents[key]
  28993. : null;
  28994. }, this);
  28995. };
  28996. /**
  28997. * Externalize the source map.
  28998. */
  28999. SourceMapGenerator.prototype.toJSON =
  29000. function SourceMapGenerator_toJSON() {
  29001. var map = {
  29002. version: this._version,
  29003. sources: this._sources.toArray(),
  29004. names: this._names.toArray(),
  29005. mappings: this._serializeMappings()
  29006. };
  29007. if (this._file != null) {
  29008. map.file = this._file;
  29009. }
  29010. if (this._sourceRoot != null) {
  29011. map.sourceRoot = this._sourceRoot;
  29012. }
  29013. if (this._sourcesContents) {
  29014. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  29015. }
  29016. return map;
  29017. };
  29018. /**
  29019. * Render the source map being generated to a string.
  29020. */
  29021. SourceMapGenerator.prototype.toString =
  29022. function SourceMapGenerator_toString() {
  29023. return JSON.stringify(this.toJSON());
  29024. };
  29025. exports.SourceMapGenerator = SourceMapGenerator;
  29026. /***/ }),
  29027. /* 6 */
  29028. /***/ (function(module, exports, __webpack_require__) {
  29029. /* -*- Mode: js; js-indent-level: 2; -*- */
  29030. /*
  29031. * Copyright 2011 Mozilla Foundation and contributors
  29032. * Licensed under the New BSD license. See LICENSE or:
  29033. * http://opensource.org/licenses/BSD-3-Clause
  29034. *
  29035. * Based on the Base 64 VLQ implementation in Closure Compiler:
  29036. * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
  29037. *
  29038. * Copyright 2011 The Closure Compiler Authors. All rights reserved.
  29039. * Redistribution and use in source and binary forms, with or without
  29040. * modification, are permitted provided that the following conditions are
  29041. * met:
  29042. *
  29043. * * Redistributions of source code must retain the above copyright
  29044. * notice, this list of conditions and the following disclaimer.
  29045. * * Redistributions in binary form must reproduce the above
  29046. * copyright notice, this list of conditions and the following
  29047. * disclaimer in the documentation and/or other materials provided
  29048. * with the distribution.
  29049. * * Neither the name of Google Inc. nor the names of its
  29050. * contributors may be used to endorse or promote products derived
  29051. * from this software without specific prior written permission.
  29052. *
  29053. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29054. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  29055. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  29056. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  29057. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29058. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  29059. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  29060. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29061. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29062. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29063. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29064. */
  29065. var base64 = __webpack_require__(22);
  29066. // A single base 64 digit can contain 6 bits of data. For the base 64 variable
  29067. // length quantities we use in the source map spec, the first bit is the sign,
  29068. // the next four bits are the actual value, and the 6th bit is the
  29069. // continuation bit. The continuation bit tells us whether there are more
  29070. // digits in this value following this digit.
  29071. //
  29072. // Continuation
  29073. // | Sign
  29074. // | |
  29075. // V V
  29076. // 101011
  29077. var VLQ_BASE_SHIFT = 5;
  29078. // binary: 100000
  29079. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  29080. // binary: 011111
  29081. var VLQ_BASE_MASK = VLQ_BASE - 1;
  29082. // binary: 100000
  29083. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  29084. /**
  29085. * Converts from a two-complement value to a value where the sign bit is
  29086. * placed in the least significant bit. For example, as decimals:
  29087. * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
  29088. * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
  29089. */
  29090. function toVLQSigned(aValue) {
  29091. return aValue < 0
  29092. ? ((-aValue) << 1) + 1
  29093. : (aValue << 1) + 0;
  29094. }
  29095. /**
  29096. * Converts to a two-complement value from a value where the sign bit is
  29097. * placed in the least significant bit. For example, as decimals:
  29098. * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
  29099. * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
  29100. */
  29101. function fromVLQSigned(aValue) {
  29102. var isNegative = (aValue & 1) === 1;
  29103. var shifted = aValue >> 1;
  29104. return isNegative
  29105. ? -shifted
  29106. : shifted;
  29107. }
  29108. /**
  29109. * Returns the base 64 VLQ encoded value.
  29110. */
  29111. exports.encode = function base64VLQ_encode(aValue) {
  29112. var encoded = "";
  29113. var digit;
  29114. var vlq = toVLQSigned(aValue);
  29115. do {
  29116. digit = vlq & VLQ_BASE_MASK;
  29117. vlq >>>= VLQ_BASE_SHIFT;
  29118. if (vlq > 0) {
  29119. // There are still more digits in this value, so we must make sure the
  29120. // continuation bit is marked.
  29121. digit |= VLQ_CONTINUATION_BIT;
  29122. }
  29123. encoded += base64.encode(digit);
  29124. } while (vlq > 0);
  29125. return encoded;
  29126. };
  29127. /**
  29128. * Decodes the next base 64 VLQ value from the given string and returns the
  29129. * value and the rest of the string via the out parameter.
  29130. */
  29131. exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  29132. var strLen = aStr.length;
  29133. var result = 0;
  29134. var shift = 0;
  29135. var continuation, digit;
  29136. do {
  29137. if (aIndex >= strLen) {
  29138. throw new Error("Expected more digits in base 64 VLQ value.");
  29139. }
  29140. digit = base64.decode(aStr.charCodeAt(aIndex++));
  29141. if (digit === -1) {
  29142. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  29143. }
  29144. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  29145. digit &= VLQ_BASE_MASK;
  29146. result = result + (digit << shift);
  29147. shift += VLQ_BASE_SHIFT;
  29148. } while (continuation);
  29149. aOutParam.value = fromVLQSigned(result);
  29150. aOutParam.rest = aIndex;
  29151. };
  29152. /***/ }),
  29153. /* 7 */
  29154. /***/ (function(module, exports, __webpack_require__) {
  29155. /* -*- Mode: js; js-indent-level: 2; -*- */
  29156. /*
  29157. * Copyright 2011 Mozilla Foundation and contributors
  29158. * Licensed under the New BSD license. See LICENSE or:
  29159. * http://opensource.org/licenses/BSD-3-Clause
  29160. */
  29161. var util = __webpack_require__(0);
  29162. var has = Object.prototype.hasOwnProperty;
  29163. /**
  29164. * A data structure which is a combination of an array and a set. Adding a new
  29165. * member is O(1), testing for membership is O(1), and finding the index of an
  29166. * element is O(1). Removing elements from the set is not supported. Only
  29167. * strings are supported for membership.
  29168. */
  29169. function ArraySet() {
  29170. this._array = [];
  29171. this._set = Object.create(null);
  29172. }
  29173. /**
  29174. * Static method for creating ArraySet instances from an existing array.
  29175. */
  29176. ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  29177. var set = new ArraySet();
  29178. for (var i = 0, len = aArray.length; i < len; i++) {
  29179. set.add(aArray[i], aAllowDuplicates);
  29180. }
  29181. return set;
  29182. };
  29183. /**
  29184. * Return how many unique items are in this ArraySet. If duplicates have been
  29185. * added, than those do not count towards the size.
  29186. *
  29187. * @returns Number
  29188. */
  29189. ArraySet.prototype.size = function ArraySet_size() {
  29190. return Object.getOwnPropertyNames(this._set).length;
  29191. };
  29192. /**
  29193. * Add the given string to this set.
  29194. *
  29195. * @param String aStr
  29196. */
  29197. ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  29198. var sStr = util.toSetString(aStr);
  29199. var isDuplicate = has.call(this._set, sStr);
  29200. var idx = this._array.length;
  29201. if (!isDuplicate || aAllowDuplicates) {
  29202. this._array.push(aStr);
  29203. }
  29204. if (!isDuplicate) {
  29205. this._set[sStr] = idx;
  29206. }
  29207. };
  29208. /**
  29209. * Is the given string a member of this set?
  29210. *
  29211. * @param String aStr
  29212. */
  29213. ArraySet.prototype.has = function ArraySet_has(aStr) {
  29214. var sStr = util.toSetString(aStr);
  29215. return has.call(this._set, sStr);
  29216. };
  29217. /**
  29218. * What is the index of the given string in the array?
  29219. *
  29220. * @param String aStr
  29221. */
  29222. ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  29223. var sStr = util.toSetString(aStr);
  29224. if (has.call(this._set, sStr)) {
  29225. return this._set[sStr];
  29226. }
  29227. throw new Error('"' + aStr + '" is not in the set.');
  29228. };
  29229. /**
  29230. * What is the element at the given index?
  29231. *
  29232. * @param Number aIdx
  29233. */
  29234. ArraySet.prototype.at = function ArraySet_at(aIdx) {
  29235. if (aIdx >= 0 && aIdx < this._array.length) {
  29236. return this._array[aIdx];
  29237. }
  29238. throw new Error('No element indexed by ' + aIdx);
  29239. };
  29240. /**
  29241. * Returns the array representation of this set (which has the proper indices
  29242. * indicated by indexOf). Note that this is a copy of the internal array used
  29243. * for storing the members so that no one can mess with internal state.
  29244. */
  29245. ArraySet.prototype.toArray = function ArraySet_toArray() {
  29246. return this._array.slice();
  29247. };
  29248. exports.ArraySet = ArraySet;
  29249. /***/ }),
  29250. /* 8 */
  29251. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29252. "use strict";
  29253. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getLinesAround; });
  29254. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stack_frame__ = __webpack_require__(1);
  29255. /**
  29256. * Copyright (c) 2015-present, Facebook, Inc.
  29257. *
  29258. * This source code is licensed under the MIT license found in the
  29259. * LICENSE file in the root directory of this source tree.
  29260. */
  29261. /**
  29262. *
  29263. * @param {number} line The line number to provide context around.
  29264. * @param {number} count The number of lines you'd like for context.
  29265. * @param {string[] | string} lines The source code.
  29266. */
  29267. function getLinesAround(line, count, lines) {
  29268. if (typeof lines === 'string') {
  29269. lines = lines.split('\n');
  29270. }
  29271. var result = [];
  29272. for (var index = Math.max(0, line - 1 - count); index <= Math.min(lines.length - 1, line - 1 + count); ++index) {
  29273. result.push(new __WEBPACK_IMPORTED_MODULE_0__stack_frame__["a" /* ScriptLine */](index + 1, lines[index], index === line - 1));
  29274. }
  29275. return result;
  29276. }
  29277. /* unused harmony default export */ var _unused_webpack_default_export = (getLinesAround);
  29278. /***/ }),
  29279. /* 9 */
  29280. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29281. "use strict";
  29282. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  29283. /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["setEditorHandler"] = setEditorHandler;
  29284. /* harmony export (immutable) */ __webpack_exports__["reportBuildError"] = reportBuildError;
  29285. /* harmony export (immutable) */ __webpack_exports__["dismissBuildError"] = dismissBuildError;
  29286. /* harmony export (immutable) */ __webpack_exports__["startReportingRuntimeErrors"] = startReportingRuntimeErrors;
  29287. /* harmony export (immutable) */ __webpack_exports__["stopReportingRuntimeErrors"] = stopReportingRuntimeErrors;
  29288. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listenToRuntimeErrors__ = __webpack_require__(10);
  29289. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__styles__ = __webpack_require__(31);
  29290. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_dom_css__ = __webpack_require__(32);
  29291. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_iframeScript__ = __webpack_require__(33);
  29292. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_iframeScript___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_iframeScript__);
  29293. /**
  29294. * Copyright (c) 2015-present, Facebook, Inc.
  29295. *
  29296. * This source code is licensed under the MIT license found in the
  29297. * LICENSE file in the root directory of this source tree.
  29298. */
  29299. // Importing iframe-bundle generated in the pre build step as
  29300. // a text using webpack raw-loader. See webpack.config.js file.
  29301. // $FlowFixMe
  29302. var iframe = null;
  29303. var isLoadingIframe = false;
  29304. var isIframeReady = false;
  29305. var editorHandler = null;
  29306. var currentBuildError = null;
  29307. var currentRuntimeErrorRecords = [];
  29308. var currentRuntimeErrorOptions = null;
  29309. var stopListeningToRuntimeErrors = null;
  29310. function setEditorHandler(handler) {
  29311. editorHandler = handler;
  29312. if (iframe) {
  29313. update();
  29314. }
  29315. }
  29316. function reportBuildError(error) {
  29317. currentBuildError = error;
  29318. update();
  29319. }
  29320. function dismissBuildError() {
  29321. currentBuildError = null;
  29322. update();
  29323. }
  29324. function startReportingRuntimeErrors(options) {
  29325. if (stopListeningToRuntimeErrors !== null) {
  29326. throw new Error('Already listening');
  29327. }
  29328. if (options.launchEditorEndpoint) {
  29329. console.warn('Warning: `startReportingRuntimeErrors` doesn’t accept ' + '`launchEditorEndpoint` argument anymore. Use `listenToOpenInEditor` ' + 'instead with your own implementation to open errors in editor ');
  29330. }
  29331. currentRuntimeErrorOptions = options;
  29332. Object(__WEBPACK_IMPORTED_MODULE_0__listenToRuntimeErrors__["a" /* listenToRuntimeErrors */])(function (errorRecord) {
  29333. try {
  29334. if (typeof options.onError === 'function') {
  29335. options.onError.call(null);
  29336. }
  29337. } finally {
  29338. handleRuntimeError(errorRecord);
  29339. }
  29340. }, options.filename);
  29341. }
  29342. function handleRuntimeError(errorRecord) {
  29343. if (currentRuntimeErrorRecords.some(function (_ref) {
  29344. var error = _ref.error;
  29345. return error === errorRecord.error;
  29346. })) {
  29347. // Deduplicate identical errors.
  29348. // This fixes https://github.com/facebookincubator/create-react-app/issues/3011.
  29349. return;
  29350. }
  29351. currentRuntimeErrorRecords = currentRuntimeErrorRecords.concat([errorRecord]);
  29352. update();
  29353. }
  29354. function dismissRuntimeErrors() {
  29355. currentRuntimeErrorRecords = [];
  29356. update();
  29357. }
  29358. function stopReportingRuntimeErrors() {
  29359. if (stopListeningToRuntimeErrors === null) {
  29360. throw new Error('Not currently listening');
  29361. }
  29362. currentRuntimeErrorOptions = null;
  29363. try {
  29364. stopListeningToRuntimeErrors();
  29365. } finally {
  29366. stopListeningToRuntimeErrors = null;
  29367. }
  29368. }
  29369. function update() {
  29370. // Loading iframe can be either sync or async depending on the browser.
  29371. if (isLoadingIframe) {
  29372. // Iframe is loading.
  29373. // First render will happen soon--don't need to do anything.
  29374. return;
  29375. }
  29376. if (isIframeReady) {
  29377. // Iframe is ready.
  29378. // Just update it.
  29379. updateIframeContent();
  29380. return;
  29381. }
  29382. // We need to schedule the first render.
  29383. isLoadingIframe = true;
  29384. var loadingIframe = window.document.createElement('iframe');
  29385. Object(__WEBPACK_IMPORTED_MODULE_2__utils_dom_css__["a" /* applyStyles */])(loadingIframe, __WEBPACK_IMPORTED_MODULE_1__styles__["a" /* iframeStyle */]);
  29386. loadingIframe.onload = function () {
  29387. var iframeDocument = loadingIframe.contentDocument;
  29388. if (iframeDocument != null && iframeDocument.body != null) {
  29389. iframe = loadingIframe;
  29390. var script = loadingIframe.contentWindow.document.createElement('script');
  29391. script.type = 'text/javascript';
  29392. script.innerHTML = __WEBPACK_IMPORTED_MODULE_3_iframeScript___default.a;
  29393. iframeDocument.body.appendChild(script);
  29394. }
  29395. };
  29396. var appDocument = window.document;
  29397. appDocument.body.appendChild(loadingIframe);
  29398. }
  29399. function updateIframeContent() {
  29400. if (!currentRuntimeErrorOptions) {
  29401. throw new Error('Expected options to be injected.');
  29402. }
  29403. if (!iframe) {
  29404. throw new Error('Iframe has not been created yet.');
  29405. }
  29406. var isRendered = iframe.contentWindow.updateContent({
  29407. currentBuildError: currentBuildError,
  29408. currentRuntimeErrorRecords: currentRuntimeErrorRecords,
  29409. dismissRuntimeErrors: dismissRuntimeErrors,
  29410. editorHandler: editorHandler
  29411. });
  29412. if (!isRendered) {
  29413. window.document.body.removeChild(iframe);
  29414. iframe = null;
  29415. isIframeReady = false;
  29416. }
  29417. }
  29418. window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__ = window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__ || {};
  29419. window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady = function iframeReady() {
  29420. isIframeReady = true;
  29421. isLoadingIframe = false;
  29422. updateIframeContent();
  29423. };
  29424. if (process.env.NODE_ENV === 'production') {
  29425. console.warn('react-error-overlay is not meant for use in production. You should ' + 'ensure it is not included in your build to reduce bundle size.');
  29426. }
  29427. /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3)))
  29428. /***/ }),
  29429. /* 10 */
  29430. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29431. "use strict";
  29432. /* harmony export (immutable) */ __webpack_exports__["a"] = listenToRuntimeErrors;
  29433. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__effects_unhandledError__ = __webpack_require__(11);
  29434. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__effects_unhandledRejection__ = __webpack_require__(12);
  29435. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__effects_stackTraceLimit__ = __webpack_require__(13);
  29436. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__ = __webpack_require__(14);
  29437. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warnings__ = __webpack_require__(15);
  29438. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_getStackFrames__ = __webpack_require__(16);
  29439. /**
  29440. * Copyright (c) 2015-present, Facebook, Inc.
  29441. *
  29442. * This source code is licensed under the MIT license found in the
  29443. * LICENSE file in the root directory of this source tree.
  29444. */
  29445. var CONTEXT_SIZE = 3;
  29446. function listenToRuntimeErrors(crash) {
  29447. var filename = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '/static/js/bundle.js';
  29448. function crashWithFrames(error) {
  29449. var unhandledRejection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  29450. Object(__WEBPACK_IMPORTED_MODULE_5__utils_getStackFrames__["a" /* default */])(error, unhandledRejection, CONTEXT_SIZE).then(function (stackFrames) {
  29451. if (stackFrames == null) {
  29452. return;
  29453. }
  29454. crash({
  29455. error: error,
  29456. unhandledRejection: unhandledRejection,
  29457. contextSize: CONTEXT_SIZE,
  29458. stackFrames: stackFrames
  29459. });
  29460. }).catch(function (e) {
  29461. console.log('Could not get the stack frames of error:', e);
  29462. });
  29463. }
  29464. Object(__WEBPACK_IMPORTED_MODULE_0__effects_unhandledError__["a" /* register */])(window, function (error) {
  29465. return crashWithFrames(error, false);
  29466. });
  29467. Object(__WEBPACK_IMPORTED_MODULE_1__effects_unhandledRejection__["a" /* register */])(window, function (error) {
  29468. return crashWithFrames(error, true);
  29469. });
  29470. Object(__WEBPACK_IMPORTED_MODULE_2__effects_stackTraceLimit__["a" /* register */])();
  29471. Object(__WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__["b" /* registerReactStack */])();
  29472. Object(__WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__["a" /* permanentRegister */])('error', function (warning, stack) {
  29473. var data = Object(__WEBPACK_IMPORTED_MODULE_4__utils_warnings__["a" /* massage */])(warning, stack);
  29474. crashWithFrames(
  29475. // $FlowFixMe
  29476. {
  29477. message: data.message,
  29478. stack: data.stack,
  29479. __unmap_source: filename
  29480. }, false);
  29481. });
  29482. return function stopListening() {
  29483. Object(__WEBPACK_IMPORTED_MODULE_2__effects_stackTraceLimit__["b" /* unregister */])();
  29484. Object(__WEBPACK_IMPORTED_MODULE_1__effects_unhandledRejection__["b" /* unregister */])(window);
  29485. Object(__WEBPACK_IMPORTED_MODULE_0__effects_unhandledError__["b" /* unregister */])(window);
  29486. Object(__WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__["c" /* unregisterReactStack */])();
  29487. };
  29488. }
  29489. /***/ }),
  29490. /* 11 */
  29491. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29492. "use strict";
  29493. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registerUnhandledError; });
  29494. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unregisterUnhandledError; });
  29495. /**
  29496. * Copyright (c) 2015-present, Facebook, Inc.
  29497. *
  29498. * This source code is licensed under the MIT license found in the
  29499. * LICENSE file in the root directory of this source tree.
  29500. */
  29501. var boundErrorHandler = null;
  29502. function errorHandler(callback, e) {
  29503. if (!e.error) {
  29504. return;
  29505. }
  29506. // $FlowFixMe
  29507. var error = e.error;
  29508. if (error instanceof Error) {
  29509. callback(error);
  29510. } else {
  29511. // A non-error was thrown, we don't have a trace. :(
  29512. // Look in your browser's devtools for more information
  29513. callback(new Error(error));
  29514. }
  29515. }
  29516. function registerUnhandledError(target, callback) {
  29517. if (boundErrorHandler !== null) {
  29518. return;
  29519. }
  29520. boundErrorHandler = errorHandler.bind(undefined, callback);
  29521. target.addEventListener('error', boundErrorHandler);
  29522. }
  29523. function unregisterUnhandledError(target) {
  29524. if (boundErrorHandler === null) {
  29525. return;
  29526. }
  29527. target.removeEventListener('error', boundErrorHandler);
  29528. boundErrorHandler = null;
  29529. }
  29530. /***/ }),
  29531. /* 12 */
  29532. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29533. "use strict";
  29534. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registerUnhandledRejection; });
  29535. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unregisterUnhandledRejection; });
  29536. /**
  29537. * Copyright (c) 2015-present, Facebook, Inc.
  29538. *
  29539. * This source code is licensed under the MIT license found in the
  29540. * LICENSE file in the root directory of this source tree.
  29541. */
  29542. var boundRejectionHandler = null;
  29543. function rejectionHandler(callback, e) {
  29544. if (e == null || e.reason == null) {
  29545. return callback(new Error('Unknown'));
  29546. }
  29547. var reason = e.reason;
  29548. if (reason instanceof Error) {
  29549. return callback(reason);
  29550. }
  29551. // A non-error was rejected, we don't have a trace :(
  29552. // Look in your browser's devtools for more information
  29553. return callback(new Error(reason));
  29554. }
  29555. function registerUnhandledRejection(target, callback) {
  29556. if (boundRejectionHandler !== null) {
  29557. return;
  29558. }
  29559. boundRejectionHandler = rejectionHandler.bind(undefined, callback);
  29560. // $FlowFixMe
  29561. target.addEventListener('unhandledrejection', boundRejectionHandler);
  29562. }
  29563. function unregisterUnhandledRejection(target) {
  29564. if (boundRejectionHandler === null) {
  29565. return;
  29566. }
  29567. // $FlowFixMe
  29568. target.removeEventListener('unhandledrejection', boundRejectionHandler);
  29569. boundRejectionHandler = null;
  29570. }
  29571. /***/ }),
  29572. /* 13 */
  29573. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29574. "use strict";
  29575. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registerStackTraceLimit; });
  29576. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unregisterStackTraceLimit; });
  29577. /**
  29578. * Copyright (c) 2015-present, Facebook, Inc.
  29579. *
  29580. * This source code is licensed under the MIT license found in the
  29581. * LICENSE file in the root directory of this source tree.
  29582. */
  29583. var stackTraceRegistered = false;
  29584. // Default: https://docs.microsoft.com/en-us/scripting/javascript/reference/stacktracelimit-property-error-javascript
  29585. var restoreStackTraceValue = 10;
  29586. var MAX_STACK_LENGTH = 50;
  29587. function registerStackTraceLimit() {
  29588. var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : MAX_STACK_LENGTH;
  29589. if (stackTraceRegistered) {
  29590. return;
  29591. }
  29592. try {
  29593. restoreStackTraceValue = Error.stackTraceLimit;
  29594. Error.stackTraceLimit = limit;
  29595. stackTraceRegistered = true;
  29596. } catch (e) {
  29597. // Not all browsers support this so we don't care if it errors
  29598. }
  29599. }
  29600. function unregisterStackTraceLimit() {
  29601. if (!stackTraceRegistered) {
  29602. return;
  29603. }
  29604. try {
  29605. Error.stackTraceLimit = restoreStackTraceValue;
  29606. stackTraceRegistered = false;
  29607. } catch (e) {
  29608. // Not all browsers support this so we don't care if it errors
  29609. }
  29610. }
  29611. /***/ }),
  29612. /* 14 */
  29613. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29614. "use strict";
  29615. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return permanentRegister; });
  29616. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return registerReactStack; });
  29617. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unregisterReactStack; });
  29618. var reactFrameStack = []; /**
  29619. * Copyright (c) 2015-present, Facebook, Inc.
  29620. *
  29621. * This source code is licensed under the MIT license found in the
  29622. * LICENSE file in the root directory of this source tree.
  29623. */
  29624. // This is a stripped down barebones version of this proposal:
  29625. // https://gist.github.com/sebmarkbage/bdefa100f19345229d526d0fdd22830f
  29626. // We're implementing just enough to get the invalid element type warnings
  29627. // to display the component stack in React 15.6+:
  29628. // https://github.com/facebook/react/pull/9679
  29629. /// TODO: a more comprehensive implementation.
  29630. var registerReactStack = function registerReactStack() {
  29631. if (typeof console !== 'undefined') {
  29632. // $FlowFixMe
  29633. console.reactStack = function (frames) {
  29634. return reactFrameStack.push(frames);
  29635. };
  29636. // $FlowFixMe
  29637. console.reactStackEnd = function (frames) {
  29638. return reactFrameStack.pop();
  29639. };
  29640. }
  29641. };
  29642. var unregisterReactStack = function unregisterReactStack() {
  29643. if (typeof console !== 'undefined') {
  29644. // $FlowFixMe
  29645. console.reactStack = undefined;
  29646. // $FlowFixMe
  29647. console.reactStackEnd = undefined;
  29648. }
  29649. };
  29650. var permanentRegister = function proxyConsole(type, callback) {
  29651. if (typeof console !== 'undefined') {
  29652. var orig = console[type];
  29653. if (typeof orig === 'function') {
  29654. console[type] = function __stack_frame_overlay_proxy_console__() {
  29655. try {
  29656. var _message = arguments[0];
  29657. if (typeof _message === 'string' && reactFrameStack.length > 0) {
  29658. callback(_message, reactFrameStack[reactFrameStack.length - 1]);
  29659. }
  29660. } catch (err) {
  29661. // Warnings must never crash. Rethrow with a clean stack.
  29662. setTimeout(function () {
  29663. throw err;
  29664. });
  29665. }
  29666. return orig.apply(this, arguments);
  29667. };
  29668. }
  29669. }
  29670. };
  29671. /***/ }),
  29672. /* 15 */
  29673. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29674. "use strict";
  29675. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return massage; });
  29676. function stripInlineStacktrace(message) {
  29677. return message.split('\n').filter(function (line) {
  29678. return !line.match(/^\s*in/);
  29679. }).join('\n'); // " in Foo"
  29680. } /**
  29681. * Copyright (c) 2015-present, Facebook, Inc.
  29682. *
  29683. * This source code is licensed under the MIT license found in the
  29684. * LICENSE file in the root directory of this source tree.
  29685. */
  29686. function massage(warning, frames) {
  29687. var message = stripInlineStacktrace(warning);
  29688. // Reassemble the stack with full filenames provided by React
  29689. var stack = '';
  29690. var lastFilename = void 0;
  29691. var lastLineNumber = void 0;
  29692. for (var index = 0; index < frames.length; ++index) {
  29693. var _frames$index = frames[index],
  29694. fileName = _frames$index.fileName,
  29695. lineNumber = _frames$index.lineNumber;
  29696. if (fileName == null || lineNumber == null) {
  29697. continue;
  29698. }
  29699. // TODO: instead, collapse them in the UI
  29700. if (fileName === lastFilename && typeof lineNumber === 'number' && typeof lastLineNumber === 'number' && Math.abs(lineNumber - lastLineNumber) < 3) {
  29701. continue;
  29702. }
  29703. lastFilename = fileName;
  29704. lastLineNumber = lineNumber;
  29705. var name = frames[index].name;
  29706. name = name || '(anonymous function)';
  29707. stack += 'in ' + name + ' (at ' + fileName + ':' + lineNumber + ')\n';
  29708. }
  29709. return { message: message, stack: stack };
  29710. }
  29711. /***/ }),
  29712. /* 16 */
  29713. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29714. "use strict";
  29715. /* unused harmony export getStackFrames */
  29716. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__parser__ = __webpack_require__(17);
  29717. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapper__ = __webpack_require__(18);
  29718. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__unmapper__ = __webpack_require__(29);
  29719. /**
  29720. * Copyright (c) 2015-present, Facebook, Inc.
  29721. *
  29722. * This source code is licensed under the MIT license found in the
  29723. * LICENSE file in the root directory of this source tree.
  29724. */
  29725. function getStackFrames(error) {
  29726. var unhandledRejection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  29727. var contextSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
  29728. var parsedFrames = Object(__WEBPACK_IMPORTED_MODULE_0__parser__["a" /* parse */])(error);
  29729. var enhancedFramesPromise = void 0;
  29730. if (error.__unmap_source) {
  29731. enhancedFramesPromise = Object(__WEBPACK_IMPORTED_MODULE_2__unmapper__["a" /* unmap */])(
  29732. // $FlowFixMe
  29733. error.__unmap_source, parsedFrames, contextSize);
  29734. } else {
  29735. enhancedFramesPromise = Object(__WEBPACK_IMPORTED_MODULE_1__mapper__["a" /* map */])(parsedFrames, contextSize);
  29736. }
  29737. return enhancedFramesPromise.then(function (enhancedFrames) {
  29738. if (enhancedFrames.map(function (f) {
  29739. return f._originalFileName;
  29740. }).filter(function (f) {
  29741. return f != null && f.indexOf('node_modules') === -1;
  29742. }).length === 0) {
  29743. return null;
  29744. }
  29745. return enhancedFrames.filter(function (_ref) {
  29746. var functionName = _ref.functionName;
  29747. return functionName == null || functionName.indexOf('__stack_frame_overlay_proxy_console__') === -1;
  29748. });
  29749. });
  29750. }
  29751. /* harmony default export */ __webpack_exports__["a"] = (getStackFrames);
  29752. /***/ }),
  29753. /* 17 */
  29754. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29755. "use strict";
  29756. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return parseError; });
  29757. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stack_frame__ = __webpack_require__(1);
  29758. function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
  29759. /**
  29760. * Copyright (c) 2015-present, Facebook, Inc.
  29761. *
  29762. * This source code is licensed under the MIT license found in the
  29763. * LICENSE file in the root directory of this source tree.
  29764. */
  29765. var regexExtractLocation = /\(?(.+?)(?::(\d+))?(?::(\d+))?\)?$/;
  29766. function extractLocation(token) {
  29767. return regexExtractLocation.exec(token).slice(1).map(function (v) {
  29768. var p = Number(v);
  29769. if (!isNaN(p)) {
  29770. return p;
  29771. }
  29772. return v;
  29773. });
  29774. }
  29775. var regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/;
  29776. var regexValidFrame_FireFox = /(^|@)\S+:\d+|.+line\s+\d+\s+>\s+(eval|Function).+/;
  29777. function parseStack(stack) {
  29778. var frames = stack.filter(function (e) {
  29779. return regexValidFrame_Chrome.test(e) || regexValidFrame_FireFox.test(e);
  29780. }).map(function (e) {
  29781. if (regexValidFrame_FireFox.test(e)) {
  29782. // Strip eval, we don't care about it
  29783. var isEval = false;
  29784. if (/ > (eval|Function)/.test(e)) {
  29785. e = e.replace(/ line (\d+)(?: > eval line \d+)* > (eval|Function):\d+:\d+/g, ':$1');
  29786. isEval = true;
  29787. }
  29788. var data = e.split(/[@]/g);
  29789. var last = data.pop();
  29790. return new (Function.prototype.bind.apply(__WEBPACK_IMPORTED_MODULE_0__stack_frame__["b" /* default */], [null].concat([data.join('@') || (isEval ? 'eval' : null)], _toConsumableArray(extractLocation(last)))))();
  29791. } else {
  29792. // Strip eval, we don't care about it
  29793. if (e.indexOf('(eval ') !== -1) {
  29794. e = e.replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
  29795. }
  29796. if (e.indexOf('(at ') !== -1) {
  29797. e = e.replace(/\(at /, '(');
  29798. }
  29799. var _data = e.trim().split(/\s+/g).slice(1);
  29800. var _last = _data.pop();
  29801. return new (Function.prototype.bind.apply(__WEBPACK_IMPORTED_MODULE_0__stack_frame__["b" /* default */], [null].concat([_data.join(' ') || null], _toConsumableArray(extractLocation(_last)))))();
  29802. }
  29803. });
  29804. return frames;
  29805. }
  29806. /**
  29807. * Turns an <code>Error</code>, or similar object, into a set of <code>StackFrame</code>s.
  29808. * @alias parse
  29809. */
  29810. function parseError(error) {
  29811. if (error == null) {
  29812. throw new Error('You cannot pass a null object.');
  29813. }
  29814. if (typeof error === 'string') {
  29815. return parseStack(error.split('\n'));
  29816. }
  29817. if (Array.isArray(error)) {
  29818. return parseStack(error);
  29819. }
  29820. if (typeof error.stack === 'string') {
  29821. return parseStack(error.stack.split('\n'));
  29822. }
  29823. throw new Error('The error you provided does not contain a stack trace.');
  29824. }
  29825. /* unused harmony default export */ var _unused_webpack_default_export = (parseError);
  29826. /***/ }),
  29827. /* 18 */
  29828. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29829. "use strict";
  29830. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return map; });
  29831. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(2);
  29832. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
  29833. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stack_frame__ = __webpack_require__(1);
  29834. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getSourceMap__ = __webpack_require__(4);
  29835. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getLinesAround__ = __webpack_require__(8);
  29836. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_settle_promise__ = __webpack_require__(28);
  29837. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_settle_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_settle_promise__);
  29838. /**
  29839. * Enhances a set of <code>StackFrame</code>s with their original positions and code (when available).
  29840. * @param {StackFrame[]} frames A set of <code>StackFrame</code>s which contain (generated) code positions.
  29841. * @param {number} [contextLines=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
  29842. */
  29843. var map = function () {
  29844. var _ref = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee2(frames) {
  29845. var _this = this;
  29846. var contextLines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
  29847. var cache, files;
  29848. return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee2$(_context2) {
  29849. while (1) {
  29850. switch (_context2.prev = _context2.next) {
  29851. case 0:
  29852. cache = {};
  29853. files = [];
  29854. frames.forEach(function (frame) {
  29855. var fileName = frame.fileName;
  29856. if (fileName == null) {
  29857. return;
  29858. }
  29859. if (files.indexOf(fileName) !== -1) {
  29860. return;
  29861. }
  29862. files.push(fileName);
  29863. });
  29864. _context2.next = 5;
  29865. return Object(__WEBPACK_IMPORTED_MODULE_4_settle_promise__["settle"])(files.map(function () {
  29866. var _ref2 = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(fileName) {
  29867. var fileSource, map;
  29868. return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
  29869. while (1) {
  29870. switch (_context.prev = _context.next) {
  29871. case 0:
  29872. _context.next = 2;
  29873. return fetch(fileName).then(function (r) {
  29874. return r.text();
  29875. });
  29876. case 2:
  29877. fileSource = _context.sent;
  29878. _context.next = 5;
  29879. return Object(__WEBPACK_IMPORTED_MODULE_2__getSourceMap__["a" /* getSourceMap */])(fileName, fileSource);
  29880. case 5:
  29881. map = _context.sent;
  29882. cache[fileName] = { fileSource: fileSource, map: map };
  29883. case 7:
  29884. case 'end':
  29885. return _context.stop();
  29886. }
  29887. }
  29888. }, _callee, _this);
  29889. }));
  29890. return function (_x3) {
  29891. return _ref2.apply(this, arguments);
  29892. };
  29893. }()));
  29894. case 5:
  29895. return _context2.abrupt('return', frames.map(function (frame) {
  29896. var functionName = frame.functionName,
  29897. fileName = frame.fileName,
  29898. lineNumber = frame.lineNumber,
  29899. columnNumber = frame.columnNumber;
  29900. var _ref3 = cache[fileName] || {},
  29901. map = _ref3.map,
  29902. fileSource = _ref3.fileSource;
  29903. if (map == null || lineNumber == null) {
  29904. return frame;
  29905. }
  29906. var _map$getOriginalPosit = map.getOriginalPosition(lineNumber, columnNumber),
  29907. source = _map$getOriginalPosit.source,
  29908. line = _map$getOriginalPosit.line,
  29909. column = _map$getOriginalPosit.column;
  29910. var originalSource = source == null ? [] : map.getSource(source);
  29911. return new __WEBPACK_IMPORTED_MODULE_1__stack_frame__["b" /* default */](functionName, fileName, lineNumber, columnNumber, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(lineNumber, contextLines, fileSource), functionName, source, line, column, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(line, contextLines, originalSource));
  29912. }));
  29913. case 6:
  29914. case 'end':
  29915. return _context2.stop();
  29916. }
  29917. }
  29918. }, _callee2, this);
  29919. }));
  29920. return function map(_x2) {
  29921. return _ref.apply(this, arguments);
  29922. };
  29923. }();
  29924. function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
  29925. /**
  29926. * Copyright (c) 2015-present, Facebook, Inc.
  29927. *
  29928. * This source code is licensed under the MIT license found in the
  29929. * LICENSE file in the root directory of this source tree.
  29930. */
  29931. /* unused harmony default export */ var _unused_webpack_default_export = (map);
  29932. /***/ }),
  29933. /* 19 */
  29934. /***/ (function(module, exports, __webpack_require__) {
  29935. // This method of obtaining a reference to the global object needs to be
  29936. // kept identical to the way it is obtained in runtime.js
  29937. var g = (function() { return this })() || Function("return this")();
  29938. // Use `getOwnPropertyNames` because not all browsers support calling
  29939. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  29940. var hadRuntime = g.regeneratorRuntime &&
  29941. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  29942. // Save the old regeneratorRuntime in case it needs to be restored later.
  29943. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  29944. // Force reevalutation of runtime.js.
  29945. g.regeneratorRuntime = undefined;
  29946. module.exports = __webpack_require__(20);
  29947. if (hadRuntime) {
  29948. // Restore the original runtime.
  29949. g.regeneratorRuntime = oldRuntime;
  29950. } else {
  29951. // Remove the global property added by runtime.js.
  29952. try {
  29953. delete g.regeneratorRuntime;
  29954. } catch(e) {
  29955. g.regeneratorRuntime = undefined;
  29956. }
  29957. }
  29958. /***/ }),
  29959. /* 20 */
  29960. /***/ (function(module, exports) {
  29961. /**
  29962. * Copyright (c) 2014, Facebook, Inc.
  29963. * All rights reserved.
  29964. *
  29965. * This source code is licensed under the BSD-style license found in the
  29966. * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
  29967. * additional grant of patent rights can be found in the PATENTS file in
  29968. * the same directory.
  29969. */
  29970. !(function(global) {
  29971. "use strict";
  29972. var Op = Object.prototype;
  29973. var hasOwn = Op.hasOwnProperty;
  29974. var undefined; // More compressible than void 0.
  29975. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  29976. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  29977. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  29978. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  29979. var inModule = typeof module === "object";
  29980. var runtime = global.regeneratorRuntime;
  29981. if (runtime) {
  29982. if (inModule) {
  29983. // If regeneratorRuntime is defined globally and we're in a module,
  29984. // make the exports object identical to regeneratorRuntime.
  29985. module.exports = runtime;
  29986. }
  29987. // Don't bother evaluating the rest of this file if the runtime was
  29988. // already defined globally.
  29989. return;
  29990. }
  29991. // Define the runtime globally (as expected by generated code) as either
  29992. // module.exports (if we're in a module) or a new, empty object.
  29993. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  29994. function wrap(innerFn, outerFn, self, tryLocsList) {
  29995. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  29996. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  29997. var generator = Object.create(protoGenerator.prototype);
  29998. var context = new Context(tryLocsList || []);
  29999. // The ._invoke method unifies the implementations of the .next,
  30000. // .throw, and .return methods.
  30001. generator._invoke = makeInvokeMethod(innerFn, self, context);
  30002. return generator;
  30003. }
  30004. runtime.wrap = wrap;
  30005. // Try/catch helper to minimize deoptimizations. Returns a completion
  30006. // record like context.tryEntries[i].completion. This interface could
  30007. // have been (and was previously) designed to take a closure to be
  30008. // invoked without arguments, but in all the cases we care about we
  30009. // already have an existing method we want to call, so there's no need
  30010. // to create a new function object. We can even get away with assuming
  30011. // the method takes exactly one argument, since that happens to be true
  30012. // in every case, so we don't have to touch the arguments object. The
  30013. // only additional allocation required is the completion record, which
  30014. // has a stable shape and so hopefully should be cheap to allocate.
  30015. function tryCatch(fn, obj, arg) {
  30016. try {
  30017. return { type: "normal", arg: fn.call(obj, arg) };
  30018. } catch (err) {
  30019. return { type: "throw", arg: err };
  30020. }
  30021. }
  30022. var GenStateSuspendedStart = "suspendedStart";
  30023. var GenStateSuspendedYield = "suspendedYield";
  30024. var GenStateExecuting = "executing";
  30025. var GenStateCompleted = "completed";
  30026. // Returning this object from the innerFn has the same effect as
  30027. // breaking out of the dispatch switch statement.
  30028. var ContinueSentinel = {};
  30029. // Dummy constructor functions that we use as the .constructor and
  30030. // .constructor.prototype properties for functions that return Generator
  30031. // objects. For full spec compliance, you may wish to configure your
  30032. // minifier not to mangle the names of these two functions.
  30033. function Generator() {}
  30034. function GeneratorFunction() {}
  30035. function GeneratorFunctionPrototype() {}
  30036. // This is a polyfill for %IteratorPrototype% for environments that
  30037. // don't natively support it.
  30038. var IteratorPrototype = {};
  30039. IteratorPrototype[iteratorSymbol] = function () {
  30040. return this;
  30041. };
  30042. var getProto = Object.getPrototypeOf;
  30043. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  30044. if (NativeIteratorPrototype &&
  30045. NativeIteratorPrototype !== Op &&
  30046. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  30047. // This environment has a native %IteratorPrototype%; use it instead
  30048. // of the polyfill.
  30049. IteratorPrototype = NativeIteratorPrototype;
  30050. }
  30051. var Gp = GeneratorFunctionPrototype.prototype =
  30052. Generator.prototype = Object.create(IteratorPrototype);
  30053. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  30054. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  30055. GeneratorFunctionPrototype[toStringTagSymbol] =
  30056. GeneratorFunction.displayName = "GeneratorFunction";
  30057. // Helper for defining the .next, .throw, and .return methods of the
  30058. // Iterator interface in terms of a single ._invoke method.
  30059. function defineIteratorMethods(prototype) {
  30060. ["next", "throw", "return"].forEach(function(method) {
  30061. prototype[method] = function(arg) {
  30062. return this._invoke(method, arg);
  30063. };
  30064. });
  30065. }
  30066. runtime.isGeneratorFunction = function(genFun) {
  30067. var ctor = typeof genFun === "function" && genFun.constructor;
  30068. return ctor
  30069. ? ctor === GeneratorFunction ||
  30070. // For the native GeneratorFunction constructor, the best we can
  30071. // do is to check its .name property.
  30072. (ctor.displayName || ctor.name) === "GeneratorFunction"
  30073. : false;
  30074. };
  30075. runtime.mark = function(genFun) {
  30076. if (Object.setPrototypeOf) {
  30077. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  30078. } else {
  30079. genFun.__proto__ = GeneratorFunctionPrototype;
  30080. if (!(toStringTagSymbol in genFun)) {
  30081. genFun[toStringTagSymbol] = "GeneratorFunction";
  30082. }
  30083. }
  30084. genFun.prototype = Object.create(Gp);
  30085. return genFun;
  30086. };
  30087. // Within the body of any async function, `await x` is transformed to
  30088. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  30089. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  30090. // meant to be awaited.
  30091. runtime.awrap = function(arg) {
  30092. return { __await: arg };
  30093. };
  30094. function AsyncIterator(generator) {
  30095. function invoke(method, arg, resolve, reject) {
  30096. var record = tryCatch(generator[method], generator, arg);
  30097. if (record.type === "throw") {
  30098. reject(record.arg);
  30099. } else {
  30100. var result = record.arg;
  30101. var value = result.value;
  30102. if (value &&
  30103. typeof value === "object" &&
  30104. hasOwn.call(value, "__await")) {
  30105. return Promise.resolve(value.__await).then(function(value) {
  30106. invoke("next", value, resolve, reject);
  30107. }, function(err) {
  30108. invoke("throw", err, resolve, reject);
  30109. });
  30110. }
  30111. return Promise.resolve(value).then(function(unwrapped) {
  30112. // When a yielded Promise is resolved, its final value becomes
  30113. // the .value of the Promise<{value,done}> result for the
  30114. // current iteration. If the Promise is rejected, however, the
  30115. // result for this iteration will be rejected with the same
  30116. // reason. Note that rejections of yielded Promises are not
  30117. // thrown back into the generator function, as is the case
  30118. // when an awaited Promise is rejected. This difference in
  30119. // behavior between yield and await is important, because it
  30120. // allows the consumer to decide what to do with the yielded
  30121. // rejection (swallow it and continue, manually .throw it back
  30122. // into the generator, abandon iteration, whatever). With
  30123. // await, by contrast, there is no opportunity to examine the
  30124. // rejection reason outside the generator function, so the
  30125. // only option is to throw it from the await expression, and
  30126. // let the generator function handle the exception.
  30127. result.value = unwrapped;
  30128. resolve(result);
  30129. }, reject);
  30130. }
  30131. }
  30132. var previousPromise;
  30133. function enqueue(method, arg) {
  30134. function callInvokeWithMethodAndArg() {
  30135. return new Promise(function(resolve, reject) {
  30136. invoke(method, arg, resolve, reject);
  30137. });
  30138. }
  30139. return previousPromise =
  30140. // If enqueue has been called before, then we want to wait until
  30141. // all previous Promises have been resolved before calling invoke,
  30142. // so that results are always delivered in the correct order. If
  30143. // enqueue has not been called before, then it is important to
  30144. // call invoke immediately, without waiting on a callback to fire,
  30145. // so that the async generator function has the opportunity to do
  30146. // any necessary setup in a predictable way. This predictability
  30147. // is why the Promise constructor synchronously invokes its
  30148. // executor callback, and why async functions synchronously
  30149. // execute code before the first await. Since we implement simple
  30150. // async functions in terms of async generators, it is especially
  30151. // important to get this right, even though it requires care.
  30152. previousPromise ? previousPromise.then(
  30153. callInvokeWithMethodAndArg,
  30154. // Avoid propagating failures to Promises returned by later
  30155. // invocations of the iterator.
  30156. callInvokeWithMethodAndArg
  30157. ) : callInvokeWithMethodAndArg();
  30158. }
  30159. // Define the unified helper method that is used to implement .next,
  30160. // .throw, and .return (see defineIteratorMethods).
  30161. this._invoke = enqueue;
  30162. }
  30163. defineIteratorMethods(AsyncIterator.prototype);
  30164. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  30165. return this;
  30166. };
  30167. runtime.AsyncIterator = AsyncIterator;
  30168. // Note that simple async functions are implemented on top of
  30169. // AsyncIterator objects; they just return a Promise for the value of
  30170. // the final result produced by the iterator.
  30171. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  30172. var iter = new AsyncIterator(
  30173. wrap(innerFn, outerFn, self, tryLocsList)
  30174. );
  30175. return runtime.isGeneratorFunction(outerFn)
  30176. ? iter // If outerFn is a generator, return the full iterator.
  30177. : iter.next().then(function(result) {
  30178. return result.done ? result.value : iter.next();
  30179. });
  30180. };
  30181. function makeInvokeMethod(innerFn, self, context) {
  30182. var state = GenStateSuspendedStart;
  30183. return function invoke(method, arg) {
  30184. if (state === GenStateExecuting) {
  30185. throw new Error("Generator is already running");
  30186. }
  30187. if (state === GenStateCompleted) {
  30188. if (method === "throw") {
  30189. throw arg;
  30190. }
  30191. // Be forgiving, per 25.3.3.3.3 of the spec:
  30192. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  30193. return doneResult();
  30194. }
  30195. context.method = method;
  30196. context.arg = arg;
  30197. while (true) {
  30198. var delegate = context.delegate;
  30199. if (delegate) {
  30200. var delegateResult = maybeInvokeDelegate(delegate, context);
  30201. if (delegateResult) {
  30202. if (delegateResult === ContinueSentinel) continue;
  30203. return delegateResult;
  30204. }
  30205. }
  30206. if (context.method === "next") {
  30207. // Setting context._sent for legacy support of Babel's
  30208. // function.sent implementation.
  30209. context.sent = context._sent = context.arg;
  30210. } else if (context.method === "throw") {
  30211. if (state === GenStateSuspendedStart) {
  30212. state = GenStateCompleted;
  30213. throw context.arg;
  30214. }
  30215. context.dispatchException(context.arg);
  30216. } else if (context.method === "return") {
  30217. context.abrupt("return", context.arg);
  30218. }
  30219. state = GenStateExecuting;
  30220. var record = tryCatch(innerFn, self, context);
  30221. if (record.type === "normal") {
  30222. // If an exception is thrown from innerFn, we leave state ===
  30223. // GenStateExecuting and loop back for another invocation.
  30224. state = context.done
  30225. ? GenStateCompleted
  30226. : GenStateSuspendedYield;
  30227. if (record.arg === ContinueSentinel) {
  30228. continue;
  30229. }
  30230. return {
  30231. value: record.arg,
  30232. done: context.done
  30233. };
  30234. } else if (record.type === "throw") {
  30235. state = GenStateCompleted;
  30236. // Dispatch the exception by looping back around to the
  30237. // context.dispatchException(context.arg) call above.
  30238. context.method = "throw";
  30239. context.arg = record.arg;
  30240. }
  30241. }
  30242. };
  30243. }
  30244. // Call delegate.iterator[context.method](context.arg) and handle the
  30245. // result, either by returning a { value, done } result from the
  30246. // delegate iterator, or by modifying context.method and context.arg,
  30247. // setting context.delegate to null, and returning the ContinueSentinel.
  30248. function maybeInvokeDelegate(delegate, context) {
  30249. var method = delegate.iterator[context.method];
  30250. if (method === undefined) {
  30251. // A .throw or .return when the delegate iterator has no .throw
  30252. // method always terminates the yield* loop.
  30253. context.delegate = null;
  30254. if (context.method === "throw") {
  30255. if (delegate.iterator.return) {
  30256. // If the delegate iterator has a return method, give it a
  30257. // chance to clean up.
  30258. context.method = "return";
  30259. context.arg = undefined;
  30260. maybeInvokeDelegate(delegate, context);
  30261. if (context.method === "throw") {
  30262. // If maybeInvokeDelegate(context) changed context.method from
  30263. // "return" to "throw", let that override the TypeError below.
  30264. return ContinueSentinel;
  30265. }
  30266. }
  30267. context.method = "throw";
  30268. context.arg = new TypeError(
  30269. "The iterator does not provide a 'throw' method");
  30270. }
  30271. return ContinueSentinel;
  30272. }
  30273. var record = tryCatch(method, delegate.iterator, context.arg);
  30274. if (record.type === "throw") {
  30275. context.method = "throw";
  30276. context.arg = record.arg;
  30277. context.delegate = null;
  30278. return ContinueSentinel;
  30279. }
  30280. var info = record.arg;
  30281. if (! info) {
  30282. context.method = "throw";
  30283. context.arg = new TypeError("iterator result is not an object");
  30284. context.delegate = null;
  30285. return ContinueSentinel;
  30286. }
  30287. if (info.done) {
  30288. // Assign the result of the finished delegate to the temporary
  30289. // variable specified by delegate.resultName (see delegateYield).
  30290. context[delegate.resultName] = info.value;
  30291. // Resume execution at the desired location (see delegateYield).
  30292. context.next = delegate.nextLoc;
  30293. // If context.method was "throw" but the delegate handled the
  30294. // exception, let the outer generator proceed normally. If
  30295. // context.method was "next", forget context.arg since it has been
  30296. // "consumed" by the delegate iterator. If context.method was
  30297. // "return", allow the original .return call to continue in the
  30298. // outer generator.
  30299. if (context.method !== "return") {
  30300. context.method = "next";
  30301. context.arg = undefined;
  30302. }
  30303. } else {
  30304. // Re-yield the result returned by the delegate method.
  30305. return info;
  30306. }
  30307. // The delegate iterator is finished, so forget it and continue with
  30308. // the outer generator.
  30309. context.delegate = null;
  30310. return ContinueSentinel;
  30311. }
  30312. // Define Generator.prototype.{next,throw,return} in terms of the
  30313. // unified ._invoke helper method.
  30314. defineIteratorMethods(Gp);
  30315. Gp[toStringTagSymbol] = "Generator";
  30316. // A Generator should always return itself as the iterator object when the
  30317. // @@iterator function is called on it. Some browsers' implementations of the
  30318. // iterator prototype chain incorrectly implement this, causing the Generator
  30319. // object to not be returned from this call. This ensures that doesn't happen.
  30320. // See https://github.com/facebook/regenerator/issues/274 for more details.
  30321. Gp[iteratorSymbol] = function() {
  30322. return this;
  30323. };
  30324. Gp.toString = function() {
  30325. return "[object Generator]";
  30326. };
  30327. function pushTryEntry(locs) {
  30328. var entry = { tryLoc: locs[0] };
  30329. if (1 in locs) {
  30330. entry.catchLoc = locs[1];
  30331. }
  30332. if (2 in locs) {
  30333. entry.finallyLoc = locs[2];
  30334. entry.afterLoc = locs[3];
  30335. }
  30336. this.tryEntries.push(entry);
  30337. }
  30338. function resetTryEntry(entry) {
  30339. var record = entry.completion || {};
  30340. record.type = "normal";
  30341. delete record.arg;
  30342. entry.completion = record;
  30343. }
  30344. function Context(tryLocsList) {
  30345. // The root entry object (effectively a try statement without a catch
  30346. // or a finally block) gives us a place to store values thrown from
  30347. // locations where there is no enclosing try statement.
  30348. this.tryEntries = [{ tryLoc: "root" }];
  30349. tryLocsList.forEach(pushTryEntry, this);
  30350. this.reset(true);
  30351. }
  30352. runtime.keys = function(object) {
  30353. var keys = [];
  30354. for (var key in object) {
  30355. keys.push(key);
  30356. }
  30357. keys.reverse();
  30358. // Rather than returning an object with a next method, we keep
  30359. // things simple and return the next function itself.
  30360. return function next() {
  30361. while (keys.length) {
  30362. var key = keys.pop();
  30363. if (key in object) {
  30364. next.value = key;
  30365. next.done = false;
  30366. return next;
  30367. }
  30368. }
  30369. // To avoid creating an additional object, we just hang the .value
  30370. // and .done properties off the next function object itself. This
  30371. // also ensures that the minifier will not anonymize the function.
  30372. next.done = true;
  30373. return next;
  30374. };
  30375. };
  30376. function values(iterable) {
  30377. if (iterable) {
  30378. var iteratorMethod = iterable[iteratorSymbol];
  30379. if (iteratorMethod) {
  30380. return iteratorMethod.call(iterable);
  30381. }
  30382. if (typeof iterable.next === "function") {
  30383. return iterable;
  30384. }
  30385. if (!isNaN(iterable.length)) {
  30386. var i = -1, next = function next() {
  30387. while (++i < iterable.length) {
  30388. if (hasOwn.call(iterable, i)) {
  30389. next.value = iterable[i];
  30390. next.done = false;
  30391. return next;
  30392. }
  30393. }
  30394. next.value = undefined;
  30395. next.done = true;
  30396. return next;
  30397. };
  30398. return next.next = next;
  30399. }
  30400. }
  30401. // Return an iterator with no values.
  30402. return { next: doneResult };
  30403. }
  30404. runtime.values = values;
  30405. function doneResult() {
  30406. return { value: undefined, done: true };
  30407. }
  30408. Context.prototype = {
  30409. constructor: Context,
  30410. reset: function(skipTempReset) {
  30411. this.prev = 0;
  30412. this.next = 0;
  30413. // Resetting context._sent for legacy support of Babel's
  30414. // function.sent implementation.
  30415. this.sent = this._sent = undefined;
  30416. this.done = false;
  30417. this.delegate = null;
  30418. this.method = "next";
  30419. this.arg = undefined;
  30420. this.tryEntries.forEach(resetTryEntry);
  30421. if (!skipTempReset) {
  30422. for (var name in this) {
  30423. // Not sure about the optimal order of these conditions:
  30424. if (name.charAt(0) === "t" &&
  30425. hasOwn.call(this, name) &&
  30426. !isNaN(+name.slice(1))) {
  30427. this[name] = undefined;
  30428. }
  30429. }
  30430. }
  30431. },
  30432. stop: function() {
  30433. this.done = true;
  30434. var rootEntry = this.tryEntries[0];
  30435. var rootRecord = rootEntry.completion;
  30436. if (rootRecord.type === "throw") {
  30437. throw rootRecord.arg;
  30438. }
  30439. return this.rval;
  30440. },
  30441. dispatchException: function(exception) {
  30442. if (this.done) {
  30443. throw exception;
  30444. }
  30445. var context = this;
  30446. function handle(loc, caught) {
  30447. record.type = "throw";
  30448. record.arg = exception;
  30449. context.next = loc;
  30450. if (caught) {
  30451. // If the dispatched exception was caught by a catch block,
  30452. // then let that catch block handle the exception normally.
  30453. context.method = "next";
  30454. context.arg = undefined;
  30455. }
  30456. return !! caught;
  30457. }
  30458. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  30459. var entry = this.tryEntries[i];
  30460. var record = entry.completion;
  30461. if (entry.tryLoc === "root") {
  30462. // Exception thrown outside of any try block that could handle
  30463. // it, so set the completion value of the entire function to
  30464. // throw the exception.
  30465. return handle("end");
  30466. }
  30467. if (entry.tryLoc <= this.prev) {
  30468. var hasCatch = hasOwn.call(entry, "catchLoc");
  30469. var hasFinally = hasOwn.call(entry, "finallyLoc");
  30470. if (hasCatch && hasFinally) {
  30471. if (this.prev < entry.catchLoc) {
  30472. return handle(entry.catchLoc, true);
  30473. } else if (this.prev < entry.finallyLoc) {
  30474. return handle(entry.finallyLoc);
  30475. }
  30476. } else if (hasCatch) {
  30477. if (this.prev < entry.catchLoc) {
  30478. return handle(entry.catchLoc, true);
  30479. }
  30480. } else if (hasFinally) {
  30481. if (this.prev < entry.finallyLoc) {
  30482. return handle(entry.finallyLoc);
  30483. }
  30484. } else {
  30485. throw new Error("try statement without catch or finally");
  30486. }
  30487. }
  30488. }
  30489. },
  30490. abrupt: function(type, arg) {
  30491. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  30492. var entry = this.tryEntries[i];
  30493. if (entry.tryLoc <= this.prev &&
  30494. hasOwn.call(entry, "finallyLoc") &&
  30495. this.prev < entry.finallyLoc) {
  30496. var finallyEntry = entry;
  30497. break;
  30498. }
  30499. }
  30500. if (finallyEntry &&
  30501. (type === "break" ||
  30502. type === "continue") &&
  30503. finallyEntry.tryLoc <= arg &&
  30504. arg <= finallyEntry.finallyLoc) {
  30505. // Ignore the finally entry if control is not jumping to a
  30506. // location outside the try/catch block.
  30507. finallyEntry = null;
  30508. }
  30509. var record = finallyEntry ? finallyEntry.completion : {};
  30510. record.type = type;
  30511. record.arg = arg;
  30512. if (finallyEntry) {
  30513. this.method = "next";
  30514. this.next = finallyEntry.finallyLoc;
  30515. return ContinueSentinel;
  30516. }
  30517. return this.complete(record);
  30518. },
  30519. complete: function(record, afterLoc) {
  30520. if (record.type === "throw") {
  30521. throw record.arg;
  30522. }
  30523. if (record.type === "break" ||
  30524. record.type === "continue") {
  30525. this.next = record.arg;
  30526. } else if (record.type === "return") {
  30527. this.rval = this.arg = record.arg;
  30528. this.method = "return";
  30529. this.next = "end";
  30530. } else if (record.type === "normal" && afterLoc) {
  30531. this.next = afterLoc;
  30532. }
  30533. return ContinueSentinel;
  30534. },
  30535. finish: function(finallyLoc) {
  30536. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  30537. var entry = this.tryEntries[i];
  30538. if (entry.finallyLoc === finallyLoc) {
  30539. this.complete(entry.completion, entry.afterLoc);
  30540. resetTryEntry(entry);
  30541. return ContinueSentinel;
  30542. }
  30543. }
  30544. },
  30545. "catch": function(tryLoc) {
  30546. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  30547. var entry = this.tryEntries[i];
  30548. if (entry.tryLoc === tryLoc) {
  30549. var record = entry.completion;
  30550. if (record.type === "throw") {
  30551. var thrown = record.arg;
  30552. resetTryEntry(entry);
  30553. }
  30554. return thrown;
  30555. }
  30556. }
  30557. // The context.catch method must only be called with a location
  30558. // argument that corresponds to a known catch block.
  30559. throw new Error("illegal catch attempt");
  30560. },
  30561. delegateYield: function(iterable, resultName, nextLoc) {
  30562. this.delegate = {
  30563. iterator: values(iterable),
  30564. resultName: resultName,
  30565. nextLoc: nextLoc
  30566. };
  30567. if (this.method === "next") {
  30568. // Deliberately forget the last sent value so that we don't
  30569. // accidentally pass it on to the delegate.
  30570. this.arg = undefined;
  30571. }
  30572. return ContinueSentinel;
  30573. }
  30574. };
  30575. })(
  30576. // In sloppy mode, unbound `this` refers to the global object, fallback to
  30577. // Function constructor if we're in global strict mode. That is sadly a form
  30578. // of indirect eval which violates Content Security Policy.
  30579. (function() { return this })() || Function("return this")()
  30580. );
  30581. /***/ }),
  30582. /* 21 */
  30583. /***/ (function(module, exports, __webpack_require__) {
  30584. /*
  30585. * Copyright 2009-2011 Mozilla Foundation and contributors
  30586. * Licensed under the New BSD license. See LICENSE.txt or:
  30587. * http://opensource.org/licenses/BSD-3-Clause
  30588. */
  30589. exports.SourceMapGenerator = __webpack_require__(5).SourceMapGenerator;
  30590. exports.SourceMapConsumer = __webpack_require__(24).SourceMapConsumer;
  30591. exports.SourceNode = __webpack_require__(27).SourceNode;
  30592. /***/ }),
  30593. /* 22 */
  30594. /***/ (function(module, exports) {
  30595. /* -*- Mode: js; js-indent-level: 2; -*- */
  30596. /*
  30597. * Copyright 2011 Mozilla Foundation and contributors
  30598. * Licensed under the New BSD license. See LICENSE or:
  30599. * http://opensource.org/licenses/BSD-3-Clause
  30600. */
  30601. var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  30602. /**
  30603. * Encode an integer in the range of 0 to 63 to a single base 64 digit.
  30604. */
  30605. exports.encode = function (number) {
  30606. if (0 <= number && number < intToCharMap.length) {
  30607. return intToCharMap[number];
  30608. }
  30609. throw new TypeError("Must be between 0 and 63: " + number);
  30610. };
  30611. /**
  30612. * Decode a single base 64 character code digit to an integer. Returns -1 on
  30613. * failure.
  30614. */
  30615. exports.decode = function (charCode) {
  30616. var bigA = 65; // 'A'
  30617. var bigZ = 90; // 'Z'
  30618. var littleA = 97; // 'a'
  30619. var littleZ = 122; // 'z'
  30620. var zero = 48; // '0'
  30621. var nine = 57; // '9'
  30622. var plus = 43; // '+'
  30623. var slash = 47; // '/'
  30624. var littleOffset = 26;
  30625. var numberOffset = 52;
  30626. // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
  30627. if (bigA <= charCode && charCode <= bigZ) {
  30628. return (charCode - bigA);
  30629. }
  30630. // 26 - 51: abcdefghijklmnopqrstuvwxyz
  30631. if (littleA <= charCode && charCode <= littleZ) {
  30632. return (charCode - littleA + littleOffset);
  30633. }
  30634. // 52 - 61: 0123456789
  30635. if (zero <= charCode && charCode <= nine) {
  30636. return (charCode - zero + numberOffset);
  30637. }
  30638. // 62: +
  30639. if (charCode == plus) {
  30640. return 62;
  30641. }
  30642. // 63: /
  30643. if (charCode == slash) {
  30644. return 63;
  30645. }
  30646. // Invalid base64 digit.
  30647. return -1;
  30648. };
  30649. /***/ }),
  30650. /* 23 */
  30651. /***/ (function(module, exports, __webpack_require__) {
  30652. /* -*- Mode: js; js-indent-level: 2; -*- */
  30653. /*
  30654. * Copyright 2014 Mozilla Foundation and contributors
  30655. * Licensed under the New BSD license. See LICENSE or:
  30656. * http://opensource.org/licenses/BSD-3-Clause
  30657. */
  30658. var util = __webpack_require__(0);
  30659. /**
  30660. * Determine whether mappingB is after mappingA with respect to generated
  30661. * position.
  30662. */
  30663. function generatedPositionAfter(mappingA, mappingB) {
  30664. // Optimized for most common case
  30665. var lineA = mappingA.generatedLine;
  30666. var lineB = mappingB.generatedLine;
  30667. var columnA = mappingA.generatedColumn;
  30668. var columnB = mappingB.generatedColumn;
  30669. return lineB > lineA || lineB == lineA && columnB >= columnA ||
  30670. util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  30671. }
  30672. /**
  30673. * A data structure to provide a sorted view of accumulated mappings in a
  30674. * performance conscious manner. It trades a neglibable overhead in general
  30675. * case for a large speedup in case of mappings being added in order.
  30676. */
  30677. function MappingList() {
  30678. this._array = [];
  30679. this._sorted = true;
  30680. // Serves as infimum
  30681. this._last = {generatedLine: -1, generatedColumn: 0};
  30682. }
  30683. /**
  30684. * Iterate through internal items. This method takes the same arguments that
  30685. * `Array.prototype.forEach` takes.
  30686. *
  30687. * NOTE: The order of the mappings is NOT guaranteed.
  30688. */
  30689. MappingList.prototype.unsortedForEach =
  30690. function MappingList_forEach(aCallback, aThisArg) {
  30691. this._array.forEach(aCallback, aThisArg);
  30692. };
  30693. /**
  30694. * Add the given source mapping.
  30695. *
  30696. * @param Object aMapping
  30697. */
  30698. MappingList.prototype.add = function MappingList_add(aMapping) {
  30699. if (generatedPositionAfter(this._last, aMapping)) {
  30700. this._last = aMapping;
  30701. this._array.push(aMapping);
  30702. } else {
  30703. this._sorted = false;
  30704. this._array.push(aMapping);
  30705. }
  30706. };
  30707. /**
  30708. * Returns the flat, sorted array of mappings. The mappings are sorted by
  30709. * generated position.
  30710. *
  30711. * WARNING: This method returns internal data without copying, for
  30712. * performance. The return value must NOT be mutated, and should be treated as
  30713. * an immutable borrow. If you want to take ownership, you must make your own
  30714. * copy.
  30715. */
  30716. MappingList.prototype.toArray = function MappingList_toArray() {
  30717. if (!this._sorted) {
  30718. this._array.sort(util.compareByGeneratedPositionsInflated);
  30719. this._sorted = true;
  30720. }
  30721. return this._array;
  30722. };
  30723. exports.MappingList = MappingList;
  30724. /***/ }),
  30725. /* 24 */
  30726. /***/ (function(module, exports, __webpack_require__) {
  30727. /* -*- Mode: js; js-indent-level: 2; -*- */
  30728. /*
  30729. * Copyright 2011 Mozilla Foundation and contributors
  30730. * Licensed under the New BSD license. See LICENSE or:
  30731. * http://opensource.org/licenses/BSD-3-Clause
  30732. */
  30733. var util = __webpack_require__(0);
  30734. var binarySearch = __webpack_require__(25);
  30735. var ArraySet = __webpack_require__(7).ArraySet;
  30736. var base64VLQ = __webpack_require__(6);
  30737. var quickSort = __webpack_require__(26).quickSort;
  30738. function SourceMapConsumer(aSourceMap) {
  30739. var sourceMap = aSourceMap;
  30740. if (typeof aSourceMap === 'string') {
  30741. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  30742. }
  30743. return sourceMap.sections != null
  30744. ? new IndexedSourceMapConsumer(sourceMap)
  30745. : new BasicSourceMapConsumer(sourceMap);
  30746. }
  30747. SourceMapConsumer.fromSourceMap = function(aSourceMap) {
  30748. return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
  30749. }
  30750. /**
  30751. * The version of the source mapping spec that we are consuming.
  30752. */
  30753. SourceMapConsumer.prototype._version = 3;
  30754. // `__generatedMappings` and `__originalMappings` are arrays that hold the
  30755. // parsed mapping coordinates from the source map's "mappings" attribute. They
  30756. // are lazily instantiated, accessed via the `_generatedMappings` and
  30757. // `_originalMappings` getters respectively, and we only parse the mappings
  30758. // and create these arrays once queried for a source location. We jump through
  30759. // these hoops because there can be many thousands of mappings, and parsing
  30760. // them is expensive, so we only want to do it if we must.
  30761. //
  30762. // Each object in the arrays is of the form:
  30763. //
  30764. // {
  30765. // generatedLine: The line number in the generated code,
  30766. // generatedColumn: The column number in the generated code,
  30767. // source: The path to the original source file that generated this
  30768. // chunk of code,
  30769. // originalLine: The line number in the original source that
  30770. // corresponds to this chunk of generated code,
  30771. // originalColumn: The column number in the original source that
  30772. // corresponds to this chunk of generated code,
  30773. // name: The name of the original symbol which generated this chunk of
  30774. // code.
  30775. // }
  30776. //
  30777. // All properties except for `generatedLine` and `generatedColumn` can be
  30778. // `null`.
  30779. //
  30780. // `_generatedMappings` is ordered by the generated positions.
  30781. //
  30782. // `_originalMappings` is ordered by the original positions.
  30783. SourceMapConsumer.prototype.__generatedMappings = null;
  30784. Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
  30785. get: function () {
  30786. if (!this.__generatedMappings) {
  30787. this._parseMappings(this._mappings, this.sourceRoot);
  30788. }
  30789. return this.__generatedMappings;
  30790. }
  30791. });
  30792. SourceMapConsumer.prototype.__originalMappings = null;
  30793. Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
  30794. get: function () {
  30795. if (!this.__originalMappings) {
  30796. this._parseMappings(this._mappings, this.sourceRoot);
  30797. }
  30798. return this.__originalMappings;
  30799. }
  30800. });
  30801. SourceMapConsumer.prototype._charIsMappingSeparator =
  30802. function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
  30803. var c = aStr.charAt(index);
  30804. return c === ";" || c === ",";
  30805. };
  30806. /**
  30807. * Parse the mappings in a string in to a data structure which we can easily
  30808. * query (the ordered arrays in the `this.__generatedMappings` and
  30809. * `this.__originalMappings` properties).
  30810. */
  30811. SourceMapConsumer.prototype._parseMappings =
  30812. function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  30813. throw new Error("Subclasses must implement _parseMappings");
  30814. };
  30815. SourceMapConsumer.GENERATED_ORDER = 1;
  30816. SourceMapConsumer.ORIGINAL_ORDER = 2;
  30817. SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  30818. SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  30819. /**
  30820. * Iterate over each mapping between an original source/line/column and a
  30821. * generated line/column in this source map.
  30822. *
  30823. * @param Function aCallback
  30824. * The function that is called with each mapping.
  30825. * @param Object aContext
  30826. * Optional. If specified, this object will be the value of `this` every
  30827. * time that `aCallback` is called.
  30828. * @param aOrder
  30829. * Either `SourceMapConsumer.GENERATED_ORDER` or
  30830. * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
  30831. * iterate over the mappings sorted by the generated file's line/column
  30832. * order or the original's source/line/column order, respectively. Defaults to
  30833. * `SourceMapConsumer.GENERATED_ORDER`.
  30834. */
  30835. SourceMapConsumer.prototype.eachMapping =
  30836. function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  30837. var context = aContext || null;
  30838. var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
  30839. var mappings;
  30840. switch (order) {
  30841. case SourceMapConsumer.GENERATED_ORDER:
  30842. mappings = this._generatedMappings;
  30843. break;
  30844. case SourceMapConsumer.ORIGINAL_ORDER:
  30845. mappings = this._originalMappings;
  30846. break;
  30847. default:
  30848. throw new Error("Unknown order of iteration.");
  30849. }
  30850. var sourceRoot = this.sourceRoot;
  30851. mappings.map(function (mapping) {
  30852. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  30853. if (source != null && sourceRoot != null) {
  30854. source = util.join(sourceRoot, source);
  30855. }
  30856. return {
  30857. source: source,
  30858. generatedLine: mapping.generatedLine,
  30859. generatedColumn: mapping.generatedColumn,
  30860. originalLine: mapping.originalLine,
  30861. originalColumn: mapping.originalColumn,
  30862. name: mapping.name === null ? null : this._names.at(mapping.name)
  30863. };
  30864. }, this).forEach(aCallback, context);
  30865. };
  30866. /**
  30867. * Returns all generated line and column information for the original source,
  30868. * line, and column provided. If no column is provided, returns all mappings
  30869. * corresponding to a either the line we are searching for or the next
  30870. * closest line that has any mappings. Otherwise, returns all mappings
  30871. * corresponding to the given line and either the column we are searching for
  30872. * or the next closest column that has any offsets.
  30873. *
  30874. * The only argument is an object with the following properties:
  30875. *
  30876. * - source: The filename of the original source.
  30877. * - line: The line number in the original source.
  30878. * - column: Optional. the column number in the original source.
  30879. *
  30880. * and an array of objects is returned, each with the following properties:
  30881. *
  30882. * - line: The line number in the generated source, or null.
  30883. * - column: The column number in the generated source, or null.
  30884. */
  30885. SourceMapConsumer.prototype.allGeneratedPositionsFor =
  30886. function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  30887. var line = util.getArg(aArgs, 'line');
  30888. // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
  30889. // returns the index of the closest mapping less than the needle. By
  30890. // setting needle.originalColumn to 0, we thus find the last mapping for
  30891. // the given line, provided such a mapping exists.
  30892. var needle = {
  30893. source: util.getArg(aArgs, 'source'),
  30894. originalLine: line,
  30895. originalColumn: util.getArg(aArgs, 'column', 0)
  30896. };
  30897. if (this.sourceRoot != null) {
  30898. needle.source = util.relative(this.sourceRoot, needle.source);
  30899. }
  30900. if (!this._sources.has(needle.source)) {
  30901. return [];
  30902. }
  30903. needle.source = this._sources.indexOf(needle.source);
  30904. var mappings = [];
  30905. var index = this._findMapping(needle,
  30906. this._originalMappings,
  30907. "originalLine",
  30908. "originalColumn",
  30909. util.compareByOriginalPositions,
  30910. binarySearch.LEAST_UPPER_BOUND);
  30911. if (index >= 0) {
  30912. var mapping = this._originalMappings[index];
  30913. if (aArgs.column === undefined) {
  30914. var originalLine = mapping.originalLine;
  30915. // Iterate until either we run out of mappings, or we run into
  30916. // a mapping for a different line than the one we found. Since
  30917. // mappings are sorted, this is guaranteed to find all mappings for
  30918. // the line we found.
  30919. while (mapping && mapping.originalLine === originalLine) {
  30920. mappings.push({
  30921. line: util.getArg(mapping, 'generatedLine', null),
  30922. column: util.getArg(mapping, 'generatedColumn', null),
  30923. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  30924. });
  30925. mapping = this._originalMappings[++index];
  30926. }
  30927. } else {
  30928. var originalColumn = mapping.originalColumn;
  30929. // Iterate until either we run out of mappings, or we run into
  30930. // a mapping for a different line than the one we were searching for.
  30931. // Since mappings are sorted, this is guaranteed to find all mappings for
  30932. // the line we are searching for.
  30933. while (mapping &&
  30934. mapping.originalLine === line &&
  30935. mapping.originalColumn == originalColumn) {
  30936. mappings.push({
  30937. line: util.getArg(mapping, 'generatedLine', null),
  30938. column: util.getArg(mapping, 'generatedColumn', null),
  30939. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  30940. });
  30941. mapping = this._originalMappings[++index];
  30942. }
  30943. }
  30944. }
  30945. return mappings;
  30946. };
  30947. exports.SourceMapConsumer = SourceMapConsumer;
  30948. /**
  30949. * A BasicSourceMapConsumer instance represents a parsed source map which we can
  30950. * query for information about the original file positions by giving it a file
  30951. * position in the generated source.
  30952. *
  30953. * The only parameter is the raw source map (either as a JSON string, or
  30954. * already parsed to an object). According to the spec, source maps have the
  30955. * following attributes:
  30956. *
  30957. * - version: Which version of the source map spec this map is following.
  30958. * - sources: An array of URLs to the original source files.
  30959. * - names: An array of identifiers which can be referrenced by individual mappings.
  30960. * - sourceRoot: Optional. The URL root from which all sources are relative.
  30961. * - sourcesContent: Optional. An array of contents of the original source files.
  30962. * - mappings: A string of base64 VLQs which contain the actual mappings.
  30963. * - file: Optional. The generated file this source map is associated with.
  30964. *
  30965. * Here is an example source map, taken from the source map spec[0]:
  30966. *
  30967. * {
  30968. * version : 3,
  30969. * file: "out.js",
  30970. * sourceRoot : "",
  30971. * sources: ["foo.js", "bar.js"],
  30972. * names: ["src", "maps", "are", "fun"],
  30973. * mappings: "AA,AB;;ABCDE;"
  30974. * }
  30975. *
  30976. * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
  30977. */
  30978. function BasicSourceMapConsumer(aSourceMap) {
  30979. var sourceMap = aSourceMap;
  30980. if (typeof aSourceMap === 'string') {
  30981. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  30982. }
  30983. var version = util.getArg(sourceMap, 'version');
  30984. var sources = util.getArg(sourceMap, 'sources');
  30985. // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
  30986. // requires the array) to play nice here.
  30987. var names = util.getArg(sourceMap, 'names', []);
  30988. var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
  30989. var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
  30990. var mappings = util.getArg(sourceMap, 'mappings');
  30991. var file = util.getArg(sourceMap, 'file', null);
  30992. // Once again, Sass deviates from the spec and supplies the version as a
  30993. // string rather than a number, so we use loose equality checking here.
  30994. if (version != this._version) {
  30995. throw new Error('Unsupported version: ' + version);
  30996. }
  30997. sources = sources
  30998. .map(String)
  30999. // Some source maps produce relative source paths like "./foo.js" instead of
  31000. // "foo.js". Normalize these first so that future comparisons will succeed.
  31001. // See bugzil.la/1090768.
  31002. .map(util.normalize)
  31003. // Always ensure that absolute sources are internally stored relative to
  31004. // the source root, if the source root is absolute. Not doing this would
  31005. // be particularly problematic when the source root is a prefix of the
  31006. // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
  31007. .map(function (source) {
  31008. return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
  31009. ? util.relative(sourceRoot, source)
  31010. : source;
  31011. });
  31012. // Pass `true` below to allow duplicate names and sources. While source maps
  31013. // are intended to be compressed and deduplicated, the TypeScript compiler
  31014. // sometimes generates source maps with duplicates in them. See Github issue
  31015. // #72 and bugzil.la/889492.
  31016. this._names = ArraySet.fromArray(names.map(String), true);
  31017. this._sources = ArraySet.fromArray(sources, true);
  31018. this.sourceRoot = sourceRoot;
  31019. this.sourcesContent = sourcesContent;
  31020. this._mappings = mappings;
  31021. this.file = file;
  31022. }
  31023. BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  31024. BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  31025. /**
  31026. * Create a BasicSourceMapConsumer from a SourceMapGenerator.
  31027. *
  31028. * @param SourceMapGenerator aSourceMap
  31029. * The source map that will be consumed.
  31030. * @returns BasicSourceMapConsumer
  31031. */
  31032. BasicSourceMapConsumer.fromSourceMap =
  31033. function SourceMapConsumer_fromSourceMap(aSourceMap) {
  31034. var smc = Object.create(BasicSourceMapConsumer.prototype);
  31035. var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
  31036. var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
  31037. smc.sourceRoot = aSourceMap._sourceRoot;
  31038. smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
  31039. smc.sourceRoot);
  31040. smc.file = aSourceMap._file;
  31041. // Because we are modifying the entries (by converting string sources and
  31042. // names to indices into the sources and names ArraySets), we have to make
  31043. // a copy of the entry or else bad things happen. Shared mutable state
  31044. // strikes again! See github issue #191.
  31045. var generatedMappings = aSourceMap._mappings.toArray().slice();
  31046. var destGeneratedMappings = smc.__generatedMappings = [];
  31047. var destOriginalMappings = smc.__originalMappings = [];
  31048. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  31049. var srcMapping = generatedMappings[i];
  31050. var destMapping = new Mapping;
  31051. destMapping.generatedLine = srcMapping.generatedLine;
  31052. destMapping.generatedColumn = srcMapping.generatedColumn;
  31053. if (srcMapping.source) {
  31054. destMapping.source = sources.indexOf(srcMapping.source);
  31055. destMapping.originalLine = srcMapping.originalLine;
  31056. destMapping.originalColumn = srcMapping.originalColumn;
  31057. if (srcMapping.name) {
  31058. destMapping.name = names.indexOf(srcMapping.name);
  31059. }
  31060. destOriginalMappings.push(destMapping);
  31061. }
  31062. destGeneratedMappings.push(destMapping);
  31063. }
  31064. quickSort(smc.__originalMappings, util.compareByOriginalPositions);
  31065. return smc;
  31066. };
  31067. /**
  31068. * The version of the source mapping spec that we are consuming.
  31069. */
  31070. BasicSourceMapConsumer.prototype._version = 3;
  31071. /**
  31072. * The list of original sources.
  31073. */
  31074. Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
  31075. get: function () {
  31076. return this._sources.toArray().map(function (s) {
  31077. return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
  31078. }, this);
  31079. }
  31080. });
  31081. /**
  31082. * Provide the JIT with a nice shape / hidden class.
  31083. */
  31084. function Mapping() {
  31085. this.generatedLine = 0;
  31086. this.generatedColumn = 0;
  31087. this.source = null;
  31088. this.originalLine = null;
  31089. this.originalColumn = null;
  31090. this.name = null;
  31091. }
  31092. /**
  31093. * Parse the mappings in a string in to a data structure which we can easily
  31094. * query (the ordered arrays in the `this.__generatedMappings` and
  31095. * `this.__originalMappings` properties).
  31096. */
  31097. BasicSourceMapConsumer.prototype._parseMappings =
  31098. function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  31099. var generatedLine = 1;
  31100. var previousGeneratedColumn = 0;
  31101. var previousOriginalLine = 0;
  31102. var previousOriginalColumn = 0;
  31103. var previousSource = 0;
  31104. var previousName = 0;
  31105. var length = aStr.length;
  31106. var index = 0;
  31107. var cachedSegments = {};
  31108. var temp = {};
  31109. var originalMappings = [];
  31110. var generatedMappings = [];
  31111. var mapping, str, segment, end, value;
  31112. while (index < length) {
  31113. if (aStr.charAt(index) === ';') {
  31114. generatedLine++;
  31115. index++;
  31116. previousGeneratedColumn = 0;
  31117. }
  31118. else if (aStr.charAt(index) === ',') {
  31119. index++;
  31120. }
  31121. else {
  31122. mapping = new Mapping();
  31123. mapping.generatedLine = generatedLine;
  31124. // Because each offset is encoded relative to the previous one,
  31125. // many segments often have the same encoding. We can exploit this
  31126. // fact by caching the parsed variable length fields of each segment,
  31127. // allowing us to avoid a second parse if we encounter the same
  31128. // segment again.
  31129. for (end = index; end < length; end++) {
  31130. if (this._charIsMappingSeparator(aStr, end)) {
  31131. break;
  31132. }
  31133. }
  31134. str = aStr.slice(index, end);
  31135. segment = cachedSegments[str];
  31136. if (segment) {
  31137. index += str.length;
  31138. } else {
  31139. segment = [];
  31140. while (index < end) {
  31141. base64VLQ.decode(aStr, index, temp);
  31142. value = temp.value;
  31143. index = temp.rest;
  31144. segment.push(value);
  31145. }
  31146. if (segment.length === 2) {
  31147. throw new Error('Found a source, but no line and column');
  31148. }
  31149. if (segment.length === 3) {
  31150. throw new Error('Found a source and line, but no column');
  31151. }
  31152. cachedSegments[str] = segment;
  31153. }
  31154. // Generated column.
  31155. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  31156. previousGeneratedColumn = mapping.generatedColumn;
  31157. if (segment.length > 1) {
  31158. // Original source.
  31159. mapping.source = previousSource + segment[1];
  31160. previousSource += segment[1];
  31161. // Original line.
  31162. mapping.originalLine = previousOriginalLine + segment[2];
  31163. previousOriginalLine = mapping.originalLine;
  31164. // Lines are stored 0-based
  31165. mapping.originalLine += 1;
  31166. // Original column.
  31167. mapping.originalColumn = previousOriginalColumn + segment[3];
  31168. previousOriginalColumn = mapping.originalColumn;
  31169. if (segment.length > 4) {
  31170. // Original name.
  31171. mapping.name = previousName + segment[4];
  31172. previousName += segment[4];
  31173. }
  31174. }
  31175. generatedMappings.push(mapping);
  31176. if (typeof mapping.originalLine === 'number') {
  31177. originalMappings.push(mapping);
  31178. }
  31179. }
  31180. }
  31181. quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
  31182. this.__generatedMappings = generatedMappings;
  31183. quickSort(originalMappings, util.compareByOriginalPositions);
  31184. this.__originalMappings = originalMappings;
  31185. };
  31186. /**
  31187. * Find the mapping that best matches the hypothetical "needle" mapping that
  31188. * we are searching for in the given "haystack" of mappings.
  31189. */
  31190. BasicSourceMapConsumer.prototype._findMapping =
  31191. function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
  31192. aColumnName, aComparator, aBias) {
  31193. // To return the position we are searching for, we must first find the
  31194. // mapping for the given position and then return the opposite position it
  31195. // points to. Because the mappings are sorted, we can use binary search to
  31196. // find the best mapping.
  31197. if (aNeedle[aLineName] <= 0) {
  31198. throw new TypeError('Line must be greater than or equal to 1, got '
  31199. + aNeedle[aLineName]);
  31200. }
  31201. if (aNeedle[aColumnName] < 0) {
  31202. throw new TypeError('Column must be greater than or equal to 0, got '
  31203. + aNeedle[aColumnName]);
  31204. }
  31205. return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  31206. };
  31207. /**
  31208. * Compute the last column for each generated mapping. The last column is
  31209. * inclusive.
  31210. */
  31211. BasicSourceMapConsumer.prototype.computeColumnSpans =
  31212. function SourceMapConsumer_computeColumnSpans() {
  31213. for (var index = 0; index < this._generatedMappings.length; ++index) {
  31214. var mapping = this._generatedMappings[index];
  31215. // Mappings do not contain a field for the last generated columnt. We
  31216. // can come up with an optimistic estimate, however, by assuming that
  31217. // mappings are contiguous (i.e. given two consecutive mappings, the
  31218. // first mapping ends where the second one starts).
  31219. if (index + 1 < this._generatedMappings.length) {
  31220. var nextMapping = this._generatedMappings[index + 1];
  31221. if (mapping.generatedLine === nextMapping.generatedLine) {
  31222. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  31223. continue;
  31224. }
  31225. }
  31226. // The last mapping for each line spans the entire line.
  31227. mapping.lastGeneratedColumn = Infinity;
  31228. }
  31229. };
  31230. /**
  31231. * Returns the original source, line, and column information for the generated
  31232. * source's line and column positions provided. The only argument is an object
  31233. * with the following properties:
  31234. *
  31235. * - line: The line number in the generated source.
  31236. * - column: The column number in the generated source.
  31237. * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
  31238. * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
  31239. * closest element that is smaller than or greater than the one we are
  31240. * searching for, respectively, if the exact element cannot be found.
  31241. * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
  31242. *
  31243. * and an object is returned with the following properties:
  31244. *
  31245. * - source: The original source file, or null.
  31246. * - line: The line number in the original source, or null.
  31247. * - column: The column number in the original source, or null.
  31248. * - name: The original identifier, or null.
  31249. */
  31250. BasicSourceMapConsumer.prototype.originalPositionFor =
  31251. function SourceMapConsumer_originalPositionFor(aArgs) {
  31252. var needle = {
  31253. generatedLine: util.getArg(aArgs, 'line'),
  31254. generatedColumn: util.getArg(aArgs, 'column')
  31255. };
  31256. var index = this._findMapping(
  31257. needle,
  31258. this._generatedMappings,
  31259. "generatedLine",
  31260. "generatedColumn",
  31261. util.compareByGeneratedPositionsDeflated,
  31262. util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
  31263. );
  31264. if (index >= 0) {
  31265. var mapping = this._generatedMappings[index];
  31266. if (mapping.generatedLine === needle.generatedLine) {
  31267. var source = util.getArg(mapping, 'source', null);
  31268. if (source !== null) {
  31269. source = this._sources.at(source);
  31270. if (this.sourceRoot != null) {
  31271. source = util.join(this.sourceRoot, source);
  31272. }
  31273. }
  31274. var name = util.getArg(mapping, 'name', null);
  31275. if (name !== null) {
  31276. name = this._names.at(name);
  31277. }
  31278. return {
  31279. source: source,
  31280. line: util.getArg(mapping, 'originalLine', null),
  31281. column: util.getArg(mapping, 'originalColumn', null),
  31282. name: name
  31283. };
  31284. }
  31285. }
  31286. return {
  31287. source: null,
  31288. line: null,
  31289. column: null,
  31290. name: null
  31291. };
  31292. };
  31293. /**
  31294. * Return true if we have the source content for every source in the source
  31295. * map, false otherwise.
  31296. */
  31297. BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
  31298. function BasicSourceMapConsumer_hasContentsOfAllSources() {
  31299. if (!this.sourcesContent) {
  31300. return false;
  31301. }
  31302. return this.sourcesContent.length >= this._sources.size() &&
  31303. !this.sourcesContent.some(function (sc) { return sc == null; });
  31304. };
  31305. /**
  31306. * Returns the original source content. The only argument is the url of the
  31307. * original source file. Returns null if no original source content is
  31308. * available.
  31309. */
  31310. BasicSourceMapConsumer.prototype.sourceContentFor =
  31311. function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  31312. if (!this.sourcesContent) {
  31313. return null;
  31314. }
  31315. if (this.sourceRoot != null) {
  31316. aSource = util.relative(this.sourceRoot, aSource);
  31317. }
  31318. if (this._sources.has(aSource)) {
  31319. return this.sourcesContent[this._sources.indexOf(aSource)];
  31320. }
  31321. var url;
  31322. if (this.sourceRoot != null
  31323. && (url = util.urlParse(this.sourceRoot))) {
  31324. // XXX: file:// URIs and absolute paths lead to unexpected behavior for
  31325. // many users. We can help them out when they expect file:// URIs to
  31326. // behave like it would if they were running a local HTTP server. See
  31327. // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
  31328. var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
  31329. if (url.scheme == "file"
  31330. && this._sources.has(fileUriAbsPath)) {
  31331. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
  31332. }
  31333. if ((!url.path || url.path == "/")
  31334. && this._sources.has("/" + aSource)) {
  31335. return this.sourcesContent[this._sources.indexOf("/" + aSource)];
  31336. }
  31337. }
  31338. // This function is used recursively from
  31339. // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
  31340. // don't want to throw if we can't find the source - we just want to
  31341. // return null, so we provide a flag to exit gracefully.
  31342. if (nullOnMissing) {
  31343. return null;
  31344. }
  31345. else {
  31346. throw new Error('"' + aSource + '" is not in the SourceMap.');
  31347. }
  31348. };
  31349. /**
  31350. * Returns the generated line and column information for the original source,
  31351. * line, and column positions provided. The only argument is an object with
  31352. * the following properties:
  31353. *
  31354. * - source: The filename of the original source.
  31355. * - line: The line number in the original source.
  31356. * - column: The column number in the original source.
  31357. * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
  31358. * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
  31359. * closest element that is smaller than or greater than the one we are
  31360. * searching for, respectively, if the exact element cannot be found.
  31361. * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
  31362. *
  31363. * and an object is returned with the following properties:
  31364. *
  31365. * - line: The line number in the generated source, or null.
  31366. * - column: The column number in the generated source, or null.
  31367. */
  31368. BasicSourceMapConsumer.prototype.generatedPositionFor =
  31369. function SourceMapConsumer_generatedPositionFor(aArgs) {
  31370. var source = util.getArg(aArgs, 'source');
  31371. if (this.sourceRoot != null) {
  31372. source = util.relative(this.sourceRoot, source);
  31373. }
  31374. if (!this._sources.has(source)) {
  31375. return {
  31376. line: null,
  31377. column: null,
  31378. lastColumn: null
  31379. };
  31380. }
  31381. source = this._sources.indexOf(source);
  31382. var needle = {
  31383. source: source,
  31384. originalLine: util.getArg(aArgs, 'line'),
  31385. originalColumn: util.getArg(aArgs, 'column')
  31386. };
  31387. var index = this._findMapping(
  31388. needle,
  31389. this._originalMappings,
  31390. "originalLine",
  31391. "originalColumn",
  31392. util.compareByOriginalPositions,
  31393. util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
  31394. );
  31395. if (index >= 0) {
  31396. var mapping = this._originalMappings[index];
  31397. if (mapping.source === needle.source) {
  31398. return {
  31399. line: util.getArg(mapping, 'generatedLine', null),
  31400. column: util.getArg(mapping, 'generatedColumn', null),
  31401. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  31402. };
  31403. }
  31404. }
  31405. return {
  31406. line: null,
  31407. column: null,
  31408. lastColumn: null
  31409. };
  31410. };
  31411. exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
  31412. /**
  31413. * An IndexedSourceMapConsumer instance represents a parsed source map which
  31414. * we can query for information. It differs from BasicSourceMapConsumer in
  31415. * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
  31416. * input.
  31417. *
  31418. * The only parameter is a raw source map (either as a JSON string, or already
  31419. * parsed to an object). According to the spec for indexed source maps, they
  31420. * have the following attributes:
  31421. *
  31422. * - version: Which version of the source map spec this map is following.
  31423. * - file: Optional. The generated file this source map is associated with.
  31424. * - sections: A list of section definitions.
  31425. *
  31426. * Each value under the "sections" field has two fields:
  31427. * - offset: The offset into the original specified at which this section
  31428. * begins to apply, defined as an object with a "line" and "column"
  31429. * field.
  31430. * - map: A source map definition. This source map could also be indexed,
  31431. * but doesn't have to be.
  31432. *
  31433. * Instead of the "map" field, it's also possible to have a "url" field
  31434. * specifying a URL to retrieve a source map from, but that's currently
  31435. * unsupported.
  31436. *
  31437. * Here's an example source map, taken from the source map spec[0], but
  31438. * modified to omit a section which uses the "url" field.
  31439. *
  31440. * {
  31441. * version : 3,
  31442. * file: "app.js",
  31443. * sections: [{
  31444. * offset: {line:100, column:10},
  31445. * map: {
  31446. * version : 3,
  31447. * file: "section.js",
  31448. * sources: ["foo.js", "bar.js"],
  31449. * names: ["src", "maps", "are", "fun"],
  31450. * mappings: "AAAA,E;;ABCDE;"
  31451. * }
  31452. * }],
  31453. * }
  31454. *
  31455. * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
  31456. */
  31457. function IndexedSourceMapConsumer(aSourceMap) {
  31458. var sourceMap = aSourceMap;
  31459. if (typeof aSourceMap === 'string') {
  31460. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  31461. }
  31462. var version = util.getArg(sourceMap, 'version');
  31463. var sections = util.getArg(sourceMap, 'sections');
  31464. if (version != this._version) {
  31465. throw new Error('Unsupported version: ' + version);
  31466. }
  31467. this._sources = new ArraySet();
  31468. this._names = new ArraySet();
  31469. var lastOffset = {
  31470. line: -1,
  31471. column: 0
  31472. };
  31473. this._sections = sections.map(function (s) {
  31474. if (s.url) {
  31475. // The url field will require support for asynchronicity.
  31476. // See https://github.com/mozilla/source-map/issues/16
  31477. throw new Error('Support for url field in sections not implemented.');
  31478. }
  31479. var offset = util.getArg(s, 'offset');
  31480. var offsetLine = util.getArg(offset, 'line');
  31481. var offsetColumn = util.getArg(offset, 'column');
  31482. if (offsetLine < lastOffset.line ||
  31483. (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
  31484. throw new Error('Section offsets must be ordered and non-overlapping.');
  31485. }
  31486. lastOffset = offset;
  31487. return {
  31488. generatedOffset: {
  31489. // The offset fields are 0-based, but we use 1-based indices when
  31490. // encoding/decoding from VLQ.
  31491. generatedLine: offsetLine + 1,
  31492. generatedColumn: offsetColumn + 1
  31493. },
  31494. consumer: new SourceMapConsumer(util.getArg(s, 'map'))
  31495. }
  31496. });
  31497. }
  31498. IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  31499. IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  31500. /**
  31501. * The version of the source mapping spec that we are consuming.
  31502. */
  31503. IndexedSourceMapConsumer.prototype._version = 3;
  31504. /**
  31505. * The list of original sources.
  31506. */
  31507. Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
  31508. get: function () {
  31509. var sources = [];
  31510. for (var i = 0; i < this._sections.length; i++) {
  31511. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  31512. sources.push(this._sections[i].consumer.sources[j]);
  31513. }
  31514. }
  31515. return sources;
  31516. }
  31517. });
  31518. /**
  31519. * Returns the original source, line, and column information for the generated
  31520. * source's line and column positions provided. The only argument is an object
  31521. * with the following properties:
  31522. *
  31523. * - line: The line number in the generated source.
  31524. * - column: The column number in the generated source.
  31525. *
  31526. * and an object is returned with the following properties:
  31527. *
  31528. * - source: The original source file, or null.
  31529. * - line: The line number in the original source, or null.
  31530. * - column: The column number in the original source, or null.
  31531. * - name: The original identifier, or null.
  31532. */
  31533. IndexedSourceMapConsumer.prototype.originalPositionFor =
  31534. function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  31535. var needle = {
  31536. generatedLine: util.getArg(aArgs, 'line'),
  31537. generatedColumn: util.getArg(aArgs, 'column')
  31538. };
  31539. // Find the section containing the generated position we're trying to map
  31540. // to an original position.
  31541. var sectionIndex = binarySearch.search(needle, this._sections,
  31542. function(needle, section) {
  31543. var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
  31544. if (cmp) {
  31545. return cmp;
  31546. }
  31547. return (needle.generatedColumn -
  31548. section.generatedOffset.generatedColumn);
  31549. });
  31550. var section = this._sections[sectionIndex];
  31551. if (!section) {
  31552. return {
  31553. source: null,
  31554. line: null,
  31555. column: null,
  31556. name: null
  31557. };
  31558. }
  31559. return section.consumer.originalPositionFor({
  31560. line: needle.generatedLine -
  31561. (section.generatedOffset.generatedLine - 1),
  31562. column: needle.generatedColumn -
  31563. (section.generatedOffset.generatedLine === needle.generatedLine
  31564. ? section.generatedOffset.generatedColumn - 1
  31565. : 0),
  31566. bias: aArgs.bias
  31567. });
  31568. };
  31569. /**
  31570. * Return true if we have the source content for every source in the source
  31571. * map, false otherwise.
  31572. */
  31573. IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
  31574. function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  31575. return this._sections.every(function (s) {
  31576. return s.consumer.hasContentsOfAllSources();
  31577. });
  31578. };
  31579. /**
  31580. * Returns the original source content. The only argument is the url of the
  31581. * original source file. Returns null if no original source content is
  31582. * available.
  31583. */
  31584. IndexedSourceMapConsumer.prototype.sourceContentFor =
  31585. function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  31586. for (var i = 0; i < this._sections.length; i++) {
  31587. var section = this._sections[i];
  31588. var content = section.consumer.sourceContentFor(aSource, true);
  31589. if (content) {
  31590. return content;
  31591. }
  31592. }
  31593. if (nullOnMissing) {
  31594. return null;
  31595. }
  31596. else {
  31597. throw new Error('"' + aSource + '" is not in the SourceMap.');
  31598. }
  31599. };
  31600. /**
  31601. * Returns the generated line and column information for the original source,
  31602. * line, and column positions provided. The only argument is an object with
  31603. * the following properties:
  31604. *
  31605. * - source: The filename of the original source.
  31606. * - line: The line number in the original source.
  31607. * - column: The column number in the original source.
  31608. *
  31609. * and an object is returned with the following properties:
  31610. *
  31611. * - line: The line number in the generated source, or null.
  31612. * - column: The column number in the generated source, or null.
  31613. */
  31614. IndexedSourceMapConsumer.prototype.generatedPositionFor =
  31615. function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  31616. for (var i = 0; i < this._sections.length; i++) {
  31617. var section = this._sections[i];
  31618. // Only consider this section if the requested source is in the list of
  31619. // sources of the consumer.
  31620. if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
  31621. continue;
  31622. }
  31623. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  31624. if (generatedPosition) {
  31625. var ret = {
  31626. line: generatedPosition.line +
  31627. (section.generatedOffset.generatedLine - 1),
  31628. column: generatedPosition.column +
  31629. (section.generatedOffset.generatedLine === generatedPosition.line
  31630. ? section.generatedOffset.generatedColumn - 1
  31631. : 0)
  31632. };
  31633. return ret;
  31634. }
  31635. }
  31636. return {
  31637. line: null,
  31638. column: null
  31639. };
  31640. };
  31641. /**
  31642. * Parse the mappings in a string in to a data structure which we can easily
  31643. * query (the ordered arrays in the `this.__generatedMappings` and
  31644. * `this.__originalMappings` properties).
  31645. */
  31646. IndexedSourceMapConsumer.prototype._parseMappings =
  31647. function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  31648. this.__generatedMappings = [];
  31649. this.__originalMappings = [];
  31650. for (var i = 0; i < this._sections.length; i++) {
  31651. var section = this._sections[i];
  31652. var sectionMappings = section.consumer._generatedMappings;
  31653. for (var j = 0; j < sectionMappings.length; j++) {
  31654. var mapping = sectionMappings[j];
  31655. var source = section.consumer._sources.at(mapping.source);
  31656. if (section.consumer.sourceRoot !== null) {
  31657. source = util.join(section.consumer.sourceRoot, source);
  31658. }
  31659. this._sources.add(source);
  31660. source = this._sources.indexOf(source);
  31661. var name = section.consumer._names.at(mapping.name);
  31662. this._names.add(name);
  31663. name = this._names.indexOf(name);
  31664. // The mappings coming from the consumer for the section have
  31665. // generated positions relative to the start of the section, so we
  31666. // need to offset them to be relative to the start of the concatenated
  31667. // generated file.
  31668. var adjustedMapping = {
  31669. source: source,
  31670. generatedLine: mapping.generatedLine +
  31671. (section.generatedOffset.generatedLine - 1),
  31672. generatedColumn: mapping.generatedColumn +
  31673. (section.generatedOffset.generatedLine === mapping.generatedLine
  31674. ? section.generatedOffset.generatedColumn - 1
  31675. : 0),
  31676. originalLine: mapping.originalLine,
  31677. originalColumn: mapping.originalColumn,
  31678. name: name
  31679. };
  31680. this.__generatedMappings.push(adjustedMapping);
  31681. if (typeof adjustedMapping.originalLine === 'number') {
  31682. this.__originalMappings.push(adjustedMapping);
  31683. }
  31684. }
  31685. }
  31686. quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
  31687. quickSort(this.__originalMappings, util.compareByOriginalPositions);
  31688. };
  31689. exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
  31690. /***/ }),
  31691. /* 25 */
  31692. /***/ (function(module, exports) {
  31693. /* -*- Mode: js; js-indent-level: 2; -*- */
  31694. /*
  31695. * Copyright 2011 Mozilla Foundation and contributors
  31696. * Licensed under the New BSD license. See LICENSE or:
  31697. * http://opensource.org/licenses/BSD-3-Clause
  31698. */
  31699. exports.GREATEST_LOWER_BOUND = 1;
  31700. exports.LEAST_UPPER_BOUND = 2;
  31701. /**
  31702. * Recursive implementation of binary search.
  31703. *
  31704. * @param aLow Indices here and lower do not contain the needle.
  31705. * @param aHigh Indices here and higher do not contain the needle.
  31706. * @param aNeedle The element being searched for.
  31707. * @param aHaystack The non-empty array being searched.
  31708. * @param aCompare Function which takes two elements and returns -1, 0, or 1.
  31709. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
  31710. * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
  31711. * closest element that is smaller than or greater than the one we are
  31712. * searching for, respectively, if the exact element cannot be found.
  31713. */
  31714. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  31715. // This function terminates when one of the following is true:
  31716. //
  31717. // 1. We find the exact element we are looking for.
  31718. //
  31719. // 2. We did not find the exact element, but we can return the index of
  31720. // the next-closest element.
  31721. //
  31722. // 3. We did not find the exact element, and there is no next-closest
  31723. // element than the one we are searching for, so we return -1.
  31724. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  31725. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  31726. if (cmp === 0) {
  31727. // Found the element we are looking for.
  31728. return mid;
  31729. }
  31730. else if (cmp > 0) {
  31731. // Our needle is greater than aHaystack[mid].
  31732. if (aHigh - mid > 1) {
  31733. // The element is in the upper half.
  31734. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  31735. }
  31736. // The exact needle element was not found in this haystack. Determine if
  31737. // we are in termination case (3) or (2) and return the appropriate thing.
  31738. if (aBias == exports.LEAST_UPPER_BOUND) {
  31739. return aHigh < aHaystack.length ? aHigh : -1;
  31740. } else {
  31741. return mid;
  31742. }
  31743. }
  31744. else {
  31745. // Our needle is less than aHaystack[mid].
  31746. if (mid - aLow > 1) {
  31747. // The element is in the lower half.
  31748. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  31749. }
  31750. // we are in termination case (3) or (2) and return the appropriate thing.
  31751. if (aBias == exports.LEAST_UPPER_BOUND) {
  31752. return mid;
  31753. } else {
  31754. return aLow < 0 ? -1 : aLow;
  31755. }
  31756. }
  31757. }
  31758. /**
  31759. * This is an implementation of binary search which will always try and return
  31760. * the index of the closest element if there is no exact hit. This is because
  31761. * mappings between original and generated line/col pairs are single points,
  31762. * and there is an implicit region between each of them, so a miss just means
  31763. * that you aren't on the very start of a region.
  31764. *
  31765. * @param aNeedle The element you are looking for.
  31766. * @param aHaystack The array that is being searched.
  31767. * @param aCompare A function which takes the needle and an element in the
  31768. * array and returns -1, 0, or 1 depending on whether the needle is less
  31769. * than, equal to, or greater than the element, respectively.
  31770. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
  31771. * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
  31772. * closest element that is smaller than or greater than the one we are
  31773. * searching for, respectively, if the exact element cannot be found.
  31774. * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
  31775. */
  31776. exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
  31777. if (aHaystack.length === 0) {
  31778. return -1;
  31779. }
  31780. var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
  31781. aCompare, aBias || exports.GREATEST_LOWER_BOUND);
  31782. if (index < 0) {
  31783. return -1;
  31784. }
  31785. // We have found either the exact element, or the next-closest element than
  31786. // the one we are searching for. However, there may be more than one such
  31787. // element. Make sure we always return the smallest of these.
  31788. while (index - 1 >= 0) {
  31789. if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
  31790. break;
  31791. }
  31792. --index;
  31793. }
  31794. return index;
  31795. };
  31796. /***/ }),
  31797. /* 26 */
  31798. /***/ (function(module, exports) {
  31799. /* -*- Mode: js; js-indent-level: 2; -*- */
  31800. /*
  31801. * Copyright 2011 Mozilla Foundation and contributors
  31802. * Licensed under the New BSD license. See LICENSE or:
  31803. * http://opensource.org/licenses/BSD-3-Clause
  31804. */
  31805. // It turns out that some (most?) JavaScript engines don't self-host
  31806. // `Array.prototype.sort`. This makes sense because C++ will likely remain
  31807. // faster than JS when doing raw CPU-intensive sorting. However, when using a
  31808. // custom comparator function, calling back and forth between the VM's C++ and
  31809. // JIT'd JS is rather slow *and* loses JIT type information, resulting in
  31810. // worse generated code for the comparator function than would be optimal. In
  31811. // fact, when sorting with a comparator, these costs outweigh the benefits of
  31812. // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
  31813. // a ~3500ms mean speed-up in `bench/bench.html`.
  31814. /**
  31815. * Swap the elements indexed by `x` and `y` in the array `ary`.
  31816. *
  31817. * @param {Array} ary
  31818. * The array.
  31819. * @param {Number} x
  31820. * The index of the first item.
  31821. * @param {Number} y
  31822. * The index of the second item.
  31823. */
  31824. function swap(ary, x, y) {
  31825. var temp = ary[x];
  31826. ary[x] = ary[y];
  31827. ary[y] = temp;
  31828. }
  31829. /**
  31830. * Returns a random integer within the range `low .. high` inclusive.
  31831. *
  31832. * @param {Number} low
  31833. * The lower bound on the range.
  31834. * @param {Number} high
  31835. * The upper bound on the range.
  31836. */
  31837. function randomIntInRange(low, high) {
  31838. return Math.round(low + (Math.random() * (high - low)));
  31839. }
  31840. /**
  31841. * The Quick Sort algorithm.
  31842. *
  31843. * @param {Array} ary
  31844. * An array to sort.
  31845. * @param {function} comparator
  31846. * Function to use to compare two items.
  31847. * @param {Number} p
  31848. * Start index of the array
  31849. * @param {Number} r
  31850. * End index of the array
  31851. */
  31852. function doQuickSort(ary, comparator, p, r) {
  31853. // If our lower bound is less than our upper bound, we (1) partition the
  31854. // array into two pieces and (2) recurse on each half. If it is not, this is
  31855. // the empty array and our base case.
  31856. if (p < r) {
  31857. // (1) Partitioning.
  31858. //
  31859. // The partitioning chooses a pivot between `p` and `r` and moves all
  31860. // elements that are less than or equal to the pivot to the before it, and
  31861. // all the elements that are greater than it after it. The effect is that
  31862. // once partition is done, the pivot is in the exact place it will be when
  31863. // the array is put in sorted order, and it will not need to be moved
  31864. // again. This runs in O(n) time.
  31865. // Always choose a random pivot so that an input array which is reverse
  31866. // sorted does not cause O(n^2) running time.
  31867. var pivotIndex = randomIntInRange(p, r);
  31868. var i = p - 1;
  31869. swap(ary, pivotIndex, r);
  31870. var pivot = ary[r];
  31871. // Immediately after `j` is incremented in this loop, the following hold
  31872. // true:
  31873. //
  31874. // * Every element in `ary[p .. i]` is less than or equal to the pivot.
  31875. //
  31876. // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
  31877. for (var j = p; j < r; j++) {
  31878. if (comparator(ary[j], pivot) <= 0) {
  31879. i += 1;
  31880. swap(ary, i, j);
  31881. }
  31882. }
  31883. swap(ary, i + 1, j);
  31884. var q = i + 1;
  31885. // (2) Recurse on each half.
  31886. doQuickSort(ary, comparator, p, q - 1);
  31887. doQuickSort(ary, comparator, q + 1, r);
  31888. }
  31889. }
  31890. /**
  31891. * Sort the given array in-place with the given comparator function.
  31892. *
  31893. * @param {Array} ary
  31894. * An array to sort.
  31895. * @param {function} comparator
  31896. * Function to use to compare two items.
  31897. */
  31898. exports.quickSort = function (ary, comparator) {
  31899. doQuickSort(ary, comparator, 0, ary.length - 1);
  31900. };
  31901. /***/ }),
  31902. /* 27 */
  31903. /***/ (function(module, exports, __webpack_require__) {
  31904. /* -*- Mode: js; js-indent-level: 2; -*- */
  31905. /*
  31906. * Copyright 2011 Mozilla Foundation and contributors
  31907. * Licensed under the New BSD license. See LICENSE or:
  31908. * http://opensource.org/licenses/BSD-3-Clause
  31909. */
  31910. var SourceMapGenerator = __webpack_require__(5).SourceMapGenerator;
  31911. var util = __webpack_require__(0);
  31912. // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
  31913. // operating systems these days (capturing the result).
  31914. var REGEX_NEWLINE = /(\r?\n)/;
  31915. // Newline character code for charCodeAt() comparisons
  31916. var NEWLINE_CODE = 10;
  31917. // Private symbol for identifying `SourceNode`s when multiple versions of
  31918. // the source-map library are loaded. This MUST NOT CHANGE across
  31919. // versions!
  31920. var isSourceNode = "$$$isSourceNode$$$";
  31921. /**
  31922. * SourceNodes provide a way to abstract over interpolating/concatenating
  31923. * snippets of generated JavaScript source code while maintaining the line and
  31924. * column information associated with the original source code.
  31925. *
  31926. * @param aLine The original line number.
  31927. * @param aColumn The original column number.
  31928. * @param aSource The original source's filename.
  31929. * @param aChunks Optional. An array of strings which are snippets of
  31930. * generated JS, or other SourceNodes.
  31931. * @param aName The original identifier.
  31932. */
  31933. function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
  31934. this.children = [];
  31935. this.sourceContents = {};
  31936. this.line = aLine == null ? null : aLine;
  31937. this.column = aColumn == null ? null : aColumn;
  31938. this.source = aSource == null ? null : aSource;
  31939. this.name = aName == null ? null : aName;
  31940. this[isSourceNode] = true;
  31941. if (aChunks != null) this.add(aChunks);
  31942. }
  31943. /**
  31944. * Creates a SourceNode from generated code and a SourceMapConsumer.
  31945. *
  31946. * @param aGeneratedCode The generated code
  31947. * @param aSourceMapConsumer The SourceMap for the generated code
  31948. * @param aRelativePath Optional. The path that relative sources in the
  31949. * SourceMapConsumer should be relative to.
  31950. */
  31951. SourceNode.fromStringWithSourceMap =
  31952. function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  31953. // The SourceNode we want to fill with the generated code
  31954. // and the SourceMap
  31955. var node = new SourceNode();
  31956. // All even indices of this array are one line of the generated code,
  31957. // while all odd indices are the newlines between two adjacent lines
  31958. // (since `REGEX_NEWLINE` captures its match).
  31959. // Processed fragments are removed from this array, by calling `shiftNextLine`.
  31960. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
  31961. var shiftNextLine = function() {
  31962. var lineContents = remainingLines.shift();
  31963. // The last line of a file might not have a newline.
  31964. var newLine = remainingLines.shift() || "";
  31965. return lineContents + newLine;
  31966. };
  31967. // We need to remember the position of "remainingLines"
  31968. var lastGeneratedLine = 1, lastGeneratedColumn = 0;
  31969. // The generate SourceNodes we need a code range.
  31970. // To extract it current and last mapping is used.
  31971. // Here we store the last mapping.
  31972. var lastMapping = null;
  31973. aSourceMapConsumer.eachMapping(function (mapping) {
  31974. if (lastMapping !== null) {
  31975. // We add the code from "lastMapping" to "mapping":
  31976. // First check if there is a new line in between.
  31977. if (lastGeneratedLine < mapping.generatedLine) {
  31978. // Associate first line with "lastMapping"
  31979. addMappingWithCode(lastMapping, shiftNextLine());
  31980. lastGeneratedLine++;
  31981. lastGeneratedColumn = 0;
  31982. // The remaining code is added without mapping
  31983. } else {
  31984. // There is no new line in between.
  31985. // Associate the code between "lastGeneratedColumn" and
  31986. // "mapping.generatedColumn" with "lastMapping"
  31987. var nextLine = remainingLines[0];
  31988. var code = nextLine.substr(0, mapping.generatedColumn -
  31989. lastGeneratedColumn);
  31990. remainingLines[0] = nextLine.substr(mapping.generatedColumn -
  31991. lastGeneratedColumn);
  31992. lastGeneratedColumn = mapping.generatedColumn;
  31993. addMappingWithCode(lastMapping, code);
  31994. // No more remaining code, continue
  31995. lastMapping = mapping;
  31996. return;
  31997. }
  31998. }
  31999. // We add the generated code until the first mapping
  32000. // to the SourceNode without any mapping.
  32001. // Each line is added as separate string.
  32002. while (lastGeneratedLine < mapping.generatedLine) {
  32003. node.add(shiftNextLine());
  32004. lastGeneratedLine++;
  32005. }
  32006. if (lastGeneratedColumn < mapping.generatedColumn) {
  32007. var nextLine = remainingLines[0];
  32008. node.add(nextLine.substr(0, mapping.generatedColumn));
  32009. remainingLines[0] = nextLine.substr(mapping.generatedColumn);
  32010. lastGeneratedColumn = mapping.generatedColumn;
  32011. }
  32012. lastMapping = mapping;
  32013. }, this);
  32014. // We have processed all mappings.
  32015. if (remainingLines.length > 0) {
  32016. if (lastMapping) {
  32017. // Associate the remaining code in the current line with "lastMapping"
  32018. addMappingWithCode(lastMapping, shiftNextLine());
  32019. }
  32020. // and add the remaining lines without any mapping
  32021. node.add(remainingLines.join(""));
  32022. }
  32023. // Copy sourcesContent into SourceNode
  32024. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  32025. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  32026. if (content != null) {
  32027. if (aRelativePath != null) {
  32028. sourceFile = util.join(aRelativePath, sourceFile);
  32029. }
  32030. node.setSourceContent(sourceFile, content);
  32031. }
  32032. });
  32033. return node;
  32034. function addMappingWithCode(mapping, code) {
  32035. if (mapping === null || mapping.source === undefined) {
  32036. node.add(code);
  32037. } else {
  32038. var source = aRelativePath
  32039. ? util.join(aRelativePath, mapping.source)
  32040. : mapping.source;
  32041. node.add(new SourceNode(mapping.originalLine,
  32042. mapping.originalColumn,
  32043. source,
  32044. code,
  32045. mapping.name));
  32046. }
  32047. }
  32048. };
  32049. /**
  32050. * Add a chunk of generated JS to this source node.
  32051. *
  32052. * @param aChunk A string snippet of generated JS code, another instance of
  32053. * SourceNode, or an array where each member is one of those things.
  32054. */
  32055. SourceNode.prototype.add = function SourceNode_add(aChunk) {
  32056. if (Array.isArray(aChunk)) {
  32057. aChunk.forEach(function (chunk) {
  32058. this.add(chunk);
  32059. }, this);
  32060. }
  32061. else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  32062. if (aChunk) {
  32063. this.children.push(aChunk);
  32064. }
  32065. }
  32066. else {
  32067. throw new TypeError(
  32068. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  32069. );
  32070. }
  32071. return this;
  32072. };
  32073. /**
  32074. * Add a chunk of generated JS to the beginning of this source node.
  32075. *
  32076. * @param aChunk A string snippet of generated JS code, another instance of
  32077. * SourceNode, or an array where each member is one of those things.
  32078. */
  32079. SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
  32080. if (Array.isArray(aChunk)) {
  32081. for (var i = aChunk.length-1; i >= 0; i--) {
  32082. this.prepend(aChunk[i]);
  32083. }
  32084. }
  32085. else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  32086. this.children.unshift(aChunk);
  32087. }
  32088. else {
  32089. throw new TypeError(
  32090. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  32091. );
  32092. }
  32093. return this;
  32094. };
  32095. /**
  32096. * Walk over the tree of JS snippets in this node and its children. The
  32097. * walking function is called once for each snippet of JS and is passed that
  32098. * snippet and the its original associated source's line/column location.
  32099. *
  32100. * @param aFn The traversal function.
  32101. */
  32102. SourceNode.prototype.walk = function SourceNode_walk(aFn) {
  32103. var chunk;
  32104. for (var i = 0, len = this.children.length; i < len; i++) {
  32105. chunk = this.children[i];
  32106. if (chunk[isSourceNode]) {
  32107. chunk.walk(aFn);
  32108. }
  32109. else {
  32110. if (chunk !== '') {
  32111. aFn(chunk, { source: this.source,
  32112. line: this.line,
  32113. column: this.column,
  32114. name: this.name });
  32115. }
  32116. }
  32117. }
  32118. };
  32119. /**
  32120. * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
  32121. * each of `this.children`.
  32122. *
  32123. * @param aSep The separator.
  32124. */
  32125. SourceNode.prototype.join = function SourceNode_join(aSep) {
  32126. var newChildren;
  32127. var i;
  32128. var len = this.children.length;
  32129. if (len > 0) {
  32130. newChildren = [];
  32131. for (i = 0; i < len-1; i++) {
  32132. newChildren.push(this.children[i]);
  32133. newChildren.push(aSep);
  32134. }
  32135. newChildren.push(this.children[i]);
  32136. this.children = newChildren;
  32137. }
  32138. return this;
  32139. };
  32140. /**
  32141. * Call String.prototype.replace on the very right-most source snippet. Useful
  32142. * for trimming whitespace from the end of a source node, etc.
  32143. *
  32144. * @param aPattern The pattern to replace.
  32145. * @param aReplacement The thing to replace the pattern with.
  32146. */
  32147. SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  32148. var lastChild = this.children[this.children.length - 1];
  32149. if (lastChild[isSourceNode]) {
  32150. lastChild.replaceRight(aPattern, aReplacement);
  32151. }
  32152. else if (typeof lastChild === 'string') {
  32153. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  32154. }
  32155. else {
  32156. this.children.push(''.replace(aPattern, aReplacement));
  32157. }
  32158. return this;
  32159. };
  32160. /**
  32161. * Set the source content for a source file. This will be added to the SourceMapGenerator
  32162. * in the sourcesContent field.
  32163. *
  32164. * @param aSourceFile The filename of the source file
  32165. * @param aSourceContent The content of the source file
  32166. */
  32167. SourceNode.prototype.setSourceContent =
  32168. function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  32169. this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
  32170. };
  32171. /**
  32172. * Walk over the tree of SourceNodes. The walking function is called for each
  32173. * source file content and is passed the filename and source content.
  32174. *
  32175. * @param aFn The traversal function.
  32176. */
  32177. SourceNode.prototype.walkSourceContents =
  32178. function SourceNode_walkSourceContents(aFn) {
  32179. for (var i = 0, len = this.children.length; i < len; i++) {
  32180. if (this.children[i][isSourceNode]) {
  32181. this.children[i].walkSourceContents(aFn);
  32182. }
  32183. }
  32184. var sources = Object.keys(this.sourceContents);
  32185. for (var i = 0, len = sources.length; i < len; i++) {
  32186. aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  32187. }
  32188. };
  32189. /**
  32190. * Return the string representation of this source node. Walks over the tree
  32191. * and concatenates all the various snippets together to one string.
  32192. */
  32193. SourceNode.prototype.toString = function SourceNode_toString() {
  32194. var str = "";
  32195. this.walk(function (chunk) {
  32196. str += chunk;
  32197. });
  32198. return str;
  32199. };
  32200. /**
  32201. * Returns the string representation of this source node along with a source
  32202. * map.
  32203. */
  32204. SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  32205. var generated = {
  32206. code: "",
  32207. line: 1,
  32208. column: 0
  32209. };
  32210. var map = new SourceMapGenerator(aArgs);
  32211. var sourceMappingActive = false;
  32212. var lastOriginalSource = null;
  32213. var lastOriginalLine = null;
  32214. var lastOriginalColumn = null;
  32215. var lastOriginalName = null;
  32216. this.walk(function (chunk, original) {
  32217. generated.code += chunk;
  32218. if (original.source !== null
  32219. && original.line !== null
  32220. && original.column !== null) {
  32221. if(lastOriginalSource !== original.source
  32222. || lastOriginalLine !== original.line
  32223. || lastOriginalColumn !== original.column
  32224. || lastOriginalName !== original.name) {
  32225. map.addMapping({
  32226. source: original.source,
  32227. original: {
  32228. line: original.line,
  32229. column: original.column
  32230. },
  32231. generated: {
  32232. line: generated.line,
  32233. column: generated.column
  32234. },
  32235. name: original.name
  32236. });
  32237. }
  32238. lastOriginalSource = original.source;
  32239. lastOriginalLine = original.line;
  32240. lastOriginalColumn = original.column;
  32241. lastOriginalName = original.name;
  32242. sourceMappingActive = true;
  32243. } else if (sourceMappingActive) {
  32244. map.addMapping({
  32245. generated: {
  32246. line: generated.line,
  32247. column: generated.column
  32248. }
  32249. });
  32250. lastOriginalSource = null;
  32251. sourceMappingActive = false;
  32252. }
  32253. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  32254. if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
  32255. generated.line++;
  32256. generated.column = 0;
  32257. // Mappings end at eol
  32258. if (idx + 1 === length) {
  32259. lastOriginalSource = null;
  32260. sourceMappingActive = false;
  32261. } else if (sourceMappingActive) {
  32262. map.addMapping({
  32263. source: original.source,
  32264. original: {
  32265. line: original.line,
  32266. column: original.column
  32267. },
  32268. generated: {
  32269. line: generated.line,
  32270. column: generated.column
  32271. },
  32272. name: original.name
  32273. });
  32274. }
  32275. } else {
  32276. generated.column++;
  32277. }
  32278. }
  32279. });
  32280. this.walkSourceContents(function (sourceFile, sourceContent) {
  32281. map.setSourceContent(sourceFile, sourceContent);
  32282. });
  32283. return { code: generated.code, map: map };
  32284. };
  32285. exports.SourceNode = SourceNode;
  32286. /***/ }),
  32287. /* 28 */
  32288. /***/ (function(module, exports, __webpack_require__) {
  32289. "use strict";
  32290. Object.defineProperty(exports, "__esModule", {
  32291. value: true
  32292. });
  32293. function settle(val) {
  32294. if (!Array.isArray(val)) val = [val];
  32295. return Promise.all(val.map(function (p) {
  32296. return p.then(function (value) {
  32297. return {
  32298. isFulfilled: true,
  32299. isRejected: false,
  32300. value: value
  32301. };
  32302. }).catch(function (reason) {
  32303. return {
  32304. isFulfilled: false,
  32305. isRejected: true,
  32306. reason: reason
  32307. };
  32308. });
  32309. }));
  32310. }
  32311. exports.settle = settle;
  32312. exports.default = settle;
  32313. /***/ }),
  32314. /* 29 */
  32315. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  32316. "use strict";
  32317. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unmap; });
  32318. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(2);
  32319. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
  32320. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stack_frame__ = __webpack_require__(1);
  32321. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getSourceMap__ = __webpack_require__(4);
  32322. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getLinesAround__ = __webpack_require__(8);
  32323. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_path__ = __webpack_require__(30);
  32324. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_path___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_path__);
  32325. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  32326. /**
  32327. * Turns a set of mapped <code>StackFrame</code>s back into their generated code position and enhances them with code.
  32328. * @param {string} fileUri The URI of the <code>bundle.js</code> file.
  32329. * @param {StackFrame[]} frames A set of <code>StackFrame</code>s which are already mapped and missing their generated positions.
  32330. * @param {number} [fileContents=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
  32331. */
  32332. var unmap = function () {
  32333. var _ref = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(_fileUri, frames) {
  32334. var contextLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
  32335. var fileContents, fileUri, map;
  32336. return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
  32337. while (1) {
  32338. switch (_context.prev = _context.next) {
  32339. case 0:
  32340. fileContents = (typeof _fileUri === 'undefined' ? 'undefined' : _typeof(_fileUri)) === 'object' ? _fileUri.contents : null;
  32341. fileUri = (typeof _fileUri === 'undefined' ? 'undefined' : _typeof(_fileUri)) === 'object' ? _fileUri.uri : _fileUri;
  32342. if (!(fileContents == null)) {
  32343. _context.next = 6;
  32344. break;
  32345. }
  32346. _context.next = 5;
  32347. return fetch(fileUri).then(function (res) {
  32348. return res.text();
  32349. });
  32350. case 5:
  32351. fileContents = _context.sent;
  32352. case 6:
  32353. _context.next = 8;
  32354. return Object(__WEBPACK_IMPORTED_MODULE_2__getSourceMap__["a" /* getSourceMap */])(fileUri, fileContents);
  32355. case 8:
  32356. map = _context.sent;
  32357. return _context.abrupt('return', frames.map(function (frame) {
  32358. var functionName = frame.functionName,
  32359. lineNumber = frame.lineNumber,
  32360. columnNumber = frame.columnNumber,
  32361. _originalLineNumber = frame._originalLineNumber;
  32362. if (_originalLineNumber != null) {
  32363. return frame;
  32364. }
  32365. var fileName = frame.fileName;
  32366. if (fileName) {
  32367. // The web version of this module only provides POSIX support, so Windows
  32368. // paths like C:\foo\\baz\..\\bar\ cannot be normalized.
  32369. // A simple solution to this is to replace all `\` with `/`, then
  32370. // normalize afterwards.
  32371. fileName = __WEBPACK_IMPORTED_MODULE_4_path___default.a.normalize(fileName.replace(/[\\]+/g, '/'));
  32372. }
  32373. if (fileName == null) {
  32374. return frame;
  32375. }
  32376. var fN = fileName;
  32377. var source = map.getSources()
  32378. // Prepare path for normalization; see comment above for reasoning.
  32379. .map(function (s) {
  32380. return s.replace(/[\\]+/g, '/');
  32381. }).filter(function (p) {
  32382. p = __WEBPACK_IMPORTED_MODULE_4_path___default.a.normalize(p);
  32383. var i = p.lastIndexOf(fN);
  32384. return i !== -1 && i === p.length - fN.length;
  32385. }).map(function (p) {
  32386. return {
  32387. token: p,
  32388. seps: count(__WEBPACK_IMPORTED_MODULE_4_path___default.a.sep, __WEBPACK_IMPORTED_MODULE_4_path___default.a.normalize(p)),
  32389. penalties: count('node_modules', p) + count('~', p)
  32390. };
  32391. }).sort(function (a, b) {
  32392. var s = Math.sign(a.seps - b.seps);
  32393. if (s !== 0) {
  32394. return s;
  32395. }
  32396. return Math.sign(a.penalties - b.penalties);
  32397. });
  32398. if (source.length < 1 || lineNumber == null) {
  32399. return new __WEBPACK_IMPORTED_MODULE_1__stack_frame__["b" /* default */](null, null, null, null, null, functionName, fN, lineNumber, columnNumber, null);
  32400. }
  32401. var sourceT = source[0].token;
  32402. var _map$getGeneratedPosi = map.getGeneratedPosition(sourceT, lineNumber,
  32403. // $FlowFixMe
  32404. columnNumber),
  32405. line = _map$getGeneratedPosi.line,
  32406. column = _map$getGeneratedPosi.column;
  32407. var originalSource = map.getSource(sourceT);
  32408. return new __WEBPACK_IMPORTED_MODULE_1__stack_frame__["b" /* default */](functionName, fileUri, line, column || null, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(line, contextLines, fileContents || []), functionName, fN, lineNumber, columnNumber, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(lineNumber, contextLines, originalSource));
  32409. }));
  32410. case 10:
  32411. case 'end':
  32412. return _context.stop();
  32413. }
  32414. }
  32415. }, _callee, this);
  32416. }));
  32417. return function unmap(_x2, _x3) {
  32418. return _ref.apply(this, arguments);
  32419. };
  32420. }();
  32421. function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
  32422. /**
  32423. * Copyright (c) 2015-present, Facebook, Inc.
  32424. *
  32425. * This source code is licensed under the MIT license found in the
  32426. * LICENSE file in the root directory of this source tree.
  32427. */
  32428. function count(search, string) {
  32429. // Count starts at -1 becuse a do-while loop always runs at least once
  32430. var count = -1,
  32431. index = -1;
  32432. do {
  32433. // First call or the while case evaluated true, meaning we have to make
  32434. // count 0 or we found a character
  32435. ++count;
  32436. // Find the index of our search string, starting after the previous index
  32437. index = string.indexOf(search, index + 1);
  32438. } while (index !== -1);
  32439. return count;
  32440. }
  32441. /* unused harmony default export */ var _unused_webpack_default_export = (unmap);
  32442. /***/ }),
  32443. /* 30 */
  32444. /***/ (function(module, exports, __webpack_require__) {
  32445. /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
  32446. //
  32447. // Permission is hereby granted, free of charge, to any person obtaining a
  32448. // copy of this software and associated documentation files (the
  32449. // "Software"), to deal in the Software without restriction, including
  32450. // without limitation the rights to use, copy, modify, merge, publish,
  32451. // distribute, sublicense, and/or sell copies of the Software, and to permit
  32452. // persons to whom the Software is furnished to do so, subject to the
  32453. // following conditions:
  32454. //
  32455. // The above copyright notice and this permission notice shall be included
  32456. // in all copies or substantial portions of the Software.
  32457. //
  32458. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  32459. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  32460. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  32461. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  32462. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  32463. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  32464. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  32465. // resolves . and .. elements in a path array with directory names there
  32466. // must be no slashes, empty elements, or device names (c:\) in the array
  32467. // (so also no leading and trailing slashes - it does not distinguish
  32468. // relative and absolute paths)
  32469. function normalizeArray(parts, allowAboveRoot) {
  32470. // if the path tries to go above the root, `up` ends up > 0
  32471. var up = 0;
  32472. for (var i = parts.length - 1; i >= 0; i--) {
  32473. var last = parts[i];
  32474. if (last === '.') {
  32475. parts.splice(i, 1);
  32476. } else if (last === '..') {
  32477. parts.splice(i, 1);
  32478. up++;
  32479. } else if (up) {
  32480. parts.splice(i, 1);
  32481. up--;
  32482. }
  32483. }
  32484. // if the path is allowed to go above the root, restore leading ..s
  32485. if (allowAboveRoot) {
  32486. for (; up--; up) {
  32487. parts.unshift('..');
  32488. }
  32489. }
  32490. return parts;
  32491. }
  32492. // Split a filename into [root, dir, basename, ext], unix version
  32493. // 'root' is just a slash, or nothing.
  32494. var splitPathRe =
  32495. /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
  32496. var splitPath = function(filename) {
  32497. return splitPathRe.exec(filename).slice(1);
  32498. };
  32499. // path.resolve([from ...], to)
  32500. // posix version
  32501. exports.resolve = function() {
  32502. var resolvedPath = '',
  32503. resolvedAbsolute = false;
  32504. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  32505. var path = (i >= 0) ? arguments[i] : process.cwd();
  32506. // Skip empty and invalid entries
  32507. if (typeof path !== 'string') {
  32508. throw new TypeError('Arguments to path.resolve must be strings');
  32509. } else if (!path) {
  32510. continue;
  32511. }
  32512. resolvedPath = path + '/' + resolvedPath;
  32513. resolvedAbsolute = path.charAt(0) === '/';
  32514. }
  32515. // At this point the path should be resolved to a full absolute path, but
  32516. // handle relative paths to be safe (might happen when process.cwd() fails)
  32517. // Normalize the path
  32518. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  32519. return !!p;
  32520. }), !resolvedAbsolute).join('/');
  32521. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  32522. };
  32523. // path.normalize(path)
  32524. // posix version
  32525. exports.normalize = function(path) {
  32526. var isAbsolute = exports.isAbsolute(path),
  32527. trailingSlash = substr(path, -1) === '/';
  32528. // Normalize the path
  32529. path = normalizeArray(filter(path.split('/'), function(p) {
  32530. return !!p;
  32531. }), !isAbsolute).join('/');
  32532. if (!path && !isAbsolute) {
  32533. path = '.';
  32534. }
  32535. if (path && trailingSlash) {
  32536. path += '/';
  32537. }
  32538. return (isAbsolute ? '/' : '') + path;
  32539. };
  32540. // posix version
  32541. exports.isAbsolute = function(path) {
  32542. return path.charAt(0) === '/';
  32543. };
  32544. // posix version
  32545. exports.join = function() {
  32546. var paths = Array.prototype.slice.call(arguments, 0);
  32547. return exports.normalize(filter(paths, function(p, index) {
  32548. if (typeof p !== 'string') {
  32549. throw new TypeError('Arguments to path.join must be strings');
  32550. }
  32551. return p;
  32552. }).join('/'));
  32553. };
  32554. // path.relative(from, to)
  32555. // posix version
  32556. exports.relative = function(from, to) {
  32557. from = exports.resolve(from).substr(1);
  32558. to = exports.resolve(to).substr(1);
  32559. function trim(arr) {
  32560. var start = 0;
  32561. for (; start < arr.length; start++) {
  32562. if (arr[start] !== '') break;
  32563. }
  32564. var end = arr.length - 1;
  32565. for (; end >= 0; end--) {
  32566. if (arr[end] !== '') break;
  32567. }
  32568. if (start > end) return [];
  32569. return arr.slice(start, end - start + 1);
  32570. }
  32571. var fromParts = trim(from.split('/'));
  32572. var toParts = trim(to.split('/'));
  32573. var length = Math.min(fromParts.length, toParts.length);
  32574. var samePartsLength = length;
  32575. for (var i = 0; i < length; i++) {
  32576. if (fromParts[i] !== toParts[i]) {
  32577. samePartsLength = i;
  32578. break;
  32579. }
  32580. }
  32581. var outputParts = [];
  32582. for (var i = samePartsLength; i < fromParts.length; i++) {
  32583. outputParts.push('..');
  32584. }
  32585. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  32586. return outputParts.join('/');
  32587. };
  32588. exports.sep = '/';
  32589. exports.delimiter = ':';
  32590. exports.dirname = function(path) {
  32591. var result = splitPath(path),
  32592. root = result[0],
  32593. dir = result[1];
  32594. if (!root && !dir) {
  32595. // No dirname whatsoever
  32596. return '.';
  32597. }
  32598. if (dir) {
  32599. // It has a dirname, strip trailing slash
  32600. dir = dir.substr(0, dir.length - 1);
  32601. }
  32602. return root + dir;
  32603. };
  32604. exports.basename = function(path, ext) {
  32605. var f = splitPath(path)[2];
  32606. // TODO: make this comparison case-insensitive on windows?
  32607. if (ext && f.substr(-1 * ext.length) === ext) {
  32608. f = f.substr(0, f.length - ext.length);
  32609. }
  32610. return f;
  32611. };
  32612. exports.extname = function(path) {
  32613. return splitPath(path)[3];
  32614. };
  32615. function filter (xs, f) {
  32616. if (xs.filter) return xs.filter(f);
  32617. var res = [];
  32618. for (var i = 0; i < xs.length; i++) {
  32619. if (f(xs[i], i, xs)) res.push(xs[i]);
  32620. }
  32621. return res;
  32622. }
  32623. // String.prototype.substr - negative index don't work in IE8
  32624. var substr = 'ab'.substr(-1) === 'b'
  32625. ? function (str, start, len) { return str.substr(start, len) }
  32626. : function (str, start, len) {
  32627. if (start < 0) start = str.length + start;
  32628. return str.substr(start, len);
  32629. }
  32630. ;
  32631. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
  32632. /***/ }),
  32633. /* 31 */
  32634. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  32635. "use strict";
  32636. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return iframeStyle; });
  32637. /* unused harmony export overlayStyle */
  32638. /* unused harmony export primaryErrorStyle */
  32639. /* unused harmony export secondaryErrorStyle */
  32640. /* unused harmony export black */
  32641. /* unused harmony export darkGray */
  32642. /* unused harmony export red */
  32643. /* unused harmony export redTransparent */
  32644. /* unused harmony export yellowTransparent */
  32645. /**
  32646. * Copyright (c) 2015-present, Facebook, Inc.
  32647. *
  32648. * This source code is licensed under the MIT license found in the
  32649. * LICENSE file in the root directory of this source tree.
  32650. */
  32651. var black = '#293238',
  32652. darkGray = '#878e91',
  32653. red = '#ce1126',
  32654. redTransparent = 'rgba(206, 17, 38, 0.05)',
  32655. lightRed = '#fccfcf',
  32656. yellow = '#fbf5b4',
  32657. yellowTransparent = 'rgba(251, 245, 180, 0.3)',
  32658. white = '#ffffff';
  32659. var iframeStyle = {
  32660. position: 'fixed',
  32661. top: '0',
  32662. left: '0',
  32663. width: '100%',
  32664. height: '100%',
  32665. border: 'none',
  32666. 'z-index': 2147483647
  32667. };
  32668. var overlayStyle = {
  32669. width: '100%',
  32670. height: '100%',
  32671. 'box-sizing': 'border-box',
  32672. 'text-align': 'center',
  32673. 'background-color': white
  32674. };
  32675. var primaryErrorStyle = {
  32676. 'background-color': lightRed
  32677. };
  32678. var secondaryErrorStyle = {
  32679. 'background-color': yellow
  32680. };
  32681. /***/ }),
  32682. /* 32 */
  32683. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  32684. "use strict";
  32685. /* unused harmony export getHead */
  32686. /* unused harmony export injectCss */
  32687. /* unused harmony export removeCss */
  32688. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyStyles; });
  32689. /**
  32690. * Copyright (c) 2015-present, Facebook, Inc.
  32691. *
  32692. * This source code is licensed under the MIT license found in the
  32693. * LICENSE file in the root directory of this source tree.
  32694. */
  32695. var injectedCount = 0;
  32696. var injectedCache = {};
  32697. function getHead(document) {
  32698. return document.head || document.getElementsByTagName('head')[0];
  32699. }
  32700. function injectCss(document, css) {
  32701. var head = getHead(document);
  32702. var style = document.createElement('style');
  32703. style.type = 'text/css';
  32704. style.appendChild(document.createTextNode(css));
  32705. head.appendChild(style);
  32706. injectedCache[++injectedCount] = style;
  32707. return injectedCount;
  32708. }
  32709. function removeCss(document, ref) {
  32710. if (injectedCache[ref] == null) {
  32711. return;
  32712. }
  32713. var head = getHead(document);
  32714. head.removeChild(injectedCache[ref]);
  32715. delete injectedCache[ref];
  32716. }
  32717. function applyStyles(element, styles) {
  32718. element.setAttribute('style', '');
  32719. for (var key in styles) {
  32720. if (!styles.hasOwnProperty(key)) {
  32721. continue;
  32722. }
  32723. // $FlowFixMe
  32724. element.style[key] = styles[key];
  32725. }
  32726. }
  32727. /***/ }),
  32728. /* 33 */
  32729. /***/ (function(module, exports) {
  32730. module.exports = "!function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=18)}([function(e,t,n){\"use strict\";e.exports=n(24)},function(e,t,n){\"use strict\";n.d(t,\"c\",function(){return l}),n.d(t,\"d\",function(){return s}),n.d(t,\"g\",function(){return c}),n.d(t,\"a\",function(){return r}),n.d(t,\"b\",function(){return u}),n.d(t,\"e\",function(){return o}),n.d(t,\"f\",function(){return a}),n.d(t,\"h\",function(){return i});var r=\"#293238\",u=\"#878e91\",o=\"#ce1126\",a=\"rgba(206, 17, 38, 0.05)\",i=\"rgba(251, 245, 180, 0.3)\",l={width:\"100%\",height:\"100%\",\"box-sizing\":\"border-box\",\"text-align\":\"center\",\"background-color\":\"#ffffff\"},s={\"background-color\":\"#fccfcf\"},c={\"background-color\":\"#fbf5b4\"}},function(e,t,n){\"use strict\";function r(e){if(null===e||void 0===e)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e)}var u=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",\"5\"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t[\"_\"+String.fromCharCode(n)]=n;if(\"0123456789\"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(\"\"))return!1;var r={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(e){r[e]=e}),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},r)).join(\"\")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,l=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)o.call(n,c)&&(l[c]=n[c]);if(u){i=u(n);for(var p=0;p<i.length;p++)a.call(n,i[p])&&(l[i[p]]=n[i[p]])}}return l}},function(e,t,n){\"use strict\";function r(e){return function(){return e}}var u=function(){};u.thatReturns=r,u.thatReturnsFalse=r(!1),u.thatReturnsTrue=r(!0),u.thatReturnsNull=r(null),u.thatReturnsThis=function(){return this},u.thatReturnsArgument=function(e){return e},e.exports=u},function(e,t,n){\"use strict\";function r(){}function u(e){try{return e.then}catch(e){return m=e,C}}function o(e,t){try{return e(t)}catch(e){return m=e,C}}function a(e,t,n){try{e(t,n)}catch(e){return m=e,C}}function i(e){if(\"object\"!==typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!==typeof e)throw new TypeError(\"Promise constructor's argument is not a function\");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&h(e,this)}function l(e,t,n){return new e.constructor(function(u,o){var a=new i(r);a.then(u,o),s(e,new D(t,n,a))})}function s(e,t){for(;3===e._83;)e=e._18;if(i._47&&i._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);c(e,t)}function c(e,t){g(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?p(t.promise,e._18):f(t.promise,e._18));var r=o(n,e._18);r===C?f(t.promise,m):p(t.promise,r)})}function p(e,t){if(t===e)return f(e,new TypeError(\"A promise cannot be resolved with itself.\"));if(t&&(\"object\"===typeof t||\"function\"===typeof t)){var n=u(t);if(n===C)return f(e,m);if(n===e.then&&t instanceof i)return e._83=3,e._18=t,void d(e);if(\"function\"===typeof n)return void h(n.bind(t),e)}e._83=1,e._18=t,d(e)}function f(e,t){e._83=2,e._18=t,i._71&&i._71(e,t),d(e)}function d(e){if(1===e._75&&(s(e,e._38),e._38=null),2===e._75){for(var t=0;t<e._38.length;t++)s(e,e._38[t]);e._38=null}}function D(e,t,n){this.onFulfilled=\"function\"===typeof e?e:null,this.onRejected=\"function\"===typeof t?t:null,this.promise=n}function h(e,t){var n=!1,r=a(e,function(e){n||(n=!0,p(t,e))},function(e){n||(n=!0,f(t,e))});n||r!==C||(n=!0,f(t,m))}var g=n(21),m=null,C={};e.exports=i,i._47=null,i._71=null,i._44=r,i.prototype.then=function(e,t){if(this.constructor!==i)return l(this,e,t);var n=new i(r);return s(this,new D(e,t,n)),n}},function(e,t,n){\"use strict\";var r={};e.exports=r},function(e,t,n){\"use strict\";function r(e,t,n,r,o,a,i,l){if(u(t),!e){var s;if(void 0===t)s=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var c=[n,r,o,a,i,l],p=0;s=new Error(t.replace(/%s/g,function(){return c[p++]})),s.name=\"Invariant Violation\"}throw s.framesToPop=1,s}}var u=function(e){};e.exports=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(1),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c={position:\"relative\",display:\"inline-flex\",flexDirection:\"column\",height:\"100%\",width:\"1024px\",maxWidth:\"100%\",overflowX:\"hidden\",overflowY:\"auto\",padding:\"0.5rem\",boxSizing:\"border-box\",textAlign:\"left\",fontFamily:\"Consolas, Menlo, monospace\",fontSize:\"11px\",whiteSpace:\"pre-wrap\",wordBreak:\"break-word\",lineHeight:1.5,color:l.a},p=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.iframeWindow=null,o.getIframeWindow=function(e){if(e){var t=e.ownerDocument;o.iframeWindow=t.defaultView}},o.onKeyDown=function(e){var t=o.props.shortcutHandler;t&&t(e.key)},a=n,u(o,a)}return o(t,e),s(t,[{key:\"componentDidMount\",value:function(){window.addEventListener(\"keydown\",this.onKeyDown),this.iframeWindow&&this.iframeWindow.addEventListener(\"keydown\",this.onKeyDown)}},{key:\"componentWillUnmount\",value:function(){window.removeEventListener(\"keydown\",this.onKeyDown),this.iframeWindow&&this.iframeWindow.removeEventListener(\"keydown\",this.onKeyDown)}},{key:\"render\",value:function(){return i.a.createElement(\"div\",{style:c,ref:this.getIframeWindow},this.props.children)}}]),t}(a.Component);t.a=p},function(e,t,n){\"use strict\";function r(e){return o.a.createElement(\"div\",{style:i},e.line1,o.a.createElement(\"br\",null),e.line2)}var u=n(0),o=n.n(u),a=n(1),i={fontFamily:\"sans-serif\",color:a.b,marginTop:\"0.5rem\",flex:\"0 0 auto\"};t.a=r},function(e,t,n){\"use strict\";function r(e){return o.a.createElement(\"div\",{style:i},e.headerText)}var u=n(0),o=n.n(u),a=n(1),i={fontSize:\"2em\",fontFamily:\"sans-serif\",color:a.e,whiteSpace:\"pre-wrap\",margin:\"0 2rem 0.75rem 0\",flex:\"0 0 auto\",maxHeight:\"50%\",overflow:\"auto\"};t.a=r},function(e,t,n){\"use strict\";function r(e){var t=e.main?l:s,n={__html:e.codeHTML};return o.a.createElement(\"pre\",{style:t},o.a.createElement(\"code\",{style:c,dangerouslySetInnerHTML:n}))}var u=n(0),o=n.n(u),a=n(1),i={display:\"block\",padding:\"0.5em\",marginTop:\"0.5em\",marginBottom:\"0.5em\",overflowX:\"auto\",whiteSpace:\"pre-wrap\",borderRadius:\"0.25rem\"},l=Object.assign({},i,{backgroundColor:a.f}),s=Object.assign({},i,{backgroundColor:a.h}),c={fontFamily:\"Consolas, Menlo, monospace\"};t.a=r},function(e,t,n){\"use strict\";function r(e){for(var t=(new o.a).ansiToJson(i.encode(e),{use_classes:!0}),n=\"\",r=!1,u=0;u<t.length;++u)for(var a=t[u],c=a.content,p=a.fg,f=c.split(\"\\n\"),d=0;d<f.length;++d){r||(n+='<span data-ansi-line=\"true\">',r=!0);var D=f[d].replace(\"\\r\",\"\"),h=l[s[p]];null!=h?n+='<span style=\"color: #'+h+';\">'+D+\"</span>\":(null!=p&&console.log(\"Missing color mapping: \",p),n+=\"<span>\"+D+\"</span>\"),d<f.length-1&&(n+=\"</span>\",r=!1,n+=\"<br/>\")}return r&&(n+=\"</span>\",r=!1),n}var u=n(12),o=n.n(u),a=n(36),i=(n.n(a),new a.AllHtmlEntities),l={reset:[\"333333\",\"transparent\"],black:\"333333\",red:\"881280\",green:\"1155cc\",yellow:\"881280\",blue:\"994500\",magenta:\"994500\",cyan:\"c80000\",gray:\"6e6e6e\",lightgrey:\"f5f5f5\",darkgrey:\"6e6e6e\"},s={\"ansi-bright-black\":\"black\",\"ansi-bright-yellow\":\"yellow\",\"ansi-yellow\":\"yellow\",\"ansi-bright-green\":\"green\",\"ansi-green\":\"green\",\"ansi-bright-cyan\":\"cyan\",\"ansi-cyan\":\"cyan\",\"ansi-bright-red\":\"red\",\"ansi-red\":\"red\",\"ansi-bright-magenta\":\"magenta\",\"ansi-magenta\":\"magenta\",\"ansi-white\":\"darkgrey\"};t.a=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=[[{color:\"0, 0, 0\",class:\"ansi-black\"},{color:\"187, 0, 0\",class:\"ansi-red\"},{color:\"0, 187, 0\",class:\"ansi-green\"},{color:\"187, 187, 0\",class:\"ansi-yellow\"},{color:\"0, 0, 187\",class:\"ansi-blue\"},{color:\"187, 0, 187\",class:\"ansi-magenta\"},{color:\"0, 187, 187\",class:\"ansi-cyan\"},{color:\"255,255,255\",class:\"ansi-white\"}],[{color:\"85, 85, 85\",class:\"ansi-bright-black\"},{color:\"255, 85, 85\",class:\"ansi-bright-red\"},{color:\"0, 255, 0\",class:\"ansi-bright-green\"},{color:\"255, 255, 85\",class:\"ansi-bright-yellow\"},{color:\"85, 85, 255\",class:\"ansi-bright-blue\"},{color:\"255, 85, 255\",class:\"ansi-bright-magenta\"},{color:\"85, 255, 255\",class:\"ansi-bright-cyan\"},{color:\"255, 255, 255\",class:\"ansi-bright-white\"}]],a=function(){function e(){r(this,e),this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0}return u(e,null,[{key:\"escapeForHtml\",value:function(t){return(new e).escapeForHtml(t)}},{key:\"linkify\",value:function(t){return(new e).linkify(t)}},{key:\"ansiToHtml\",value:function(t,n){return(new e).ansiToHtml(t,n)}},{key:\"ansiToJson\",value:function(t,n){return(new e).ansiToJson(t,n)}},{key:\"ansiToText\",value:function(t){return(new e).ansiToText(t)}}]),u(e,[{key:\"setupPalette\",value:function(){this.PALETTE_COLORS=[];for(var e=0;e<2;++e)for(var t=0;t<8;++t)this.PALETTE_COLORS.push(o[e][t].color);for(var n=[0,95,135,175,215,255],r=function(e,t,r){return n[e]+\", \"+n[t]+\", \"+n[r]},u=0;u<6;++u)for(var a=0;a<6;++a)for(var i=0;i<6;++i)this.PALETTE_COLORS.push(r(u,a,i));for(var l=8,s=0;s<24;++s,l+=10)this.PALETTE_COLORS.push(r(l,l,l))}},{key:\"escapeForHtml\",value:function(e){return e.replace(/[&<>]/gm,function(e){return\"&\"==e?\"&amp;\":\"<\"==e?\"&lt;\":\">\"==e?\"&gt;\":\"\"})}},{key:\"linkify\",value:function(e){return e.replace(/(https?:\\/\\/[^\\s]+)/gm,function(e){return'<a href=\"'+e+'\">'+e+\"</a>\"})}},{key:\"ansiToHtml\",value:function(e,t){return this.process(e,t,!0)}},{key:\"ansiToJson\",value:function(e,t){return t=t||{},t.json=!0,t.clearLine=!1,this.process(e,t,!0)}},{key:\"ansiToText\",value:function(e){return this.process(e,{},!1)}},{key:\"process\",value:function(e,t,n){var r=this,u=this,o=e.split(/\\033\\[/),a=o.shift();void 0!==t&&null!==t||(t={}),t.clearLine=/\\r/.test(e);var i=o.map(function(e){return r.processChunk(e,t,n)});if(t&&t.json){var l=u.processChunkJson(\"\");return l.content=a,l.clearLine=t.clearLine,i.unshift(l),t.remove_empty&&(i=i.filter(function(e){return!e.isEmpty()})),i}return i.unshift(a),i.join(\"\")}},{key:\"processChunkJson\",value:function(e,t,n){t=\"undefined\"==typeof t?{}:t;var r=t.use_classes=\"undefined\"!=typeof t.use_classes&&t.use_classes,u=t.key=r?\"class\":\"color\",a={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,clearLine:t.clearLine,decoration:null,was_processed:!1,isEmpty:function(){return!a.content}},i=e.match(/^([!\\x3c-\\x3f]*)([\\d;]*)([\\x20-\\x2c]*[\\x40-\\x7e])([\\s\\S]*)/m);if(!i)return a;var l=(a.content=i[4],i[2].split(\";\"));if(\"\"!==i[1]||\"m\"!==i[3])return a;if(!n)return a;var s=this;for(s.decoration=null;l.length>0;){var c=l.shift(),p=parseInt(c);if(isNaN(p)||0===p)s.fg=s.bg=s.decoration=null;else if(1===p)s.decoration=\"bold\";else if(2===p)s.decoration=\"dim\";else if(3==p)s.decoration=\"italic\";else if(4==p)s.decoration=\"underline\";else if(5==p)s.decoration=\"blink\";else if(7===p)s.decoration=\"reverse\";else if(8===p)s.decoration=\"hidden\";else if(9===p)s.decoration=\"strikethrough\";else if(39==p)s.fg=null;else if(49==p)s.bg=null;else if(p>=30&&p<38)s.fg=o[0][p%10][u];else if(p>=90&&p<98)s.fg=o[1][p%10][u];else if(p>=40&&p<48)s.bg=o[0][p%10][u];else if(p>=100&&p<108)s.bg=o[1][p%10][u];else if(38===p||48===p){var f=38===p;if(l.length>=1){var d=l.shift();if(\"5\"===d&&l.length>=1){var D=parseInt(l.shift());if(D>=0&&D<=255)if(r){var h=D>=16?\"ansi-palette-\"+D:o[D>7?1:0][D%8].class;f?s.fg=h:s.bg=h}else this.PALETTE_COLORS||s.setupPalette(),f?s.fg=this.PALETTE_COLORS[D]:s.bg=this.PALETTE_COLORS[D]}else if(\"2\"===d&&l.length>=3){var g=parseInt(l.shift()),m=parseInt(l.shift()),C=parseInt(l.shift());if(g>=0&&g<=255&&m>=0&&m<=255&&C>=0&&C<=255){var E=g+\", \"+m+\", \"+C;r?f?(s.fg=\"ansi-truecolor\",s.fg_truecolor=E):(s.bg=\"ansi-truecolor\",s.bg_truecolor=E):f?s.fg=E:s.bg=E}}}}}if(null===s.fg&&null===s.bg&&null===s.decoration)return a;return a.fg=s.fg,a.bg=s.bg,a.fg_truecolor=s.fg_truecolor,a.bg_truecolor=s.bg_truecolor,a.decoration=s.decoration,a.was_processed=!0,a}},{key:\"processChunk\",value:function(e,t,n){var r=this;t=t||{};var u=this.processChunkJson(e,t,n);if(t.json)return u;if(u.isEmpty())return\"\";if(!u.was_processed)return u.content;var o=t.use_classes,a=[],i=[],l={},s=function(e){var t=[],n=void 0;for(n in e)e.hasOwnProperty(n)&&t.push(\"data-\"+n+'=\"'+r.escapeForHtml(e[n])+'\"');return t.length>0?\" \"+t.join(\" \"):\"\"};return u.fg&&(o?(i.push(u.fg+\"-fg\"),null!==u.fg_truecolor&&(l[\"ansi-truecolor-fg\"]=u.fg_truecolor,u.fg_truecolor=null)):a.push(\"color:rgb(\"+u.fg+\")\")),u.bg&&(o?(i.push(u.bg+\"-bg\"),null!==u.bg_truecolor&&(l[\"ansi-truecolor-bg\"]=u.bg_truecolor,u.bg_truecolor=null)):a.push(\"background-color:rgb(\"+u.bg+\")\")),u.decoration&&(o?i.push(\"ansi-\"+u.decoration):\"bold\"===u.decoration?a.push(\"font-weight:bold\"):\"dim\"===u.decoration?a.push(\"opacity:0.5\"):\"italic\"===u.decoration?a.push(\"font-style:italic\"):\"reverse\"===u.decoration?a.push(\"filter:invert(100%)\"):\"hidden\"===u.decoration?a.push(\"visibility:hidden\"):\"strikethrough\"===u.decoration?a.push(\"text-decoration:line-through\"):a.push(\"text-decoration:\"+u.decoration)),o?'<span class=\"'+i.join(\" \")+'\"'+s(l)+\">\"+u.content+\"</span>\":'<span style=\"'+a.join(\";\")+'\"'+s(l)+\">\"+u.content+\"</span>\"}}]),e}();e.exports=a},function(e,t){function n(){}var r=[[\"Aacute\",[193]],[\"aacute\",[225]],[\"Abreve\",[258]],[\"abreve\",[259]],[\"ac\",[8766]],[\"acd\",[8767]],[\"acE\",[8766,819]],[\"Acirc\",[194]],[\"acirc\",[226]],[\"acute\",[180]],[\"Acy\",[1040]],[\"acy\",[1072]],[\"AElig\",[198]],[\"aelig\",[230]],[\"af\",[8289]],[\"Afr\",[120068]],[\"afr\",[120094]],[\"Agrave\",[192]],[\"agrave\",[224]],[\"alefsym\",[8501]],[\"aleph\",[8501]],[\"Alpha\",[913]],[\"alpha\",[945]],[\"Amacr\",[256]],[\"amacr\",[257]],[\"amalg\",[10815]],[\"amp\",[38]],[\"AMP\",[38]],[\"andand\",[10837]],[\"And\",[10835]],[\"and\",[8743]],[\"andd\",[10844]],[\"andslope\",[10840]],[\"andv\",[10842]],[\"ang\",[8736]],[\"ange\",[10660]],[\"angle\",[8736]],[\"angmsdaa\",[10664]],[\"angmsdab\",[10665]],[\"angmsdac\",[10666]],[\"angmsdad\",[10667]],[\"angmsdae\",[10668]],[\"angmsdaf\",[10669]],[\"angmsdag\",[10670]],[\"angmsdah\",[10671]],[\"angmsd\",[8737]],[\"angrt\",[8735]],[\"angrtvb\",[8894]],[\"angrtvbd\",[10653]],[\"angsph\",[8738]],[\"angst\",[197]],[\"angzarr\",[9084]],[\"Aogon\",[260]],[\"aogon\",[261]],[\"Aopf\",[120120]],[\"aopf\",[120146]],[\"apacir\",[10863]],[\"ap\",[8776]],[\"apE\",[10864]],[\"ape\",[8778]],[\"apid\",[8779]],[\"apos\",[39]],[\"ApplyFunction\",[8289]],[\"approx\",[8776]],[\"approxeq\",[8778]],[\"Aring\",[197]],[\"aring\",[229]],[\"Ascr\",[119964]],[\"ascr\",[119990]],[\"Assign\",[8788]],[\"ast\",[42]],[\"asymp\",[8776]],[\"asympeq\",[8781]],[\"Atilde\",[195]],[\"atilde\",[227]],[\"Auml\",[196]],[\"auml\",[228]],[\"awconint\",[8755]],[\"awint\",[10769]],[\"backcong\",[8780]],[\"backepsilon\",[1014]],[\"backprime\",[8245]],[\"backsim\",[8765]],[\"backsimeq\",[8909]],[\"Backslash\",[8726]],[\"Barv\",[10983]],[\"barvee\",[8893]],[\"barwed\",[8965]],[\"Barwed\",[8966]],[\"barwedge\",[8965]],[\"bbrk\",[9141]],[\"bbrktbrk\",[9142]],[\"bcong\",[8780]],[\"Bcy\",[1041]],[\"bcy\",[1073]],[\"bdquo\",[8222]],[\"becaus\",[8757]],[\"because\",[8757]],[\"Because\",[8757]],[\"bemptyv\",[10672]],[\"bepsi\",[1014]],[\"bernou\",[8492]],[\"Bernoullis\",[8492]],[\"Beta\",[914]],[\"beta\",[946]],[\"beth\",[8502]],[\"between\",[8812]],[\"Bfr\",[120069]],[\"bfr\",[120095]],[\"bigcap\",[8898]],[\"bigcirc\",[9711]],[\"bigcup\",[8899]],[\"bigodot\",[10752]],[\"bigoplus\",[10753]],[\"bigotimes\",[10754]],[\"bigsqcup\",[10758]],[\"bigstar\",[9733]],[\"bigtriangledown\",[9661]],[\"bigtriangleup\",[9651]],[\"biguplus\",[10756]],[\"bigvee\",[8897]],[\"bigwedge\",[8896]],[\"bkarow\",[10509]],[\"blacklozenge\",[10731]],[\"blacksquare\",[9642]],[\"blacktriangle\",[9652]],[\"blacktriangledown\",[9662]],[\"blacktriangleleft\",[9666]],[\"blacktriangleright\",[9656]],[\"blank\",[9251]],[\"blk12\",[9618]],[\"blk14\",[9617]],[\"blk34\",[9619]],[\"block\",[9608]],[\"bne\",[61,8421]],[\"bnequiv\",[8801,8421]],[\"bNot\",[10989]],[\"bnot\",[8976]],[\"Bopf\",[120121]],[\"bopf\",[120147]],[\"bot\",[8869]],[\"bottom\",[8869]],[\"bowtie\",[8904]],[\"boxbox\",[10697]],[\"boxdl\",[9488]],[\"boxdL\",[9557]],[\"boxDl\",[9558]],[\"boxDL\",[9559]],[\"boxdr\",[9484]],[\"boxdR\",[9554]],[\"boxDr\",[9555]],[\"boxDR\",[9556]],[\"boxh\",[9472]],[\"boxH\",[9552]],[\"boxhd\",[9516]],[\"boxHd\",[9572]],[\"boxhD\",[9573]],[\"boxHD\",[9574]],[\"boxhu\",[9524]],[\"boxHu\",[9575]],[\"boxhU\",[9576]],[\"boxHU\",[9577]],[\"boxminus\",[8863]],[\"boxplus\",[8862]],[\"boxtimes\",[8864]],[\"boxul\",[9496]],[\"boxuL\",[9563]],[\"boxUl\",[9564]],[\"boxUL\",[9565]],[\"boxur\",[9492]],[\"boxuR\",[9560]],[\"boxUr\",[9561]],[\"boxUR\",[9562]],[\"boxv\",[9474]],[\"boxV\",[9553]],[\"boxvh\",[9532]],[\"boxvH\",[9578]],[\"boxVh\",[9579]],[\"boxVH\",[9580]],[\"boxvl\",[9508]],[\"boxvL\",[9569]],[\"boxVl\",[9570]],[\"boxVL\",[9571]],[\"boxvr\",[9500]],[\"boxvR\",[9566]],[\"boxVr\",[9567]],[\"boxVR\",[9568]],[\"bprime\",[8245]],[\"breve\",[728]],[\"Breve\",[728]],[\"brvbar\",[166]],[\"bscr\",[119991]],[\"Bscr\",[8492]],[\"bsemi\",[8271]],[\"bsim\",[8765]],[\"bsime\",[8909]],[\"bsolb\",[10693]],[\"bsol\",[92]],[\"bsolhsub\",[10184]],[\"bull\",[8226]],[\"bullet\",[8226]],[\"bump\",[8782]],[\"bumpE\",[10926]],[\"bumpe\",[8783]],[\"Bumpeq\",[8782]],[\"bumpeq\",[8783]],[\"Cacute\",[262]],[\"cacute\",[263]],[\"capand\",[10820]],[\"capbrcup\",[10825]],[\"capcap\",[10827]],[\"cap\",[8745]],[\"Cap\",[8914]],[\"capcup\",[10823]],[\"capdot\",[10816]],[\"CapitalDifferentialD\",[8517]],[\"caps\",[8745,65024]],[\"caret\",[8257]],[\"caron\",[711]],[\"Cayleys\",[8493]],[\"ccaps\",[10829]],[\"Ccaron\",[268]],[\"ccaron\",[269]],[\"Ccedil\",[199]],[\"ccedil\",[231]],[\"Ccirc\",[264]],[\"ccirc\",[265]],[\"Cconint\",[8752]],[\"ccups\",[10828]],[\"ccupssm\",[10832]],[\"Cdot\",[266]],[\"cdot\",[267]],[\"cedil\",[184]],[\"Cedilla\",[184]],[\"cemptyv\",[10674]],[\"cent\",[162]],[\"centerdot\",[183]],[\"CenterDot\",[183]],[\"cfr\",[120096]],[\"Cfr\",[8493]],[\"CHcy\",[1063]],[\"chcy\",[1095]],[\"check\",[10003]],[\"checkmark\",[10003]],[\"Chi\",[935]],[\"chi\",[967]],[\"circ\",[710]],[\"circeq\",[8791]],[\"circlearrowleft\",[8634]],[\"circlearrowright\",[8635]],[\"circledast\",[8859]],[\"circledcirc\",[8858]],[\"circleddash\",[8861]],[\"CircleDot\",[8857]],[\"circledR\",[174]],[\"circledS\",[9416]],[\"CircleMinus\",[8854]],[\"CirclePlus\",[8853]],[\"CircleTimes\",[8855]],[\"cir\",[9675]],[\"cirE\",[10691]],[\"cire\",[8791]],[\"cirfnint\",[10768]],[\"cirmid\",[10991]],[\"cirscir\",[10690]],[\"ClockwiseContourIntegral\",[8754]],[\"clubs\",[9827]],[\"clubsuit\",[9827]],[\"colon\",[58]],[\"Colon\",[8759]],[\"Colone\",[10868]],[\"colone\",[8788]],[\"coloneq\",[8788]],[\"comma\",[44]],[\"commat\",[64]],[\"comp\",[8705]],[\"compfn\",[8728]],[\"complement\",[8705]],[\"complexes\",[8450]],[\"cong\",[8773]],[\"congdot\",[10861]],[\"Congruent\",[8801]],[\"conint\",[8750]],[\"Conint\",[8751]],[\"ContourIntegral\",[8750]],[\"copf\",[120148]],[\"Copf\",[8450]],[\"coprod\",[8720]],[\"Coproduct\",[8720]],[\"copy\",[169]],[\"COPY\",[169]],[\"copysr\",[8471]],[\"CounterClockwiseContourIntegral\",[8755]],[\"crarr\",[8629]],[\"cross\",[10007]],[\"Cross\",[10799]],[\"Cscr\",[119966]],[\"cscr\",[119992]],[\"csub\",[10959]],[\"csube\",[10961]],[\"csup\",[10960]],[\"csupe\",[10962]],[\"ctdot\",[8943]],[\"cudarrl\",[10552]],[\"cudarrr\",[10549]],[\"cuepr\",[8926]],[\"cuesc\",[8927]],[\"cularr\",[8630]],[\"cularrp\",[10557]],[\"cupbrcap\",[10824]],[\"cupcap\",[10822]],[\"CupCap\",[8781]],[\"cup\",[8746]],[\"Cup\",[8915]],[\"cupcup\",[10826]],[\"cupdot\",[8845]],[\"cupor\",[10821]],[\"cups\",[8746,65024]],[\"curarr\",[8631]],[\"curarrm\",[10556]],[\"curlyeqprec\",[8926]],[\"curlyeqsucc\",[8927]],[\"curlyvee\",[8910]],[\"curlywedge\",[8911]],[\"curren\",[164]],[\"curvearrowleft\",[8630]],[\"curvearrowright\",[8631]],[\"cuvee\",[8910]],[\"cuwed\",[8911]],[\"cwconint\",[8754]],[\"cwint\",[8753]],[\"cylcty\",[9005]],[\"dagger\",[8224]],[\"Dagger\",[8225]],[\"daleth\",[8504]],[\"darr\",[8595]],[\"Darr\",[8609]],[\"dArr\",[8659]],[\"dash\",[8208]],[\"Dashv\",[10980]],[\"dashv\",[8867]],[\"dbkarow\",[10511]],[\"dblac\",[733]],[\"Dcaron\",[270]],[\"dcaron\",[271]],[\"Dcy\",[1044]],[\"dcy\",[1076]],[\"ddagger\",[8225]],[\"ddarr\",[8650]],[\"DD\",[8517]],[\"dd\",[8518]],[\"DDotrahd\",[10513]],[\"ddotseq\",[10871]],[\"deg\",[176]],[\"Del\",[8711]],[\"Delta\",[916]],[\"delta\",[948]],[\"demptyv\",[10673]],[\"dfisht\",[10623]],[\"Dfr\",[120071]],[\"dfr\",[120097]],[\"dHar\",[10597]],[\"dharl\",[8643]],[\"dharr\",[8642]],[\"DiacriticalAcute\",[180]],[\"DiacriticalDot\",[729]],[\"DiacriticalDoubleAcute\",[733]],[\"DiacriticalGrave\",[96]],[\"DiacriticalTilde\",[732]],[\"diam\",[8900]],[\"diamond\",[8900]],[\"Diamond\",[8900]],[\"diamondsuit\",[9830]],[\"diams\",[9830]],[\"die\",[168]],[\"DifferentialD\",[8518]],[\"digamma\",[989]],[\"disin\",[8946]],[\"div\",[247]],[\"divide\",[247]],[\"divideontimes\",[8903]],[\"divonx\",[8903]],[\"DJcy\",[1026]],[\"djcy\",[1106]],[\"dlcorn\",[8990]],[\"dlcrop\",[8973]],[\"dollar\",[36]],[\"Dopf\",[120123]],[\"dopf\",[120149]],[\"Dot\",[168]],[\"dot\",[729]],[\"DotDot\",[8412]],[\"doteq\",[8784]],[\"doteqdot\",[8785]],[\"DotEqual\",[8784]],[\"dotminus\",[8760]],[\"dotplus\",[8724]],[\"dotsquare\",[8865]],[\"doublebarwedge\",[8966]],[\"DoubleContourIntegral\",[8751]],[\"DoubleDot\",[168]],[\"DoubleDownArrow\",[8659]],[\"DoubleLeftArrow\",[8656]],[\"DoubleLeftRightArrow\",[8660]],[\"DoubleLeftTee\",[10980]],[\"DoubleLongLeftArrow\",[10232]],[\"DoubleLongLeftRightArrow\",[10234]],[\"DoubleLongRightArrow\",[10233]],[\"DoubleRightArrow\",[8658]],[\"DoubleRightTee\",[8872]],[\"DoubleUpArrow\",[8657]],[\"DoubleUpDownArrow\",[8661]],[\"DoubleVerticalBar\",[8741]],[\"DownArrowBar\",[10515]],[\"downarrow\",[8595]],[\"DownArrow\",[8595]],[\"Downarrow\",[8659]],[\"DownArrowUpArrow\",[8693]],[\"DownBreve\",[785]],[\"downdownarrows\",[8650]],[\"downharpoonleft\",[8643]],[\"downharpoonright\",[8642]],[\"DownLeftRightVector\",[10576]],[\"DownLeftTeeVector\",[10590]],[\"DownLeftVectorBar\",[10582]],[\"DownLeftVector\",[8637]],[\"DownRightTeeVector\",[10591]],[\"DownRightVectorBar\",[10583]],[\"DownRightVector\",[8641]],[\"DownTeeArrow\",[8615]],[\"DownTee\",[8868]],[\"drbkarow\",[10512]],[\"drcorn\",[8991]],[\"drcrop\",[8972]],[\"Dscr\",[119967]],[\"dscr\",[119993]],[\"DScy\",[1029]],[\"dscy\",[1109]],[\"dsol\",[10742]],[\"Dstrok\",[272]],[\"dstrok\",[273]],[\"dtdot\",[8945]],[\"dtri\",[9663]],[\"dtrif\",[9662]],[\"duarr\",[8693]],[\"duhar\",[10607]],[\"dwangle\",[10662]],[\"DZcy\",[1039]],[\"dzcy\",[1119]],[\"dzigrarr\",[10239]],[\"Eacute\",[201]],[\"eacute\",[233]],[\"easter\",[10862]],[\"Ecaron\",[282]],[\"ecaron\",[283]],[\"Ecirc\",[202]],[\"ecirc\",[234]],[\"ecir\",[8790]],[\"ecolon\",[8789]],[\"Ecy\",[1069]],[\"ecy\",[1101]],[\"eDDot\",[10871]],[\"Edot\",[278]],[\"edot\",[279]],[\"eDot\",[8785]],[\"ee\",[8519]],[\"efDot\",[8786]],[\"Efr\",[120072]],[\"efr\",[120098]],[\"eg\",[10906]],[\"Egrave\",[200]],[\"egrave\",[232]],[\"egs\",[10902]],[\"egsdot\",[10904]],[\"el\",[10905]],[\"Element\",[8712]],[\"elinters\",[9191]],[\"ell\",[8467]],[\"els\",[10901]],[\"elsdot\",[10903]],[\"Emacr\",[274]],[\"emacr\",[275]],[\"empty\",[8709]],[\"emptyset\",[8709]],[\"EmptySmallSquare\",[9723]],[\"emptyv\",[8709]],[\"EmptyVerySmallSquare\",[9643]],[\"emsp13\",[8196]],[\"emsp14\",[8197]],[\"emsp\",[8195]],[\"ENG\",[330]],[\"eng\",[331]],[\"ensp\",[8194]],[\"Eogon\",[280]],[\"eogon\",[281]],[\"Eopf\",[120124]],[\"eopf\",[120150]],[\"epar\",[8917]],[\"eparsl\",[10723]],[\"eplus\",[10865]],[\"epsi\",[949]],[\"Epsilon\",[917]],[\"epsilon\",[949]],[\"epsiv\",[1013]],[\"eqcirc\",[8790]],[\"eqcolon\",[8789]],[\"eqsim\",[8770]],[\"eqslantgtr\",[10902]],[\"eqslantless\",[10901]],[\"Equal\",[10869]],[\"equals\",[61]],[\"EqualTilde\",[8770]],[\"equest\",[8799]],[\"Equilibrium\",[8652]],[\"equiv\",[8801]],[\"equivDD\",[10872]],[\"eqvparsl\",[10725]],[\"erarr\",[10609]],[\"erDot\",[8787]],[\"escr\",[8495]],[\"Escr\",[8496]],[\"esdot\",[8784]],[\"Esim\",[10867]],[\"esim\",[8770]],[\"Eta\",[919]],[\"eta\",[951]],[\"ETH\",[208]],[\"eth\",[240]],[\"Euml\",[203]],[\"euml\",[235]],[\"euro\",[8364]],[\"excl\",[33]],[\"exist\",[8707]],[\"Exists\",[8707]],[\"expectation\",[8496]],[\"exponentiale\",[8519]],[\"ExponentialE\",[8519]],[\"fallingdotseq\",[8786]],[\"Fcy\",[1060]],[\"fcy\",[1092]],[\"female\",[9792]],[\"ffilig\",[64259]],[\"fflig\",[64256]],[\"ffllig\",[64260]],[\"Ffr\",[120073]],[\"ffr\",[120099]],[\"filig\",[64257]],[\"FilledSmallSquare\",[9724]],[\"FilledVerySmallSquare\",[9642]],[\"fjlig\",[102,106]],[\"flat\",[9837]],[\"fllig\",[64258]],[\"fltns\",[9649]],[\"fnof\",[402]],[\"Fopf\",[120125]],[\"fopf\",[120151]],[\"forall\",[8704]],[\"ForAll\",[8704]],[\"fork\",[8916]],[\"forkv\",[10969]],[\"Fouriertrf\",[8497]],[\"fpartint\",[10765]],[\"frac12\",[189]],[\"frac13\",[8531]],[\"frac14\",[188]],[\"frac15\",[8533]],[\"frac16\",[8537]],[\"frac18\",[8539]],[\"frac23\",[8532]],[\"frac25\",[8534]],[\"frac34\",[190]],[\"frac35\",[8535]],[\"frac38\",[8540]],[\"frac45\",[8536]],[\"frac56\",[8538]],[\"frac58\",[8541]],[\"frac78\",[8542]],[\"frasl\",[8260]],[\"frown\",[8994]],[\"fscr\",[119995]],[\"Fscr\",[8497]],[\"gacute\",[501]],[\"Gamma\",[915]],[\"gamma\",[947]],[\"Gammad\",[988]],[\"gammad\",[989]],[\"gap\",[10886]],[\"Gbreve\",[286]],[\"gbreve\",[287]],[\"Gcedil\",[290]],[\"Gcirc\",[284]],[\"gcirc\",[285]],[\"Gcy\",[1043]],[\"gcy\",[1075]],[\"Gdot\",[288]],[\"gdot\",[289]],[\"ge\",[8805]],[\"gE\",[8807]],[\"gEl\",[10892]],[\"gel\",[8923]],[\"geq\",[8805]],[\"geqq\",[8807]],[\"geqslant\",[10878]],[\"gescc\",[10921]],[\"ges\",[10878]],[\"gesdot\",[10880]],[\"gesdoto\",[10882]],[\"gesdotol\",[10884]],[\"gesl\",[8923,65024]],[\"gesles\",[10900]],[\"Gfr\",[120074]],[\"gfr\",[120100]],[\"gg\",[8811]],[\"Gg\",[8921]],[\"ggg\",[8921]],[\"gimel\",[8503]],[\"GJcy\",[1027]],[\"gjcy\",[1107]],[\"gla\",[10917]],[\"gl\",[8823]],[\"glE\",[10898]],[\"glj\",[10916]],[\"gnap\",[10890]],[\"gnapprox\",[10890]],[\"gne\",[10888]],[\"gnE\",[8809]],[\"gneq\",[10888]],[\"gneqq\",[8809]],[\"gnsim\",[8935]],[\"Gopf\",[120126]],[\"gopf\",[120152]],[\"grave\",[96]],[\"GreaterEqual\",[8805]],[\"GreaterEqualLess\",[8923]],[\"GreaterFullEqual\",[8807]],[\"GreaterGreater\",[10914]],[\"GreaterLess\",[8823]],[\"GreaterSlantEqual\",[10878]],[\"GreaterTilde\",[8819]],[\"Gscr\",[119970]],[\"gscr\",[8458]],[\"gsim\",[8819]],[\"gsime\",[10894]],[\"gsiml\",[10896]],[\"gtcc\",[10919]],[\"gtcir\",[10874]],[\"gt\",[62]],[\"GT\",[62]],[\"Gt\",[8811]],[\"gtdot\",[8919]],[\"gtlPar\",[10645]],[\"gtquest\",[10876]],[\"gtrapprox\",[10886]],[\"gtrarr\",[10616]],[\"gtrdot\",[8919]],[\"gtreqless\",[8923]],[\"gtreqqless\",[10892]],[\"gtrless\",[8823]],[\"gtrsim\",[8819]],[\"gvertneqq\",[8809,65024]],[\"gvnE\",[8809,65024]],[\"Hacek\",[711]],[\"hairsp\",[8202]],[\"half\",[189]],[\"hamilt\",[8459]],[\"HARDcy\",[1066]],[\"hardcy\",[1098]],[\"harrcir\",[10568]],[\"harr\",[8596]],[\"hArr\",[8660]],[\"harrw\",[8621]],[\"Hat\",[94]],[\"hbar\",[8463]],[\"Hcirc\",[292]],[\"hcirc\",[293]],[\"hearts\",[9829]],[\"heartsuit\",[9829]],[\"hellip\",[8230]],[\"hercon\",[8889]],[\"hfr\",[120101]],[\"Hfr\",[8460]],[\"HilbertSpace\",[8459]],[\"hksearow\",[10533]],[\"hkswarow\",[10534]],[\"hoarr\",[8703]],[\"homtht\",[8763]],[\"hookleftarrow\",[8617]],[\"hookrightarrow\",[8618]],[\"hopf\",[120153]],[\"Hopf\",[8461]],[\"horbar\",[8213]],[\"HorizontalLine\",[9472]],[\"hscr\",[119997]],[\"Hscr\",[8459]],[\"hslash\",[8463]],[\"Hstrok\",[294]],[\"hstrok\",[295]],[\"HumpDownHump\",[8782]],[\"HumpEqual\",[8783]],[\"hybull\",[8259]],[\"hyphen\",[8208]],[\"Iacute\",[205]],[\"iacute\",[237]],[\"ic\",[8291]],[\"Icirc\",[206]],[\"icirc\",[238]],[\"Icy\",[1048]],[\"icy\",[1080]],[\"Idot\",[304]],[\"IEcy\",[1045]],[\"iecy\",[1077]],[\"iexcl\",[161]],[\"iff\",[8660]],[\"ifr\",[120102]],[\"Ifr\",[8465]],[\"Igrave\",[204]],[\"igrave\",[236]],[\"ii\",[8520]],[\"iiiint\",[10764]],[\"iiint\",[8749]],[\"iinfin\",[10716]],[\"iiota\",[8489]],[\"IJlig\",[306]],[\"ijlig\",[307]],[\"Imacr\",[298]],[\"imacr\",[299]],[\"image\",[8465]],[\"ImaginaryI\",[8520]],[\"imagline\",[8464]],[\"imagpart\",[8465]],[\"imath\",[305]],[\"Im\",[8465]],[\"imof\",[8887]],[\"imped\",[437]],[\"Implies\",[8658]],[\"incare\",[8453]],[\"in\",[8712]],[\"infin\",[8734]],[\"infintie\",[10717]],[\"inodot\",[305]],[\"intcal\",[8890]],[\"int\",[8747]],[\"Int\",[8748]],[\"integers\",[8484]],[\"Integral\",[8747]],[\"intercal\",[8890]],[\"Intersection\",[8898]],[\"intlarhk\",[10775]],[\"intprod\",[10812]],[\"InvisibleComma\",[8291]],[\"InvisibleTimes\",[8290]],[\"IOcy\",[1025]],[\"iocy\",[1105]],[\"Iogon\",[302]],[\"iogon\",[303]],[\"Iopf\",[120128]],[\"iopf\",[120154]],[\"Iota\",[921]],[\"iota\",[953]],[\"iprod\",[10812]],[\"iquest\",[191]],[\"iscr\",[119998]],[\"Iscr\",[8464]],[\"isin\",[8712]],[\"isindot\",[8949]],[\"isinE\",[8953]],[\"isins\",[8948]],[\"isinsv\",[8947]],[\"isinv\",[8712]],[\"it\",[8290]],[\"Itilde\",[296]],[\"itilde\",[297]],[\"Iukcy\",[1030]],[\"iukcy\",[1110]],[\"Iuml\",[207]],[\"iuml\",[239]],[\"Jcirc\",[308]],[\"jcirc\",[309]],[\"Jcy\",[1049]],[\"jcy\",[1081]],[\"Jfr\",[120077]],[\"jfr\",[120103]],[\"jmath\",[567]],[\"Jopf\",[120129]],[\"jopf\",[120155]],[\"Jscr\",[119973]],[\"jscr\",[119999]],[\"Jsercy\",[1032]],[\"jsercy\",[1112]],[\"Jukcy\",[1028]],[\"jukcy\",[1108]],[\"Kappa\",[922]],[\"kappa\",[954]],[\"kappav\",[1008]],[\"Kcedil\",[310]],[\"kcedil\",[311]],[\"Kcy\",[1050]],[\"kcy\",[1082]],[\"Kfr\",[120078]],[\"kfr\",[120104]],[\"kgreen\",[312]],[\"KHcy\",[1061]],[\"khcy\",[1093]],[\"KJcy\",[1036]],[\"kjcy\",[1116]],[\"Kopf\",[120130]],[\"kopf\",[120156]],[\"Kscr\",[119974]],[\"kscr\",[12e4]],[\"lAarr\",[8666]],[\"Lacute\",[313]],[\"lacute\",[314]],[\"laemptyv\",[10676]],[\"lagran\",[8466]],[\"Lambda\",[923]],[\"lambda\",[955]],[\"lang\",[10216]],[\"Lang\",[10218]],[\"langd\",[10641]],[\"langle\",[10216]],[\"lap\",[10885]],[\"Laplacetrf\",[8466]],[\"laquo\",[171]],[\"larrb\",[8676]],[\"larrbfs\",[10527]],[\"larr\",[8592]],[\"Larr\",[8606]],[\"lArr\",[8656]],[\"larrfs\",[10525]],[\"larrhk\",[8617]],[\"larrlp\",[8619]],[\"larrpl\",[10553]],[\"larrsim\",[10611]],[\"larrtl\",[8610]],[\"latail\",[10521]],[\"lAtail\",[10523]],[\"lat\",[10923]],[\"late\",[10925]],[\"lates\",[10925,65024]],[\"lbarr\",[10508]],[\"lBarr\",[10510]],[\"lbbrk\",[10098]],[\"lbrace\",[123]],[\"lbrack\",[91]],[\"lbrke\",[10635]],[\"lbrksld\",[10639]],[\"lbrkslu\",[10637]],[\"Lcaron\",[317]],[\"lcaron\",[318]],[\"Lcedil\",[315]],[\"lcedil\",[316]],[\"lceil\",[8968]],[\"lcub\",[123]],[\"Lcy\",[1051]],[\"lcy\",[1083]],[\"ldca\",[10550]],[\"ldquo\",[8220]],[\"ldquor\",[8222]],[\"ldrdhar\",[10599]],[\"ldrushar\",[10571]],[\"ldsh\",[8626]],[\"le\",[8804]],[\"lE\",[8806]],[\"LeftAngleBracket\",[10216]],[\"LeftArrowBar\",[8676]],[\"leftarrow\",[8592]],[\"LeftArrow\",[8592]],[\"Leftarrow\",[8656]],[\"LeftArrowRightArrow\",[8646]],[\"leftarrowtail\",[8610]],[\"LeftCeiling\",[8968]],[\"LeftDoubleBracket\",[10214]],[\"LeftDownTeeVector\",[10593]],[\"LeftDownVectorBar\",[10585]],[\"LeftDownVector\",[8643]],[\"LeftFloor\",[8970]],[\"leftharpoondown\",[8637]],[\"leftharpoonup\",[8636]],[\"leftleftarrows\",[8647]],[\"leftrightarrow\",[8596]],[\"LeftRightArrow\",[8596]],[\"Leftrightarrow\",[8660]],[\"leftrightarrows\",[8646]],[\"leftrightharpoons\",[8651]],[\"leftrightsquigarrow\",[8621]],[\"LeftRightVector\",[10574]],[\"LeftTeeArrow\",[8612]],[\"LeftTee\",[8867]],[\"LeftTeeVector\",[10586]],[\"leftthreetimes\",[8907]],[\"LeftTriangleBar\",[10703]],[\"LeftTriangle\",[8882]],[\"LeftTriangleEqual\",[8884]],[\"LeftUpDownVector\",[10577]],[\"LeftUpTeeVector\",[10592]],[\"LeftUpVectorBar\",[10584]],[\"LeftUpVector\",[8639]],[\"LeftVectorBar\",[10578]],[\"LeftVector\",[8636]],[\"lEg\",[10891]],[\"leg\",[8922]],[\"leq\",[8804]],[\"leqq\",[8806]],[\"leqslant\",[10877]],[\"lescc\",[10920]],[\"les\",[10877]],[\"lesdot\",[10879]],[\"lesdoto\",[10881]],[\"lesdotor\",[10883]],[\"lesg\",[8922,65024]],[\"lesges\",[10899]],[\"lessapprox\",[10885]],[\"lessdot\",[8918]],[\"lesseqgtr\",[8922]],[\"lesseqqgtr\",[10891]],[\"LessEqualGreater\",[8922]],[\"LessFullEqual\",[8806]],[\"LessGreater\",[8822]],[\"lessgtr\",[8822]],[\"LessLess\",[10913]],[\"lesssim\",[8818]],[\"LessSlantEqual\",[10877]],[\"LessTilde\",[8818]],[\"lfisht\",[10620]],[\"lfloor\",[8970]],[\"Lfr\",[120079]],[\"lfr\",[120105]],[\"lg\",[8822]],[\"lgE\",[10897]],[\"lHar\",[10594]],[\"lhard\",[8637]],[\"lharu\",[8636]],[\"lharul\",[10602]],[\"lhblk\",[9604]],[\"LJcy\",[1033]],[\"ljcy\",[1113]],[\"llarr\",[8647]],[\"ll\",[8810]],[\"Ll\",[8920]],[\"llcorner\",[8990]],[\"Lleftarrow\",[8666]],[\"llhard\",[10603]],[\"lltri\",[9722]],[\"Lmidot\",[319]],[\"lmidot\",[320]],[\"lmoustache\",[9136]],[\"lmoust\",[9136]],[\"lnap\",[10889]],[\"lnapprox\",[10889]],[\"lne\",[10887]],[\"lnE\",[8808]],[\"lneq\",[10887]],[\"lneqq\",[8808]],[\"lnsim\",[8934]],[\"loang\",[10220]],[\"loarr\",[8701]],[\"lobrk\",[10214]],[\"longleftarrow\",[10229]],[\"LongLeftArrow\",[10229]],[\"Longleftarrow\",[10232]],[\"longleftrightarrow\",[10231]],[\"LongLeftRightArrow\",[10231]],[\"Longleftrightarrow\",[10234]],[\"longmapsto\",[10236]],[\"longrightarrow\",[10230]],[\"LongRightArrow\",[10230]],[\"Longrightarrow\",[10233]],[\"looparrowleft\",[8619]],[\"looparrowright\",[8620]],[\"lopar\",[10629]],[\"Lopf\",[120131]],[\"lopf\",[120157]],[\"loplus\",[10797]],[\"lotimes\",[10804]],[\"lowast\",[8727]],[\"lowbar\",[95]],[\"LowerLeftArrow\",[8601]],[\"LowerRightArrow\",[8600]],[\"loz\",[9674]],[\"lozenge\",[9674]],[\"lozf\",[10731]],[\"lpar\",[40]],[\"lparlt\",[10643]],[\"lrarr\",[8646]],[\"lrcorner\",[8991]],[\"lrhar\",[8651]],[\"lrhard\",[10605]],[\"lrm\",[8206]],[\"lrtri\",[8895]],[\"lsaquo\",[8249]],[\"lscr\",[120001]],[\"Lscr\",[8466]],[\"lsh\",[8624]],[\"Lsh\",[8624]],[\"lsim\",[8818]],[\"lsime\",[10893]],[\"lsimg\",[10895]],[\"lsqb\",[91]],[\"lsquo\",[8216]],[\"lsquor\",[8218]],[\"Lstrok\",[321]],[\"lstrok\",[322]],[\"ltcc\",[10918]],[\"ltcir\",[10873]],[\"lt\",[60]],[\"LT\",[60]],[\"Lt\",[8810]],[\"ltdot\",[8918]],[\"lthree\",[8907]],[\"ltimes\",[8905]],[\"ltlarr\",[10614]],[\"ltquest\",[10875]],[\"ltri\",[9667]],[\"ltrie\",[8884]],[\"ltrif\",[9666]],[\"ltrPar\",[10646]],[\"lurdshar\",[10570]],[\"luruhar\",[10598]],[\"lvertneqq\",[8808,65024]],[\"lvnE\",[8808,65024]],[\"macr\",[175]],[\"male\",[9794]],[\"malt\",[10016]],[\"maltese\",[10016]],[\"Map\",[10501]],[\"map\",[8614]],[\"mapsto\",[8614]],[\"mapstodown\",[8615]],[\"mapstoleft\",[8612]],[\"mapstoup\",[8613]],[\"marker\",[9646]],[\"mcomma\",[10793]],[\"Mcy\",[1052]],[\"mcy\",[1084]],[\"mdash\",[8212]],[\"mDDot\",[8762]],[\"measuredangle\",[8737]],[\"MediumSpace\",[8287]],[\"Mellintrf\",[8499]],[\"Mfr\",[120080]],[\"mfr\",[120106]],[\"mho\",[8487]],[\"micro\",[181]],[\"midast\",[42]],[\"midcir\",[10992]],[\"mid\",[8739]],[\"middot\",[183]],[\"minusb\",[8863]],[\"minus\",[8722]],[\"minusd\",[8760]],[\"minusdu\",[10794]],[\"MinusPlus\",[8723]],[\"mlcp\",[10971]],[\"mldr\",[8230]],[\"mnplus\",[8723]],[\"models\",[8871]],[\"Mopf\",[120132]],[\"mopf\",[120158]],[\"mp\",[8723]],[\"mscr\",[120002]],[\"Mscr\",[8499]],[\"mstpos\",[8766]],[\"Mu\",[924]],[\"mu\",[956]],[\"multimap\",[8888]],[\"mumap\",[8888]],[\"nabla\",[8711]],[\"Nacute\",[323]],[\"nacute\",[324]],[\"nang\",[8736,8402]],[\"nap\",[8777]],[\"napE\",[10864,824]],[\"napid\",[8779,824]],[\"napos\",[329]],[\"napprox\",[8777]],[\"natural\",[9838]],[\"naturals\",[8469]],[\"natur\",[9838]],[\"nbsp\",[160]],[\"nbump\",[8782,824]],[\"nbumpe\",[8783,824]],[\"ncap\",[10819]],[\"Ncaron\",[327]],[\"ncaron\",[328]],[\"Ncedil\",[325]],[\"ncedil\",[326]],[\"ncong\",[8775]],[\"ncongdot\",[10861,824]],[\"ncup\",[10818]],[\"Ncy\",[1053]],[\"ncy\",[1085]],[\"ndash\",[8211]],[\"nearhk\",[10532]],[\"nearr\",[8599]],[\"neArr\",[8663]],[\"nearrow\",[8599]],[\"ne\",[8800]],[\"nedot\",[8784,824]],[\"NegativeMediumSpace\",[8203]],[\"NegativeThickSpace\",[8203]],[\"NegativeThinSpace\",[8203]],[\"NegativeVeryThinSpace\",[8203]],[\"nequiv\",[8802]],[\"nesear\",[10536]],[\"nesim\",[8770,824]],[\"NestedGreaterGreater\",[8811]],[\"NestedLessLess\",[8810]],[\"nexist\",[8708]],[\"nexists\",[8708]],[\"Nfr\",[120081]],[\"nfr\",[120107]],[\"ngE\",[8807,824]],[\"nge\",[8817]],[\"ngeq\",[8817]],[\"ngeqq\",[8807,824]],[\"ngeqslant\",[10878,824]],[\"nges\",[10878,824]],[\"nGg\",[8921,824]],[\"ngsim\",[8821]],[\"nGt\",[8811,8402]],[\"ngt\",[8815]],[\"ngtr\",[8815]],[\"nGtv\",[8811,824]],[\"nharr\",[8622]],[\"nhArr\",[8654]],[\"nhpar\",[10994]],[\"ni\",[8715]],[\"nis\",[8956]],[\"nisd\",[8954]],[\"niv\",[8715]],[\"NJcy\",[1034]],[\"njcy\",[1114]],[\"nlarr\",[8602]],[\"nlArr\",[8653]],[\"nldr\",[8229]],[\"nlE\",[8806,824]],[\"nle\",[8816]],[\"nleftarrow\",[8602]],[\"nLeftarrow\",[8653]],[\"nleftrightarrow\",[8622]],[\"nLeftrightarrow\",[8654]],[\"nleq\",[8816]],[\"nleqq\",[8806,824]],[\"nleqslant\",[10877,824]],[\"nles\",[10877,824]],[\"nless\",[8814]],[\"nLl\",[8920,824]],[\"nlsim\",[8820]],[\"nLt\",[8810,8402]],[\"nlt\",[8814]],[\"nltri\",[8938]],[\"nltrie\",[8940]],[\"nLtv\",[8810,824]],[\"nmid\",[8740]],[\"NoBreak\",[8288]],[\"NonBreakingSpace\",[160]],[\"nopf\",[120159]],[\"Nopf\",[8469]],[\"Not\",[10988]],[\"not\",[172]],[\"NotCongruent\",[8802]],[\"NotCupCap\",[8813]],[\"NotDoubleVerticalBar\",[8742]],[\"NotElement\",[8713]],[\"NotEqual\",[8800]],[\"NotEqualTilde\",[8770,824]],[\"NotExists\",[8708]],[\"NotGreater\",[8815]],[\"NotGreaterEqual\",[8817]],[\"NotGreaterFullEqual\",[8807,824]],[\"NotGreaterGreater\",[8811,824]],[\"NotGreaterLess\",[8825]],[\"NotGreaterSlantEqual\",[10878,824]],[\"NotGreaterTilde\",[8821]],[\"NotHumpDownHump\",[8782,824]],[\"NotHumpEqual\",[8783,824]],[\"notin\",[8713]],[\"notindot\",[8949,824]],[\"notinE\",[8953,824]],[\"notinva\",[8713]],[\"notinvb\",[8951]],[\"notinvc\",[8950]],[\"NotLeftTriangleBar\",[10703,824]],[\"NotLeftTriangle\",[8938]],[\"NotLeftTriangleEqual\",[8940]],[\"NotLess\",[8814]],[\"NotLessEqual\",[8816]],[\"NotLessGreater\",[8824]],[\"NotLessLess\",[8810,824]],[\"NotLessSlantEqual\",[10877,824]],[\"NotLessTilde\",[8820]],[\"NotNestedGreaterGreater\",[10914,824]],[\"NotNestedLessLess\",[10913,824]],[\"notni\",[8716]],[\"notniva\",[8716]],[\"notnivb\",[8958]],[\"notnivc\",[8957]],[\"NotPrecedes\",[8832]],[\"NotPrecedesEqual\",[10927,824]],[\"NotPrecedesSlantEqual\",[8928]],[\"NotReverseElement\",[8716]],[\"NotRightTriangleBar\",[10704,824]],[\"NotRightTriangle\",[8939]],[\"NotRightTriangleEqual\",[8941]],[\"NotSquareSubset\",[8847,824]],[\"NotSquareSubsetEqual\",[8930]],[\"NotSquareSuperset\",[8848,824]],[\"NotSquareSupersetEqual\",[8931]],[\"NotSubset\",[8834,8402]],[\"NotSubsetEqual\",[8840]],[\"NotSucceeds\",[8833]],[\"NotSucceedsEqual\",[10928,824]],[\"NotSucceedsSlantEqual\",[8929]],[\"NotSucceedsTilde\",[8831,824]],[\"NotSuperset\",[8835,8402]],[\"NotSupersetEqual\",[8841]],[\"NotTilde\",[8769]],[\"NotTildeEqual\",[8772]],[\"NotTildeFullEqual\",[8775]],[\"NotTildeTilde\",[8777]],[\"NotVerticalBar\",[8740]],[\"nparallel\",[8742]],[\"npar\",[8742]],[\"nparsl\",[11005,8421]],[\"npart\",[8706,824]],[\"npolint\",[10772]],[\"npr\",[8832]],[\"nprcue\",[8928]],[\"nprec\",[8832]],[\"npreceq\",[10927,824]],[\"npre\",[10927,824]],[\"nrarrc\",[10547,824]],[\"nrarr\",[8603]],[\"nrArr\",[8655]],[\"nrarrw\",[8605,824]],[\"nrightarrow\",[8603]],[\"nRightarrow\",[8655]],[\"nrtri\",[8939]],[\"nrtrie\",[8941]],[\"nsc\",[8833]],[\"nsccue\",[8929]],[\"nsce\",[10928,824]],[\"Nscr\",[119977]],[\"nscr\",[120003]],[\"nshortmid\",[8740]],[\"nshortparallel\",[8742]],[\"nsim\",[8769]],[\"nsime\",[8772]],[\"nsimeq\",[8772]],[\"nsmid\",[8740]],[\"nspar\",[8742]],[\"nsqsube\",[8930]],[\"nsqsupe\",[8931]],[\"nsub\",[8836]],[\"nsubE\",[10949,824]],[\"nsube\",[8840]],[\"nsubset\",[8834,8402]],[\"nsubseteq\",[8840]],[\"nsubseteqq\",[10949,824]],[\"nsucc\",[8833]],[\"nsucceq\",[10928,824]],[\"nsup\",[8837]],[\"nsupE\",[10950,824]],[\"nsupe\",[8841]],[\"nsupset\",[8835,8402]],[\"nsupseteq\",[8841]],[\"nsupseteqq\",[10950,824]],[\"ntgl\",[8825]],[\"Ntilde\",[209]],[\"ntilde\",[241]],[\"ntlg\",[8824]],[\"ntriangleleft\",[8938]],[\"ntrianglelefteq\",[8940]],[\"ntriangleright\",[8939]],[\"ntrianglerighteq\",[8941]],[\"Nu\",[925]],[\"nu\",[957]],[\"num\",[35]],[\"numero\",[8470]],[\"numsp\",[8199]],[\"nvap\",[8781,8402]],[\"nvdash\",[8876]],[\"nvDash\",[8877]],[\"nVdash\",[8878]],[\"nVDash\",[8879]],[\"nvge\",[8805,8402]],[\"nvgt\",[62,8402]],[\"nvHarr\",[10500]],[\"nvinfin\",[10718]],[\"nvlArr\",[10498]],[\"nvle\",[8804,8402]],[\"nvlt\",[60,8402]],[\"nvltrie\",[8884,8402]],[\"nvrArr\",[10499]],[\"nvrtrie\",[8885,8402]],[\"nvsim\",[8764,8402]],[\"nwarhk\",[10531]],[\"nwarr\",[8598]],[\"nwArr\",[8662]],[\"nwarrow\",[8598]],[\"nwnear\",[10535]],[\"Oacute\",[211]],[\"oacute\",[243]],[\"oast\",[8859]],[\"Ocirc\",[212]],[\"ocirc\",[244]],[\"ocir\",[8858]],[\"Ocy\",[1054]],[\"ocy\",[1086]],[\"odash\",[8861]],[\"Odblac\",[336]],[\"odblac\",[337]],[\"odiv\",[10808]],[\"odot\",[8857]],[\"odsold\",[10684]],[\"OElig\",[338]],[\"oelig\",[339]],[\"ofcir\",[10687]],[\"Ofr\",[120082]],[\"ofr\",[120108]],[\"ogon\",[731]],[\"Ograve\",[210]],[\"ograve\",[242]],[\"ogt\",[10689]],[\"ohbar\",[10677]],[\"ohm\",[937]],[\"oint\",[8750]],[\"olarr\",[8634]],[\"olcir\",[10686]],[\"olcross\",[10683]],[\"oline\",[8254]],[\"olt\",[10688]],[\"Omacr\",[332]],[\"omacr\",[333]],[\"Omega\",[937]],[\"omega\",[969]],[\"Omicron\",[927]],[\"omicron\",[959]],[\"omid\",[10678]],[\"ominus\",[8854]],[\"Oopf\",[120134]],[\"oopf\",[120160]],[\"opar\",[10679]],[\"OpenCurlyDoubleQuote\",[8220]],[\"OpenCurlyQuote\",[8216]],[\"operp\",[10681]],[\"oplus\",[8853]],[\"orarr\",[8635]],[\"Or\",[10836]],[\"or\",[8744]],[\"ord\",[10845]],[\"order\",[8500]],[\"orderof\",[8500]],[\"ordf\",[170]],[\"ordm\",[186]],[\"origof\",[8886]],[\"oror\",[10838]],[\"orslope\",[10839]],[\"orv\",[10843]],[\"oS\",[9416]],[\"Oscr\",[119978]],[\"oscr\",[8500]],[\"Oslash\",[216]],[\"oslash\",[248]],[\"osol\",[8856]],[\"Otilde\",[213]],[\"otilde\",[245]],[\"otimesas\",[10806]],[\"Otimes\",[10807]],[\"otimes\",[8855]],[\"Ouml\",[214]],[\"ouml\",[246]],[\"ovbar\",[9021]],[\"OverBar\",[8254]],[\"OverBrace\",[9182]],[\"OverBracket\",[9140]],[\"OverParenthesis\",[9180]],[\"para\",[182]],[\"parallel\",[8741]],[\"par\",[8741]],[\"parsim\",[10995]],[\"parsl\",[11005]],[\"part\",[8706]],[\"PartialD\",[8706]],[\"Pcy\",[1055]],[\"pcy\",[1087]],[\"percnt\",[37]],[\"period\",[46]],[\"permil\",[8240]],[\"perp\",[8869]],[\"pertenk\",[8241]],[\"Pfr\",[120083]],[\"pfr\",[120109]],[\"Phi\",[934]],[\"phi\",[966]],[\"phiv\",[981]],[\"phmmat\",[8499]],[\"phone\",[9742]],[\"Pi\",[928]],[\"pi\",[960]],[\"pitchfork\",[8916]],[\"piv\",[982]],[\"planck\",[8463]],[\"planckh\",[8462]],[\"plankv\",[8463]],[\"plusacir\",[10787]],[\"plusb\",[8862]],[\"pluscir\",[10786]],[\"plus\",[43]],[\"plusdo\",[8724]],[\"plusdu\",[10789]],[\"pluse\",[10866]],[\"PlusMinus\",[177]],[\"plusmn\",[177]],[\"plussim\",[10790]],[\"plustwo\",[10791]],[\"pm\",[177]],[\"Poincareplane\",[8460]],[\"pointint\",[10773]],[\"popf\",[120161]],[\"Popf\",[8473]],[\"pound\",[163]],[\"prap\",[10935]],[\"Pr\",[10939]],[\"pr\",[8826]],[\"prcue\",[8828]],[\"precapprox\",[10935]],[\"prec\",[8826]],[\"preccurlyeq\",[8828]],[\"Precedes\",[8826]],[\"PrecedesEqual\",[10927]],[\"PrecedesSlantEqual\",[8828]],[\"PrecedesTilde\",[8830]],[\"preceq\",[10927]],[\"precnapprox\",[10937]],[\"precneqq\",[10933]],[\"precnsim\",[8936]],[\"pre\",[10927]],[\"prE\",[10931]],[\"precsim\",[8830]],[\"prime\",[8242]],[\"Prime\",[8243]],[\"primes\",[8473]],[\"prnap\",[10937]],[\"prnE\",[10933]],[\"prnsim\",[8936]],[\"prod\",[8719]],[\"Product\",[8719]],[\"profalar\",[9006]],[\"profline\",[8978]],[\"profsurf\",[8979]],[\"prop\",[8733]],[\"Proportional\",[8733]],[\"Proportion\",[8759]],[\"propto\",[8733]],[\"prsim\",[8830]],[\"prurel\",[8880]],[\"Pscr\",[119979]],[\"pscr\",[120005]],[\"Psi\",[936]],[\"psi\",[968]],[\"puncsp\",[8200]],[\"Qfr\",[120084]],[\"qfr\",[120110]],[\"qint\",[10764]],[\"qopf\",[120162]],[\"Qopf\",[8474]],[\"qprime\",[8279]],[\"Qscr\",[119980]],[\"qscr\",[120006]],[\"quaternions\",[8461]],[\"quatint\",[10774]],[\"quest\",[63]],[\"questeq\",[8799]],[\"quot\",[34]],[\"QUOT\",[34]],[\"rAarr\",[8667]],[\"race\",[8765,817]],[\"Racute\",[340]],[\"racute\",[341]],[\"radic\",[8730]],[\"raemptyv\",[10675]],[\"rang\",[10217]],[\"Rang\",[10219]],[\"rangd\",[10642]],[\"range\",[10661]],[\"rangle\",[10217]],[\"raquo\",[187]],[\"rarrap\",[10613]],[\"rarrb\",[8677]],[\"rarrbfs\",[10528]],[\"rarrc\",[10547]],[\"rarr\",[8594]],[\"Rarr\",[8608]],[\"rArr\",[8658]],[\"rarrfs\",[10526]],[\"rarrhk\",[8618]],[\"rarrlp\",[8620]],[\"rarrpl\",[10565]],[\"rarrsim\",[10612]],[\"Rarrtl\",[10518]],[\"rarrtl\",[8611]],[\"rarrw\",[8605]],[\"ratail\",[10522]],[\"rAtail\",[10524]],[\"ratio\",[8758]],[\"rationals\",[8474]],[\"rbarr\",[10509]],[\"rBarr\",[10511]],[\"RBarr\",[10512]],[\"rbbrk\",[10099]],[\"rbrace\",[125]],[\"rbrack\",[93]],[\"rbrke\",[10636]],[\"rbrksld\",[10638]],[\"rbrkslu\",[10640]],[\"Rcaron\",[344]],[\"rcaron\",[345]],[\"Rcedil\",[342]],[\"rcedil\",[343]],[\"rceil\",[8969]],[\"rcub\",[125]],[\"Rcy\",[1056]],[\"rcy\",[1088]],[\"rdca\",[10551]],[\"rdldhar\",[10601]],[\"rdquo\",[8221]],[\"rdquor\",[8221]],[\"CloseCurlyDoubleQuote\",[8221]],[\"rdsh\",[8627]],[\"real\",[8476]],[\"realine\",[8475]],[\"realpart\",[8476]],[\"reals\",[8477]],[\"Re\",[8476]],[\"rect\",[9645]],[\"reg\",[174]],[\"REG\",[174]],[\"ReverseElement\",[8715]],[\"ReverseEquilibrium\",[8651]],[\"ReverseUpEquilibrium\",[10607]],[\"rfisht\",[10621]],[\"rfloor\",[8971]],[\"rfr\",[120111]],[\"Rfr\",[8476]],[\"rHar\",[10596]],[\"rhard\",[8641]],[\"rharu\",[8640]],[\"rharul\",[10604]],[\"Rho\",[929]],[\"rho\",[961]],[\"rhov\",[1009]],[\"RightAngleBracket\",[10217]],[\"RightArrowBar\",[8677]],[\"rightarrow\",[8594]],[\"RightArrow\",[8594]],[\"Rightarrow\",[8658]],[\"RightArrowLeftArrow\",[8644]],[\"rightarrowtail\",[8611]],[\"RightCeiling\",[8969]],[\"RightDoubleBracket\",[10215]],[\"RightDownTeeVector\",[10589]],[\"RightDownVectorBar\",[10581]],[\"RightDownVector\",[8642]],[\"RightFloor\",[8971]],[\"rightharpoondown\",[8641]],[\"rightharpoonup\",[8640]],[\"rightleftarrows\",[8644]],[\"rightleftharpoons\",[8652]],[\"rightrightarrows\",[8649]],[\"rightsquigarrow\",[8605]],[\"RightTeeArrow\",[8614]],[\"RightTee\",[8866]],[\"RightTeeVector\",[10587]],[\"rightthreetimes\",[8908]],[\"RightTriangleBar\",[10704]],[\"RightTriangle\",[8883]],[\"RightTriangleEqual\",[8885]],[\"RightUpDownVector\",[10575]],[\"RightUpTeeVector\",[10588]],[\"RightUpVectorBar\",[10580]],[\"RightUpVector\",[8638]],[\"RightVectorBar\",[10579]],[\"RightVector\",[8640]],[\"ring\",[730]],[\"risingdotseq\",[8787]],[\"rlarr\",[8644]],[\"rlhar\",[8652]],[\"rlm\",[8207]],[\"rmoustache\",[9137]],[\"rmoust\",[9137]],[\"rnmid\",[10990]],[\"roang\",[10221]],[\"roarr\",[8702]],[\"robrk\",[10215]],[\"ropar\",[10630]],[\"ropf\",[120163]],[\"Ropf\",[8477]],[\"roplus\",[10798]],[\"rotimes\",[10805]],[\"RoundImplies\",[10608]],[\"rpar\",[41]],[\"rpargt\",[10644]],[\"rppolint\",[10770]],[\"rrarr\",[8649]],[\"Rrightarrow\",[8667]],[\"rsaquo\",[8250]],[\"rscr\",[120007]],[\"Rscr\",[8475]],[\"rsh\",[8625]],[\"Rsh\",[8625]],[\"rsqb\",[93]],[\"rsquo\",[8217]],[\"rsquor\",[8217]],[\"CloseCurlyQuote\",[8217]],[\"rthree\",[8908]],[\"rtimes\",[8906]],[\"rtri\",[9657]],[\"rtrie\",[8885]],[\"rtrif\",[9656]],[\"rtriltri\",[10702]],[\"RuleDelayed\",[10740]],[\"ruluhar\",[10600]],[\"rx\",[8478]],[\"Sacute\",[346]],[\"sacute\",[347]],[\"sbquo\",[8218]],[\"scap\",[10936]],[\"Scaron\",[352]],[\"scaron\",[353]],[\"Sc\",[10940]],[\"sc\",[8827]],[\"sccue\",[8829]],[\"sce\",[10928]],[\"scE\",[10932]],[\"Scedil\",[350]],[\"scedil\",[351]],[\"Scirc\",[348]],[\"scirc\",[349]],[\"scnap\",[10938]],[\"scnE\",[10934]],[\"scnsim\",[8937]],[\"scpolint\",[10771]],[\"scsim\",[8831]],[\"Scy\",[1057]],[\"scy\",[1089]],[\"sdotb\",[8865]],[\"sdot\",[8901]],[\"sdote\",[10854]],[\"searhk\",[10533]],[\"searr\",[8600]],[\"seArr\",[8664]],[\"searrow\",[8600]],[\"sect\",[167]],[\"semi\",[59]],[\"seswar\",[10537]],[\"setminus\",[8726]],[\"setmn\",[8726]],[\"sext\",[10038]],[\"Sfr\",[120086]],[\"sfr\",[120112]],[\"sfrown\",[8994]],[\"sharp\",[9839]],[\"SHCHcy\",[1065]],[\"shchcy\",[1097]],[\"SHcy\",[1064]],[\"shcy\",[1096]],[\"ShortDownArrow\",[8595]],[\"ShortLeftArrow\",[8592]],[\"shortmid\",[8739]],[\"shortparallel\",[8741]],[\"ShortRightArrow\",[8594]],[\"ShortUpArrow\",[8593]],[\"shy\",[173]],[\"Sigma\",[931]],[\"sigma\",[963]],[\"sigmaf\",[962]],[\"sigmav\",[962]],[\"sim\",[8764]],[\"simdot\",[10858]],[\"sime\",[8771]],[\"simeq\",[8771]],[\"simg\",[10910]],[\"simgE\",[10912]],[\"siml\",[10909]],[\"simlE\",[10911]],[\"simne\",[8774]],[\"simplus\",[10788]],[\"simrarr\",[10610]],[\"slarr\",[8592]],[\"SmallCircle\",[8728]],[\"smallsetminus\",[8726]],[\"smashp\",[10803]],[\"smeparsl\",[10724]],[\"smid\",[8739]],[\"smile\",[8995]],[\"smt\",[10922]],[\"smte\",[10924]],[\"smtes\",[10924,65024]],[\"SOFTcy\",[1068]],[\"softcy\",[1100]],[\"solbar\",[9023]],[\"solb\",[10692]],[\"sol\",[47]],[\"Sopf\",[120138]],[\"sopf\",[120164]],[\"spades\",[9824]],[\"spadesuit\",[9824]],[\"spar\",[8741]],[\"sqcap\",[8851]],[\"sqcaps\",[8851,65024]],[\"sqcup\",[8852]],[\"sqcups\",[8852,65024]],[\"Sqrt\",[8730]],[\"sqsub\",[8847]],[\"sqsube\",[8849]],[\"sqsubset\",[8847]],[\"sqsubseteq\",[8849]],[\"sqsup\",[8848]],[\"sqsupe\",[8850]],[\"sqsupset\",[8848]],[\"sqsupseteq\",[8850]],[\"square\",[9633]],[\"Square\",[9633]],[\"SquareIntersection\",[8851]],[\"SquareSubset\",[8847]],[\"SquareSubsetEqual\",[8849]],[\"SquareSuperset\",[8848]],[\"SquareSupersetEqual\",[8850]],[\"SquareUnion\",[8852]],[\"squarf\",[9642]],[\"squ\",[9633]],[\"squf\",[9642]],[\"srarr\",[8594]],[\"Sscr\",[119982]],[\"sscr\",[120008]],[\"ssetmn\",[8726]],[\"ssmile\",[8995]],[\"sstarf\",[8902]],[\"Star\",[8902]],[\"star\",[9734]],[\"starf\",[9733]],[\"straightepsilon\",[1013]],[\"straightphi\",[981]],[\"strns\",[175]],[\"sub\",[8834]],[\"Sub\",[8912]],[\"subdot\",[10941]],[\"subE\",[10949]],[\"sube\",[8838]],[\"subedot\",[10947]],[\"submult\",[10945]],[\"subnE\",[10955]],[\"subne\",[8842]],[\"subplus\",[10943]],[\"subrarr\",[10617]],[\"subset\",[8834]],[\"Subset\",[8912]],[\"subseteq\",[8838]],[\"subseteqq\",[10949]],[\"SubsetEqual\",[8838]],[\"subsetneq\",[8842]],[\"subsetneqq\",[10955]],[\"subsim\",[10951]],[\"subsub\",[10965]],[\"subsup\",[10963]],[\"succapprox\",[10936]],[\"succ\",[8827]],[\"succcurlyeq\",[8829]],[\"Succeeds\",[8827]],[\"SucceedsEqual\",[10928]],[\"SucceedsSlantEqual\",[8829]],[\"SucceedsTilde\",[8831]],[\"succeq\",[10928]],[\"succnapprox\",[10938]],[\"succneqq\",[10934]],[\"succnsim\",[8937]],[\"succsim\",[8831]],[\"SuchThat\",[8715]],[\"sum\",[8721]],[\"Sum\",[8721]],[\"sung\",[9834]],[\"sup1\",[185]],[\"sup2\",[178]],[\"sup3\",[179]],[\"sup\",[8835]],[\"Sup\",[8913]],[\"supdot\",[10942]],[\"supdsub\",[10968]],[\"supE\",[10950]],[\"supe\",[8839]],[\"supedot\",[10948]],[\"Superset\",[8835]],[\"SupersetEqual\",[8839]],[\"suphsol\",[10185]],[\"suphsub\",[10967]],[\"suplarr\",[10619]],[\"supmult\",[10946]],[\"supnE\",[10956]],[\"supne\",[8843]],[\"supplus\",[10944]],[\"supset\",[8835]],[\"Supset\",[8913]],[\"supseteq\",[8839]],[\"supseteqq\",[10950]],[\"supsetneq\",[8843]],[\"supsetneqq\",[10956]],[\"supsim\",[10952]],[\"supsub\",[10964]],[\"supsup\",[10966]],[\"swarhk\",[10534]],[\"swarr\",[8601]],[\"swArr\",[8665]],[\"swarrow\",[8601]],[\"swnwar\",[10538]],[\"szlig\",[223]],[\"Tab\",[9]],[\"target\",[8982]],[\"Tau\",[932]],[\"tau\",[964]],[\"tbrk\",[9140]],[\"Tcaron\",[356]],[\"tcaron\",[357]],[\"Tcedil\",[354]],[\"tcedil\",[355]],[\"Tcy\",[1058]],[\"tcy\",[1090]],[\"tdot\",[8411]],[\"telrec\",[8981]],[\"Tfr\",[120087]],[\"tfr\",[120113]],[\"there4\",[8756]],[\"therefore\",[8756]],[\"Therefore\",[8756]],[\"Theta\",[920]],[\"theta\",[952]],[\"thetasym\",[977]],[\"thetav\",[977]],[\"thickapprox\",[8776]],[\"thicksim\",[8764]],[\"ThickSpace\",[8287,8202]],[\"ThinSpace\",[8201]],[\"thinsp\",[8201]],[\"thkap\",[8776]],[\"thksim\",[8764]],[\"THORN\",[222]],[\"thorn\",[254]],[\"tilde\",[732]],[\"Tilde\",[8764]],[\"TildeEqual\",[8771]],[\"TildeFullEqual\",[8773]],[\"TildeTilde\",[8776]],[\"timesbar\",[10801]],[\"timesb\",[8864]],[\"times\",[215]],[\"timesd\",[10800]],[\"tint\",[8749]],[\"toea\",[10536]],[\"topbot\",[9014]],[\"topcir\",[10993]],[\"top\",[8868]],[\"Topf\",[120139]],[\"topf\",[120165]],[\"topfork\",[10970]],[\"tosa\",[10537]],[\"tprime\",[8244]],[\"trade\",[8482]],[\"TRADE\",[8482]],[\"triangle\",[9653]],[\"triangledown\",[9663]],[\"triangleleft\",[9667]],[\"trianglelefteq\",[8884]],[\"triangleq\",[8796]],[\"triangleright\",[9657]],[\"trianglerighteq\",[8885]],[\"tridot\",[9708]],[\"trie\",[8796]],[\"triminus\",[10810]],[\"TripleDot\",[8411]],[\"triplus\",[10809]],[\"trisb\",[10701]],[\"tritime\",[10811]],[\"trpezium\",[9186]],[\"Tscr\",[119983]],[\"tscr\",[120009]],[\"TScy\",[1062]],[\"tscy\",[1094]],[\"TSHcy\",[1035]],[\"tshcy\",[1115]],[\"Tstrok\",[358]],[\"tstrok\",[359]],[\"twixt\",[8812]],[\"twoheadleftarrow\",[8606]],[\"twoheadrightarrow\",[8608]],[\"Uacute\",[218]],[\"uacute\",[250]],[\"uarr\",[8593]],[\"Uarr\",[8607]],[\"uArr\",[8657]],[\"Uarrocir\",[10569]],[\"Ubrcy\",[1038]],[\"ubrcy\",[1118]],[\"Ubreve\",[364]],[\"ubreve\",[365]],[\"Ucirc\",[219]],[\"ucirc\",[251]],[\"Ucy\",[1059]],[\"ucy\",[1091]],[\"udarr\",[8645]],[\"Udblac\",[368]],[\"udblac\",[369]],[\"udhar\",[10606]],[\"ufisht\",[10622]],[\"Ufr\",[120088]],[\"ufr\",[120114]],[\"Ugrave\",[217]],[\"ugrave\",[249]],[\"uHar\",[10595]],[\"uharl\",[8639]],[\"uharr\",[8638]],[\"uhblk\",[9600]],[\"ulcorn\",[8988]],[\"ulcorner\",[8988]],[\"ulcrop\",[8975]],[\"ultri\",[9720]],[\"Umacr\",[362]],[\"umacr\",[363]],[\"uml\",[168]],[\"UnderBar\",[95]],[\"UnderBrace\",[9183]],[\"UnderBracket\",[9141]],[\"UnderParenthesis\",[9181]],[\"Union\",[8899]],[\"UnionPlus\",[8846]],[\"Uogon\",[370]],[\"uogon\",[371]],[\"Uopf\",[120140]],[\"uopf\",[120166]],[\"UpArrowBar\",[10514]],[\"uparrow\",[8593]],[\"UpArrow\",[8593]],[\"Uparrow\",[8657]],[\"UpArrowDownArrow\",[8645]],[\"updownarrow\",[8597]],[\"UpDownArrow\",[8597]],[\"Updownarrow\",[8661]],[\"UpEquilibrium\",[10606]],[\"upharpoonleft\",[8639]],[\"upharpoonright\",[8638]],[\"uplus\",[8846]],[\"UpperLeftArrow\",[8598]],[\"UpperRightArrow\",[8599]],[\"upsi\",[965]],[\"Upsi\",[978]],[\"upsih\",[978]],[\"Upsilon\",[933]],[\"upsilon\",[965]],[\"UpTeeArrow\",[8613]],[\"UpTee\",[8869]],[\"upuparrows\",[8648]],[\"urcorn\",[8989]],[\"urcorner\",[8989]],[\"urcrop\",[8974]],[\"Uring\",[366]],[\"uring\",[367]],[\"urtri\",[9721]],[\"Uscr\",[119984]],[\"uscr\",[120010]],[\"utdot\",[8944]],[\"Utilde\",[360]],[\"utilde\",[361]],[\"utri\",[9653]],[\"utrif\",[9652]],[\"uuarr\",[8648]],[\"Uuml\",[220]],[\"uuml\",[252]],[\"uwangle\",[10663]],[\"vangrt\",[10652]],[\"varepsilon\",[1013]],[\"varkappa\",[1008]],[\"varnothing\",[8709]],[\"varphi\",[981]],[\"varpi\",[982]],[\"varpropto\",[8733]],[\"varr\",[8597]],[\"vArr\",[8661]],[\"varrho\",[1009]],[\"varsigma\",[962]],[\"varsubsetneq\",[8842,65024]],[\"varsubsetneqq\",[10955,65024]],[\"varsupsetneq\",[8843,65024]],[\"varsupsetneqq\",[10956,65024]],[\"vartheta\",[977]],[\"vartriangleleft\",[8882]],[\"vartriangleright\",[8883]],[\"vBar\",[10984]],[\"Vbar\",[10987]],[\"vBarv\",[10985]],[\"Vcy\",[1042]],[\"vcy\",[1074]],[\"vdash\",[8866]],[\"vDash\",[8872]],[\"Vdash\",[8873]],[\"VDash\",[8875]],[\"Vdashl\",[10982]],[\"veebar\",[8891]],[\"vee\",[8744]],[\"Vee\",[8897]],[\"veeeq\",[8794]],[\"vellip\",[8942]],[\"verbar\",[124]],[\"Verbar\",[8214]],[\"vert\",[124]],[\"Vert\",[8214]],[\"VerticalBar\",[8739]],[\"VerticalLine\",[124]],[\"VerticalSeparator\",[10072]],[\"VerticalTilde\",[8768]],[\"VeryThinSpace\",[8202]],[\"Vfr\",[120089]],[\"vfr\",[120115]],[\"vltri\",[8882]],[\"vnsub\",[8834,8402]],[\"vnsup\",[8835,8402]],[\"Vopf\",[120141]],[\"vopf\",[120167]],[\"vprop\",[8733]],[\"vrtri\",[8883]],[\"Vscr\",[119985]],[\"vscr\",[120011]],[\"vsubnE\",[10955,65024]],[\"vsubne\",[8842,65024]],[\"vsupnE\",[10956,65024]],[\"vsupne\",[8843,65024]],[\"Vvdash\",[8874]],[\"vzigzag\",[10650]],[\"Wcirc\",[372]],[\"wcirc\",[373]],[\"wedbar\",[10847]],[\"wedge\",[8743]],[\"Wedge\",[8896]],[\"wedgeq\",[8793]],[\"weierp\",[8472]],[\"Wfr\",[120090]],[\"wfr\",[120116]],[\"Wopf\",[120142]],[\"wopf\",[120168]],[\"wp\",[8472]],[\"wr\",[8768]],[\"wreath\",[8768]],[\"Wscr\",[119986]],[\"wscr\",[120012]],[\"xcap\",[8898]],[\"xcirc\",[9711]],[\"xcup\",[8899]],[\"xdtri\",[9661]],[\"Xfr\",[120091]],[\"xfr\",[120117]],[\"xharr\",[10231]],[\"xhArr\",[10234]],[\"Xi\",[926]],[\"xi\",[958]],[\"xlarr\",[10229]],[\"xlArr\",[10232]],[\"xmap\",[10236]],[\"xnis\",[8955]],[\"xodot\",[10752]],[\"Xopf\",[120143]],[\"xopf\",[120169]],[\"xoplus\",[10753]],[\"xotime\",[10754]],[\"xrarr\",[10230]],[\"xrArr\",[10233]],[\"Xscr\",[119987]],[\"xscr\",[120013]],[\"xsqcup\",[10758]],[\"xuplus\",[10756]],[\"xutri\",[9651]],[\"xvee\",[8897]],[\"xwedge\",[8896]],[\"Yacute\",[221]],[\"yacute\",[253]],[\"YAcy\",[1071]],[\"yacy\",[1103]],[\"Ycirc\",[374]],[\"ycirc\",[375]],[\"Ycy\",[1067]],[\"ycy\",[1099]],[\"yen\",[165]],[\"Yfr\",[120092]],[\"yfr\",[120118]],[\"YIcy\",[1031]],[\"yicy\",[1111]],[\"Yopf\",[120144]],[\"yopf\",[120170]],[\"Yscr\",[119988]],[\"yscr\",[120014]],[\"YUcy\",[1070]],[\"yucy\",[1102]],[\"yuml\",[255]],[\"Yuml\",[376]],[\"Zacute\",[377]],[\"zacute\",[378]],[\"Zcaron\",[381]],[\"zcaron\",[382]],[\"Zcy\",[1047]],[\"zcy\",[1079]],[\"Zdot\",[379]],[\"zdot\",[380]],[\"zeetrf\",[8488]],[\"ZeroWidthSpace\",[8203]],[\"Zeta\",[918]],[\"zeta\",[950]],[\"zfr\",[120119]],[\"Zfr\",[8488]],[\"ZHcy\",[1046]],[\"zhcy\",[1078]],[\"zigrarr\",[8669]],[\"zopf\",[120171]],[\"Zopf\",[8484]],[\"Zscr\",[119989]],[\"zscr\",[120015]],[\"zwj\",[8205]],[\"zwnj\",[8204]]],u={},o={};!function(e,t){for(var n=r.length,u=[];n--;){var o,a=r[n],i=a[0],l=a[1],s=l[0],c=s<32||s>126||62===s||60===s||38===s||34===s||39===s;if(c&&(o=t[s]=t[s]||{}),l[1]){var p=l[1];e[i]=String.fromCharCode(s)+String.fromCharCode(p),u.push(c&&(o[p]=i))}else e[i]=String.fromCharCode(s),u.push(c&&(o[\"\"]=i))}}(u,o),n.prototype.decode=function(e){return e&&e.length?e.replace(/&(#?[\\w\\d]+);?/g,function(e,t){var n;if(\"#\"===t.charAt(0)){var r=\"x\"===t.charAt(1)?parseInt(t.substr(2).toLowerCase(),16):parseInt(t.substr(1));isNaN(r)||r<-32768||r>65535||(n=String.fromCharCode(r))}else n=u[t];return n||e}):\"\"},n.decode=function(e){return(new n).decode(e)},n.prototype.encode=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=o[e.charCodeAt(r)];if(u){var a=u[e.charCodeAt(r+1)];if(a?r++:a=u[\"\"],a){n+=\"&\"+a+\";\",r++;continue}}n+=e.charAt(r),r++}return n},n.encode=function(e){return(new n).encode(e)},n.prototype.encodeNonUTF=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r),a=o[u];if(a){var i=a[e.charCodeAt(r+1)];if(i?r++:i=a[\"\"],i){n+=\"&\"+i+\";\",r++;continue}}n+=u<32||u>126?\"&#\"+u+\";\":e.charAt(r),r++}return n},n.encodeNonUTF=function(e){return(new n).encodeNonUTF(e)},n.prototype.encodeNonASCII=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r);u<=255?n+=e[r++]:(n+=\"&#\"+u+\";\",r++)}return n},n.encodeNonASCII=function(e){return(new n).encodeNonASCII(e)},e.exports=n},function(e,t,n){\"use strict\";function r(e,t){e.setAttribute(\"style\",\"\");for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}n.d(t,\"a\",function(){return r})},function(e,t){!function(){\"use strict\";function t(e){return 48<=e&&e<=57}function n(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function r(e){return e>=48&&e<=55}function u(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&d.indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}function i(e){return e<128?D[e]:f.NonAsciiIdentifierStart.test(a(e))}function l(e){return e<128?h[e]:f.NonAsciiIdentifierPart.test(a(e))}function s(e){return e<128?D[e]:p.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?h[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,f,d,D,h,g;for(f={NonAsciiIdentifierStart:/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,NonAsciiIdentifierPart:/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/},p={NonAsciiIdentifierStart:/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF30-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF5D-\\uDF61]|\\uD805[\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDEC0-\\uDEF8]|\\uD808[\\uDC00-\\uDF98]|\\uD809[\\uDC00-\\uDC6E]|[\\uD80C\\uD840-\\uD868\\uD86A-\\uD86C][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D]|\\uD87E[\\uDC00-\\uDE1D]/,NonAsciiIdentifierPart:/[\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF30-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDD0-\\uDDDA\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF01-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3C-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB7\\uDEC0-\\uDEC9]|\\uD806[\\uDCA0-\\uDCE9\\uDCFF\\uDEC0-\\uDEF8]|\\uD808[\\uDC00-\\uDF98]|\\uD809[\\uDC00-\\uDC6E]|[\\uD80C\\uD840-\\uD868\\uD86A-\\uD86C][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/},d=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],D=new Array(128),g=0;g<128;++g)D[g]=g>=97&&g<=122||g>=65&&g<=90||36===g||95===g;for(h=new Array(128),g=0;g<128;++g)h[g]=g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||36===g||95===g;e.exports={isDecimalDigit:t,isHexDigit:n,isOctalDigit:r,isWhiteSpace:u,isLineTerminator:o,isIdentifierStartES5:i,isIdentifierPartES5:l,isIdentifierStartES6:s,isIdentifierPartES6:c}}()},function(e,t){function n(){throw new Error(\"setTimeout has not been defined\")}function r(){throw new Error(\"clearTimeout has not been defined\")}function u(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){h&&d&&(h=!1,d.length?D=d.concat(D):g=-1,D.length&&i())}function i(){if(!h){var e=u(a);h=!0;for(var t=D.length;t;){for(d=D,D=[];++g<t;)d&&d[g].run();g=-1,t=D.length}d=null,h=!1,o(e)}}function l(e,t){this.fun=e,this.array=t}function s(){}var c,p,f=e.exports={};!function(){try{c=\"function\"===typeof setTimeout?setTimeout:n}catch(e){c=n}try{p=\"function\"===typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,D=[],h=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];D.push(new l(e,t)),1!==D.length||h||u(i)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title=\"browser\",f.browser=!0,f.env={},f.argv=[],f.version=\"\",f.versions={},f.on=s,f.addListener=s,f.once=s,f.off=s,f.removeListener=s,f.removeAllListeners=s,f.emit=s,f.prependListener=s,f.prependOnceListener=s,f.listeners=function(e){return[]},f.binding=function(e){throw new Error(\"process.binding is not supported\")},f.cwd=function(){return\"/\"},f.chdir=function(e){throw new Error(\"process.chdir is not supported\")},f.umask=function(){return 0}},function(e,t,n){\"use strict\";e.exports=function(){return/[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},function(e,t,n){\"use strict\";function r(e){var t=e.currentBuildError,n=e.currentRuntimeErrorRecords,r=e.dismissRuntimeErrors,u=e.editorHandler;return t?a.a.createElement(s.a,{error:t,editorHandler:u}):n.length>0?a.a.createElement(c.a,{errorRecords:n,close:r,editorHandler:u}):null}Object.defineProperty(t,\"__esModule\",{value:!0});var u=n(19),o=(n.n(u),n(0)),a=n.n(o),i=n(25),l=n.n(i),s=n(35),c=n(40),p=n(1),f=n(14),d=null;window.updateContent=function(e){var t=r(e);return null===t?(l.a.unmountComponentAtNode(d),!1):(l.a.render(t,d),!0)},document.body.style.margin=\"0\",document.body.style[\"max-width\"]=\"100vw\",d=document.createElement(\"div\"),Object(f.a)(d,p.c),document.body.appendChild(d),window.parent.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady()},function(e,t,n){\"undefined\"===typeof Promise&&(n(20).enable(),window.Promise=n(23)),Object.assign=n(2)},function(e,t,n){\"use strict\";function r(){s=!1,i._47=null,i._71=null}function u(e){function t(t){(e.allRejections||a(p[t].error,e.whitelist||l))&&(p[t].displayId=c++,e.onUnhandled?(p[t].logged=!0,e.onUnhandled(p[t].displayId,p[t].error)):(p[t].logged=!0,o(p[t].displayId,p[t].error)))}function n(t){p[t].logged&&(e.onHandled?e.onHandled(p[t].displayId,p[t].error):p[t].onUnhandled||(console.warn(\"Promise Rejection Handled (id: \"+p[t].displayId+\"):\"),console.warn(' This means you can ignore any previous messages of the form \"Possible Unhandled Promise Rejection\" with id '+p[t].displayId+\".\")))}e=e||{},s&&r(),s=!0;var u=0,c=0,p={};i._47=function(e){2===e._83&&p[e._56]&&(p[e._56].logged?n(e._56):clearTimeout(p[e._56].timeout),delete p[e._56])},i._71=function(e,n){0===e._75&&(e._56=u++,p[e._56]={displayId:null,error:n,timeout:setTimeout(t.bind(null,e._56),a(n,l)?100:2e3),logged:!1})}}function o(e,t){console.warn(\"Possible Unhandled Promise Rejection (id: \"+e+\"):\"),((t&&(t.stack||t))+\"\").split(\"\\n\").forEach(function(e){console.warn(\" \"+e)})}function a(e,t){return t.some(function(t){return e instanceof t})}var i=n(4),l=[ReferenceError,TypeError,RangeError],s=!1;t.disable=r,t.enable=u},function(e,t,n){\"use strict\";(function(t){function n(e){a.length||(o(),i=!0),a[a.length]=e}function r(){for(;l<a.length;){var e=l;if(l+=1,a[e].call(),l>s){for(var t=0,n=a.length-l;t<n;t++)a[t]=a[t+l];a.length-=l,l=0}}a.length=0,l=0,i=!1}function u(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var o,a=[],i=!1,l=0,s=1024,c=\"undefined\"!==typeof t?t:self,p=c.MutationObserver||c.WebKitMutationObserver;o=\"function\"===typeof p?function(e){var t=1,n=new p(e),r=document.createTextNode(\"\");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(r):u(r),n.requestFlush=o,n.makeRequestCallFromTimer=u}).call(t,n(22))},function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"===typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";function r(e){var t=new u(u._44);return t._83=1,t._18=e,t}var u=n(4);e.exports=u;var o=r(!0),a=r(!1),i=r(null),l=r(void 0),s=r(0),c=r(\"\");u.resolve=function(e){if(e instanceof u)return e;if(null===e)return i;if(void 0===e)return l;if(!0===e)return o;if(!1===e)return a;if(0===e)return s;if(\"\"===e)return c;if(\"object\"===typeof e||\"function\"===typeof e)try{var t=e.then;if(\"function\"===typeof t)return new u(t.bind(e))}catch(e){return new u(function(t,n){n(e)})}return r(e)},u.all=function(e){var t=Array.prototype.slice.call(e);return new u(function(e,n){function r(a,i){if(i&&(\"object\"===typeof i||\"function\"===typeof i)){if(i instanceof u&&i.then===u.prototype.then){for(;3===i._83;)i=i._18;return 1===i._83?r(a,i._18):(2===i._83&&n(i._18),void i.then(function(e){r(a,e)},n))}var l=i.then;if(\"function\"===typeof l){return void new u(l.bind(i)).then(function(e){r(a,e)},n)}}t[a]=i,0===--o&&e(t)}if(0===t.length)return e([]);for(var o=t.length,a=0;a<t.length;a++)r(a,t[a])})},u.reject=function(e){return new u(function(t,n){n(e)})},u.race=function(e){return new u(function(t,n){e.forEach(function(e){u.resolve(e).then(t,n)})})},u.prototype.catch=function(e){return this.then(null,e)}},function(e,t,n){\"use strict\";function r(e){for(var t=arguments.length-1,n=\"Minified React error #\"+e+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=\"+e,r=0;r<t;r++)n+=\"&args[]=\"+encodeURIComponent(arguments[r+1]);throw t=Error(n+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"),t.name=\"Invariant Violation\",t.framesToPop=1,t}function u(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||A}function o(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||A}function a(){}function i(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||A}function l(e,t,n,r,u,o,a){return{$$typeof:w,type:e,key:t,ref:n,props:a,_owner:o}}function s(e){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+e).replace(/[=:]/g,function(e){return t[e]})}function c(e,t,n,r){if(P.length){var u=P.pop();return u.result=e,u.keyPrefix=t,u.func=n,u.context=r,u.count=0,u}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function f(e,t,n,u){var o=typeof e;if(\"undefined\"!==o&&\"boolean\"!==o||(e=null),null===e||\"string\"===o||\"number\"===o||\"object\"===o&&e.$$typeof===T)return n(u,e,\"\"===t?\".\"+d(e,0):t),1;var a=0;if(t=\"\"===t?\".\":t+\":\",Array.isArray(e))for(var i=0;i<e.length;i++){o=e[i];var l=t+d(o,i);a+=f(o,l,n,u)}else if(\"function\"===typeof(l=x&&e[x]||e[\"@@iterator\"]))for(e=l.call(e),i=0;!(o=e.next()).done;)o=o.value,l=t+d(o,i++),a+=f(o,l,n,u);else\"object\"===o&&(n=\"\"+e,r(\"31\",\"[object Object]\"===n?\"object with keys {\"+Object.keys(e).join(\", \")+\"}\":n,\"\"));return a}function d(e,t){return\"object\"===typeof e&&null!==e&&null!=e.key?s(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function h(e,t,n){var r=e.result,u=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,r,n,E.thatReturnsArgument):null!=e&&(l.isValidElement(e)&&(e=l.cloneAndReplaceKey(e,u+(!e.key||t&&t.key===e.key?\"\":(\"\"+e.key).replace(S,\"$&/\")+\"/\")+n)),r.push(e))}function g(e,t,n,r,u){var o=\"\";null!=n&&(o=(\"\"+n).replace(S,\"$&/\")+\"/\"),t=c(t,o,r,u),null==e||f(e,\"\",h,t),p(t)}var m=n(2),C=n(5);n(6);var E=n(3),A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};u.prototype.isReactComponent={},u.prototype.setState=function(e,t){\"object\"!==typeof e&&\"function\"!==typeof e&&null!=e&&r(\"85\"),this.updater.enqueueSetState(this,e,t,\"setState\")},u.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\"forceUpdate\")},a.prototype=u.prototype;var F=o.prototype=new a;F.constructor=o,m(F,u.prototype),F.isPureReactComponent=!0;var b=i.prototype=new a;b.constructor=i,m(b,u.prototype),b.unstable_isAsyncReactComponent=!0,b.render=function(){return this.props.children};var y={Component:u,PureComponent:o,AsyncComponent:i},v={current:null},B=Object.prototype.hasOwnProperty,w=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,k={key:!0,ref:!0,__self:!0,__source:!0};l.createElement=function(e,t,n){var r,u={},o=null,a=null,i=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=\"\"+t.key),i=void 0===t.__self?null:t.__self,s=void 0===t.__source?null:t.__source,t)B.call(t,r)&&!k.hasOwnProperty(r)&&(u[r]=t[r]);var c=arguments.length-2;if(1===c)u.children=n;else if(1<c){for(var p=Array(c),f=0;f<c;f++)p[f]=arguments[f+2];u.children=p}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===u[r]&&(u[r]=c[r]);return l(e,o,a,i,s,v.current,u)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceKey=function(e,t){return l(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},l.cloneElement=function(e,t,n){var r=m({},e.props),u=e.key,o=e.ref,a=e._self,i=e._source,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=v.current),void 0!==t.key&&(u=\"\"+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(p in t)B.call(t,p)&&!k.hasOwnProperty(p)&&(r[p]=void 0===t[p]&&void 0!==c?c[p]:t[p])}var p=arguments.length-2;if(1===p)r.children=n;else if(1<p){c=Array(p);for(var f=0;f<p;f++)c[f]=arguments[f+2];r.children=c}return l(e.type,u,o,a,i,s,r)},l.isValidElement=function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===w};var x=\"function\"===typeof Symbol&&Symbol.iterator,T=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,S=/\\/+/g,P=[],N={forEach:function(e,t,n){if(null==e)return e;t=c(null,null,t,n),null==e||f(e,\"\",D,t),p(t)},map:function(e,t,n){if(null==e)return e;var r=[];return g(e,r,null,t,n),r},count:function(e){return null==e?0:f(e,\"\",E.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,E.thatReturnsArgument),t}};e.exports={Children:{map:N.map,forEach:N.forEach,count:N.count,toArray:N.toArray,only:function(e){return l.isValidElement(e)||r(\"143\"),e}},Component:y.Component,PureComponent:y.PureComponent,unstable_AsyncComponent:y.AsyncComponent,createElement:l.createElement,cloneElement:l.cloneElement,isValidElement:l.isValidElement,createFactory:l.createFactory,version:\"16.0.0\",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:v,assign:m}}},function(e,t,n){\"use strict\";function r(){if(\"undefined\"!==typeof{}&&\"function\"===typeof{}.checkDCE)try{({}).checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(26)},function(e,t,n){\"use strict\";function r(e){for(var t=arguments.length-1,n=\"Minified React error #\"+e+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=\"+e,r=0;r<t;r++)n+=\"&args[]=\"+encodeURIComponent(arguments[r+1]);throw t=Error(n+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"),t.name=\"Invariant Violation\",t.framesToPop=1,t}function u(e){switch(e){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function o(){if(xt)for(var e in Tt){var t=Tt[e],n=xt.indexOf(e);if(-1<n||r(\"96\",e),!St.plugins[n]){t.extractEvents||r(\"97\",e),St.plugins[n]=t,n=t.eventTypes;for(var u in n){var o=void 0,i=n[u],l=t,s=u;St.eventNameDispatchConfigs.hasOwnProperty(s)&&r(\"99\",s),St.eventNameDispatchConfigs[s]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&a(c[o],l,s);o=!0}else i.registrationName?(a(i.registrationName,l,s),o=!0):o=!1;o||r(\"98\",u,e)}}}}function a(e,t,n){St.registrationNameModules[e]&&r(\"100\",e),St.registrationNameModules[e]=t,St.registrationNameDependencies[e]=t.eventTypes[n].dependencies}function i(e,t){return(e&t)===t}function l(e){for(var t;t=e._renderedComponent;)e=t;return e}function s(e,t){e=l(e),e._hostNode=t,t[zt]=e}function c(e,t){if(!(e._flags&Vt.hasCachedChildNodes)){var n=e._renderedChildren;t=t.firstChild;var u;e:for(u in n)if(n.hasOwnProperty(u)){var o=n[u],a=l(o)._domID;if(0!==a){for(;null!==t;t=t.nextSibling){var i=t,c=a;if(i.nodeType===Ht&&i.getAttribute(jt)===\"\"+c||i.nodeType===qt&&i.nodeValue===\" react-text: \"+c+\" \"||i.nodeType===qt&&i.nodeValue===\" react-empty: \"+c+\" \"){s(o,t);continue e}}r(\"32\",a)}}e._flags|=Vt.hasCachedChildNodes}}function p(e){if(e[zt])return e[zt];for(var t=[];!e[zt];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=e[zt];if(n.tag===Ut||n.tag===Mt)return n;for(;e&&(n=e[zt]);e=t.pop()){var r=n;t.length&&c(n,e)}return r}function f(e){if(\"function\"===typeof e.getName)return e.getName();if(\"number\"===typeof e.tag){if(\"string\"===typeof(e=e.type))return e;if(\"function\"===typeof e)return e.displayName||e.name}return null}function d(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if((t.effectTag&nn)!==tn)return 1;for(;t.return;)if(t=t.return,(t.effectTag&nn)!==tn)return 1}return t.tag===Jt?2:3}function D(e){2!==d(e)&&r(\"188\")}function h(e){var t=e.alternate;if(!t)return t=d(e),3===t&&r(\"188\"),1===t?null:e;for(var n=e,u=t;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var i=o.child;i;){if(i===n)return D(o),e;if(i===u)return D(o),t;i=i.sibling}r(\"188\")}if(n.return!==u.return)n=o,u=a;else{i=!1;for(var l=o.child;l;){if(l===n){i=!0,n=o,u=a;break}if(l===u){i=!0,u=o,n=a;break}l=l.sibling}if(!i){for(l=a.child;l;){if(l===n){i=!0,n=a,u=o;break}if(l===u){i=!0,u=a,n=o;break}l=l.sibling}i||r(\"189\")}}n.alternate!==u&&r(\"190\")}return n.tag!==Jt&&r(\"188\"),n.stateNode.current===n?e:t}function g(e,t,n,r,u,o,a,i,l){un._hasCaughtError=!1,un._caughtError=null;var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){un._caughtError=e,un._hasCaughtError=!0}}function m(){if(un._hasRethrowError){var e=un._rethrowError;throw un._rethrowError=null,un._hasRethrowError=!1,e}}function C(e,t,n,r){t=e.type||\"unknown-event\",e.currentTarget=an.getNodeFromInstance(r),on.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function E(e){if(e=ln.getInstanceFromNode(e))if(\"number\"===typeof e.tag){sn&&\"function\"===typeof sn.restoreControlledState||r(\"194\");var t=ln.getFiberCurrentPropsFromNode(e.stateNode);sn.restoreControlledState(e.stateNode,e.type,t)}else\"function\"!==typeof e.restoreControlledState&&r(\"195\"),e.restoreControlledState()}function A(e,t,n,r,u,o){return e(t,n,r,u,o)}function F(e,t){return e(t)}function b(e,t){return F(e,t)}function y(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===hn?e.parentNode:e}function v(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n=t;if(\"number\"===typeof n.tag){for(;n.return;)n=n.return;n=n.tag!==gn?null:n.stateNode.containerInfo}else{for(;n._hostParent;)n=n._hostParent;n=Gt.getNodeFromInstance(n).parentNode}if(!n)break;e.ancestors.push(t),t=Gt.getClosestInstanceFromNode(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],Cn._handleTopLevel(e.topLevelType,t,e.nativeEvent,y(e.nativeEvent))}function B(e,t){return null==t&&r(\"30\"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function w(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function k(e,t){e&&(ln.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))}function x(e){return k(e,!0)}function T(e){return k(e,!1)}function S(e,t,n){switch(e){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":return!(!n.disabled||\"button\"!==t&&\"input\"!==t&&\"select\"!==t&&\"textarea\"!==t);default:return!1}}function P(e,t){if(!gt.canUseDOM||t&&!(\"addEventListener\"in document))return!1;t=\"on\"+e;var n=t in document;return n||(n=document.createElement(\"div\"),n.setAttribute(t,\"return;\"),n=\"function\"===typeof n[t]),!n&&wt&&\"wheel\"===e&&(n=document.implementation.hasFeature(\"Events.wheel\",\"3.0\")),n}function N(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[\"Webkit\"+e]=\"webkit\"+t,n[\"Moz\"+e]=\"moz\"+t,n[\"ms\"+e]=\"MS\"+t,n[\"O\"+e]=\"o\"+t.toLowerCase(),n}function _(e){if(yn[e])return yn[e];if(!bn[e])return e;var t,n=bn[e];for(t in n)if(n.hasOwnProperty(t)&&t in vn)return yn[e]=n[t];return\"\"}function O(e){return Object.prototype.hasOwnProperty.call(e,xn)||(e[xn]=kn++,wn[e[xn]]={}),wn[e[xn]]}function I(e){return!!Hn.hasOwnProperty(e)||!Mn.hasOwnProperty(e)&&(Un.test(e)?Hn[e]=!0:(Mn[e]=!0,!1))}function R(){return null}function L(e){var t=\"\";return ht.Children.forEach(e,function(e){null==e||\"string\"!==typeof e&&\"number\"!==typeof e||(t+=e)}),t}function U(e,t,n){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t[\"$\"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty(\"$\"+e[n].value),e[n].selected!==r&&(e[n].selected=r)}else{for(n=\"\"+n,t=null,r=0;r<e.length;r++){if(e[r].value===n)return void(e[r].selected=!0);null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function M(e,t){t&&(Jn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r(\"137\",e,\"\"),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r(\"60\"),\"object\"===typeof t.dangerouslySetInnerHTML&&\"__html\"in t.dangerouslySetInnerHTML||r(\"61\")),null!=t.style&&\"object\"!==typeof t.style&&r(\"62\",\"\"))}function H(e){var t=e.type;return(e=e.nodeName)&&\"input\"===e.toLowerCase()&&(\"checkbox\"===t||\"radio\"===t)}function q(e){var t=H(e)?\"checked\":\"value\",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=\"\"+e[t];if(!e.hasOwnProperty(t)&&\"function\"===typeof n.get&&\"function\"===typeof n.set)return Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=\"\"+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=\"\"+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function j(e,t){if(-1===e.indexOf(\"-\"))return\"string\"===typeof t.is;switch(e){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}function V(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===rr)return void(n.nodeValue=t)}e.textContent=t}function W(e,t){ir(t,e.nodeType===or||e.nodeType===ar?e:e.ownerDocument)}function z(e,t){return e!==Nr&&e!==Pr||t!==Nr&&t!==Pr?e===Sr&&t!==Sr?-255:e!==Sr&&t===Sr?255:e-t:0}function K(){return{first:null,last:null,hasForceUpdate:!1,callbackList:null}}function G(e,t,n,r){null!==n?n.next=t:(t.next=e.first,e.first=t),null!==r?t.next=r:e.last=t}function Y(e,t){t=t.priorityLevel;var n=null;if(null!==e.last&&0>=z(e.last.priorityLevel,t))n=e.last;else for(e=e.first;null!==e&&0>=z(e.priorityLevel,t);)n=e,e=e.next;return n}function $(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=K()),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=K()):e=null,Ir=r,Rr=e!==r?e:null;var u=Ir;n=Rr;var o=Y(u,t),a=null!==o?o.next:u.first;return null===n?(G(u,t,o,a),null):(r=Y(n,t),e=null!==r?r.next:n.first,G(u,t,o,a),a===e&&null!==a||o===r&&null!==o?(null===r&&(n.first=t),null===e&&(n.last=null),null):(t={priorityLevel:t.priorityLevel,partialState:t.partialState,callback:t.callback,isReplace:t.isReplace,isForced:t.isForced,isTopLevelUnmount:t.isTopLevelUnmount,next:null},G(n,t,r,e),t))}function Q(e,t,n,r){return e=e.partialState,\"function\"===typeof e?e.call(t,n,r):e}function X(e,t,n){e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function J(e){return e.tag===jr&&null!=e.type.childContextTypes}function Z(e,t){var n=e.stateNode,u=e.type.childContextTypes;if(\"function\"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in u||r(\"108\",f(e)||\"Unknown\",o);return mt({},t,n)}function ee(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=su,this.lastEffect=this.firstEffect=this.nextEffect=null,this.pendingWorkPriority=iu,this.alternate=null}function te(e,t,n){var u=void 0;return\"function\"===typeof e?(u=e.prototype&&e.prototype.isReactComponent?new ee(Zr,t,n):new ee(Jr,t,n),u.type=e):\"string\"===typeof e?(u=new ee(tu,t,n),u.type=e):\"object\"===typeof e&&null!==e&&\"number\"===typeof e.tag?u=e:r(\"130\",null==e?e:typeof e,\"\"),u}function ne(e){return null===e||\"undefined\"===typeof e?null:(e=Hu&&e[Hu]||e[\"@@iterator\"],\"function\"===typeof e?e:null)}function re(e,t){var n=t.ref;if(null!==n&&\"function\"!==typeof n){if(t._owner){t=t._owner;var u=void 0;t&&(\"number\"===typeof t.tag?(t.tag!==Pu&&r(\"110\"),u=t.stateNode):u=t.getPublicInstance()),u||r(\"147\",n);var o=\"\"+n;return null!==e&&null!==e.ref&&e.ref._stringRef===o?e.ref:(e=function(e){var t=u.refs===At?u.refs={}:u.refs;null===e?delete t[o]:t[o]=e},e._stringRef=o,e)}\"string\"!==typeof n&&r(\"148\"),t._owner||r(\"149\",n)}return n}function ue(e,t){\"textarea\"!==e.type&&r(\"31\",\"[object Object]\"===Object.prototype.toString.call(t)?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":t,\"\")}function oe(e,t){function n(n,r){if(t){if(!e){if(null===r.alternate)return;r=r.alternate}var u=n.lastEffect;null!==u?(u.nextEffect=r,n.lastEffect=r):n.firstEffect=n.lastEffect=r,r.nextEffect=null,r.effectTag=Mu}}function u(e,r){if(!t)return null;for(;null!==r;)n(e,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(t,n){return e?(t=bu(t,n),t.index=0,t.sibling=null,t):(t.pendingWorkPriority=n,t.effectTag=Lu,t.index=0,t.sibling=null,t)}function i(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index,r<n?(e.effectTag=Uu,n):r):(e.effectTag=Uu,n):n}function l(e){return t&&null===e.alternate&&(e.effectTag=Uu),e}function s(e,t,n,r){return null===t||t.tag!==Nu?(n=Bu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function c(e,t,n,r){return null===t||t.type!==n.type?(r=yu(n,e.internalContextTag,r),r.ref=re(t,n),r.return=e,r):(r=a(t,r),r.ref=re(t,n),r.pendingProps=n.props,r.return=e,r)}function p(e,t,n,r){return null===t||t.tag!==Ou?(n=wu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function f(e,t,n,r){return null===t||t.tag!==Iu?(t=ku(n,e.internalContextTag,r),t.type=n.value,t.return=e,t):(t=a(t,r),t.type=n.value,t.return=e,t)}function d(e,t,n,r){return null===t||t.tag!==_u||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(n=xu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n.children||[],t.return=e,t)}function D(e,t,n,r){return null===t||t.tag!==Ru?(n=vu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function h(e,t,n){if(\"string\"===typeof t||\"number\"===typeof t)return t=Bu(\"\"+t,e.internalContextTag,n),t.return=e,t;if(\"object\"===typeof t&&null!==t){switch(t.$$typeof){case qu:return n=yu(t,e.internalContextTag,n),n.ref=re(null,t),n.return=e,n;case Eu:return t=wu(t,e.internalContextTag,n),t.return=e,t;case Au:return n=ku(t,e.internalContextTag,n),n.type=t.value,n.return=e,n;case Fu:return t=xu(t,e.internalContextTag,n),t.return=e,t}if(Tu(t)||ne(t))return t=vu(t,e.internalContextTag,n),t.return=e,t;ue(e,t)}return null}function g(e,t,n,r){var u=null!==t?t.key:null;if(\"string\"===typeof n||\"number\"===typeof n)return null!==u?null:s(e,t,\"\"+n,r);if(\"object\"===typeof n&&null!==n){switch(n.$$typeof){case qu:return n.key===u?c(e,t,n,r):null;case Eu:return n.key===u?p(e,t,n,r):null;case Au:return null===u?f(e,t,n,r):null;case Fu:return n.key===u?d(e,t,n,r):null}if(Tu(n)||ne(n))return null!==u?null:D(e,t,n,r);ue(e,n)}return null}function m(e,t,n,r,u){if(\"string\"===typeof r||\"number\"===typeof r)return e=e.get(n)||null,s(t,e,\"\"+r,u);if(\"object\"===typeof r&&null!==r){switch(r.$$typeof){case qu:return e=e.get(null===r.key?n:r.key)||null,c(t,e,r,u);case Eu:return e=e.get(null===r.key?n:r.key)||null,p(t,e,r,u);case Au:return e=e.get(n)||null,f(t,e,r,u);case Fu:return e=e.get(null===r.key?n:r.key)||null,d(t,e,r,u)}if(Tu(r)||ne(r))return e=e.get(n)||null,D(t,e,r,u);ue(t,r)}return null}function C(e,r,a,l){for(var s=null,c=null,p=r,f=r=0,d=null;null!==p&&f<a.length;f++){p.index>f?(d=p,p=null):d=p.sibling;var D=g(e,p,a[f],l);if(null===D){null===p&&(p=d);break}t&&p&&null===D.alternate&&n(e,p),r=i(D,r,f),null===c?s=D:c.sibling=D,c=D,p=d}if(f===a.length)return u(e,p),s;if(null===p){for(;f<a.length;f++)(p=h(e,a[f],l))&&(r=i(p,r,f),null===c?s=p:c.sibling=p,c=p);return s}for(p=o(e,p);f<a.length;f++)(d=m(p,e,f,a[f],l))&&(t&&null!==d.alternate&&p.delete(null===d.key?f:d.key),r=i(d,r,f),null===c?s=d:c.sibling=d,c=d);return t&&p.forEach(function(t){return n(e,t)}),s}function E(e,a,l,s){var c=ne(l);\"function\"!==typeof c&&r(\"150\"),null==(l=c.call(l))&&r(\"151\");for(var p=c=null,f=a,d=a=0,D=null,C=l.next();null!==f&&!C.done;d++,C=l.next()){f.index>d?(D=f,f=null):D=f.sibling;var E=g(e,f,C.value,s);if(null===E){f||(f=D);break}t&&f&&null===E.alternate&&n(e,f),a=i(E,a,d),null===p?c=E:p.sibling=E,p=E,f=D}if(C.done)return u(e,f),c;if(null===f){for(;!C.done;d++,C=l.next())null!==(C=h(e,C.value,s))&&(a=i(C,a,d),null===p?c=C:p.sibling=C,p=C);return c}for(f=o(e,f);!C.done;d++,C=l.next())null!==(C=m(f,e,d,C.value,s))&&(t&&null!==C.alternate&&f.delete(null===C.key?d:C.key),a=i(C,a,d),null===p?c=C:p.sibling=C,p=C);return t&&f.forEach(function(t){return n(e,t)}),c}return function(e,t,o,i){var s=\"object\"===typeof o&&null!==o;if(s)switch(o.$$typeof){case qu:e:{var c=o.key;for(s=t;null!==s;){if(s.key===c){if(s.type===o.type){u(e,s.sibling),t=a(s,i),t.ref=re(s,o),t.pendingProps=o.props,t.return=e,e=t;break e}u(e,s);break}n(e,s),s=s.sibling}i=yu(o,e.internalContextTag,i),i.ref=re(t,o),i.return=e,e=i}return l(e);case Eu:e:{for(s=o.key;null!==t;){if(t.key===s){if(t.tag===Ou){u(e,t.sibling),t=a(t,i),t.pendingProps=o,t.return=e,e=t;break e}u(e,t);break}n(e,t),t=t.sibling}o=wu(o,e.internalContextTag,i),o.return=e,e=o}return l(e);case Au:e:{if(null!==t){if(t.tag===Iu){u(e,t.sibling),t=a(t,i),t.type=o.value,t.return=e,e=t;break e}u(e,t)}t=ku(o,e.internalContextTag,i),t.type=o.value,t.return=e,e=t}return l(e);case Fu:e:{for(s=o.key;null!==t;){if(t.key===s){if(t.tag===_u&&t.stateNode.containerInfo===o.containerInfo&&t.stateNode.implementation===o.implementation){u(e,t.sibling),t=a(t,i),t.pendingProps=o.children||[],t.return=e,e=t;break e}u(e,t);break}n(e,t),t=t.sibling}o=xu(o,e.internalContextTag,i),o.return=e,e=o}return l(e)}if(\"string\"===typeof o||\"number\"===typeof o)return o=\"\"+o,null!==t&&t.tag===Nu?(u(e,t.sibling),t=a(t,i),t.pendingProps=o,t.return=e,e=t):(u(e,t),o=Bu(o,e.internalContextTag,i),o.return=e,e=o),l(e);if(Tu(o))return C(e,t,o,i);if(ne(o))return E(e,t,o,i);if(s&&ue(e,o),\"undefined\"===typeof o)switch(e.tag){case Pu:case Su:o=e.type,r(\"152\",o.displayName||o.name||\"Component\")}return u(e,t)}}function ae(e,t,n,u){function o(e,t){t.updater=a,e.stateNode=t,Yt.set(t,e)}var a={isMounted:ro,enqueueSetState:function(n,r,u){n=Yt.get(n);var o=t(n,!1);Ju(n,r,void 0===u?null:u,o),e(n,o)},enqueueReplaceState:function(n,r,u){n=Yt.get(n);var o=t(n,!1);Zu(n,r,void 0===u?null:u,o),e(n,o)},enqueueForceUpdate:function(n,r){n=Yt.get(n);var u=t(n,!1);eo(n,void 0===r?null:r,u),e(n,u)}};return{adoptClassInstance:o,constructClassInstance:function(e,t){var n=e.type,r=Qu(e),u=Xu(e),a=u?$u(e,r):At;return t=new n(t,a),o(e,t),u&&Yu(e,r,a),t},mountClassInstance:function(e,t){var n=e.alternate,u=e.stateNode,o=u.state||null,i=e.pendingProps;i||r(\"158\");var l=Qu(e);u.props=i,u.state=o,u.refs=At,u.context=$u(e,l),kr.enableAsyncSubtreeAPI&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent&&(e.internalContextTag|=Gu),\"function\"===typeof u.componentWillMount&&(l=u.state,u.componentWillMount(),l!==u.state&&a.enqueueReplaceState(u,u.state,null),null!==(l=e.updateQueue)&&(u.state=to(n,e,l,u,o,i,t))),\"function\"===typeof u.componentDidMount&&(e.effectTag|=Ku)},updateClassInstance:function(e,t,o){var i=t.stateNode;i.props=t.memoizedProps,i.state=t.memoizedState;var l=t.memoizedProps,s=t.pendingProps;s||null==(s=l)&&r(\"159\");var c=i.context,p=Qu(t);if(p=$u(t,p),\"function\"!==typeof i.componentWillReceiveProps||l===s&&c===p||(c=i.state,i.componentWillReceiveProps(s,p),i.state!==c&&a.enqueueReplaceState(i,i.state,null)),c=t.memoizedState,o=null!==t.updateQueue?to(e,t,t.updateQueue,i,c,s,o):c,!(l!==s||c!==o||no()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate))return\"function\"!==typeof i.componentDidUpdate||l===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=Ku),!1;var f=s;if(null===l||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)f=!0;else{var d=t.stateNode,D=t.type;f=\"function\"===typeof d.shouldComponentUpdate?d.shouldComponentUpdate(f,o,p):!D.prototype||!D.prototype.isPureReactComponent||(!Ft(l,f)||!Ft(c,o))}return f?(\"function\"===typeof i.componentWillUpdate&&i.componentWillUpdate(s,o,p),\"function\"===typeof i.componentDidUpdate&&(t.effectTag|=Ku)):(\"function\"!==typeof i.componentDidUpdate||l===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=Ku),n(t,s),u(t,o)),i.props=s,i.state=o,i.context=p,f}}}function ie(e,t,n,u,o){function a(e,t,n){i(e,t,n,t.pendingWorkPriority)}function i(e,t,n,r){t.child=null===e?uo(t,t.child,n,r):e.child===t.child?oo(t,t.child,n,r):ao(t,t.child,n,r)}function l(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=_o)}function s(e,t,n,r){if(l(e,t),!n)return r&&ho(t,!1),p(e,t);n=t.stateNode,Oo.current=t;var u=n.render();return t.effectTag|=To,a(e,t,u),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ho(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?Do(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Do(e,t.context,!1),m(e,t.containerInfo)}function p(e,t){return io(e,t),t.child}function f(e,t){switch(t.tag){case Eo:c(t);break;case Co:fo(t);break;case bo:m(t,t.stateNode.containerInfo)}return null}var d=e.shouldSetTextContent,D=e.useSyncScheduling,h=e.shouldDeprioritizeSubtree,g=t.pushHostContext,m=t.pushHostContainer,C=n.enterHydrationState,E=n.resetHydrationState,A=n.tryToClaimNextHydratableInstance;e=ae(u,o,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var F=e.adoptClassInstance,b=e.constructClassInstance,y=e.mountClassInstance,v=e.updateClassInstance;return{beginWork:function(e,t,n){if(t.pendingWorkPriority===ko||t.pendingWorkPriority>n)return f(e,t);switch(t.tag){case go:null!==e&&r(\"155\");var u=t.type,o=t.pendingProps,i=co(t);return i=so(t,i),u=u(o,i),t.effectTag|=To,\"object\"===typeof u&&null!==u&&\"function\"===typeof u.render?(t.tag=Co,o=fo(t),F(t,u),y(t,n),t=s(e,t,!0,o)):(t.tag=mo,a(e,t,u),t.memoizedProps=o,t=t.child),t;case mo:e:{if(o=t.type,n=t.pendingProps,u=t.memoizedProps,po())null===n&&(n=u);else if(null===n||u===n){t=p(e,t);break e}u=co(t),u=so(t,u),o=o(n,u),t.effectTag|=To,a(e,t,o),t.memoizedProps=n,t=t.child}return t;case Co:return o=fo(t),u=void 0,null===e?t.stateNode?r(\"153\"):(b(t,t.pendingProps),y(t,n),u=!0):u=v(e,t,n),s(e,t,u,o);case Eo:return c(t),u=t.updateQueue,null!==u?(o=t.memoizedState,u=lo(e,t,u,null,o,null,n),o===u?(E(),t=p(e,t)):(o=u.element,null!==e&&null!==e.child||!C(t)?(E(),a(e,t,o)):(t.effectTag|=So,t.child=uo(t,t.child,o,n)),t.memoizedState=u,t=t.child)):(E(),t=p(e,t)),t;case Ao:g(t),null===e&&A(t),o=t.type;var B=t.memoizedProps;return u=t.pendingProps,null===u&&null===(u=B)&&r(\"154\"),i=null!==e?e.memoizedProps:null,po()||null!==u&&B!==u?(B=u.children,d(o,u)?B=null:i&&d(o,i)&&(t.effectTag|=Po),l(e,t),n!==xo&&!D&&h(o,u)?(t.pendingWorkPriority=xo,t=null):(a(e,t,B),t.memoizedProps=u,t=t.child)):t=p(e,t),t;case Fo:return null===e&&A(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case vo:t.tag=yo;case yo:return n=t.pendingProps,po()?null===n&&null===(n=e&&e.memoizedProps)&&r(\"154\"):null!==n&&t.memoizedProps!==n||(n=t.memoizedProps),o=n.children,u=t.pendingWorkPriority,t.stateNode=null===e?uo(t,t.stateNode,o,u):e.child===t.child?oo(t,t.stateNode,o,u):ao(t,t.stateNode,o,u),t.memoizedProps=n,t.stateNode;case Bo:return null;case bo:e:{if(m(t,t.stateNode.containerInfo),n=t.pendingWorkPriority,o=t.pendingProps,po())null===o&&null==(o=e&&e.memoizedProps)&&r(\"154\");else if(null===o||t.memoizedProps===o){t=p(e,t);break e}null===e?t.child=ao(t,t.child,o,n):a(e,t,o),t.memoizedProps=o,t=t.child}return t;case wo:e:{if(n=t.pendingProps,po())null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=p(e,t);break e}a(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r(\"156\")}},beginFailedWork:function(e,t,n){switch(t.tag){case Co:fo(t);break;case Eo:c(t);break;default:r(\"157\")}return t.effectTag|=No,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),t.pendingWorkPriority===ko||t.pendingWorkPriority>n?f(e,t):(t.firstEffect=null,t.lastEffect=null,i(e,t,null,n),t.tag===Co&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function le(e,t,n){var u=e.createInstance,o=e.createTextInstance,a=e.appendInitialChild,i=e.finalizeInitialChildren,l=e.prepareUpdate,s=t.getRootHostContainer,c=t.popHostContext,p=t.getHostContext,f=t.popHostContainer,d=n.prepareToHydrateHostInstance,D=n.prepareToHydrateHostTextInstance,h=n.popHydrationState;return{completeWork:function(e,t,n){var g=t.pendingProps;switch(null===g?g=t.memoizedProps:t.pendingWorkPriority===Jo&&n!==Jo||(t.pendingProps=null),t.tag){case Mo:return null;case Ho:return Ro(t),null;case qo:return f(t),Lo(t),g=t.stateNode,g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),null!==e&&null!==e.child||(h(t),t.effectTag&=~$o),null;case jo:c(t),n=s();var m=t.type;if(null!==e&&null!=t.stateNode){var C=e.memoizedProps,E=t.stateNode,A=p();g=l(E,m,C,g,n,A),(t.updateQueue=g)&&(t.effectTag|=Xo),e.ref!==t.ref&&(t.effectTag|=Qo)}else{if(!g)return null===t.stateNode&&r(\"166\"),null;if(e=p(),h(t))d(t,n,e)&&(t.effectTag|=Xo);else{e=u(m,g,n,e,t);e:for(C=t.child;null!==C;){if(C.tag===jo||C.tag===Vo)a(e,C.stateNode);else if(C.tag!==Wo&&null!==C.child){C=C.child;continue}if(C===t)break e;for(;null===C.sibling;){if(null===C.return||C.return===t)break e;C=C.return}C=C.sibling}i(e,m,g,n)&&(t.effectTag|=Xo),t.stateNode=e}null!==t.ref&&(t.effectTag|=Qo)}return null;case Vo:if(e&&null!=t.stateNode)e.memoizedProps!==g&&(t.effectTag|=Xo);else{if(\"string\"!==typeof g)return null===t.stateNode&&r(\"166\"),null;e=s(),n=p(),h(t)?D(t)&&(t.effectTag|=Xo):t.stateNode=o(g,e,n,t)}return null;case zo:(g=t.memoizedProps)||r(\"165\"),t.tag=Ko,n=[];e:for((m=t.stateNode)&&(m.return=t);null!==m;){if(m.tag===jo||m.tag===Vo||m.tag===Wo)r(\"164\");else if(m.tag===Go)n.push(m.type);else if(null!==m.child){m.child.return=m,m=m.child;continue}for(;null===m.sibling;){if(null===m.return||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}return m=g.handler,g=m(g.props,n),t.child=Io(t,null!==e?e.child:null,g,t.pendingWorkPriority),t.child;case Ko:return t.tag=zo,null;case Go:case Yo:return null;case Wo:return t.effectTag|=Xo,f(t),null;case Uo:r(\"167\");default:r(\"156\")}}}}function se(e){return function(t){try{return e(t)}catch(e){}}}function ce(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function u(e){return e.tag===ua||e.tag===ra||e.tag===aa}function o(e){for(var t=e;;)if(i(t),null!==t.child&&t.tag!==aa)t.child.return=t,t=t.child;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}}function a(e){for(var t=e,n=!1,u=void 0,a=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r(\"160\"),n.tag){case ua:u=n.stateNode,a=!1;break e;case ra:case aa:u=n.stateNode.containerInfo,a=!0;break e}n=n.return}n=!0}if(t.tag===ua||t.tag===oa)o(t),a?m(u,t.stateNode):g(u,t.stateNode);else if(t.tag===aa?u=t.stateNode.containerInfo:i(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,t.tag===aa&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function i(e){switch(\"function\"===typeof sa&&sa(e),e.tag){case na:n(e);var r=e.stateNode;if(\"function\"===typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case ua:n(e);break;case ia:o(e.stateNode);break;case aa:a(e)}}var l=e.commitMount,s=e.commitUpdate,c=e.resetTextContent,p=e.commitTextUpdate,f=e.appendChild,d=e.appendChildToContainer,D=e.insertBefore,h=e.insertInContainerBefore,g=e.removeChild,m=e.removeChildFromContainer,C=e.getPublicInstance;return{commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(u(t)){var n=t;break e}t=t.return}r(\"160\"),n=void 0}var o=t=void 0;switch(n.tag){case ua:t=n.stateNode,o=!1;break;case ra:case aa:t=n.stateNode.containerInfo,o=!0;break;default:r(\"161\")}n.effectTag&da&&(c(t),n.effectTag&=~da);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==ua&&n.tag!==oa;){if(n.effectTag&ca)continue t;if(null===n.child||n.tag===aa)continue t;n.child.return=n,n=n.child}if(!(n.effectTag&ca)){n=n.stateNode;break e}}for(var a=e;;){if(a.tag===ua||a.tag===oa)n?o?h(t,a.stateNode,n):D(t,a.stateNode,n):o?d(t,a.stateNode):f(t,a.stateNode);else if(a.tag!==aa&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},commitDeletion:function(e){a(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case na:break;case ua:var n=t.stateNode;if(null!=n){var u=t.memoizedProps;e=null!==e?e.memoizedProps:u;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&s(n,a,o,e,u,t)}break;case oa:null===t.stateNode&&r(\"162\"),n=t.memoizedProps,p(t.stateNode,null!==e?e.memoizedProps:n,n);break;case ra:case aa:break;default:r(\"163\")}},commitLifeCycles:function(e,t){switch(t.tag){case na:var n=t.stateNode;if(t.effectTag&pa)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var u=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(u,e)}t.effectTag&fa&&null!==t.updateQueue&&la(t,t.updateQueue,n);break;case ra:e=t.updateQueue,null!==e&&la(t,e,t.child&&t.child.stateNode);break;case ua:n=t.stateNode,null===e&&t.effectTag&pa&&l(n,t.type,t.memoizedProps,t);break;case oa:case aa:break;default:r(\"163\")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case ua:t(C(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function pe(e){function t(e){return e===ma&&r(\"174\"),e}var n=e.getChildHostContext,u=e.getRootHostContext,o=Da(ma),a=Da(ma),i=Da(ma);return{getHostContext:function(){return t(o.current)},getRootHostContainer:function(){return t(i.current)},popHostContainer:function(e){ha(o,e),ha(a,e),ha(i,e)},popHostContext:function(e){a.current===e&&(ha(o,e),ha(a,e))},pushHostContainer:function(e,t){ga(i,t,e),t=u(t),ga(a,e,e),ga(o,t,e)},pushHostContext:function(e){var r=t(i.current),u=t(o.current);r=n(u,e.type,r),u!==r&&(ga(a,e,e),ga(o,r,e))},resetHostContainer:function(){o.current=ma,i.current=ma}}}function fe(e){function t(e,t){var n=ya();n.stateNode=t,n.return=e,n.effectTag=Fa,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case Ca:return a(t,e.type,e.pendingProps);case Ea:return i(t,e.pendingProps);default:return!1}}function u(e){for(e=e.return;null!==e&&e.tag!==Ca&&e.tag!==Aa;)e=e.return;D=e}var o=e.shouldSetTextContent,a=e.canHydrateInstance,i=e.canHydrateTextInstance,l=e.getNextHydratableSibling,s=e.getFirstHydratableChild,c=e.hydrateInstance,p=e.hydrateTextInstance,f=e.didNotHydrateInstance,d=e.didNotFindHydratableInstance;if(e=e.didNotFindHydratableTextInstance,!(a&&i&&l&&s&&c&&p&&f&&d&&e))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r(\"175\")},prepareToHydrateHostTextInstance:function(){r(\"176\")},popHydrationState:function(){return!1}};var D=null,h=null,g=!1;return{enterHydrationState:function(e){return h=s(e.stateNode.containerInfo),D=e,g=!0},resetHydrationState:function(){h=D=null,g=!1},tryToClaimNextHydratableInstance:function(e){if(g){var r=h;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=ba,g=!1,void(D=e);t(D,h)}e.stateNode=r,D=e,h=s(r)}else e.effectTag|=ba,g=!1,D=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return p(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==D)return!1;if(!g)return u(e),g=!0,!1;var n=e.type;if(e.tag!==Ca||\"head\"!==n&&\"body\"!==n&&!o(n,e.memoizedProps))for(n=h;n;)t(e,n),n=l(n);return u(e),h=D?l(e.stateNode):null,!0}}}function de(e){function t(){for(;null!==K&&K.current.pendingWorkPriority===Sa;){K.isScheduled=!1;var e=K.nextScheduledRoot;if(K.nextScheduledRoot=null,K===G)return G=K=null,V=Sa,null;K=e}e=K;for(var t=null,n=Sa;null!==e;)e.current.pendingWorkPriority!==Sa&&(n===Sa||n>e.current.pendingWorkPriority)&&(n=e.current.pendingWorkPriority,t=e),e=e.nextScheduledRoot;null!==t?(V=n,Ba(),Xa(),b(),j=ka(t.current,n),t!==ue&&(re=0,ue=t)):(V=Sa,ue=j=null)}function n(n){ee=!0,z=null;var u=n.stateNode;if(u.current===n&&r(\"177\"),V!==Pa&&V!==Na||re++,wa.current=null,n.effectTag>La)if(null!==n.lastEffect){n.lastEffect.nextEffect=n;var o=n.firstEffect}else o=n;else o=n.firstEffect;for(I(),W=o;null!==W;){var a=!1,i=void 0;try{for(;null!==W;){var l=W.effectTag;if(l&ja&&e.resetTextContent(W.stateNode),l&za){var s=W.alternate;null!==s&&N(s)}switch(l&~(Va|Wa|ja|za|La)){case Ua:k(W),W.effectTag&=~Ua;break;case Ha:k(W),W.effectTag&=~Ua,T(W.alternate,W);break;case Ma:T(W.alternate,W);break;case qa:te=!0,x(W),te=!1}W=W.nextEffect}}catch(e){a=!0,i=e}a&&(null===W&&r(\"178\"),p(W,i),null!==W&&(W=W.nextEffect))}for(R(),u.current=n,W=o;null!==W;){u=!1,o=void 0;try{for(;null!==W;){var c=W.effectTag;if(c&(Ma|Va)&&S(W.alternate,W),c&za&&P(W),c&Wa)switch(a=W,i=void 0,null!==$&&(i=$.get(a),$.delete(a),null==i&&null!==a.alternate&&(a=a.alternate,i=$.get(a),$.delete(a))),null==i&&r(\"184\"),a.tag){case $a:a.stateNode.componentDidCatch(i.error,{componentStack:i.componentStack});break;case Ka:null===J&&(J=i.error);break;default:r(\"157\")}var f=W.nextEffect;W.nextEffect=null,W=f}}catch(e){u=!0,o=e}u&&(null===W&&r(\"178\"),p(W,o),null!==W&&(W=W.nextEffect))}ee=!1,\"function\"===typeof Ta&&Ta(n.stateNode),X&&(X.forEach(m),X=null),t()}function u(e){for(;;){var t=w(e.alternate,e,V),n=e.return,r=e.sibling,u=e;if(!(u.pendingWorkPriority!==Sa&&u.pendingWorkPriority>V)){for(var o=Qa(u),a=u.child;null!==a;)o=xa(o,a.pendingWorkPriority),a=a.sibling;u.pendingWorkPriority=o}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),e.effectTag>La&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){z=e;break}e=n}return null}function o(e){var t=v(e.alternate,e,V);return null===t&&(t=u(e)),wa.current=null,t}function a(e){var t=B(e.alternate,e,V);return null===t&&(t=u(e)),wa.current=null,t}function i(e){c(Ia,e)}function l(){if(null!==$&&0<$.size&&V===Na)for(;null!==j;){var e=j;if(null===(j=null!==$&&($.has(e)||null!==e.alternate&&$.has(e.alternate))?a(j):o(j))&&(null===z&&r(\"179\"),L=Na,n(z),L=V,null===$||0===$.size||V!==Na))break}}function s(e,u){if(null!==z?(L=Na,n(z),l()):null===j&&t(),!(V===Sa||V>e)){L=V;e:for(;;){if(V<=Na)for(;null!==j&&!(null===(j=o(j))&&(null===z&&r(\"179\"),L=Na,n(z),L=V,l(),V===Sa||V>e||V>Na)););else if(null!==u)for(;null!==j&&!M;)if(1<u.timeRemaining()){if(null===(j=o(j)))if(null===z&&r(\"179\"),1<u.timeRemaining()){if(L=Na,n(z),L=V,l(),V===Sa||V>e||V<_a)break}else M=!0}else M=!0;switch(V){case Pa:case Na:if(V<=e)continue e;break e;case _a:case Oa:case Ia:if(null===u)break e;if(!M&&V<=e)continue e;break e;case Sa:break e;default:r(\"181\")}}}}function c(e,t){U&&r(\"182\"),U=!0;var n=L,u=!1,o=null;try{s(e,t)}catch(e){u=!0,o=e}for(;u;){if(Z){J=o;break}var l=j;if(null===l)Z=!0;else{var c=p(l,o);if(null===c&&r(\"183\"),!Z){try{u=c,o=e,c=t;for(var f=u;null!==l;){switch(l.tag){case $a:va(l);break;case Ga:F(l);break;case Ka:A(l);break;case Ya:A(l)}if(l===f||l.alternate===f)break;l=l.return}j=a(u),s(o,c)}catch(e){u=!0,o=e;continue}break}}}if(L=n,null!==t&&(Y=!1),V>Na&&!Y&&(_(i),Y=!0),e=J,Z=M=U=!1,ue=Q=$=J=null,re=0,null!==e)throw e}function p(e,t){var n=wa.current=null,r=!1,u=!1,o=null;if(e.tag===Ka)n=e,d(e)&&(Z=!0);else for(var a=e.return;null!==a&&null===n;){if(a.tag===$a?\"function\"===typeof a.stateNode.componentDidCatch&&(r=!0,o=f(a),n=a,u=!0):a.tag===Ka&&(n=a),d(a)){if(te||null!==X&&(X.has(a)||null!==a.alternate&&X.has(a.alternate)))return null;n=null,u=!1}a=a.return}if(null!==n){null===Q&&(Q=new Set),Q.add(n);var i=\"\";a=e;do{e:switch(a.tag){case fu:case du:case Du:case hu:var l=a._debugOwner,s=a._debugSource,c=f(a),p=null;l&&(p=f(l)),l=s,c=\"\\n in \"+(c||\"Unknown\")+(l?\" (at \"+l.fileName.replace(/^.*[\\\\\\/]/,\"\")+\":\"+l.lineNumber+\")\":p?\" (created by \"+p+\")\":\"\");break e;default:c=\"\"}i+=c,a=a.return}while(a);a=i,e=f(e),null===$&&($=new Map),t={componentName:e,componentStack:a,error:t,errorBoundary:r?n.stateNode:null,errorBoundaryFound:r,errorBoundaryName:o,willRetry:u},$.set(n,t);try{console.error(t.error)}catch(e){console.error(e)}return ee?(null===X&&(X=new Set),X.add(n)):m(n),n}return null===J&&(J=t),null}function d(e){return null!==Q&&(Q.has(e)||null!==e.alternate&&Q.has(e.alternate))}function D(e,t){return h(e,t,!1)}function h(e,t){re>ne&&(Z=!0,r(\"185\")),!U&&t<=V&&(j=null);for(var n=!0;null!==e&&n;){if(n=!1,(e.pendingWorkPriority===Sa||e.pendingWorkPriority>t)&&(n=!0,e.pendingWorkPriority=t),null!==e.alternate&&(e.alternate.pendingWorkPriority===Sa||e.alternate.pendingWorkPriority>t)&&(n=!0,e.alternate.pendingWorkPriority=t),null===e.return){if(e.tag!==Ka)break;var u=e.stateNode;if(t===Sa||u.isScheduled||(u.isScheduled=!0,G?G.nextScheduledRoot=u:K=u,G=u),!U)switch(t){case Pa:q?c(Pa,null):c(Na,null);break;case Na:H||r(\"186\");break;default:Y||(_(i),Y=!0)}}e=e.return}}function g(e,t){var n=L;return n===Sa&&(n=!O||e.internalContextTag&Ra||t?Oa:Pa),n===Pa&&(U||H)?Na:n}function m(e){h(e,Na,!0)}var C=pe(e),E=fe(e),A=C.popHostContainer,F=C.popHostContext,b=C.resetHostContainer,y=ie(e,C,E,D,g),v=y.beginWork,B=y.beginFailedWork,w=le(e,C,E).completeWork;C=ce(e,p);var k=C.commitPlacement,x=C.commitDeletion,T=C.commitWork,S=C.commitLifeCycles,P=C.commitAttachRef,N=C.commitDetachRef,_=e.scheduleDeferredCallback,O=e.useSyncScheduling,I=e.prepareForCommit,R=e.resetAfterCommit,L=Sa,U=!1,M=!1,H=!1,q=!1,j=null,V=Sa,W=null,z=null,K=null,G=null,Y=!1,$=null,Q=null,X=null,J=null,Z=!1,ee=!1,te=!1,ne=1e3,re=0,ue=null;return{scheduleUpdate:D,getPriorityContext:g,batchedUpdates:function(e,t){var n=H;H=!0;try{return e(t)}finally{H=n,U||H||c(Na,null)}},unbatchedUpdates:function(e){var t=q,n=H;q=H,H=!1;try{return e()}finally{H=n,q=t}},flushSync:function(e){var t=H,n=L;H=!0,L=Pa;try{return e()}finally{H=t,L=n,U&&r(\"187\"),c(Na,null)}},deferredUpdates:function(e){var t=L;L=Oa;try{return e()}finally{L=t}}}}function De(){r(\"196\")}function he(e){return e?(e=Yt.get(e),\"number\"===typeof e.tag?De(e):e._processChildContext(e._context)):At}function ge(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function me(e,t){var n=ge(e);e=0;for(var r;n;){if(n.nodeType===oi){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ge(n)}}function Ce(){return!ai&&gt.canUseDOM&&(ai=\"textContent\"in document.documentElement?\"textContent\":\"innerText\"),ai}function Ee(){r(\"211\")}function Ae(){r(\"212\")}function Fe(e){if(null==e)return null;if(e.nodeType===pi)return e;var t=Yt.get(e);if(t)return\"number\"===typeof t.tag?Ee(t):Ae(t);\"function\"===typeof e.render?r(\"188\"):r(\"213\",Object.keys(e))}function be(e){if(void 0!==e._hostParent)return e._hostParent;if(\"number\"===typeof e.tag){do{e=e.return}while(e&&e.tag!==fi);if(e)return e}return null}function ye(e,t){for(var n=0,r=e;r;r=be(r))n++;r=0;for(var u=t;u;u=be(u))r++;for(;0<n-r;)e=be(e),n--;for(;0<r-n;)t=be(t),r--;for(;n--;){if(e===t||e===t.alternate)return e;e=be(e),t=be(t)}return null}function ve(e,t,n){(t=Di(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=B(n._dispatchListeners,t),n._dispatchInstances=B(n._dispatchInstances,e))}function Be(e){e&&e.dispatchConfig.phasedRegistrationNames&&di.traverseTwoPhase(e._targetInst,ve,e)}function we(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?di.getParentInstance(t):null,di.traverseTwoPhase(t,ve,e)}}function ke(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Di(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=B(n._dispatchListeners,t),n._dispatchInstances=B(n._dispatchInstances,e))}function xe(e){e&&e.dispatchConfig.registrationName&&ke(e._targetInst,null,e)}function Te(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var u in e)e.hasOwnProperty(u)&&((t=e[u])?this[u]=t(n):\"target\"===u?this.target=r:this[u]=n[u]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Et.thatReturnsTrue:Et.thatReturnsFalse,this.isPropagationStopped=Et.thatReturnsFalse,this}function Se(e,t,n,r){if(this.eventPool.length){var u=this.eventPool.pop();return this.call(u,e,t,n,r),u}return new this(e,t,n,r)}function Pe(e){e instanceof this||r(\"223\"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Ne(e){e.eventPool=[],e.getPooled=Se,e.release=Pe}function _e(e,t,n,r){return Te.call(this,e,t,n,r)}function Oe(e,t,n,r){return Te.call(this,e,t,n,r)}function Ie(e,t){switch(e){case\"topKeyUp\":return-1!==Fi.indexOf(t.keyCode);case\"topKeyDown\":return 229!==t.keyCode;case\"topKeyPress\":case\"topMouseDown\":case\"topBlur\":return!0;default:return!1}}function Re(e){return e=e.detail,\"object\"===typeof e&&\"data\"in e?e.data:null}function Le(e,t){switch(e){case\"topCompositionEnd\":return Re(t);case\"topKeyPress\":return 32!==t.which?null:(Si=!0,xi);case\"topTextInput\":return e=t.data,e===xi&&Si?null:e;default:return null}}function Ue(e,t){if(Pi)return\"topCompositionEnd\"===e||!bi&&Ie(e,t)?(e=Ci.getData(),Ci.reset(),Pi=!1,e):null;switch(e){case\"topPaste\":return null;case\"topKeyPress\":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case\"topCompositionEnd\":return ki?null:t.data;default:return null}}function Me(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return\"input\"===t?!!_i[e.type]:\"textarea\"===t}function He(e,t,n){return e=Te.getPooled(Oi.change,e,t,n),e.type=\"change\",fn.enqueueStateRestore(n),hi.accumulateTwoPhaseDispatches(e),e}function qe(e){Fn.enqueueEvents(e),Fn.processEventQueue(!1)}function je(e){var t=Gt.getNodeFromInstance(e);if(Zn.updateValueIfChanged(t))return e}function Ve(e,t){if(\"topChange\"===e)return t}function We(){Ii&&(Ii.detachEvent(\"onpropertychange\",ze),Ri=Ii=null)}function ze(e){\"value\"===e.propertyName&&je(Ri)&&(e=He(Ri,e,y(e)),Dn.batchedUpdates(qe,e))}function Ke(e,t,n){\"topFocus\"===e?(We(),Ii=t,Ri=n,Ii.attachEvent(\"onpropertychange\",ze)):\"topBlur\"===e&&We()}function Ge(e){if(\"topSelectionChange\"===e||\"topKeyUp\"===e||\"topKeyDown\"===e)return je(Ri)}function Ye(e,t){if(\"topClick\"===e)return je(t)}function $e(e,t){if(\"topInput\"===e||\"topChange\"===e)return je(t)}function Qe(e,t,n,r){return Te.call(this,e,t,n,r)}function Xe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Mi[e])&&!!t[e]}function Je(){return Xe}function Ze(e,t,n,r){return Te.call(this,e,t,n,r)}function et(e,t){if(Yi||null==zi||zi!==vt())return null;var n=zi;return\"selectionStart\"in n&&ci.hasSelectionCapabilities(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Gi&&Ft(Gi,n)?null:(Gi=n,e=Te.getPooled(Wi.select,Ki,e,t),e.type=\"select\",e.target=zi,hi.accumulateTwoPhaseDispatches(e),e)}function tt(e,t,n,r){return Te.call(this,e,t,n,r)}function nt(e,t,n,r){return Te.call(this,e,t,n,r)}function rt(e,t,n,r){return Te.call(this,e,t,n,r)}function ut(e){var t=e.keyCode;return\"charCode\"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function ot(e,t,n,r){return Te.call(this,e,t,n,r)}function at(e,t,n,r){return Te.call(this,e,t,n,r)}function it(e,t,n,r){return Te.call(this,e,t,n,r)}function lt(e,t,n,r){return Te.call(this,e,t,n,r)}function st(e,t,n,r){return Te.call(this,e,t,n,r)}function ct(e){return e[1].toUpperCase()}function pt(e){return!(!e||e.nodeType!==dl&&e.nodeType!==gl&&e.nodeType!==ml&&(e.nodeType!==hl||\" react-mount-point-unstable \"!==e.nodeValue))}function ft(e){return!(!(e=e?e.nodeType===gl?e.documentElement:e.firstChild:null)||e.nodeType!==dl||!e.hasAttribute(Cl))}function dt(e,t,n,u,o){pt(n)||r(\"200\");var a=n._reactRootContainer;if(a)Il.updateContainer(t,a,e,o);else{if(!u&&!ft(n))for(u=void 0;u=n.lastChild;)n.removeChild(u);var i=Il.createContainer(n);a=n._reactRootContainer=i,Il.unbatchedUpdates(function(){Il.updateContainer(t,i,e,o)})}return Il.getPublicRootInstance(a)}function Dt(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return pt(t)||r(\"200\"),Cu.createPortal(e,t,null,n)}var ht=n(0);n(6);var gt=n(27),mt=n(2),Ct=n(28),Et=n(3),At=n(5),Ft=n(29),bt=n(30),yt=n(33),vt=n(34);ht||r(\"227\");var Bt,wt,kt={Namespaces:{html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"},getIntrinsicNamespace:u,getChildNamespace:function(e,t){return null==e||\"http://www.w3.org/1999/xhtml\"===e?u(t):\"http://www.w3.org/2000/svg\"===e&&\"foreignObject\"===t?\"http://www.w3.org/1999/xhtml\":e}},xt=null,Tt={},St={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){xt&&r(\"101\"),xt=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var u=e[t];Tt.hasOwnProperty(t)&&Tt[t]===u||(Tt[t]&&r(\"102\",t),Tt[t]=u,n=!0)}n&&o()}},Pt=St,Nt={children:!0,dangerouslySetInnerHTML:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,style:!0},_t={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=_t,n=e.Properties||{},u=e.DOMAttributeNamespaces||{},o=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var a in n){Ot.properties.hasOwnProperty(a)&&r(\"48\",a);var l=a.toLowerCase(),s=n[a];l={attributeName:l,attributeNamespace:null,propertyName:a,mutationMethod:null,mustUseProperty:i(s,t.MUST_USE_PROPERTY),hasBooleanValue:i(s,t.HAS_BOOLEAN_VALUE),hasNumericValue:i(s,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:i(s,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:i(s,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:i(s,t.HAS_STRING_BOOLEAN_VALUE)},1>=l.hasBooleanValue+l.hasNumericValue+l.hasOverloadedBooleanValue||r(\"50\",a),o.hasOwnProperty(a)&&(l.attributeName=o[a]),u.hasOwnProperty(a)&&(l.attributeNamespace=u[a]),e.hasOwnProperty(a)&&(l.mutationMethod=e[a]),Ot.properties[a]=l}}},Ot={ID_ATTRIBUTE_NAME:\"data-reactid\",ROOT_ATTRIBUTE_NAME:\"data-reactroot\",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\",ATTRIBUTE_NAME_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\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\",properties:{},shouldSetAttribute:function(e,t){if(Ot.isReservedProp(e)||!(\"o\"!==e[0]&&\"O\"!==e[0]||\"n\"!==e[1]&&\"N\"!==e[1]))return!1;if(null===t)return!0;switch(typeof t){case\"boolean\":return Ot.shouldAttributeAcceptBooleanValue(e);case\"undefined\":case\"number\":case\"string\":case\"object\":return!0;default:return!1}},getPropertyInfo:function(e){return Ot.properties.hasOwnProperty(e)?Ot.properties[e]:null},shouldAttributeAcceptBooleanValue:function(e){if(Ot.isReservedProp(e))return!0;var t=Ot.getPropertyInfo(e);return t?t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:\"data-\"===(e=e.toLowerCase().slice(0,5))||\"aria-\"===e},isReservedProp:function(e){return Nt.hasOwnProperty(e)},injection:_t},It=Ot,Rt={IndeterminateComponent:0,FunctionalComponent:1,ClassComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,CoroutineComponent:7,CoroutineHandlerPhase:8,YieldComponent:9,Fragment:10},Lt={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11},Ut=Rt.HostComponent,Mt=Rt.HostText,Ht=Lt.ELEMENT_NODE,qt=Lt.COMMENT_NODE,jt=It.ID_ATTRIBUTE_NAME,Vt={hasCachedChildNodes:1},Wt=Math.random().toString(36).slice(2),zt=\"__reactInternalInstance$\"+Wt,Kt=\"__reactEventHandlers$\"+Wt,Gt={getClosestInstanceFromNode:p,getInstanceFromNode:function(e){var t=e[zt];return t?t.tag===Ut||t.tag===Mt?t:t._hostNode===e?t:null:(t=p(e),null!=t&&t._hostNode===e?t:null)},getNodeFromInstance:function(e){if(e.tag===Ut||e.tag===Mt)return e.stateNode;if(void 0===e._hostNode&&r(\"33\"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r(\"34\"),e=e._hostParent;for(;t.length;e=t.pop())c(e,e._hostNode);return e._hostNode},precacheChildNodes:c,precacheNode:s,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[zt],e._hostNode=null)},precacheFiberNode:function(e,t){t[zt]=e},getFiberCurrentPropsFromNode:function(e){return e[Kt]||null},updateFiberProps:function(e,t){e[Kt]=t}},Yt={remove:function(e){e._reactInternalFiber=void 0},get:function(e){return e._reactInternalFiber},has:function(e){return void 0!==e._reactInternalFiber},set:function(e,t){e._reactInternalFiber=t}},$t={ReactCurrentOwner:ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},Qt={NoEffect:0,PerformedWork:1,Placement:2,Update:4,PlacementAndUpdate:6,Deletion:8,ContentReset:16,Callback:32,Err:64,Ref:128},Xt=Rt.HostComponent,Jt=Rt.HostRoot,Zt=Rt.HostPortal,en=Rt.HostText,tn=Qt.NoEffect,nn=Qt.Placement,rn={isFiberMounted:function(e){return 2===d(e)},isMounted:function(e){return!!(e=Yt.get(e))&&2===d(e)},findCurrentFiberUsingSlowPath:h,findCurrentHostFiber:function(e){if(!(e=h(e)))return null;for(var t=e;;){if(t.tag===Xt||t.tag===en)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null},findCurrentHostFiberWithNoPortals:function(e){if(!(e=h(e)))return null;for(var t=e;;){if(t.tag===Xt||t.tag===en)return t;if(t.child&&t.tag!==Zt)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}},un={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){\"function\"!==typeof e.invokeGuardedCallback&&r(\"197\"),g=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,u,o,a,i,l){g.apply(un,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,u,o,a,i,l){if(un.invokeGuardedCallback.apply(this,arguments),un.hasCaughtError()){var s=un.clearCaughtError();un._hasRethrowError||(un._hasRethrowError=!0,un._rethrowError=s)}},rethrowCaughtError:function(){return m.apply(un,arguments)},hasCaughtError:function(){return un._hasCaughtError},clearCaughtError:function(){if(un._hasCaughtError){var e=un._caughtError;return un._caughtError=null,un._hasCaughtError=!1,e}r(\"198\")}},on=un,an={isEndish:function(e){return\"topMouseUp\"===e||\"topTouchEnd\"===e||\"topTouchCancel\"===e},isMoveish:function(e){return\"topMouseMove\"===e||\"topTouchMove\"===e},isStartish:function(e){return\"topMouseDown\"===e||\"topTouchStart\"===e},executeDirectDispatch:function(e){var t=e._dispatchListeners,n=e._dispatchInstances;return Array.isArray(t)&&r(\"103\"),e.currentTarget=t?an.getNodeFromInstance(n):null,t=t?t(e):null,e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,t},executeDispatchesInOrder:function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var u=0;u<n.length&&!e.isPropagationStopped();u++)C(e,t,n[u],r[u]);else n&&C(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null},executeDispatchesInOrderStopAtTrue:function(e){e:{var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r])){t=n[r];break e}}else if(t&&t(e,n)){t=n;break e}t=null}return e._dispatchInstances=null,e._dispatchListeners=null,t},hasDispatches:function(e){return!!e._dispatchListeners},getFiberCurrentPropsFromNode:function(e){return Bt.getFiberCurrentPropsFromNode(e)},getInstanceFromNode:function(e){return Bt.getInstanceFromNode(e)},getNodeFromInstance:function(e){return Bt.getNodeFromInstance(e)},injection:{injectComponentTree:function(e){Bt=e}}},ln=an,sn=null,cn=null,pn=null,fn={injection:{injectFiberControlledHostComponent:function(e){sn=e}},enqueueStateRestore:function(e){cn?pn?pn.push(e):pn=[e]:cn=e},restoreStateIfNeeded:function(){if(cn){var e=cn,t=pn;if(pn=cn=null,E(e),t)for(e=0;e<t.length;e++)E(t[e])}}},dn=!1,Dn={batchedUpdates:function(e,t){if(dn)return A(b,e,t);dn=!0;try{return A(b,e,t)}finally{dn=!1,fn.restoreStateIfNeeded()}},injection:{injectStackBatchedUpdates:function(e){A=e},injectFiberBatchedUpdates:function(e){F=e}}},hn=Lt.TEXT_NODE,gn=Rt.HostRoot,mn=[],Cn={_enabled:!0,_handleTopLevel:null,setHandleTopLevel:function(e){Cn._handleTopLevel=e},setEnabled:function(e){Cn._enabled=!!e},isEnabled:function(){return Cn._enabled},trapBubbledEvent:function(e,t,n){return n?Ct.listen(n,t,Cn.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){return n?Ct.capture(n,t,Cn.dispatchEvent.bind(null,e)):null},dispatchEvent:function(e,t){if(Cn._enabled){var n=y(t);if(n=Gt.getClosestInstanceFromNode(n),null===n||\"number\"!==typeof n.tag||rn.isFiberMounted(n)||(n=null),mn.length){var r=mn.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Dn.batchedUpdates(v,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>mn.length&&mn.push(e)}}}},En=Cn,An=null,Fn={injection:{injectEventPluginOrder:Pt.injectEventPluginOrder,injectEventPluginsByName:Pt.injectEventPluginsByName},getListener:function(e,t){if(\"number\"===typeof e.tag){var n=e.stateNode;if(!n)return null;var u=ln.getFiberCurrentPropsFromNode(n);if(!u)return null;if(n=u[t],S(t,e.type,u))return null}else{if(\"string\"===typeof(u=e._currentElement)||\"number\"===typeof u||!e._rootNodeID)return null;if(e=u.props,n=e[t],S(t,u.type,e))return null}return n&&\"function\"!==typeof n&&r(\"231\",t,typeof n),n},extractEvents:function(e,t,n,r){for(var u,o=Pt.plugins,a=0;a<o.length;a++){var i=o[a];i&&(i=i.extractEvents(e,t,n,r))&&(u=B(u,i))}return u},enqueueEvents:function(e){e&&(An=B(An,e))},processEventQueue:function(e){var t=An;An=null,e?w(t,x):w(t,T),An&&r(\"95\"),on.rethrowCaughtError()}};gt.canUseDOM&&(wt=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature(\"\",\"\"));var bn={animationend:N(\"Animation\",\"AnimationEnd\"),animationiteration:N(\"Animation\",\"AnimationIteration\"),animationstart:N(\"Animation\",\"AnimationStart\"),transitionend:N(\"Transition\",\"TransitionEnd\")},yn={},vn={};gt.canUseDOM&&(vn=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete bn.animationend.animation,delete bn.animationiteration.animation,delete bn.animationstart.animation),\"TransitionEvent\"in window||delete bn.transitionend.transition);var Bn={topAbort:\"abort\",topAnimationEnd:_(\"animationend\")||\"animationend\",topAnimationIteration:_(\"animationiteration\")||\"animationiteration\",topAnimationStart:_(\"animationstart\")||\"animationstart\",topBlur:\"blur\",topCancel:\"cancel\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topChange:\"change\",topClick:\"click\",topClose:\"close\",topCompositionEnd:\"compositionend\",topCompositionStart:\"compositionstart\",topCompositionUpdate:\"compositionupdate\",topContextMenu:\"contextmenu\",topCopy:\"copy\",topCut:\"cut\",topDoubleClick:\"dblclick\",topDrag:\"drag\",topDragEnd:\"dragend\",topDragEnter:\"dragenter\",topDragExit:\"dragexit\",topDragLeave:\"dragleave\",topDragOver:\"dragover\",topDragStart:\"dragstart\",topDrop:\"drop\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topFocus:\"focus\",topInput:\"input\",topKeyDown:\"keydown\",topKeyPress:\"keypress\",topKeyUp:\"keyup\",topLoadedData:\"loadeddata\",topLoad:\"load\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",topMouseDown:\"mousedown\",topMouseMove:\"mousemove\",topMouseOut:\"mouseout\",topMouseOver:\"mouseover\",topMouseUp:\"mouseup\",topPaste:\"paste\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topScroll:\"scroll\",topSeeked:\"seeked\",topSeeking:\"seeking\",topSelectionChange:\"selectionchange\",topStalled:\"stalled\",topSuspend:\"suspend\",topTextInput:\"textInput\",topTimeUpdate:\"timeupdate\",topToggle:\"toggle\",topTouchCancel:\"touchcancel\",topTouchEnd:\"touchend\",topTouchMove:\"touchmove\",topTouchStart:\"touchstart\",topTransitionEnd:_(\"transitionend\")||\"transitionend\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\",topWheel:\"wheel\"},wn={},kn=0,xn=\"_reactListenersID\"+(\"\"+Math.random()).slice(2),Tn=mt({},{handleTopLevel:function(e,t,n,r){e=Fn.extractEvents(e,t,n,r),Fn.enqueueEvents(e),Fn.processEventQueue(!1)}},{setEnabled:function(e){En&&En.setEnabled(e)},isEnabled:function(){return!(!En||!En.isEnabled())},listenTo:function(e,t){var n=O(t);e=Pt.registrationNameDependencies[e];for(var r=0;r<e.length;r++){var u=e[r];n.hasOwnProperty(u)&&n[u]||(\"topWheel\"===u?P(\"wheel\")?En.trapBubbledEvent(\"topWheel\",\"wheel\",t):P(\"mousewheel\")?En.trapBubbledEvent(\"topWheel\",\"mousewheel\",t):En.trapBubbledEvent(\"topWheel\",\"DOMMouseScroll\",t):\"topScroll\"===u?En.trapCapturedEvent(\"topScroll\",\"scroll\",t):\"topFocus\"===u||\"topBlur\"===u?(En.trapCapturedEvent(\"topFocus\",\"focus\",t),En.trapCapturedEvent(\"topBlur\",\"blur\",t),n.topBlur=!0,n.topFocus=!0):\"topCancel\"===u?(P(\"cancel\",!0)&&En.trapCapturedEvent(\"topCancel\",\"cancel\",t),n.topCancel=!0):\"topClose\"===u?(P(\"close\",!0)&&En.trapCapturedEvent(\"topClose\",\"close\",t),n.topClose=!0):Bn.hasOwnProperty(u)&&En.trapBubbledEvent(u,Bn[u],t),n[u]=!0)}},isListeningToAllDependencies:function(e,t){t=O(t),e=Pt.registrationNameDependencies[e];for(var n=0;n<e.length;n++){var r=e[n];if(!t.hasOwnProperty(r)||!t[r])return!1}return!0},trapBubbledEvent:function(e,t,n){return En.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return En.trapCapturedEvent(e,t,n)}}),Sn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pn=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Sn).forEach(function(e){Pn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Sn[t]=Sn[e]})});var Nn={isUnitlessNumber:Sn,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}},_n=Nn.isUnitlessNumber,On=!1;if(gt.canUseDOM){var In=document.createElement(\"div\").style;try{In.font=\"\"}catch(e){On=!0}}var Rn,Ln={createDangerousStringForStyles:function(){},setValueForStyles:function(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf(\"--\"),u=n,o=t[n];if(u=null==o||\"boolean\"===typeof o||\"\"===o?\"\":r||\"number\"!==typeof o||0===o||_n.hasOwnProperty(u)&&_n[u]?(\"\"+o).trim():o+\"px\",\"float\"===n&&(n=\"cssFloat\"),r)e.setProperty(n,u);else if(u)e[n]=u;else if(r=On&&Nn.shorthandPropertyExpansions[n])for(var a in r)e[a]=\"\";else e[n]=\"\"}}},Un=new RegExp(\"^[\"+It.ATTRIBUTE_NAME_START_CHAR+\"][\"+It.ATTRIBUTE_NAME_CHAR+\"]*$\"),Mn={},Hn={},qn={setAttributeForID:function(e,t){e.setAttribute(It.ID_ATTRIBUTE_NAME,t)},setAttributeForRoot:function(e){e.setAttribute(It.ROOT_ATTRIBUTE_NAME,\"\")},getValueForProperty:function(){},getValueForAttribute:function(){},setValueForProperty:function(e,t,n){var r=It.getPropertyInfo(t);if(r&&It.shouldSetAttribute(t,n)){var u=r.mutationMethod;u?u(e,n):null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&1>n||r.hasOverloadedBooleanValue&&!1===n?qn.deleteValueForProperty(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(u=r.attributeNamespace)?e.setAttributeNS(u,t,\"\"+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,\"\"):e.setAttribute(t,\"\"+n))}else qn.setValueForAttribute(e,t,It.shouldSetAttribute(t,n)?n:null)},setValueForAttribute:function(e,t,n){I(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,\"\"+n))},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=It.getPropertyInfo(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&\"\":e.removeAttribute(n.attributeName):e.removeAttribute(t)}},jn=qn,Vn=$t.ReactDebugCurrentFrame,Wn={current:null,phase:null,resetCurrentFiber:function(){Vn.getCurrentStack=null,Wn.current=null,Wn.phase=null},setCurrentFiber:function(e,t){Vn.getCurrentStack=R,Wn.current=e,Wn.phase=t},getCurrentFiberOwnerName:function(){return null},getCurrentFiberStackAddendum:R},zn=Wn,Kn={getHostProps:function(e,t){var n=t.value,r=t.checked;return mt({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})},initWrapperState:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:\"checkbox\"===t.type||\"radio\"===t.type?null!=t.checked:null!=t.value}},updateWrapper:function(e,t){var n=t.checked;null!=n&&jn.setValueForProperty(e,\"checked\",n||!1),n=t.value,null!=n?0===n&&\"\"===e.value?e.value=\"0\":\"number\"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=\"\"+n)):e.value!==\"\"+n&&(e.value=\"\"+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==\"\"+t.defaultValue&&(e.defaultValue=\"\"+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))},postMountWrapper:function(e,t){switch(t.type){case\"submit\":case\"reset\":break;case\"color\":case\"date\":case\"datetime\":case\"datetime-local\":case\"month\":case\"time\":case\"week\":e.value=\"\",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,\"\"!==t&&(e.name=\"\"),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,\"\"!==t&&(e.name=t)},restoreControlledState:function(e,t){Kn.updateWrapper(e,t);var n=t.name;if(\"radio\"===t.type&&null!=n){for(t=e;t.parentNode;)t=t.parentNode;for(n=t.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+n)+'][type=\"radio\"]'),t=0;t<n.length;t++){var u=n[t];if(u!==e&&u.form===e.form){var o=Gt.getFiberCurrentPropsFromNode(u);o||r(\"90\"),Kn.updateWrapper(u,o)}}}}},Gn=Kn,Yn={validateProps:function(){},postMountWrapper:function(e,t){null!=t.value&&e.setAttribute(\"value\",t.value)},getHostProps:function(e,t){return e=mt({children:void 0},t),(t=L(t.children))&&(e.children=t),e}},$n={getHostProps:function(e,t){return mt({},t,{value:void 0})},initWrapperState:function(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}},postMountWrapper:function(e,t){e.multiple=!!t.multiple;var n=t.value;null!=n?U(e,!!t.multiple,n):null!=t.defaultValue&&U(e,!!t.multiple,t.defaultValue)},postUpdateWrapper:function(e,t){e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!t.multiple;var r=t.value;null!=r?U(e,!!t.multiple,r):n!==!!t.multiple&&(null!=t.defaultValue?U(e,!!t.multiple,t.defaultValue):U(e,!!t.multiple,t.multiple?[]:\"\"))},restoreControlledState:function(e,t){var n=t.value;null!=n&&U(e,!!t.multiple,n)}},Qn={getHostProps:function(e,t){return null!=t.dangerouslySetInnerHTML&&r(\"91\"),mt({},t,{value:void 0,defaultValue:void 0,children:\"\"+e._wrapperState.initialValue})},initWrapperState:function(e,t){var n=t.value,u=n;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&r(\"92\"),Array.isArray(t)&&(1>=t.length||r(\"93\"),t=t[0]),n=\"\"+t),null==n&&(n=\"\"),u=n),e._wrapperState={initialValue:\"\"+u}},updateWrapper:function(e,t){var n=t.value;null!=n&&(n=\"\"+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)},restoreControlledState:function(e,t){Qn.updateWrapper(e,t)}},Xn=Qn,Jn=mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Zn={_getTrackerFromNode:function(e){return e._valueTracker},track:function(e){e._valueTracker||(e._valueTracker=q(e))},updateValueIfChanged:function(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=\"\";return e&&(r=H(e)?e.checked?\"true\":\"false\":e.value),(e=r)!==n&&(t.setValue(e),!0)},stopTracking:function(e){(e=e._valueTracker)&&e.stopTracking()}},er=kt.Namespaces,tr=function(e){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,u){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==er.svg||\"innerHTML\"in e)e.innerHTML=t;else for(Rn=Rn||document.createElement(\"div\"),Rn.innerHTML=\"<svg>\"+t+\"</svg>\",t=Rn.firstChild;t.firstChild;)e.appendChild(t.firstChild)}),nr=/[\"'&<>]/,rr=Lt.TEXT_NODE;gt.canUseDOM&&(\"textContent\"in document.documentElement||(V=function(e,t){if(e.nodeType===rr)e.nodeValue=t;else{if(\"boolean\"===typeof t||\"number\"===typeof t)t=\"\"+t;else{t=\"\"+t;var n=nr.exec(t);if(n){var r,u=\"\",o=0;for(r=n.index;r<t.length;r++){switch(t.charCodeAt(r)){case 34:n=\"&quot;\";break;case 38:n=\"&amp;\";break;case 39:n=\"&#x27;\";break;case 60:n=\"&lt;\";break;case 62:n=\"&gt;\";break;default:continue}o!==r&&(u+=t.substring(o,r)),o=r+1,u+=n}t=o!==r?u+t.substring(o,r):u}}tr(e,t)}}));var ur=V,or=(zn.getCurrentFiberOwnerName,Lt.DOCUMENT_NODE),ar=Lt.DOCUMENT_FRAGMENT_NODE,ir=Tn.listenTo,lr=Pt.registrationNameModules,sr=kt.Namespaces.html,cr=kt.getIntrinsicNamespace,pr={topAbort:\"abort\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topLoadedData:\"loadeddata\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topSeeked:\"seeked\",topSeeking:\"seeking\",topStalled:\"stalled\",topSuspend:\"suspend\",topTimeUpdate:\"timeupdate\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\"},fr={createElement:function(e,t,n,r){return n=n.nodeType===or?n:n.ownerDocument,r===sr&&(r=cr(e)),r===sr?\"script\"===e?(e=n.createElement(\"div\"),e.innerHTML=\"<script><\\/script>\",e=e.removeChild(e.firstChild)):e=\"string\"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e},createTextNode:function(e,t){return(t.nodeType===or?t:t.ownerDocument).createTextNode(e)},setInitialProperties:function(e,t,n,r){var u=j(t,n);switch(t){case\"iframe\":case\"object\":Tn.trapBubbledEvent(\"topLoad\",\"load\",e);var o=n;break;case\"video\":case\"audio\":for(o in pr)pr.hasOwnProperty(o)&&Tn.trapBubbledEvent(o,pr[o],e);o=n;break;case\"source\":Tn.trapBubbledEvent(\"topError\",\"error\",e),o=n;break;case\"img\":case\"image\":Tn.trapBubbledEvent(\"topError\",\"error\",e),Tn.trapBubbledEvent(\"topLoad\",\"load\",e),o=n;break;case\"form\":Tn.trapBubbledEvent(\"topReset\",\"reset\",e),Tn.trapBubbledEvent(\"topSubmit\",\"submit\",e),o=n;break;case\"details\":Tn.trapBubbledEvent(\"topToggle\",\"toggle\",e),o=n;break;case\"input\":Gn.initWrapperState(e,n),o=Gn.getHostProps(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(r,\"onChange\");break;case\"option\":Yn.validateProps(e,n),o=Yn.getHostProps(e,n);break;case\"select\":$n.initWrapperState(e,n),o=$n.getHostProps(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(r,\"onChange\");break;case\"textarea\":Xn.initWrapperState(e,n),o=Xn.getHostProps(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(r,\"onChange\");break;default:o=n}M(t,o);var a,i=o;for(a in i)if(i.hasOwnProperty(a)){var l=i[a];\"style\"===a?Ln.setValueForStyles(e,l):\"dangerouslySetInnerHTML\"===a?null!=(l=l?l.__html:void 0)&&tr(e,l):\"children\"===a?\"string\"===typeof l?ur(e,l):\"number\"===typeof l&&ur(e,\"\"+l):\"suppressContentEditableWarning\"!==a&&(lr.hasOwnProperty(a)?null!=l&&W(r,a):u?jn.setValueForAttribute(e,a,l):null!=l&&jn.setValueForProperty(e,a,l))}switch(t){case\"input\":Zn.track(e),Gn.postMountWrapper(e,n);break;case\"textarea\":Zn.track(e),Xn.postMountWrapper(e,n);break;case\"option\":Yn.postMountWrapper(e,n);break;case\"select\":$n.postMountWrapper(e,n);break;default:\"function\"===typeof o.onClick&&(e.onclick=Et)}},diffProperties:function(e,t,n,r,u){var o=null;switch(t){case\"input\":n=Gn.getHostProps(e,n),r=Gn.getHostProps(e,r),o=[];break;case\"option\":n=Yn.getHostProps(e,n),r=Yn.getHostProps(e,r),o=[];break;case\"select\":n=$n.getHostProps(e,n),r=$n.getHostProps(e,r),o=[];break;case\"textarea\":n=Xn.getHostProps(e,n),r=Xn.getHostProps(e,r),o=[];break;default:\"function\"!==typeof n.onClick&&\"function\"===typeof r.onClick&&(e.onclick=Et)}M(t,r);var a,i;e=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if(\"style\"===a)for(i in t=n[a])t.hasOwnProperty(i)&&(e||(e={}),e[i]=\"\");else\"dangerouslySetInnerHTML\"!==a&&\"children\"!==a&&\"suppressContentEditableWarning\"!==a&&(lr.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var l=r[a];if(t=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&l!==t&&(null!=l||null!=t))if(\"style\"===a)if(t){for(i in t)!t.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(e||(e={}),e[i]=\"\");for(i in l)l.hasOwnProperty(i)&&t[i]!==l[i]&&(e||(e={}),e[i]=l[i])}else e||(o||(o=[]),o.push(a,e)),e=l;else\"dangerouslySetInnerHTML\"===a?(l=l?l.__html:void 0,t=t?t.__html:void 0,null!=l&&t!==l&&(o=o||[]).push(a,\"\"+l)):\"children\"===a?t===l||\"string\"!==typeof l&&\"number\"!==typeof l||(o=o||[]).push(a,\"\"+l):\"suppressContentEditableWarning\"!==a&&(lr.hasOwnProperty(a)?(null!=l&&W(u,a),o||t===l||(o=[])):(o=o||[]).push(a,l))}return e&&(o=o||[]).push(\"style\",e),o},updateProperties:function(e,t,n,r,u){j(n,r),r=j(n,u);for(var o=0;o<t.length;o+=2){var a=t[o],i=t[o+1];\"style\"===a?Ln.setValueForStyles(e,i):\"dangerouslySetInnerHTML\"===a?tr(e,i):\"children\"===a?ur(e,i):r?null!=i?jn.setValueForAttribute(e,a,i):jn.deleteValueForAttribute(e,a):null!=i?jn.setValueForProperty(e,a,i):jn.deleteValueForProperty(e,a)}switch(n){case\"input\":Gn.updateWrapper(e,u),Zn.updateValueIfChanged(e);break;case\"textarea\":Xn.updateWrapper(e,u);break;case\"select\":$n.postUpdateWrapper(e,u)}},diffHydratedProperties:function(e,t,n,r,u){switch(t){case\"iframe\":case\"object\":Tn.trapBubbledEvent(\"topLoad\",\"load\",e);break;case\"video\":case\"audio\":for(var o in pr)pr.hasOwnProperty(o)&&Tn.trapBubbledEvent(o,pr[o],e);break;case\"source\":Tn.trapBubbledEvent(\"topError\",\"error\",e);break;case\"img\":case\"image\":Tn.trapBubbledEvent(\"topError\",\"error\",e),Tn.trapBubbledEvent(\"topLoad\",\"load\",e);break;case\"form\":Tn.trapBubbledEvent(\"topReset\",\"reset\",e),Tn.trapBubbledEvent(\"topSubmit\",\"submit\",e);break;case\"details\":Tn.trapBubbledEvent(\"topToggle\",\"toggle\",e);break;case\"input\":Gn.initWrapperState(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(u,\"onChange\");break;case\"option\":Yn.validateProps(e,n);break;case\"select\":$n.initWrapperState(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(u,\"onChange\");break;case\"textarea\":Xn.initWrapperState(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(u,\"onChange\")}M(t,n),r=null;for(var a in n)n.hasOwnProperty(a)&&(o=n[a],\"children\"===a?\"string\"===typeof o?e.textContent!==o&&(r=[\"children\",o]):\"number\"===typeof o&&e.textContent!==\"\"+o&&(r=[\"children\",\"\"+o]):lr.hasOwnProperty(a)&&null!=o&&W(u,a));switch(t){case\"input\":Zn.track(e),Gn.postMountWrapper(e,n);break;case\"textarea\":Zn.track(e),Xn.postMountWrapper(e,n);break;case\"select\":case\"option\":break;default:\"function\"===typeof n.onClick&&(e.onclick=Et)}return r},diffHydratedText:function(e,t){return e.nodeValue!==t},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case\"input\":Gn.restoreControlledState(e,n);break;case\"textarea\":Xn.restoreControlledState(e,n);break;case\"select\":$n.restoreControlledState(e,n)}}},dr=void 0;if(gt.canUseDOM)if(\"function\"!==typeof requestIdleCallback){var Dr=null,hr=null,gr=!1,mr=!1,Cr=0,Er=33,Ar=33,Fr={timeRemaining:\"object\"===typeof performance&&\"function\"===typeof performance.now?function(){return Cr-performance.now()}:function(){return Cr-Date.now()}},br=\"__reactIdleCallback$\"+Math.random().toString(36).slice(2);window.addEventListener(\"message\",function(e){e.source===window&&e.data===br&&(gr=!1,e=hr,hr=null,null!==e&&e(Fr))},!1);var yr=function(e){mr=!1;var t=e-Cr+Ar;t<Ar&&Er<Ar?(8>t&&(t=8),Ar=t<Er?Er:t):Er=t,Cr=e+Ar,gr||(gr=!0,window.postMessage(br,\"*\")),t=Dr,Dr=null,null!==t&&t(e)};dr=function(e){return hr=e,mr||(mr=!0,requestAnimationFrame(yr)),0}}else dr=requestIdleCallback;else dr=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0}})}),0};var vr,Br,wr={rIC:dr},kr={enableAsyncSubtreeAPI:!0},xr={NoWork:0,SynchronousPriority:1,TaskPriority:2,HighPriority:3,LowPriority:4,OffscreenPriority:5},Tr=Qt.Callback,Sr=xr.NoWork,Pr=xr.SynchronousPriority,Nr=xr.TaskPriority,_r=Rt.ClassComponent,Or=Rt.HostRoot,Ir=void 0,Rr=void 0,Lr={addUpdate:function(e,t,n,r){$(e,{priorityLevel:r,partialState:t,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:!1,next:null})},addReplaceUpdate:function(e,t,n,r){$(e,{priorityLevel:r,partialState:t,callback:n,isReplace:!0,isForced:!1,isTopLevelUnmount:!1,next:null})},addForceUpdate:function(e,t,n){$(e,{priorityLevel:n,partialState:null,callback:t,isReplace:!1,isForced:!0,isTopLevelUnmount:!1,next:null})},getUpdatePriority:function(e){var t=e.updateQueue;return null===t||e.tag!==_r&&e.tag!==Or?Sr:null!==t.first?t.first.priorityLevel:Sr},addTopLevelUpdate:function(e,t,n,r){var u=null===t.element;t={priorityLevel:r,partialState:t,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:u,next:null},e=$(e,t),u&&(u=Ir,n=Rr,null!==u&&null!==t.next&&(t.next=null,u.last=t),null!==n&&null!==e&&null!==e.next&&(e.next=null,n.last=t))},beginUpdateQueue:function(e,t,n,r,u,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={first:n.first,last:n.last,callbackList:null,hasForceUpdate:!1}),e=n.callbackList;for(var i=n.hasForceUpdate,l=!0,s=n.first;null!==s&&0>=z(s.priorityLevel,a);){n.first=s.next,null===n.first&&(n.last=null);var c;s.isReplace?(u=Q(s,r,u,o),l=!0):(c=Q(s,r,u,o))&&(u=l?mt({},u,c):mt(u,c),l=!1),s.isForced&&(i=!0),null===s.callback||s.isTopLevelUnmount&&null!==s.next||(e=null!==e?e:[],e.push(s.callback),t.effectTag|=Tr),s=s.next}return n.callbackList=e,n.hasForceUpdate=i,null!==n.first||null!==e||i||(t.updateQueue=null),u},commitCallbacks:function(e,t,n){if(null!==(e=t.callbackList))for(t.callbackList=null,t=0;t<e.length;t++){var u=e[t];\"function\"!==typeof u&&r(\"191\",u),u.call(n)}}},Ur=[],Mr=-1,Hr={createCursor:function(e){return{current:e}},isEmpty:function(){return-1===Mr},pop:function(e){0>Mr||(e.current=Ur[Mr],Ur[Mr]=null,Mr--)},push:function(e,t){Mr++,Ur[Mr]=e.current,e.current=t},reset:function(){for(;-1<Mr;)Ur[Mr]=null,Mr--}},qr=rn.isFiberMounted,jr=Rt.ClassComponent,Vr=Rt.HostRoot,Wr=Hr.createCursor,zr=Hr.pop,Kr=Hr.push,Gr=Wr(At),Yr=Wr(!1),$r=At,Qr={getUnmaskedContext:function(e){return J(e)?$r:Gr.current},cacheContext:X,getMaskedContext:function(e,t){var n=e.type.contextTypes;if(!n)return At;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var u,o={};for(u in n)o[u]=t[u];return r&&X(e,t,o),o},hasContextChanged:function(){return Yr.current},isContextConsumer:function(e){return e.tag===jr&&null!=e.type.contextTypes},isContextProvider:J,popContextProvider:function(e){J(e)&&(zr(Yr,e),zr(Gr,e))},popTopLevelContextObject:function(e){zr(Yr,e),zr(Gr,e)},pushTopLevelContextObject:function(e,t,n){null!=Gr.cursor&&r(\"168\"),Kr(Gr,t,e),Kr(Yr,n,e)},processChildContext:Z,pushContextProvider:function(e){if(!J(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||At,$r=Gr.current,Kr(Gr,t,e),Kr(Yr,Yr.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||r(\"169\"),t){var u=Z(e,$r);n.__reactInternalMemoizedMergedChildContext=u,zr(Yr,e),zr(Gr,e),Kr(Gr,u,e)}else zr(Yr,e);Kr(Yr,t,e)},resetContext:function(){$r=At,Gr.current=At,Yr.current=!1},findCurrentUnmaskedContext:function(e){for(qr(e)&&e.tag===jr?void 0:r(\"170\");e.tag!==Vr;){if(J(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||r(\"171\")}return e.stateNode.context}},Xr={NoContext:0,AsyncUpdates:1},Jr=Rt.IndeterminateComponent,Zr=Rt.ClassComponent,eu=Rt.HostRoot,tu=Rt.HostComponent,nu=Rt.HostText,ru=Rt.HostPortal,uu=Rt.CoroutineComponent,ou=Rt.YieldComponent,au=Rt.Fragment,iu=xr.NoWork,lu=Xr.NoContext,su=Qt.NoEffect,cu={createWorkInProgress:function(e,t){var n=e.alternate;return null===n?(n=new ee(e.tag,e.key,e.internalContextTag),n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.effectTag=su,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.pendingWorkPriority=t,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n},createHostRootFiber:function(){return new ee(eu,null,lu)},createFiberFromElement:function(e,t,n){return t=te(e.type,e.key,t),t.pendingProps=e.props,t.pendingWorkPriority=n,t},createFiberFromFragment:function(e,t,n){return t=new ee(au,null,t),t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromText:function(e,t,n){return t=new ee(nu,null,t),t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromElementType:te,createFiberFromHostInstanceForDeletion:function(){var e=new ee(tu,null,lu);return e.type=\"DELETED\",e},createFiberFromCoroutine:function(e,t,n){return t=new ee(uu,e.key,t),t.type=e.handler,t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromYield:function(e,t){return new ee(ou,null,t)},createFiberFromPortal:function(e,t,n){return t=new ee(ru,e.key,t),t.pendingProps=e.children||[],t.pendingWorkPriority=n,t.stateNode={containerInfo:e.containerInfo,implementation:e.implementation},t},largerPriority:function(e,t){return e!==iu&&(t===iu||t>e)?e:t}},pu=cu.createHostRootFiber,fu=Rt.IndeterminateComponent,du=Rt.FunctionalComponent,Du=Rt.ClassComponent,hu=Rt.HostComponent;\"function\"===typeof Symbol&&Symbol.for?(vr=Symbol.for(\"react.coroutine\"),Br=Symbol.for(\"react.yield\")):(vr=60104,Br=60105);var gu={createCoroutine:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:vr,key:null==r?null:\"\"+r,children:e,handler:t,props:n}},createYield:function(e){return{$$typeof:Br,value:e}},isCoroutine:function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===vr},isYield:function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===Br},REACT_YIELD_TYPE:Br,REACT_COROUTINE_TYPE:vr},mu=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.portal\")||60106,Cu={createPortal:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:mu,key:null==r?null:\"\"+r,children:e,containerInfo:t,implementation:n}},isPortal:function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===mu},REACT_PORTAL_TYPE:mu},Eu=gu.REACT_COROUTINE_TYPE,Au=gu.REACT_YIELD_TYPE,Fu=Cu.REACT_PORTAL_TYPE,bu=cu.createWorkInProgress,yu=cu.createFiberFromElement,vu=cu.createFiberFromFragment,Bu=cu.createFiberFromText,wu=cu.createFiberFromCoroutine,ku=cu.createFiberFromYield,xu=cu.createFiberFromPortal,Tu=Array.isArray,Su=Rt.FunctionalComponent,Pu=Rt.ClassComponent,Nu=Rt.HostText,_u=Rt.HostPortal,Ou=Rt.CoroutineComponent,Iu=Rt.YieldComponent,Ru=Rt.Fragment,Lu=Qt.NoEffect,Uu=Qt.Placement,Mu=Qt.Deletion,Hu=\"function\"===typeof Symbol&&Symbol.iterator,qu=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,ju=oe(!0,!0),Vu=oe(!1,!0),Wu=oe(!1,!1),zu={reconcileChildFibers:ju,reconcileChildFibersInPlace:Vu,mountChildFibersInPlace:Wu,cloneChildFibers:function(e,t){if(null!==e&&t.child!==e.child&&r(\"153\"),null!==t.child){e=t.child;var n=bu(e,e.pendingWorkPriority);for(n.pendingProps=e.pendingProps,t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=bu(e,e.pendingWorkPriority),n.pendingProps=e.pendingProps,n.return=t;n.sibling=null}}},Ku=Qt.Update,Gu=Xr.AsyncUpdates,Yu=Qr.cacheContext,$u=Qr.getMaskedContext,Qu=Qr.getUnmaskedContext,Xu=Qr.isContextConsumer,Ju=Lr.addUpdate,Zu=Lr.addReplaceUpdate,eo=Lr.addForceUpdate,to=Lr.beginUpdateQueue,no=Qr.hasContextChanged,ro=rn.isMounted,uo=zu.mountChildFibersInPlace,oo=zu.reconcileChildFibers,ao=zu.reconcileChildFibersInPlace,io=zu.cloneChildFibers,lo=Lr.beginUpdateQueue,so=Qr.getMaskedContext,co=Qr.getUnmaskedContext,po=Qr.hasContextChanged,fo=Qr.pushContextProvider,Do=Qr.pushTopLevelContextObject,ho=Qr.invalidateContextProvider,go=Rt.IndeterminateComponent,mo=Rt.FunctionalComponent,Co=Rt.ClassComponent,Eo=Rt.HostRoot,Ao=Rt.HostComponent,Fo=Rt.HostText,bo=Rt.HostPortal,yo=Rt.CoroutineComponent,vo=Rt.CoroutineHandlerPhase,Bo=Rt.YieldComponent,wo=Rt.Fragment,ko=xr.NoWork,xo=xr.OffscreenPriority,To=Qt.PerformedWork,So=Qt.Placement,Po=Qt.ContentReset,No=Qt.Err,_o=Qt.Ref,Oo=$t.ReactCurrentOwner,Io=zu.reconcileChildFibers,Ro=Qr.popContextProvider,Lo=Qr.popTopLevelContextObject,Uo=Rt.IndeterminateComponent,Mo=Rt.FunctionalComponent,Ho=Rt.ClassComponent,qo=Rt.HostRoot,jo=Rt.HostComponent,Vo=Rt.HostText,Wo=Rt.HostPortal,zo=Rt.CoroutineComponent,Ko=Rt.CoroutineHandlerPhase,Go=Rt.YieldComponent,Yo=Rt.Fragment,$o=Qt.Placement,Qo=Qt.Ref,Xo=Qt.Update,Jo=xr.OffscreenPriority,Zo=null,ea=null,ta={injectInternals:function(e){if(\"undefined\"===typeof{})return!1;var t={};if(!t.supportsFiber)return!0;try{var n=t.inject(e);Zo=se(function(e){return t.onCommitFiberRoot(n,e)}),ea=se(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0},onCommitRoot:function(e){\"function\"===typeof Zo&&Zo(e)},onCommitUnmount:function(e){\"function\"===typeof ea&&ea(e)}},na=Rt.ClassComponent,ra=Rt.HostRoot,ua=Rt.HostComponent,oa=Rt.HostText,aa=Rt.HostPortal,ia=Rt.CoroutineComponent,la=Lr.commitCallbacks,sa=ta.onCommitUnmount,ca=Qt.Placement,pa=Qt.Update,fa=Qt.Callback,da=Qt.ContentReset,Da=Hr.createCursor,ha=Hr.pop,ga=Hr.push,ma={},Ca=Rt.HostComponent,Ea=Rt.HostText,Aa=Rt.HostRoot,Fa=Qt.Deletion,ba=Qt.Placement,ya=cu.createFiberFromHostInstanceForDeletion,va=Qr.popContextProvider,Ba=Hr.reset,wa=$t.ReactCurrentOwner,ka=cu.createWorkInProgress,xa=cu.largerPriority,Ta=ta.onCommitRoot,Sa=xr.NoWork,Pa=xr.SynchronousPriority,Na=xr.TaskPriority,_a=xr.HighPriority,Oa=xr.LowPriority,Ia=xr.OffscreenPriority,Ra=Xr.AsyncUpdates,La=Qt.PerformedWork,Ua=Qt.Placement,Ma=Qt.Update,Ha=Qt.PlacementAndUpdate,qa=Qt.Deletion,ja=Qt.ContentReset,Va=Qt.Callback,Wa=Qt.Err,za=Qt.Ref,Ka=Rt.HostRoot,Ga=Rt.HostComponent,Ya=Rt.HostPortal,$a=Rt.ClassComponent,Qa=Lr.getUpdatePriority,Xa=Qr.resetContext;he._injectFiber=function(e){De=e};var Ja=Lr.addTopLevelUpdate,Za=Qr.findCurrentUnmaskedContext,ei=Qr.isContextProvider,ti=Qr.processChildContext,ni=Rt.HostComponent,ri=rn.findCurrentHostFiber,ui=rn.findCurrentHostFiberWithNoPortals;he._injectFiber(function(e){var t=Za(e);return ei(e)?ti(e,t,!1):t});var oi=Lt.TEXT_NODE,ai=null,ii={getOffsets:function(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,r=t.anchorOffset,u=t.focusNode,o=t.focusOffset,a=t.getRangeAt(0);try{a.startContainer.nodeType,a.endContainer.nodeType}catch(e){return null}t=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset?0:a.toString().length;var i=a.cloneRange();return i.selectNodeContents(e),i.setEnd(a.startContainer,a.startOffset),e=i.startContainer===i.endContainer&&i.startOffset===i.endOffset?0:i.toString().length,a=e+t,t=document.createRange(),t.setStart(n,r),t.setEnd(u,o),n=t.collapsed,{start:n?a:e,end:n?e:a}},setOffsets:function(e,t){if(window.getSelection){var n=window.getSelection(),r=e[Ce()].length,u=Math.min(t.start,r);if(t=void 0===t.end?u:Math.min(t.end,r),!n.extend&&u>t&&(r=t,t=u,u=r),r=me(e,u),e=me(e,t),r&&e){var o=document.createRange();o.setStart(r.node,r.offset),n.removeAllRanges(),u>t?(n.addRange(o),n.extend(e.node,e.offset)):(o.setEnd(e.node,e.offset),n.addRange(o))}}}},li=Lt.ELEMENT_NODE,si={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(\"input\"===t&&\"text\"===e.type||\"textarea\"===t||\"true\"===e.contentEditable)},getSelectionInformation:function(){var e=vt();return{focusedElem:e,selectionRange:si.hasSelectionCapabilities(e)?si.getSelection(e):null}},restoreSelection:function(e){var t=vt(),n=e.focusedElem;if(e=e.selectionRange,t!==n&&bt(document.documentElement,n)){for(si.hasSelectionCapabilities(n)&&si.setSelection(n,e),t=[],e=n;e=e.parentNode;)e.nodeType===li&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(yt(n),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}},getSelection:function(e){return(\"selectionStart\"in e?{start:e.selectionStart,end:e.selectionEnd}:ii.getOffsets(e))||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n),\"selectionStart\"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):ii.setOffsets(e,t)}},ci=si,pi=Lt.ELEMENT_NODE;Fe._injectFiber=function(e){Ee=e},Fe._injectStack=function(e){Ae=e};var fi=Rt.HostComponent,di={isAncestor:function(e,t){for(;t;){if(e===t||e===t.alternate)return!0;t=be(t)}return!1},getLowestCommonAncestor:ye,getParentInstance:function(e){return be(e)},traverseTwoPhase:function(e,t,n){for(var r=[];e;)r.push(e),e=be(e);for(e=r.length;0<e--;)t(r[e],\"captured\",n);for(e=0;e<r.length;e++)t(r[e],\"bubbled\",n)},traverseEnterLeave:function(e,t,n,r,u){for(var o=e&&t?ye(e,t):null,a=[];e&&e!==o;)a.push(e),e=be(e);for(e=[];t&&t!==o;)e.push(t),t=be(t);for(t=0;t<a.length;t++)n(a[t],\"bubbled\",r);for(t=e.length;0<t--;)n(e[t],\"captured\",u)}},Di=Fn.getListener,hi={accumulateTwoPhaseDispatches:function(e){w(e,Be)},accumulateTwoPhaseDispatchesSkipTarget:function(e){w(e,we)},accumulateDirectDispatches:function(e){w(e,xe)},accumulateEnterLeaveDispatches:function(e,t,n,r){di.traverseEnterLeave(n,r,ke,e,t)}},gi={_root:null,_startText:null,_fallbackText:null},mi={initialize:function(e){return gi._root=e,gi._startText=mi.getText(),!0},reset:function(){gi._root=null,gi._startText=null,gi._fallbackText=null},getData:function(){if(gi._fallbackText)return gi._fallbackText;var e,t,n=gi._startText,r=n.length,u=mi.getText(),o=u.length;for(e=0;e<r&&n[e]===u[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===u[o-t];t++);return gi._fallbackText=u.slice(e,1<t?1-t:void 0),gi._fallbackText},getText:function(){return\"value\"in gi._root?gi._root.value:gi._root[Ce()]}},Ci=mi,Ei=\"dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances\".split(\" \"),Ai={type:null,target:null,currentTarget:Et.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};mt(Te.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():\"unknown\"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Et.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():\"unknown\"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Et.thatReturnsTrue)},persist:function(){this.isPersistent=Et.thatReturnsTrue},isPersistent:Et.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<Ei.length;t++)this[Ei[t]]=null}}),Te.Interface=Ai,Te.augmentClass=function(e,t){function n(){}n.prototype=this.prototype;var r=new n;mt(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=mt({},this.Interface,t),e.augmentClass=this.augmentClass,Ne(e)},Ne(Te),Te.augmentClass(_e,{data:null}),Te.augmentClass(Oe,{data:null});var Fi=[9,13,27,32],bi=gt.canUseDOM&&\"CompositionEvent\"in window,yi=null;gt.canUseDOM&&\"documentMode\"in document&&(yi=document.documentMode);var vi;if(vi=gt.canUseDOM&&\"TextEvent\"in window&&!yi){var Bi=window.opera;vi=!(\"object\"===typeof Bi&&\"function\"===typeof Bi.version&&12>=parseInt(Bi.version(),10))}var wi=vi,ki=gt.canUseDOM&&(!bi||yi&&8<yi&&11>=yi),xi=String.fromCharCode(32),Ti={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"topCompositionEnd\",\"topKeyPress\",\"topTextInput\",\"topPaste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",captured:\"onCompositionStartCapture\"},dependencies:\"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")}},Si=!1,Pi=!1,Ni={eventTypes:Ti,extractEvents:function(e,t,n,r){var u;if(bi)e:{switch(e){case\"topCompositionStart\":var o=Ti.compositionStart;break e;case\"topCompositionEnd\":o=Ti.compositionEnd;break e;case\"topCompositionUpdate\":o=Ti.compositionUpdate;break e}o=void 0}else Pi?Ie(e,n)&&(o=Ti.compositionEnd):\"topKeyDown\"===e&&229===n.keyCode&&(o=Ti.compositionStart);return o?(ki&&(Pi||o!==Ti.compositionStart?o===Ti.compositionEnd&&Pi&&(u=Ci.getData()):Pi=Ci.initialize(r)),o=_e.getPooled(o,t,n,r),u?o.data=u:null!==(u=Re(n))&&(o.data=u),hi.accumulateTwoPhaseDispatches(o),u=o):u=null,(e=wi?Le(e,n):Ue(e,n))?(t=Oe.getPooled(Ti.beforeInput,t,n,r),t.data=e,hi.accumulateTwoPhaseDispatches(t)):t=null,[u,t]}},_i={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Oi={change:{phasedRegistrationNames:{bubbled:\"onChange\",captured:\"onChangeCapture\"},dependencies:\"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange\".split(\" \")}},Ii=null,Ri=null,Li=!1;gt.canUseDOM&&(Li=P(\"input\")&&(!document.documentMode||9<document.documentMode));var Ui={eventTypes:Oi,_isInputEventSupported:Li,extractEvents:function(e,t,n,r){var u=t?Gt.getNodeFromInstance(t):window,o=u.nodeName&&u.nodeName.toLowerCase();if(\"select\"===o||\"input\"===o&&\"file\"===u.type)var a=Ve;else if(Me(u))if(Li)a=$e;else{a=Ge;var i=Ke}else!(o=u.nodeName)||\"input\"!==o.toLowerCase()||\"checkbox\"!==u.type&&\"radio\"!==u.type||(a=Ye);if(a&&(a=a(e,t)))return He(a,n,r);i&&i(e,u,t),\"topBlur\"===e&&null!=t&&(e=t._wrapperState||u._wrapperState)&&e.controlled&&\"number\"===u.type&&(e=\"\"+u.value,u.getAttribute(\"value\")!==e&&u.setAttribute(\"value\",e))}};Te.augmentClass(Qe,{view:function(e){return e.view?e.view:(e=y(e),e.window===e?e:(e=e.ownerDocument)?e.defaultView||e.parentWindow:window)},detail:function(e){return e.detail||0}});var Mi={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};Qe.augmentClass(Ze,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Je,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}});var Hi={mouseEnter:{registrationName:\"onMouseEnter\",dependencies:[\"topMouseOut\",\"topMouseOver\"]},mouseLeave:{registrationName:\"onMouseLeave\",dependencies:[\"topMouseOut\",\"topMouseOver\"]}},qi={eventTypes:Hi,extractEvents:function(e,t,n,r){if(\"topMouseOver\"===e&&(n.relatedTarget||n.fromElement)||\"topMouseOut\"!==e&&\"topMouseOver\"!==e)return null;var u=r.window===r?r:(u=r.ownerDocument)?u.defaultView||u.parentWindow:window;if(\"topMouseOut\"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?Gt.getClosestInstanceFromNode(t):null):e=null,e===t)return null;var o=null==e?u:Gt.getNodeFromInstance(e);u=null==t?u:Gt.getNodeFromInstance(t);var a=Ze.getPooled(Hi.mouseLeave,e,n,r);return a.type=\"mouseleave\",a.target=o,a.relatedTarget=u,n=Ze.getPooled(Hi.mouseEnter,t,n,r),n.type=\"mouseenter\",n.target=u,n.relatedTarget=o,hi.accumulateEnterLeaveDispatches(a,n,e,t),[a,n]}},ji=Lt.DOCUMENT_NODE,Vi=gt.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Wi={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange\".split(\" \")}},zi=null,Ki=null,Gi=null,Yi=!1,$i=Tn.isListeningToAllDependencies,Qi={eventTypes:Wi,extractEvents:function(e,t,n,r){var u=r.window===r?r.document:r.nodeType===ji?r:r.ownerDocument;if(!u||!$i(\"onSelect\",u))return null;switch(u=t?Gt.getNodeFromInstance(t):window,e){case\"topFocus\":(Me(u)||\"true\"===u.contentEditable)&&(zi=u,Ki=t,Gi=null);break;case\"topBlur\":Gi=Ki=zi=null;break;case\"topMouseDown\":Yi=!0;break;case\"topContextMenu\":case\"topMouseUp\":return Yi=!1,et(n,r);case\"topSelectionChange\":if(Vi)break;case\"topKeyDown\":case\"topKeyUp\":return et(n,r)}return null}};Te.augmentClass(tt,{animationName:null,elapsedTime:null,pseudoElement:null}),Te.augmentClass(nt,{clipboardData:function(e){return\"clipboardData\"in e?e.clipboardData:window.clipboardData}}),Qe.augmentClass(rt,{relatedTarget:null});var Xi={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Ji={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"};Qe.augmentClass(ot,{key:function(e){if(e.key){var t=Xi[e.key]||e.key;if(\"Unidentified\"!==t)return t}return\"keypress\"===e.type?(e=ut(e),13===e?\"Enter\":String.fromCharCode(e)):\"keydown\"===e.type||\"keyup\"===e.type?Ji[e.keyCode]||\"Unidentified\":\"\"},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Je,charCode:function(e){return\"keypress\"===e.type?ut(e):0},keyCode:function(e){return\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0},which:function(e){return\"keypress\"===e.type?ut(e):\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0}}),Ze.augmentClass(at,{dataTransfer:null}),Qe.augmentClass(it,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Je}),Te.augmentClass(lt,{propertyName:null,elapsedTime:null,pseudoElement:null}),Ze.augmentClass(st,{deltaX:function(e){return\"deltaX\"in e?e.deltaX:\"wheelDeltaX\"in e?-e.wheelDeltaX:0},deltaY:function(e){return\"deltaY\"in e?e.deltaY:\"wheelDeltaY\"in e?-e.wheelDeltaY:\"wheelDelta\"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null});var Zi={},el={};\"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close 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 toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel\".split(\" \").forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n=\"on\"+t;t=\"top\"+t,n={phasedRegistrationNames:{bubbled:n,captured:n+\"Capture\"},dependencies:[t]},Zi[e]=n,el[t]=n});var tl={eventTypes:Zi,extractEvents:function(e,t,n,u){var o=el[e];if(!o)return null;switch(e){case\"topAbort\":case\"topCancel\":case\"topCanPlay\":case\"topCanPlayThrough\":case\"topClose\":case\"topDurationChange\":case\"topEmptied\":case\"topEncrypted\":case\"topEnded\":case\"topError\":case\"topInput\":case\"topInvalid\":case\"topLoad\":case\"topLoadedData\":case\"topLoadedMetadata\":case\"topLoadStart\":case\"topPause\":case\"topPlay\":case\"topPlaying\":case\"topProgress\":case\"topRateChange\":case\"topReset\":case\"topSeeked\":case\"topSeeking\":case\"topStalled\":case\"topSubmit\":case\"topSuspend\":case\"topTimeUpdate\":case\"topToggle\":case\"topVolumeChange\":case\"topWaiting\":var a=Te;break;case\"topKeyPress\":if(0===ut(n))return null;case\"topKeyDown\":case\"topKeyUp\":a=ot;break;case\"topBlur\":case\"topFocus\":a=rt;break;case\"topClick\":if(2===n.button)return null;case\"topDoubleClick\":case\"topMouseDown\":case\"topMouseMove\":case\"topMouseUp\":case\"topMouseOut\":case\"topMouseOver\":case\"topContextMenu\":a=Ze;break;case\"topDrag\":case\"topDragEnd\":case\"topDragEnter\":case\"topDragExit\":case\"topDragLeave\":case\"topDragOver\":case\"topDragStart\":case\"topDrop\":a=at;break;case\"topTouchCancel\":case\"topTouchEnd\":case\"topTouchMove\":case\"topTouchStart\":a=it;break;case\"topAnimationEnd\":case\"topAnimationIteration\":case\"topAnimationStart\":a=tt;break;case\"topTransitionEnd\":a=lt;break;case\"topScroll\":a=Qe;break;case\"topWheel\":a=st;break;case\"topCopy\":case\"topCut\":case\"topPaste\":a=nt}return a||r(\"86\",e),e=a.getPooled(o,t,n,u),hi.accumulateTwoPhaseDispatches(e),e}};En.setHandleTopLevel(Tn.handleTopLevel),Fn.injection.injectEventPluginOrder(\"ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \")),ln.injection.injectComponentTree(Gt),Fn.injection.injectEventPluginsByName({SimpleEventPlugin:tl,EnterLeaveEventPlugin:qi,ChangeEventPlugin:Ui,SelectEventPlugin:Qi,BeforeInputEventPlugin:Ni});var nl=It.injection.MUST_USE_PROPERTY,rl=It.injection.HAS_BOOLEAN_VALUE,ul=It.injection.HAS_NUMERIC_VALUE,ol=It.injection.HAS_POSITIVE_NUMERIC_VALUE,al=It.injection.HAS_STRING_BOOLEAN_VALUE,il={Properties:{allowFullScreen:rl,allowTransparency:al,async:rl,autoPlay:rl,capture:rl,checked:nl|rl,cols:ol,contentEditable:al,controls:rl,default:rl,defer:rl,disabled:rl,download:It.injection.HAS_OVERLOADED_BOOLEAN_VALUE,draggable:al,formNoValidate:rl,hidden:rl,loop:rl,multiple:nl|rl,muted:nl|rl,noValidate:rl,open:rl,playsInline:rl,readOnly:rl,required:rl,reversed:rl,rows:ol,rowSpan:ul,scoped:rl,seamless:rl,selected:nl|rl,size:ol,start:ul,span:ol,spellCheck:al,style:0,itemScope:rl,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:al},DOMAttributeNames:{acceptCharset:\"accept-charset\",className:\"class\",htmlFor:\"for\",httpEquiv:\"http-equiv\"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute(\"value\");\"number\"!==e.type||!1===e.hasAttribute(\"value\")?e.setAttribute(\"value\",\"\"+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute(\"value\",\"\"+t)}}},ll=It.injection.HAS_STRING_BOOLEAN_VALUE,sl={xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\"},cl={Properties:{autoReverse:ll,externalResourcesRequired:ll,preserveAlpha:ll},DOMAttributeNames:{autoReverse:\"autoReverse\",externalResourcesRequired:\"externalResourcesRequired\",preserveAlpha:\"preserveAlpha\"},DOMAttributeNamespaces:{xlinkActuate:sl.xlink,xlinkArcrole:sl.xlink,xlinkHref:sl.xlink,xlinkRole:sl.xlink,xlinkShow:sl.xlink,xlinkTitle:sl.xlink,xlinkType:sl.xlink,xmlBase:sl.xml,xmlLang:sl.xml,xmlSpace:sl.xml}},pl=/[\\-\\:]([a-z])/g;\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space\".split(\" \").forEach(function(e){var t=e.replace(pl,ct);cl.Properties[t]=0,cl.DOMAttributeNames[t]=e}),It.injection.injectDOMPropertyConfig(il),It.injection.injectDOMPropertyConfig(cl);var fl=ta.injectInternals,dl=Lt.ELEMENT_NODE,Dl=Lt.TEXT_NODE,hl=Lt.COMMENT_NODE,gl=Lt.DOCUMENT_NODE,ml=Lt.DOCUMENT_FRAGMENT_NODE,Cl=It.ROOT_ATTRIBUTE_NAME,El=kt.getChildNamespace,Al=fr.createElement,Fl=fr.createTextNode,bl=fr.setInitialProperties,yl=fr.diffProperties,vl=fr.updateProperties,Bl=fr.diffHydratedProperties,wl=fr.diffHydratedText,kl=fr.warnForDeletedHydratableElement,xl=fr.warnForDeletedHydratableText,Tl=fr.warnForInsertedHydratedElement,Sl=fr.warnForInsertedHydratedText,Pl=Gt.precacheFiberNode,Nl=Gt.updateFiberProps;fn.injection.injectFiberControlledHostComponent(fr),Fe._injectFiber(function(e){return Il.findHostInstance(e)});var _l=null,Ol=null,Il=function(e){var t=e.getPublicInstance;e=de(e);var n=e.scheduleUpdate,r=e.getPriorityContext;return{createContainer:function(e){var t=pu();return e={current:t,containerInfo:e,isScheduled:!1,nextScheduledRoot:null,context:null,pendingContext:null},t.stateNode=e},updateContainer:function(e,t,u,o){var a=t.current;u=he(u),null===t.context?t.context=u:t.pendingContext=u,t=o,o=r(a,kr.enableAsyncSubtreeAPI&&null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent),e={element:e},Ja(a,e,void 0===t?null:t,o),n(a,o)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case ni:return t(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:function(e){return e=ri(e),null===e?null:e.stateNode},findHostInstanceWithNoPortals:function(e){return e=ui(e),null===e?null:e.stateNode}}}({getRootHostContext:function(e){if(e.nodeType===gl)e=(e=e.documentElement)?e.namespaceURI:El(null,\"\");else{var t=e.nodeType===hl?e.parentNode:e;e=t.namespaceURI||null,t=t.tagName,e=El(e,t)}return e},getChildHostContext:function(e,t){return El(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){_l=Tn.isEnabled(),Ol=ci.getSelectionInformation(),Tn.setEnabled(!1)},resetAfterCommit:function(){ci.restoreSelection(Ol),Ol=null,Tn.setEnabled(_l),_l=null},createInstance:function(e,t,n,r,u){return e=Al(e,t,n,r),Pl(u,e),Nl(e,t),e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){bl(e,t,n,r);e:{switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":e=!!n.autoFocus;break e}e=!1}return e},prepareUpdate:function(e,t,n,r,u){return yl(e,t,n,r,u)},commitMount:function(e){e.focus()},commitUpdate:function(e,t,n,r,u){Nl(e,u),vl(e,t,n,r,u)},shouldSetTextContent:function(e,t){return\"textarea\"===e||\"string\"===typeof t.children||\"number\"===typeof t.children||\"object\"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&\"string\"===typeof t.dangerouslySetInnerHTML.__html},resetTextContent:function(e){e.textContent=\"\"},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return e=Fl(e,t),Pl(r,e),e},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){e.nodeType===hl?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){e.nodeType===hl?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){e.nodeType===hl?e.parentNode.removeChild(t):e.removeChild(t)},canHydrateInstance:function(e,t){return e.nodeType===dl&&t===e.nodeName.toLowerCase()},canHydrateTextInstance:function(e,t){return\"\"!==t&&e.nodeType===Dl},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&e.nodeType!==dl&&e.nodeType!==Dl;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&e.nodeType!==dl&&e.nodeType!==Dl;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,u,o){return Pl(o,e),Nl(e,n),Bl(e,t,n,u,r)},hydrateTextInstance:function(e,t,n){return Pl(n,e),wl(e,t)},didNotHydrateInstance:function(e,t){1===t.nodeType?kl(e,t):xl(e,t)},didNotFindHydratableInstance:function(e,t,n){Tl(e,t,n)},didNotFindHydratableTextInstance:function(e,t){Sl(e,t)},scheduleDeferredCallback:wr.rIC,useSyncScheduling:!0});Dn.injection.injectFiberBatchedUpdates(Il.batchedUpdates);var Rl={createPortal:Dt,hydrate:function(e,t,n){return dt(null,e,t,!0,n)},render:function(e,t,n){return dt(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,u){return null!=e&&Yt.has(e)||r(\"38\"),dt(e,t,n,!1,u)},unmountComponentAtNode:function(e){return pt(e)||r(\"40\"),!!e._reactRootContainer&&(Il.unbatchedUpdates(function(){dt(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},findDOMNode:Fe,unstable_createPortal:Dt,unstable_batchedUpdates:Dn.batchedUpdates,unstable_deferredUpdates:Il.deferredUpdates,flushSync:Il.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Fn,EventPluginRegistry:Pt,EventPropagators:hi,ReactControlledComponent:fn,ReactDOMComponentTree:Gt,ReactDOMEventListener:En}};fl({findFiberByHostInstance:Gt.getClosestInstanceFromNode,findHostInstanceByFiber:Il.findHostInstance,bundleType:0,version:\"16.0.0\",rendererPackageName:\"react-dom\"}),e.exports=Rl},function(e,t,n){\"use strict\";var r=!(\"undefined\"===typeof window||!window.document||!window.document.createElement),u={canUseDOM:r,canUseWorkers:\"undefined\"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=u},function(e,t,n){\"use strict\";var r=n(3),u={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent(\"on\"+t,n),{remove:function(){e.detachEvent(\"on\"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=u},function(e,t,n){\"use strict\";function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function u(e,t){if(r(e,t))return!0;if(\"object\"!==typeof e||null===e||\"object\"!==typeof t||null===t)return!1;var n=Object.keys(e),u=Object.keys(t);if(n.length!==u.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=u},function(e,t,n){\"use strict\";function r(e,t){return!(!e||!t)&&(e===t||!u(e)&&(u(t)?r(e,t.parentNode):\"contains\"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var u=n(31);e.exports=r},function(e,t,n){\"use strict\";function r(e){return u(e)&&3==e.nodeType}var u=n(32);e.exports=r},function(e,t,n){\"use strict\";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!(\"function\"===typeof n.Node?e instanceof n.Node:\"object\"===typeof e&&\"number\"===typeof e.nodeType&&\"string\"===typeof e.nodeName))}e.exports=r},function(e,t,n){\"use strict\";function r(e){try{e.focus()}catch(e){}}e.exports=r},function(e,t,n){\"use strict\";function r(e){if(\"undefined\"===typeof(e=e||(\"undefined\"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(7),s=n(8),c=n(9),p=n(10),f=n(11),d=n(39),D=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h={cursor:\"pointer\"},g=function(e){function t(){return r(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),D(t,[{key:\"render\",value:function(){var e=this.props,t=e.error,n=e.editorHandler,r=Object(d.a)(t),u=null!==r&&null!==n;return i.a.createElement(l.a,null,i.a.createElement(c.a,{headerText:\"Failed to compile\"}),i.a.createElement(\"a\",{onClick:u&&r?function(){return n(r)}:null,style:u?h:null},i.a.createElement(p.a,{main:!0,codeHTML:Object(f.a)(t)})),i.a.createElement(s.a,{line1:\"This error occurred during the build time and cannot be dismissed.\"}))}}]),t}(a.PureComponent);t.a=g},function(e,t,n){e.exports={XmlEntities:n(37),Html4Entities:n(38),Html5Entities:n(13),AllHtmlEntities:n(13)}},function(e,t){function n(){}var r={\"&lt\":\"<\",\"&gt\":\">\",\"&quot\":'\"',\"&apos\":\"'\",\"&amp\":\"&\",\"&lt;\":\"<\",\"&gt;\":\">\",\"&quot;\":'\"',\"&apos;\":\"'\",\"&amp;\":\"&\"},u={60:\"lt\",62:\"gt\",34:\"quot\",39:\"apos\",38:\"amp\"},o={\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&apos;\",\"&\":\"&amp;\"};n.prototype.encode=function(e){return e&&e.length?e.replace(/<|>|\"|'|&/g,function(e){return o[e]}):\"\"},n.encode=function(e){return(new n).encode(e)},n.prototype.decode=function(e){return e&&e.length?e.replace(/&#?[0-9a-zA-Z]+;?/g,function(e){if(\"#\"===e.charAt(1)){var t=\"x\"===e.charAt(2).toLowerCase()?parseInt(e.substr(3),16):parseInt(e.substr(2));return isNaN(t)||t<-32768||t>65535?\"\":String.fromCharCode(t)}return r[e]||e}):\"\"},n.decode=function(e){return(new n).decode(e)},n.prototype.encodeNonUTF=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var o=e.charCodeAt(r),a=u[o];a?(n+=\"&\"+a+\";\",r++):(n+=o<32||o>126?\"&#\"+o+\";\":e.charAt(r),r++)}return n},n.encodeNonUTF=function(e){return(new n).encodeNonUTF(e)},n.prototype.encodeNonASCII=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r);u<=255?n+=e[r++]:(n+=\"&#\"+u+\";\",r++)}return n},n.encodeNonASCII=function(e){return(new n).encodeNonASCII(e)},e.exports=n},function(e,t){function n(){}for(var r=[\"apos\",\"nbsp\",\"iexcl\",\"cent\",\"pound\",\"curren\",\"yen\",\"brvbar\",\"sect\",\"uml\",\"copy\",\"ordf\",\"laquo\",\"not\",\"shy\",\"reg\",\"macr\",\"deg\",\"plusmn\",\"sup2\",\"sup3\",\"acute\",\"micro\",\"para\",\"middot\",\"cedil\",\"sup1\",\"ordm\",\"raquo\",\"frac14\",\"frac12\",\"frac34\",\"iquest\",\"Agrave\",\"Aacute\",\"Acirc\",\"Atilde\",\"Auml\",\"Aring\",\"Aelig\",\"Ccedil\",\"Egrave\",\"Eacute\",\"Ecirc\",\"Euml\",\"Igrave\",\"Iacute\",\"Icirc\",\"Iuml\",\"ETH\",\"Ntilde\",\"Ograve\",\"Oacute\",\"Ocirc\",\"Otilde\",\"Ouml\",\"times\",\"Oslash\",\"Ugrave\",\"Uacute\",\"Ucirc\",\"Uuml\",\"Yacute\",\"THORN\",\"szlig\",\"agrave\",\"aacute\",\"acirc\",\"atilde\",\"auml\",\"aring\",\"aelig\",\"ccedil\",\"egrave\",\"eacute\",\"ecirc\",\"euml\",\"igrave\",\"iacute\",\"icirc\",\"iuml\",\"eth\",\"ntilde\",\"ograve\",\"oacute\",\"ocirc\",\"otilde\",\"ouml\",\"divide\",\"oslash\",\"ugrave\",\"uacute\",\"ucirc\",\"uuml\",\"yacute\",\"thorn\",\"yuml\",\"quot\",\"amp\",\"lt\",\"gt\",\"OElig\",\"oelig\",\"Scaron\",\"scaron\",\"Yuml\",\"circ\",\"tilde\",\"ensp\",\"emsp\",\"thinsp\",\"zwnj\",\"zwj\",\"lrm\",\"rlm\",\"ndash\",\"mdash\",\"lsquo\",\"rsquo\",\"sbquo\",\"ldquo\",\"rdquo\",\"bdquo\",\"dagger\",\"Dagger\",\"permil\",\"lsaquo\",\"rsaquo\",\"euro\",\"fnof\",\"Alpha\",\"Beta\",\"Gamma\",\"Delta\",\"Epsilon\",\"Zeta\",\"Eta\",\"Theta\",\"Iota\",\"Kappa\",\"Lambda\",\"Mu\",\"Nu\",\"Xi\",\"Omicron\",\"Pi\",\"Rho\",\"Sigma\",\"Tau\",\"Upsilon\",\"Phi\",\"Chi\",\"Psi\",\"Omega\",\"alpha\",\"beta\",\"gamma\",\"delta\",\"epsilon\",\"zeta\",\"eta\",\"theta\",\"iota\",\"kappa\",\"lambda\",\"mu\",\"nu\",\"xi\",\"omicron\",\"pi\",\"rho\",\"sigmaf\",\"sigma\",\"tau\",\"upsilon\",\"phi\",\"chi\",\"psi\",\"omega\",\"thetasym\",\"upsih\",\"piv\",\"bull\",\"hellip\",\"prime\",\"Prime\",\"oline\",\"frasl\",\"weierp\",\"image\",\"real\",\"trade\",\"alefsym\",\"larr\",\"uarr\",\"rarr\",\"darr\",\"harr\",\"crarr\",\"lArr\",\"uArr\",\"rArr\",\"dArr\",\"hArr\",\"forall\",\"part\",\"exist\",\"empty\",\"nabla\",\"isin\",\"notin\",\"ni\",\"prod\",\"sum\",\"minus\",\"lowast\",\"radic\",\"prop\",\"infin\",\"ang\",\"and\",\"or\",\"cap\",\"cup\",\"int\",\"there4\",\"sim\",\"cong\",\"asymp\",\"ne\",\"equiv\",\"le\",\"ge\",\"sub\",\"sup\",\"nsub\",\"sube\",\"supe\",\"oplus\",\"otimes\",\"perp\",\"sdot\",\"lceil\",\"rceil\",\"lfloor\",\"rfloor\",\"lang\",\"rang\",\"loz\",\"spades\",\"clubs\",\"hearts\",\"diams\"],u=[39,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,34,38,60,62,338,339,352,353,376,710,732,8194,8195,8201,8204,8205,8206,8207,8211,8212,8216,8217,8218,8220,8221,8222,8224,8225,8240,8249,8250,8364,402,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,977,978,982,8226,8230,8242,8243,8254,8260,8472,8465,8476,8482,8501,8592,8593,8594,8595,8596,8629,8656,8657,8658,8659,8660,8704,8706,8707,8709,8711,8712,8713,8715,8719,8721,8722,8727,8730,8733,8734,8736,8743,8744,8745,8746,8747,8756,8764,8773,8776,8800,8801,8804,8805,8834,8835,8836,8838,8839,8853,8855,8869,8901,8968,8969,8970,8971,9001,9002,9674,9824,9827,9829,9830],o={},a={},i=0,l=r.length;i<l;){var s=r[i],c=u[i];o[s]=String.fromCharCode(c),a[c]=s,i++}n.prototype.decode=function(e){return e&&e.length?e.replace(/&(#?[\\w\\d]+);?/g,function(e,t){var n;if(\"#\"===t.charAt(0)){var r=\"x\"===t.charAt(1).toLowerCase()?parseInt(t.substr(2),16):parseInt(t.substr(1));isNaN(r)||r<-32768||r>65535||(n=String.fromCharCode(r))}else n=o[t];return n||e}):\"\"},n.decode=function(e){return(new n).decode(e)},n.prototype.encode=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=a[e.charCodeAt(r)];n+=u?\"&\"+u+\";\":e.charAt(r),r++}return n},n.encode=function(e){return(new n).encode(e)},n.prototype.encodeNonUTF=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r),o=a[u];n+=o?\"&\"+o+\";\":u<32||u>126?\"&#\"+u+\";\":e.charAt(r),r++}return n},n.encodeNonUTF=function(e){return(new n).encodeNonUTF(e)},n.prototype.encodeNonASCII=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r);u<=255?n+=e[r++]:(n+=\"&#\"+u+\";\",r++)}return n},n.encodeNonASCII=function(e){return(new n).encodeNonASCII(e)},e.exports=n},function(e,t,n){\"use strict\";function r(e){for(var t=e.split(\"\\n\"),n=\"\",r=0,u=0;u<t.length;u++){var l=o.a.ansiToText(t[u]).trim();if(l){!n&&l.match(a)&&(n=l);for(var s=0;s<i.length;){var c=l.match(i[s]);if(c){r=parseInt(c[1],10);break}s++}if(n&&r)break}}return n&&r?{fileName:n,lineNumber:r}:null}var u=n(12),o=n.n(u),a=/^\\.(\\/[^\\/\\n ]+)+\\.[^\\/\\n ]+$/,i=[/^.*\\((\\d+):(\\d+)\\)$/,/^Line (\\d+):.+$/];t.a=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(7),s=n(41),c=n(42),p=n(43),f=n(8),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),D=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={currentIndex:0},o.previous=function(){o.setState(function(e,t){return{currentIndex:e.currentIndex>0?e.currentIndex-1:t.errorRecords.length-1}})},o.next=function(){o.setState(function(e,t){return{currentIndex:e.currentIndex<t.errorRecords.length-1?e.currentIndex+1:0}})},o.shortcutHandler=function(e){\"Escape\"===e?o.props.close():\"ArrowLeft\"===e?o.previous():\"ArrowRight\"===e&&o.next()},a=n,u(o,a)}return o(t,e),d(t,[{key:\"render\",value:function(){var e=this.props,t=e.errorRecords,n=e.close,r=t.length;return i.a.createElement(l.a,{shortcutHandler:this.shortcutHandler},i.a.createElement(s.a,{close:n}),r>1&&i.a.createElement(c.a,{currentError:this.state.currentIndex+1,totalErrors:r,previous:this.previous,next:this.next}),i.a.createElement(p.a,{errorRecord:t[this.state.currentIndex],editorHandler:this.props.editorHandler}),i.a.createElement(f.a,{line1:\"This screen is visible only in development. It will not appear if the app crashes in production.\",line2:\"Open your browser’s developer console to further inspect this error.\"}))}}]),t}(a.PureComponent);t.a=D},function(e,t,n){\"use strict\";function r(e){var t=e.close;return o.a.createElement(\"span\",{title:\"Click or press Escape to dismiss.\",onClick:t,style:i},\"×\")}var u=n(0),o=n.n(u),a=n(1),i={color:a.a,lineHeight:\"1rem\",fontSize:\"1.5rem\",padding:\"1rem\",cursor:\"pointer\",position:\"absolute\",right:0,top:0};t.a=r},function(e,t,n){\"use strict\";function r(e){var t=e.currentError,n=e.totalErrors,r=e.previous,u=e.next;return o.a.createElement(\"div\",{style:i},o.a.createElement(\"span\",{style:l},o.a.createElement(\"button\",{onClick:r,style:c},\"←\"),o.a.createElement(\"button\",{onClick:u,style:p},\"→\")),t+\" of \"+n+\" errors on the page\")}var u=n(0),o=n.n(u),a=n(1),i={marginBottom:\"0.5rem\"},l={marginRight:\"1em\"},s={backgroundColor:a.f,color:a.e,border:\"none\",borderRadius:\"4px\",padding:\"3px 6px\",cursor:\"pointer\"},c=Object.assign({},s,{borderTopRightRadius:\"0px\",borderBottomRightRadius:\"0px\",marginRight:\"1px\"}),p=Object.assign({},s,{borderTopLeftRadius:\"0px\",borderBottomLeftRadius:\"0px\"});t.a=r},function(e,t,n){\"use strict\";function r(e){var t=e.errorRecord,n=e.editorHandler,r=t.error,u=t.unhandledRejection,s=t.contextSize,c=t.stackFrames,p=u?\"Unhandled Rejection (\"+r.name+\")\":r.name,f=r.message,d=f.match(/^\\w*:/)||!p?f:p+\": \"+f;return d=d.replace(/^Invariant Violation:\\s*/,\"\").replace(/^Warning:\\s*/,\"\").replace(\" Check the render method\",\"\\n\\nCheck the render method\").replace(\" Check your code at\",\"\\n\\nCheck your code at\"),o.a.createElement(\"div\",{style:l},o.a.createElement(a.a,{headerText:d}),o.a.createElement(i.a,{stackFrames:c,errorName:p,contextSize:s,editorHandler:n}))}var u=n(0),o=n.n(u),a=n(9),i=n(44),l={display:\"flex\",flexDirection:\"column\"};t.a=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(45),s=n(61),c=n(62),p=n(63),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d={fontSize:\"1em\",flex:\"0 1 auto\",minHeight:\"0px\",overflow:\"auto\"},D=function(e){function t(){return r(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),f(t,[{key:\"renderFrames\",value:function(){var e=this.props,t=e.stackFrames,n=e.errorName,r=e.contextSize,u=e.editorHandler,o=[],a=!1,f=[],d=0;return t.forEach(function(e,D){var h=e.fileName,g=e._originalFileName,m=Object(c.a)(g,h),C=!Object(p.a)(n),E=m&&(C||a);m||(a=!0);var A=i.a.createElement(l.a,{key:\"frame-\"+D,frame:e,contextSize:r,critical:0===D,showCode:!E,editorHandler:u}),F=D===t.length-1;E&&f.push(A),E&&!F||(1===f.length?o.push(f[0]):f.length>1&&(d++,o.push(i.a.createElement(s.a,{key:\"bundle-\"+d},f))),f=[]),E||o.push(A)}),o}},{key:\"render\",value:function(){return i.a.createElement(\"div\",{style:d},this.renderFrames())}}]),t}(a.Component);t.a=D},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(46),s=n(60),c=n(1),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f={fontSize:\"0.9em\",marginBottom:\"0.9em\"},d={textDecoration:\"none\",color:c.b,cursor:\"pointer\"},D={cursor:\"pointer\"},h={marginBottom:\"1.5em\",color:c.b,cursor:\"pointer\",border:\"none\",display:\"block\",width:\"100%\",textAlign:\"left\",background:\"#fff\",fontFamily:\"Consolas, Menlo, monospace\",fontSize:\"1em\",padding:\"0px\",lineHeight:\"1.5\"},g=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={compiled:!1},o.toggleCompiled=function(){o.setState(function(e){return{compiled:!e.compiled}})},o.editorHandler=function(){var e=o.getErrorLocation();e&&o.props.editorHandler(e)},o.onKeyDown=function(e){\"Enter\"===e.key&&o.editorHandler()},a=n,u(o,a)}return o(t,e),p(t,[{key:\"getErrorLocation\",value:function(){var e=this.props.frame,t=e._originalFileName,n=e._originalLineNumber;return t?-1!==t.trim().indexOf(\" \")?null:{fileName:t,lineNumber:n||1}:null}},{key:\"render\",value:function(){var e=this.props,t=e.frame,n=e.contextSize,r=e.critical,u=e.showCode,o=t.fileName,a=t.lineNumber,c=t.columnNumber,p=t._scriptCode,g=t._originalFileName,m=t._originalLineNumber,C=t._originalColumnNumber,E=t._originalScriptCode,A=t.getFunctionName(),F=this.state.compiled,b=Object(s.a)(g,m,C,o,a,c,F),y=null;u&&(F&&p&&0!==p.length&&null!=a?y={lines:p,lineNum:a,columnNum:c,contextSize:n,main:r}:!F&&E&&0!==E.length&&null!=m&&(y={lines:E,lineNum:m,columnNum:C,contextSize:n,main:r}));var v=null!==this.getErrorLocation()&&null!==this.props.editorHandler;return i.a.createElement(\"div\",null,i.a.createElement(\"div\",null,A),i.a.createElement(\"div\",{style:f},i.a.createElement(\"a\",{style:v?d:null,onClick:v?this.editorHandler:null,onKeyDown:v?this.onKeyDown:null,tabIndex:v?\"0\":null},b)),y&&i.a.createElement(\"span\",null,i.a.createElement(\"a\",{onClick:v?this.editorHandler:null,style:v?D:null},i.a.createElement(l.a,y)),i.a.createElement(\"button\",{style:h,onClick:this.toggleCompiled},\"View \"+(F?\"source\":\"compiled\"))))}}]),t}(a.Component);t.a=g},function(e,t,n){\"use strict\";function r(e){var t=e.lines,n=e.lineNum,r=e.columnNum,u=e.contextSize,p=e.main,d=[],D=1/0;t.forEach(function(e){var t=e.content,n=t.match(/^\\s*/);\"\"!==t&&(D=n&&n[0]?Math.min(D,n[0].length):0)}),t.forEach(function(e){var t=e.content,n=e.lineNumber;isFinite(D)&&(t=t.substring(D)),d[n-1]=t});var h=f()(d.join(\"\\n\"),n,null==r?0:r-(isFinite(D)?D:0),{forceColor:!0,linesAbove:u,linesBelow:u}),g=Object(c.a)(h),m=document.createElement(\"code\");m.innerHTML=g,Object(l.a)(m);var C=m.childNodes;e:for(var E=0;E<C.length;++E)for(var A=C[E],F=A.childNodes,b=0;b<F.length;++b){var y=F[b],v=y.innerText;if(null!=v&&-1!==v.indexOf(\" \"+n+\" |\")){Object(i.a)(A,p?s.d:s.g);break e}}return o.a.createElement(a.a,{main:p,codeHTML:m.innerHTML})}var u=n(0),o=n.n(u),a=n(10),i=n(14),l=n(47),s=n(1),c=n(11),p=n(48),f=n.n(p);t.a=r},function(e,t,n){\"use strict\";function r(e,t){for(;null!=t&&\"br\"!==t.tagName.toLowerCase();)t=t.nextElementSibling;null!=t&&e.removeChild(t)}function u(e){for(var t=e.childNodes,n=0;n<t.length;++n){var u=t[n];if(\"span\"===u.tagName.toLowerCase()){var o=u.innerText;if(null!=o){\"|^\"===o.replace(/\\s/g,\"\")&&(u.style.position=\"absolute\",r(e,u))}}}}n.d(t,\"a\",function(){return u})},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function u(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function o(e){var t=e.slice(-2),n=t[0],r=t[1],u=(0,i.matchToToken)(e);if(\"name\"===u.type){if(c.default.keyword.isReservedWordES6(u.value))return\"keyword\";if(D.test(u.value)&&(\"<\"===r[n-1]||\"</\"==r.substr(n-2,2)))return\"jsx_tag\";if(u.value[0]!==u.value[0].toLowerCase())return\"capitalized\"}return\"punctuator\"===u.type&&h.test(u.value)?\"bracket\":u.type}function a(e,t){return t.replace(l.default,function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var u=o(n),a=e[u];return a?n[0].split(d).map(function(e){return a(e)}).join(\"\\n\"):n[0]})}t.__esModule=!0,t.default=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n=Math.max(n,0);var o=r.highlightCode&&f.default.supportsColor||r.forceColor,i=f.default;r.forceColor&&(i=new f.default.constructor({enabled:!0}));var l=function(e,t){return o?e(t):t},s=u(i);o&&(e=a(s,e));var c=r.linesAbove||2,p=r.linesBelow||3,D=e.split(d),h=Math.max(t-(c+1),0),g=Math.min(D.length,t+p);t||n||(h=0,g=D.length);var m=String(g).length,C=D.slice(h,g).map(function(e,r){var u=h+1+r,o=(\" \"+u).slice(-m),a=\" \"+o+\" | \";if(u===t){var i=\"\";if(n){var c=e.slice(0,n-1).replace(/[^\\t]/g,\" \");i=[\"\\n \",l(s.gutter,a.replace(/\\d/g,\" \")),c,l(s.marker,\"^\")].join(\"\")}return[l(s.marker,\">\"),l(s.gutter,a),e,i].join(\"\")}return\" \"+l(s.gutter,a)+e}).join(\"\\n\");return o?i.reset(C):C};var i=n(49),l=r(i),s=n(50),c=r(s),p=n(53),f=r(p),d=/\\r\\n|[\\n\\r\\u2028\\u2029]/,D=/^[a-z][\\w-]*$/i,h=/^[()\\[\\]{}]$/;e.exports=t.default},function(e,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=/((['\"])(?:(?!\\2|\\\\).|\\\\(?:\\r\\n|[\\s\\S]))*(\\2)?|`(?:[^`\\\\$]|\\\\[\\s\\S]|\\$(?!\\{)|\\$\\{(?:[^{}]|\\{[^}]*\\}?)*\\}?)*(`)?)|(\\/\\/.*)|(\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?)|(\\/(?!\\*)(?:\\[(?:(?![\\]\\\\]).|\\\\.)*\\]|(?![\\/\\]\\\\]).|\\\\.)+\\/(?:(?!\\s*(?:\\b|[\\u0080-\\uFFFF$\\\\'\"~({]|[+\\-!](?!=)|\\.?\\d))|[gmiyu]{1,5}\\b(?![\\u0080-\\uFFFF$\\\\]|\\s*(?:[+\\-*%&|^<>!=?({]|\\/(?![\\/*])))))|(0[xX][\\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][+-]?\\d+)?)|((?!\\d)(?:(?!\\s)[$\\w\\u0080-\\uFFFF]|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+)|(--|\\+\\+|&&|\\|\\||=>|\\.{3}|(?:[+\\-\\/%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\\](){}])|(\\s+)|(^$|[\\s\\S])/g,t.matchToToken=function(e){var t={type:\"invalid\",value:e[0]};return e[1]?(t.type=\"string\",t.closed=!(!e[3]&&!e[4])):e[5]?t.type=\"comment\":e[6]?(t.type=\"comment\",t.closed=!!e[7]):e[8]?t.type=\"regex\":e[9]?t.type=\"number\":e[10]?t.type=\"name\":e[11]?t.type=\"punctuator\":e[12]&&(t.type=\"whitespace\"),t}},function(e,t,n){!function(){\"use strict\";t.ast=n(51),t.code=n(15),t.keyword=n(52)}()},function(e,t){!function(){\"use strict\";function t(e){if(null==e)return!1;switch(e.type){case\"ArrayExpression\":case\"AssignmentExpression\":case\"BinaryExpression\":case\"CallExpression\":case\"ConditionalExpression\":case\"FunctionExpression\":case\"Identifier\":case\"Literal\":case\"LogicalExpression\":case\"MemberExpression\":case\"NewExpression\":case\"ObjectExpression\":case\"SequenceExpression\":case\"ThisExpression\":case\"UnaryExpression\":case\"UpdateExpression\":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case\"DoWhileStatement\":case\"ForInStatement\":case\"ForStatement\":case\"WhileStatement\":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case\"BlockStatement\":case\"BreakStatement\":case\"ContinueStatement\":case\"DebuggerStatement\":case\"DoWhileStatement\":case\"EmptyStatement\":case\"ExpressionStatement\":case\"ForInStatement\":case\"ForStatement\":case\"IfStatement\":case\"LabeledStatement\":case\"ReturnStatement\":case\"SwitchStatement\":case\"ThrowStatement\":case\"TryStatement\":case\"VariableDeclaration\":case\"WhileStatement\":case\"WithStatement\":return!0}return!1}function u(e){return r(e)||null!=e&&\"FunctionDeclaration\"===e.type}function o(e){switch(e.type){case\"IfStatement\":return null!=e.alternate?e.alternate:e.consequent;case\"LabeledStatement\":case\"ForStatement\":case\"ForInStatement\":case\"WhileStatement\":case\"WithStatement\":return e.body}return null}function a(e){var t;if(\"IfStatement\"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if(\"IfStatement\"===t.type&&null==t.alternate)return!0;t=o(t)}while(t);return!1}e.exports={isExpression:t,isStatement:r,isIterationStatement:n,isSourceElement:u,isProblematicIfStatement:a,trailingStatement:o}}()},function(e,t,n){!function(){\"use strict\";function t(e){switch(e){case\"implements\":case\"interface\":case\"package\":case\"private\":case\"protected\":case\"public\":case\"static\":case\"let\":return!0;default:return!1}}function r(e,t){return!(!t&&\"yield\"===e)&&u(e,t)}function u(e,n){if(n&&t(e))return!0;switch(e.length){case 2:return\"if\"===e||\"in\"===e||\"do\"===e;case 3:return\"var\"===e||\"for\"===e||\"new\"===e||\"try\"===e;case 4:return\"this\"===e||\"else\"===e||\"case\"===e||\"void\"===e||\"with\"===e||\"enum\"===e;case 5:return\"while\"===e||\"break\"===e||\"catch\"===e||\"throw\"===e||\"const\"===e||\"yield\"===e||\"class\"===e||\"super\"===e;case 6:return\"return\"===e||\"typeof\"===e||\"delete\"===e||\"switch\"===e||\"export\"===e||\"import\"===e;case 7:return\"default\"===e||\"finally\"===e||\"extends\"===e;case 8:return\"function\"===e||\"continue\"===e||\"debugger\"===e;case 10:return\"instanceof\"===e;default:return!1}}function o(e,t){return\"null\"===e||\"true\"===e||\"false\"===e||r(e,t)}function a(e,t){return\"null\"===e||\"true\"===e||\"false\"===e||u(e,t)}function i(e){return\"eval\"===e||\"arguments\"===e}function l(e){var t,n,r;if(0===e.length)return!1;if(r=e.charCodeAt(0),!d.isIdentifierStartES5(r))return!1;for(t=1,n=e.length;t<n;++t)if(r=e.charCodeAt(t),!d.isIdentifierPartES5(r))return!1;return!0}function s(e,t){return 1024*(e-55296)+(t-56320)+65536}function c(e){var t,n,r,u,o;if(0===e.length)return!1;for(o=d.isIdentifierStartES6,t=0,n=e.length;t<n;++t){if(55296<=(r=e.charCodeAt(t))&&r<=56319){if(++t>=n)return!1;if(!(56320<=(u=e.charCodeAt(t))&&u<=57343))return!1;r=s(r,u)}if(!o(r))return!1;o=d.isIdentifierPartES6}return!0}function p(e,t){return l(e)&&!o(e,t)}function f(e,t){return c(e)&&!a(e,t)}var d=n(15);e.exports={isKeywordES5:r,isKeywordES6:u,isReservedWordES5:o,isReservedWordES6:a,isRestrictedWord:i,isIdentifierNameES5:l,isIdentifierNameES6:c,isIdentifierES5:p,isIdentifierES6:f}}()},function(e,t,n){\"use strict\";(function(t){function r(e){this.enabled=e&&void 0!==e.enabled?e.enabled:c}function u(e){var t=function(){return o.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=D,t}function o(){var e=arguments,t=e.length,n=0!==t&&String(arguments[0]);if(t>1)for(var r=1;r<t;r++)n+=\" \"+e[r];if(!this.enabled||!n)return n;var u=this._styles,o=u.length,a=i.dim.open;for(!f||-1===u.indexOf(\"gray\")&&-1===u.indexOf(\"grey\")||(i.dim.open=\"\");o--;){var l=i[u[o]];n=l.open+n.replace(l.closeRe,l.open)+l.close}return i.dim.open=a,n}var a=n(54),i=n(55),l=n(57),s=n(58),c=n(59),p=Object.defineProperties,f=\"win32\"===t.platform&&!/^xterm/i.test(Object({NODE_ENV:\"production\"}).TERM);f&&(i.blue.open=\"\u001b[94m\");var d=function(){var e={};return Object.keys(i).forEach(function(t){i[t].closeRe=new RegExp(a(i[t].close),\"g\"),e[t]={get:function(){return u.call(this,this._styles.concat(t))}}}),e}(),D=p(function(){},d);p(r.prototype,function(){var e={};return Object.keys(d).forEach(function(t){e[t]={get:function(){return u.call(this,[t])}}}),e}()),e.exports=new r,e.exports.styles=i,e.exports.hasColor=s,e.exports.stripColor=l,e.exports.supportsColor=c}).call(t,n(16))},function(e,t,n){\"use strict\";var r=/[|\\\\{}()[\\]^$+*?.]/g;e.exports=function(e){if(\"string\"!==typeof e)throw new TypeError(\"Expected a string\");return e.replace(r,\"\\\\$&\")}},function(e,t,n){\"use strict\";(function(e){function t(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var n=e[t];Object.keys(n).forEach(function(t){var r=n[t];e[t]=n[t]={open:\"\u001b[\"+r[0]+\"m\",close:\"\u001b[\"+r[1]+\"m\"}}),Object.defineProperty(e,t,{value:n,enumerable:!1})}),e}Object.defineProperty(e,\"exports\",{enumerable:!0,get:t})}).call(t,n(56)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){\"use strict\";var r=n(17)();e.exports=function(e){return\"string\"===typeof e?e.replace(r,\"\"):e}},function(e,t,n){\"use strict\";var r=n(17),u=new RegExp(r().source);e.exports=u.test.bind(u)},function(e,t,n){\"use strict\";(function(t){var n=t.argv,r=n.indexOf(\"--\"),u=function(e){e=\"--\"+e;var t=n.indexOf(e);return-1!==t&&(-1===r||t<r)};e.exports=function(){return\"FORCE_COLOR\"in Object({NODE_ENV:\"production\"})||!(u(\"no-color\")||u(\"no-colors\")||u(\"color=false\"))&&(!!(u(\"color\")||u(\"colors\")||u(\"color=true\")||u(\"color=always\"))||!(t.stdout&&!t.stdout.isTTY)&&(\"win32\"===t.platform||(\"COLORTERM\"in Object({NODE_ENV:\"production\"})||\"dumb\"!==Object({NODE_ENV:\"production\"}).TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(Object({NODE_ENV:\"production\"}).TERM))))}()}).call(t,n(16))},function(e,t,n){\"use strict\";function r(e,t,n,r,u,o,a){var i=void 0;if(!a&&e&&\"number\"===typeof t){var l=/^[\\/|\\\\].*?[\\/|\\\\]((src|node_modules)[\\/|\\\\].*)/.exec(e);i=l&&l[1]?l[1]:e,i+=\":\"+t,n&&(i+=\":\"+n)}else r&&\"number\"===typeof u?(i=r+\":\"+u,o&&(i+=\":\"+o)):i=\"unknown\";return i.replace(\"webpack://\",\".\")}n.d(t,\"a\",function(){return r})},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(1),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c={color:l.a,cursor:\"pointer\",border:\"none\",display:\"block\",width:\"100%\",textAlign:\"left\",background:\"#fff\",fontFamily:\"Consolas, Menlo, monospace\",fontSize:\"1em\",padding:\"0px\",lineHeight:\"1.5\"},p=Object.assign({},c,{marginBottom:\"1.5em\"}),f=Object.assign({},c,{marginBottom:\"0.6em\"}),d=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={collapsed:!0},o.toggleCollaped=function(){o.setState(function(e){return{collapsed:!e.collapsed}})},a=n,u(o,a)}return o(t,e),s(t,[{key:\"render\",value:function(){var e=this.props.children.length,t=this.state.collapsed;return i.a.createElement(\"div\",null,i.a.createElement(\"button\",{onClick:this.toggleCollaped,style:t?p:f},(t?\"▶\":\"▼\")+\" \"+e+\" stack frames were \"+(t?\"collapsed.\":\"expanded.\")),i.a.createElement(\"div\",{style:{display:t?\"none\":\"block\"}},this.props.children,i.a.createElement(\"button\",{onClick:this.toggleCollaped,style:f},\"▲ \"+e+\" stack frames were expanded.\")))}}]),t}(a.Component);t.a=d},function(e,t,n){\"use strict\";function r(e,t){return null==e||\"\"===e||-1!==e.indexOf(\"/~/\")||-1!==e.indexOf(\"/node_modules/\")||-1!==e.trim().indexOf(\" \")||null==t||\"\"===t}n.d(t,\"a\",function(){return r})},function(e,t,n){\"use strict\";function r(e){switch(e){case\"EvalError\":case\"InternalError\":case\"RangeError\":case\"ReferenceError\":case\"SyntaxError\":case\"TypeError\":case\"URIError\":return!0;default:return!1}}n.d(t,\"a\",function(){return r})}]);"
  32731. /***/ })
  32732. /******/ ]);
  32733. });
  32734. /***/ }),
  32735. /***/ "./node_modules/react-is/cjs/react-is.development.js":
  32736. /*!***********************************************************!*\
  32737. !*** ./node_modules/react-is/cjs/react-is.development.js ***!
  32738. \***********************************************************/
  32739. /*! dynamic exports provided */
  32740. /*! all exports used */
  32741. /***/ (function(module, exports, __webpack_require__) {
  32742. "use strict";
  32743. /** @license React v16.13.1
  32744. * react-is.development.js
  32745. *
  32746. * Copyright (c) Facebook, Inc. and its affiliates.
  32747. *
  32748. * This source code is licensed under the MIT license found in the
  32749. * LICENSE file in the root directory of this source tree.
  32750. */
  32751. if (true) {
  32752. (function() {
  32753. 'use strict';
  32754. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  32755. // nor polyfill, then a plain number is used for performance.
  32756. var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  32757. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  32758. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  32759. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  32760. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  32761. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  32762. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  32763. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
  32764. // (unstable) APIs that have been removed. Can we remove the symbols?
  32765. var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
  32766. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  32767. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  32768. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  32769. var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
  32770. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  32771. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  32772. var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
  32773. var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
  32774. var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
  32775. var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
  32776. function isValidElementType(type) {
  32777. return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  32778. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
  32779. }
  32780. function typeOf(object) {
  32781. if (typeof object === 'object' && object !== null) {
  32782. var $$typeof = object.$$typeof;
  32783. switch ($$typeof) {
  32784. case REACT_ELEMENT_TYPE:
  32785. var type = object.type;
  32786. switch (type) {
  32787. case REACT_ASYNC_MODE_TYPE:
  32788. case REACT_CONCURRENT_MODE_TYPE:
  32789. case REACT_FRAGMENT_TYPE:
  32790. case REACT_PROFILER_TYPE:
  32791. case REACT_STRICT_MODE_TYPE:
  32792. case REACT_SUSPENSE_TYPE:
  32793. return type;
  32794. default:
  32795. var $$typeofType = type && type.$$typeof;
  32796. switch ($$typeofType) {
  32797. case REACT_CONTEXT_TYPE:
  32798. case REACT_FORWARD_REF_TYPE:
  32799. case REACT_LAZY_TYPE:
  32800. case REACT_MEMO_TYPE:
  32801. case REACT_PROVIDER_TYPE:
  32802. return $$typeofType;
  32803. default:
  32804. return $$typeof;
  32805. }
  32806. }
  32807. case REACT_PORTAL_TYPE:
  32808. return $$typeof;
  32809. }
  32810. }
  32811. return undefined;
  32812. } // AsyncMode is deprecated along with isAsyncMode
  32813. var AsyncMode = REACT_ASYNC_MODE_TYPE;
  32814. var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
  32815. var ContextConsumer = REACT_CONTEXT_TYPE;
  32816. var ContextProvider = REACT_PROVIDER_TYPE;
  32817. var Element = REACT_ELEMENT_TYPE;
  32818. var ForwardRef = REACT_FORWARD_REF_TYPE;
  32819. var Fragment = REACT_FRAGMENT_TYPE;
  32820. var Lazy = REACT_LAZY_TYPE;
  32821. var Memo = REACT_MEMO_TYPE;
  32822. var Portal = REACT_PORTAL_TYPE;
  32823. var Profiler = REACT_PROFILER_TYPE;
  32824. var StrictMode = REACT_STRICT_MODE_TYPE;
  32825. var Suspense = REACT_SUSPENSE_TYPE;
  32826. var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
  32827. function isAsyncMode(object) {
  32828. {
  32829. if (!hasWarnedAboutDeprecatedIsAsyncMode) {
  32830. hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
  32831. console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
  32832. }
  32833. }
  32834. return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
  32835. }
  32836. function isConcurrentMode(object) {
  32837. return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
  32838. }
  32839. function isContextConsumer(object) {
  32840. return typeOf(object) === REACT_CONTEXT_TYPE;
  32841. }
  32842. function isContextProvider(object) {
  32843. return typeOf(object) === REACT_PROVIDER_TYPE;
  32844. }
  32845. function isElement(object) {
  32846. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  32847. }
  32848. function isForwardRef(object) {
  32849. return typeOf(object) === REACT_FORWARD_REF_TYPE;
  32850. }
  32851. function isFragment(object) {
  32852. return typeOf(object) === REACT_FRAGMENT_TYPE;
  32853. }
  32854. function isLazy(object) {
  32855. return typeOf(object) === REACT_LAZY_TYPE;
  32856. }
  32857. function isMemo(object) {
  32858. return typeOf(object) === REACT_MEMO_TYPE;
  32859. }
  32860. function isPortal(object) {
  32861. return typeOf(object) === REACT_PORTAL_TYPE;
  32862. }
  32863. function isProfiler(object) {
  32864. return typeOf(object) === REACT_PROFILER_TYPE;
  32865. }
  32866. function isStrictMode(object) {
  32867. return typeOf(object) === REACT_STRICT_MODE_TYPE;
  32868. }
  32869. function isSuspense(object) {
  32870. return typeOf(object) === REACT_SUSPENSE_TYPE;
  32871. }
  32872. exports.AsyncMode = AsyncMode;
  32873. exports.ConcurrentMode = ConcurrentMode;
  32874. exports.ContextConsumer = ContextConsumer;
  32875. exports.ContextProvider = ContextProvider;
  32876. exports.Element = Element;
  32877. exports.ForwardRef = ForwardRef;
  32878. exports.Fragment = Fragment;
  32879. exports.Lazy = Lazy;
  32880. exports.Memo = Memo;
  32881. exports.Portal = Portal;
  32882. exports.Profiler = Profiler;
  32883. exports.StrictMode = StrictMode;
  32884. exports.Suspense = Suspense;
  32885. exports.isAsyncMode = isAsyncMode;
  32886. exports.isConcurrentMode = isConcurrentMode;
  32887. exports.isContextConsumer = isContextConsumer;
  32888. exports.isContextProvider = isContextProvider;
  32889. exports.isElement = isElement;
  32890. exports.isForwardRef = isForwardRef;
  32891. exports.isFragment = isFragment;
  32892. exports.isLazy = isLazy;
  32893. exports.isMemo = isMemo;
  32894. exports.isPortal = isPortal;
  32895. exports.isProfiler = isProfiler;
  32896. exports.isStrictMode = isStrictMode;
  32897. exports.isSuspense = isSuspense;
  32898. exports.isValidElementType = isValidElementType;
  32899. exports.typeOf = typeOf;
  32900. })();
  32901. }
  32902. /***/ }),
  32903. /***/ "./node_modules/react-is/index.js":
  32904. /*!****************************************!*\
  32905. !*** ./node_modules/react-is/index.js ***!
  32906. \****************************************/
  32907. /*! dynamic exports provided */
  32908. /*! all exports used */
  32909. /***/ (function(module, exports, __webpack_require__) {
  32910. "use strict";
  32911. if (false) {
  32912. module.exports = require('./cjs/react-is.production.min.js');
  32913. } else {
  32914. module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
  32915. }
  32916. /***/ }),
  32917. /***/ "./node_modules/react-redux/es/components/Provider.js":
  32918. /*!************************************************************!*\
  32919. !*** ./node_modules/react-redux/es/components/Provider.js ***!
  32920. \************************************************************/
  32921. /*! exports provided: createProvider, default */
  32922. /*! exports used: default */
  32923. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  32924. "use strict";
  32925. /* unused harmony export createProvider */
  32926. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
  32927. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  32928. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
  32929. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  32930. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
  32931. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__ = __webpack_require__(/*! ../utils/PropTypes */ "./node_modules/react-redux/es/utils/PropTypes.js");
  32932. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warning__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js");
  32933. var prefixUnsafeLifecycleMethods = typeof __WEBPACK_IMPORTED_MODULE_1_react___default.a.forwardRef !== "undefined";
  32934. var didWarnAboutReceivingStore = false;
  32935. function warnAboutReceivingStore() {
  32936. if (didWarnAboutReceivingStore) {
  32937. return;
  32938. }
  32939. didWarnAboutReceivingStore = true;
  32940. Object(__WEBPACK_IMPORTED_MODULE_4__utils_warning__["a" /* default */])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
  32941. }
  32942. function createProvider(storeKey) {
  32943. var _Provider$childContex;
  32944. if (storeKey === void 0) {
  32945. storeKey = 'store';
  32946. }
  32947. var subscriptionKey = storeKey + "Subscription";
  32948. var Provider =
  32949. /*#__PURE__*/
  32950. function (_Component) {
  32951. Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__["a" /* default */])(Provider, _Component);
  32952. var _proto = Provider.prototype;
  32953. _proto.getChildContext = function getChildContext() {
  32954. var _ref;
  32955. return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;
  32956. };
  32957. function Provider(props, context) {
  32958. var _this;
  32959. _this = _Component.call(this, props, context) || this;
  32960. _this[storeKey] = props.store;
  32961. return _this;
  32962. }
  32963. _proto.render = function render() {
  32964. return __WEBPACK_IMPORTED_MODULE_1_react__["Children"].only(this.props.children);
  32965. };
  32966. return Provider;
  32967. }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]);
  32968. if (true) {
  32969. // Use UNSAFE_ event name where supported
  32970. var eventName = prefixUnsafeLifecycleMethods ? 'UNSAFE_componentWillReceiveProps' : 'componentWillReceiveProps';
  32971. Provider.prototype[eventName] = function (nextProps) {
  32972. if (this[storeKey] !== nextProps.store) {
  32973. warnAboutReceivingStore();
  32974. }
  32975. };
  32976. }
  32977. Provider.propTypes = {
  32978. store: __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__["a" /* storeShape */].isRequired,
  32979. children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.element.isRequired
  32980. };
  32981. Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__["a" /* storeShape */].isRequired, _Provider$childContex[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__["b" /* subscriptionShape */], _Provider$childContex);
  32982. return Provider;
  32983. }
  32984. /* harmony default export */ __webpack_exports__["a"] = (createProvider());
  32985. /***/ }),
  32986. /***/ "./node_modules/react-redux/es/components/connectAdvanced.js":
  32987. /*!*******************************************************************!*\
  32988. !*** ./node_modules/react-redux/es/components/connectAdvanced.js ***!
  32989. \*******************************************************************/
  32990. /*! exports provided: default */
  32991. /*! exports used: default */
  32992. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  32993. "use strict";
  32994. /* harmony export (immutable) */ __webpack_exports__["a"] = connectAdvanced;
  32995. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
  32996. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  32997. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
  32998. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
  32999. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
  33000. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__);
  33001. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  33002. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_invariant__);
  33003. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  33004. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
  33005. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
  33006. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_is__);
  33007. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__ = __webpack_require__(/*! ../utils/Subscription */ "./node_modules/react-redux/es/utils/Subscription.js");
  33008. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(/*! ../utils/PropTypes */ "./node_modules/react-redux/es/utils/PropTypes.js");
  33009. var prefixUnsafeLifecycleMethods = typeof __WEBPACK_IMPORTED_MODULE_6_react___default.a.forwardRef !== "undefined";
  33010. var hotReloadingVersion = 0;
  33011. var dummyState = {};
  33012. function noop() {}
  33013. function makeSelectorStateful(sourceSelector, store) {
  33014. // wrap the selector in an object that tracks its results between runs.
  33015. var selector = {
  33016. run: function runComponentSelector(props) {
  33017. try {
  33018. var nextProps = sourceSelector(store.getState(), props);
  33019. if (nextProps !== selector.props || selector.error) {
  33020. selector.shouldComponentUpdate = true;
  33021. selector.props = nextProps;
  33022. selector.error = null;
  33023. }
  33024. } catch (error) {
  33025. selector.shouldComponentUpdate = true;
  33026. selector.error = error;
  33027. }
  33028. }
  33029. };
  33030. return selector;
  33031. }
  33032. function connectAdvanced(
  33033. /*
  33034. selectorFactory is a func that is responsible for returning the selector function used to
  33035. compute new props from state, props, and dispatch. For example:
  33036. export default connectAdvanced((dispatch, options) => (state, props) => ({
  33037. thing: state.things[props.thingId],
  33038. saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
  33039. }))(YourComponent)
  33040. Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
  33041. outside of their selector as an optimization. Options passed to connectAdvanced are passed to
  33042. the selectorFactory, along with displayName and WrappedComponent, as the second argument.
  33043. Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
  33044. props. Do not use connectAdvanced directly without memoizing results between calls to your
  33045. selector, otherwise the Connect component will re-render on every state or props change.
  33046. */
  33047. selectorFactory, // options object:
  33048. _ref) {
  33049. var _contextTypes, _childContextTypes;
  33050. if (_ref === void 0) {
  33051. _ref = {};
  33052. }
  33053. var _ref2 = _ref,
  33054. _ref2$getDisplayName = _ref2.getDisplayName,
  33055. getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {
  33056. return "ConnectAdvanced(" + name + ")";
  33057. } : _ref2$getDisplayName,
  33058. _ref2$methodName = _ref2.methodName,
  33059. methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,
  33060. _ref2$renderCountProp = _ref2.renderCountProp,
  33061. renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,
  33062. _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,
  33063. shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,
  33064. _ref2$storeKey = _ref2.storeKey,
  33065. storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,
  33066. _ref2$withRef = _ref2.withRef,
  33067. withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,
  33068. connectOptions = Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]);
  33069. var subscriptionKey = storeKey + 'Subscription';
  33070. var version = hotReloadingVersion++;
  33071. var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["a" /* storeShape */], _contextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["b" /* subscriptionShape */], _contextTypes);
  33072. var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["b" /* subscriptionShape */], _childContextTypes);
  33073. return function wrapWithConnect(WrappedComponent) {
  33074. __WEBPACK_IMPORTED_MODULE_5_invariant___default()(Object(__WEBPACK_IMPORTED_MODULE_7_react_is__["isValidElementType"])(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent)));
  33075. var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
  33076. var displayName = getDisplayName(wrappedComponentName);
  33077. var selectorFactoryOptions = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__["a" /* default */])({}, connectOptions, {
  33078. getDisplayName: getDisplayName,
  33079. methodName: methodName,
  33080. renderCountProp: renderCountProp,
  33081. shouldHandleStateChanges: shouldHandleStateChanges,
  33082. storeKey: storeKey,
  33083. withRef: withRef,
  33084. displayName: displayName,
  33085. wrappedComponentName: wrappedComponentName,
  33086. WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps
  33087. /* eslint-disable react/no-deprecated */
  33088. });
  33089. var Connect =
  33090. /*#__PURE__*/
  33091. function (_Component) {
  33092. Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__["a" /* default */])(Connect, _Component);
  33093. function Connect(props, context) {
  33094. var _this;
  33095. _this = _Component.call(this, props, context) || this;
  33096. _this.version = version;
  33097. _this.state = {};
  33098. _this.renderCount = 0;
  33099. _this.store = props[storeKey] || context[storeKey];
  33100. _this.propsMode = Boolean(props[storeKey]);
  33101. _this.setWrappedInstance = _this.setWrappedInstance.bind(Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
  33102. __WEBPACK_IMPORTED_MODULE_5_invariant___default()(_this.store, "Could not find \"" + storeKey + "\" in either the context or props of " + ("\"" + displayName + "\". Either wrap the root component in a <Provider>, ") + ("or explicitly pass \"" + storeKey + "\" as a prop to \"" + displayName + "\"."));
  33103. _this.initSelector();
  33104. _this.initSubscription();
  33105. return _this;
  33106. }
  33107. var _proto = Connect.prototype;
  33108. _proto.getChildContext = function getChildContext() {
  33109. var _ref3;
  33110. // If this component received store from props, its subscription should be transparent
  33111. // to any descendants receiving store+subscription from context; it passes along
  33112. // subscription passed to it. Otherwise, it shadows the parent subscription, which allows
  33113. // Connect to control ordering of notifications to flow top-down.
  33114. var subscription = this.propsMode ? null : this.subscription;
  33115. return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3;
  33116. };
  33117. _proto.componentDidMount = function componentDidMount() {
  33118. if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and
  33119. // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.
  33120. // Otherwise, unsubscription would never take place during SSR, causing a memory leak.
  33121. // To handle the case where a child component may have triggered a state change by
  33122. // dispatching an action in its componentWillMount, we have to re-run the select and maybe
  33123. // re-render.
  33124. this.subscription.trySubscribe();
  33125. this.selector.run(this.props);
  33126. if (this.selector.shouldComponentUpdate) this.forceUpdate();
  33127. }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0
  33128. _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
  33129. this.selector.run(nextProps);
  33130. };
  33131. _proto.shouldComponentUpdate = function shouldComponentUpdate() {
  33132. return this.selector.shouldComponentUpdate;
  33133. };
  33134. _proto.componentWillUnmount = function componentWillUnmount() {
  33135. if (this.subscription) this.subscription.tryUnsubscribe();
  33136. this.subscription = null;
  33137. this.notifyNestedSubs = noop;
  33138. this.store = null;
  33139. this.selector.run = noop;
  33140. this.selector.shouldComponentUpdate = false;
  33141. };
  33142. _proto.getWrappedInstance = function getWrappedInstance() {
  33143. __WEBPACK_IMPORTED_MODULE_5_invariant___default()(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call."));
  33144. return this.wrappedInstance;
  33145. };
  33146. _proto.setWrappedInstance = function setWrappedInstance(ref) {
  33147. this.wrappedInstance = ref;
  33148. };
  33149. _proto.initSelector = function initSelector() {
  33150. var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);
  33151. this.selector = makeSelectorStateful(sourceSelector, this.store);
  33152. this.selector.run(this.props);
  33153. };
  33154. _proto.initSubscription = function initSubscription() {
  33155. if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component
  33156. // connected to the store via props shouldn't use subscription from context, or vice versa.
  33157. var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];
  33158. this.subscription = new __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__["a" /* default */](this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
  33159. // the middle of the notification loop, where `this.subscription` will then be null. An
  33160. // extra null check every change can be avoided by copying the method onto `this` and then
  33161. // replacing it with a no-op on unmount. This can probably be avoided if Subscription's
  33162. // listeners logic is changed to not call listeners that have been unsubscribed in the
  33163. // middle of the notification loop.
  33164. this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);
  33165. };
  33166. _proto.onStateChange = function onStateChange() {
  33167. this.selector.run(this.props);
  33168. if (!this.selector.shouldComponentUpdate) {
  33169. this.notifyNestedSubs();
  33170. } else {
  33171. this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;
  33172. this.setState(dummyState);
  33173. }
  33174. };
  33175. _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {
  33176. // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it
  33177. // needs to notify nested subs. Once called, it unimplements itself until further state
  33178. // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does
  33179. // a boolean check every time avoids an extra method call most of the time, resulting
  33180. // in some perf boost.
  33181. this.componentDidUpdate = undefined;
  33182. this.notifyNestedSubs();
  33183. };
  33184. _proto.isSubscribed = function isSubscribed() {
  33185. return Boolean(this.subscription) && this.subscription.isSubscribed();
  33186. };
  33187. _proto.addExtraProps = function addExtraProps(props) {
  33188. if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector.
  33189. // this is especially important for 'ref' since that's a reference back to the component
  33190. // instance. a singleton memoized selector would then be holding a reference to the
  33191. // instance, preventing the instance from being garbage collected, and that would be bad
  33192. var withExtras = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__["a" /* default */])({}, props);
  33193. if (withRef) withExtras.ref = this.setWrappedInstance;
  33194. if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;
  33195. if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;
  33196. return withExtras;
  33197. };
  33198. _proto.render = function render() {
  33199. var selector = this.selector;
  33200. selector.shouldComponentUpdate = false;
  33201. if (selector.error) {
  33202. throw selector.error;
  33203. } else {
  33204. return Object(__WEBPACK_IMPORTED_MODULE_6_react__["createElement"])(WrappedComponent, this.addExtraProps(selector.props));
  33205. }
  33206. };
  33207. return Connect;
  33208. }(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);
  33209. if (prefixUnsafeLifecycleMethods) {
  33210. // Use UNSAFE_ event name where supported
  33211. Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps;
  33212. delete Connect.prototype.componentWillReceiveProps;
  33213. }
  33214. /* eslint-enable react/no-deprecated */
  33215. Connect.WrappedComponent = WrappedComponent;
  33216. Connect.displayName = displayName;
  33217. Connect.childContextTypes = childContextTypes;
  33218. Connect.contextTypes = contextTypes;
  33219. Connect.propTypes = contextTypes;
  33220. if (true) {
  33221. // Use UNSAFE_ event name where supported
  33222. var eventName = prefixUnsafeLifecycleMethods ? 'UNSAFE_componentWillUpdate' : 'componentWillUpdate';
  33223. Connect.prototype[eventName] = function componentWillUpdate() {
  33224. var _this2 = this;
  33225. // We are hot reloading!
  33226. if (this.version !== version) {
  33227. this.version = version;
  33228. this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their
  33229. // listeners will be lost when we unsubscribe. Unfortunately, by copying over all
  33230. // listeners, this does mean that the old versions of connected descendants will still be
  33231. // notified of state changes; however, their onStateChange function is a no-op so this
  33232. // isn't a huge deal.
  33233. var oldListeners = [];
  33234. if (this.subscription) {
  33235. oldListeners = this.subscription.listeners.get();
  33236. this.subscription.tryUnsubscribe();
  33237. }
  33238. this.initSubscription();
  33239. if (shouldHandleStateChanges) {
  33240. this.subscription.trySubscribe();
  33241. oldListeners.forEach(function (listener) {
  33242. return _this2.subscription.listeners.subscribe(listener);
  33243. });
  33244. }
  33245. }
  33246. };
  33247. }
  33248. return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent);
  33249. };
  33250. }
  33251. /***/ }),
  33252. /***/ "./node_modules/react-redux/es/connect/connect.js":
  33253. /*!********************************************************!*\
  33254. !*** ./node_modules/react-redux/es/connect/connect.js ***!
  33255. \********************************************************/
  33256. /*! exports provided: createConnect, default */
  33257. /*! exports used: default */
  33258. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33259. "use strict";
  33260. /* unused harmony export createConnect */
  33261. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
  33262. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
  33263. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__ = __webpack_require__(/*! ../components/connectAdvanced */ "./node_modules/react-redux/es/components/connectAdvanced.js");
  33264. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__ = __webpack_require__(/*! ../utils/shallowEqual */ "./node_modules/react-redux/es/utils/shallowEqual.js");
  33265. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__ = __webpack_require__(/*! ./mapDispatchToProps */ "./node_modules/react-redux/es/connect/mapDispatchToProps.js");
  33266. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__ = __webpack_require__(/*! ./mapStateToProps */ "./node_modules/react-redux/es/connect/mapStateToProps.js");
  33267. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mergeProps__ = __webpack_require__(/*! ./mergeProps */ "./node_modules/react-redux/es/connect/mergeProps.js");
  33268. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectorFactory__ = __webpack_require__(/*! ./selectorFactory */ "./node_modules/react-redux/es/connect/selectorFactory.js");
  33269. /*
  33270. connect is a facade over connectAdvanced. It turns its args into a compatible
  33271. selectorFactory, which has the signature:
  33272. (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
  33273. connect passes its args to connectAdvanced as options, which will in turn pass them to
  33274. selectorFactory each time a Connect component instance is instantiated or hot reloaded.
  33275. selectorFactory returns a final props selector from its mapStateToProps,
  33276. mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
  33277. mergePropsFactories, and pure args.
  33278. The resulting final props selector is called by the Connect component instance whenever
  33279. it receives new props or store state.
  33280. */
  33281. function match(arg, factories, name) {
  33282. for (var i = factories.length - 1; i >= 0; i--) {
  33283. var result = factories[i](arg);
  33284. if (result) return result;
  33285. }
  33286. return function (dispatch, options) {
  33287. throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
  33288. };
  33289. }
  33290. function strictEqual(a, b) {
  33291. return a === b;
  33292. } // createConnect with default args builds the 'official' connect behavior. Calling it with
  33293. // different options opens up some testing and extensibility scenarios
  33294. function createConnect(_temp) {
  33295. var _ref = _temp === void 0 ? {} : _temp,
  33296. _ref$connectHOC = _ref.connectHOC,
  33297. connectHOC = _ref$connectHOC === void 0 ? __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__["a" /* default */] : _ref$connectHOC,
  33298. _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
  33299. mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__["a" /* default */] : _ref$mapStateToPropsF,
  33300. _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
  33301. mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__["a" /* default */] : _ref$mapDispatchToPro,
  33302. _ref$mergePropsFactor = _ref.mergePropsFactories,
  33303. mergePropsFactories = _ref$mergePropsFactor === void 0 ? __WEBPACK_IMPORTED_MODULE_6__mergeProps__["a" /* default */] : _ref$mergePropsFactor,
  33304. _ref$selectorFactory = _ref.selectorFactory,
  33305. selectorFactory = _ref$selectorFactory === void 0 ? __WEBPACK_IMPORTED_MODULE_7__selectorFactory__["a" /* default */] : _ref$selectorFactory;
  33306. return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {
  33307. if (_ref2 === void 0) {
  33308. _ref2 = {};
  33309. }
  33310. var _ref3 = _ref2,
  33311. _ref3$pure = _ref3.pure,
  33312. pure = _ref3$pure === void 0 ? true : _ref3$pure,
  33313. _ref3$areStatesEqual = _ref3.areStatesEqual,
  33314. areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,
  33315. _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,
  33316. areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__["a" /* default */] : _ref3$areOwnPropsEqua,
  33317. _ref3$areStatePropsEq = _ref3.areStatePropsEqual,
  33318. areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__["a" /* default */] : _ref3$areStatePropsEq,
  33319. _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,
  33320. areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__["a" /* default */] : _ref3$areMergedPropsE,
  33321. extraOptions = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]);
  33322. var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
  33323. var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
  33324. var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
  33325. return connectHOC(selectorFactory, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({
  33326. // used in error messages
  33327. methodName: 'connect',
  33328. // used to compute Connect's displayName from the wrapped component's displayName.
  33329. getDisplayName: function getDisplayName(name) {
  33330. return "Connect(" + name + ")";
  33331. },
  33332. // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
  33333. shouldHandleStateChanges: Boolean(mapStateToProps),
  33334. // passed through to selectorFactory
  33335. initMapStateToProps: initMapStateToProps,
  33336. initMapDispatchToProps: initMapDispatchToProps,
  33337. initMergeProps: initMergeProps,
  33338. pure: pure,
  33339. areStatesEqual: areStatesEqual,
  33340. areOwnPropsEqual: areOwnPropsEqual,
  33341. areStatePropsEqual: areStatePropsEqual,
  33342. areMergedPropsEqual: areMergedPropsEqual
  33343. }, extraOptions));
  33344. };
  33345. }
  33346. /* harmony default export */ __webpack_exports__["a"] = (createConnect());
  33347. /***/ }),
  33348. /***/ "./node_modules/react-redux/es/connect/mapDispatchToProps.js":
  33349. /*!*******************************************************************!*\
  33350. !*** ./node_modules/react-redux/es/connect/mapDispatchToProps.js ***!
  33351. \*******************************************************************/
  33352. /*! exports provided: whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject, default */
  33353. /*! exports used: default */
  33354. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33355. "use strict";
  33356. /* unused harmony export whenMapDispatchToPropsIsFunction */
  33357. /* unused harmony export whenMapDispatchToPropsIsMissing */
  33358. /* unused harmony export whenMapDispatchToPropsIsObject */
  33359. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js");
  33360. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js");
  33361. function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
  33362. return typeof mapDispatchToProps === 'function' ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["b" /* wrapMapToPropsFunc */])(mapDispatchToProps, 'mapDispatchToProps') : undefined;
  33363. }
  33364. function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
  33365. return !mapDispatchToProps ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["a" /* wrapMapToPropsConstant */])(function (dispatch) {
  33366. return {
  33367. dispatch: dispatch
  33368. };
  33369. }) : undefined;
  33370. }
  33371. function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
  33372. return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["a" /* wrapMapToPropsConstant */])(function (dispatch) {
  33373. return Object(__WEBPACK_IMPORTED_MODULE_0_redux__["b" /* bindActionCreators */])(mapDispatchToProps, dispatch);
  33374. }) : undefined;
  33375. }
  33376. /* harmony default export */ __webpack_exports__["a"] = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);
  33377. /***/ }),
  33378. /***/ "./node_modules/react-redux/es/connect/mapStateToProps.js":
  33379. /*!****************************************************************!*\
  33380. !*** ./node_modules/react-redux/es/connect/mapStateToProps.js ***!
  33381. \****************************************************************/
  33382. /*! exports provided: whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing, default */
  33383. /*! exports used: default */
  33384. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33385. "use strict";
  33386. /* unused harmony export whenMapStateToPropsIsFunction */
  33387. /* unused harmony export whenMapStateToPropsIsMissing */
  33388. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js");
  33389. function whenMapStateToPropsIsFunction(mapStateToProps) {
  33390. return typeof mapStateToProps === 'function' ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__["b" /* wrapMapToPropsFunc */])(mapStateToProps, 'mapStateToProps') : undefined;
  33391. }
  33392. function whenMapStateToPropsIsMissing(mapStateToProps) {
  33393. return !mapStateToProps ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__["a" /* wrapMapToPropsConstant */])(function () {
  33394. return {};
  33395. }) : undefined;
  33396. }
  33397. /* harmony default export */ __webpack_exports__["a"] = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);
  33398. /***/ }),
  33399. /***/ "./node_modules/react-redux/es/connect/mergeProps.js":
  33400. /*!***********************************************************!*\
  33401. !*** ./node_modules/react-redux/es/connect/mergeProps.js ***!
  33402. \***********************************************************/
  33403. /*! exports provided: defaultMergeProps, wrapMergePropsFunc, whenMergePropsIsFunction, whenMergePropsIsOmitted, default */
  33404. /*! exports used: default */
  33405. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33406. "use strict";
  33407. /* unused harmony export defaultMergeProps */
  33408. /* unused harmony export wrapMergePropsFunc */
  33409. /* unused harmony export whenMergePropsIsFunction */
  33410. /* unused harmony export whenMergePropsIsOmitted */
  33411. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
  33412. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js");
  33413. function defaultMergeProps(stateProps, dispatchProps, ownProps) {
  33414. return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, ownProps, stateProps, dispatchProps);
  33415. }
  33416. function wrapMergePropsFunc(mergeProps) {
  33417. return function initMergePropsProxy(dispatch, _ref) {
  33418. var displayName = _ref.displayName,
  33419. pure = _ref.pure,
  33420. areMergedPropsEqual = _ref.areMergedPropsEqual;
  33421. var hasRunOnce = false;
  33422. var mergedProps;
  33423. return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
  33424. var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
  33425. if (hasRunOnce) {
  33426. if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
  33427. } else {
  33428. hasRunOnce = true;
  33429. mergedProps = nextMergedProps;
  33430. if (true) Object(__WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__["a" /* default */])(mergedProps, displayName, 'mergeProps');
  33431. }
  33432. return mergedProps;
  33433. };
  33434. };
  33435. }
  33436. function whenMergePropsIsFunction(mergeProps) {
  33437. return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
  33438. }
  33439. function whenMergePropsIsOmitted(mergeProps) {
  33440. return !mergeProps ? function () {
  33441. return defaultMergeProps;
  33442. } : undefined;
  33443. }
  33444. /* harmony default export */ __webpack_exports__["a"] = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);
  33445. /***/ }),
  33446. /***/ "./node_modules/react-redux/es/connect/selectorFactory.js":
  33447. /*!****************************************************************!*\
  33448. !*** ./node_modules/react-redux/es/connect/selectorFactory.js ***!
  33449. \****************************************************************/
  33450. /*! exports provided: impureFinalPropsSelectorFactory, pureFinalPropsSelectorFactory, default */
  33451. /*! exports used: default */
  33452. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33453. "use strict";
  33454. /* unused harmony export impureFinalPropsSelectorFactory */
  33455. /* unused harmony export pureFinalPropsSelectorFactory */
  33456. /* harmony export (immutable) */ __webpack_exports__["a"] = finalPropsSelectorFactory;
  33457. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
  33458. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__verifySubselectors__ = __webpack_require__(/*! ./verifySubselectors */ "./node_modules/react-redux/es/connect/verifySubselectors.js");
  33459. function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
  33460. return function impureFinalPropsSelector(state, ownProps) {
  33461. return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
  33462. };
  33463. }
  33464. function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
  33465. var areStatesEqual = _ref.areStatesEqual,
  33466. areOwnPropsEqual = _ref.areOwnPropsEqual,
  33467. areStatePropsEqual = _ref.areStatePropsEqual;
  33468. var hasRunAtLeastOnce = false;
  33469. var state;
  33470. var ownProps;
  33471. var stateProps;
  33472. var dispatchProps;
  33473. var mergedProps;
  33474. function handleFirstCall(firstState, firstOwnProps) {
  33475. state = firstState;
  33476. ownProps = firstOwnProps;
  33477. stateProps = mapStateToProps(state, ownProps);
  33478. dispatchProps = mapDispatchToProps(dispatch, ownProps);
  33479. mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
  33480. hasRunAtLeastOnce = true;
  33481. return mergedProps;
  33482. }
  33483. function handleNewPropsAndNewState() {
  33484. stateProps = mapStateToProps(state, ownProps);
  33485. if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
  33486. mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
  33487. return mergedProps;
  33488. }
  33489. function handleNewProps() {
  33490. if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
  33491. if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
  33492. mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
  33493. return mergedProps;
  33494. }
  33495. function handleNewState() {
  33496. var nextStateProps = mapStateToProps(state, ownProps);
  33497. var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
  33498. stateProps = nextStateProps;
  33499. if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
  33500. return mergedProps;
  33501. }
  33502. function handleSubsequentCalls(nextState, nextOwnProps) {
  33503. var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
  33504. var stateChanged = !areStatesEqual(nextState, state);
  33505. state = nextState;
  33506. ownProps = nextOwnProps;
  33507. if (propsChanged && stateChanged) return handleNewPropsAndNewState();
  33508. if (propsChanged) return handleNewProps();
  33509. if (stateChanged) return handleNewState();
  33510. return mergedProps;
  33511. }
  33512. return function pureFinalPropsSelector(nextState, nextOwnProps) {
  33513. return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
  33514. };
  33515. } // TODO: Add more comments
  33516. // If pure is true, the selector returned by selectorFactory will memoize its results,
  33517. // allowing connectAdvanced's shouldComponentUpdate to return false if final
  33518. // props have not changed. If false, the selector will always return a new
  33519. // object and shouldComponentUpdate will always return true.
  33520. function finalPropsSelectorFactory(dispatch, _ref2) {
  33521. var initMapStateToProps = _ref2.initMapStateToProps,
  33522. initMapDispatchToProps = _ref2.initMapDispatchToProps,
  33523. initMergeProps = _ref2.initMergeProps,
  33524. options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]);
  33525. var mapStateToProps = initMapStateToProps(dispatch, options);
  33526. var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
  33527. var mergeProps = initMergeProps(dispatch, options);
  33528. if (true) {
  33529. Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__["a" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
  33530. }
  33531. var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
  33532. return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
  33533. }
  33534. /***/ }),
  33535. /***/ "./node_modules/react-redux/es/connect/verifySubselectors.js":
  33536. /*!*******************************************************************!*\
  33537. !*** ./node_modules/react-redux/es/connect/verifySubselectors.js ***!
  33538. \*******************************************************************/
  33539. /*! exports provided: default */
  33540. /*! exports used: default */
  33541. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33542. "use strict";
  33543. /* harmony export (immutable) */ __webpack_exports__["a"] = verifySubselectors;
  33544. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js");
  33545. function verify(selector, methodName, displayName) {
  33546. if (!selector) {
  33547. throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");
  33548. } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
  33549. if (!selector.hasOwnProperty('dependsOnOwnProps')) {
  33550. Object(__WEBPACK_IMPORTED_MODULE_0__utils_warning__["a" /* default */])("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");
  33551. }
  33552. }
  33553. }
  33554. function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
  33555. verify(mapStateToProps, 'mapStateToProps', displayName);
  33556. verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
  33557. verify(mergeProps, 'mergeProps', displayName);
  33558. }
  33559. /***/ }),
  33560. /***/ "./node_modules/react-redux/es/connect/wrapMapToProps.js":
  33561. /*!***************************************************************!*\
  33562. !*** ./node_modules/react-redux/es/connect/wrapMapToProps.js ***!
  33563. \***************************************************************/
  33564. /*! exports provided: wrapMapToPropsConstant, getDependsOnOwnProps, wrapMapToPropsFunc */
  33565. /*! exports used: wrapMapToPropsConstant, wrapMapToPropsFunc */
  33566. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33567. "use strict";
  33568. /* harmony export (immutable) */ __webpack_exports__["a"] = wrapMapToPropsConstant;
  33569. /* unused harmony export getDependsOnOwnProps */
  33570. /* harmony export (immutable) */ __webpack_exports__["b"] = wrapMapToPropsFunc;
  33571. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js");
  33572. function wrapMapToPropsConstant(getConstant) {
  33573. return function initConstantSelector(dispatch, options) {
  33574. var constant = getConstant(dispatch, options);
  33575. function constantSelector() {
  33576. return constant;
  33577. }
  33578. constantSelector.dependsOnOwnProps = false;
  33579. return constantSelector;
  33580. };
  33581. } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
  33582. // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
  33583. // whether mapToProps needs to be invoked when props have changed.
  33584. //
  33585. // A length of one signals that mapToProps does not depend on props from the parent component.
  33586. // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
  33587. // therefore not reporting its length accurately..
  33588. function getDependsOnOwnProps(mapToProps) {
  33589. return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
  33590. } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
  33591. // this function wraps mapToProps in a proxy function which does several things:
  33592. //
  33593. // * Detects whether the mapToProps function being called depends on props, which
  33594. // is used by selectorFactory to decide if it should reinvoke on props changes.
  33595. //
  33596. // * On first call, handles mapToProps if returns another function, and treats that
  33597. // new function as the true mapToProps for subsequent calls.
  33598. //
  33599. // * On first call, verifies the first result is a plain object, in order to warn
  33600. // the developer that their mapToProps function is not returning a valid result.
  33601. //
  33602. function wrapMapToPropsFunc(mapToProps, methodName) {
  33603. return function initProxySelector(dispatch, _ref) {
  33604. var displayName = _ref.displayName;
  33605. var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
  33606. return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
  33607. }; // allow detectFactoryAndVerify to get ownProps
  33608. proxy.dependsOnOwnProps = true;
  33609. proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
  33610. proxy.mapToProps = mapToProps;
  33611. proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
  33612. var props = proxy(stateOrDispatch, ownProps);
  33613. if (typeof props === 'function') {
  33614. proxy.mapToProps = props;
  33615. proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
  33616. props = proxy(stateOrDispatch, ownProps);
  33617. }
  33618. if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__["a" /* default */])(props, displayName, methodName);
  33619. return props;
  33620. };
  33621. return proxy;
  33622. };
  33623. }
  33624. /***/ }),
  33625. /***/ "./node_modules/react-redux/es/index.js":
  33626. /*!**********************************************!*\
  33627. !*** ./node_modules/react-redux/es/index.js ***!
  33628. \**********************************************/
  33629. /*! exports provided: Provider, createProvider, connectAdvanced, connect */
  33630. /*! exports used: Provider, connect */
  33631. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33632. "use strict";
  33633. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(/*! ./components/Provider */ "./node_modules/react-redux/es/components/Provider.js");
  33634. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(/*! ./components/connectAdvanced */ "./node_modules/react-redux/es/components/connectAdvanced.js");
  33635. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(/*! ./connect/connect */ "./node_modules/react-redux/es/connect/connect.js");
  33636. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; });
  33637. /* unused harmony reexport createProvider */
  33638. /* unused harmony reexport connectAdvanced */
  33639. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; });
  33640. /***/ }),
  33641. /***/ "./node_modules/react-redux/es/utils/PropTypes.js":
  33642. /*!********************************************************!*\
  33643. !*** ./node_modules/react-redux/es/utils/PropTypes.js ***!
  33644. \********************************************************/
  33645. /*! exports provided: subscriptionShape, storeShape */
  33646. /*! exports used: storeShape, subscriptionShape */
  33647. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33648. "use strict";
  33649. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return subscriptionShape; });
  33650. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return storeShape; });
  33651. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  33652. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
  33653. var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({
  33654. trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
  33655. tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
  33656. notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
  33657. isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired
  33658. });
  33659. var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({
  33660. subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
  33661. dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
  33662. getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired
  33663. });
  33664. /***/ }),
  33665. /***/ "./node_modules/react-redux/es/utils/Subscription.js":
  33666. /*!***********************************************************!*\
  33667. !*** ./node_modules/react-redux/es/utils/Subscription.js ***!
  33668. \***********************************************************/
  33669. /*! exports provided: default */
  33670. /*! exports used: default */
  33671. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33672. "use strict";
  33673. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; });
  33674. // encapsulates the subscription logic for connecting a component to the redux store, as
  33675. // well as nesting subscriptions of descendant components, so that we can ensure the
  33676. // ancestor components re-render before descendants
  33677. var CLEARED = null;
  33678. var nullListeners = {
  33679. notify: function notify() {}
  33680. };
  33681. function createListenerCollection() {
  33682. // the current/next pattern is copied from redux's createStore code.
  33683. // TODO: refactor+expose that code to be reusable here?
  33684. var current = [];
  33685. var next = [];
  33686. return {
  33687. clear: function clear() {
  33688. next = CLEARED;
  33689. current = CLEARED;
  33690. },
  33691. notify: function notify() {
  33692. var listeners = current = next;
  33693. for (var i = 0; i < listeners.length; i++) {
  33694. listeners[i]();
  33695. }
  33696. },
  33697. get: function get() {
  33698. return next;
  33699. },
  33700. subscribe: function subscribe(listener) {
  33701. var isSubscribed = true;
  33702. if (next === current) next = current.slice();
  33703. next.push(listener);
  33704. return function unsubscribe() {
  33705. if (!isSubscribed || current === CLEARED) return;
  33706. isSubscribed = false;
  33707. if (next === current) next = current.slice();
  33708. next.splice(next.indexOf(listener), 1);
  33709. };
  33710. }
  33711. };
  33712. }
  33713. var Subscription =
  33714. /*#__PURE__*/
  33715. function () {
  33716. function Subscription(store, parentSub, onStateChange) {
  33717. this.store = store;
  33718. this.parentSub = parentSub;
  33719. this.onStateChange = onStateChange;
  33720. this.unsubscribe = null;
  33721. this.listeners = nullListeners;
  33722. }
  33723. var _proto = Subscription.prototype;
  33724. _proto.addNestedSub = function addNestedSub(listener) {
  33725. this.trySubscribe();
  33726. return this.listeners.subscribe(listener);
  33727. };
  33728. _proto.notifyNestedSubs = function notifyNestedSubs() {
  33729. this.listeners.notify();
  33730. };
  33731. _proto.isSubscribed = function isSubscribed() {
  33732. return Boolean(this.unsubscribe);
  33733. };
  33734. _proto.trySubscribe = function trySubscribe() {
  33735. if (!this.unsubscribe) {
  33736. this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
  33737. this.listeners = createListenerCollection();
  33738. }
  33739. };
  33740. _proto.tryUnsubscribe = function tryUnsubscribe() {
  33741. if (this.unsubscribe) {
  33742. this.unsubscribe();
  33743. this.unsubscribe = null;
  33744. this.listeners.clear();
  33745. this.listeners = nullListeners;
  33746. }
  33747. };
  33748. return Subscription;
  33749. }();
  33750. /***/ }),
  33751. /***/ "./node_modules/react-redux/es/utils/isPlainObject.js":
  33752. /*!************************************************************!*\
  33753. !*** ./node_modules/react-redux/es/utils/isPlainObject.js ***!
  33754. \************************************************************/
  33755. /*! exports provided: default */
  33756. /*! exports used: default */
  33757. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33758. "use strict";
  33759. /* harmony export (immutable) */ __webpack_exports__["a"] = isPlainObject;
  33760. /**
  33761. * @param {any} obj The object to inspect.
  33762. * @returns {boolean} True if the argument appears to be a plain object.
  33763. */
  33764. function isPlainObject(obj) {
  33765. if (typeof obj !== 'object' || obj === null) return false;
  33766. var proto = Object.getPrototypeOf(obj);
  33767. if (proto === null) return true;
  33768. var baseProto = proto;
  33769. while (Object.getPrototypeOf(baseProto) !== null) {
  33770. baseProto = Object.getPrototypeOf(baseProto);
  33771. }
  33772. return proto === baseProto;
  33773. }
  33774. /***/ }),
  33775. /***/ "./node_modules/react-redux/es/utils/shallowEqual.js":
  33776. /*!***********************************************************!*\
  33777. !*** ./node_modules/react-redux/es/utils/shallowEqual.js ***!
  33778. \***********************************************************/
  33779. /*! exports provided: default */
  33780. /*! exports used: default */
  33781. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33782. "use strict";
  33783. /* harmony export (immutable) */ __webpack_exports__["a"] = shallowEqual;
  33784. var hasOwn = Object.prototype.hasOwnProperty;
  33785. function is(x, y) {
  33786. if (x === y) {
  33787. return x !== 0 || y !== 0 || 1 / x === 1 / y;
  33788. } else {
  33789. return x !== x && y !== y;
  33790. }
  33791. }
  33792. function shallowEqual(objA, objB) {
  33793. if (is(objA, objB)) return true;
  33794. if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
  33795. return false;
  33796. }
  33797. var keysA = Object.keys(objA);
  33798. var keysB = Object.keys(objB);
  33799. if (keysA.length !== keysB.length) return false;
  33800. for (var i = 0; i < keysA.length; i++) {
  33801. if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
  33802. return false;
  33803. }
  33804. }
  33805. return true;
  33806. }
  33807. /***/ }),
  33808. /***/ "./node_modules/react-redux/es/utils/verifyPlainObject.js":
  33809. /*!****************************************************************!*\
  33810. !*** ./node_modules/react-redux/es/utils/verifyPlainObject.js ***!
  33811. \****************************************************************/
  33812. /*! exports provided: default */
  33813. /*! exports used: default */
  33814. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33815. "use strict";
  33816. /* harmony export (immutable) */ __webpack_exports__["a"] = verifyPlainObject;
  33817. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(/*! ./isPlainObject */ "./node_modules/react-redux/es/utils/isPlainObject.js");
  33818. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(/*! ./warning */ "./node_modules/react-redux/es/utils/warning.js");
  33819. function verifyPlainObject(value, displayName, methodName) {
  33820. if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPlainObject__["a" /* default */])(value)) {
  33821. Object(__WEBPACK_IMPORTED_MODULE_1__warning__["a" /* default */])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
  33822. }
  33823. }
  33824. /***/ }),
  33825. /***/ "./node_modules/react-redux/es/utils/warning.js":
  33826. /*!******************************************************!*\
  33827. !*** ./node_modules/react-redux/es/utils/warning.js ***!
  33828. \******************************************************/
  33829. /*! exports provided: default */
  33830. /*! exports used: default */
  33831. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33832. "use strict";
  33833. /* harmony export (immutable) */ __webpack_exports__["a"] = warning;
  33834. /**
  33835. * Prints a warning in the console if it exists.
  33836. *
  33837. * @param {String} message The warning message.
  33838. * @returns {void}
  33839. */
  33840. function warning(message) {
  33841. /* eslint-disable no-console */
  33842. if (typeof console !== 'undefined' && typeof console.error === 'function') {
  33843. console.error(message);
  33844. }
  33845. /* eslint-enable no-console */
  33846. try {
  33847. // This error was thrown as a convenience so that if you enable
  33848. // "break on all exceptions" in your console,
  33849. // it would pause the execution at this line.
  33850. throw new Error(message);
  33851. /* eslint-disable no-empty */
  33852. } catch (e) {}
  33853. /* eslint-enable no-empty */
  33854. }
  33855. /***/ }),
  33856. /***/ "./node_modules/react-router-dom/es/BrowserRouter.js":
  33857. /*!***********************************************************!*\
  33858. !*** ./node_modules/react-router-dom/es/BrowserRouter.js ***!
  33859. \***********************************************************/
  33860. /*! exports provided: default */
  33861. /*! exports used: default */
  33862. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33863. "use strict";
  33864. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  33865. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
  33866. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  33867. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
  33868. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  33869. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
  33870. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
  33871. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
  33872. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  33873. 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; }
  33874. 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; }
  33875. /**
  33876. * The public API for a <Router> that uses HTML5 history.
  33877. */
  33878. var BrowserRouter = function (_React$Component) {
  33879. _inherits(BrowserRouter, _React$Component);
  33880. function BrowserRouter() {
  33881. var _temp, _this, _ret;
  33882. _classCallCheck(this, BrowserRouter);
  33883. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  33884. args[_key] = arguments[_key];
  33885. }
  33886. return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__["a" /* createBrowserHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
  33887. }
  33888. BrowserRouter.prototype.componentWillMount = function componentWillMount() {
  33889. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.");
  33890. };
  33891. BrowserRouter.prototype.render = function render() {
  33892. return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__["a" /* default */], { history: this.history, children: this.props.children });
  33893. };
  33894. return BrowserRouter;
  33895. }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
  33896. BrowserRouter.propTypes = {
  33897. basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
  33898. forceRefresh: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
  33899. getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
  33900. keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
  33901. children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node
  33902. };
  33903. /* harmony default export */ __webpack_exports__["a"] = (BrowserRouter);
  33904. /***/ }),
  33905. /***/ "./node_modules/react-router-dom/es/HashRouter.js":
  33906. /*!********************************************************!*\
  33907. !*** ./node_modules/react-router-dom/es/HashRouter.js ***!
  33908. \********************************************************/
  33909. /*! exports provided: default */
  33910. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33911. "use strict";
  33912. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  33913. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
  33914. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  33915. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
  33916. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  33917. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
  33918. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
  33919. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
  33920. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  33921. 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; }
  33922. 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; }
  33923. /**
  33924. * The public API for a <Router> that uses window.location.hash.
  33925. */
  33926. var HashRouter = function (_React$Component) {
  33927. _inherits(HashRouter, _React$Component);
  33928. function HashRouter() {
  33929. var _temp, _this, _ret;
  33930. _classCallCheck(this, HashRouter);
  33931. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  33932. args[_key] = arguments[_key];
  33933. }
  33934. return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__["b" /* createHashHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
  33935. }
  33936. HashRouter.prototype.componentWillMount = function componentWillMount() {
  33937. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.");
  33938. };
  33939. HashRouter.prototype.render = function render() {
  33940. return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__["a" /* default */], { history: this.history, children: this.props.children });
  33941. };
  33942. return HashRouter;
  33943. }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
  33944. HashRouter.propTypes = {
  33945. basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
  33946. getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
  33947. hashType: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(["hashbang", "noslash", "slash"]),
  33948. children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node
  33949. };
  33950. /* unused harmony default export */ var _unused_webpack_default_export = (HashRouter);
  33951. /***/ }),
  33952. /***/ "./node_modules/react-router-dom/es/Link.js":
  33953. /*!**************************************************!*\
  33954. !*** ./node_modules/react-router-dom/es/Link.js ***!
  33955. \**************************************************/
  33956. /*! exports provided: default */
  33957. /*! exports used: default */
  33958. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33959. "use strict";
  33960. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  33961. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  33962. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  33963. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
  33964. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  33965. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
  33966. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
  33967. 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; };
  33968. 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; }
  33969. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  33970. 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; }
  33971. 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; }
  33972. var isModifiedEvent = function isModifiedEvent(event) {
  33973. return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
  33974. };
  33975. /**
  33976. * The public API for rendering a history-aware <a>.
  33977. */
  33978. var Link = function (_React$Component) {
  33979. _inherits(Link, _React$Component);
  33980. function Link() {
  33981. var _temp, _this, _ret;
  33982. _classCallCheck(this, Link);
  33983. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  33984. args[_key] = arguments[_key];
  33985. }
  33986. return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
  33987. if (_this.props.onClick) _this.props.onClick(event);
  33988. if (!event.defaultPrevented && // onClick prevented default
  33989. event.button === 0 && // ignore everything but left clicks
  33990. !_this.props.target && // let browser handle "target=_blank" etc.
  33991. !isModifiedEvent(event) // ignore clicks with modifier keys
  33992. ) {
  33993. event.preventDefault();
  33994. var history = _this.context.router.history;
  33995. var _this$props = _this.props,
  33996. replace = _this$props.replace,
  33997. to = _this$props.to;
  33998. if (replace) {
  33999. history.replace(to);
  34000. } else {
  34001. history.push(to);
  34002. }
  34003. }
  34004. }, _temp), _possibleConstructorReturn(_this, _ret);
  34005. }
  34006. Link.prototype.render = function render() {
  34007. var _props = this.props,
  34008. replace = _props.replace,
  34009. to = _props.to,
  34010. innerRef = _props.innerRef,
  34011. props = _objectWithoutProperties(_props, ["replace", "to", "innerRef"]); // eslint-disable-line no-unused-vars
  34012. __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, "You should not use <Link> outside a <Router>");
  34013. __WEBPACK_IMPORTED_MODULE_2_invariant___default()(to !== undefined, 'You must specify the "to" property');
  34014. var history = this.context.router.history;
  34015. var location = typeof to === "string" ? Object(__WEBPACK_IMPORTED_MODULE_3_history__["c" /* createLocation */])(to, null, null, history.location) : to;
  34016. var href = history.createHref(location);
  34017. return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));
  34018. };
  34019. return Link;
  34020. }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
  34021. Link.propTypes = {
  34022. onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
  34023. target: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
  34024. replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
  34025. to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired,
  34026. innerRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func])
  34027. };
  34028. Link.defaultProps = {
  34029. replace: false
  34030. };
  34031. Link.contextTypes = {
  34032. router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
  34033. history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
  34034. push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
  34035. replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
  34036. createHref: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
  34037. }).isRequired
  34038. }).isRequired
  34039. };
  34040. /* harmony default export */ __webpack_exports__["a"] = (Link);
  34041. /***/ }),
  34042. /***/ "./node_modules/react-router-dom/es/MemoryRouter.js":
  34043. /*!**********************************************************!*\
  34044. !*** ./node_modules/react-router-dom/es/MemoryRouter.js ***!
  34045. \**********************************************************/
  34046. /*! exports provided: default */
  34047. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34048. "use strict";
  34049. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__ = __webpack_require__(/*! react-router/es/MemoryRouter */ "./node_modules/react-router/es/MemoryRouter.js");
  34050. // Written in this round about way for babel-transform-imports
  34051. /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__["a" /* default */]);
  34052. /***/ }),
  34053. /***/ "./node_modules/react-router-dom/es/NavLink.js":
  34054. /*!*****************************************************!*\
  34055. !*** ./node_modules/react-router-dom/es/NavLink.js ***!
  34056. \*****************************************************/
  34057. /*! exports provided: default */
  34058. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34059. "use strict";
  34060. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34061. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  34062. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34063. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
  34064. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Route__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router-dom/es/Route.js");
  34065. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(/*! ./Link */ "./node_modules/react-router-dom/es/Link.js");
  34066. 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; };
  34067. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  34068. 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; }
  34069. /**
  34070. * A <Link> wrapper that knows if it's "active" or not.
  34071. */
  34072. var NavLink = function NavLink(_ref) {
  34073. var to = _ref.to,
  34074. exact = _ref.exact,
  34075. strict = _ref.strict,
  34076. location = _ref.location,
  34077. activeClassName = _ref.activeClassName,
  34078. className = _ref.className,
  34079. activeStyle = _ref.activeStyle,
  34080. style = _ref.style,
  34081. getIsActive = _ref.isActive,
  34082. ariaCurrent = _ref["aria-current"],
  34083. rest = _objectWithoutProperties(_ref, ["to", "exact", "strict", "location", "activeClassName", "className", "activeStyle", "style", "isActive", "aria-current"]);
  34084. var path = (typeof to === "undefined" ? "undefined" : _typeof(to)) === "object" ? to.pathname : to;
  34085. // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
  34086. var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
  34087. return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Route__["a" /* default */], {
  34088. path: escapedPath,
  34089. exact: exact,
  34090. strict: strict,
  34091. location: location,
  34092. children: function children(_ref2) {
  34093. var location = _ref2.location,
  34094. match = _ref2.match;
  34095. var isActive = !!(getIsActive ? getIsActive(match, location) : match);
  34096. return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Link__["a" /* default */], _extends({
  34097. to: to,
  34098. className: isActive ? [className, activeClassName].filter(function (i) {
  34099. return i;
  34100. }).join(" ") : className,
  34101. style: isActive ? _extends({}, style, activeStyle) : style,
  34102. "aria-current": isActive && ariaCurrent || null
  34103. }, rest));
  34104. }
  34105. });
  34106. };
  34107. NavLink.propTypes = {
  34108. to: __WEBPACK_IMPORTED_MODULE_3__Link__["a" /* default */].propTypes.to,
  34109. exact: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
  34110. strict: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
  34111. location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
  34112. activeClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
  34113. className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
  34114. activeStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
  34115. style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
  34116. isActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
  34117. "aria-current": __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(["page", "step", "location", "date", "time", "true"])
  34118. };
  34119. NavLink.defaultProps = {
  34120. activeClassName: "active",
  34121. "aria-current": "page"
  34122. };
  34123. /* unused harmony default export */ var _unused_webpack_default_export = (NavLink);
  34124. /***/ }),
  34125. /***/ "./node_modules/react-router-dom/es/Prompt.js":
  34126. /*!****************************************************!*\
  34127. !*** ./node_modules/react-router-dom/es/Prompt.js ***!
  34128. \****************************************************/
  34129. /*! exports provided: default */
  34130. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34131. "use strict";
  34132. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__ = __webpack_require__(/*! react-router/es/Prompt */ "./node_modules/react-router/es/Prompt.js");
  34133. // Written in this round about way for babel-transform-imports
  34134. /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__["a" /* default */]);
  34135. /***/ }),
  34136. /***/ "./node_modules/react-router-dom/es/Redirect.js":
  34137. /*!******************************************************!*\
  34138. !*** ./node_modules/react-router-dom/es/Redirect.js ***!
  34139. \******************************************************/
  34140. /*! exports provided: default */
  34141. /*! exports used: default */
  34142. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34143. "use strict";
  34144. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__ = __webpack_require__(/*! react-router/es/Redirect */ "./node_modules/react-router/es/Redirect.js");
  34145. // Written in this round about way for babel-transform-imports
  34146. /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__["a" /* default */]);
  34147. /***/ }),
  34148. /***/ "./node_modules/react-router-dom/es/Route.js":
  34149. /*!***************************************************!*\
  34150. !*** ./node_modules/react-router-dom/es/Route.js ***!
  34151. \***************************************************/
  34152. /*! exports provided: default */
  34153. /*! exports used: default */
  34154. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34155. "use strict";
  34156. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(/*! react-router/es/Route */ "./node_modules/react-router/es/Route.js");
  34157. // Written in this round about way for babel-transform-imports
  34158. /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__["a" /* default */]);
  34159. /***/ }),
  34160. /***/ "./node_modules/react-router-dom/es/Router.js":
  34161. /*!****************************************************!*\
  34162. !*** ./node_modules/react-router-dom/es/Router.js ***!
  34163. \****************************************************/
  34164. /*! exports provided: default */
  34165. /*! exports used: default */
  34166. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34167. "use strict";
  34168. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(/*! react-router/es/Router */ "./node_modules/react-router/es/Router.js");
  34169. // Written in this round about way for babel-transform-imports
  34170. /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__["a" /* default */]);
  34171. /***/ }),
  34172. /***/ "./node_modules/react-router-dom/es/StaticRouter.js":
  34173. /*!**********************************************************!*\
  34174. !*** ./node_modules/react-router-dom/es/StaticRouter.js ***!
  34175. \**********************************************************/
  34176. /*! exports provided: default */
  34177. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34178. "use strict";
  34179. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__ = __webpack_require__(/*! react-router/es/StaticRouter */ "./node_modules/react-router/es/StaticRouter.js");
  34180. // Written in this round about way for babel-transform-imports
  34181. /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__["a" /* default */]);
  34182. /***/ }),
  34183. /***/ "./node_modules/react-router-dom/es/Switch.js":
  34184. /*!****************************************************!*\
  34185. !*** ./node_modules/react-router-dom/es/Switch.js ***!
  34186. \****************************************************/
  34187. /*! exports provided: default */
  34188. /*! exports used: default */
  34189. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34190. "use strict";
  34191. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(/*! react-router/es/Switch */ "./node_modules/react-router/es/Switch.js");
  34192. // Written in this round about way for babel-transform-imports
  34193. /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__["a" /* default */]);
  34194. /***/ }),
  34195. /***/ "./node_modules/react-router-dom/es/generatePath.js":
  34196. /*!**********************************************************!*\
  34197. !*** ./node_modules/react-router-dom/es/generatePath.js ***!
  34198. \**********************************************************/
  34199. /*! exports provided: default */
  34200. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34201. "use strict";
  34202. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(/*! react-router/es/generatePath */ "./node_modules/react-router/es/generatePath.js");
  34203. // Written in this round about way for babel-transform-imports
  34204. /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__["a" /* default */]);
  34205. /***/ }),
  34206. /***/ "./node_modules/react-router-dom/es/index.js":
  34207. /*!***************************************************!*\
  34208. !*** ./node_modules/react-router-dom/es/index.js ***!
  34209. \***************************************************/
  34210. /*! exports provided: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, withRouter */
  34211. /*! exports used: BrowserRouter, Redirect, Route, Switch */
  34212. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34213. "use strict";
  34214. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(/*! ./BrowserRouter */ "./node_modules/react-router-dom/es/BrowserRouter.js");
  34215. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; });
  34216. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(/*! ./HashRouter */ "./node_modules/react-router-dom/es/HashRouter.js");
  34217. /* unused harmony reexport HashRouter */
  34218. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(/*! ./Link */ "./node_modules/react-router-dom/es/Link.js");
  34219. /* unused harmony reexport Link */
  34220. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(/*! ./MemoryRouter */ "./node_modules/react-router-dom/es/MemoryRouter.js");
  34221. /* unused harmony reexport MemoryRouter */
  34222. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(/*! ./NavLink */ "./node_modules/react-router-dom/es/NavLink.js");
  34223. /* unused harmony reexport NavLink */
  34224. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(/*! ./Prompt */ "./node_modules/react-router-dom/es/Prompt.js");
  34225. /* unused harmony reexport Prompt */
  34226. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(/*! ./Redirect */ "./node_modules/react-router-dom/es/Redirect.js");
  34227. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; });
  34228. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router-dom/es/Route.js");
  34229. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; });
  34230. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
  34231. /* unused harmony reexport Router */
  34232. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(/*! ./StaticRouter */ "./node_modules/react-router-dom/es/StaticRouter.js");
  34233. /* unused harmony reexport StaticRouter */
  34234. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(/*! ./Switch */ "./node_modules/react-router-dom/es/Switch.js");
  34235. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; });
  34236. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(/*! ./generatePath */ "./node_modules/react-router-dom/es/generatePath.js");
  34237. /* unused harmony reexport generatePath */
  34238. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router-dom/es/matchPath.js");
  34239. /* unused harmony reexport matchPath */
  34240. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(/*! ./withRouter */ "./node_modules/react-router-dom/es/withRouter.js");
  34241. /* unused harmony reexport withRouter */
  34242. /***/ }),
  34243. /***/ "./node_modules/react-router-dom/es/matchPath.js":
  34244. /*!*******************************************************!*\
  34245. !*** ./node_modules/react-router-dom/es/matchPath.js ***!
  34246. \*******************************************************/
  34247. /*! exports provided: default */
  34248. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34249. "use strict";
  34250. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(/*! react-router/es/matchPath */ "./node_modules/react-router/es/matchPath.js");
  34251. // Written in this round about way for babel-transform-imports
  34252. /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__["a" /* default */]);
  34253. /***/ }),
  34254. /***/ "./node_modules/react-router-dom/es/withRouter.js":
  34255. /*!********************************************************!*\
  34256. !*** ./node_modules/react-router-dom/es/withRouter.js ***!
  34257. \********************************************************/
  34258. /*! exports provided: default */
  34259. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34260. "use strict";
  34261. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(/*! react-router/es/withRouter */ "./node_modules/react-router/es/withRouter.js");
  34262. // Written in this round about way for babel-transform-imports
  34263. /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__["a" /* default */]);
  34264. /***/ }),
  34265. /***/ "./node_modules/react-router/es/MemoryRouter.js":
  34266. /*!******************************************************!*\
  34267. !*** ./node_modules/react-router/es/MemoryRouter.js ***!
  34268. \******************************************************/
  34269. /*! exports provided: default */
  34270. /*! exports used: default */
  34271. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34272. "use strict";
  34273. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  34274. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
  34275. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34276. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
  34277. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34278. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
  34279. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
  34280. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router/es/Router.js");
  34281. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34282. 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; }
  34283. 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; }
  34284. /**
  34285. * The public API for a <Router> that stores location in memory.
  34286. */
  34287. var MemoryRouter = function (_React$Component) {
  34288. _inherits(MemoryRouter, _React$Component);
  34289. function MemoryRouter() {
  34290. var _temp, _this, _ret;
  34291. _classCallCheck(this, MemoryRouter);
  34292. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  34293. args[_key] = arguments[_key];
  34294. }
  34295. return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__["d" /* createMemoryHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
  34296. }
  34297. MemoryRouter.prototype.componentWillMount = function componentWillMount() {
  34298. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.");
  34299. };
  34300. MemoryRouter.prototype.render = function render() {
  34301. return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__["a" /* default */], { history: this.history, children: this.props.children });
  34302. };
  34303. return MemoryRouter;
  34304. }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
  34305. MemoryRouter.propTypes = {
  34306. initialEntries: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.array,
  34307. initialIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
  34308. getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
  34309. keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
  34310. children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node
  34311. };
  34312. /* harmony default export */ __webpack_exports__["a"] = (MemoryRouter);
  34313. /***/ }),
  34314. /***/ "./node_modules/react-router/es/Prompt.js":
  34315. /*!************************************************!*\
  34316. !*** ./node_modules/react-router/es/Prompt.js ***!
  34317. \************************************************/
  34318. /*! exports provided: default */
  34319. /*! exports used: default */
  34320. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34321. "use strict";
  34322. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34323. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  34324. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34325. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
  34326. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  34327. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
  34328. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34329. 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; }
  34330. 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; }
  34331. /**
  34332. * The public API for prompting the user before navigating away
  34333. * from a screen with a component.
  34334. */
  34335. var Prompt = function (_React$Component) {
  34336. _inherits(Prompt, _React$Component);
  34337. function Prompt() {
  34338. _classCallCheck(this, Prompt);
  34339. return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
  34340. }
  34341. Prompt.prototype.enable = function enable(message) {
  34342. if (this.unblock) this.unblock();
  34343. this.unblock = this.context.router.history.block(message);
  34344. };
  34345. Prompt.prototype.disable = function disable() {
  34346. if (this.unblock) {
  34347. this.unblock();
  34348. this.unblock = null;
  34349. }
  34350. };
  34351. Prompt.prototype.componentWillMount = function componentWillMount() {
  34352. __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, "You should not use <Prompt> outside a <Router>");
  34353. if (this.props.when) this.enable(this.props.message);
  34354. };
  34355. Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
  34356. if (nextProps.when) {
  34357. if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);
  34358. } else {
  34359. this.disable();
  34360. }
  34361. };
  34362. Prompt.prototype.componentWillUnmount = function componentWillUnmount() {
  34363. this.disable();
  34364. };
  34365. Prompt.prototype.render = function render() {
  34366. return null;
  34367. };
  34368. return Prompt;
  34369. }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
  34370. Prompt.propTypes = {
  34371. when: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
  34372. message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired
  34373. };
  34374. Prompt.defaultProps = {
  34375. when: true
  34376. };
  34377. Prompt.contextTypes = {
  34378. router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
  34379. history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
  34380. block: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
  34381. }).isRequired
  34382. }).isRequired
  34383. };
  34384. /* harmony default export */ __webpack_exports__["a"] = (Prompt);
  34385. /***/ }),
  34386. /***/ "./node_modules/react-router/es/Redirect.js":
  34387. /*!**************************************************!*\
  34388. !*** ./node_modules/react-router/es/Redirect.js ***!
  34389. \**************************************************/
  34390. /*! exports provided: default */
  34391. /*! exports used: default */
  34392. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34393. "use strict";
  34394. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34395. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  34396. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34397. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
  34398. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  34399. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
  34400. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  34401. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
  34402. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
  34403. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(/*! ./generatePath */ "./node_modules/react-router/es/generatePath.js");
  34404. 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; };
  34405. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34406. 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; }
  34407. 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; }
  34408. /**
  34409. * The public API for updating the location programmatically
  34410. * with a component.
  34411. */
  34412. var Redirect = function (_React$Component) {
  34413. _inherits(Redirect, _React$Component);
  34414. function Redirect() {
  34415. _classCallCheck(this, Redirect);
  34416. return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
  34417. }
  34418. Redirect.prototype.isStatic = function isStatic() {
  34419. return this.context.router && this.context.router.staticContext;
  34420. };
  34421. Redirect.prototype.componentWillMount = function componentWillMount() {
  34422. __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, "You should not use <Redirect> outside a <Router>");
  34423. if (this.isStatic()) this.perform();
  34424. };
  34425. Redirect.prototype.componentDidMount = function componentDidMount() {
  34426. if (!this.isStatic()) this.perform();
  34427. };
  34428. Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
  34429. var prevTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(prevProps.to);
  34430. var nextTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(this.props.to);
  34431. if (Object(__WEBPACK_IMPORTED_MODULE_4_history__["f" /* locationsAreEqual */])(prevTo, nextTo)) {
  34432. __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, "You tried to redirect to the same route you're currently on: " + ("\"" + nextTo.pathname + nextTo.search + "\""));
  34433. return;
  34434. }
  34435. this.perform();
  34436. };
  34437. Redirect.prototype.computeTo = function computeTo(_ref) {
  34438. var computedMatch = _ref.computedMatch,
  34439. to = _ref.to;
  34440. if (computedMatch) {
  34441. if (typeof to === "string") {
  34442. return Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__["a" /* default */])(to, computedMatch.params);
  34443. } else {
  34444. return _extends({}, to, {
  34445. pathname: Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__["a" /* default */])(to.pathname, computedMatch.params)
  34446. });
  34447. }
  34448. }
  34449. return to;
  34450. };
  34451. Redirect.prototype.perform = function perform() {
  34452. var history = this.context.router.history;
  34453. var push = this.props.push;
  34454. var to = this.computeTo(this.props);
  34455. if (push) {
  34456. history.push(to);
  34457. } else {
  34458. history.replace(to);
  34459. }
  34460. };
  34461. Redirect.prototype.render = function render() {
  34462. return null;
  34463. };
  34464. return Redirect;
  34465. }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
  34466. Redirect.propTypes = {
  34467. computedMatch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, // private, from <Switch>
  34468. push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
  34469. from: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
  34470. to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired
  34471. };
  34472. Redirect.defaultProps = {
  34473. push: false
  34474. };
  34475. Redirect.contextTypes = {
  34476. router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
  34477. history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
  34478. push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
  34479. replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
  34480. }).isRequired,
  34481. staticContext: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
  34482. }).isRequired
  34483. };
  34484. /* harmony default export */ __webpack_exports__["a"] = (Redirect);
  34485. /***/ }),
  34486. /***/ "./node_modules/react-router/es/Route.js":
  34487. /*!***********************************************!*\
  34488. !*** ./node_modules/react-router/es/Route.js ***!
  34489. \***********************************************/
  34490. /*! exports provided: default */
  34491. /*! exports used: default */
  34492. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34493. "use strict";
  34494. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  34495. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
  34496. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  34497. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
  34498. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34499. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
  34500. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34501. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
  34502. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router/es/matchPath.js");
  34503. 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; };
  34504. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34505. 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; }
  34506. 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; }
  34507. var isEmptyChildren = function isEmptyChildren(children) {
  34508. return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0;
  34509. };
  34510. /**
  34511. * The public API for matching a single path and rendering.
  34512. */
  34513. var Route = function (_React$Component) {
  34514. _inherits(Route, _React$Component);
  34515. function Route() {
  34516. var _temp, _this, _ret;
  34517. _classCallCheck(this, Route);
  34518. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  34519. args[_key] = arguments[_key];
  34520. }
  34521. return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
  34522. match: _this.computeMatch(_this.props, _this.context.router)
  34523. }, _temp), _possibleConstructorReturn(_this, _ret);
  34524. }
  34525. Route.prototype.getChildContext = function getChildContext() {
  34526. return {
  34527. router: _extends({}, this.context.router, {
  34528. route: {
  34529. location: this.props.location || this.context.router.route.location,
  34530. match: this.state.match
  34531. }
  34532. })
  34533. };
  34534. };
  34535. Route.prototype.computeMatch = function computeMatch(_ref, router) {
  34536. var computedMatch = _ref.computedMatch,
  34537. location = _ref.location,
  34538. path = _ref.path,
  34539. strict = _ref.strict,
  34540. exact = _ref.exact,
  34541. sensitive = _ref.sensitive;
  34542. if (computedMatch) return computedMatch; // <Switch> already computed the match for us
  34543. __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, "You should not use <Route> or withRouter() outside a <Router>");
  34544. var route = router.route;
  34545. var pathname = (location || route.location).pathname;
  34546. return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__["a" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);
  34547. };
  34548. Route.prototype.componentWillMount = function componentWillMount() {
  34549. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored");
  34550. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored");
  34551. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored");
  34552. };
  34553. Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {
  34554. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
  34555. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
  34556. this.setState({
  34557. match: this.computeMatch(nextProps, nextContext.router)
  34558. });
  34559. };
  34560. Route.prototype.render = function render() {
  34561. var match = this.state.match;
  34562. var _props = this.props,
  34563. children = _props.children,
  34564. component = _props.component,
  34565. render = _props.render;
  34566. var _context$router = this.context.router,
  34567. history = _context$router.history,
  34568. route = _context$router.route,
  34569. staticContext = _context$router.staticContext;
  34570. var location = this.props.location || route.location;
  34571. var props = { match: match, location: location, history: history, staticContext: staticContext };
  34572. if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null;
  34573. if (render) return match ? render(props) : null;
  34574. if (typeof children === "function") return children(props);
  34575. if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children);
  34576. return null;
  34577. };
  34578. return Route;
  34579. }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
  34580. Route.propTypes = {
  34581. computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from <Switch>
  34582. path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
  34583. exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
  34584. strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
  34585. sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
  34586. component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
  34587. render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
  34588. children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]),
  34589. location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
  34590. };
  34591. Route.contextTypes = {
  34592. router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({
  34593. history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
  34594. route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
  34595. staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
  34596. })
  34597. };
  34598. Route.childContextTypes = {
  34599. router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
  34600. };
  34601. /* harmony default export */ __webpack_exports__["a"] = (Route);
  34602. /***/ }),
  34603. /***/ "./node_modules/react-router/es/Router.js":
  34604. /*!************************************************!*\
  34605. !*** ./node_modules/react-router/es/Router.js ***!
  34606. \************************************************/
  34607. /*! exports provided: default */
  34608. /*! exports used: default */
  34609. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34610. "use strict";
  34611. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  34612. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
  34613. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  34614. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
  34615. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34616. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
  34617. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34618. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
  34619. 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; };
  34620. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34621. 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; }
  34622. 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; }
  34623. /**
  34624. * The public API for putting history on context.
  34625. */
  34626. var Router = function (_React$Component) {
  34627. _inherits(Router, _React$Component);
  34628. function Router() {
  34629. var _temp, _this, _ret;
  34630. _classCallCheck(this, Router);
  34631. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  34632. args[_key] = arguments[_key];
  34633. }
  34634. return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
  34635. match: _this.computeMatch(_this.props.history.location.pathname)
  34636. }, _temp), _possibleConstructorReturn(_this, _ret);
  34637. }
  34638. Router.prototype.getChildContext = function getChildContext() {
  34639. return {
  34640. router: _extends({}, this.context.router, {
  34641. history: this.props.history,
  34642. route: {
  34643. location: this.props.history.location,
  34644. match: this.state.match
  34645. }
  34646. })
  34647. };
  34648. };
  34649. Router.prototype.computeMatch = function computeMatch(pathname) {
  34650. return {
  34651. path: "/",
  34652. url: "/",
  34653. params: {},
  34654. isExact: pathname === "/"
  34655. };
  34656. };
  34657. Router.prototype.componentWillMount = function componentWillMount() {
  34658. var _this2 = this;
  34659. var _props = this.props,
  34660. children = _props.children,
  34661. history = _props.history;
  34662. __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, "A <Router> may have only one child element");
  34663. // Do this here so we can setState when a <Redirect> changes the
  34664. // location in componentWillMount. This happens e.g. when doing
  34665. // server rendering using a <StaticRouter>.
  34666. this.unlisten = history.listen(function () {
  34667. _this2.setState({
  34668. match: _this2.computeMatch(history.location.pathname)
  34669. });
  34670. });
  34671. };
  34672. Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
  34673. __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, "You cannot change <Router history>");
  34674. };
  34675. Router.prototype.componentWillUnmount = function componentWillUnmount() {
  34676. this.unlisten();
  34677. };
  34678. Router.prototype.render = function render() {
  34679. var children = this.props.children;
  34680. return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null;
  34681. };
  34682. return Router;
  34683. }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
  34684. Router.propTypes = {
  34685. history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
  34686. children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node
  34687. };
  34688. Router.contextTypes = {
  34689. router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
  34690. };
  34691. Router.childContextTypes = {
  34692. router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
  34693. };
  34694. /* harmony default export */ __webpack_exports__["a"] = (Router);
  34695. /***/ }),
  34696. /***/ "./node_modules/react-router/es/StaticRouter.js":
  34697. /*!******************************************************!*\
  34698. !*** ./node_modules/react-router/es/StaticRouter.js ***!
  34699. \******************************************************/
  34700. /*! exports provided: default */
  34701. /*! exports used: default */
  34702. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34703. "use strict";
  34704. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  34705. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
  34706. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  34707. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
  34708. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34709. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
  34710. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34711. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
  34712. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
  34713. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router/es/Router.js");
  34714. 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; };
  34715. 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; }
  34716. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34717. 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; }
  34718. 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; }
  34719. var addLeadingSlash = function addLeadingSlash(path) {
  34720. return path.charAt(0) === "/" ? path : "/" + path;
  34721. };
  34722. var addBasename = function addBasename(basename, location) {
  34723. if (!basename) return location;
  34724. return _extends({}, location, {
  34725. pathname: addLeadingSlash(basename) + location.pathname
  34726. });
  34727. };
  34728. var stripBasename = function stripBasename(basename, location) {
  34729. if (!basename) return location;
  34730. var base = addLeadingSlash(basename);
  34731. if (location.pathname.indexOf(base) !== 0) return location;
  34732. return _extends({}, location, {
  34733. pathname: location.pathname.substr(base.length)
  34734. });
  34735. };
  34736. var createURL = function createURL(location) {
  34737. return typeof location === "string" ? location : Object(__WEBPACK_IMPORTED_MODULE_4_history__["e" /* createPath */])(location);
  34738. };
  34739. var staticHandler = function staticHandler(methodName) {
  34740. return function () {
  34741. __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, "You cannot %s with <StaticRouter>", methodName);
  34742. };
  34743. };
  34744. var noop = function noop() {};
  34745. /**
  34746. * The public top-level API for a "static" <Router>, so-called because it
  34747. * can't actually change the current location. Instead, it just records
  34748. * location changes in a context object. Useful mainly in testing and
  34749. * server-rendering scenarios.
  34750. */
  34751. var StaticRouter = function (_React$Component) {
  34752. _inherits(StaticRouter, _React$Component);
  34753. function StaticRouter() {
  34754. var _temp, _this, _ret;
  34755. _classCallCheck(this, StaticRouter);
  34756. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  34757. args[_key] = arguments[_key];
  34758. }
  34759. return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {
  34760. return addLeadingSlash(_this.props.basename + createURL(path));
  34761. }, _this.handlePush = function (location) {
  34762. var _this$props = _this.props,
  34763. basename = _this$props.basename,
  34764. context = _this$props.context;
  34765. context.action = "PUSH";
  34766. context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(location));
  34767. context.url = createURL(context.location);
  34768. }, _this.handleReplace = function (location) {
  34769. var _this$props2 = _this.props,
  34770. basename = _this$props2.basename,
  34771. context = _this$props2.context;
  34772. context.action = "REPLACE";
  34773. context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(location));
  34774. context.url = createURL(context.location);
  34775. }, _this.handleListen = function () {
  34776. return noop;
  34777. }, _this.handleBlock = function () {
  34778. return noop;
  34779. }, _temp), _possibleConstructorReturn(_this, _ret);
  34780. }
  34781. StaticRouter.prototype.getChildContext = function getChildContext() {
  34782. return {
  34783. router: {
  34784. staticContext: this.props.context
  34785. }
  34786. };
  34787. };
  34788. StaticRouter.prototype.componentWillMount = function componentWillMount() {
  34789. __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.");
  34790. };
  34791. StaticRouter.prototype.render = function render() {
  34792. var _props = this.props,
  34793. basename = _props.basename,
  34794. context = _props.context,
  34795. location = _props.location,
  34796. props = _objectWithoutProperties(_props, ["basename", "context", "location"]);
  34797. var history = {
  34798. createHref: this.createHref,
  34799. action: "POP",
  34800. location: stripBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(location)),
  34801. push: this.handlePush,
  34802. replace: this.handleReplace,
  34803. go: staticHandler("go"),
  34804. goBack: staticHandler("goBack"),
  34805. goForward: staticHandler("goForward"),
  34806. listen: this.handleListen,
  34807. block: this.handleBlock
  34808. };
  34809. return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Router__["a" /* default */], _extends({}, props, { history: history }));
  34810. };
  34811. return StaticRouter;
  34812. }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
  34813. StaticRouter.propTypes = {
  34814. basename: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
  34815. context: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
  34816. location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object])
  34817. };
  34818. StaticRouter.defaultProps = {
  34819. basename: "",
  34820. location: "/"
  34821. };
  34822. StaticRouter.childContextTypes = {
  34823. router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
  34824. };
  34825. /* harmony default export */ __webpack_exports__["a"] = (StaticRouter);
  34826. /***/ }),
  34827. /***/ "./node_modules/react-router/es/Switch.js":
  34828. /*!************************************************!*\
  34829. !*** ./node_modules/react-router/es/Switch.js ***!
  34830. \************************************************/
  34831. /*! exports provided: default */
  34832. /*! exports used: default */
  34833. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34834. "use strict";
  34835. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  34836. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  34837. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  34838. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
  34839. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
  34840. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
  34841. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
  34842. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
  34843. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router/es/matchPath.js");
  34844. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34845. 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; }
  34846. 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; }
  34847. /**
  34848. * The public API for rendering the first <Route> that matches.
  34849. */
  34850. var Switch = function (_React$Component) {
  34851. _inherits(Switch, _React$Component);
  34852. function Switch() {
  34853. _classCallCheck(this, Switch);
  34854. return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
  34855. }
  34856. Switch.prototype.componentWillMount = function componentWillMount() {
  34857. __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, "You should not use <Switch> outside a <Router>");
  34858. };
  34859. Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
  34860. __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
  34861. __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
  34862. };
  34863. Switch.prototype.render = function render() {
  34864. var route = this.context.router.route;
  34865. var children = this.props.children;
  34866. var location = this.props.location || route.location;
  34867. var match = void 0,
  34868. child = void 0;
  34869. __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {
  34870. if (match == null && __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {
  34871. var _element$props = element.props,
  34872. pathProp = _element$props.path,
  34873. exact = _element$props.exact,
  34874. strict = _element$props.strict,
  34875. sensitive = _element$props.sensitive,
  34876. from = _element$props.from;
  34877. var path = pathProp || from;
  34878. child = element;
  34879. match = Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__["a" /* default */])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);
  34880. }
  34881. });
  34882. return match ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { location: location, computedMatch: match }) : null;
  34883. };
  34884. return Switch;
  34885. }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
  34886. Switch.contextTypes = {
  34887. router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
  34888. route: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired
  34889. }).isRequired
  34890. };
  34891. Switch.propTypes = {
  34892. children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node,
  34893. location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
  34894. };
  34895. /* harmony default export */ __webpack_exports__["a"] = (Switch);
  34896. /***/ }),
  34897. /***/ "./node_modules/react-router/es/generatePath.js":
  34898. /*!******************************************************!*\
  34899. !*** ./node_modules/react-router/es/generatePath.js ***!
  34900. \******************************************************/
  34901. /*! exports provided: default */
  34902. /*! exports used: default */
  34903. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34904. "use strict";
  34905. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(/*! path-to-regexp */ "./node_modules/path-to-regexp/index.js");
  34906. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);
  34907. var patternCache = {};
  34908. var cacheLimit = 10000;
  34909. var cacheCount = 0;
  34910. var compileGenerator = function compileGenerator(pattern) {
  34911. var cacheKey = pattern;
  34912. var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
  34913. if (cache[pattern]) return cache[pattern];
  34914. var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern);
  34915. if (cacheCount < cacheLimit) {
  34916. cache[pattern] = compiledGenerator;
  34917. cacheCount++;
  34918. }
  34919. return compiledGenerator;
  34920. };
  34921. /**
  34922. * Public API for generating a URL pathname from a pattern and parameters.
  34923. */
  34924. var generatePath = function generatePath() {
  34925. var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
  34926. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34927. if (pattern === "/") {
  34928. return pattern;
  34929. }
  34930. var generator = compileGenerator(pattern);
  34931. return generator(params, { pretty: true });
  34932. };
  34933. /* harmony default export */ __webpack_exports__["a"] = (generatePath);
  34934. /***/ }),
  34935. /***/ "./node_modules/react-router/es/matchPath.js":
  34936. /*!***************************************************!*\
  34937. !*** ./node_modules/react-router/es/matchPath.js ***!
  34938. \***************************************************/
  34939. /*! exports provided: default */
  34940. /*! exports used: default */
  34941. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34942. "use strict";
  34943. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(/*! path-to-regexp */ "./node_modules/path-to-regexp/index.js");
  34944. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);
  34945. var patternCache = {};
  34946. var cacheLimit = 10000;
  34947. var cacheCount = 0;
  34948. var compilePath = function compilePath(pattern, options) {
  34949. var cacheKey = "" + options.end + options.strict + options.sensitive;
  34950. var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
  34951. if (cache[pattern]) return cache[pattern];
  34952. var keys = [];
  34953. var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options);
  34954. var compiledPattern = { re: re, keys: keys };
  34955. if (cacheCount < cacheLimit) {
  34956. cache[pattern] = compiledPattern;
  34957. cacheCount++;
  34958. }
  34959. return compiledPattern;
  34960. };
  34961. /**
  34962. * Public API for matching a URL pathname to a path pattern.
  34963. */
  34964. var matchPath = function matchPath(pathname) {
  34965. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34966. var parent = arguments[2];
  34967. if (typeof options === "string") options = { path: options };
  34968. var _options = options,
  34969. path = _options.path,
  34970. _options$exact = _options.exact,
  34971. exact = _options$exact === undefined ? false : _options$exact,
  34972. _options$strict = _options.strict,
  34973. strict = _options$strict === undefined ? false : _options$strict,
  34974. _options$sensitive = _options.sensitive,
  34975. sensitive = _options$sensitive === undefined ? false : _options$sensitive;
  34976. if (path == null) return parent;
  34977. var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),
  34978. re = _compilePath.re,
  34979. keys = _compilePath.keys;
  34980. var match = re.exec(pathname);
  34981. if (!match) return null;
  34982. var url = match[0],
  34983. values = match.slice(1);
  34984. var isExact = pathname === url;
  34985. if (exact && !isExact) return null;
  34986. return {
  34987. path: path, // the path pattern used to match
  34988. url: path === "/" && url === "" ? "/" : url, // the matched portion of the URL
  34989. isExact: isExact, // whether or not we matched exactly
  34990. params: keys.reduce(function (memo, key, index) {
  34991. memo[key.name] = values[index];
  34992. return memo;
  34993. }, {})
  34994. };
  34995. };
  34996. /* harmony default export */ __webpack_exports__["a"] = (matchPath);
  34997. /***/ }),
  34998. /***/ "./node_modules/react-router/es/withRouter.js":
  34999. /*!****************************************************!*\
  35000. !*** ./node_modules/react-router/es/withRouter.js ***!
  35001. \****************************************************/
  35002. /*! exports provided: default */
  35003. /*! exports used: default */
  35004. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  35005. "use strict";
  35006. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  35007. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  35008. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  35009. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
  35010. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
  35011. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);
  35012. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router/es/Route.js");
  35013. 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; };
  35014. 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; }
  35015. /**
  35016. * A public higher-order component to access the imperative API
  35017. */
  35018. var withRouter = function withRouter(Component) {
  35019. var C = function C(props) {
  35020. var wrappedComponentRef = props.wrappedComponentRef,
  35021. remainingProps = _objectWithoutProperties(props, ["wrappedComponentRef"]);
  35022. return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Route__["a" /* default */], {
  35023. children: function children(routeComponentProps) {
  35024. return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, _extends({}, remainingProps, routeComponentProps, {
  35025. ref: wrappedComponentRef
  35026. }));
  35027. }
  35028. });
  35029. };
  35030. C.displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
  35031. C.WrappedComponent = Component;
  35032. C.propTypes = {
  35033. wrappedComponentRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func
  35034. };
  35035. return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(C, Component);
  35036. };
  35037. /* harmony default export */ __webpack_exports__["a"] = (withRouter);
  35038. /***/ }),
  35039. /***/ "./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
  35040. /*!************************************************************************************************************!*\
  35041. !*** ./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
  35042. \************************************************************************************************************/
  35043. /*! dynamic exports provided */
  35044. /*! exports used: default */
  35045. /***/ (function(module, exports, __webpack_require__) {
  35046. "use strict";
  35047. /**
  35048. * Copyright 2015, Yahoo! Inc.
  35049. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  35050. */
  35051. var REACT_STATICS = {
  35052. childContextTypes: true,
  35053. contextTypes: true,
  35054. defaultProps: true,
  35055. displayName: true,
  35056. getDefaultProps: true,
  35057. getDerivedStateFromProps: true,
  35058. mixins: true,
  35059. propTypes: true,
  35060. type: true
  35061. };
  35062. var KNOWN_STATICS = {
  35063. name: true,
  35064. length: true,
  35065. prototype: true,
  35066. caller: true,
  35067. callee: true,
  35068. arguments: true,
  35069. arity: true
  35070. };
  35071. var defineProperty = Object.defineProperty;
  35072. var getOwnPropertyNames = Object.getOwnPropertyNames;
  35073. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  35074. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  35075. var getPrototypeOf = Object.getPrototypeOf;
  35076. var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
  35077. function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
  35078. if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
  35079. if (objectPrototype) {
  35080. var inheritedComponent = getPrototypeOf(sourceComponent);
  35081. if (inheritedComponent && inheritedComponent !== objectPrototype) {
  35082. hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
  35083. }
  35084. }
  35085. var keys = getOwnPropertyNames(sourceComponent);
  35086. if (getOwnPropertySymbols) {
  35087. keys = keys.concat(getOwnPropertySymbols(sourceComponent));
  35088. }
  35089. for (var i = 0; i < keys.length; ++i) {
  35090. var key = keys[i];
  35091. if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
  35092. var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
  35093. try { // Avoid failures from read-only properties
  35094. defineProperty(targetComponent, key, descriptor);
  35095. } catch (e) {}
  35096. }
  35097. }
  35098. return targetComponent;
  35099. }
  35100. return targetComponent;
  35101. }
  35102. module.exports = hoistNonReactStatics;
  35103. /***/ }),
  35104. /***/ "./node_modules/react/cjs/react.development.js":
  35105. /*!*****************************************************!*\
  35106. !*** ./node_modules/react/cjs/react.development.js ***!
  35107. \*****************************************************/
  35108. /*! dynamic exports provided */
  35109. /*! all exports used */
  35110. /***/ (function(module, exports, __webpack_require__) {
  35111. "use strict";
  35112. /** @license React v16.14.0
  35113. * react.development.js
  35114. *
  35115. * Copyright (c) Facebook, Inc. and its affiliates.
  35116. *
  35117. * This source code is licensed under the MIT license found in the
  35118. * LICENSE file in the root directory of this source tree.
  35119. */
  35120. if (true) {
  35121. (function() {
  35122. 'use strict';
  35123. var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
  35124. var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
  35125. var ReactVersion = '16.14.0';
  35126. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  35127. // nor polyfill, then a plain number is used for performance.
  35128. var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  35129. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  35130. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  35131. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  35132. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  35133. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  35134. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  35135. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
  35136. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  35137. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  35138. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  35139. var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
  35140. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  35141. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  35142. var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
  35143. var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
  35144. var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
  35145. var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
  35146. var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  35147. var FAUX_ITERATOR_SYMBOL = '@@iterator';
  35148. function getIteratorFn(maybeIterable) {
  35149. if (maybeIterable === null || typeof maybeIterable !== 'object') {
  35150. return null;
  35151. }
  35152. var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
  35153. if (typeof maybeIterator === 'function') {
  35154. return maybeIterator;
  35155. }
  35156. return null;
  35157. }
  35158. /**
  35159. * Keeps track of the current dispatcher.
  35160. */
  35161. var ReactCurrentDispatcher = {
  35162. /**
  35163. * @internal
  35164. * @type {ReactComponent}
  35165. */
  35166. current: null
  35167. };
  35168. /**
  35169. * Keeps track of the current batch's configuration such as how long an update
  35170. * should suspend for if it needs to.
  35171. */
  35172. var ReactCurrentBatchConfig = {
  35173. suspense: null
  35174. };
  35175. /**
  35176. * Keeps track of the current owner.
  35177. *
  35178. * The current owner is the component who should own any components that are
  35179. * currently being constructed.
  35180. */
  35181. var ReactCurrentOwner = {
  35182. /**
  35183. * @internal
  35184. * @type {ReactComponent}
  35185. */
  35186. current: null
  35187. };
  35188. var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
  35189. function describeComponentFrame (name, source, ownerName) {
  35190. var sourceInfo = '';
  35191. if (source) {
  35192. var path = source.fileName;
  35193. var fileName = path.replace(BEFORE_SLASH_RE, '');
  35194. {
  35195. // In DEV, include code for a common special case:
  35196. // prefer "folder/index.js" instead of just "index.js".
  35197. if (/^index\./.test(fileName)) {
  35198. var match = path.match(BEFORE_SLASH_RE);
  35199. if (match) {
  35200. var pathBeforeSlash = match[1];
  35201. if (pathBeforeSlash) {
  35202. var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
  35203. fileName = folderName + '/' + fileName;
  35204. }
  35205. }
  35206. }
  35207. }
  35208. sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
  35209. } else if (ownerName) {
  35210. sourceInfo = ' (created by ' + ownerName + ')';
  35211. }
  35212. return '\n in ' + (name || 'Unknown') + sourceInfo;
  35213. }
  35214. var Resolved = 1;
  35215. function refineResolvedLazyComponent(lazyComponent) {
  35216. return lazyComponent._status === Resolved ? lazyComponent._result : null;
  35217. }
  35218. function getWrappedName(outerType, innerType, wrapperName) {
  35219. var functionName = innerType.displayName || innerType.name || '';
  35220. return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
  35221. }
  35222. function getComponentName(type) {
  35223. if (type == null) {
  35224. // Host root, text node or just invalid type.
  35225. return null;
  35226. }
  35227. {
  35228. if (typeof type.tag === 'number') {
  35229. error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
  35230. }
  35231. }
  35232. if (typeof type === 'function') {
  35233. return type.displayName || type.name || null;
  35234. }
  35235. if (typeof type === 'string') {
  35236. return type;
  35237. }
  35238. switch (type) {
  35239. case REACT_FRAGMENT_TYPE:
  35240. return 'Fragment';
  35241. case REACT_PORTAL_TYPE:
  35242. return 'Portal';
  35243. case REACT_PROFILER_TYPE:
  35244. return "Profiler";
  35245. case REACT_STRICT_MODE_TYPE:
  35246. return 'StrictMode';
  35247. case REACT_SUSPENSE_TYPE:
  35248. return 'Suspense';
  35249. case REACT_SUSPENSE_LIST_TYPE:
  35250. return 'SuspenseList';
  35251. }
  35252. if (typeof type === 'object') {
  35253. switch (type.$$typeof) {
  35254. case REACT_CONTEXT_TYPE:
  35255. return 'Context.Consumer';
  35256. case REACT_PROVIDER_TYPE:
  35257. return 'Context.Provider';
  35258. case REACT_FORWARD_REF_TYPE:
  35259. return getWrappedName(type, type.render, 'ForwardRef');
  35260. case REACT_MEMO_TYPE:
  35261. return getComponentName(type.type);
  35262. case REACT_BLOCK_TYPE:
  35263. return getComponentName(type.render);
  35264. case REACT_LAZY_TYPE:
  35265. {
  35266. var thenable = type;
  35267. var resolvedThenable = refineResolvedLazyComponent(thenable);
  35268. if (resolvedThenable) {
  35269. return getComponentName(resolvedThenable);
  35270. }
  35271. break;
  35272. }
  35273. }
  35274. }
  35275. return null;
  35276. }
  35277. var ReactDebugCurrentFrame = {};
  35278. var currentlyValidatingElement = null;
  35279. function setCurrentlyValidatingElement(element) {
  35280. {
  35281. currentlyValidatingElement = element;
  35282. }
  35283. }
  35284. {
  35285. // Stack implementation injected by the current renderer.
  35286. ReactDebugCurrentFrame.getCurrentStack = null;
  35287. ReactDebugCurrentFrame.getStackAddendum = function () {
  35288. var stack = ''; // Add an extra top frame while an element is being validated
  35289. if (currentlyValidatingElement) {
  35290. var name = getComponentName(currentlyValidatingElement.type);
  35291. var owner = currentlyValidatingElement._owner;
  35292. stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
  35293. } // Delegate to the injected renderer-specific implementation
  35294. var impl = ReactDebugCurrentFrame.getCurrentStack;
  35295. if (impl) {
  35296. stack += impl() || '';
  35297. }
  35298. return stack;
  35299. };
  35300. }
  35301. /**
  35302. * Used by act() to track whether you're inside an act() scope.
  35303. */
  35304. var IsSomeRendererActing = {
  35305. current: false
  35306. };
  35307. var ReactSharedInternals = {
  35308. ReactCurrentDispatcher: ReactCurrentDispatcher,
  35309. ReactCurrentBatchConfig: ReactCurrentBatchConfig,
  35310. ReactCurrentOwner: ReactCurrentOwner,
  35311. IsSomeRendererActing: IsSomeRendererActing,
  35312. // Used by renderers to avoid bundling object-assign twice in UMD bundles:
  35313. assign: _assign
  35314. };
  35315. {
  35316. _assign(ReactSharedInternals, {
  35317. // These should not be included in production.
  35318. ReactDebugCurrentFrame: ReactDebugCurrentFrame,
  35319. // Shim for React DOM 16.0.0 which still destructured (but not used) this.
  35320. // TODO: remove in React 17.0.
  35321. ReactComponentTreeHook: {}
  35322. });
  35323. }
  35324. // by calls to these methods by a Babel plugin.
  35325. //
  35326. // In PROD (or in packages without access to React internals),
  35327. // they are left as they are instead.
  35328. function warn(format) {
  35329. {
  35330. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  35331. args[_key - 1] = arguments[_key];
  35332. }
  35333. printWarning('warn', format, args);
  35334. }
  35335. }
  35336. function error(format) {
  35337. {
  35338. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  35339. args[_key2 - 1] = arguments[_key2];
  35340. }
  35341. printWarning('error', format, args);
  35342. }
  35343. }
  35344. function printWarning(level, format, args) {
  35345. // When changing this logic, you might want to also
  35346. // update consoleWithStackDev.www.js as well.
  35347. {
  35348. var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
  35349. if (!hasExistingStack) {
  35350. var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
  35351. var stack = ReactDebugCurrentFrame.getStackAddendum();
  35352. if (stack !== '') {
  35353. format += '%s';
  35354. args = args.concat([stack]);
  35355. }
  35356. }
  35357. var argsWithFormat = args.map(function (item) {
  35358. return '' + item;
  35359. }); // Careful: RN currently depends on this prefix
  35360. argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
  35361. // breaks IE9: https://github.com/facebook/react/issues/13610
  35362. // eslint-disable-next-line react-internal/no-production-logging
  35363. Function.prototype.apply.call(console[level], console, argsWithFormat);
  35364. try {
  35365. // --- Welcome to debugging React ---
  35366. // This error was thrown as a convenience so that you can use this stack
  35367. // to find the callsite that caused this warning to fire.
  35368. var argIndex = 0;
  35369. var message = 'Warning: ' + format.replace(/%s/g, function () {
  35370. return args[argIndex++];
  35371. });
  35372. throw new Error(message);
  35373. } catch (x) {}
  35374. }
  35375. }
  35376. var didWarnStateUpdateForUnmountedComponent = {};
  35377. function warnNoop(publicInstance, callerName) {
  35378. {
  35379. var _constructor = publicInstance.constructor;
  35380. var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
  35381. var warningKey = componentName + "." + callerName;
  35382. if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
  35383. return;
  35384. }
  35385. error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
  35386. didWarnStateUpdateForUnmountedComponent[warningKey] = true;
  35387. }
  35388. }
  35389. /**
  35390. * This is the abstract API for an update queue.
  35391. */
  35392. var ReactNoopUpdateQueue = {
  35393. /**
  35394. * Checks whether or not this composite component is mounted.
  35395. * @param {ReactClass} publicInstance The instance we want to test.
  35396. * @return {boolean} True if mounted, false otherwise.
  35397. * @protected
  35398. * @final
  35399. */
  35400. isMounted: function (publicInstance) {
  35401. return false;
  35402. },
  35403. /**
  35404. * Forces an update. This should only be invoked when it is known with
  35405. * certainty that we are **not** in a DOM transaction.
  35406. *
  35407. * You may want to call this when you know that some deeper aspect of the
  35408. * component's state has changed but `setState` was not called.
  35409. *
  35410. * This will not invoke `shouldComponentUpdate`, but it will invoke
  35411. * `componentWillUpdate` and `componentDidUpdate`.
  35412. *
  35413. * @param {ReactClass} publicInstance The instance that should rerender.
  35414. * @param {?function} callback Called after component is updated.
  35415. * @param {?string} callerName name of the calling function in the public API.
  35416. * @internal
  35417. */
  35418. enqueueForceUpdate: function (publicInstance, callback, callerName) {
  35419. warnNoop(publicInstance, 'forceUpdate');
  35420. },
  35421. /**
  35422. * Replaces all of the state. Always use this or `setState` to mutate state.
  35423. * You should treat `this.state` as immutable.
  35424. *
  35425. * There is no guarantee that `this.state` will be immediately updated, so
  35426. * accessing `this.state` after calling this method may return the old value.
  35427. *
  35428. * @param {ReactClass} publicInstance The instance that should rerender.
  35429. * @param {object} completeState Next state.
  35430. * @param {?function} callback Called after component is updated.
  35431. * @param {?string} callerName name of the calling function in the public API.
  35432. * @internal
  35433. */
  35434. enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
  35435. warnNoop(publicInstance, 'replaceState');
  35436. },
  35437. /**
  35438. * Sets a subset of the state. This only exists because _pendingState is
  35439. * internal. This provides a merging strategy that is not available to deep
  35440. * properties which is confusing. TODO: Expose pendingState or don't use it
  35441. * during the merge.
  35442. *
  35443. * @param {ReactClass} publicInstance The instance that should rerender.
  35444. * @param {object} partialState Next partial state to be merged with state.
  35445. * @param {?function} callback Called after component is updated.
  35446. * @param {?string} Name of the calling function in the public API.
  35447. * @internal
  35448. */
  35449. enqueueSetState: function (publicInstance, partialState, callback, callerName) {
  35450. warnNoop(publicInstance, 'setState');
  35451. }
  35452. };
  35453. var emptyObject = {};
  35454. {
  35455. Object.freeze(emptyObject);
  35456. }
  35457. /**
  35458. * Base class helpers for the updating state of a component.
  35459. */
  35460. function Component(props, context, updater) {
  35461. this.props = props;
  35462. this.context = context; // If a component has string refs, we will assign a different object later.
  35463. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
  35464. // renderer.
  35465. this.updater = updater || ReactNoopUpdateQueue;
  35466. }
  35467. Component.prototype.isReactComponent = {};
  35468. /**
  35469. * Sets a subset of the state. Always use this to mutate
  35470. * state. You should treat `this.state` as immutable.
  35471. *
  35472. * There is no guarantee that `this.state` will be immediately updated, so
  35473. * accessing `this.state` after calling this method may return the old value.
  35474. *
  35475. * There is no guarantee that calls to `setState` will run synchronously,
  35476. * as they may eventually be batched together. You can provide an optional
  35477. * callback that will be executed when the call to setState is actually
  35478. * completed.
  35479. *
  35480. * When a function is provided to setState, it will be called at some point in
  35481. * the future (not synchronously). It will be called with the up to date
  35482. * component arguments (state, props, context). These values can be different
  35483. * from this.* because your function may be called after receiveProps but before
  35484. * shouldComponentUpdate, and this new state, props, and context will not yet be
  35485. * assigned to this.
  35486. *
  35487. * @param {object|function} partialState Next partial state or function to
  35488. * produce next partial state to be merged with current state.
  35489. * @param {?function} callback Called after state is updated.
  35490. * @final
  35491. * @protected
  35492. */
  35493. Component.prototype.setState = function (partialState, callback) {
  35494. if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
  35495. {
  35496. throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
  35497. }
  35498. }
  35499. this.updater.enqueueSetState(this, partialState, callback, 'setState');
  35500. };
  35501. /**
  35502. * Forces an update. This should only be invoked when it is known with
  35503. * certainty that we are **not** in a DOM transaction.
  35504. *
  35505. * You may want to call this when you know that some deeper aspect of the
  35506. * component's state has changed but `setState` was not called.
  35507. *
  35508. * This will not invoke `shouldComponentUpdate`, but it will invoke
  35509. * `componentWillUpdate` and `componentDidUpdate`.
  35510. *
  35511. * @param {?function} callback Called after update is complete.
  35512. * @final
  35513. * @protected
  35514. */
  35515. Component.prototype.forceUpdate = function (callback) {
  35516. this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
  35517. };
  35518. /**
  35519. * Deprecated APIs. These APIs used to exist on classic React classes but since
  35520. * we would like to deprecate them, we're not going to move them over to this
  35521. * modern base class. Instead, we define a getter that warns if it's accessed.
  35522. */
  35523. {
  35524. var deprecatedAPIs = {
  35525. isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
  35526. replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
  35527. };
  35528. var defineDeprecationWarning = function (methodName, info) {
  35529. Object.defineProperty(Component.prototype, methodName, {
  35530. get: function () {
  35531. warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
  35532. return undefined;
  35533. }
  35534. });
  35535. };
  35536. for (var fnName in deprecatedAPIs) {
  35537. if (deprecatedAPIs.hasOwnProperty(fnName)) {
  35538. defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
  35539. }
  35540. }
  35541. }
  35542. function ComponentDummy() {}
  35543. ComponentDummy.prototype = Component.prototype;
  35544. /**
  35545. * Convenience component with default shallow equality check for sCU.
  35546. */
  35547. function PureComponent(props, context, updater) {
  35548. this.props = props;
  35549. this.context = context; // If a component has string refs, we will assign a different object later.
  35550. this.refs = emptyObject;
  35551. this.updater = updater || ReactNoopUpdateQueue;
  35552. }
  35553. var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
  35554. pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
  35555. _assign(pureComponentPrototype, Component.prototype);
  35556. pureComponentPrototype.isPureReactComponent = true;
  35557. // an immutable object with a single mutable value
  35558. function createRef() {
  35559. var refObject = {
  35560. current: null
  35561. };
  35562. {
  35563. Object.seal(refObject);
  35564. }
  35565. return refObject;
  35566. }
  35567. var hasOwnProperty = Object.prototype.hasOwnProperty;
  35568. var RESERVED_PROPS = {
  35569. key: true,
  35570. ref: true,
  35571. __self: true,
  35572. __source: true
  35573. };
  35574. var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
  35575. {
  35576. didWarnAboutStringRefs = {};
  35577. }
  35578. function hasValidRef(config) {
  35579. {
  35580. if (hasOwnProperty.call(config, 'ref')) {
  35581. var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
  35582. if (getter && getter.isReactWarning) {
  35583. return false;
  35584. }
  35585. }
  35586. }
  35587. return config.ref !== undefined;
  35588. }
  35589. function hasValidKey(config) {
  35590. {
  35591. if (hasOwnProperty.call(config, 'key')) {
  35592. var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
  35593. if (getter && getter.isReactWarning) {
  35594. return false;
  35595. }
  35596. }
  35597. }
  35598. return config.key !== undefined;
  35599. }
  35600. function defineKeyPropWarningGetter(props, displayName) {
  35601. var warnAboutAccessingKey = function () {
  35602. {
  35603. if (!specialPropKeyWarningShown) {
  35604. specialPropKeyWarningShown = true;
  35605. error('%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);
  35606. }
  35607. }
  35608. };
  35609. warnAboutAccessingKey.isReactWarning = true;
  35610. Object.defineProperty(props, 'key', {
  35611. get: warnAboutAccessingKey,
  35612. configurable: true
  35613. });
  35614. }
  35615. function defineRefPropWarningGetter(props, displayName) {
  35616. var warnAboutAccessingRef = function () {
  35617. {
  35618. if (!specialPropRefWarningShown) {
  35619. specialPropRefWarningShown = true;
  35620. error('%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);
  35621. }
  35622. }
  35623. };
  35624. warnAboutAccessingRef.isReactWarning = true;
  35625. Object.defineProperty(props, 'ref', {
  35626. get: warnAboutAccessingRef,
  35627. configurable: true
  35628. });
  35629. }
  35630. function warnIfStringRefCannotBeAutoConverted(config) {
  35631. {
  35632. if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
  35633. var componentName = getComponentName(ReactCurrentOwner.current.type);
  35634. if (!didWarnAboutStringRefs[componentName]) {
  35635. error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
  35636. didWarnAboutStringRefs[componentName] = true;
  35637. }
  35638. }
  35639. }
  35640. }
  35641. /**
  35642. * Factory method to create a new React element. This no longer adheres to
  35643. * the class pattern, so do not use new to call it. Also, instanceof check
  35644. * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
  35645. * if something is a React Element.
  35646. *
  35647. * @param {*} type
  35648. * @param {*} props
  35649. * @param {*} key
  35650. * @param {string|object} ref
  35651. * @param {*} owner
  35652. * @param {*} self A *temporary* helper to detect places where `this` is
  35653. * different from the `owner` when React.createElement is called, so that we
  35654. * can warn. We want to get rid of owner and replace string `ref`s with arrow
  35655. * functions, and as long as `this` and owner are the same, there will be no
  35656. * change in behavior.
  35657. * @param {*} source An annotation object (added by a transpiler or otherwise)
  35658. * indicating filename, line number, and/or other information.
  35659. * @internal
  35660. */
  35661. var ReactElement = function (type, key, ref, self, source, owner, props) {
  35662. var element = {
  35663. // This tag allows us to uniquely identify this as a React Element
  35664. $$typeof: REACT_ELEMENT_TYPE,
  35665. // Built-in properties that belong on the element
  35666. type: type,
  35667. key: key,
  35668. ref: ref,
  35669. props: props,
  35670. // Record the component responsible for creating this element.
  35671. _owner: owner
  35672. };
  35673. {
  35674. // The validation flag is currently mutative. We put it on
  35675. // an external backing store so that we can freeze the whole object.
  35676. // This can be replaced with a WeakMap once they are implemented in
  35677. // commonly used development environments.
  35678. element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
  35679. // the validation flag non-enumerable (where possible, which should
  35680. // include every environment we run tests in), so the test framework
  35681. // ignores it.
  35682. Object.defineProperty(element._store, 'validated', {
  35683. configurable: false,
  35684. enumerable: false,
  35685. writable: true,
  35686. value: false
  35687. }); // self and source are DEV only properties.
  35688. Object.defineProperty(element, '_self', {
  35689. configurable: false,
  35690. enumerable: false,
  35691. writable: false,
  35692. value: self
  35693. }); // Two elements created in two different places should be considered
  35694. // equal for testing purposes and therefore we hide it from enumeration.
  35695. Object.defineProperty(element, '_source', {
  35696. configurable: false,
  35697. enumerable: false,
  35698. writable: false,
  35699. value: source
  35700. });
  35701. if (Object.freeze) {
  35702. Object.freeze(element.props);
  35703. Object.freeze(element);
  35704. }
  35705. }
  35706. return element;
  35707. };
  35708. /**
  35709. * Create and return a new ReactElement of the given type.
  35710. * See https://reactjs.org/docs/react-api.html#createelement
  35711. */
  35712. function createElement(type, config, children) {
  35713. var propName; // Reserved names are extracted
  35714. var props = {};
  35715. var key = null;
  35716. var ref = null;
  35717. var self = null;
  35718. var source = null;
  35719. if (config != null) {
  35720. if (hasValidRef(config)) {
  35721. ref = config.ref;
  35722. {
  35723. warnIfStringRefCannotBeAutoConverted(config);
  35724. }
  35725. }
  35726. if (hasValidKey(config)) {
  35727. key = '' + config.key;
  35728. }
  35729. self = config.__self === undefined ? null : config.__self;
  35730. source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
  35731. for (propName in config) {
  35732. if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
  35733. props[propName] = config[propName];
  35734. }
  35735. }
  35736. } // Children can be more than one argument, and those are transferred onto
  35737. // the newly allocated props object.
  35738. var childrenLength = arguments.length - 2;
  35739. if (childrenLength === 1) {
  35740. props.children = children;
  35741. } else if (childrenLength > 1) {
  35742. var childArray = Array(childrenLength);
  35743. for (var i = 0; i < childrenLength; i++) {
  35744. childArray[i] = arguments[i + 2];
  35745. }
  35746. {
  35747. if (Object.freeze) {
  35748. Object.freeze(childArray);
  35749. }
  35750. }
  35751. props.children = childArray;
  35752. } // Resolve default props
  35753. if (type && type.defaultProps) {
  35754. var defaultProps = type.defaultProps;
  35755. for (propName in defaultProps) {
  35756. if (props[propName] === undefined) {
  35757. props[propName] = defaultProps[propName];
  35758. }
  35759. }
  35760. }
  35761. {
  35762. if (key || ref) {
  35763. var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
  35764. if (key) {
  35765. defineKeyPropWarningGetter(props, displayName);
  35766. }
  35767. if (ref) {
  35768. defineRefPropWarningGetter(props, displayName);
  35769. }
  35770. }
  35771. }
  35772. return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
  35773. }
  35774. function cloneAndReplaceKey(oldElement, newKey) {
  35775. var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
  35776. return newElement;
  35777. }
  35778. /**
  35779. * Clone and return a new ReactElement using element as the starting point.
  35780. * See https://reactjs.org/docs/react-api.html#cloneelement
  35781. */
  35782. function cloneElement(element, config, children) {
  35783. if (!!(element === null || element === undefined)) {
  35784. {
  35785. throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
  35786. }
  35787. }
  35788. var propName; // Original props are copied
  35789. var props = _assign({}, element.props); // Reserved names are extracted
  35790. var key = element.key;
  35791. var ref = element.ref; // Self is preserved since the owner is preserved.
  35792. var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
  35793. // transpiler, and the original source is probably a better indicator of the
  35794. // true owner.
  35795. var source = element._source; // Owner will be preserved, unless ref is overridden
  35796. var owner = element._owner;
  35797. if (config != null) {
  35798. if (hasValidRef(config)) {
  35799. // Silently steal the ref from the parent.
  35800. ref = config.ref;
  35801. owner = ReactCurrentOwner.current;
  35802. }
  35803. if (hasValidKey(config)) {
  35804. key = '' + config.key;
  35805. } // Remaining properties override existing props
  35806. var defaultProps;
  35807. if (element.type && element.type.defaultProps) {
  35808. defaultProps = element.type.defaultProps;
  35809. }
  35810. for (propName in config) {
  35811. if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
  35812. if (config[propName] === undefined && defaultProps !== undefined) {
  35813. // Resolve default props
  35814. props[propName] = defaultProps[propName];
  35815. } else {
  35816. props[propName] = config[propName];
  35817. }
  35818. }
  35819. }
  35820. } // Children can be more than one argument, and those are transferred onto
  35821. // the newly allocated props object.
  35822. var childrenLength = arguments.length - 2;
  35823. if (childrenLength === 1) {
  35824. props.children = children;
  35825. } else if (childrenLength > 1) {
  35826. var childArray = Array(childrenLength);
  35827. for (var i = 0; i < childrenLength; i++) {
  35828. childArray[i] = arguments[i + 2];
  35829. }
  35830. props.children = childArray;
  35831. }
  35832. return ReactElement(element.type, key, ref, self, source, owner, props);
  35833. }
  35834. /**
  35835. * Verifies the object is a ReactElement.
  35836. * See https://reactjs.org/docs/react-api.html#isvalidelement
  35837. * @param {?object} object
  35838. * @return {boolean} True if `object` is a ReactElement.
  35839. * @final
  35840. */
  35841. function isValidElement(object) {
  35842. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  35843. }
  35844. var SEPARATOR = '.';
  35845. var SUBSEPARATOR = ':';
  35846. /**
  35847. * Escape and wrap key so it is safe to use as a reactid
  35848. *
  35849. * @param {string} key to be escaped.
  35850. * @return {string} the escaped key.
  35851. */
  35852. function escape(key) {
  35853. var escapeRegex = /[=:]/g;
  35854. var escaperLookup = {
  35855. '=': '=0',
  35856. ':': '=2'
  35857. };
  35858. var escapedString = ('' + key).replace(escapeRegex, function (match) {
  35859. return escaperLookup[match];
  35860. });
  35861. return '$' + escapedString;
  35862. }
  35863. /**
  35864. * TODO: Test that a single child and an array with one item have the same key
  35865. * pattern.
  35866. */
  35867. var didWarnAboutMaps = false;
  35868. var userProvidedKeyEscapeRegex = /\/+/g;
  35869. function escapeUserProvidedKey(text) {
  35870. return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
  35871. }
  35872. var POOL_SIZE = 10;
  35873. var traverseContextPool = [];
  35874. function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
  35875. if (traverseContextPool.length) {
  35876. var traverseContext = traverseContextPool.pop();
  35877. traverseContext.result = mapResult;
  35878. traverseContext.keyPrefix = keyPrefix;
  35879. traverseContext.func = mapFunction;
  35880. traverseContext.context = mapContext;
  35881. traverseContext.count = 0;
  35882. return traverseContext;
  35883. } else {
  35884. return {
  35885. result: mapResult,
  35886. keyPrefix: keyPrefix,
  35887. func: mapFunction,
  35888. context: mapContext,
  35889. count: 0
  35890. };
  35891. }
  35892. }
  35893. function releaseTraverseContext(traverseContext) {
  35894. traverseContext.result = null;
  35895. traverseContext.keyPrefix = null;
  35896. traverseContext.func = null;
  35897. traverseContext.context = null;
  35898. traverseContext.count = 0;
  35899. if (traverseContextPool.length < POOL_SIZE) {
  35900. traverseContextPool.push(traverseContext);
  35901. }
  35902. }
  35903. /**
  35904. * @param {?*} children Children tree container.
  35905. * @param {!string} nameSoFar Name of the key path so far.
  35906. * @param {!function} callback Callback to invoke with each child found.
  35907. * @param {?*} traverseContext Used to pass information throughout the traversal
  35908. * process.
  35909. * @return {!number} The number of children in this subtree.
  35910. */
  35911. function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
  35912. var type = typeof children;
  35913. if (type === 'undefined' || type === 'boolean') {
  35914. // All of the above are perceived as null.
  35915. children = null;
  35916. }
  35917. var invokeCallback = false;
  35918. if (children === null) {
  35919. invokeCallback = true;
  35920. } else {
  35921. switch (type) {
  35922. case 'string':
  35923. case 'number':
  35924. invokeCallback = true;
  35925. break;
  35926. case 'object':
  35927. switch (children.$$typeof) {
  35928. case REACT_ELEMENT_TYPE:
  35929. case REACT_PORTAL_TYPE:
  35930. invokeCallback = true;
  35931. }
  35932. }
  35933. }
  35934. if (invokeCallback) {
  35935. callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
  35936. // so that it's consistent if the number of children grows.
  35937. nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
  35938. return 1;
  35939. }
  35940. var child;
  35941. var nextName;
  35942. var subtreeCount = 0; // Count of children found in the current subtree.
  35943. var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
  35944. if (Array.isArray(children)) {
  35945. for (var i = 0; i < children.length; i++) {
  35946. child = children[i];
  35947. nextName = nextNamePrefix + getComponentKey(child, i);
  35948. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  35949. }
  35950. } else {
  35951. var iteratorFn = getIteratorFn(children);
  35952. if (typeof iteratorFn === 'function') {
  35953. {
  35954. // Warn about using Maps as children
  35955. if (iteratorFn === children.entries) {
  35956. if (!didWarnAboutMaps) {
  35957. warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
  35958. }
  35959. didWarnAboutMaps = true;
  35960. }
  35961. }
  35962. var iterator = iteratorFn.call(children);
  35963. var step;
  35964. var ii = 0;
  35965. while (!(step = iterator.next()).done) {
  35966. child = step.value;
  35967. nextName = nextNamePrefix + getComponentKey(child, ii++);
  35968. subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
  35969. }
  35970. } else if (type === 'object') {
  35971. var addendum = '';
  35972. {
  35973. addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
  35974. }
  35975. var childrenString = '' + children;
  35976. {
  35977. {
  35978. throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
  35979. }
  35980. }
  35981. }
  35982. }
  35983. return subtreeCount;
  35984. }
  35985. /**
  35986. * Traverses children that are typically specified as `props.children`, but
  35987. * might also be specified through attributes:
  35988. *
  35989. * - `traverseAllChildren(this.props.children, ...)`
  35990. * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
  35991. *
  35992. * The `traverseContext` is an optional argument that is passed through the
  35993. * entire traversal. It can be used to store accumulations or anything else that
  35994. * the callback might find relevant.
  35995. *
  35996. * @param {?*} children Children tree object.
  35997. * @param {!function} callback To invoke upon traversing each child.
  35998. * @param {?*} traverseContext Context for traversal.
  35999. * @return {!number} The number of children in this subtree.
  36000. */
  36001. function traverseAllChildren(children, callback, traverseContext) {
  36002. if (children == null) {
  36003. return 0;
  36004. }
  36005. return traverseAllChildrenImpl(children, '', callback, traverseContext);
  36006. }
  36007. /**
  36008. * Generate a key string that identifies a component within a set.
  36009. *
  36010. * @param {*} component A component that could contain a manual key.
  36011. * @param {number} index Index that is used if a manual key is not provided.
  36012. * @return {string}
  36013. */
  36014. function getComponentKey(component, index) {
  36015. // Do some typechecking here since we call this blindly. We want to ensure
  36016. // that we don't block potential future ES APIs.
  36017. if (typeof component === 'object' && component !== null && component.key != null) {
  36018. // Explicit key
  36019. return escape(component.key);
  36020. } // Implicit key determined by the index in the set
  36021. return index.toString(36);
  36022. }
  36023. function forEachSingleChild(bookKeeping, child, name) {
  36024. var func = bookKeeping.func,
  36025. context = bookKeeping.context;
  36026. func.call(context, child, bookKeeping.count++);
  36027. }
  36028. /**
  36029. * Iterates through children that are typically specified as `props.children`.
  36030. *
  36031. * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
  36032. *
  36033. * The provided forEachFunc(child, index) will be called for each
  36034. * leaf child.
  36035. *
  36036. * @param {?*} children Children tree container.
  36037. * @param {function(*, int)} forEachFunc
  36038. * @param {*} forEachContext Context for forEachContext.
  36039. */
  36040. function forEachChildren(children, forEachFunc, forEachContext) {
  36041. if (children == null) {
  36042. return children;
  36043. }
  36044. var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
  36045. traverseAllChildren(children, forEachSingleChild, traverseContext);
  36046. releaseTraverseContext(traverseContext);
  36047. }
  36048. function mapSingleChildIntoContext(bookKeeping, child, childKey) {
  36049. var result = bookKeeping.result,
  36050. keyPrefix = bookKeeping.keyPrefix,
  36051. func = bookKeeping.func,
  36052. context = bookKeeping.context;
  36053. var mappedChild = func.call(context, child, bookKeeping.count++);
  36054. if (Array.isArray(mappedChild)) {
  36055. mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
  36056. return c;
  36057. });
  36058. } else if (mappedChild != null) {
  36059. if (isValidElement(mappedChild)) {
  36060. mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
  36061. // traverseAllChildren used to do for objects as children
  36062. keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
  36063. }
  36064. result.push(mappedChild);
  36065. }
  36066. }
  36067. function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
  36068. var escapedPrefix = '';
  36069. if (prefix != null) {
  36070. escapedPrefix = escapeUserProvidedKey(prefix) + '/';
  36071. }
  36072. var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
  36073. traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
  36074. releaseTraverseContext(traverseContext);
  36075. }
  36076. /**
  36077. * Maps children that are typically specified as `props.children`.
  36078. *
  36079. * See https://reactjs.org/docs/react-api.html#reactchildrenmap
  36080. *
  36081. * The provided mapFunction(child, key, index) will be called for each
  36082. * leaf child.
  36083. *
  36084. * @param {?*} children Children tree container.
  36085. * @param {function(*, int)} func The map function.
  36086. * @param {*} context Context for mapFunction.
  36087. * @return {object} Object containing the ordered map of results.
  36088. */
  36089. function mapChildren(children, func, context) {
  36090. if (children == null) {
  36091. return children;
  36092. }
  36093. var result = [];
  36094. mapIntoWithKeyPrefixInternal(children, result, null, func, context);
  36095. return result;
  36096. }
  36097. /**
  36098. * Count the number of children that are typically specified as
  36099. * `props.children`.
  36100. *
  36101. * See https://reactjs.org/docs/react-api.html#reactchildrencount
  36102. *
  36103. * @param {?*} children Children tree container.
  36104. * @return {number} The number of children.
  36105. */
  36106. function countChildren(children) {
  36107. return traverseAllChildren(children, function () {
  36108. return null;
  36109. }, null);
  36110. }
  36111. /**
  36112. * Flatten a children object (typically specified as `props.children`) and
  36113. * return an array with appropriately re-keyed children.
  36114. *
  36115. * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
  36116. */
  36117. function toArray(children) {
  36118. var result = [];
  36119. mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
  36120. return child;
  36121. });
  36122. return result;
  36123. }
  36124. /**
  36125. * Returns the first child in a collection of children and verifies that there
  36126. * is only one child in the collection.
  36127. *
  36128. * See https://reactjs.org/docs/react-api.html#reactchildrenonly
  36129. *
  36130. * The current implementation of this function assumes that a single child gets
  36131. * passed without a wrapper, but the purpose of this helper function is to
  36132. * abstract away the particular structure of children.
  36133. *
  36134. * @param {?object} children Child collection structure.
  36135. * @return {ReactElement} The first and only `ReactElement` contained in the
  36136. * structure.
  36137. */
  36138. function onlyChild(children) {
  36139. if (!isValidElement(children)) {
  36140. {
  36141. throw Error( "React.Children.only expected to receive a single React element child." );
  36142. }
  36143. }
  36144. return children;
  36145. }
  36146. function createContext(defaultValue, calculateChangedBits) {
  36147. if (calculateChangedBits === undefined) {
  36148. calculateChangedBits = null;
  36149. } else {
  36150. {
  36151. if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
  36152. error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
  36153. }
  36154. }
  36155. }
  36156. var context = {
  36157. $$typeof: REACT_CONTEXT_TYPE,
  36158. _calculateChangedBits: calculateChangedBits,
  36159. // As a workaround to support multiple concurrent renderers, we categorize
  36160. // some renderers as primary and others as secondary. We only expect
  36161. // there to be two concurrent renderers at most: React Native (primary) and
  36162. // Fabric (secondary); React DOM (primary) and React ART (secondary).
  36163. // Secondary renderers store their context values on separate fields.
  36164. _currentValue: defaultValue,
  36165. _currentValue2: defaultValue,
  36166. // Used to track how many concurrent renderers this context currently
  36167. // supports within in a single renderer. Such as parallel server rendering.
  36168. _threadCount: 0,
  36169. // These are circular
  36170. Provider: null,
  36171. Consumer: null
  36172. };
  36173. context.Provider = {
  36174. $$typeof: REACT_PROVIDER_TYPE,
  36175. _context: context
  36176. };
  36177. var hasWarnedAboutUsingNestedContextConsumers = false;
  36178. var hasWarnedAboutUsingConsumerProvider = false;
  36179. {
  36180. // A separate object, but proxies back to the original context object for
  36181. // backwards compatibility. It has a different $$typeof, so we can properly
  36182. // warn for the incorrect usage of Context as a Consumer.
  36183. var Consumer = {
  36184. $$typeof: REACT_CONTEXT_TYPE,
  36185. _context: context,
  36186. _calculateChangedBits: context._calculateChangedBits
  36187. }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
  36188. Object.defineProperties(Consumer, {
  36189. Provider: {
  36190. get: function () {
  36191. if (!hasWarnedAboutUsingConsumerProvider) {
  36192. hasWarnedAboutUsingConsumerProvider = true;
  36193. error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
  36194. }
  36195. return context.Provider;
  36196. },
  36197. set: function (_Provider) {
  36198. context.Provider = _Provider;
  36199. }
  36200. },
  36201. _currentValue: {
  36202. get: function () {
  36203. return context._currentValue;
  36204. },
  36205. set: function (_currentValue) {
  36206. context._currentValue = _currentValue;
  36207. }
  36208. },
  36209. _currentValue2: {
  36210. get: function () {
  36211. return context._currentValue2;
  36212. },
  36213. set: function (_currentValue2) {
  36214. context._currentValue2 = _currentValue2;
  36215. }
  36216. },
  36217. _threadCount: {
  36218. get: function () {
  36219. return context._threadCount;
  36220. },
  36221. set: function (_threadCount) {
  36222. context._threadCount = _threadCount;
  36223. }
  36224. },
  36225. Consumer: {
  36226. get: function () {
  36227. if (!hasWarnedAboutUsingNestedContextConsumers) {
  36228. hasWarnedAboutUsingNestedContextConsumers = true;
  36229. error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
  36230. }
  36231. return context.Consumer;
  36232. }
  36233. }
  36234. }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
  36235. context.Consumer = Consumer;
  36236. }
  36237. {
  36238. context._currentRenderer = null;
  36239. context._currentRenderer2 = null;
  36240. }
  36241. return context;
  36242. }
  36243. function lazy(ctor) {
  36244. var lazyType = {
  36245. $$typeof: REACT_LAZY_TYPE,
  36246. _ctor: ctor,
  36247. // React uses these fields to store the result.
  36248. _status: -1,
  36249. _result: null
  36250. };
  36251. {
  36252. // In production, this would just set it on the object.
  36253. var defaultProps;
  36254. var propTypes;
  36255. Object.defineProperties(lazyType, {
  36256. defaultProps: {
  36257. configurable: true,
  36258. get: function () {
  36259. return defaultProps;
  36260. },
  36261. set: function (newDefaultProps) {
  36262. error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
  36263. defaultProps = newDefaultProps; // Match production behavior more closely:
  36264. Object.defineProperty(lazyType, 'defaultProps', {
  36265. enumerable: true
  36266. });
  36267. }
  36268. },
  36269. propTypes: {
  36270. configurable: true,
  36271. get: function () {
  36272. return propTypes;
  36273. },
  36274. set: function (newPropTypes) {
  36275. error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
  36276. propTypes = newPropTypes; // Match production behavior more closely:
  36277. Object.defineProperty(lazyType, 'propTypes', {
  36278. enumerable: true
  36279. });
  36280. }
  36281. }
  36282. });
  36283. }
  36284. return lazyType;
  36285. }
  36286. function forwardRef(render) {
  36287. {
  36288. if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
  36289. error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
  36290. } else if (typeof render !== 'function') {
  36291. error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
  36292. } else {
  36293. if (render.length !== 0 && render.length !== 2) {
  36294. error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
  36295. }
  36296. }
  36297. if (render != null) {
  36298. if (render.defaultProps != null || render.propTypes != null) {
  36299. error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
  36300. }
  36301. }
  36302. }
  36303. return {
  36304. $$typeof: REACT_FORWARD_REF_TYPE,
  36305. render: render
  36306. };
  36307. }
  36308. function isValidElementType(type) {
  36309. return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  36310. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
  36311. }
  36312. function memo(type, compare) {
  36313. {
  36314. if (!isValidElementType(type)) {
  36315. error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
  36316. }
  36317. }
  36318. return {
  36319. $$typeof: REACT_MEMO_TYPE,
  36320. type: type,
  36321. compare: compare === undefined ? null : compare
  36322. };
  36323. }
  36324. function resolveDispatcher() {
  36325. var dispatcher = ReactCurrentDispatcher.current;
  36326. if (!(dispatcher !== null)) {
  36327. {
  36328. throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
  36329. }
  36330. }
  36331. return dispatcher;
  36332. }
  36333. function useContext(Context, unstable_observedBits) {
  36334. var dispatcher = resolveDispatcher();
  36335. {
  36336. if (unstable_observedBits !== undefined) {
  36337. error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');
  36338. } // TODO: add a more generic warning for invalid values.
  36339. if (Context._context !== undefined) {
  36340. var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
  36341. // and nobody should be using this in existing code.
  36342. if (realContext.Consumer === Context) {
  36343. error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
  36344. } else if (realContext.Provider === Context) {
  36345. error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
  36346. }
  36347. }
  36348. }
  36349. return dispatcher.useContext(Context, unstable_observedBits);
  36350. }
  36351. function useState(initialState) {
  36352. var dispatcher = resolveDispatcher();
  36353. return dispatcher.useState(initialState);
  36354. }
  36355. function useReducer(reducer, initialArg, init) {
  36356. var dispatcher = resolveDispatcher();
  36357. return dispatcher.useReducer(reducer, initialArg, init);
  36358. }
  36359. function useRef(initialValue) {
  36360. var dispatcher = resolveDispatcher();
  36361. return dispatcher.useRef(initialValue);
  36362. }
  36363. function useEffect(create, deps) {
  36364. var dispatcher = resolveDispatcher();
  36365. return dispatcher.useEffect(create, deps);
  36366. }
  36367. function useLayoutEffect(create, deps) {
  36368. var dispatcher = resolveDispatcher();
  36369. return dispatcher.useLayoutEffect(create, deps);
  36370. }
  36371. function useCallback(callback, deps) {
  36372. var dispatcher = resolveDispatcher();
  36373. return dispatcher.useCallback(callback, deps);
  36374. }
  36375. function useMemo(create, deps) {
  36376. var dispatcher = resolveDispatcher();
  36377. return dispatcher.useMemo(create, deps);
  36378. }
  36379. function useImperativeHandle(ref, create, deps) {
  36380. var dispatcher = resolveDispatcher();
  36381. return dispatcher.useImperativeHandle(ref, create, deps);
  36382. }
  36383. function useDebugValue(value, formatterFn) {
  36384. {
  36385. var dispatcher = resolveDispatcher();
  36386. return dispatcher.useDebugValue(value, formatterFn);
  36387. }
  36388. }
  36389. var propTypesMisspellWarningShown;
  36390. {
  36391. propTypesMisspellWarningShown = false;
  36392. }
  36393. function getDeclarationErrorAddendum() {
  36394. if (ReactCurrentOwner.current) {
  36395. var name = getComponentName(ReactCurrentOwner.current.type);
  36396. if (name) {
  36397. return '\n\nCheck the render method of `' + name + '`.';
  36398. }
  36399. }
  36400. return '';
  36401. }
  36402. function getSourceInfoErrorAddendum(source) {
  36403. if (source !== undefined) {
  36404. var fileName = source.fileName.replace(/^.*[\\\/]/, '');
  36405. var lineNumber = source.lineNumber;
  36406. return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
  36407. }
  36408. return '';
  36409. }
  36410. function getSourceInfoErrorAddendumForProps(elementProps) {
  36411. if (elementProps !== null && elementProps !== undefined) {
  36412. return getSourceInfoErrorAddendum(elementProps.__source);
  36413. }
  36414. return '';
  36415. }
  36416. /**
  36417. * Warn if there's no key explicitly set on dynamic arrays of children or
  36418. * object keys are not valid. This allows us to keep track of children between
  36419. * updates.
  36420. */
  36421. var ownerHasKeyUseWarning = {};
  36422. function getCurrentComponentErrorInfo(parentType) {
  36423. var info = getDeclarationErrorAddendum();
  36424. if (!info) {
  36425. var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
  36426. if (parentName) {
  36427. info = "\n\nCheck the top-level render call using <" + parentName + ">.";
  36428. }
  36429. }
  36430. return info;
  36431. }
  36432. /**
  36433. * Warn if the element doesn't have an explicit key assigned to it.
  36434. * This element is in an array. The array could grow and shrink or be
  36435. * reordered. All children that haven't already been validated are required to
  36436. * have a "key" property assigned to it. Error statuses are cached so a warning
  36437. * will only be shown once.
  36438. *
  36439. * @internal
  36440. * @param {ReactElement} element Element that requires a key.
  36441. * @param {*} parentType element's parent's type.
  36442. */
  36443. function validateExplicitKey(element, parentType) {
  36444. if (!element._store || element._store.validated || element.key != null) {
  36445. return;
  36446. }
  36447. element._store.validated = true;
  36448. var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
  36449. if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
  36450. return;
  36451. }
  36452. ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
  36453. // property, it may be the creator of the child that's responsible for
  36454. // assigning it a key.
  36455. var childOwner = '';
  36456. if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
  36457. // Give the component that originally created this child.
  36458. childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
  36459. }
  36460. setCurrentlyValidatingElement(element);
  36461. {
  36462. error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
  36463. }
  36464. setCurrentlyValidatingElement(null);
  36465. }
  36466. /**
  36467. * Ensure that every element either is passed in a static location, in an
  36468. * array with an explicit keys property defined, or in an object literal
  36469. * with valid key property.
  36470. *
  36471. * @internal
  36472. * @param {ReactNode} node Statically passed child of any type.
  36473. * @param {*} parentType node's parent's type.
  36474. */
  36475. function validateChildKeys(node, parentType) {
  36476. if (typeof node !== 'object') {
  36477. return;
  36478. }
  36479. if (Array.isArray(node)) {
  36480. for (var i = 0; i < node.length; i++) {
  36481. var child = node[i];
  36482. if (isValidElement(child)) {
  36483. validateExplicitKey(child, parentType);
  36484. }
  36485. }
  36486. } else if (isValidElement(node)) {
  36487. // This element was passed in a valid location.
  36488. if (node._store) {
  36489. node._store.validated = true;
  36490. }
  36491. } else if (node) {
  36492. var iteratorFn = getIteratorFn(node);
  36493. if (typeof iteratorFn === 'function') {
  36494. // Entry iterators used to provide implicit keys,
  36495. // but now we print a separate warning for them later.
  36496. if (iteratorFn !== node.entries) {
  36497. var iterator = iteratorFn.call(node);
  36498. var step;
  36499. while (!(step = iterator.next()).done) {
  36500. if (isValidElement(step.value)) {
  36501. validateExplicitKey(step.value, parentType);
  36502. }
  36503. }
  36504. }
  36505. }
  36506. }
  36507. }
  36508. /**
  36509. * Given an element, validate that its props follow the propTypes definition,
  36510. * provided by the type.
  36511. *
  36512. * @param {ReactElement} element
  36513. */
  36514. function validatePropTypes(element) {
  36515. {
  36516. var type = element.type;
  36517. if (type === null || type === undefined || typeof type === 'string') {
  36518. return;
  36519. }
  36520. var name = getComponentName(type);
  36521. var propTypes;
  36522. if (typeof type === 'function') {
  36523. propTypes = type.propTypes;
  36524. } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
  36525. // Inner props are checked in the reconciler.
  36526. type.$$typeof === REACT_MEMO_TYPE)) {
  36527. propTypes = type.propTypes;
  36528. } else {
  36529. return;
  36530. }
  36531. if (propTypes) {
  36532. setCurrentlyValidatingElement(element);
  36533. checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
  36534. setCurrentlyValidatingElement(null);
  36535. } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
  36536. propTypesMisspellWarningShown = true;
  36537. error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
  36538. }
  36539. if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
  36540. error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
  36541. }
  36542. }
  36543. }
  36544. /**
  36545. * Given a fragment, validate that it can only be provided with fragment props
  36546. * @param {ReactElement} fragment
  36547. */
  36548. function validateFragmentProps(fragment) {
  36549. {
  36550. setCurrentlyValidatingElement(fragment);
  36551. var keys = Object.keys(fragment.props);
  36552. for (var i = 0; i < keys.length; i++) {
  36553. var key = keys[i];
  36554. if (key !== 'children' && key !== 'key') {
  36555. error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
  36556. break;
  36557. }
  36558. }
  36559. if (fragment.ref !== null) {
  36560. error('Invalid attribute `ref` supplied to `React.Fragment`.');
  36561. }
  36562. setCurrentlyValidatingElement(null);
  36563. }
  36564. }
  36565. function createElementWithValidation(type, props, children) {
  36566. var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
  36567. // succeed and there will likely be errors in render.
  36568. if (!validType) {
  36569. var info = '';
  36570. if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
  36571. info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
  36572. }
  36573. var sourceInfo = getSourceInfoErrorAddendumForProps(props);
  36574. if (sourceInfo) {
  36575. info += sourceInfo;
  36576. } else {
  36577. info += getDeclarationErrorAddendum();
  36578. }
  36579. var typeString;
  36580. if (type === null) {
  36581. typeString = 'null';
  36582. } else if (Array.isArray(type)) {
  36583. typeString = 'array';
  36584. } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
  36585. typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
  36586. info = ' Did you accidentally export a JSX literal instead of a component?';
  36587. } else {
  36588. typeString = typeof type;
  36589. }
  36590. {
  36591. error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
  36592. }
  36593. }
  36594. var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
  36595. // TODO: Drop this when these are no longer allowed as the type argument.
  36596. if (element == null) {
  36597. return element;
  36598. } // Skip key warning if the type isn't valid since our key validation logic
  36599. // doesn't expect a non-string/function type and can throw confusing errors.
  36600. // We don't want exception behavior to differ between dev and prod.
  36601. // (Rendering will throw with a helpful message and as soon as the type is
  36602. // fixed, the key warnings will appear.)
  36603. if (validType) {
  36604. for (var i = 2; i < arguments.length; i++) {
  36605. validateChildKeys(arguments[i], type);
  36606. }
  36607. }
  36608. if (type === REACT_FRAGMENT_TYPE) {
  36609. validateFragmentProps(element);
  36610. } else {
  36611. validatePropTypes(element);
  36612. }
  36613. return element;
  36614. }
  36615. var didWarnAboutDeprecatedCreateFactory = false;
  36616. function createFactoryWithValidation(type) {
  36617. var validatedFactory = createElementWithValidation.bind(null, type);
  36618. validatedFactory.type = type;
  36619. {
  36620. if (!didWarnAboutDeprecatedCreateFactory) {
  36621. didWarnAboutDeprecatedCreateFactory = true;
  36622. warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
  36623. } // Legacy hook: remove it
  36624. Object.defineProperty(validatedFactory, 'type', {
  36625. enumerable: false,
  36626. get: function () {
  36627. warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
  36628. Object.defineProperty(this, 'type', {
  36629. value: type
  36630. });
  36631. return type;
  36632. }
  36633. });
  36634. }
  36635. return validatedFactory;
  36636. }
  36637. function cloneElementWithValidation(element, props, children) {
  36638. var newElement = cloneElement.apply(this, arguments);
  36639. for (var i = 2; i < arguments.length; i++) {
  36640. validateChildKeys(arguments[i], newElement.type);
  36641. }
  36642. validatePropTypes(newElement);
  36643. return newElement;
  36644. }
  36645. {
  36646. try {
  36647. var frozenObject = Object.freeze({});
  36648. var testMap = new Map([[frozenObject, null]]);
  36649. var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
  36650. // https://github.com/rollup/rollup/issues/1771
  36651. // TODO: we can remove these if Rollup fixes the bug.
  36652. testMap.set(0, 0);
  36653. testSet.add(0);
  36654. } catch (e) {
  36655. }
  36656. }
  36657. var createElement$1 = createElementWithValidation ;
  36658. var cloneElement$1 = cloneElementWithValidation ;
  36659. var createFactory = createFactoryWithValidation ;
  36660. var Children = {
  36661. map: mapChildren,
  36662. forEach: forEachChildren,
  36663. count: countChildren,
  36664. toArray: toArray,
  36665. only: onlyChild
  36666. };
  36667. exports.Children = Children;
  36668. exports.Component = Component;
  36669. exports.Fragment = REACT_FRAGMENT_TYPE;
  36670. exports.Profiler = REACT_PROFILER_TYPE;
  36671. exports.PureComponent = PureComponent;
  36672. exports.StrictMode = REACT_STRICT_MODE_TYPE;
  36673. exports.Suspense = REACT_SUSPENSE_TYPE;
  36674. exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
  36675. exports.cloneElement = cloneElement$1;
  36676. exports.createContext = createContext;
  36677. exports.createElement = createElement$1;
  36678. exports.createFactory = createFactory;
  36679. exports.createRef = createRef;
  36680. exports.forwardRef = forwardRef;
  36681. exports.isValidElement = isValidElement;
  36682. exports.lazy = lazy;
  36683. exports.memo = memo;
  36684. exports.useCallback = useCallback;
  36685. exports.useContext = useContext;
  36686. exports.useDebugValue = useDebugValue;
  36687. exports.useEffect = useEffect;
  36688. exports.useImperativeHandle = useImperativeHandle;
  36689. exports.useLayoutEffect = useLayoutEffect;
  36690. exports.useMemo = useMemo;
  36691. exports.useReducer = useReducer;
  36692. exports.useRef = useRef;
  36693. exports.useState = useState;
  36694. exports.version = ReactVersion;
  36695. })();
  36696. }
  36697. /***/ }),
  36698. /***/ "./node_modules/react/index.js":
  36699. /*!*************************************!*\
  36700. !*** ./node_modules/react/index.js ***!
  36701. \*************************************/
  36702. /*! dynamic exports provided */
  36703. /*! all exports used */
  36704. /***/ (function(module, exports, __webpack_require__) {
  36705. "use strict";
  36706. if (false) {
  36707. module.exports = require('./cjs/react.production.min.js');
  36708. } else {
  36709. module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
  36710. }
  36711. /***/ }),
  36712. /***/ "./node_modules/redux-thunk/es/index.js":
  36713. /*!**********************************************!*\
  36714. !*** ./node_modules/redux-thunk/es/index.js ***!
  36715. \**********************************************/
  36716. /*! exports provided: default */
  36717. /*! exports used: default */
  36718. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36719. "use strict";
  36720. /** A function that accepts a potential "extra argument" value to be injected later,
  36721. * and returns an instance of the thunk middleware that uses that value
  36722. */
  36723. function createThunkMiddleware(extraArgument) {
  36724. // Standard Redux middleware definition pattern:
  36725. // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
  36726. var middleware = function middleware(_ref) {
  36727. var dispatch = _ref.dispatch,
  36728. getState = _ref.getState;
  36729. return function (next) {
  36730. return function (action) {
  36731. // The thunk middleware looks for any functions that were passed to `store.dispatch`.
  36732. // If this "action" is really a function, call it and return the result.
  36733. if (typeof action === 'function') {
  36734. // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
  36735. return action(dispatch, getState, extraArgument);
  36736. } // Otherwise, pass the action down the middleware chain as usual
  36737. return next(action);
  36738. };
  36739. };
  36740. };
  36741. return middleware;
  36742. }
  36743. var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
  36744. // with whatever "extra arg" they want to inject into their thunks
  36745. thunk.withExtraArgument = createThunkMiddleware;
  36746. /* harmony default export */ __webpack_exports__["a"] = (thunk);
  36747. /***/ }),
  36748. /***/ "./node_modules/redux/es/applyMiddleware.js":
  36749. /*!**************************************************!*\
  36750. !*** ./node_modules/redux/es/applyMiddleware.js ***!
  36751. \**************************************************/
  36752. /*! exports provided: default */
  36753. /*! exports used: default */
  36754. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36755. "use strict";
  36756. /* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware;
  36757. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(/*! ./compose */ "./node_modules/redux/es/compose.js");
  36758. 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; };
  36759. /**
  36760. * Creates a store enhancer that applies middleware to the dispatch method
  36761. * of the Redux store. This is handy for a variety of tasks, such as expressing
  36762. * asynchronous actions in a concise manner, or logging every action payload.
  36763. *
  36764. * See `redux-thunk` package as an example of the Redux middleware.
  36765. *
  36766. * Because middleware is potentially asynchronous, this should be the first
  36767. * store enhancer in the composition chain.
  36768. *
  36769. * Note that each middleware will be given the `dispatch` and `getState` functions
  36770. * as named arguments.
  36771. *
  36772. * @param {...Function} middlewares The middleware chain to be applied.
  36773. * @returns {Function} A store enhancer applying the middleware.
  36774. */
  36775. function applyMiddleware() {
  36776. for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
  36777. middlewares[_key] = arguments[_key];
  36778. }
  36779. return function (createStore) {
  36780. return function (reducer, preloadedState, enhancer) {
  36781. var store = createStore(reducer, preloadedState, enhancer);
  36782. var _dispatch = store.dispatch;
  36783. var chain = [];
  36784. var middlewareAPI = {
  36785. getState: store.getState,
  36786. dispatch: function dispatch(action) {
  36787. return _dispatch(action);
  36788. }
  36789. };
  36790. chain = middlewares.map(function (middleware) {
  36791. return middleware(middlewareAPI);
  36792. });
  36793. _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch);
  36794. return _extends({}, store, {
  36795. dispatch: _dispatch
  36796. });
  36797. };
  36798. };
  36799. }
  36800. /***/ }),
  36801. /***/ "./node_modules/redux/es/bindActionCreators.js":
  36802. /*!*****************************************************!*\
  36803. !*** ./node_modules/redux/es/bindActionCreators.js ***!
  36804. \*****************************************************/
  36805. /*! exports provided: default */
  36806. /*! exports used: default */
  36807. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36808. "use strict";
  36809. /* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators;
  36810. function bindActionCreator(actionCreator, dispatch) {
  36811. return function () {
  36812. return dispatch(actionCreator.apply(undefined, arguments));
  36813. };
  36814. }
  36815. /**
  36816. * Turns an object whose values are action creators, into an object with the
  36817. * same keys, but with every function wrapped into a `dispatch` call so they
  36818. * may be invoked directly. This is just a convenience method, as you can call
  36819. * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
  36820. *
  36821. * For convenience, you can also pass a single function as the first argument,
  36822. * and get a function in return.
  36823. *
  36824. * @param {Function|Object} actionCreators An object whose values are action
  36825. * creator functions. One handy way to obtain it is to use ES6 `import * as`
  36826. * syntax. You may also pass a single function.
  36827. *
  36828. * @param {Function} dispatch The `dispatch` function available on your Redux
  36829. * store.
  36830. *
  36831. * @returns {Function|Object} The object mimicking the original object, but with
  36832. * every action creator wrapped into the `dispatch` call. If you passed a
  36833. * function as `actionCreators`, the return value will also be a single
  36834. * function.
  36835. */
  36836. function bindActionCreators(actionCreators, dispatch) {
  36837. if (typeof actionCreators === 'function') {
  36838. return bindActionCreator(actionCreators, dispatch);
  36839. }
  36840. if (typeof actionCreators !== 'object' || actionCreators === null) {
  36841. throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
  36842. }
  36843. var keys = Object.keys(actionCreators);
  36844. var boundActionCreators = {};
  36845. for (var i = 0; i < keys.length; i++) {
  36846. var key = keys[i];
  36847. var actionCreator = actionCreators[key];
  36848. if (typeof actionCreator === 'function') {
  36849. boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
  36850. }
  36851. }
  36852. return boundActionCreators;
  36853. }
  36854. /***/ }),
  36855. /***/ "./node_modules/redux/es/combineReducers.js":
  36856. /*!**************************************************!*\
  36857. !*** ./node_modules/redux/es/combineReducers.js ***!
  36858. \**************************************************/
  36859. /*! exports provided: default */
  36860. /*! exports used: default */
  36861. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36862. "use strict";
  36863. /* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers;
  36864. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(/*! ./createStore */ "./node_modules/redux/es/createStore.js");
  36865. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(/*! lodash-es/isPlainObject */ "./node_modules/lodash-es/isPlainObject.js");
  36866. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(/*! ./utils/warning */ "./node_modules/redux/es/utils/warning.js");
  36867. function getUndefinedStateErrorMessage(key, action) {
  36868. var actionType = action && action.type;
  36869. var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
  36870. return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';
  36871. }
  36872. function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
  36873. var reducerKeys = Object.keys(reducers);
  36874. var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
  36875. if (reducerKeys.length === 0) {
  36876. return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
  36877. }
  36878. if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) {
  36879. return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
  36880. }
  36881. var unexpectedKeys = Object.keys(inputState).filter(function (key) {
  36882. return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
  36883. });
  36884. unexpectedKeys.forEach(function (key) {
  36885. unexpectedKeyCache[key] = true;
  36886. });
  36887. if (unexpectedKeys.length > 0) {
  36888. return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
  36889. }
  36890. }
  36891. function assertReducerShape(reducers) {
  36892. Object.keys(reducers).forEach(function (key) {
  36893. var reducer = reducers[key];
  36894. var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT });
  36895. if (typeof initialState === 'undefined') {
  36896. throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');
  36897. }
  36898. var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
  36899. if (typeof reducer(undefined, { type: type }) === 'undefined') {
  36900. throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');
  36901. }
  36902. });
  36903. }
  36904. /**
  36905. * Turns an object whose values are different reducer functions, into a single
  36906. * reducer function. It will call every child reducer, and gather their results
  36907. * into a single state object, whose keys correspond to the keys of the passed
  36908. * reducer functions.
  36909. *
  36910. * @param {Object} reducers An object whose values correspond to different
  36911. * reducer functions that need to be combined into one. One handy way to obtain
  36912. * it is to use ES6 `import * as reducers` syntax. The reducers may never return
  36913. * undefined for any action. Instead, they should return their initial state
  36914. * if the state passed to them was undefined, and the current state for any
  36915. * unrecognized action.
  36916. *
  36917. * @returns {Function} A reducer function that invokes every reducer inside the
  36918. * passed object, and builds a state object with the same shape.
  36919. */
  36920. function combineReducers(reducers) {
  36921. var reducerKeys = Object.keys(reducers);
  36922. var finalReducers = {};
  36923. for (var i = 0; i < reducerKeys.length; i++) {
  36924. var key = reducerKeys[i];
  36925. if (true) {
  36926. if (typeof reducers[key] === 'undefined') {
  36927. Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])('No reducer provided for key "' + key + '"');
  36928. }
  36929. }
  36930. if (typeof reducers[key] === 'function') {
  36931. finalReducers[key] = reducers[key];
  36932. }
  36933. }
  36934. var finalReducerKeys = Object.keys(finalReducers);
  36935. var unexpectedKeyCache = void 0;
  36936. if (true) {
  36937. unexpectedKeyCache = {};
  36938. }
  36939. var shapeAssertionError = void 0;
  36940. try {
  36941. assertReducerShape(finalReducers);
  36942. } catch (e) {
  36943. shapeAssertionError = e;
  36944. }
  36945. return function combination() {
  36946. var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  36947. var action = arguments[1];
  36948. if (shapeAssertionError) {
  36949. throw shapeAssertionError;
  36950. }
  36951. if (true) {
  36952. var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
  36953. if (warningMessage) {
  36954. Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])(warningMessage);
  36955. }
  36956. }
  36957. var hasChanged = false;
  36958. var nextState = {};
  36959. for (var _i = 0; _i < finalReducerKeys.length; _i++) {
  36960. var _key = finalReducerKeys[_i];
  36961. var reducer = finalReducers[_key];
  36962. var previousStateForKey = state[_key];
  36963. var nextStateForKey = reducer(previousStateForKey, action);
  36964. if (typeof nextStateForKey === 'undefined') {
  36965. var errorMessage = getUndefinedStateErrorMessage(_key, action);
  36966. throw new Error(errorMessage);
  36967. }
  36968. nextState[_key] = nextStateForKey;
  36969. hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
  36970. }
  36971. return hasChanged ? nextState : state;
  36972. };
  36973. }
  36974. /***/ }),
  36975. /***/ "./node_modules/redux/es/compose.js":
  36976. /*!******************************************!*\
  36977. !*** ./node_modules/redux/es/compose.js ***!
  36978. \******************************************/
  36979. /*! exports provided: default */
  36980. /*! exports used: default */
  36981. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36982. "use strict";
  36983. /* harmony export (immutable) */ __webpack_exports__["a"] = compose;
  36984. /**
  36985. * Composes single-argument functions from right to left. The rightmost
  36986. * function can take multiple arguments as it provides the signature for
  36987. * the resulting composite function.
  36988. *
  36989. * @param {...Function} funcs The functions to compose.
  36990. * @returns {Function} A function obtained by composing the argument functions
  36991. * from right to left. For example, compose(f, g, h) is identical to doing
  36992. * (...args) => f(g(h(...args))).
  36993. */
  36994. function compose() {
  36995. for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
  36996. funcs[_key] = arguments[_key];
  36997. }
  36998. if (funcs.length === 0) {
  36999. return function (arg) {
  37000. return arg;
  37001. };
  37002. }
  37003. if (funcs.length === 1) {
  37004. return funcs[0];
  37005. }
  37006. return funcs.reduce(function (a, b) {
  37007. return function () {
  37008. return a(b.apply(undefined, arguments));
  37009. };
  37010. });
  37011. }
  37012. /***/ }),
  37013. /***/ "./node_modules/redux/es/createStore.js":
  37014. /*!**********************************************!*\
  37015. !*** ./node_modules/redux/es/createStore.js ***!
  37016. \**********************************************/
  37017. /*! exports provided: ActionTypes, default */
  37018. /*! exports used: ActionTypes, default */
  37019. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37020. "use strict";
  37021. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; });
  37022. /* harmony export (immutable) */ __webpack_exports__["b"] = createStore;
  37023. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(/*! lodash-es/isPlainObject */ "./node_modules/lodash-es/isPlainObject.js");
  37024. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(/*! symbol-observable */ "./node_modules/symbol-observable/es/index.js");
  37025. /**
  37026. * These are private action types reserved by Redux.
  37027. * For any unknown actions, you must return the current state.
  37028. * If the current state is undefined, you must return the initial state.
  37029. * Do not reference these action types directly in your code.
  37030. */
  37031. var ActionTypes = {
  37032. INIT: '@@redux/INIT'
  37033. /**
  37034. * Creates a Redux store that holds the state tree.
  37035. * The only way to change the data in the store is to call `dispatch()` on it.
  37036. *
  37037. * There should only be a single store in your app. To specify how different
  37038. * parts of the state tree respond to actions, you may combine several reducers
  37039. * into a single reducer function by using `combineReducers`.
  37040. *
  37041. * @param {Function} reducer A function that returns the next state tree, given
  37042. * the current state tree and the action to handle.
  37043. *
  37044. * @param {any} [preloadedState] The initial state. You may optionally specify it
  37045. * to hydrate the state from the server in universal apps, or to restore a
  37046. * previously serialized user session.
  37047. * If you use `combineReducers` to produce the root reducer function, this must be
  37048. * an object with the same shape as `combineReducers` keys.
  37049. *
  37050. * @param {Function} [enhancer] The store enhancer. You may optionally specify it
  37051. * to enhance the store with third-party capabilities such as middleware,
  37052. * time travel, persistence, etc. The only store enhancer that ships with Redux
  37053. * is `applyMiddleware()`.
  37054. *
  37055. * @returns {Store} A Redux store that lets you read the state, dispatch actions
  37056. * and subscribe to changes.
  37057. */
  37058. };function createStore(reducer, preloadedState, enhancer) {
  37059. var _ref2;
  37060. if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
  37061. enhancer = preloadedState;
  37062. preloadedState = undefined;
  37063. }
  37064. if (typeof enhancer !== 'undefined') {
  37065. if (typeof enhancer !== 'function') {
  37066. throw new Error('Expected the enhancer to be a function.');
  37067. }
  37068. return enhancer(createStore)(reducer, preloadedState);
  37069. }
  37070. if (typeof reducer !== 'function') {
  37071. throw new Error('Expected the reducer to be a function.');
  37072. }
  37073. var currentReducer = reducer;
  37074. var currentState = preloadedState;
  37075. var currentListeners = [];
  37076. var nextListeners = currentListeners;
  37077. var isDispatching = false;
  37078. function ensureCanMutateNextListeners() {
  37079. if (nextListeners === currentListeners) {
  37080. nextListeners = currentListeners.slice();
  37081. }
  37082. }
  37083. /**
  37084. * Reads the state tree managed by the store.
  37085. *
  37086. * @returns {any} The current state tree of your application.
  37087. */
  37088. function getState() {
  37089. return currentState;
  37090. }
  37091. /**
  37092. * Adds a change listener. It will be called any time an action is dispatched,
  37093. * and some part of the state tree may potentially have changed. You may then
  37094. * call `getState()` to read the current state tree inside the callback.
  37095. *
  37096. * You may call `dispatch()` from a change listener, with the following
  37097. * caveats:
  37098. *
  37099. * 1. The subscriptions are snapshotted just before every `dispatch()` call.
  37100. * If you subscribe or unsubscribe while the listeners are being invoked, this
  37101. * will not have any effect on the `dispatch()` that is currently in progress.
  37102. * However, the next `dispatch()` call, whether nested or not, will use a more
  37103. * recent snapshot of the subscription list.
  37104. *
  37105. * 2. The listener should not expect to see all state changes, as the state
  37106. * might have been updated multiple times during a nested `dispatch()` before
  37107. * the listener is called. It is, however, guaranteed that all subscribers
  37108. * registered before the `dispatch()` started will be called with the latest
  37109. * state by the time it exits.
  37110. *
  37111. * @param {Function} listener A callback to be invoked on every dispatch.
  37112. * @returns {Function} A function to remove this change listener.
  37113. */
  37114. function subscribe(listener) {
  37115. if (typeof listener !== 'function') {
  37116. throw new Error('Expected listener to be a function.');
  37117. }
  37118. var isSubscribed = true;
  37119. ensureCanMutateNextListeners();
  37120. nextListeners.push(listener);
  37121. return function unsubscribe() {
  37122. if (!isSubscribed) {
  37123. return;
  37124. }
  37125. isSubscribed = false;
  37126. ensureCanMutateNextListeners();
  37127. var index = nextListeners.indexOf(listener);
  37128. nextListeners.splice(index, 1);
  37129. };
  37130. }
  37131. /**
  37132. * Dispatches an action. It is the only way to trigger a state change.
  37133. *
  37134. * The `reducer` function, used to create the store, will be called with the
  37135. * current state tree and the given `action`. Its return value will
  37136. * be considered the **next** state of the tree, and the change listeners
  37137. * will be notified.
  37138. *
  37139. * The base implementation only supports plain object actions. If you want to
  37140. * dispatch a Promise, an Observable, a thunk, or something else, you need to
  37141. * wrap your store creating function into the corresponding middleware. For
  37142. * example, see the documentation for the `redux-thunk` package. Even the
  37143. * middleware will eventually dispatch plain object actions using this method.
  37144. *
  37145. * @param {Object} action A plain object representing “what changed”. It is
  37146. * a good idea to keep actions serializable so you can record and replay user
  37147. * sessions, or use the time travelling `redux-devtools`. An action must have
  37148. * a `type` property which may not be `undefined`. It is a good idea to use
  37149. * string constants for action types.
  37150. *
  37151. * @returns {Object} For convenience, the same action object you dispatched.
  37152. *
  37153. * Note that, if you use a custom middleware, it may wrap `dispatch()` to
  37154. * return something else (for example, a Promise you can await).
  37155. */
  37156. function dispatch(action) {
  37157. if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) {
  37158. throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
  37159. }
  37160. if (typeof action.type === 'undefined') {
  37161. throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
  37162. }
  37163. if (isDispatching) {
  37164. throw new Error('Reducers may not dispatch actions.');
  37165. }
  37166. try {
  37167. isDispatching = true;
  37168. currentState = currentReducer(currentState, action);
  37169. } finally {
  37170. isDispatching = false;
  37171. }
  37172. var listeners = currentListeners = nextListeners;
  37173. for (var i = 0; i < listeners.length; i++) {
  37174. var listener = listeners[i];
  37175. listener();
  37176. }
  37177. return action;
  37178. }
  37179. /**
  37180. * Replaces the reducer currently used by the store to calculate the state.
  37181. *
  37182. * You might need this if your app implements code splitting and you want to
  37183. * load some of the reducers dynamically. You might also need this if you
  37184. * implement a hot reloading mechanism for Redux.
  37185. *
  37186. * @param {Function} nextReducer The reducer for the store to use instead.
  37187. * @returns {void}
  37188. */
  37189. function replaceReducer(nextReducer) {
  37190. if (typeof nextReducer !== 'function') {
  37191. throw new Error('Expected the nextReducer to be a function.');
  37192. }
  37193. currentReducer = nextReducer;
  37194. dispatch({ type: ActionTypes.INIT });
  37195. }
  37196. /**
  37197. * Interoperability point for observable/reactive libraries.
  37198. * @returns {observable} A minimal observable of state changes.
  37199. * For more information, see the observable proposal:
  37200. * https://github.com/tc39/proposal-observable
  37201. */
  37202. function observable() {
  37203. var _ref;
  37204. var outerSubscribe = subscribe;
  37205. return _ref = {
  37206. /**
  37207. * The minimal observable subscription method.
  37208. * @param {Object} observer Any object that can be used as an observer.
  37209. * The observer object should have a `next` method.
  37210. * @returns {subscription} An object with an `unsubscribe` method that can
  37211. * be used to unsubscribe the observable from the store, and prevent further
  37212. * emission of values from the observable.
  37213. */
  37214. subscribe: function subscribe(observer) {
  37215. if (typeof observer !== 'object') {
  37216. throw new TypeError('Expected the observer to be an object.');
  37217. }
  37218. function observeState() {
  37219. if (observer.next) {
  37220. observer.next(getState());
  37221. }
  37222. }
  37223. observeState();
  37224. var unsubscribe = outerSubscribe(observeState);
  37225. return { unsubscribe: unsubscribe };
  37226. }
  37227. }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__["a" /* default */]] = function () {
  37228. return this;
  37229. }, _ref;
  37230. }
  37231. // When a store is created, an "INIT" action is dispatched so that every
  37232. // reducer returns their initial state. This effectively populates
  37233. // the initial state tree.
  37234. dispatch({ type: ActionTypes.INIT });
  37235. return _ref2 = {
  37236. dispatch: dispatch,
  37237. subscribe: subscribe,
  37238. getState: getState,
  37239. replaceReducer: replaceReducer
  37240. }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__["a" /* default */]] = observable, _ref2;
  37241. }
  37242. /***/ }),
  37243. /***/ "./node_modules/redux/es/index.js":
  37244. /*!****************************************!*\
  37245. !*** ./node_modules/redux/es/index.js ***!
  37246. \****************************************/
  37247. /*! exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose */
  37248. /*! exports used: applyMiddleware, bindActionCreators, combineReducers, createStore */
  37249. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37250. "use strict";
  37251. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(/*! ./createStore */ "./node_modules/redux/es/createStore.js");
  37252. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(/*! ./combineReducers */ "./node_modules/redux/es/combineReducers.js");
  37253. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(/*! ./bindActionCreators */ "./node_modules/redux/es/bindActionCreators.js");
  37254. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(/*! ./applyMiddleware */ "./node_modules/redux/es/applyMiddleware.js");
  37255. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(/*! ./compose */ "./node_modules/redux/es/compose.js");
  37256. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(/*! ./utils/warning */ "./node_modules/redux/es/utils/warning.js");
  37257. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; });
  37258. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; });
  37259. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; });
  37260. /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; });
  37261. /* unused harmony reexport compose */
  37262. /*
  37263. * This is a dummy function to check if the function name has been altered by minification.
  37264. * If the function has been minified and NODE_ENV !== 'production', warn the user.
  37265. */
  37266. function isCrushed() {}
  37267. if ("development" !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
  37268. Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
  37269. }
  37270. /***/ }),
  37271. /***/ "./node_modules/redux/es/utils/warning.js":
  37272. /*!************************************************!*\
  37273. !*** ./node_modules/redux/es/utils/warning.js ***!
  37274. \************************************************/
  37275. /*! exports provided: default */
  37276. /*! exports used: default */
  37277. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37278. "use strict";
  37279. /* harmony export (immutable) */ __webpack_exports__["a"] = warning;
  37280. /**
  37281. * Prints a warning in the console if it exists.
  37282. *
  37283. * @param {String} message The warning message.
  37284. * @returns {void}
  37285. */
  37286. function warning(message) {
  37287. /* eslint-disable no-console */
  37288. if (typeof console !== 'undefined' && typeof console.error === 'function') {
  37289. console.error(message);
  37290. }
  37291. /* eslint-enable no-console */
  37292. try {
  37293. // This error was thrown as a convenience so that if you enable
  37294. // "break on all exceptions" in your console,
  37295. // it would pause the execution at this line.
  37296. throw new Error(message);
  37297. /* eslint-disable no-empty */
  37298. } catch (e) {}
  37299. /* eslint-enable no-empty */
  37300. }
  37301. /***/ }),
  37302. /***/ "./node_modules/requires-port/index.js":
  37303. /*!*********************************************!*\
  37304. !*** ./node_modules/requires-port/index.js ***!
  37305. \*********************************************/
  37306. /*! dynamic exports provided */
  37307. /*! all exports used */
  37308. /***/ (function(module, exports, __webpack_require__) {
  37309. "use strict";
  37310. /**
  37311. * Check if we're required to add a port number.
  37312. *
  37313. * @see https://url.spec.whatwg.org/#default-port
  37314. * @param {Number|String} port Port number we need to check
  37315. * @param {String} protocol Protocol we need to check against.
  37316. * @returns {Boolean} Is it a default port for the given protocol
  37317. * @api private
  37318. */
  37319. module.exports = function required(port, protocol) {
  37320. protocol = protocol.split(':')[0];
  37321. port = +port;
  37322. if (!port) return false;
  37323. switch (protocol) {
  37324. case 'http':
  37325. case 'ws':
  37326. return port !== 80;
  37327. case 'https':
  37328. case 'wss':
  37329. return port !== 443;
  37330. case 'ftp':
  37331. return port !== 21;
  37332. case 'gopher':
  37333. return port !== 70;
  37334. case 'file':
  37335. return false;
  37336. }
  37337. return port !== 0;
  37338. };
  37339. /***/ }),
  37340. /***/ "./node_modules/resolve-pathname/esm/resolve-pathname.js":
  37341. /*!***************************************************************!*\
  37342. !*** ./node_modules/resolve-pathname/esm/resolve-pathname.js ***!
  37343. \***************************************************************/
  37344. /*! exports provided: default */
  37345. /*! exports used: default */
  37346. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37347. "use strict";
  37348. function isAbsolute(pathname) {
  37349. return pathname.charAt(0) === '/';
  37350. }
  37351. // About 1.5x faster than the two-arg version of Array#splice()
  37352. function spliceOne(list, index) {
  37353. for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
  37354. list[i] = list[k];
  37355. }
  37356. list.pop();
  37357. }
  37358. // This implementation is based heavily on node's url.parse
  37359. function resolvePathname(to, from) {
  37360. if (from === undefined) from = '';
  37361. var toParts = (to && to.split('/')) || [];
  37362. var fromParts = (from && from.split('/')) || [];
  37363. var isToAbs = to && isAbsolute(to);
  37364. var isFromAbs = from && isAbsolute(from);
  37365. var mustEndAbs = isToAbs || isFromAbs;
  37366. if (to && isAbsolute(to)) {
  37367. // to is absolute
  37368. fromParts = toParts;
  37369. } else if (toParts.length) {
  37370. // to is relative, drop the filename
  37371. fromParts.pop();
  37372. fromParts = fromParts.concat(toParts);
  37373. }
  37374. if (!fromParts.length) return '/';
  37375. var hasTrailingSlash;
  37376. if (fromParts.length) {
  37377. var last = fromParts[fromParts.length - 1];
  37378. hasTrailingSlash = last === '.' || last === '..' || last === '';
  37379. } else {
  37380. hasTrailingSlash = false;
  37381. }
  37382. var up = 0;
  37383. for (var i = fromParts.length; i >= 0; i--) {
  37384. var part = fromParts[i];
  37385. if (part === '.') {
  37386. spliceOne(fromParts, i);
  37387. } else if (part === '..') {
  37388. spliceOne(fromParts, i);
  37389. up++;
  37390. } else if (up) {
  37391. spliceOne(fromParts, i);
  37392. up--;
  37393. }
  37394. }
  37395. if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');
  37396. if (
  37397. mustEndAbs &&
  37398. fromParts[0] !== '' &&
  37399. (!fromParts[0] || !isAbsolute(fromParts[0]))
  37400. )
  37401. fromParts.unshift('');
  37402. var result = fromParts.join('/');
  37403. if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
  37404. return result;
  37405. }
  37406. /* harmony default export */ __webpack_exports__["a"] = (resolvePathname);
  37407. /***/ }),
  37408. /***/ "./node_modules/scheduler/cjs/scheduler-tracing.development.js":
  37409. /*!*********************************************************************!*\
  37410. !*** ./node_modules/scheduler/cjs/scheduler-tracing.development.js ***!
  37411. \*********************************************************************/
  37412. /*! dynamic exports provided */
  37413. /*! all exports used */
  37414. /***/ (function(module, exports, __webpack_require__) {
  37415. "use strict";
  37416. /** @license React v0.19.1
  37417. * scheduler-tracing.development.js
  37418. *
  37419. * Copyright (c) Facebook, Inc. and its affiliates.
  37420. *
  37421. * This source code is licensed under the MIT license found in the
  37422. * LICENSE file in the root directory of this source tree.
  37423. */
  37424. if (true) {
  37425. (function() {
  37426. 'use strict';
  37427. var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
  37428. var interactionIDCounter = 0;
  37429. var threadIDCounter = 0; // Set of currently traced interactions.
  37430. // Interactions "stack"–
  37431. // Meaning that newly traced interactions are appended to the previously active set.
  37432. // When an interaction goes out of scope, the previous set (if any) is restored.
  37433. exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.
  37434. exports.__subscriberRef = null;
  37435. {
  37436. exports.__interactionsRef = {
  37437. current: new Set()
  37438. };
  37439. exports.__subscriberRef = {
  37440. current: null
  37441. };
  37442. }
  37443. function unstable_clear(callback) {
  37444. var prevInteractions = exports.__interactionsRef.current;
  37445. exports.__interactionsRef.current = new Set();
  37446. try {
  37447. return callback();
  37448. } finally {
  37449. exports.__interactionsRef.current = prevInteractions;
  37450. }
  37451. }
  37452. function unstable_getCurrent() {
  37453. {
  37454. return exports.__interactionsRef.current;
  37455. }
  37456. }
  37457. function unstable_getThreadID() {
  37458. return ++threadIDCounter;
  37459. }
  37460. function unstable_trace(name, timestamp, callback) {
  37461. var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
  37462. var interaction = {
  37463. __count: 1,
  37464. id: interactionIDCounter++,
  37465. name: name,
  37466. timestamp: timestamp
  37467. };
  37468. var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
  37469. // To do that, clone the current interactions.
  37470. // The previous set will be restored upon completion.
  37471. var interactions = new Set(prevInteractions);
  37472. interactions.add(interaction);
  37473. exports.__interactionsRef.current = interactions;
  37474. var subscriber = exports.__subscriberRef.current;
  37475. var returnValue;
  37476. try {
  37477. if (subscriber !== null) {
  37478. subscriber.onInteractionTraced(interaction);
  37479. }
  37480. } finally {
  37481. try {
  37482. if (subscriber !== null) {
  37483. subscriber.onWorkStarted(interactions, threadID);
  37484. }
  37485. } finally {
  37486. try {
  37487. returnValue = callback();
  37488. } finally {
  37489. exports.__interactionsRef.current = prevInteractions;
  37490. try {
  37491. if (subscriber !== null) {
  37492. subscriber.onWorkStopped(interactions, threadID);
  37493. }
  37494. } finally {
  37495. interaction.__count--; // If no async work was scheduled for this interaction,
  37496. // Notify subscribers that it's completed.
  37497. if (subscriber !== null && interaction.__count === 0) {
  37498. subscriber.onInteractionScheduledWorkCompleted(interaction);
  37499. }
  37500. }
  37501. }
  37502. }
  37503. }
  37504. return returnValue;
  37505. }
  37506. function unstable_wrap(callback) {
  37507. var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
  37508. var wrappedInteractions = exports.__interactionsRef.current;
  37509. var subscriber = exports.__subscriberRef.current;
  37510. if (subscriber !== null) {
  37511. subscriber.onWorkScheduled(wrappedInteractions, threadID);
  37512. } // Update the pending async work count for the current interactions.
  37513. // Update after calling subscribers in case of error.
  37514. wrappedInteractions.forEach(function (interaction) {
  37515. interaction.__count++;
  37516. });
  37517. var hasRun = false;
  37518. function wrapped() {
  37519. var prevInteractions = exports.__interactionsRef.current;
  37520. exports.__interactionsRef.current = wrappedInteractions;
  37521. subscriber = exports.__subscriberRef.current;
  37522. try {
  37523. var returnValue;
  37524. try {
  37525. if (subscriber !== null) {
  37526. subscriber.onWorkStarted(wrappedInteractions, threadID);
  37527. }
  37528. } finally {
  37529. try {
  37530. returnValue = callback.apply(undefined, arguments);
  37531. } finally {
  37532. exports.__interactionsRef.current = prevInteractions;
  37533. if (subscriber !== null) {
  37534. subscriber.onWorkStopped(wrappedInteractions, threadID);
  37535. }
  37536. }
  37537. }
  37538. return returnValue;
  37539. } finally {
  37540. if (!hasRun) {
  37541. // We only expect a wrapped function to be executed once,
  37542. // But in the event that it's executed more than once–
  37543. // Only decrement the outstanding interaction counts once.
  37544. hasRun = true; // Update pending async counts for all wrapped interactions.
  37545. // If this was the last scheduled async work for any of them,
  37546. // Mark them as completed.
  37547. wrappedInteractions.forEach(function (interaction) {
  37548. interaction.__count--;
  37549. if (subscriber !== null && interaction.__count === 0) {
  37550. subscriber.onInteractionScheduledWorkCompleted(interaction);
  37551. }
  37552. });
  37553. }
  37554. }
  37555. }
  37556. wrapped.cancel = function cancel() {
  37557. subscriber = exports.__subscriberRef.current;
  37558. try {
  37559. if (subscriber !== null) {
  37560. subscriber.onWorkCanceled(wrappedInteractions, threadID);
  37561. }
  37562. } finally {
  37563. // Update pending async counts for all wrapped interactions.
  37564. // If this was the last scheduled async work for any of them,
  37565. // Mark them as completed.
  37566. wrappedInteractions.forEach(function (interaction) {
  37567. interaction.__count--;
  37568. if (subscriber && interaction.__count === 0) {
  37569. subscriber.onInteractionScheduledWorkCompleted(interaction);
  37570. }
  37571. });
  37572. }
  37573. };
  37574. return wrapped;
  37575. }
  37576. var subscribers = null;
  37577. {
  37578. subscribers = new Set();
  37579. }
  37580. function unstable_subscribe(subscriber) {
  37581. {
  37582. subscribers.add(subscriber);
  37583. if (subscribers.size === 1) {
  37584. exports.__subscriberRef.current = {
  37585. onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
  37586. onInteractionTraced: onInteractionTraced,
  37587. onWorkCanceled: onWorkCanceled,
  37588. onWorkScheduled: onWorkScheduled,
  37589. onWorkStarted: onWorkStarted,
  37590. onWorkStopped: onWorkStopped
  37591. };
  37592. }
  37593. }
  37594. }
  37595. function unstable_unsubscribe(subscriber) {
  37596. {
  37597. subscribers.delete(subscriber);
  37598. if (subscribers.size === 0) {
  37599. exports.__subscriberRef.current = null;
  37600. }
  37601. }
  37602. }
  37603. function onInteractionTraced(interaction) {
  37604. var didCatchError = false;
  37605. var caughtError = null;
  37606. subscribers.forEach(function (subscriber) {
  37607. try {
  37608. subscriber.onInteractionTraced(interaction);
  37609. } catch (error) {
  37610. if (!didCatchError) {
  37611. didCatchError = true;
  37612. caughtError = error;
  37613. }
  37614. }
  37615. });
  37616. if (didCatchError) {
  37617. throw caughtError;
  37618. }
  37619. }
  37620. function onInteractionScheduledWorkCompleted(interaction) {
  37621. var didCatchError = false;
  37622. var caughtError = null;
  37623. subscribers.forEach(function (subscriber) {
  37624. try {
  37625. subscriber.onInteractionScheduledWorkCompleted(interaction);
  37626. } catch (error) {
  37627. if (!didCatchError) {
  37628. didCatchError = true;
  37629. caughtError = error;
  37630. }
  37631. }
  37632. });
  37633. if (didCatchError) {
  37634. throw caughtError;
  37635. }
  37636. }
  37637. function onWorkScheduled(interactions, threadID) {
  37638. var didCatchError = false;
  37639. var caughtError = null;
  37640. subscribers.forEach(function (subscriber) {
  37641. try {
  37642. subscriber.onWorkScheduled(interactions, threadID);
  37643. } catch (error) {
  37644. if (!didCatchError) {
  37645. didCatchError = true;
  37646. caughtError = error;
  37647. }
  37648. }
  37649. });
  37650. if (didCatchError) {
  37651. throw caughtError;
  37652. }
  37653. }
  37654. function onWorkStarted(interactions, threadID) {
  37655. var didCatchError = false;
  37656. var caughtError = null;
  37657. subscribers.forEach(function (subscriber) {
  37658. try {
  37659. subscriber.onWorkStarted(interactions, threadID);
  37660. } catch (error) {
  37661. if (!didCatchError) {
  37662. didCatchError = true;
  37663. caughtError = error;
  37664. }
  37665. }
  37666. });
  37667. if (didCatchError) {
  37668. throw caughtError;
  37669. }
  37670. }
  37671. function onWorkStopped(interactions, threadID) {
  37672. var didCatchError = false;
  37673. var caughtError = null;
  37674. subscribers.forEach(function (subscriber) {
  37675. try {
  37676. subscriber.onWorkStopped(interactions, threadID);
  37677. } catch (error) {
  37678. if (!didCatchError) {
  37679. didCatchError = true;
  37680. caughtError = error;
  37681. }
  37682. }
  37683. });
  37684. if (didCatchError) {
  37685. throw caughtError;
  37686. }
  37687. }
  37688. function onWorkCanceled(interactions, threadID) {
  37689. var didCatchError = false;
  37690. var caughtError = null;
  37691. subscribers.forEach(function (subscriber) {
  37692. try {
  37693. subscriber.onWorkCanceled(interactions, threadID);
  37694. } catch (error) {
  37695. if (!didCatchError) {
  37696. didCatchError = true;
  37697. caughtError = error;
  37698. }
  37699. }
  37700. });
  37701. if (didCatchError) {
  37702. throw caughtError;
  37703. }
  37704. }
  37705. exports.unstable_clear = unstable_clear;
  37706. exports.unstable_getCurrent = unstable_getCurrent;
  37707. exports.unstable_getThreadID = unstable_getThreadID;
  37708. exports.unstable_subscribe = unstable_subscribe;
  37709. exports.unstable_trace = unstable_trace;
  37710. exports.unstable_unsubscribe = unstable_unsubscribe;
  37711. exports.unstable_wrap = unstable_wrap;
  37712. })();
  37713. }
  37714. /***/ }),
  37715. /***/ "./node_modules/scheduler/cjs/scheduler.development.js":
  37716. /*!*************************************************************!*\
  37717. !*** ./node_modules/scheduler/cjs/scheduler.development.js ***!
  37718. \*************************************************************/
  37719. /*! dynamic exports provided */
  37720. /*! all exports used */
  37721. /***/ (function(module, exports, __webpack_require__) {
  37722. "use strict";
  37723. /** @license React v0.19.1
  37724. * scheduler.development.js
  37725. *
  37726. * Copyright (c) Facebook, Inc. and its affiliates.
  37727. *
  37728. * This source code is licensed under the MIT license found in the
  37729. * LICENSE file in the root directory of this source tree.
  37730. */
  37731. if (true) {
  37732. (function() {
  37733. 'use strict';
  37734. var enableSchedulerDebugging = false;
  37735. var enableProfiling = true;
  37736. var requestHostCallback;
  37737. var requestHostTimeout;
  37738. var cancelHostTimeout;
  37739. var shouldYieldToHost;
  37740. var requestPaint;
  37741. if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive
  37742. // implementation using setTimeout.
  37743. typeof window === 'undefined' || // Check if MessageChannel is supported, too.
  37744. typeof MessageChannel !== 'function') {
  37745. // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
  37746. // fallback to a naive implementation.
  37747. var _callback = null;
  37748. var _timeoutID = null;
  37749. var _flushCallback = function () {
  37750. if (_callback !== null) {
  37751. try {
  37752. var currentTime = exports.unstable_now();
  37753. var hasRemainingTime = true;
  37754. _callback(hasRemainingTime, currentTime);
  37755. _callback = null;
  37756. } catch (e) {
  37757. setTimeout(_flushCallback, 0);
  37758. throw e;
  37759. }
  37760. }
  37761. };
  37762. var initialTime = Date.now();
  37763. exports.unstable_now = function () {
  37764. return Date.now() - initialTime;
  37765. };
  37766. requestHostCallback = function (cb) {
  37767. if (_callback !== null) {
  37768. // Protect against re-entrancy.
  37769. setTimeout(requestHostCallback, 0, cb);
  37770. } else {
  37771. _callback = cb;
  37772. setTimeout(_flushCallback, 0);
  37773. }
  37774. };
  37775. requestHostTimeout = function (cb, ms) {
  37776. _timeoutID = setTimeout(cb, ms);
  37777. };
  37778. cancelHostTimeout = function () {
  37779. clearTimeout(_timeoutID);
  37780. };
  37781. shouldYieldToHost = function () {
  37782. return false;
  37783. };
  37784. requestPaint = exports.unstable_forceFrameRate = function () {};
  37785. } else {
  37786. // Capture local references to native APIs, in case a polyfill overrides them.
  37787. var performance = window.performance;
  37788. var _Date = window.Date;
  37789. var _setTimeout = window.setTimeout;
  37790. var _clearTimeout = window.clearTimeout;
  37791. if (typeof console !== 'undefined') {
  37792. // TODO: Scheduler no longer requires these methods to be polyfilled. But
  37793. // maybe we want to continue warning if they don't exist, to preserve the
  37794. // option to rely on it in the future?
  37795. var requestAnimationFrame = window.requestAnimationFrame;
  37796. var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link
  37797. if (typeof requestAnimationFrame !== 'function') {
  37798. // Using console['error'] to evade Babel and ESLint
  37799. console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
  37800. }
  37801. if (typeof cancelAnimationFrame !== 'function') {
  37802. // Using console['error'] to evade Babel and ESLint
  37803. console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
  37804. }
  37805. }
  37806. if (typeof performance === 'object' && typeof performance.now === 'function') {
  37807. exports.unstable_now = function () {
  37808. return performance.now();
  37809. };
  37810. } else {
  37811. var _initialTime = _Date.now();
  37812. exports.unstable_now = function () {
  37813. return _Date.now() - _initialTime;
  37814. };
  37815. }
  37816. var isMessageLoopRunning = false;
  37817. var scheduledHostCallback = null;
  37818. var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
  37819. // thread, like user events. By default, it yields multiple times per frame.
  37820. // It does not attempt to align with frame boundaries, since most tasks don't
  37821. // need to be frame aligned; for those that do, use requestAnimationFrame.
  37822. var yieldInterval = 5;
  37823. var deadline = 0; // TODO: Make this configurable
  37824. {
  37825. // `isInputPending` is not available. Since we have no way of knowing if
  37826. // there's pending input, always yield at the end of the frame.
  37827. shouldYieldToHost = function () {
  37828. return exports.unstable_now() >= deadline;
  37829. }; // Since we yield every frame regardless, `requestPaint` has no effect.
  37830. requestPaint = function () {};
  37831. }
  37832. exports.unstable_forceFrameRate = function (fps) {
  37833. if (fps < 0 || fps > 125) {
  37834. // Using console['error'] to evade Babel and ESLint
  37835. console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');
  37836. return;
  37837. }
  37838. if (fps > 0) {
  37839. yieldInterval = Math.floor(1000 / fps);
  37840. } else {
  37841. // reset the framerate
  37842. yieldInterval = 5;
  37843. }
  37844. };
  37845. var performWorkUntilDeadline = function () {
  37846. if (scheduledHostCallback !== null) {
  37847. var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
  37848. // cycle. This means there's always time remaining at the beginning of
  37849. // the message event.
  37850. deadline = currentTime + yieldInterval;
  37851. var hasTimeRemaining = true;
  37852. try {
  37853. var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
  37854. if (!hasMoreWork) {
  37855. isMessageLoopRunning = false;
  37856. scheduledHostCallback = null;
  37857. } else {
  37858. // If there's more work, schedule the next message event at the end
  37859. // of the preceding one.
  37860. port.postMessage(null);
  37861. }
  37862. } catch (error) {
  37863. // If a scheduler task throws, exit the current browser task so the
  37864. // error can be observed.
  37865. port.postMessage(null);
  37866. throw error;
  37867. }
  37868. } else {
  37869. isMessageLoopRunning = false;
  37870. } // Yielding to the browser will give it a chance to paint, so we can
  37871. };
  37872. var channel = new MessageChannel();
  37873. var port = channel.port2;
  37874. channel.port1.onmessage = performWorkUntilDeadline;
  37875. requestHostCallback = function (callback) {
  37876. scheduledHostCallback = callback;
  37877. if (!isMessageLoopRunning) {
  37878. isMessageLoopRunning = true;
  37879. port.postMessage(null);
  37880. }
  37881. };
  37882. requestHostTimeout = function (callback, ms) {
  37883. taskTimeoutID = _setTimeout(function () {
  37884. callback(exports.unstable_now());
  37885. }, ms);
  37886. };
  37887. cancelHostTimeout = function () {
  37888. _clearTimeout(taskTimeoutID);
  37889. taskTimeoutID = -1;
  37890. };
  37891. }
  37892. function push(heap, node) {
  37893. var index = heap.length;
  37894. heap.push(node);
  37895. siftUp(heap, node, index);
  37896. }
  37897. function peek(heap) {
  37898. var first = heap[0];
  37899. return first === undefined ? null : first;
  37900. }
  37901. function pop(heap) {
  37902. var first = heap[0];
  37903. if (first !== undefined) {
  37904. var last = heap.pop();
  37905. if (last !== first) {
  37906. heap[0] = last;
  37907. siftDown(heap, last, 0);
  37908. }
  37909. return first;
  37910. } else {
  37911. return null;
  37912. }
  37913. }
  37914. function siftUp(heap, node, i) {
  37915. var index = i;
  37916. while (true) {
  37917. var parentIndex = index - 1 >>> 1;
  37918. var parent = heap[parentIndex];
  37919. if (parent !== undefined && compare(parent, node) > 0) {
  37920. // The parent is larger. Swap positions.
  37921. heap[parentIndex] = node;
  37922. heap[index] = parent;
  37923. index = parentIndex;
  37924. } else {
  37925. // The parent is smaller. Exit.
  37926. return;
  37927. }
  37928. }
  37929. }
  37930. function siftDown(heap, node, i) {
  37931. var index = i;
  37932. var length = heap.length;
  37933. while (index < length) {
  37934. var leftIndex = (index + 1) * 2 - 1;
  37935. var left = heap[leftIndex];
  37936. var rightIndex = leftIndex + 1;
  37937. var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
  37938. if (left !== undefined && compare(left, node) < 0) {
  37939. if (right !== undefined && compare(right, left) < 0) {
  37940. heap[index] = right;
  37941. heap[rightIndex] = node;
  37942. index = rightIndex;
  37943. } else {
  37944. heap[index] = left;
  37945. heap[leftIndex] = node;
  37946. index = leftIndex;
  37947. }
  37948. } else if (right !== undefined && compare(right, node) < 0) {
  37949. heap[index] = right;
  37950. heap[rightIndex] = node;
  37951. index = rightIndex;
  37952. } else {
  37953. // Neither child is smaller. Exit.
  37954. return;
  37955. }
  37956. }
  37957. }
  37958. function compare(a, b) {
  37959. // Compare sort index first, then task id.
  37960. var diff = a.sortIndex - b.sortIndex;
  37961. return diff !== 0 ? diff : a.id - b.id;
  37962. }
  37963. // TODO: Use symbols?
  37964. var NoPriority = 0;
  37965. var ImmediatePriority = 1;
  37966. var UserBlockingPriority = 2;
  37967. var NormalPriority = 3;
  37968. var LowPriority = 4;
  37969. var IdlePriority = 5;
  37970. var runIdCounter = 0;
  37971. var mainThreadIdCounter = 0;
  37972. var profilingStateSize = 4;
  37973. var sharedProfilingBuffer = // $FlowFixMe Flow doesn't know about SharedArrayBuffer
  37974. typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : // $FlowFixMe Flow doesn't know about ArrayBuffer
  37975. typeof ArrayBuffer === 'function' ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : null // Don't crash the init path on IE9
  37976. ;
  37977. var profilingState = sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks
  37978. var PRIORITY = 0;
  37979. var CURRENT_TASK_ID = 1;
  37980. var CURRENT_RUN_ID = 2;
  37981. var QUEUE_SIZE = 3;
  37982. {
  37983. profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue
  37984. // array might include canceled tasks.
  37985. profilingState[QUEUE_SIZE] = 0;
  37986. profilingState[CURRENT_TASK_ID] = 0;
  37987. } // Bytes per element is 4
  37988. var INITIAL_EVENT_LOG_SIZE = 131072;
  37989. var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes
  37990. var eventLogSize = 0;
  37991. var eventLogBuffer = null;
  37992. var eventLog = null;
  37993. var eventLogIndex = 0;
  37994. var TaskStartEvent = 1;
  37995. var TaskCompleteEvent = 2;
  37996. var TaskErrorEvent = 3;
  37997. var TaskCancelEvent = 4;
  37998. var TaskRunEvent = 5;
  37999. var TaskYieldEvent = 6;
  38000. var SchedulerSuspendEvent = 7;
  38001. var SchedulerResumeEvent = 8;
  38002. function logEvent(entries) {
  38003. if (eventLog !== null) {
  38004. var offset = eventLogIndex;
  38005. eventLogIndex += entries.length;
  38006. if (eventLogIndex + 1 > eventLogSize) {
  38007. eventLogSize *= 2;
  38008. if (eventLogSize > MAX_EVENT_LOG_SIZE) {
  38009. // Using console['error'] to evade Babel and ESLint
  38010. console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
  38011. stopLoggingProfilingEvents();
  38012. return;
  38013. }
  38014. var newEventLog = new Int32Array(eventLogSize * 4);
  38015. newEventLog.set(eventLog);
  38016. eventLogBuffer = newEventLog.buffer;
  38017. eventLog = newEventLog;
  38018. }
  38019. eventLog.set(entries, offset);
  38020. }
  38021. }
  38022. function startLoggingProfilingEvents() {
  38023. eventLogSize = INITIAL_EVENT_LOG_SIZE;
  38024. eventLogBuffer = new ArrayBuffer(eventLogSize * 4);
  38025. eventLog = new Int32Array(eventLogBuffer);
  38026. eventLogIndex = 0;
  38027. }
  38028. function stopLoggingProfilingEvents() {
  38029. var buffer = eventLogBuffer;
  38030. eventLogSize = 0;
  38031. eventLogBuffer = null;
  38032. eventLog = null;
  38033. eventLogIndex = 0;
  38034. return buffer;
  38035. }
  38036. function markTaskStart(task, ms) {
  38037. {
  38038. profilingState[QUEUE_SIZE]++;
  38039. if (eventLog !== null) {
  38040. // performance.now returns a float, representing milliseconds. When the
  38041. // event is logged, it's coerced to an int. Convert to microseconds to
  38042. // maintain extra degrees of precision.
  38043. logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);
  38044. }
  38045. }
  38046. }
  38047. function markTaskCompleted(task, ms) {
  38048. {
  38049. profilingState[PRIORITY] = NoPriority;
  38050. profilingState[CURRENT_TASK_ID] = 0;
  38051. profilingState[QUEUE_SIZE]--;
  38052. if (eventLog !== null) {
  38053. logEvent([TaskCompleteEvent, ms * 1000, task.id]);
  38054. }
  38055. }
  38056. }
  38057. function markTaskCanceled(task, ms) {
  38058. {
  38059. profilingState[QUEUE_SIZE]--;
  38060. if (eventLog !== null) {
  38061. logEvent([TaskCancelEvent, ms * 1000, task.id]);
  38062. }
  38063. }
  38064. }
  38065. function markTaskErrored(task, ms) {
  38066. {
  38067. profilingState[PRIORITY] = NoPriority;
  38068. profilingState[CURRENT_TASK_ID] = 0;
  38069. profilingState[QUEUE_SIZE]--;
  38070. if (eventLog !== null) {
  38071. logEvent([TaskErrorEvent, ms * 1000, task.id]);
  38072. }
  38073. }
  38074. }
  38075. function markTaskRun(task, ms) {
  38076. {
  38077. runIdCounter++;
  38078. profilingState[PRIORITY] = task.priorityLevel;
  38079. profilingState[CURRENT_TASK_ID] = task.id;
  38080. profilingState[CURRENT_RUN_ID] = runIdCounter;
  38081. if (eventLog !== null) {
  38082. logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);
  38083. }
  38084. }
  38085. }
  38086. function markTaskYield(task, ms) {
  38087. {
  38088. profilingState[PRIORITY] = NoPriority;
  38089. profilingState[CURRENT_TASK_ID] = 0;
  38090. profilingState[CURRENT_RUN_ID] = 0;
  38091. if (eventLog !== null) {
  38092. logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);
  38093. }
  38094. }
  38095. }
  38096. function markSchedulerSuspended(ms) {
  38097. {
  38098. mainThreadIdCounter++;
  38099. if (eventLog !== null) {
  38100. logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);
  38101. }
  38102. }
  38103. }
  38104. function markSchedulerUnsuspended(ms) {
  38105. {
  38106. if (eventLog !== null) {
  38107. logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);
  38108. }
  38109. }
  38110. }
  38111. /* eslint-disable no-var */
  38112. // Math.pow(2, 30) - 1
  38113. // 0b111111111111111111111111111111
  38114. var maxSigned31BitInt = 1073741823; // Times out immediately
  38115. var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
  38116. var USER_BLOCKING_PRIORITY = 250;
  38117. var NORMAL_PRIORITY_TIMEOUT = 5000;
  38118. var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
  38119. var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap
  38120. var taskQueue = [];
  38121. var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
  38122. var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
  38123. var currentTask = null;
  38124. var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.
  38125. var isPerformingWork = false;
  38126. var isHostCallbackScheduled = false;
  38127. var isHostTimeoutScheduled = false;
  38128. function advanceTimers(currentTime) {
  38129. // Check for tasks that are no longer delayed and add them to the queue.
  38130. var timer = peek(timerQueue);
  38131. while (timer !== null) {
  38132. if (timer.callback === null) {
  38133. // Timer was cancelled.
  38134. pop(timerQueue);
  38135. } else if (timer.startTime <= currentTime) {
  38136. // Timer fired. Transfer to the task queue.
  38137. pop(timerQueue);
  38138. timer.sortIndex = timer.expirationTime;
  38139. push(taskQueue, timer);
  38140. {
  38141. markTaskStart(timer, currentTime);
  38142. timer.isQueued = true;
  38143. }
  38144. } else {
  38145. // Remaining timers are pending.
  38146. return;
  38147. }
  38148. timer = peek(timerQueue);
  38149. }
  38150. }
  38151. function handleTimeout(currentTime) {
  38152. isHostTimeoutScheduled = false;
  38153. advanceTimers(currentTime);
  38154. if (!isHostCallbackScheduled) {
  38155. if (peek(taskQueue) !== null) {
  38156. isHostCallbackScheduled = true;
  38157. requestHostCallback(flushWork);
  38158. } else {
  38159. var firstTimer = peek(timerQueue);
  38160. if (firstTimer !== null) {
  38161. requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
  38162. }
  38163. }
  38164. }
  38165. }
  38166. function flushWork(hasTimeRemaining, initialTime) {
  38167. {
  38168. markSchedulerUnsuspended(initialTime);
  38169. } // We'll need a host callback the next time work is scheduled.
  38170. isHostCallbackScheduled = false;
  38171. if (isHostTimeoutScheduled) {
  38172. // We scheduled a timeout but it's no longer needed. Cancel it.
  38173. isHostTimeoutScheduled = false;
  38174. cancelHostTimeout();
  38175. }
  38176. isPerformingWork = true;
  38177. var previousPriorityLevel = currentPriorityLevel;
  38178. try {
  38179. if (enableProfiling) {
  38180. try {
  38181. return workLoop(hasTimeRemaining, initialTime);
  38182. } catch (error) {
  38183. if (currentTask !== null) {
  38184. var currentTime = exports.unstable_now();
  38185. markTaskErrored(currentTask, currentTime);
  38186. currentTask.isQueued = false;
  38187. }
  38188. throw error;
  38189. }
  38190. } else {
  38191. // No catch in prod codepath.
  38192. return workLoop(hasTimeRemaining, initialTime);
  38193. }
  38194. } finally {
  38195. currentTask = null;
  38196. currentPriorityLevel = previousPriorityLevel;
  38197. isPerformingWork = false;
  38198. {
  38199. var _currentTime = exports.unstable_now();
  38200. markSchedulerSuspended(_currentTime);
  38201. }
  38202. }
  38203. }
  38204. function workLoop(hasTimeRemaining, initialTime) {
  38205. var currentTime = initialTime;
  38206. advanceTimers(currentTime);
  38207. currentTask = peek(taskQueue);
  38208. while (currentTask !== null && !(enableSchedulerDebugging )) {
  38209. if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
  38210. // This currentTask hasn't expired, and we've reached the deadline.
  38211. break;
  38212. }
  38213. var callback = currentTask.callback;
  38214. if (callback !== null) {
  38215. currentTask.callback = null;
  38216. currentPriorityLevel = currentTask.priorityLevel;
  38217. var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
  38218. markTaskRun(currentTask, currentTime);
  38219. var continuationCallback = callback(didUserCallbackTimeout);
  38220. currentTime = exports.unstable_now();
  38221. if (typeof continuationCallback === 'function') {
  38222. currentTask.callback = continuationCallback;
  38223. markTaskYield(currentTask, currentTime);
  38224. } else {
  38225. {
  38226. markTaskCompleted(currentTask, currentTime);
  38227. currentTask.isQueued = false;
  38228. }
  38229. if (currentTask === peek(taskQueue)) {
  38230. pop(taskQueue);
  38231. }
  38232. }
  38233. advanceTimers(currentTime);
  38234. } else {
  38235. pop(taskQueue);
  38236. }
  38237. currentTask = peek(taskQueue);
  38238. } // Return whether there's additional work
  38239. if (currentTask !== null) {
  38240. return true;
  38241. } else {
  38242. var firstTimer = peek(timerQueue);
  38243. if (firstTimer !== null) {
  38244. requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
  38245. }
  38246. return false;
  38247. }
  38248. }
  38249. function unstable_runWithPriority(priorityLevel, eventHandler) {
  38250. switch (priorityLevel) {
  38251. case ImmediatePriority:
  38252. case UserBlockingPriority:
  38253. case NormalPriority:
  38254. case LowPriority:
  38255. case IdlePriority:
  38256. break;
  38257. default:
  38258. priorityLevel = NormalPriority;
  38259. }
  38260. var previousPriorityLevel = currentPriorityLevel;
  38261. currentPriorityLevel = priorityLevel;
  38262. try {
  38263. return eventHandler();
  38264. } finally {
  38265. currentPriorityLevel = previousPriorityLevel;
  38266. }
  38267. }
  38268. function unstable_next(eventHandler) {
  38269. var priorityLevel;
  38270. switch (currentPriorityLevel) {
  38271. case ImmediatePriority:
  38272. case UserBlockingPriority:
  38273. case NormalPriority:
  38274. // Shift down to normal priority
  38275. priorityLevel = NormalPriority;
  38276. break;
  38277. default:
  38278. // Anything lower than normal priority should remain at the current level.
  38279. priorityLevel = currentPriorityLevel;
  38280. break;
  38281. }
  38282. var previousPriorityLevel = currentPriorityLevel;
  38283. currentPriorityLevel = priorityLevel;
  38284. try {
  38285. return eventHandler();
  38286. } finally {
  38287. currentPriorityLevel = previousPriorityLevel;
  38288. }
  38289. }
  38290. function unstable_wrapCallback(callback) {
  38291. var parentPriorityLevel = currentPriorityLevel;
  38292. return function () {
  38293. // This is a fork of runWithPriority, inlined for performance.
  38294. var previousPriorityLevel = currentPriorityLevel;
  38295. currentPriorityLevel = parentPriorityLevel;
  38296. try {
  38297. return callback.apply(this, arguments);
  38298. } finally {
  38299. currentPriorityLevel = previousPriorityLevel;
  38300. }
  38301. };
  38302. }
  38303. function timeoutForPriorityLevel(priorityLevel) {
  38304. switch (priorityLevel) {
  38305. case ImmediatePriority:
  38306. return IMMEDIATE_PRIORITY_TIMEOUT;
  38307. case UserBlockingPriority:
  38308. return USER_BLOCKING_PRIORITY;
  38309. case IdlePriority:
  38310. return IDLE_PRIORITY;
  38311. case LowPriority:
  38312. return LOW_PRIORITY_TIMEOUT;
  38313. case NormalPriority:
  38314. default:
  38315. return NORMAL_PRIORITY_TIMEOUT;
  38316. }
  38317. }
  38318. function unstable_scheduleCallback(priorityLevel, callback, options) {
  38319. var currentTime = exports.unstable_now();
  38320. var startTime;
  38321. var timeout;
  38322. if (typeof options === 'object' && options !== null) {
  38323. var delay = options.delay;
  38324. if (typeof delay === 'number' && delay > 0) {
  38325. startTime = currentTime + delay;
  38326. } else {
  38327. startTime = currentTime;
  38328. }
  38329. timeout = typeof options.timeout === 'number' ? options.timeout : timeoutForPriorityLevel(priorityLevel);
  38330. } else {
  38331. timeout = timeoutForPriorityLevel(priorityLevel);
  38332. startTime = currentTime;
  38333. }
  38334. var expirationTime = startTime + timeout;
  38335. var newTask = {
  38336. id: taskIdCounter++,
  38337. callback: callback,
  38338. priorityLevel: priorityLevel,
  38339. startTime: startTime,
  38340. expirationTime: expirationTime,
  38341. sortIndex: -1
  38342. };
  38343. {
  38344. newTask.isQueued = false;
  38345. }
  38346. if (startTime > currentTime) {
  38347. // This is a delayed task.
  38348. newTask.sortIndex = startTime;
  38349. push(timerQueue, newTask);
  38350. if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
  38351. // All tasks are delayed, and this is the task with the earliest delay.
  38352. if (isHostTimeoutScheduled) {
  38353. // Cancel an existing timeout.
  38354. cancelHostTimeout();
  38355. } else {
  38356. isHostTimeoutScheduled = true;
  38357. } // Schedule a timeout.
  38358. requestHostTimeout(handleTimeout, startTime - currentTime);
  38359. }
  38360. } else {
  38361. newTask.sortIndex = expirationTime;
  38362. push(taskQueue, newTask);
  38363. {
  38364. markTaskStart(newTask, currentTime);
  38365. newTask.isQueued = true;
  38366. } // Schedule a host callback, if needed. If we're already performing work,
  38367. // wait until the next time we yield.
  38368. if (!isHostCallbackScheduled && !isPerformingWork) {
  38369. isHostCallbackScheduled = true;
  38370. requestHostCallback(flushWork);
  38371. }
  38372. }
  38373. return newTask;
  38374. }
  38375. function unstable_pauseExecution() {
  38376. }
  38377. function unstable_continueExecution() {
  38378. if (!isHostCallbackScheduled && !isPerformingWork) {
  38379. isHostCallbackScheduled = true;
  38380. requestHostCallback(flushWork);
  38381. }
  38382. }
  38383. function unstable_getFirstCallbackNode() {
  38384. return peek(taskQueue);
  38385. }
  38386. function unstable_cancelCallback(task) {
  38387. {
  38388. if (task.isQueued) {
  38389. var currentTime = exports.unstable_now();
  38390. markTaskCanceled(task, currentTime);
  38391. task.isQueued = false;
  38392. }
  38393. } // Null out the callback to indicate the task has been canceled. (Can't
  38394. // remove from the queue because you can't remove arbitrary nodes from an
  38395. // array based heap, only the first one.)
  38396. task.callback = null;
  38397. }
  38398. function unstable_getCurrentPriorityLevel() {
  38399. return currentPriorityLevel;
  38400. }
  38401. function unstable_shouldYield() {
  38402. var currentTime = exports.unstable_now();
  38403. advanceTimers(currentTime);
  38404. var firstTask = peek(taskQueue);
  38405. return firstTask !== currentTask && currentTask !== null && firstTask !== null && firstTask.callback !== null && firstTask.startTime <= currentTime && firstTask.expirationTime < currentTask.expirationTime || shouldYieldToHost();
  38406. }
  38407. var unstable_requestPaint = requestPaint;
  38408. var unstable_Profiling = {
  38409. startLoggingProfilingEvents: startLoggingProfilingEvents,
  38410. stopLoggingProfilingEvents: stopLoggingProfilingEvents,
  38411. sharedProfilingBuffer: sharedProfilingBuffer
  38412. } ;
  38413. exports.unstable_IdlePriority = IdlePriority;
  38414. exports.unstable_ImmediatePriority = ImmediatePriority;
  38415. exports.unstable_LowPriority = LowPriority;
  38416. exports.unstable_NormalPriority = NormalPriority;
  38417. exports.unstable_Profiling = unstable_Profiling;
  38418. exports.unstable_UserBlockingPriority = UserBlockingPriority;
  38419. exports.unstable_cancelCallback = unstable_cancelCallback;
  38420. exports.unstable_continueExecution = unstable_continueExecution;
  38421. exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
  38422. exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
  38423. exports.unstable_next = unstable_next;
  38424. exports.unstable_pauseExecution = unstable_pauseExecution;
  38425. exports.unstable_requestPaint = unstable_requestPaint;
  38426. exports.unstable_runWithPriority = unstable_runWithPriority;
  38427. exports.unstable_scheduleCallback = unstable_scheduleCallback;
  38428. exports.unstable_shouldYield = unstable_shouldYield;
  38429. exports.unstable_wrapCallback = unstable_wrapCallback;
  38430. })();
  38431. }
  38432. /***/ }),
  38433. /***/ "./node_modules/scheduler/index.js":
  38434. /*!*****************************************!*\
  38435. !*** ./node_modules/scheduler/index.js ***!
  38436. \*****************************************/
  38437. /*! dynamic exports provided */
  38438. /*! all exports used */
  38439. /***/ (function(module, exports, __webpack_require__) {
  38440. "use strict";
  38441. if (false) {
  38442. module.exports = require('./cjs/scheduler.production.min.js');
  38443. } else {
  38444. module.exports = __webpack_require__(/*! ./cjs/scheduler.development.js */ "./node_modules/scheduler/cjs/scheduler.development.js");
  38445. }
  38446. /***/ }),
  38447. /***/ "./node_modules/scheduler/tracing.js":
  38448. /*!*******************************************!*\
  38449. !*** ./node_modules/scheduler/tracing.js ***!
  38450. \*******************************************/
  38451. /*! dynamic exports provided */
  38452. /*! all exports used */
  38453. /***/ (function(module, exports, __webpack_require__) {
  38454. "use strict";
  38455. if (false) {
  38456. module.exports = require('./cjs/scheduler-tracing.production.min.js');
  38457. } else {
  38458. module.exports = __webpack_require__(/*! ./cjs/scheduler-tracing.development.js */ "./node_modules/scheduler/cjs/scheduler-tracing.development.js");
  38459. }
  38460. /***/ }),
  38461. /***/ "./node_modules/sockjs-client/lib/entry.js":
  38462. /*!*************************************************!*\
  38463. !*** ./node_modules/sockjs-client/lib/entry.js ***!
  38464. \*************************************************/
  38465. /*! dynamic exports provided */
  38466. /*! all exports used */
  38467. /***/ (function(module, exports, __webpack_require__) {
  38468. "use strict";
  38469. /* WEBPACK VAR INJECTION */(function(global) {
  38470. var transportList = __webpack_require__(/*! ./transport-list */ "./node_modules/sockjs-client/lib/transport-list.js");
  38471. module.exports = __webpack_require__(/*! ./main */ "./node_modules/sockjs-client/lib/main.js")(transportList);
  38472. // TODO can't get rid of this until all servers do
  38473. if ('_sockjs_onload' in global) {
  38474. setTimeout(global._sockjs_onload, 1);
  38475. }
  38476. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  38477. /***/ }),
  38478. /***/ "./node_modules/sockjs-client/lib/event/close.js":
  38479. /*!*******************************************************!*\
  38480. !*** ./node_modules/sockjs-client/lib/event/close.js ***!
  38481. \*******************************************************/
  38482. /*! dynamic exports provided */
  38483. /*! all exports used */
  38484. /***/ (function(module, exports, __webpack_require__) {
  38485. "use strict";
  38486. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  38487. , Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js")
  38488. ;
  38489. function CloseEvent() {
  38490. Event.call(this);
  38491. this.initEvent('close', false, false);
  38492. this.wasClean = false;
  38493. this.code = 0;
  38494. this.reason = '';
  38495. }
  38496. inherits(CloseEvent, Event);
  38497. module.exports = CloseEvent;
  38498. /***/ }),
  38499. /***/ "./node_modules/sockjs-client/lib/event/emitter.js":
  38500. /*!*********************************************************!*\
  38501. !*** ./node_modules/sockjs-client/lib/event/emitter.js ***!
  38502. \*********************************************************/
  38503. /*! dynamic exports provided */
  38504. /*! all exports used */
  38505. /***/ (function(module, exports, __webpack_require__) {
  38506. "use strict";
  38507. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  38508. , EventTarget = __webpack_require__(/*! ./eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js")
  38509. ;
  38510. function EventEmitter() {
  38511. EventTarget.call(this);
  38512. }
  38513. inherits(EventEmitter, EventTarget);
  38514. EventEmitter.prototype.removeAllListeners = function(type) {
  38515. if (type) {
  38516. delete this._listeners[type];
  38517. } else {
  38518. this._listeners = {};
  38519. }
  38520. };
  38521. EventEmitter.prototype.once = function(type, listener) {
  38522. var self = this
  38523. , fired = false;
  38524. function g() {
  38525. self.removeListener(type, g);
  38526. if (!fired) {
  38527. fired = true;
  38528. listener.apply(this, arguments);
  38529. }
  38530. }
  38531. this.on(type, g);
  38532. };
  38533. EventEmitter.prototype.emit = function() {
  38534. var type = arguments[0];
  38535. var listeners = this._listeners[type];
  38536. if (!listeners) {
  38537. return;
  38538. }
  38539. // equivalent of Array.prototype.slice.call(arguments, 1);
  38540. var l = arguments.length;
  38541. var args = new Array(l - 1);
  38542. for (var ai = 1; ai < l; ai++) {
  38543. args[ai - 1] = arguments[ai];
  38544. }
  38545. for (var i = 0; i < listeners.length; i++) {
  38546. listeners[i].apply(this, args);
  38547. }
  38548. };
  38549. EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;
  38550. EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;
  38551. module.exports.EventEmitter = EventEmitter;
  38552. /***/ }),
  38553. /***/ "./node_modules/sockjs-client/lib/event/event.js":
  38554. /*!*******************************************************!*\
  38555. !*** ./node_modules/sockjs-client/lib/event/event.js ***!
  38556. \*******************************************************/
  38557. /*! dynamic exports provided */
  38558. /*! all exports used */
  38559. /***/ (function(module, exports, __webpack_require__) {
  38560. "use strict";
  38561. function Event(eventType) {
  38562. this.type = eventType;
  38563. }
  38564. Event.prototype.initEvent = function(eventType, canBubble, cancelable) {
  38565. this.type = eventType;
  38566. this.bubbles = canBubble;
  38567. this.cancelable = cancelable;
  38568. this.timeStamp = +new Date();
  38569. return this;
  38570. };
  38571. Event.prototype.stopPropagation = function() {};
  38572. Event.prototype.preventDefault = function() {};
  38573. Event.CAPTURING_PHASE = 1;
  38574. Event.AT_TARGET = 2;
  38575. Event.BUBBLING_PHASE = 3;
  38576. module.exports = Event;
  38577. /***/ }),
  38578. /***/ "./node_modules/sockjs-client/lib/event/eventtarget.js":
  38579. /*!*************************************************************!*\
  38580. !*** ./node_modules/sockjs-client/lib/event/eventtarget.js ***!
  38581. \*************************************************************/
  38582. /*! dynamic exports provided */
  38583. /*! all exports used */
  38584. /***/ (function(module, exports, __webpack_require__) {
  38585. "use strict";
  38586. /* Simplified implementation of DOM2 EventTarget.
  38587. * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
  38588. */
  38589. function EventTarget() {
  38590. this._listeners = {};
  38591. }
  38592. EventTarget.prototype.addEventListener = function(eventType, listener) {
  38593. if (!(eventType in this._listeners)) {
  38594. this._listeners[eventType] = [];
  38595. }
  38596. var arr = this._listeners[eventType];
  38597. // #4
  38598. if (arr.indexOf(listener) === -1) {
  38599. // Make a copy so as not to interfere with a current dispatchEvent.
  38600. arr = arr.concat([listener]);
  38601. }
  38602. this._listeners[eventType] = arr;
  38603. };
  38604. EventTarget.prototype.removeEventListener = function(eventType, listener) {
  38605. var arr = this._listeners[eventType];
  38606. if (!arr) {
  38607. return;
  38608. }
  38609. var idx = arr.indexOf(listener);
  38610. if (idx !== -1) {
  38611. if (arr.length > 1) {
  38612. // Make a copy so as not to interfere with a current dispatchEvent.
  38613. this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));
  38614. } else {
  38615. delete this._listeners[eventType];
  38616. }
  38617. return;
  38618. }
  38619. };
  38620. EventTarget.prototype.dispatchEvent = function() {
  38621. var event = arguments[0];
  38622. var t = event.type;
  38623. // equivalent of Array.prototype.slice.call(arguments, 0);
  38624. var args = arguments.length === 1 ? [event] : Array.apply(null, arguments);
  38625. // TODO: This doesn't match the real behavior; per spec, onfoo get
  38626. // their place in line from the /first/ time they're set from
  38627. // non-null. Although WebKit bumps it to the end every time it's
  38628. // set.
  38629. if (this['on' + t]) {
  38630. this['on' + t].apply(this, args);
  38631. }
  38632. if (t in this._listeners) {
  38633. // Grab a reference to the listeners list. removeEventListener may alter the list.
  38634. var listeners = this._listeners[t];
  38635. for (var i = 0; i < listeners.length; i++) {
  38636. listeners[i].apply(this, args);
  38637. }
  38638. }
  38639. };
  38640. module.exports = EventTarget;
  38641. /***/ }),
  38642. /***/ "./node_modules/sockjs-client/lib/event/trans-message.js":
  38643. /*!***************************************************************!*\
  38644. !*** ./node_modules/sockjs-client/lib/event/trans-message.js ***!
  38645. \***************************************************************/
  38646. /*! dynamic exports provided */
  38647. /*! all exports used */
  38648. /***/ (function(module, exports, __webpack_require__) {
  38649. "use strict";
  38650. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  38651. , Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js")
  38652. ;
  38653. function TransportMessageEvent(data) {
  38654. Event.call(this);
  38655. this.initEvent('message', false, false);
  38656. this.data = data;
  38657. }
  38658. inherits(TransportMessageEvent, Event);
  38659. module.exports = TransportMessageEvent;
  38660. /***/ }),
  38661. /***/ "./node_modules/sockjs-client/lib/facade.js":
  38662. /*!**************************************************!*\
  38663. !*** ./node_modules/sockjs-client/lib/facade.js ***!
  38664. \**************************************************/
  38665. /*! dynamic exports provided */
  38666. /*! all exports used */
  38667. /***/ (function(module, exports, __webpack_require__) {
  38668. "use strict";
  38669. var JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  38670. , iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
  38671. ;
  38672. function FacadeJS(transport) {
  38673. this._transport = transport;
  38674. transport.on('message', this._transportMessage.bind(this));
  38675. transport.on('close', this._transportClose.bind(this));
  38676. }
  38677. FacadeJS.prototype._transportClose = function(code, reason) {
  38678. iframeUtils.postMessage('c', JSON3.stringify([code, reason]));
  38679. };
  38680. FacadeJS.prototype._transportMessage = function(frame) {
  38681. iframeUtils.postMessage('t', frame);
  38682. };
  38683. FacadeJS.prototype._send = function(data) {
  38684. this._transport.send(data);
  38685. };
  38686. FacadeJS.prototype._close = function() {
  38687. this._transport.close();
  38688. this._transport.removeAllListeners();
  38689. };
  38690. module.exports = FacadeJS;
  38691. /***/ }),
  38692. /***/ "./node_modules/sockjs-client/lib/iframe-bootstrap.js":
  38693. /*!************************************************************!*\
  38694. !*** ./node_modules/sockjs-client/lib/iframe-bootstrap.js ***!
  38695. \************************************************************/
  38696. /*! dynamic exports provided */
  38697. /*! all exports used */
  38698. /***/ (function(module, exports, __webpack_require__) {
  38699. "use strict";
  38700. var urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  38701. , eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
  38702. , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  38703. , FacadeJS = __webpack_require__(/*! ./facade */ "./node_modules/sockjs-client/lib/facade.js")
  38704. , InfoIframeReceiver = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js")
  38705. , iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
  38706. , loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js")
  38707. ;
  38708. var debug = function() {};
  38709. if (true) {
  38710. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:iframe-bootstrap');
  38711. }
  38712. module.exports = function(SockJS, availableTransports) {
  38713. var transportMap = {};
  38714. availableTransports.forEach(function(at) {
  38715. if (at.facadeTransport) {
  38716. transportMap[at.facadeTransport.transportName] = at.facadeTransport;
  38717. }
  38718. });
  38719. // hard-coded for the info iframe
  38720. // TODO see if we can make this more dynamic
  38721. transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;
  38722. var parentOrigin;
  38723. /* eslint-disable camelcase */
  38724. SockJS.bootstrap_iframe = function() {
  38725. /* eslint-enable camelcase */
  38726. var facade;
  38727. iframeUtils.currentWindowId = loc.hash.slice(1);
  38728. var onMessage = function(e) {
  38729. if (e.source !== parent) {
  38730. return;
  38731. }
  38732. if (typeof parentOrigin === 'undefined') {
  38733. parentOrigin = e.origin;
  38734. }
  38735. if (e.origin !== parentOrigin) {
  38736. return;
  38737. }
  38738. var iframeMessage;
  38739. try {
  38740. iframeMessage = JSON3.parse(e.data);
  38741. } catch (ignored) {
  38742. debug('bad json', e.data);
  38743. return;
  38744. }
  38745. if (iframeMessage.windowId !== iframeUtils.currentWindowId) {
  38746. return;
  38747. }
  38748. switch (iframeMessage.type) {
  38749. case 's':
  38750. var p;
  38751. try {
  38752. p = JSON3.parse(iframeMessage.data);
  38753. } catch (ignored) {
  38754. debug('bad json', iframeMessage.data);
  38755. break;
  38756. }
  38757. var version = p[0];
  38758. var transport = p[1];
  38759. var transUrl = p[2];
  38760. var baseUrl = p[3];
  38761. debug(version, transport, transUrl, baseUrl);
  38762. // change this to semver logic
  38763. if (version !== SockJS.version) {
  38764. throw new Error('Incompatible SockJS! Main site uses:' +
  38765. ' "' + version + '", the iframe:' +
  38766. ' "' + SockJS.version + '".');
  38767. }
  38768. if (!urlUtils.isOriginEqual(transUrl, loc.href) ||
  38769. !urlUtils.isOriginEqual(baseUrl, loc.href)) {
  38770. throw new Error('Can\'t connect to different domain from within an ' +
  38771. 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');
  38772. }
  38773. facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));
  38774. break;
  38775. case 'm':
  38776. facade._send(iframeMessage.data);
  38777. break;
  38778. case 'c':
  38779. if (facade) {
  38780. facade._close();
  38781. }
  38782. facade = null;
  38783. break;
  38784. }
  38785. };
  38786. eventUtils.attachEvent('message', onMessage);
  38787. // Start
  38788. iframeUtils.postMessage('s');
  38789. };
  38790. };
  38791. /***/ }),
  38792. /***/ "./node_modules/sockjs-client/lib/info-ajax.js":
  38793. /*!*****************************************************!*\
  38794. !*** ./node_modules/sockjs-client/lib/info-ajax.js ***!
  38795. \*****************************************************/
  38796. /*! dynamic exports provided */
  38797. /*! all exports used */
  38798. /***/ (function(module, exports, __webpack_require__) {
  38799. "use strict";
  38800. var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  38801. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  38802. , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  38803. , objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js")
  38804. ;
  38805. var debug = function() {};
  38806. if (true) {
  38807. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:info-ajax');
  38808. }
  38809. function InfoAjax(url, AjaxObject) {
  38810. EventEmitter.call(this);
  38811. var self = this;
  38812. var t0 = +new Date();
  38813. this.xo = new AjaxObject('GET', url);
  38814. this.xo.once('finish', function(status, text) {
  38815. var info, rtt;
  38816. if (status === 200) {
  38817. rtt = (+new Date()) - t0;
  38818. if (text) {
  38819. try {
  38820. info = JSON3.parse(text);
  38821. } catch (e) {
  38822. debug('bad json', text);
  38823. }
  38824. }
  38825. if (!objectUtils.isObject(info)) {
  38826. info = {};
  38827. }
  38828. }
  38829. self.emit('finish', info, rtt);
  38830. self.removeAllListeners();
  38831. });
  38832. }
  38833. inherits(InfoAjax, EventEmitter);
  38834. InfoAjax.prototype.close = function() {
  38835. this.removeAllListeners();
  38836. this.xo.close();
  38837. };
  38838. module.exports = InfoAjax;
  38839. /***/ }),
  38840. /***/ "./node_modules/sockjs-client/lib/info-iframe-receiver.js":
  38841. /*!****************************************************************!*\
  38842. !*** ./node_modules/sockjs-client/lib/info-iframe-receiver.js ***!
  38843. \****************************************************************/
  38844. /*! dynamic exports provided */
  38845. /*! all exports used */
  38846. /***/ (function(module, exports, __webpack_require__) {
  38847. "use strict";
  38848. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  38849. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  38850. , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  38851. , XHRLocalObject = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
  38852. , InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js")
  38853. ;
  38854. function InfoReceiverIframe(transUrl) {
  38855. var self = this;
  38856. EventEmitter.call(this);
  38857. this.ir = new InfoAjax(transUrl, XHRLocalObject);
  38858. this.ir.once('finish', function(info, rtt) {
  38859. self.ir = null;
  38860. self.emit('message', JSON3.stringify([info, rtt]));
  38861. });
  38862. }
  38863. inherits(InfoReceiverIframe, EventEmitter);
  38864. InfoReceiverIframe.transportName = 'iframe-info-receiver';
  38865. InfoReceiverIframe.prototype.close = function() {
  38866. if (this.ir) {
  38867. this.ir.close();
  38868. this.ir = null;
  38869. }
  38870. this.removeAllListeners();
  38871. };
  38872. module.exports = InfoReceiverIframe;
  38873. /***/ }),
  38874. /***/ "./node_modules/sockjs-client/lib/info-iframe.js":
  38875. /*!*******************************************************!*\
  38876. !*** ./node_modules/sockjs-client/lib/info-iframe.js ***!
  38877. \*******************************************************/
  38878. /*! dynamic exports provided */
  38879. /*! all exports used */
  38880. /***/ (function(module, exports, __webpack_require__) {
  38881. "use strict";
  38882. /* WEBPACK VAR INJECTION */(function(global) {
  38883. var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  38884. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  38885. , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  38886. , utils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
  38887. , IframeTransport = __webpack_require__(/*! ./transport/iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js")
  38888. , InfoReceiverIframe = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js")
  38889. ;
  38890. var debug = function() {};
  38891. if (true) {
  38892. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:info-iframe');
  38893. }
  38894. function InfoIframe(baseUrl, url) {
  38895. var self = this;
  38896. EventEmitter.call(this);
  38897. var go = function() {
  38898. var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);
  38899. ifr.once('message', function(msg) {
  38900. if (msg) {
  38901. var d;
  38902. try {
  38903. d = JSON3.parse(msg);
  38904. } catch (e) {
  38905. debug('bad json', msg);
  38906. self.emit('finish');
  38907. self.close();
  38908. return;
  38909. }
  38910. var info = d[0], rtt = d[1];
  38911. self.emit('finish', info, rtt);
  38912. }
  38913. self.close();
  38914. });
  38915. ifr.once('close', function() {
  38916. self.emit('finish');
  38917. self.close();
  38918. });
  38919. };
  38920. // TODO this seems the same as the 'needBody' from transports
  38921. if (!global.document.body) {
  38922. utils.attachEvent('load', go);
  38923. } else {
  38924. go();
  38925. }
  38926. }
  38927. inherits(InfoIframe, EventEmitter);
  38928. InfoIframe.enabled = function() {
  38929. return IframeTransport.enabled();
  38930. };
  38931. InfoIframe.prototype.close = function() {
  38932. if (this.ifr) {
  38933. this.ifr.close();
  38934. }
  38935. this.removeAllListeners();
  38936. this.ifr = null;
  38937. };
  38938. module.exports = InfoIframe;
  38939. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  38940. /***/ }),
  38941. /***/ "./node_modules/sockjs-client/lib/info-receiver.js":
  38942. /*!*********************************************************!*\
  38943. !*** ./node_modules/sockjs-client/lib/info-receiver.js ***!
  38944. \*********************************************************/
  38945. /*! dynamic exports provided */
  38946. /*! all exports used */
  38947. /***/ (function(module, exports, __webpack_require__) {
  38948. "use strict";
  38949. var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  38950. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  38951. , urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  38952. , XDR = __webpack_require__(/*! ./transport/sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js")
  38953. , XHRCors = __webpack_require__(/*! ./transport/sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
  38954. , XHRLocal = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
  38955. , XHRFake = __webpack_require__(/*! ./transport/sender/xhr-fake */ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js")
  38956. , InfoIframe = __webpack_require__(/*! ./info-iframe */ "./node_modules/sockjs-client/lib/info-iframe.js")
  38957. , InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js")
  38958. ;
  38959. var debug = function() {};
  38960. if (true) {
  38961. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:info-receiver');
  38962. }
  38963. function InfoReceiver(baseUrl, urlInfo) {
  38964. debug(baseUrl);
  38965. var self = this;
  38966. EventEmitter.call(this);
  38967. setTimeout(function() {
  38968. self.doXhr(baseUrl, urlInfo);
  38969. }, 0);
  38970. }
  38971. inherits(InfoReceiver, EventEmitter);
  38972. // TODO this is currently ignoring the list of available transports and the whitelist
  38973. InfoReceiver._getReceiver = function(baseUrl, url, urlInfo) {
  38974. // determine method of CORS support (if needed)
  38975. if (urlInfo.sameOrigin) {
  38976. return new InfoAjax(url, XHRLocal);
  38977. }
  38978. if (XHRCors.enabled) {
  38979. return new InfoAjax(url, XHRCors);
  38980. }
  38981. if (XDR.enabled && urlInfo.sameScheme) {
  38982. return new InfoAjax(url, XDR);
  38983. }
  38984. if (InfoIframe.enabled()) {
  38985. return new InfoIframe(baseUrl, url);
  38986. }
  38987. return new InfoAjax(url, XHRFake);
  38988. };
  38989. InfoReceiver.prototype.doXhr = function(baseUrl, urlInfo) {
  38990. var self = this
  38991. , url = urlUtils.addPath(baseUrl, '/info')
  38992. ;
  38993. debug('doXhr', url);
  38994. this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);
  38995. this.timeoutRef = setTimeout(function() {
  38996. debug('timeout');
  38997. self._cleanup(false);
  38998. self.emit('finish');
  38999. }, InfoReceiver.timeout);
  39000. this.xo.once('finish', function(info, rtt) {
  39001. debug('finish', info, rtt);
  39002. self._cleanup(true);
  39003. self.emit('finish', info, rtt);
  39004. });
  39005. };
  39006. InfoReceiver.prototype._cleanup = function(wasClean) {
  39007. debug('_cleanup');
  39008. clearTimeout(this.timeoutRef);
  39009. this.timeoutRef = null;
  39010. if (!wasClean && this.xo) {
  39011. this.xo.close();
  39012. }
  39013. this.xo = null;
  39014. };
  39015. InfoReceiver.prototype.close = function() {
  39016. debug('close');
  39017. this.removeAllListeners();
  39018. this._cleanup(false);
  39019. };
  39020. InfoReceiver.timeout = 8000;
  39021. module.exports = InfoReceiver;
  39022. /***/ }),
  39023. /***/ "./node_modules/sockjs-client/lib/location.js":
  39024. /*!****************************************************!*\
  39025. !*** ./node_modules/sockjs-client/lib/location.js ***!
  39026. \****************************************************/
  39027. /*! dynamic exports provided */
  39028. /*! all exports used */
  39029. /***/ (function(module, exports, __webpack_require__) {
  39030. "use strict";
  39031. /* WEBPACK VAR INJECTION */(function(global) {
  39032. module.exports = global.location || {
  39033. origin: 'http://localhost:80'
  39034. , protocol: 'http'
  39035. , host: 'localhost'
  39036. , port: 80
  39037. , href: 'http://localhost/'
  39038. , hash: ''
  39039. };
  39040. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  39041. /***/ }),
  39042. /***/ "./node_modules/sockjs-client/lib/main.js":
  39043. /*!************************************************!*\
  39044. !*** ./node_modules/sockjs-client/lib/main.js ***!
  39045. \************************************************/
  39046. /*! dynamic exports provided */
  39047. /*! all exports used */
  39048. /***/ (function(module, exports, __webpack_require__) {
  39049. "use strict";
  39050. /* WEBPACK VAR INJECTION */(function(global) {
  39051. __webpack_require__(/*! ./shims */ "./node_modules/sockjs-client/lib/shims.js");
  39052. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js")
  39053. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  39054. , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  39055. , random = __webpack_require__(/*! ./utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
  39056. , escape = __webpack_require__(/*! ./utils/escape */ "./node_modules/sockjs-client/lib/utils/escape.js")
  39057. , urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  39058. , eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
  39059. , transport = __webpack_require__(/*! ./utils/transport */ "./node_modules/sockjs-client/lib/utils/transport.js")
  39060. , objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js")
  39061. , browser = __webpack_require__(/*! ./utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
  39062. , log = __webpack_require__(/*! ./utils/log */ "./node_modules/sockjs-client/lib/utils/log.js")
  39063. , Event = __webpack_require__(/*! ./event/event */ "./node_modules/sockjs-client/lib/event/event.js")
  39064. , EventTarget = __webpack_require__(/*! ./event/eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js")
  39065. , loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js")
  39066. , CloseEvent = __webpack_require__(/*! ./event/close */ "./node_modules/sockjs-client/lib/event/close.js")
  39067. , TransportMessageEvent = __webpack_require__(/*! ./event/trans-message */ "./node_modules/sockjs-client/lib/event/trans-message.js")
  39068. , InfoReceiver = __webpack_require__(/*! ./info-receiver */ "./node_modules/sockjs-client/lib/info-receiver.js")
  39069. ;
  39070. var debug = function() {};
  39071. if (true) {
  39072. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:main');
  39073. }
  39074. var transports;
  39075. // follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface
  39076. function SockJS(url, protocols, options) {
  39077. if (!(this instanceof SockJS)) {
  39078. return new SockJS(url, protocols, options);
  39079. }
  39080. if (arguments.length < 1) {
  39081. throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
  39082. }
  39083. EventTarget.call(this);
  39084. this.readyState = SockJS.CONNECTING;
  39085. this.extensions = '';
  39086. this.protocol = '';
  39087. // non-standard extension
  39088. options = options || {};
  39089. if (options.protocols_whitelist) {
  39090. log.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead.");
  39091. }
  39092. this._transportsWhitelist = options.transports;
  39093. this._transportOptions = options.transportOptions || {};
  39094. var sessionId = options.sessionId || 8;
  39095. if (typeof sessionId === 'function') {
  39096. this._generateSessionId = sessionId;
  39097. } else if (typeof sessionId === 'number') {
  39098. this._generateSessionId = function() {
  39099. return random.string(sessionId);
  39100. };
  39101. } else {
  39102. throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');
  39103. }
  39104. this._server = options.server || random.numberString(1000);
  39105. // Step 1 of WS spec - parse and validate the url. Issue #8
  39106. var parsedUrl = new URL(url);
  39107. if (!parsedUrl.host || !parsedUrl.protocol) {
  39108. throw new SyntaxError("The URL '" + url + "' is invalid");
  39109. } else if (parsedUrl.hash) {
  39110. throw new SyntaxError('The URL must not contain a fragment');
  39111. } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
  39112. throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed.");
  39113. }
  39114. var secure = parsedUrl.protocol === 'https:';
  39115. // Step 2 - don't allow secure origin with an insecure protocol
  39116. if (loc.protocol === 'https' && !secure) {
  39117. throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
  39118. }
  39119. // Step 3 - check port access - no need here
  39120. // Step 4 - parse protocols argument
  39121. if (!protocols) {
  39122. protocols = [];
  39123. } else if (!Array.isArray(protocols)) {
  39124. protocols = [protocols];
  39125. }
  39126. // Step 5 - check protocols argument
  39127. var sortedProtocols = protocols.sort();
  39128. sortedProtocols.forEach(function(proto, i) {
  39129. if (!proto) {
  39130. throw new SyntaxError("The protocols entry '" + proto + "' is invalid.");
  39131. }
  39132. if (i < (sortedProtocols.length - 1) && proto === sortedProtocols[i + 1]) {
  39133. throw new SyntaxError("The protocols entry '" + proto + "' is duplicated.");
  39134. }
  39135. });
  39136. // Step 6 - convert origin
  39137. var o = urlUtils.getOrigin(loc.href);
  39138. this._origin = o ? o.toLowerCase() : null;
  39139. // remove the trailing slash
  39140. parsedUrl.set('pathname', parsedUrl.pathname.replace(/\/+$/, ''));
  39141. // store the sanitized url
  39142. this.url = parsedUrl.href;
  39143. debug('using url', this.url);
  39144. // Step 7 - start connection in background
  39145. // obtain server info
  39146. // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26
  39147. this._urlInfo = {
  39148. nullOrigin: !browser.hasDomain()
  39149. , sameOrigin: urlUtils.isOriginEqual(this.url, loc.href)
  39150. , sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)
  39151. };
  39152. this._ir = new InfoReceiver(this.url, this._urlInfo);
  39153. this._ir.once('finish', this._receiveInfo.bind(this));
  39154. }
  39155. inherits(SockJS, EventTarget);
  39156. function userSetCode(code) {
  39157. return code === 1000 || (code >= 3000 && code <= 4999);
  39158. }
  39159. SockJS.prototype.close = function(code, reason) {
  39160. // Step 1
  39161. if (code && !userSetCode(code)) {
  39162. throw new Error('InvalidAccessError: Invalid code');
  39163. }
  39164. // Step 2.4 states the max is 123 bytes, but we are just checking length
  39165. if (reason && reason.length > 123) {
  39166. throw new SyntaxError('reason argument has an invalid length');
  39167. }
  39168. // Step 3.1
  39169. if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {
  39170. return;
  39171. }
  39172. // TODO look at docs to determine how to set this
  39173. var wasClean = true;
  39174. this._close(code || 1000, reason || 'Normal closure', wasClean);
  39175. };
  39176. SockJS.prototype.send = function(data) {
  39177. // #13 - convert anything non-string to string
  39178. // TODO this currently turns objects into [object Object]
  39179. if (typeof data !== 'string') {
  39180. data = '' + data;
  39181. }
  39182. if (this.readyState === SockJS.CONNECTING) {
  39183. throw new Error('InvalidStateError: The connection has not been established yet');
  39184. }
  39185. if (this.readyState !== SockJS.OPEN) {
  39186. return;
  39187. }
  39188. this._transport.send(escape.quote(data));
  39189. };
  39190. SockJS.version = __webpack_require__(/*! ./version */ "./node_modules/sockjs-client/lib/version.js");
  39191. SockJS.CONNECTING = 0;
  39192. SockJS.OPEN = 1;
  39193. SockJS.CLOSING = 2;
  39194. SockJS.CLOSED = 3;
  39195. SockJS.prototype._receiveInfo = function(info, rtt) {
  39196. debug('_receiveInfo', rtt);
  39197. this._ir = null;
  39198. if (!info) {
  39199. this._close(1002, 'Cannot connect to server');
  39200. return;
  39201. }
  39202. // establish a round-trip timeout (RTO) based on the
  39203. // round-trip time (RTT)
  39204. this._rto = this.countRTO(rtt);
  39205. // allow server to override url used for the actual transport
  39206. this._transUrl = info.base_url ? info.base_url : this.url;
  39207. info = objectUtils.extend(info, this._urlInfo);
  39208. debug('info', info);
  39209. // determine list of desired and supported transports
  39210. var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);
  39211. this._transports = enabledTransports.main;
  39212. debug(this._transports.length + ' enabled transports');
  39213. this._connect();
  39214. };
  39215. SockJS.prototype._connect = function() {
  39216. for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {
  39217. debug('attempt', Transport.transportName);
  39218. if (Transport.needBody) {
  39219. if (!global.document.body ||
  39220. (typeof global.document.readyState !== 'undefined' &&
  39221. global.document.readyState !== 'complete' &&
  39222. global.document.readyState !== 'interactive')) {
  39223. debug('waiting for body');
  39224. this._transports.unshift(Transport);
  39225. eventUtils.attachEvent('load', this._connect.bind(this));
  39226. return;
  39227. }
  39228. }
  39229. // calculate timeout based on RTO and round trips. Default to 5s
  39230. var timeoutMs = (this._rto * Transport.roundTrips) || 5000;
  39231. this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);
  39232. debug('using timeout', timeoutMs);
  39233. var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());
  39234. var options = this._transportOptions[Transport.transportName];
  39235. debug('transport url', transportUrl);
  39236. var transportObj = new Transport(transportUrl, this._transUrl, options);
  39237. transportObj.on('message', this._transportMessage.bind(this));
  39238. transportObj.once('close', this._transportClose.bind(this));
  39239. transportObj.transportName = Transport.transportName;
  39240. this._transport = transportObj;
  39241. return;
  39242. }
  39243. this._close(2000, 'All transports failed', false);
  39244. };
  39245. SockJS.prototype._transportTimeout = function() {
  39246. debug('_transportTimeout');
  39247. if (this.readyState === SockJS.CONNECTING) {
  39248. this._transportClose(2007, 'Transport timed out');
  39249. }
  39250. };
  39251. SockJS.prototype._transportMessage = function(msg) {
  39252. debug('_transportMessage', msg);
  39253. var self = this
  39254. , type = msg.slice(0, 1)
  39255. , content = msg.slice(1)
  39256. , payload
  39257. ;
  39258. // first check for messages that don't need a payload
  39259. switch (type) {
  39260. case 'o':
  39261. this._open();
  39262. return;
  39263. case 'h':
  39264. this.dispatchEvent(new Event('heartbeat'));
  39265. debug('heartbeat', this.transport);
  39266. return;
  39267. }
  39268. if (content) {
  39269. try {
  39270. payload = JSON3.parse(content);
  39271. } catch (e) {
  39272. debug('bad json', content);
  39273. }
  39274. }
  39275. if (typeof payload === 'undefined') {
  39276. debug('empty payload', content);
  39277. return;
  39278. }
  39279. switch (type) {
  39280. case 'a':
  39281. if (Array.isArray(payload)) {
  39282. payload.forEach(function(p) {
  39283. debug('message', self.transport, p);
  39284. self.dispatchEvent(new TransportMessageEvent(p));
  39285. });
  39286. }
  39287. break;
  39288. case 'm':
  39289. debug('message', this.transport, payload);
  39290. this.dispatchEvent(new TransportMessageEvent(payload));
  39291. break;
  39292. case 'c':
  39293. if (Array.isArray(payload) && payload.length === 2) {
  39294. this._close(payload[0], payload[1], true);
  39295. }
  39296. break;
  39297. }
  39298. };
  39299. SockJS.prototype._transportClose = function(code, reason) {
  39300. debug('_transportClose', this.transport, code, reason);
  39301. if (this._transport) {
  39302. this._transport.removeAllListeners();
  39303. this._transport = null;
  39304. this.transport = null;
  39305. }
  39306. if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {
  39307. this._connect();
  39308. return;
  39309. }
  39310. this._close(code, reason);
  39311. };
  39312. SockJS.prototype._open = function() {
  39313. debug('_open', this._transport.transportName, this.readyState);
  39314. if (this.readyState === SockJS.CONNECTING) {
  39315. if (this._transportTimeoutId) {
  39316. clearTimeout(this._transportTimeoutId);
  39317. this._transportTimeoutId = null;
  39318. }
  39319. this.readyState = SockJS.OPEN;
  39320. this.transport = this._transport.transportName;
  39321. this.dispatchEvent(new Event('open'));
  39322. debug('connected', this.transport);
  39323. } else {
  39324. // The server might have been restarted, and lost track of our
  39325. // connection.
  39326. this._close(1006, 'Server lost session');
  39327. }
  39328. };
  39329. SockJS.prototype._close = function(code, reason, wasClean) {
  39330. debug('_close', this.transport, code, reason, wasClean, this.readyState);
  39331. var forceFail = false;
  39332. if (this._ir) {
  39333. forceFail = true;
  39334. this._ir.close();
  39335. this._ir = null;
  39336. }
  39337. if (this._transport) {
  39338. this._transport.close();
  39339. this._transport = null;
  39340. this.transport = null;
  39341. }
  39342. if (this.readyState === SockJS.CLOSED) {
  39343. throw new Error('InvalidStateError: SockJS has already been closed');
  39344. }
  39345. this.readyState = SockJS.CLOSING;
  39346. setTimeout(function() {
  39347. this.readyState = SockJS.CLOSED;
  39348. if (forceFail) {
  39349. this.dispatchEvent(new Event('error'));
  39350. }
  39351. var e = new CloseEvent('close');
  39352. e.wasClean = wasClean || false;
  39353. e.code = code || 1000;
  39354. e.reason = reason;
  39355. this.dispatchEvent(e);
  39356. this.onmessage = this.onclose = this.onerror = null;
  39357. debug('disconnected');
  39358. }.bind(this), 0);
  39359. };
  39360. // See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/
  39361. // and RFC 2988.
  39362. SockJS.prototype.countRTO = function(rtt) {
  39363. // In a local environment, when using IE8/9 and the `jsonp-polling`
  39364. // transport the time needed to establish a connection (the time that pass
  39365. // from the opening of the transport to the call of `_dispatchOpen`) is
  39366. // around 200msec (the lower bound used in the article above) and this
  39367. // causes spurious timeouts. For this reason we calculate a value slightly
  39368. // larger than that used in the article.
  39369. if (rtt > 100) {
  39370. return 4 * rtt; // rto > 400msec
  39371. }
  39372. return 300 + rtt; // 300msec < rto <= 400msec
  39373. };
  39374. module.exports = function(availableTransports) {
  39375. transports = transport(availableTransports);
  39376. __webpack_require__(/*! ./iframe-bootstrap */ "./node_modules/sockjs-client/lib/iframe-bootstrap.js")(SockJS, availableTransports);
  39377. return SockJS;
  39378. };
  39379. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  39380. /***/ }),
  39381. /***/ "./node_modules/sockjs-client/lib/shims.js":
  39382. /*!*************************************************!*\
  39383. !*** ./node_modules/sockjs-client/lib/shims.js ***!
  39384. \*************************************************/
  39385. /*! dynamic exports provided */
  39386. /*! all exports used */
  39387. /***/ (function(module, exports, __webpack_require__) {
  39388. "use strict";
  39389. /* eslint-disable */
  39390. /* jscs: disable */
  39391. // pulled specific shims from https://github.com/es-shims/es5-shim
  39392. var ArrayPrototype = Array.prototype;
  39393. var ObjectPrototype = Object.prototype;
  39394. var FunctionPrototype = Function.prototype;
  39395. var StringPrototype = String.prototype;
  39396. var array_slice = ArrayPrototype.slice;
  39397. var _toString = ObjectPrototype.toString;
  39398. var isFunction = function (val) {
  39399. return ObjectPrototype.toString.call(val) === '[object Function]';
  39400. };
  39401. var isArray = function isArray(obj) {
  39402. return _toString.call(obj) === '[object Array]';
  39403. };
  39404. var isString = function isString(obj) {
  39405. return _toString.call(obj) === '[object String]';
  39406. };
  39407. var supportsDescriptors = Object.defineProperty && (function () {
  39408. try {
  39409. Object.defineProperty({}, 'x', {});
  39410. return true;
  39411. } catch (e) { /* this is ES3 */
  39412. return false;
  39413. }
  39414. }());
  39415. // Define configurable, writable and non-enumerable props
  39416. // if they don't exist.
  39417. var defineProperty;
  39418. if (supportsDescriptors) {
  39419. defineProperty = function (object, name, method, forceAssign) {
  39420. if (!forceAssign && (name in object)) { return; }
  39421. Object.defineProperty(object, name, {
  39422. configurable: true,
  39423. enumerable: false,
  39424. writable: true,
  39425. value: method
  39426. });
  39427. };
  39428. } else {
  39429. defineProperty = function (object, name, method, forceAssign) {
  39430. if (!forceAssign && (name in object)) { return; }
  39431. object[name] = method;
  39432. };
  39433. }
  39434. var defineProperties = function (object, map, forceAssign) {
  39435. for (var name in map) {
  39436. if (ObjectPrototype.hasOwnProperty.call(map, name)) {
  39437. defineProperty(object, name, map[name], forceAssign);
  39438. }
  39439. }
  39440. };
  39441. var toObject = function (o) {
  39442. if (o == null) { // this matches both null and undefined
  39443. throw new TypeError("can't convert " + o + ' to object');
  39444. }
  39445. return Object(o);
  39446. };
  39447. //
  39448. // Util
  39449. // ======
  39450. //
  39451. // ES5 9.4
  39452. // http://es5.github.com/#x9.4
  39453. // http://jsperf.com/to-integer
  39454. function toInteger(num) {
  39455. var n = +num;
  39456. if (n !== n) { // isNaN
  39457. n = 0;
  39458. } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
  39459. n = (n > 0 || -1) * Math.floor(Math.abs(n));
  39460. }
  39461. return n;
  39462. }
  39463. function ToUint32(x) {
  39464. return x >>> 0;
  39465. }
  39466. //
  39467. // Function
  39468. // ========
  39469. //
  39470. // ES-5 15.3.4.5
  39471. // http://es5.github.com/#x15.3.4.5
  39472. function Empty() {}
  39473. defineProperties(FunctionPrototype, {
  39474. bind: function bind(that) { // .length is 1
  39475. // 1. Let Target be the this value.
  39476. var target = this;
  39477. // 2. If IsCallable(Target) is false, throw a TypeError exception.
  39478. if (!isFunction(target)) {
  39479. throw new TypeError('Function.prototype.bind called on incompatible ' + target);
  39480. }
  39481. // 3. Let A be a new (possibly empty) internal list of all of the
  39482. // argument values provided after thisArg (arg1, arg2 etc), in order.
  39483. // XXX slicedArgs will stand in for "A" if used
  39484. var args = array_slice.call(arguments, 1); // for normal call
  39485. // 4. Let F be a new native ECMAScript object.
  39486. // 11. Set the [[Prototype]] internal property of F to the standard
  39487. // built-in Function prototype object as specified in 15.3.3.1.
  39488. // 12. Set the [[Call]] internal property of F as described in
  39489. // 15.3.4.5.1.
  39490. // 13. Set the [[Construct]] internal property of F as described in
  39491. // 15.3.4.5.2.
  39492. // 14. Set the [[HasInstance]] internal property of F as described in
  39493. // 15.3.4.5.3.
  39494. var binder = function () {
  39495. if (this instanceof bound) {
  39496. // 15.3.4.5.2 [[Construct]]
  39497. // When the [[Construct]] internal method of a function object,
  39498. // F that was created using the bind function is called with a
  39499. // list of arguments ExtraArgs, the following steps are taken:
  39500. // 1. Let target be the value of F's [[TargetFunction]]
  39501. // internal property.
  39502. // 2. If target has no [[Construct]] internal method, a
  39503. // TypeError exception is thrown.
  39504. // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
  39505. // property.
  39506. // 4. Let args be a new list containing the same values as the
  39507. // list boundArgs in the same order followed by the same
  39508. // values as the list ExtraArgs in the same order.
  39509. // 5. Return the result of calling the [[Construct]] internal
  39510. // method of target providing args as the arguments.
  39511. var result = target.apply(
  39512. this,
  39513. args.concat(array_slice.call(arguments))
  39514. );
  39515. if (Object(result) === result) {
  39516. return result;
  39517. }
  39518. return this;
  39519. } else {
  39520. // 15.3.4.5.1 [[Call]]
  39521. // When the [[Call]] internal method of a function object, F,
  39522. // which was created using the bind function is called with a
  39523. // this value and a list of arguments ExtraArgs, the following
  39524. // steps are taken:
  39525. // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
  39526. // property.
  39527. // 2. Let boundThis be the value of F's [[BoundThis]] internal
  39528. // property.
  39529. // 3. Let target be the value of F's [[TargetFunction]] internal
  39530. // property.
  39531. // 4. Let args be a new list containing the same values as the
  39532. // list boundArgs in the same order followed by the same
  39533. // values as the list ExtraArgs in the same order.
  39534. // 5. Return the result of calling the [[Call]] internal method
  39535. // of target providing boundThis as the this value and
  39536. // providing args as the arguments.
  39537. // equiv: target.call(this, ...boundArgs, ...args)
  39538. return target.apply(
  39539. that,
  39540. args.concat(array_slice.call(arguments))
  39541. );
  39542. }
  39543. };
  39544. // 15. If the [[Class]] internal property of Target is "Function", then
  39545. // a. Let L be the length property of Target minus the length of A.
  39546. // b. Set the length own property of F to either 0 or L, whichever is
  39547. // larger.
  39548. // 16. Else set the length own property of F to 0.
  39549. var boundLength = Math.max(0, target.length - args.length);
  39550. // 17. Set the attributes of the length own property of F to the values
  39551. // specified in 15.3.5.1.
  39552. var boundArgs = [];
  39553. for (var i = 0; i < boundLength; i++) {
  39554. boundArgs.push('$' + i);
  39555. }
  39556. // XXX Build a dynamic function with desired amount of arguments is the only
  39557. // way to set the length property of a function.
  39558. // In environments where Content Security Policies enabled (Chrome extensions,
  39559. // for ex.) all use of eval or Function costructor throws an exception.
  39560. // However in all of these environments Function.prototype.bind exists
  39561. // and so this code will never be executed.
  39562. var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
  39563. if (target.prototype) {
  39564. Empty.prototype = target.prototype;
  39565. bound.prototype = new Empty();
  39566. // Clean up dangling references.
  39567. Empty.prototype = null;
  39568. }
  39569. // TODO
  39570. // 18. Set the [[Extensible]] internal property of F to true.
  39571. // TODO
  39572. // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
  39573. // 20. Call the [[DefineOwnProperty]] internal method of F with
  39574. // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
  39575. // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
  39576. // false.
  39577. // 21. Call the [[DefineOwnProperty]] internal method of F with
  39578. // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
  39579. // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
  39580. // and false.
  39581. // TODO
  39582. // NOTE Function objects created using Function.prototype.bind do not
  39583. // have a prototype property or the [[Code]], [[FormalParameters]], and
  39584. // [[Scope]] internal properties.
  39585. // XXX can't delete prototype in pure-js.
  39586. // 22. Return F.
  39587. return bound;
  39588. }
  39589. });
  39590. //
  39591. // Array
  39592. // =====
  39593. //
  39594. // ES5 15.4.3.2
  39595. // http://es5.github.com/#x15.4.3.2
  39596. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
  39597. defineProperties(Array, { isArray: isArray });
  39598. var boxedString = Object('a');
  39599. var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
  39600. var properlyBoxesContext = function properlyBoxed(method) {
  39601. // Check node 0.6.21 bug where third parameter is not boxed
  39602. var properlyBoxesNonStrict = true;
  39603. var properlyBoxesStrict = true;
  39604. if (method) {
  39605. method.call('foo', function (_, __, context) {
  39606. if (typeof context !== 'object') { properlyBoxesNonStrict = false; }
  39607. });
  39608. method.call([1], function () {
  39609. 'use strict';
  39610. properlyBoxesStrict = typeof this === 'string';
  39611. }, 'x');
  39612. }
  39613. return !!method && properlyBoxesNonStrict && properlyBoxesStrict;
  39614. };
  39615. defineProperties(ArrayPrototype, {
  39616. forEach: function forEach(fun /*, thisp*/) {
  39617. var object = toObject(this),
  39618. self = splitString && isString(this) ? this.split('') : object,
  39619. thisp = arguments[1],
  39620. i = -1,
  39621. length = self.length >>> 0;
  39622. // If no callback function or if callback is not a callable function
  39623. if (!isFunction(fun)) {
  39624. throw new TypeError(); // TODO message
  39625. }
  39626. while (++i < length) {
  39627. if (i in self) {
  39628. // Invoke the callback function with call, passing arguments:
  39629. // context, property value, property key, thisArg object
  39630. // context
  39631. fun.call(thisp, self[i], i, object);
  39632. }
  39633. }
  39634. }
  39635. }, !properlyBoxesContext(ArrayPrototype.forEach));
  39636. // ES5 15.4.4.14
  39637. // http://es5.github.com/#x15.4.4.14
  39638. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
  39639. var hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
  39640. defineProperties(ArrayPrototype, {
  39641. indexOf: function indexOf(sought /*, fromIndex */ ) {
  39642. var self = splitString && isString(this) ? this.split('') : toObject(this),
  39643. length = self.length >>> 0;
  39644. if (!length) {
  39645. return -1;
  39646. }
  39647. var i = 0;
  39648. if (arguments.length > 1) {
  39649. i = toInteger(arguments[1]);
  39650. }
  39651. // handle negative indices
  39652. i = i >= 0 ? i : Math.max(0, length + i);
  39653. for (; i < length; i++) {
  39654. if (i in self && self[i] === sought) {
  39655. return i;
  39656. }
  39657. }
  39658. return -1;
  39659. }
  39660. }, hasFirefox2IndexOfBug);
  39661. //
  39662. // String
  39663. // ======
  39664. //
  39665. // ES5 15.5.4.14
  39666. // http://es5.github.com/#x15.5.4.14
  39667. // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
  39668. // Many browsers do not split properly with regular expressions or they
  39669. // do not perform the split correctly under obscure conditions.
  39670. // See http://blog.stevenlevithan.com/archives/cross-browser-split
  39671. // I've tested in many browsers and this seems to cover the deviant ones:
  39672. // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
  39673. // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
  39674. // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
  39675. // [undefined, "t", undefined, "e", ...]
  39676. // ''.split(/.?/) should be [], not [""]
  39677. // '.'.split(/()()/) should be ["."], not ["", "", "."]
  39678. var string_split = StringPrototype.split;
  39679. if (
  39680. 'ab'.split(/(?:ab)*/).length !== 2 ||
  39681. '.'.split(/(.?)(.?)/).length !== 4 ||
  39682. 'tesst'.split(/(s)*/)[1] === 't' ||
  39683. 'test'.split(/(?:)/, -1).length !== 4 ||
  39684. ''.split(/.?/).length ||
  39685. '.'.split(/()()/).length > 1
  39686. ) {
  39687. (function () {
  39688. var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group
  39689. StringPrototype.split = function (separator, limit) {
  39690. var string = this;
  39691. if (separator === void 0 && limit === 0) {
  39692. return [];
  39693. }
  39694. // If `separator` is not a regex, use native split
  39695. if (_toString.call(separator) !== '[object RegExp]') {
  39696. return string_split.call(this, separator, limit);
  39697. }
  39698. var output = [],
  39699. flags = (separator.ignoreCase ? 'i' : '') +
  39700. (separator.multiline ? 'm' : '') +
  39701. (separator.extended ? 'x' : '') + // Proposed for ES6
  39702. (separator.sticky ? 'y' : ''), // Firefox 3+
  39703. lastLastIndex = 0,
  39704. // Make `global` and avoid `lastIndex` issues by working with a copy
  39705. separator2, match, lastIndex, lastLength;
  39706. separator = new RegExp(separator.source, flags + 'g');
  39707. string += ''; // Type-convert
  39708. if (!compliantExecNpcg) {
  39709. // Doesn't need flags gy, but they don't hurt
  39710. separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags);
  39711. }
  39712. /* Values for `limit`, per the spec:
  39713. * If undefined: 4294967295 // Math.pow(2, 32) - 1
  39714. * If 0, Infinity, or NaN: 0
  39715. * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
  39716. * If negative number: 4294967296 - Math.floor(Math.abs(limit))
  39717. * If other: Type-convert, then use the above rules
  39718. */
  39719. limit = limit === void 0 ?
  39720. -1 >>> 0 : // Math.pow(2, 32) - 1
  39721. ToUint32(limit);
  39722. while (match = separator.exec(string)) {
  39723. // `separator.lastIndex` is not reliable cross-browser
  39724. lastIndex = match.index + match[0].length;
  39725. if (lastIndex > lastLastIndex) {
  39726. output.push(string.slice(lastLastIndex, match.index));
  39727. // Fix browsers whose `exec` methods don't consistently return `undefined` for
  39728. // nonparticipating capturing groups
  39729. if (!compliantExecNpcg && match.length > 1) {
  39730. match[0].replace(separator2, function () {
  39731. for (var i = 1; i < arguments.length - 2; i++) {
  39732. if (arguments[i] === void 0) {
  39733. match[i] = void 0;
  39734. }
  39735. }
  39736. });
  39737. }
  39738. if (match.length > 1 && match.index < string.length) {
  39739. ArrayPrototype.push.apply(output, match.slice(1));
  39740. }
  39741. lastLength = match[0].length;
  39742. lastLastIndex = lastIndex;
  39743. if (output.length >= limit) {
  39744. break;
  39745. }
  39746. }
  39747. if (separator.lastIndex === match.index) {
  39748. separator.lastIndex++; // Avoid an infinite loop
  39749. }
  39750. }
  39751. if (lastLastIndex === string.length) {
  39752. if (lastLength || !separator.test('')) {
  39753. output.push('');
  39754. }
  39755. } else {
  39756. output.push(string.slice(lastLastIndex));
  39757. }
  39758. return output.length > limit ? output.slice(0, limit) : output;
  39759. };
  39760. }());
  39761. // [bugfix, chrome]
  39762. // If separator is undefined, then the result array contains just one String,
  39763. // which is the this value (converted to a String). If limit is not undefined,
  39764. // then the output array is truncated so that it contains no more than limit
  39765. // elements.
  39766. // "0".split(undefined, 0) -> []
  39767. } else if ('0'.split(void 0, 0).length) {
  39768. StringPrototype.split = function split(separator, limit) {
  39769. if (separator === void 0 && limit === 0) { return []; }
  39770. return string_split.call(this, separator, limit);
  39771. };
  39772. }
  39773. // ECMA-262, 3rd B.2.3
  39774. // Not an ECMAScript standard, although ECMAScript 3rd Edition has a
  39775. // non-normative section suggesting uniform semantics and it should be
  39776. // normalized across all browsers
  39777. // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
  39778. var string_substr = StringPrototype.substr;
  39779. var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
  39780. defineProperties(StringPrototype, {
  39781. substr: function substr(start, length) {
  39782. return string_substr.call(
  39783. this,
  39784. start < 0 ? ((start = this.length + start) < 0 ? 0 : start) : start,
  39785. length
  39786. );
  39787. }
  39788. }, hasNegativeSubstrBug);
  39789. /***/ }),
  39790. /***/ "./node_modules/sockjs-client/lib/transport-list.js":
  39791. /*!**********************************************************!*\
  39792. !*** ./node_modules/sockjs-client/lib/transport-list.js ***!
  39793. \**********************************************************/
  39794. /*! dynamic exports provided */
  39795. /*! all exports used */
  39796. /***/ (function(module, exports, __webpack_require__) {
  39797. "use strict";
  39798. module.exports = [
  39799. // streaming transports
  39800. __webpack_require__(/*! ./transport/websocket */ "./node_modules/sockjs-client/lib/transport/websocket.js")
  39801. , __webpack_require__(/*! ./transport/xhr-streaming */ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js")
  39802. , __webpack_require__(/*! ./transport/xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js")
  39803. , __webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js")
  39804. , __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js"))
  39805. // polling transports
  39806. , __webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js")
  39807. , __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js"))
  39808. , __webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js")
  39809. , __webpack_require__(/*! ./transport/xdr-polling */ "./node_modules/sockjs-client/lib/transport/xdr-polling.js")
  39810. , __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js"))
  39811. , __webpack_require__(/*! ./transport/jsonp-polling */ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js")
  39812. ];
  39813. /***/ }),
  39814. /***/ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js":
  39815. /*!**************************************************************************!*\
  39816. !*** ./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js ***!
  39817. \**************************************************************************/
  39818. /*! dynamic exports provided */
  39819. /*! all exports used */
  39820. /***/ (function(module, exports, __webpack_require__) {
  39821. "use strict";
  39822. /* WEBPACK VAR INJECTION */(function(global) {
  39823. var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  39824. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  39825. , utils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
  39826. , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  39827. , XHR = global.XMLHttpRequest
  39828. ;
  39829. var debug = function() {};
  39830. if (true) {
  39831. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:browser:xhr');
  39832. }
  39833. function AbstractXHRObject(method, url, payload, opts) {
  39834. debug(method, url);
  39835. var self = this;
  39836. EventEmitter.call(this);
  39837. setTimeout(function () {
  39838. self._start(method, url, payload, opts);
  39839. }, 0);
  39840. }
  39841. inherits(AbstractXHRObject, EventEmitter);
  39842. AbstractXHRObject.prototype._start = function(method, url, payload, opts) {
  39843. var self = this;
  39844. try {
  39845. this.xhr = new XHR();
  39846. } catch (x) {
  39847. // intentionally empty
  39848. }
  39849. if (!this.xhr) {
  39850. debug('no xhr');
  39851. this.emit('finish', 0, 'no xhr support');
  39852. this._cleanup();
  39853. return;
  39854. }
  39855. // several browsers cache POSTs
  39856. url = urlUtils.addQuery(url, 't=' + (+new Date()));
  39857. // Explorer tends to keep connection open, even after the
  39858. // tab gets closed: http://bugs.jquery.com/ticket/5280
  39859. this.unloadRef = utils.unloadAdd(function() {
  39860. debug('unload cleanup');
  39861. self._cleanup(true);
  39862. });
  39863. try {
  39864. this.xhr.open(method, url, true);
  39865. if (this.timeout && 'timeout' in this.xhr) {
  39866. this.xhr.timeout = this.timeout;
  39867. this.xhr.ontimeout = function() {
  39868. debug('xhr timeout');
  39869. self.emit('finish', 0, '');
  39870. self._cleanup(false);
  39871. };
  39872. }
  39873. } catch (e) {
  39874. debug('exception', e);
  39875. // IE raises an exception on wrong port.
  39876. this.emit('finish', 0, '');
  39877. this._cleanup(false);
  39878. return;
  39879. }
  39880. if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {
  39881. debug('withCredentials');
  39882. // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :
  39883. // "This never affects same-site requests."
  39884. this.xhr.withCredentials = 'true';
  39885. }
  39886. if (opts && opts.headers) {
  39887. for (var key in opts.headers) {
  39888. this.xhr.setRequestHeader(key, opts.headers[key]);
  39889. }
  39890. }
  39891. this.xhr.onreadystatechange = function() {
  39892. if (self.xhr) {
  39893. var x = self.xhr;
  39894. var text, status;
  39895. debug('readyState', x.readyState);
  39896. switch (x.readyState) {
  39897. case 3:
  39898. // IE doesn't like peeking into responseText or status
  39899. // on Microsoft.XMLHTTP and readystate=3
  39900. try {
  39901. status = x.status;
  39902. text = x.responseText;
  39903. } catch (e) {
  39904. // intentionally empty
  39905. }
  39906. debug('status', status);
  39907. // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  39908. if (status === 1223) {
  39909. status = 204;
  39910. }
  39911. // IE does return readystate == 3 for 404 answers.
  39912. if (status === 200 && text && text.length > 0) {
  39913. debug('chunk');
  39914. self.emit('chunk', status, text);
  39915. }
  39916. break;
  39917. case 4:
  39918. status = x.status;
  39919. debug('status', status);
  39920. // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  39921. if (status === 1223) {
  39922. status = 204;
  39923. }
  39924. // IE returns this for a bad port
  39925. // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx
  39926. if (status === 12005 || status === 12029) {
  39927. status = 0;
  39928. }
  39929. debug('finish', status, x.responseText);
  39930. self.emit('finish', status, x.responseText);
  39931. self._cleanup(false);
  39932. break;
  39933. }
  39934. }
  39935. };
  39936. try {
  39937. self.xhr.send(payload);
  39938. } catch (e) {
  39939. self.emit('finish', 0, '');
  39940. self._cleanup(false);
  39941. }
  39942. };
  39943. AbstractXHRObject.prototype._cleanup = function(abort) {
  39944. debug('cleanup');
  39945. if (!this.xhr) {
  39946. return;
  39947. }
  39948. this.removeAllListeners();
  39949. utils.unloadDel(this.unloadRef);
  39950. // IE needs this field to be a function
  39951. this.xhr.onreadystatechange = function() {};
  39952. if (this.xhr.ontimeout) {
  39953. this.xhr.ontimeout = null;
  39954. }
  39955. if (abort) {
  39956. try {
  39957. this.xhr.abort();
  39958. } catch (x) {
  39959. // intentionally empty
  39960. }
  39961. }
  39962. this.unloadRef = this.xhr = null;
  39963. };
  39964. AbstractXHRObject.prototype.close = function() {
  39965. debug('close');
  39966. this._cleanup(true);
  39967. };
  39968. AbstractXHRObject.enabled = !!XHR;
  39969. // override XMLHttpRequest for IE6/7
  39970. // obfuscate to avoid firewalls
  39971. var axo = ['Active'].concat('Object').join('X');
  39972. if (!AbstractXHRObject.enabled && (axo in global)) {
  39973. debug('overriding xmlhttprequest');
  39974. XHR = function() {
  39975. try {
  39976. return new global[axo]('Microsoft.XMLHTTP');
  39977. } catch (e) {
  39978. return null;
  39979. }
  39980. };
  39981. AbstractXHRObject.enabled = !!new XHR();
  39982. }
  39983. var cors = false;
  39984. try {
  39985. cors = 'withCredentials' in new XHR();
  39986. } catch (ignored) {
  39987. // intentionally empty
  39988. }
  39989. AbstractXHRObject.supportsCORS = cors;
  39990. module.exports = AbstractXHRObject;
  39991. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  39992. /***/ }),
  39993. /***/ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js":
  39994. /*!*************************************************************************!*\
  39995. !*** ./node_modules/sockjs-client/lib/transport/browser/eventsource.js ***!
  39996. \*************************************************************************/
  39997. /*! dynamic exports provided */
  39998. /*! all exports used */
  39999. /***/ (function(module, exports, __webpack_require__) {
  40000. /* WEBPACK VAR INJECTION */(function(global) {module.exports = global.EventSource;
  40001. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  40002. /***/ }),
  40003. /***/ "./node_modules/sockjs-client/lib/transport/browser/websocket.js":
  40004. /*!***********************************************************************!*\
  40005. !*** ./node_modules/sockjs-client/lib/transport/browser/websocket.js ***!
  40006. \***********************************************************************/
  40007. /*! dynamic exports provided */
  40008. /*! all exports used */
  40009. /***/ (function(module, exports, __webpack_require__) {
  40010. "use strict";
  40011. /* WEBPACK VAR INJECTION */(function(global) {
  40012. var Driver = global.WebSocket || global.MozWebSocket;
  40013. if (Driver) {
  40014. module.exports = function WebSocketBrowserDriver(url) {
  40015. return new Driver(url);
  40016. };
  40017. } else {
  40018. module.exports = undefined;
  40019. }
  40020. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  40021. /***/ }),
  40022. /***/ "./node_modules/sockjs-client/lib/transport/eventsource.js":
  40023. /*!*****************************************************************!*\
  40024. !*** ./node_modules/sockjs-client/lib/transport/eventsource.js ***!
  40025. \*****************************************************************/
  40026. /*! dynamic exports provided */
  40027. /*! all exports used */
  40028. /***/ (function(module, exports, __webpack_require__) {
  40029. "use strict";
  40030. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40031. , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
  40032. , EventSourceReceiver = __webpack_require__(/*! ./receiver/eventsource */ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js")
  40033. , XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
  40034. , EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js")
  40035. ;
  40036. function EventSourceTransport(transUrl) {
  40037. if (!EventSourceTransport.enabled()) {
  40038. throw new Error('Transport created when disabled');
  40039. }
  40040. AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);
  40041. }
  40042. inherits(EventSourceTransport, AjaxBasedTransport);
  40043. EventSourceTransport.enabled = function() {
  40044. return !!EventSourceDriver;
  40045. };
  40046. EventSourceTransport.transportName = 'eventsource';
  40047. EventSourceTransport.roundTrips = 2;
  40048. module.exports = EventSourceTransport;
  40049. /***/ }),
  40050. /***/ "./node_modules/sockjs-client/lib/transport/htmlfile.js":
  40051. /*!**************************************************************!*\
  40052. !*** ./node_modules/sockjs-client/lib/transport/htmlfile.js ***!
  40053. \**************************************************************/
  40054. /*! dynamic exports provided */
  40055. /*! all exports used */
  40056. /***/ (function(module, exports, __webpack_require__) {
  40057. "use strict";
  40058. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40059. , HtmlfileReceiver = __webpack_require__(/*! ./receiver/htmlfile */ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js")
  40060. , XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
  40061. , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
  40062. ;
  40063. function HtmlFileTransport(transUrl) {
  40064. if (!HtmlfileReceiver.enabled) {
  40065. throw new Error('Transport created when disabled');
  40066. }
  40067. AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
  40068. }
  40069. inherits(HtmlFileTransport, AjaxBasedTransport);
  40070. HtmlFileTransport.enabled = function(info) {
  40071. return HtmlfileReceiver.enabled && info.sameOrigin;
  40072. };
  40073. HtmlFileTransport.transportName = 'htmlfile';
  40074. HtmlFileTransport.roundTrips = 2;
  40075. module.exports = HtmlFileTransport;
  40076. /***/ }),
  40077. /***/ "./node_modules/sockjs-client/lib/transport/iframe.js":
  40078. /*!************************************************************!*\
  40079. !*** ./node_modules/sockjs-client/lib/transport/iframe.js ***!
  40080. \************************************************************/
  40081. /*! dynamic exports provided */
  40082. /*! all exports used */
  40083. /***/ (function(module, exports, __webpack_require__) {
  40084. "use strict";
  40085. // Few cool transports do work only for same-origin. In order to make
  40086. // them work cross-domain we shall use iframe, served from the
  40087. // remote domain. New browsers have capabilities to communicate with
  40088. // cross domain iframe using postMessage(). In IE it was implemented
  40089. // from IE 8+, but of course, IE got some details wrong:
  40090. // http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx
  40091. // http://stevesouders.com/misc/test-postmessage.php
  40092. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40093. , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  40094. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  40095. , version = __webpack_require__(/*! ../version */ "./node_modules/sockjs-client/lib/version.js")
  40096. , urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  40097. , iframeUtils = __webpack_require__(/*! ../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
  40098. , eventUtils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
  40099. , random = __webpack_require__(/*! ../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
  40100. ;
  40101. var debug = function() {};
  40102. if (true) {
  40103. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:transport:iframe');
  40104. }
  40105. function IframeTransport(transport, transUrl, baseUrl) {
  40106. if (!IframeTransport.enabled()) {
  40107. throw new Error('Transport created when disabled');
  40108. }
  40109. EventEmitter.call(this);
  40110. var self = this;
  40111. this.origin = urlUtils.getOrigin(baseUrl);
  40112. this.baseUrl = baseUrl;
  40113. this.transUrl = transUrl;
  40114. this.transport = transport;
  40115. this.windowId = random.string(8);
  40116. var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;
  40117. debug(transport, transUrl, iframeUrl);
  40118. this.iframeObj = iframeUtils.createIframe(iframeUrl, function(r) {
  40119. debug('err callback');
  40120. self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');
  40121. self.close();
  40122. });
  40123. this.onmessageCallback = this._message.bind(this);
  40124. eventUtils.attachEvent('message', this.onmessageCallback);
  40125. }
  40126. inherits(IframeTransport, EventEmitter);
  40127. IframeTransport.prototype.close = function() {
  40128. debug('close');
  40129. this.removeAllListeners();
  40130. if (this.iframeObj) {
  40131. eventUtils.detachEvent('message', this.onmessageCallback);
  40132. try {
  40133. // When the iframe is not loaded, IE raises an exception
  40134. // on 'contentWindow'.
  40135. this.postMessage('c');
  40136. } catch (x) {
  40137. // intentionally empty
  40138. }
  40139. this.iframeObj.cleanup();
  40140. this.iframeObj = null;
  40141. this.onmessageCallback = this.iframeObj = null;
  40142. }
  40143. };
  40144. IframeTransport.prototype._message = function(e) {
  40145. debug('message', e.data);
  40146. if (!urlUtils.isOriginEqual(e.origin, this.origin)) {
  40147. debug('not same origin', e.origin, this.origin);
  40148. return;
  40149. }
  40150. var iframeMessage;
  40151. try {
  40152. iframeMessage = JSON3.parse(e.data);
  40153. } catch (ignored) {
  40154. debug('bad json', e.data);
  40155. return;
  40156. }
  40157. if (iframeMessage.windowId !== this.windowId) {
  40158. debug('mismatched window id', iframeMessage.windowId, this.windowId);
  40159. return;
  40160. }
  40161. switch (iframeMessage.type) {
  40162. case 's':
  40163. this.iframeObj.loaded();
  40164. // window global dependency
  40165. this.postMessage('s', JSON3.stringify([
  40166. version
  40167. , this.transport
  40168. , this.transUrl
  40169. , this.baseUrl
  40170. ]));
  40171. break;
  40172. case 't':
  40173. this.emit('message', iframeMessage.data);
  40174. break;
  40175. case 'c':
  40176. var cdata;
  40177. try {
  40178. cdata = JSON3.parse(iframeMessage.data);
  40179. } catch (ignored) {
  40180. debug('bad json', iframeMessage.data);
  40181. return;
  40182. }
  40183. this.emit('close', cdata[0], cdata[1]);
  40184. this.close();
  40185. break;
  40186. }
  40187. };
  40188. IframeTransport.prototype.postMessage = function(type, data) {
  40189. debug('postMessage', type, data);
  40190. this.iframeObj.post(JSON3.stringify({
  40191. windowId: this.windowId
  40192. , type: type
  40193. , data: data || ''
  40194. }), this.origin);
  40195. };
  40196. IframeTransport.prototype.send = function(message) {
  40197. debug('send', message);
  40198. this.postMessage('m', message);
  40199. };
  40200. IframeTransport.enabled = function() {
  40201. return iframeUtils.iframeEnabled;
  40202. };
  40203. IframeTransport.transportName = 'iframe';
  40204. IframeTransport.roundTrips = 2;
  40205. module.exports = IframeTransport;
  40206. /***/ }),
  40207. /***/ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js":
  40208. /*!*******************************************************************!*\
  40209. !*** ./node_modules/sockjs-client/lib/transport/jsonp-polling.js ***!
  40210. \*******************************************************************/
  40211. /*! dynamic exports provided */
  40212. /*! all exports used */
  40213. /***/ (function(module, exports, __webpack_require__) {
  40214. "use strict";
  40215. /* WEBPACK VAR INJECTION */(function(global) {
  40216. // The simplest and most robust transport, using the well-know cross
  40217. // domain hack - JSONP. This transport is quite inefficient - one
  40218. // message could use up to one http request. But at least it works almost
  40219. // everywhere.
  40220. // Known limitations:
  40221. // o you will get a spinning cursor
  40222. // o for Konqueror a dumb timer is needed to detect errors
  40223. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40224. , SenderReceiver = __webpack_require__(/*! ./lib/sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js")
  40225. , JsonpReceiver = __webpack_require__(/*! ./receiver/jsonp */ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js")
  40226. , jsonpSender = __webpack_require__(/*! ./sender/jsonp */ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js")
  40227. ;
  40228. function JsonPTransport(transUrl) {
  40229. if (!JsonPTransport.enabled()) {
  40230. throw new Error('Transport created when disabled');
  40231. }
  40232. SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);
  40233. }
  40234. inherits(JsonPTransport, SenderReceiver);
  40235. JsonPTransport.enabled = function() {
  40236. return !!global.document;
  40237. };
  40238. JsonPTransport.transportName = 'jsonp-polling';
  40239. JsonPTransport.roundTrips = 1;
  40240. JsonPTransport.needBody = true;
  40241. module.exports = JsonPTransport;
  40242. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  40243. /***/ }),
  40244. /***/ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js":
  40245. /*!********************************************************************!*\
  40246. !*** ./node_modules/sockjs-client/lib/transport/lib/ajax-based.js ***!
  40247. \********************************************************************/
  40248. /*! dynamic exports provided */
  40249. /*! all exports used */
  40250. /***/ (function(module, exports, __webpack_require__) {
  40251. "use strict";
  40252. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40253. , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  40254. , SenderReceiver = __webpack_require__(/*! ./sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js")
  40255. ;
  40256. var debug = function() {};
  40257. if (true) {
  40258. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:ajax-based');
  40259. }
  40260. function createAjaxSender(AjaxObject) {
  40261. return function(url, payload, callback) {
  40262. debug('create ajax sender', url, payload);
  40263. var opt = {};
  40264. if (typeof payload === 'string') {
  40265. opt.headers = {'Content-type': 'text/plain'};
  40266. }
  40267. var ajaxUrl = urlUtils.addPath(url, '/xhr_send');
  40268. var xo = new AjaxObject('POST', ajaxUrl, payload, opt);
  40269. xo.once('finish', function(status) {
  40270. debug('finish', status);
  40271. xo = null;
  40272. if (status !== 200 && status !== 204) {
  40273. return callback(new Error('http status ' + status));
  40274. }
  40275. callback();
  40276. });
  40277. return function() {
  40278. debug('abort');
  40279. xo.close();
  40280. xo = null;
  40281. var err = new Error('Aborted');
  40282. err.code = 1000;
  40283. callback(err);
  40284. };
  40285. };
  40286. }
  40287. function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {
  40288. SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);
  40289. }
  40290. inherits(AjaxBasedTransport, SenderReceiver);
  40291. module.exports = AjaxBasedTransport;
  40292. /***/ }),
  40293. /***/ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js":
  40294. /*!*************************************************************************!*\
  40295. !*** ./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js ***!
  40296. \*************************************************************************/
  40297. /*! dynamic exports provided */
  40298. /*! all exports used */
  40299. /***/ (function(module, exports, __webpack_require__) {
  40300. "use strict";
  40301. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40302. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  40303. ;
  40304. var debug = function() {};
  40305. if (true) {
  40306. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:buffered-sender');
  40307. }
  40308. function BufferedSender(url, sender) {
  40309. debug(url);
  40310. EventEmitter.call(this);
  40311. this.sendBuffer = [];
  40312. this.sender = sender;
  40313. this.url = url;
  40314. }
  40315. inherits(BufferedSender, EventEmitter);
  40316. BufferedSender.prototype.send = function(message) {
  40317. debug('send', message);
  40318. this.sendBuffer.push(message);
  40319. if (!this.sendStop) {
  40320. this.sendSchedule();
  40321. }
  40322. };
  40323. // For polling transports in a situation when in the message callback,
  40324. // new message is being send. If the sending connection was started
  40325. // before receiving one, it is possible to saturate the network and
  40326. // timeout due to the lack of receiving socket. To avoid that we delay
  40327. // sending messages by some small time, in order to let receiving
  40328. // connection be started beforehand. This is only a halfmeasure and
  40329. // does not fix the big problem, but it does make the tests go more
  40330. // stable on slow networks.
  40331. BufferedSender.prototype.sendScheduleWait = function() {
  40332. debug('sendScheduleWait');
  40333. var self = this;
  40334. var tref;
  40335. this.sendStop = function() {
  40336. debug('sendStop');
  40337. self.sendStop = null;
  40338. clearTimeout(tref);
  40339. };
  40340. tref = setTimeout(function() {
  40341. debug('timeout');
  40342. self.sendStop = null;
  40343. self.sendSchedule();
  40344. }, 25);
  40345. };
  40346. BufferedSender.prototype.sendSchedule = function() {
  40347. debug('sendSchedule', this.sendBuffer.length);
  40348. var self = this;
  40349. if (this.sendBuffer.length > 0) {
  40350. var payload = '[' + this.sendBuffer.join(',') + ']';
  40351. this.sendStop = this.sender(this.url, payload, function(err) {
  40352. self.sendStop = null;
  40353. if (err) {
  40354. debug('error', err);
  40355. self.emit('close', err.code || 1006, 'Sending error: ' + err);
  40356. self.close();
  40357. } else {
  40358. self.sendScheduleWait();
  40359. }
  40360. });
  40361. this.sendBuffer = [];
  40362. }
  40363. };
  40364. BufferedSender.prototype._cleanup = function() {
  40365. debug('_cleanup');
  40366. this.removeAllListeners();
  40367. };
  40368. BufferedSender.prototype.close = function() {
  40369. debug('close');
  40370. this._cleanup();
  40371. if (this.sendStop) {
  40372. this.sendStop();
  40373. this.sendStop = null;
  40374. }
  40375. };
  40376. module.exports = BufferedSender;
  40377. /***/ }),
  40378. /***/ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js":
  40379. /*!*********************************************************************!*\
  40380. !*** ./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js ***!
  40381. \*********************************************************************/
  40382. /*! dynamic exports provided */
  40383. /*! all exports used */
  40384. /***/ (function(module, exports, __webpack_require__) {
  40385. "use strict";
  40386. /* WEBPACK VAR INJECTION */(function(global) {
  40387. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40388. , IframeTransport = __webpack_require__(/*! ../iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js")
  40389. , objectUtils = __webpack_require__(/*! ../../utils/object */ "./node_modules/sockjs-client/lib/utils/object.js")
  40390. ;
  40391. module.exports = function(transport) {
  40392. function IframeWrapTransport(transUrl, baseUrl) {
  40393. IframeTransport.call(this, transport.transportName, transUrl, baseUrl);
  40394. }
  40395. inherits(IframeWrapTransport, IframeTransport);
  40396. IframeWrapTransport.enabled = function(url, info) {
  40397. if (!global.document) {
  40398. return false;
  40399. }
  40400. var iframeInfo = objectUtils.extend({}, info);
  40401. iframeInfo.sameOrigin = true;
  40402. return transport.enabled(iframeInfo) && IframeTransport.enabled();
  40403. };
  40404. IframeWrapTransport.transportName = 'iframe-' + transport.transportName;
  40405. IframeWrapTransport.needBody = true;
  40406. IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)
  40407. IframeWrapTransport.facadeTransport = transport;
  40408. return IframeWrapTransport;
  40409. };
  40410. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  40411. /***/ }),
  40412. /***/ "./node_modules/sockjs-client/lib/transport/lib/polling.js":
  40413. /*!*****************************************************************!*\
  40414. !*** ./node_modules/sockjs-client/lib/transport/lib/polling.js ***!
  40415. \*****************************************************************/
  40416. /*! dynamic exports provided */
  40417. /*! all exports used */
  40418. /***/ (function(module, exports, __webpack_require__) {
  40419. "use strict";
  40420. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40421. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  40422. ;
  40423. var debug = function() {};
  40424. if (true) {
  40425. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:polling');
  40426. }
  40427. function Polling(Receiver, receiveUrl, AjaxObject) {
  40428. debug(receiveUrl);
  40429. EventEmitter.call(this);
  40430. this.Receiver = Receiver;
  40431. this.receiveUrl = receiveUrl;
  40432. this.AjaxObject = AjaxObject;
  40433. this._scheduleReceiver();
  40434. }
  40435. inherits(Polling, EventEmitter);
  40436. Polling.prototype._scheduleReceiver = function() {
  40437. debug('_scheduleReceiver');
  40438. var self = this;
  40439. var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
  40440. poll.on('message', function(msg) {
  40441. debug('message', msg);
  40442. self.emit('message', msg);
  40443. });
  40444. poll.once('close', function(code, reason) {
  40445. debug('close', code, reason, self.pollIsClosing);
  40446. self.poll = poll = null;
  40447. if (!self.pollIsClosing) {
  40448. if (reason === 'network') {
  40449. self._scheduleReceiver();
  40450. } else {
  40451. self.emit('close', code || 1006, reason);
  40452. self.removeAllListeners();
  40453. }
  40454. }
  40455. });
  40456. };
  40457. Polling.prototype.abort = function() {
  40458. debug('abort');
  40459. this.removeAllListeners();
  40460. this.pollIsClosing = true;
  40461. if (this.poll) {
  40462. this.poll.abort();
  40463. }
  40464. };
  40465. module.exports = Polling;
  40466. /***/ }),
  40467. /***/ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js":
  40468. /*!*************************************************************************!*\
  40469. !*** ./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js ***!
  40470. \*************************************************************************/
  40471. /*! dynamic exports provided */
  40472. /*! all exports used */
  40473. /***/ (function(module, exports, __webpack_require__) {
  40474. "use strict";
  40475. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40476. , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  40477. , BufferedSender = __webpack_require__(/*! ./buffered-sender */ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js")
  40478. , Polling = __webpack_require__(/*! ./polling */ "./node_modules/sockjs-client/lib/transport/lib/polling.js")
  40479. ;
  40480. var debug = function() {};
  40481. if (true) {
  40482. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:sender-receiver');
  40483. }
  40484. function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {
  40485. var pollUrl = urlUtils.addPath(transUrl, urlSuffix);
  40486. debug(pollUrl);
  40487. var self = this;
  40488. BufferedSender.call(this, transUrl, senderFunc);
  40489. this.poll = new Polling(Receiver, pollUrl, AjaxObject);
  40490. this.poll.on('message', function(msg) {
  40491. debug('poll message', msg);
  40492. self.emit('message', msg);
  40493. });
  40494. this.poll.once('close', function(code, reason) {
  40495. debug('poll close', code, reason);
  40496. self.poll = null;
  40497. self.emit('close', code, reason);
  40498. self.close();
  40499. });
  40500. }
  40501. inherits(SenderReceiver, BufferedSender);
  40502. SenderReceiver.prototype.close = function() {
  40503. BufferedSender.prototype.close.call(this);
  40504. debug('close');
  40505. this.removeAllListeners();
  40506. if (this.poll) {
  40507. this.poll.abort();
  40508. this.poll = null;
  40509. }
  40510. };
  40511. module.exports = SenderReceiver;
  40512. /***/ }),
  40513. /***/ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js":
  40514. /*!**************************************************************************!*\
  40515. !*** ./node_modules/sockjs-client/lib/transport/receiver/eventsource.js ***!
  40516. \**************************************************************************/
  40517. /*! dynamic exports provided */
  40518. /*! all exports used */
  40519. /***/ (function(module, exports, __webpack_require__) {
  40520. "use strict";
  40521. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40522. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  40523. , EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js")
  40524. ;
  40525. var debug = function() {};
  40526. if (true) {
  40527. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:eventsource');
  40528. }
  40529. function EventSourceReceiver(url) {
  40530. debug(url);
  40531. EventEmitter.call(this);
  40532. var self = this;
  40533. var es = this.es = new EventSourceDriver(url);
  40534. es.onmessage = function(e) {
  40535. debug('message', e.data);
  40536. self.emit('message', decodeURI(e.data));
  40537. };
  40538. es.onerror = function(e) {
  40539. debug('error', es.readyState, e);
  40540. // ES on reconnection has readyState = 0 or 1.
  40541. // on network error it's CLOSED = 2
  40542. var reason = (es.readyState !== 2 ? 'network' : 'permanent');
  40543. self._cleanup();
  40544. self._close(reason);
  40545. };
  40546. }
  40547. inherits(EventSourceReceiver, EventEmitter);
  40548. EventSourceReceiver.prototype.abort = function() {
  40549. debug('abort');
  40550. this._cleanup();
  40551. this._close('user');
  40552. };
  40553. EventSourceReceiver.prototype._cleanup = function() {
  40554. debug('cleanup');
  40555. var es = this.es;
  40556. if (es) {
  40557. es.onmessage = es.onerror = null;
  40558. es.close();
  40559. this.es = null;
  40560. }
  40561. };
  40562. EventSourceReceiver.prototype._close = function(reason) {
  40563. debug('close', reason);
  40564. var self = this;
  40565. // Safari and chrome < 15 crash if we close window before
  40566. // waiting for ES cleanup. See:
  40567. // https://code.google.com/p/chromium/issues/detail?id=89155
  40568. setTimeout(function() {
  40569. self.emit('close', null, reason);
  40570. self.removeAllListeners();
  40571. }, 200);
  40572. };
  40573. module.exports = EventSourceReceiver;
  40574. /***/ }),
  40575. /***/ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js":
  40576. /*!***********************************************************************!*\
  40577. !*** ./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js ***!
  40578. \***********************************************************************/
  40579. /*! dynamic exports provided */
  40580. /*! all exports used */
  40581. /***/ (function(module, exports, __webpack_require__) {
  40582. "use strict";
  40583. /* WEBPACK VAR INJECTION */(function(global) {
  40584. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40585. , iframeUtils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
  40586. , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  40587. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  40588. , random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
  40589. ;
  40590. var debug = function() {};
  40591. if (true) {
  40592. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:htmlfile');
  40593. }
  40594. function HtmlfileReceiver(url) {
  40595. debug(url);
  40596. EventEmitter.call(this);
  40597. var self = this;
  40598. iframeUtils.polluteGlobalNamespace();
  40599. this.id = 'a' + random.string(6);
  40600. url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));
  40601. debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);
  40602. var constructFunc = HtmlfileReceiver.htmlfileEnabled ?
  40603. iframeUtils.createHtmlfile : iframeUtils.createIframe;
  40604. global[iframeUtils.WPrefix][this.id] = {
  40605. start: function() {
  40606. debug('start');
  40607. self.iframeObj.loaded();
  40608. }
  40609. , message: function(data) {
  40610. debug('message', data);
  40611. self.emit('message', data);
  40612. }
  40613. , stop: function() {
  40614. debug('stop');
  40615. self._cleanup();
  40616. self._close('network');
  40617. }
  40618. };
  40619. this.iframeObj = constructFunc(url, function() {
  40620. debug('callback');
  40621. self._cleanup();
  40622. self._close('permanent');
  40623. });
  40624. }
  40625. inherits(HtmlfileReceiver, EventEmitter);
  40626. HtmlfileReceiver.prototype.abort = function() {
  40627. debug('abort');
  40628. this._cleanup();
  40629. this._close('user');
  40630. };
  40631. HtmlfileReceiver.prototype._cleanup = function() {
  40632. debug('_cleanup');
  40633. if (this.iframeObj) {
  40634. this.iframeObj.cleanup();
  40635. this.iframeObj = null;
  40636. }
  40637. delete global[iframeUtils.WPrefix][this.id];
  40638. };
  40639. HtmlfileReceiver.prototype._close = function(reason) {
  40640. debug('_close', reason);
  40641. this.emit('close', null, reason);
  40642. this.removeAllListeners();
  40643. };
  40644. HtmlfileReceiver.htmlfileEnabled = false;
  40645. // obfuscate to avoid firewalls
  40646. var axo = ['Active'].concat('Object').join('X');
  40647. if (axo in global) {
  40648. try {
  40649. HtmlfileReceiver.htmlfileEnabled = !!new global[axo]('htmlfile');
  40650. } catch (x) {
  40651. // intentionally empty
  40652. }
  40653. }
  40654. HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;
  40655. module.exports = HtmlfileReceiver;
  40656. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  40657. /***/ }),
  40658. /***/ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js":
  40659. /*!********************************************************************!*\
  40660. !*** ./node_modules/sockjs-client/lib/transport/receiver/jsonp.js ***!
  40661. \********************************************************************/
  40662. /*! dynamic exports provided */
  40663. /*! all exports used */
  40664. /***/ (function(module, exports, __webpack_require__) {
  40665. "use strict";
  40666. /* WEBPACK VAR INJECTION */(function(global) {
  40667. var utils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
  40668. , random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
  40669. , browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
  40670. , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  40671. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40672. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  40673. ;
  40674. var debug = function() {};
  40675. if (true) {
  40676. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:jsonp');
  40677. }
  40678. function JsonpReceiver(url) {
  40679. debug(url);
  40680. var self = this;
  40681. EventEmitter.call(this);
  40682. utils.polluteGlobalNamespace();
  40683. this.id = 'a' + random.string(6);
  40684. var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));
  40685. global[utils.WPrefix][this.id] = this._callback.bind(this);
  40686. this._createScript(urlWithId);
  40687. // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.
  40688. this.timeoutId = setTimeout(function() {
  40689. debug('timeout');
  40690. self._abort(new Error('JSONP script loaded abnormally (timeout)'));
  40691. }, JsonpReceiver.timeout);
  40692. }
  40693. inherits(JsonpReceiver, EventEmitter);
  40694. JsonpReceiver.prototype.abort = function() {
  40695. debug('abort');
  40696. if (global[utils.WPrefix][this.id]) {
  40697. var err = new Error('JSONP user aborted read');
  40698. err.code = 1000;
  40699. this._abort(err);
  40700. }
  40701. };
  40702. JsonpReceiver.timeout = 35000;
  40703. JsonpReceiver.scriptErrorTimeout = 1000;
  40704. JsonpReceiver.prototype._callback = function(data) {
  40705. debug('_callback', data);
  40706. this._cleanup();
  40707. if (this.aborting) {
  40708. return;
  40709. }
  40710. if (data) {
  40711. debug('message', data);
  40712. this.emit('message', data);
  40713. }
  40714. this.emit('close', null, 'network');
  40715. this.removeAllListeners();
  40716. };
  40717. JsonpReceiver.prototype._abort = function(err) {
  40718. debug('_abort', err);
  40719. this._cleanup();
  40720. this.aborting = true;
  40721. this.emit('close', err.code, err.message);
  40722. this.removeAllListeners();
  40723. };
  40724. JsonpReceiver.prototype._cleanup = function() {
  40725. debug('_cleanup');
  40726. clearTimeout(this.timeoutId);
  40727. if (this.script2) {
  40728. this.script2.parentNode.removeChild(this.script2);
  40729. this.script2 = null;
  40730. }
  40731. if (this.script) {
  40732. var script = this.script;
  40733. // Unfortunately, you can't really abort script loading of
  40734. // the script.
  40735. script.parentNode.removeChild(script);
  40736. script.onreadystatechange = script.onerror =
  40737. script.onload = script.onclick = null;
  40738. this.script = null;
  40739. }
  40740. delete global[utils.WPrefix][this.id];
  40741. };
  40742. JsonpReceiver.prototype._scriptError = function() {
  40743. debug('_scriptError');
  40744. var self = this;
  40745. if (this.errorTimer) {
  40746. return;
  40747. }
  40748. this.errorTimer = setTimeout(function() {
  40749. if (!self.loadedOkay) {
  40750. self._abort(new Error('JSONP script loaded abnormally (onerror)'));
  40751. }
  40752. }, JsonpReceiver.scriptErrorTimeout);
  40753. };
  40754. JsonpReceiver.prototype._createScript = function(url) {
  40755. debug('_createScript', url);
  40756. var self = this;
  40757. var script = this.script = global.document.createElement('script');
  40758. var script2; // Opera synchronous load trick.
  40759. script.id = 'a' + random.string(8);
  40760. script.src = url;
  40761. script.type = 'text/javascript';
  40762. script.charset = 'UTF-8';
  40763. script.onerror = this._scriptError.bind(this);
  40764. script.onload = function() {
  40765. debug('onload');
  40766. self._abort(new Error('JSONP script loaded abnormally (onload)'));
  40767. };
  40768. // IE9 fires 'error' event after onreadystatechange or before, in random order.
  40769. // Use loadedOkay to determine if actually errored
  40770. script.onreadystatechange = function() {
  40771. debug('onreadystatechange', script.readyState);
  40772. if (/loaded|closed/.test(script.readyState)) {
  40773. if (script && script.htmlFor && script.onclick) {
  40774. self.loadedOkay = true;
  40775. try {
  40776. // In IE, actually execute the script.
  40777. script.onclick();
  40778. } catch (x) {
  40779. // intentionally empty
  40780. }
  40781. }
  40782. if (script) {
  40783. self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));
  40784. }
  40785. }
  40786. };
  40787. // IE: event/htmlFor/onclick trick.
  40788. // One can't rely on proper order for onreadystatechange. In order to
  40789. // make sure, set a 'htmlFor' and 'event' properties, so that
  40790. // script code will be installed as 'onclick' handler for the
  40791. // script object. Later, onreadystatechange, manually execute this
  40792. // code. FF and Chrome doesn't work with 'event' and 'htmlFor'
  40793. // set. For reference see:
  40794. // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html
  40795. // Also, read on that about script ordering:
  40796. // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
  40797. if (typeof script.async === 'undefined' && global.document.attachEvent) {
  40798. // According to mozilla docs, in recent browsers script.async defaults
  40799. // to 'true', so we may use it to detect a good browser:
  40800. // https://developer.mozilla.org/en/HTML/Element/script
  40801. if (!browser.isOpera()) {
  40802. // Naively assume we're in IE
  40803. try {
  40804. script.htmlFor = script.id;
  40805. script.event = 'onclick';
  40806. } catch (x) {
  40807. // intentionally empty
  40808. }
  40809. script.async = true;
  40810. } else {
  40811. // Opera, second sync script hack
  40812. script2 = this.script2 = global.document.createElement('script');
  40813. script2.text = "try{var a = document.getElementById('" + script.id + "'); if(a)a.onerror();}catch(x){};";
  40814. script.async = script2.async = false;
  40815. }
  40816. }
  40817. if (typeof script.async !== 'undefined') {
  40818. script.async = true;
  40819. }
  40820. var head = global.document.getElementsByTagName('head')[0];
  40821. head.insertBefore(script, head.firstChild);
  40822. if (script2) {
  40823. head.insertBefore(script2, head.firstChild);
  40824. }
  40825. };
  40826. module.exports = JsonpReceiver;
  40827. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  40828. /***/ }),
  40829. /***/ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js":
  40830. /*!******************************************************************!*\
  40831. !*** ./node_modules/sockjs-client/lib/transport/receiver/xhr.js ***!
  40832. \******************************************************************/
  40833. /*! dynamic exports provided */
  40834. /*! all exports used */
  40835. /***/ (function(module, exports, __webpack_require__) {
  40836. "use strict";
  40837. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  40838. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  40839. ;
  40840. var debug = function() {};
  40841. if (true) {
  40842. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:xhr');
  40843. }
  40844. function XhrReceiver(url, AjaxObject) {
  40845. debug(url);
  40846. EventEmitter.call(this);
  40847. var self = this;
  40848. this.bufferPosition = 0;
  40849. this.xo = new AjaxObject('POST', url, null);
  40850. this.xo.on('chunk', this._chunkHandler.bind(this));
  40851. this.xo.once('finish', function(status, text) {
  40852. debug('finish', status, text);
  40853. self._chunkHandler(status, text);
  40854. self.xo = null;
  40855. var reason = status === 200 ? 'network' : 'permanent';
  40856. debug('close', reason);
  40857. self.emit('close', null, reason);
  40858. self._cleanup();
  40859. });
  40860. }
  40861. inherits(XhrReceiver, EventEmitter);
  40862. XhrReceiver.prototype._chunkHandler = function(status, text) {
  40863. debug('_chunkHandler', status);
  40864. if (status !== 200 || !text) {
  40865. return;
  40866. }
  40867. for (var idx = -1; ; this.bufferPosition += idx + 1) {
  40868. var buf = text.slice(this.bufferPosition);
  40869. idx = buf.indexOf('\n');
  40870. if (idx === -1) {
  40871. break;
  40872. }
  40873. var msg = buf.slice(0, idx);
  40874. if (msg) {
  40875. debug('message', msg);
  40876. this.emit('message', msg);
  40877. }
  40878. }
  40879. };
  40880. XhrReceiver.prototype._cleanup = function() {
  40881. debug('_cleanup');
  40882. this.removeAllListeners();
  40883. };
  40884. XhrReceiver.prototype.abort = function() {
  40885. debug('abort');
  40886. if (this.xo) {
  40887. this.xo.close();
  40888. debug('close');
  40889. this.emit('close', null, 'user');
  40890. this.xo = null;
  40891. }
  40892. this._cleanup();
  40893. };
  40894. module.exports = XhrReceiver;
  40895. /***/ }),
  40896. /***/ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js":
  40897. /*!******************************************************************!*\
  40898. !*** ./node_modules/sockjs-client/lib/transport/sender/jsonp.js ***!
  40899. \******************************************************************/
  40900. /*! dynamic exports provided */
  40901. /*! all exports used */
  40902. /***/ (function(module, exports, __webpack_require__) {
  40903. "use strict";
  40904. /* WEBPACK VAR INJECTION */(function(global) {
  40905. var random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
  40906. , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  40907. ;
  40908. var debug = function() {};
  40909. if (true) {
  40910. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:sender:jsonp');
  40911. }
  40912. var form, area;
  40913. function createIframe(id) {
  40914. debug('createIframe', id);
  40915. try {
  40916. // ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
  40917. return global.document.createElement('<iframe name="' + id + '">');
  40918. } catch (x) {
  40919. var iframe = global.document.createElement('iframe');
  40920. iframe.name = id;
  40921. return iframe;
  40922. }
  40923. }
  40924. function createForm() {
  40925. debug('createForm');
  40926. form = global.document.createElement('form');
  40927. form.style.display = 'none';
  40928. form.style.position = 'absolute';
  40929. form.method = 'POST';
  40930. form.enctype = 'application/x-www-form-urlencoded';
  40931. form.acceptCharset = 'UTF-8';
  40932. area = global.document.createElement('textarea');
  40933. area.name = 'd';
  40934. form.appendChild(area);
  40935. global.document.body.appendChild(form);
  40936. }
  40937. module.exports = function(url, payload, callback) {
  40938. debug(url, payload);
  40939. if (!form) {
  40940. createForm();
  40941. }
  40942. var id = 'a' + random.string(8);
  40943. form.target = id;
  40944. form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);
  40945. var iframe = createIframe(id);
  40946. iframe.id = id;
  40947. iframe.style.display = 'none';
  40948. form.appendChild(iframe);
  40949. try {
  40950. area.value = payload;
  40951. } catch (e) {
  40952. // seriously broken browsers get here
  40953. }
  40954. form.submit();
  40955. var completed = function(err) {
  40956. debug('completed', id, err);
  40957. if (!iframe.onerror) {
  40958. return;
  40959. }
  40960. iframe.onreadystatechange = iframe.onerror = iframe.onload = null;
  40961. // Opera mini doesn't like if we GC iframe
  40962. // immediately, thus this timeout.
  40963. setTimeout(function() {
  40964. debug('cleaning up', id);
  40965. iframe.parentNode.removeChild(iframe);
  40966. iframe = null;
  40967. }, 500);
  40968. area.value = '';
  40969. // It is not possible to detect if the iframe succeeded or
  40970. // failed to submit our form.
  40971. callback(err);
  40972. };
  40973. iframe.onerror = function() {
  40974. debug('onerror', id);
  40975. completed();
  40976. };
  40977. iframe.onload = function() {
  40978. debug('onload', id);
  40979. completed();
  40980. };
  40981. iframe.onreadystatechange = function(e) {
  40982. debug('onreadystatechange', id, iframe.readyState, e);
  40983. if (iframe.readyState === 'complete') {
  40984. completed();
  40985. }
  40986. };
  40987. return function() {
  40988. debug('aborted', id);
  40989. completed(new Error('Aborted'));
  40990. };
  40991. };
  40992. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  40993. /***/ }),
  40994. /***/ "./node_modules/sockjs-client/lib/transport/sender/xdr.js":
  40995. /*!****************************************************************!*\
  40996. !*** ./node_modules/sockjs-client/lib/transport/sender/xdr.js ***!
  40997. \****************************************************************/
  40998. /*! dynamic exports provided */
  40999. /*! all exports used */
  41000. /***/ (function(module, exports, __webpack_require__) {
  41001. "use strict";
  41002. /* WEBPACK VAR INJECTION */(function(global) {
  41003. var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  41004. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41005. , eventUtils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
  41006. , browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
  41007. , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  41008. ;
  41009. var debug = function() {};
  41010. if (true) {
  41011. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:sender:xdr');
  41012. }
  41013. // References:
  41014. // http://ajaxian.com/archives/100-line-ajax-wrapper
  41015. // http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx
  41016. function XDRObject(method, url, payload) {
  41017. debug(method, url);
  41018. var self = this;
  41019. EventEmitter.call(this);
  41020. setTimeout(function() {
  41021. self._start(method, url, payload);
  41022. }, 0);
  41023. }
  41024. inherits(XDRObject, EventEmitter);
  41025. XDRObject.prototype._start = function(method, url, payload) {
  41026. debug('_start');
  41027. var self = this;
  41028. var xdr = new global.XDomainRequest();
  41029. // IE caches even POSTs
  41030. url = urlUtils.addQuery(url, 't=' + (+new Date()));
  41031. xdr.onerror = function() {
  41032. debug('onerror');
  41033. self._error();
  41034. };
  41035. xdr.ontimeout = function() {
  41036. debug('ontimeout');
  41037. self._error();
  41038. };
  41039. xdr.onprogress = function() {
  41040. debug('progress', xdr.responseText);
  41041. self.emit('chunk', 200, xdr.responseText);
  41042. };
  41043. xdr.onload = function() {
  41044. debug('load');
  41045. self.emit('finish', 200, xdr.responseText);
  41046. self._cleanup(false);
  41047. };
  41048. this.xdr = xdr;
  41049. this.unloadRef = eventUtils.unloadAdd(function() {
  41050. self._cleanup(true);
  41051. });
  41052. try {
  41053. // Fails with AccessDenied if port number is bogus
  41054. this.xdr.open(method, url);
  41055. if (this.timeout) {
  41056. this.xdr.timeout = this.timeout;
  41057. }
  41058. this.xdr.send(payload);
  41059. } catch (x) {
  41060. this._error();
  41061. }
  41062. };
  41063. XDRObject.prototype._error = function() {
  41064. this.emit('finish', 0, '');
  41065. this._cleanup(false);
  41066. };
  41067. XDRObject.prototype._cleanup = function(abort) {
  41068. debug('cleanup', abort);
  41069. if (!this.xdr) {
  41070. return;
  41071. }
  41072. this.removeAllListeners();
  41073. eventUtils.unloadDel(this.unloadRef);
  41074. this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;
  41075. if (abort) {
  41076. try {
  41077. this.xdr.abort();
  41078. } catch (x) {
  41079. // intentionally empty
  41080. }
  41081. }
  41082. this.unloadRef = this.xdr = null;
  41083. };
  41084. XDRObject.prototype.close = function() {
  41085. debug('close');
  41086. this._cleanup(true);
  41087. };
  41088. // IE 8/9 if the request target uses the same scheme - #79
  41089. XDRObject.enabled = !!(global.XDomainRequest && browser.hasDomain());
  41090. module.exports = XDRObject;
  41091. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  41092. /***/ }),
  41093. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js":
  41094. /*!*********************************************************************!*\
  41095. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js ***!
  41096. \*********************************************************************/
  41097. /*! dynamic exports provided */
  41098. /*! all exports used */
  41099. /***/ (function(module, exports, __webpack_require__) {
  41100. "use strict";
  41101. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41102. , XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js")
  41103. ;
  41104. function XHRCorsObject(method, url, payload, opts) {
  41105. XhrDriver.call(this, method, url, payload, opts);
  41106. }
  41107. inherits(XHRCorsObject, XhrDriver);
  41108. XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;
  41109. module.exports = XHRCorsObject;
  41110. /***/ }),
  41111. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js":
  41112. /*!*********************************************************************!*\
  41113. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js ***!
  41114. \*********************************************************************/
  41115. /*! dynamic exports provided */
  41116. /*! all exports used */
  41117. /***/ (function(module, exports, __webpack_require__) {
  41118. "use strict";
  41119. var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  41120. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41121. ;
  41122. function XHRFake(/* method, url, payload, opts */) {
  41123. var self = this;
  41124. EventEmitter.call(this);
  41125. this.to = setTimeout(function() {
  41126. self.emit('finish', 200, '{}');
  41127. }, XHRFake.timeout);
  41128. }
  41129. inherits(XHRFake, EventEmitter);
  41130. XHRFake.prototype.close = function() {
  41131. clearTimeout(this.to);
  41132. };
  41133. XHRFake.timeout = 2000;
  41134. module.exports = XHRFake;
  41135. /***/ }),
  41136. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js":
  41137. /*!**********************************************************************!*\
  41138. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-local.js ***!
  41139. \**********************************************************************/
  41140. /*! dynamic exports provided */
  41141. /*! all exports used */
  41142. /***/ (function(module, exports, __webpack_require__) {
  41143. "use strict";
  41144. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41145. , XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js")
  41146. ;
  41147. function XHRLocalObject(method, url, payload /*, opts */) {
  41148. XhrDriver.call(this, method, url, payload, {
  41149. noCredentials: true
  41150. });
  41151. }
  41152. inherits(XHRLocalObject, XhrDriver);
  41153. XHRLocalObject.enabled = XhrDriver.enabled;
  41154. module.exports = XHRLocalObject;
  41155. /***/ }),
  41156. /***/ "./node_modules/sockjs-client/lib/transport/websocket.js":
  41157. /*!***************************************************************!*\
  41158. !*** ./node_modules/sockjs-client/lib/transport/websocket.js ***!
  41159. \***************************************************************/
  41160. /*! dynamic exports provided */
  41161. /*! all exports used */
  41162. /***/ (function(module, exports, __webpack_require__) {
  41163. "use strict";
  41164. var utils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
  41165. , urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
  41166. , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41167. , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
  41168. , WebsocketDriver = __webpack_require__(/*! ./driver/websocket */ "./node_modules/sockjs-client/lib/transport/browser/websocket.js")
  41169. ;
  41170. var debug = function() {};
  41171. if (true) {
  41172. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:websocket');
  41173. }
  41174. function WebSocketTransport(transUrl, ignore, options) {
  41175. if (!WebSocketTransport.enabled()) {
  41176. throw new Error('Transport created when disabled');
  41177. }
  41178. EventEmitter.call(this);
  41179. debug('constructor', transUrl);
  41180. var self = this;
  41181. var url = urlUtils.addPath(transUrl, '/websocket');
  41182. if (url.slice(0, 5) === 'https') {
  41183. url = 'wss' + url.slice(5);
  41184. } else {
  41185. url = 'ws' + url.slice(4);
  41186. }
  41187. this.url = url;
  41188. this.ws = new WebsocketDriver(this.url, [], options);
  41189. this.ws.onmessage = function(e) {
  41190. debug('message event', e.data);
  41191. self.emit('message', e.data);
  41192. };
  41193. // Firefox has an interesting bug. If a websocket connection is
  41194. // created after onunload, it stays alive even when user
  41195. // navigates away from the page. In such situation let's lie -
  41196. // let's not open the ws connection at all. See:
  41197. // https://github.com/sockjs/sockjs-client/issues/28
  41198. // https://bugzilla.mozilla.org/show_bug.cgi?id=696085
  41199. this.unloadRef = utils.unloadAdd(function() {
  41200. debug('unload');
  41201. self.ws.close();
  41202. });
  41203. this.ws.onclose = function(e) {
  41204. debug('close event', e.code, e.reason);
  41205. self.emit('close', e.code, e.reason);
  41206. self._cleanup();
  41207. };
  41208. this.ws.onerror = function(e) {
  41209. debug('error event', e);
  41210. self.emit('close', 1006, 'WebSocket connection broken');
  41211. self._cleanup();
  41212. };
  41213. }
  41214. inherits(WebSocketTransport, EventEmitter);
  41215. WebSocketTransport.prototype.send = function(data) {
  41216. var msg = '[' + data + ']';
  41217. debug('send', msg);
  41218. this.ws.send(msg);
  41219. };
  41220. WebSocketTransport.prototype.close = function() {
  41221. debug('close');
  41222. var ws = this.ws;
  41223. this._cleanup();
  41224. if (ws) {
  41225. ws.close();
  41226. }
  41227. };
  41228. WebSocketTransport.prototype._cleanup = function() {
  41229. debug('_cleanup');
  41230. var ws = this.ws;
  41231. if (ws) {
  41232. ws.onmessage = ws.onclose = ws.onerror = null;
  41233. }
  41234. utils.unloadDel(this.unloadRef);
  41235. this.unloadRef = this.ws = null;
  41236. this.removeAllListeners();
  41237. };
  41238. WebSocketTransport.enabled = function() {
  41239. debug('enabled');
  41240. return !!WebsocketDriver;
  41241. };
  41242. WebSocketTransport.transportName = 'websocket';
  41243. // In theory, ws should require 1 round trip. But in chrome, this is
  41244. // not very stable over SSL. Most likely a ws connection requires a
  41245. // separate SSL connection, in which case 2 round trips are an
  41246. // absolute minumum.
  41247. WebSocketTransport.roundTrips = 2;
  41248. module.exports = WebSocketTransport;
  41249. /***/ }),
  41250. /***/ "./node_modules/sockjs-client/lib/transport/xdr-polling.js":
  41251. /*!*****************************************************************!*\
  41252. !*** ./node_modules/sockjs-client/lib/transport/xdr-polling.js ***!
  41253. \*****************************************************************/
  41254. /*! dynamic exports provided */
  41255. /*! all exports used */
  41256. /***/ (function(module, exports, __webpack_require__) {
  41257. "use strict";
  41258. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41259. , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
  41260. , XdrStreamingTransport = __webpack_require__(/*! ./xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js")
  41261. , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
  41262. , XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js")
  41263. ;
  41264. function XdrPollingTransport(transUrl) {
  41265. if (!XDRObject.enabled) {
  41266. throw new Error('Transport created when disabled');
  41267. }
  41268. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
  41269. }
  41270. inherits(XdrPollingTransport, AjaxBasedTransport);
  41271. XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
  41272. XdrPollingTransport.transportName = 'xdr-polling';
  41273. XdrPollingTransport.roundTrips = 2; // preflight, ajax
  41274. module.exports = XdrPollingTransport;
  41275. /***/ }),
  41276. /***/ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js":
  41277. /*!*******************************************************************!*\
  41278. !*** ./node_modules/sockjs-client/lib/transport/xdr-streaming.js ***!
  41279. \*******************************************************************/
  41280. /*! dynamic exports provided */
  41281. /*! all exports used */
  41282. /***/ (function(module, exports, __webpack_require__) {
  41283. "use strict";
  41284. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41285. , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
  41286. , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
  41287. , XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js")
  41288. ;
  41289. // According to:
  41290. // http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
  41291. // http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
  41292. function XdrStreamingTransport(transUrl) {
  41293. if (!XDRObject.enabled) {
  41294. throw new Error('Transport created when disabled');
  41295. }
  41296. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
  41297. }
  41298. inherits(XdrStreamingTransport, AjaxBasedTransport);
  41299. XdrStreamingTransport.enabled = function(info) {
  41300. if (info.cookie_needed || info.nullOrigin) {
  41301. return false;
  41302. }
  41303. return XDRObject.enabled && info.sameScheme;
  41304. };
  41305. XdrStreamingTransport.transportName = 'xdr-streaming';
  41306. XdrStreamingTransport.roundTrips = 2; // preflight, ajax
  41307. module.exports = XdrStreamingTransport;
  41308. /***/ }),
  41309. /***/ "./node_modules/sockjs-client/lib/transport/xhr-polling.js":
  41310. /*!*****************************************************************!*\
  41311. !*** ./node_modules/sockjs-client/lib/transport/xhr-polling.js ***!
  41312. \*****************************************************************/
  41313. /*! dynamic exports provided */
  41314. /*! all exports used */
  41315. /***/ (function(module, exports, __webpack_require__) {
  41316. "use strict";
  41317. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41318. , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
  41319. , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
  41320. , XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
  41321. , XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
  41322. ;
  41323. function XhrPollingTransport(transUrl) {
  41324. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  41325. throw new Error('Transport created when disabled');
  41326. }
  41327. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
  41328. }
  41329. inherits(XhrPollingTransport, AjaxBasedTransport);
  41330. XhrPollingTransport.enabled = function(info) {
  41331. if (info.nullOrigin) {
  41332. return false;
  41333. }
  41334. if (XHRLocalObject.enabled && info.sameOrigin) {
  41335. return true;
  41336. }
  41337. return XHRCorsObject.enabled;
  41338. };
  41339. XhrPollingTransport.transportName = 'xhr-polling';
  41340. XhrPollingTransport.roundTrips = 2; // preflight, ajax
  41341. module.exports = XhrPollingTransport;
  41342. /***/ }),
  41343. /***/ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js":
  41344. /*!*******************************************************************!*\
  41345. !*** ./node_modules/sockjs-client/lib/transport/xhr-streaming.js ***!
  41346. \*******************************************************************/
  41347. /*! dynamic exports provided */
  41348. /*! all exports used */
  41349. /***/ (function(module, exports, __webpack_require__) {
  41350. "use strict";
  41351. /* WEBPACK VAR INJECTION */(function(global) {
  41352. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
  41353. , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
  41354. , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
  41355. , XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
  41356. , XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
  41357. , browser = __webpack_require__(/*! ../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
  41358. ;
  41359. function XhrStreamingTransport(transUrl) {
  41360. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  41361. throw new Error('Transport created when disabled');
  41362. }
  41363. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);
  41364. }
  41365. inherits(XhrStreamingTransport, AjaxBasedTransport);
  41366. XhrStreamingTransport.enabled = function(info) {
  41367. if (info.nullOrigin) {
  41368. return false;
  41369. }
  41370. // Opera doesn't support xhr-streaming #60
  41371. // But it might be able to #92
  41372. if (browser.isOpera()) {
  41373. return false;
  41374. }
  41375. return XHRCorsObject.enabled;
  41376. };
  41377. XhrStreamingTransport.transportName = 'xhr-streaming';
  41378. XhrStreamingTransport.roundTrips = 2; // preflight, ajax
  41379. // Safari gets confused when a streaming ajax request is started
  41380. // before onload. This causes the load indicator to spin indefinetely.
  41381. // Only require body when used in a browser
  41382. XhrStreamingTransport.needBody = !!global.document;
  41383. module.exports = XhrStreamingTransport;
  41384. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  41385. /***/ }),
  41386. /***/ "./node_modules/sockjs-client/lib/utils/browser-crypto.js":
  41387. /*!****************************************************************!*\
  41388. !*** ./node_modules/sockjs-client/lib/utils/browser-crypto.js ***!
  41389. \****************************************************************/
  41390. /*! dynamic exports provided */
  41391. /*! all exports used */
  41392. /***/ (function(module, exports, __webpack_require__) {
  41393. "use strict";
  41394. /* WEBPACK VAR INJECTION */(function(global) {
  41395. if (global.crypto && global.crypto.getRandomValues) {
  41396. module.exports.randomBytes = function(length) {
  41397. var bytes = new Uint8Array(length);
  41398. global.crypto.getRandomValues(bytes);
  41399. return bytes;
  41400. };
  41401. } else {
  41402. module.exports.randomBytes = function(length) {
  41403. var bytes = new Array(length);
  41404. for (var i = 0; i < length; i++) {
  41405. bytes[i] = Math.floor(Math.random() * 256);
  41406. }
  41407. return bytes;
  41408. };
  41409. }
  41410. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  41411. /***/ }),
  41412. /***/ "./node_modules/sockjs-client/lib/utils/browser.js":
  41413. /*!*********************************************************!*\
  41414. !*** ./node_modules/sockjs-client/lib/utils/browser.js ***!
  41415. \*********************************************************/
  41416. /*! dynamic exports provided */
  41417. /*! all exports used */
  41418. /***/ (function(module, exports, __webpack_require__) {
  41419. "use strict";
  41420. /* WEBPACK VAR INJECTION */(function(global) {
  41421. module.exports = {
  41422. isOpera: function() {
  41423. return global.navigator &&
  41424. /opera/i.test(global.navigator.userAgent);
  41425. }
  41426. , isKonqueror: function() {
  41427. return global.navigator &&
  41428. /konqueror/i.test(global.navigator.userAgent);
  41429. }
  41430. // #187 wrap document.domain in try/catch because of WP8 from file:///
  41431. , hasDomain: function () {
  41432. // non-browser client always has a domain
  41433. if (!global.document) {
  41434. return true;
  41435. }
  41436. try {
  41437. return !!global.document.domain;
  41438. } catch (e) {
  41439. return false;
  41440. }
  41441. }
  41442. };
  41443. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  41444. /***/ }),
  41445. /***/ "./node_modules/sockjs-client/lib/utils/escape.js":
  41446. /*!********************************************************!*\
  41447. !*** ./node_modules/sockjs-client/lib/utils/escape.js ***!
  41448. \********************************************************/
  41449. /*! dynamic exports provided */
  41450. /*! all exports used */
  41451. /***/ (function(module, exports, __webpack_require__) {
  41452. "use strict";
  41453. var JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js");
  41454. // Some extra characters that Chrome gets wrong, and substitutes with
  41455. // something else on the wire.
  41456. // eslint-disable-next-line no-control-regex
  41457. var extraEscapable = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g
  41458. , extraLookup;
  41459. // This may be quite slow, so let's delay until user actually uses bad
  41460. // characters.
  41461. var unrollLookup = function(escapable) {
  41462. var i;
  41463. var unrolled = {};
  41464. var c = [];
  41465. for (i = 0; i < 65536; i++) {
  41466. c.push( String.fromCharCode(i) );
  41467. }
  41468. escapable.lastIndex = 0;
  41469. c.join('').replace(escapable, function(a) {
  41470. unrolled[ a ] = '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
  41471. return '';
  41472. });
  41473. escapable.lastIndex = 0;
  41474. return unrolled;
  41475. };
  41476. // Quote string, also taking care of unicode characters that browsers
  41477. // often break. Especially, take care of unicode surrogates:
  41478. // http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates
  41479. module.exports = {
  41480. quote: function(string) {
  41481. var quoted = JSON3.stringify(string);
  41482. // In most cases this should be very fast and good enough.
  41483. extraEscapable.lastIndex = 0;
  41484. if (!extraEscapable.test(quoted)) {
  41485. return quoted;
  41486. }
  41487. if (!extraLookup) {
  41488. extraLookup = unrollLookup(extraEscapable);
  41489. }
  41490. return quoted.replace(extraEscapable, function(a) {
  41491. return extraLookup[a];
  41492. });
  41493. }
  41494. };
  41495. /***/ }),
  41496. /***/ "./node_modules/sockjs-client/lib/utils/event.js":
  41497. /*!*******************************************************!*\
  41498. !*** ./node_modules/sockjs-client/lib/utils/event.js ***!
  41499. \*******************************************************/
  41500. /*! dynamic exports provided */
  41501. /*! all exports used */
  41502. /***/ (function(module, exports, __webpack_require__) {
  41503. "use strict";
  41504. /* WEBPACK VAR INJECTION */(function(global) {
  41505. var random = __webpack_require__(/*! ./random */ "./node_modules/sockjs-client/lib/utils/random.js");
  41506. var onUnload = {}
  41507. , afterUnload = false
  41508. // detect google chrome packaged apps because they don't allow the 'unload' event
  41509. , isChromePackagedApp = global.chrome && global.chrome.app && global.chrome.app.runtime
  41510. ;
  41511. module.exports = {
  41512. attachEvent: function(event, listener) {
  41513. if (typeof global.addEventListener !== 'undefined') {
  41514. global.addEventListener(event, listener, false);
  41515. } else if (global.document && global.attachEvent) {
  41516. // IE quirks.
  41517. // According to: http://stevesouders.com/misc/test-postmessage.php
  41518. // the message gets delivered only to 'document', not 'window'.
  41519. global.document.attachEvent('on' + event, listener);
  41520. // I get 'window' for ie8.
  41521. global.attachEvent('on' + event, listener);
  41522. }
  41523. }
  41524. , detachEvent: function(event, listener) {
  41525. if (typeof global.addEventListener !== 'undefined') {
  41526. global.removeEventListener(event, listener, false);
  41527. } else if (global.document && global.detachEvent) {
  41528. global.document.detachEvent('on' + event, listener);
  41529. global.detachEvent('on' + event, listener);
  41530. }
  41531. }
  41532. , unloadAdd: function(listener) {
  41533. if (isChromePackagedApp) {
  41534. return null;
  41535. }
  41536. var ref = random.string(8);
  41537. onUnload[ref] = listener;
  41538. if (afterUnload) {
  41539. setTimeout(this.triggerUnloadCallbacks, 0);
  41540. }
  41541. return ref;
  41542. }
  41543. , unloadDel: function(ref) {
  41544. if (ref in onUnload) {
  41545. delete onUnload[ref];
  41546. }
  41547. }
  41548. , triggerUnloadCallbacks: function() {
  41549. for (var ref in onUnload) {
  41550. onUnload[ref]();
  41551. delete onUnload[ref];
  41552. }
  41553. }
  41554. };
  41555. var unloadTriggered = function() {
  41556. if (afterUnload) {
  41557. return;
  41558. }
  41559. afterUnload = true;
  41560. module.exports.triggerUnloadCallbacks();
  41561. };
  41562. // 'unload' alone is not reliable in opera within an iframe, but we
  41563. // can't use `beforeunload` as IE fires it on javascript: links.
  41564. if (!isChromePackagedApp) {
  41565. module.exports.attachEvent('unload', unloadTriggered);
  41566. }
  41567. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  41568. /***/ }),
  41569. /***/ "./node_modules/sockjs-client/lib/utils/iframe.js":
  41570. /*!********************************************************!*\
  41571. !*** ./node_modules/sockjs-client/lib/utils/iframe.js ***!
  41572. \********************************************************/
  41573. /*! dynamic exports provided */
  41574. /*! all exports used */
  41575. /***/ (function(module, exports, __webpack_require__) {
  41576. "use strict";
  41577. /* WEBPACK VAR INJECTION */(function(global) {
  41578. var eventUtils = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/utils/event.js")
  41579. , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
  41580. , browser = __webpack_require__(/*! ./browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
  41581. ;
  41582. var debug = function() {};
  41583. if (true) {
  41584. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:utils:iframe');
  41585. }
  41586. module.exports = {
  41587. WPrefix: '_jp'
  41588. , currentWindowId: null
  41589. , polluteGlobalNamespace: function() {
  41590. if (!(module.exports.WPrefix in global)) {
  41591. global[module.exports.WPrefix] = {};
  41592. }
  41593. }
  41594. , postMessage: function(type, data) {
  41595. if (global.parent !== global) {
  41596. global.parent.postMessage(JSON3.stringify({
  41597. windowId: module.exports.currentWindowId
  41598. , type: type
  41599. , data: data || ''
  41600. }), '*');
  41601. } else {
  41602. debug('Cannot postMessage, no parent window.', type, data);
  41603. }
  41604. }
  41605. , createIframe: function(iframeUrl, errorCallback) {
  41606. var iframe = global.document.createElement('iframe');
  41607. var tref, unloadRef;
  41608. var unattach = function() {
  41609. debug('unattach');
  41610. clearTimeout(tref);
  41611. // Explorer had problems with that.
  41612. try {
  41613. iframe.onload = null;
  41614. } catch (x) {
  41615. // intentionally empty
  41616. }
  41617. iframe.onerror = null;
  41618. };
  41619. var cleanup = function() {
  41620. debug('cleanup');
  41621. if (iframe) {
  41622. unattach();
  41623. // This timeout makes chrome fire onbeforeunload event
  41624. // within iframe. Without the timeout it goes straight to
  41625. // onunload.
  41626. setTimeout(function() {
  41627. if (iframe) {
  41628. iframe.parentNode.removeChild(iframe);
  41629. }
  41630. iframe = null;
  41631. }, 0);
  41632. eventUtils.unloadDel(unloadRef);
  41633. }
  41634. };
  41635. var onerror = function(err) {
  41636. debug('onerror', err);
  41637. if (iframe) {
  41638. cleanup();
  41639. errorCallback(err);
  41640. }
  41641. };
  41642. var post = function(msg, origin) {
  41643. debug('post', msg, origin);
  41644. try {
  41645. // When the iframe is not loaded, IE raises an exception
  41646. // on 'contentWindow'.
  41647. setTimeout(function() {
  41648. if (iframe && iframe.contentWindow) {
  41649. iframe.contentWindow.postMessage(msg, origin);
  41650. }
  41651. }, 0);
  41652. } catch (x) {
  41653. // intentionally empty
  41654. }
  41655. };
  41656. iframe.src = iframeUrl;
  41657. iframe.style.display = 'none';
  41658. iframe.style.position = 'absolute';
  41659. iframe.onerror = function() {
  41660. onerror('onerror');
  41661. };
  41662. iframe.onload = function() {
  41663. debug('onload');
  41664. // `onload` is triggered before scripts on the iframe are
  41665. // executed. Give it few seconds to actually load stuff.
  41666. clearTimeout(tref);
  41667. tref = setTimeout(function() {
  41668. onerror('onload timeout');
  41669. }, 2000);
  41670. };
  41671. global.document.body.appendChild(iframe);
  41672. tref = setTimeout(function() {
  41673. onerror('timeout');
  41674. }, 15000);
  41675. unloadRef = eventUtils.unloadAdd(cleanup);
  41676. return {
  41677. post: post
  41678. , cleanup: cleanup
  41679. , loaded: unattach
  41680. };
  41681. }
  41682. /* eslint no-undef: "off", new-cap: "off" */
  41683. , createHtmlfile: function(iframeUrl, errorCallback) {
  41684. var axo = ['Active'].concat('Object').join('X');
  41685. var doc = new global[axo]('htmlfile');
  41686. var tref, unloadRef;
  41687. var iframe;
  41688. var unattach = function() {
  41689. clearTimeout(tref);
  41690. iframe.onerror = null;
  41691. };
  41692. var cleanup = function() {
  41693. if (doc) {
  41694. unattach();
  41695. eventUtils.unloadDel(unloadRef);
  41696. iframe.parentNode.removeChild(iframe);
  41697. iframe = doc = null;
  41698. CollectGarbage();
  41699. }
  41700. };
  41701. var onerror = function(r) {
  41702. debug('onerror', r);
  41703. if (doc) {
  41704. cleanup();
  41705. errorCallback(r);
  41706. }
  41707. };
  41708. var post = function(msg, origin) {
  41709. try {
  41710. // When the iframe is not loaded, IE raises an exception
  41711. // on 'contentWindow'.
  41712. setTimeout(function() {
  41713. if (iframe && iframe.contentWindow) {
  41714. iframe.contentWindow.postMessage(msg, origin);
  41715. }
  41716. }, 0);
  41717. } catch (x) {
  41718. // intentionally empty
  41719. }
  41720. };
  41721. doc.open();
  41722. doc.write('<html><s' + 'cript>' +
  41723. 'document.domain="' + global.document.domain + '";' +
  41724. '</s' + 'cript></html>');
  41725. doc.close();
  41726. doc.parentWindow[module.exports.WPrefix] = global[module.exports.WPrefix];
  41727. var c = doc.createElement('div');
  41728. doc.body.appendChild(c);
  41729. iframe = doc.createElement('iframe');
  41730. c.appendChild(iframe);
  41731. iframe.src = iframeUrl;
  41732. iframe.onerror = function() {
  41733. onerror('onerror');
  41734. };
  41735. tref = setTimeout(function() {
  41736. onerror('timeout');
  41737. }, 15000);
  41738. unloadRef = eventUtils.unloadAdd(cleanup);
  41739. return {
  41740. post: post
  41741. , cleanup: cleanup
  41742. , loaded: unattach
  41743. };
  41744. }
  41745. };
  41746. module.exports.iframeEnabled = false;
  41747. if (global.document) {
  41748. // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with
  41749. // huge delay, or not at all.
  41750. module.exports.iframeEnabled = (typeof global.postMessage === 'function' ||
  41751. typeof global.postMessage === 'object') && (!browser.isKonqueror());
  41752. }
  41753. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  41754. /***/ }),
  41755. /***/ "./node_modules/sockjs-client/lib/utils/log.js":
  41756. /*!*****************************************************!*\
  41757. !*** ./node_modules/sockjs-client/lib/utils/log.js ***!
  41758. \*****************************************************/
  41759. /*! dynamic exports provided */
  41760. /*! all exports used */
  41761. /***/ (function(module, exports, __webpack_require__) {
  41762. "use strict";
  41763. /* WEBPACK VAR INJECTION */(function(global) {
  41764. var logObject = {};
  41765. ['log', 'debug', 'warn'].forEach(function (level) {
  41766. var levelExists;
  41767. try {
  41768. levelExists = global.console && global.console[level] && global.console[level].apply;
  41769. } catch(e) {
  41770. // do nothing
  41771. }
  41772. logObject[level] = levelExists ? function () {
  41773. return global.console[level].apply(global.console, arguments);
  41774. } : (level === 'log' ? function () {} : logObject.log);
  41775. });
  41776. module.exports = logObject;
  41777. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  41778. /***/ }),
  41779. /***/ "./node_modules/sockjs-client/lib/utils/object.js":
  41780. /*!********************************************************!*\
  41781. !*** ./node_modules/sockjs-client/lib/utils/object.js ***!
  41782. \********************************************************/
  41783. /*! dynamic exports provided */
  41784. /*! all exports used */
  41785. /***/ (function(module, exports, __webpack_require__) {
  41786. "use strict";
  41787. module.exports = {
  41788. isObject: function(obj) {
  41789. var type = typeof obj;
  41790. return type === 'function' || type === 'object' && !!obj;
  41791. }
  41792. , extend: function(obj) {
  41793. if (!this.isObject(obj)) {
  41794. return obj;
  41795. }
  41796. var source, prop;
  41797. for (var i = 1, length = arguments.length; i < length; i++) {
  41798. source = arguments[i];
  41799. for (prop in source) {
  41800. if (Object.prototype.hasOwnProperty.call(source, prop)) {
  41801. obj[prop] = source[prop];
  41802. }
  41803. }
  41804. }
  41805. return obj;
  41806. }
  41807. };
  41808. /***/ }),
  41809. /***/ "./node_modules/sockjs-client/lib/utils/random.js":
  41810. /*!********************************************************!*\
  41811. !*** ./node_modules/sockjs-client/lib/utils/random.js ***!
  41812. \********************************************************/
  41813. /*! dynamic exports provided */
  41814. /*! all exports used */
  41815. /***/ (function(module, exports, __webpack_require__) {
  41816. "use strict";
  41817. /* global crypto:true */
  41818. var crypto = __webpack_require__(/*! crypto */ "./node_modules/sockjs-client/lib/utils/browser-crypto.js");
  41819. // This string has length 32, a power of 2, so the modulus doesn't introduce a
  41820. // bias.
  41821. var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';
  41822. module.exports = {
  41823. string: function(length) {
  41824. var max = _randomStringChars.length;
  41825. var bytes = crypto.randomBytes(length);
  41826. var ret = [];
  41827. for (var i = 0; i < length; i++) {
  41828. ret.push(_randomStringChars.substr(bytes[i] % max, 1));
  41829. }
  41830. return ret.join('');
  41831. }
  41832. , number: function(max) {
  41833. return Math.floor(Math.random() * max);
  41834. }
  41835. , numberString: function(max) {
  41836. var t = ('' + (max - 1)).length;
  41837. var p = new Array(t + 1).join('0');
  41838. return (p + this.number(max)).slice(-t);
  41839. }
  41840. };
  41841. /***/ }),
  41842. /***/ "./node_modules/sockjs-client/lib/utils/transport.js":
  41843. /*!***********************************************************!*\
  41844. !*** ./node_modules/sockjs-client/lib/utils/transport.js ***!
  41845. \***********************************************************/
  41846. /*! dynamic exports provided */
  41847. /*! all exports used */
  41848. /***/ (function(module, exports, __webpack_require__) {
  41849. "use strict";
  41850. var debug = function() {};
  41851. if (true) {
  41852. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:utils:transport');
  41853. }
  41854. module.exports = function(availableTransports) {
  41855. return {
  41856. filterToEnabled: function(transportsWhitelist, info) {
  41857. var transports = {
  41858. main: []
  41859. , facade: []
  41860. };
  41861. if (!transportsWhitelist) {
  41862. transportsWhitelist = [];
  41863. } else if (typeof transportsWhitelist === 'string') {
  41864. transportsWhitelist = [transportsWhitelist];
  41865. }
  41866. availableTransports.forEach(function(trans) {
  41867. if (!trans) {
  41868. return;
  41869. }
  41870. if (trans.transportName === 'websocket' && info.websocket === false) {
  41871. debug('disabled from server', 'websocket');
  41872. return;
  41873. }
  41874. if (transportsWhitelist.length &&
  41875. transportsWhitelist.indexOf(trans.transportName) === -1) {
  41876. debug('not in whitelist', trans.transportName);
  41877. return;
  41878. }
  41879. if (trans.enabled(info)) {
  41880. debug('enabled', trans.transportName);
  41881. transports.main.push(trans);
  41882. if (trans.facadeTransport) {
  41883. transports.facade.push(trans.facadeTransport);
  41884. }
  41885. } else {
  41886. debug('disabled', trans.transportName);
  41887. }
  41888. });
  41889. return transports;
  41890. }
  41891. };
  41892. };
  41893. /***/ }),
  41894. /***/ "./node_modules/sockjs-client/lib/utils/url.js":
  41895. /*!*****************************************************!*\
  41896. !*** ./node_modules/sockjs-client/lib/utils/url.js ***!
  41897. \*****************************************************/
  41898. /*! dynamic exports provided */
  41899. /*! all exports used */
  41900. /***/ (function(module, exports, __webpack_require__) {
  41901. "use strict";
  41902. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js");
  41903. var debug = function() {};
  41904. if (true) {
  41905. debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:utils:url');
  41906. }
  41907. module.exports = {
  41908. getOrigin: function(url) {
  41909. if (!url) {
  41910. return null;
  41911. }
  41912. var p = new URL(url);
  41913. if (p.protocol === 'file:') {
  41914. return null;
  41915. }
  41916. var port = p.port;
  41917. if (!port) {
  41918. port = (p.protocol === 'https:') ? '443' : '80';
  41919. }
  41920. return p.protocol + '//' + p.hostname + ':' + port;
  41921. }
  41922. , isOriginEqual: function(a, b) {
  41923. var res = this.getOrigin(a) === this.getOrigin(b);
  41924. debug('same', a, b, res);
  41925. return res;
  41926. }
  41927. , isSchemeEqual: function(a, b) {
  41928. return (a.split(':')[0] === b.split(':')[0]);
  41929. }
  41930. , addPath: function (url, path) {
  41931. var qs = url.split('?');
  41932. return qs[0] + path + (qs[1] ? '?' + qs[1] : '');
  41933. }
  41934. , addQuery: function (url, q) {
  41935. return url + (url.indexOf('?') === -1 ? ('?' + q) : ('&' + q));
  41936. }
  41937. };
  41938. /***/ }),
  41939. /***/ "./node_modules/sockjs-client/lib/version.js":
  41940. /*!***************************************************!*\
  41941. !*** ./node_modules/sockjs-client/lib/version.js ***!
  41942. \***************************************************/
  41943. /*! dynamic exports provided */
  41944. /*! all exports used */
  41945. /***/ (function(module, exports) {
  41946. module.exports = '1.1.4';
  41947. /***/ }),
  41948. /***/ "./node_modules/strip-ansi/index.js":
  41949. /*!******************************************!*\
  41950. !*** ./node_modules/strip-ansi/index.js ***!
  41951. \******************************************/
  41952. /*! dynamic exports provided */
  41953. /*! all exports used */
  41954. /***/ (function(module, exports, __webpack_require__) {
  41955. "use strict";
  41956. var ansiRegex = __webpack_require__(/*! ansi-regex */ "./node_modules/ansi-regex/index.js")();
  41957. module.exports = function (str) {
  41958. return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
  41959. };
  41960. /***/ }),
  41961. /***/ "./node_modules/style-loader/lib/addStyles.js":
  41962. /*!****************************************************!*\
  41963. !*** ./node_modules/style-loader/lib/addStyles.js ***!
  41964. \****************************************************/
  41965. /*! dynamic exports provided */
  41966. /*! all exports used */
  41967. /***/ (function(module, exports, __webpack_require__) {
  41968. /*
  41969. MIT License http://www.opensource.org/licenses/mit-license.php
  41970. Author Tobias Koppers @sokra
  41971. */
  41972. var stylesInDom = {};
  41973. var memoize = function (fn) {
  41974. var memo;
  41975. return function () {
  41976. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  41977. return memo;
  41978. };
  41979. };
  41980. var isOldIE = memoize(function () {
  41981. // Test for IE <= 9 as proposed by Browserhacks
  41982. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  41983. // Tests for existence of standard globals is to allow style-loader
  41984. // to operate correctly into non-standard environments
  41985. // @see https://github.com/webpack-contrib/style-loader/issues/177
  41986. return window && document && document.all && !window.atob;
  41987. });
  41988. var getElement = (function (fn) {
  41989. var memo = {};
  41990. return function(selector) {
  41991. if (typeof memo[selector] === "undefined") {
  41992. var styleTarget = fn.call(this, selector);
  41993. // Special case to return head of iframe instead of iframe itself
  41994. if (styleTarget instanceof window.HTMLIFrameElement) {
  41995. try {
  41996. // This will throw an exception if access to iframe is blocked
  41997. // due to cross-origin restrictions
  41998. styleTarget = styleTarget.contentDocument.head;
  41999. } catch(e) {
  42000. styleTarget = null;
  42001. }
  42002. }
  42003. memo[selector] = styleTarget;
  42004. }
  42005. return memo[selector]
  42006. };
  42007. })(function (target) {
  42008. return document.querySelector(target)
  42009. });
  42010. var singleton = null;
  42011. var singletonCounter = 0;
  42012. var stylesInsertedAtTop = [];
  42013. var fixUrls = __webpack_require__(/*! ./urls */ "./node_modules/style-loader/lib/urls.js");
  42014. module.exports = function(list, options) {
  42015. if (typeof DEBUG !== "undefined" && DEBUG) {
  42016. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  42017. }
  42018. options = options || {};
  42019. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  42020. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  42021. // tags it will allow on a page
  42022. if (!options.singleton) options.singleton = isOldIE();
  42023. // By default, add <style> tags to the <head> element
  42024. if (!options.insertInto) options.insertInto = "head";
  42025. // By default, add <style> tags to the bottom of the target
  42026. if (!options.insertAt) options.insertAt = "bottom";
  42027. var styles = listToStyles(list, options);
  42028. addStylesToDom(styles, options);
  42029. return function update (newList) {
  42030. var mayRemove = [];
  42031. for (var i = 0; i < styles.length; i++) {
  42032. var item = styles[i];
  42033. var domStyle = stylesInDom[item.id];
  42034. domStyle.refs--;
  42035. mayRemove.push(domStyle);
  42036. }
  42037. if(newList) {
  42038. var newStyles = listToStyles(newList, options);
  42039. addStylesToDom(newStyles, options);
  42040. }
  42041. for (var i = 0; i < mayRemove.length; i++) {
  42042. var domStyle = mayRemove[i];
  42043. if(domStyle.refs === 0) {
  42044. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  42045. delete stylesInDom[domStyle.id];
  42046. }
  42047. }
  42048. };
  42049. };
  42050. function addStylesToDom (styles, options) {
  42051. for (var i = 0; i < styles.length; i++) {
  42052. var item = styles[i];
  42053. var domStyle = stylesInDom[item.id];
  42054. if(domStyle) {
  42055. domStyle.refs++;
  42056. for(var j = 0; j < domStyle.parts.length; j++) {
  42057. domStyle.parts[j](item.parts[j]);
  42058. }
  42059. for(; j < item.parts.length; j++) {
  42060. domStyle.parts.push(addStyle(item.parts[j], options));
  42061. }
  42062. } else {
  42063. var parts = [];
  42064. for(var j = 0; j < item.parts.length; j++) {
  42065. parts.push(addStyle(item.parts[j], options));
  42066. }
  42067. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  42068. }
  42069. }
  42070. }
  42071. function listToStyles (list, options) {
  42072. var styles = [];
  42073. var newStyles = {};
  42074. for (var i = 0; i < list.length; i++) {
  42075. var item = list[i];
  42076. var id = options.base ? item[0] + options.base : item[0];
  42077. var css = item[1];
  42078. var media = item[2];
  42079. var sourceMap = item[3];
  42080. var part = {css: css, media: media, sourceMap: sourceMap};
  42081. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  42082. else newStyles[id].parts.push(part);
  42083. }
  42084. return styles;
  42085. }
  42086. function insertStyleElement (options, style) {
  42087. var target = getElement(options.insertInto)
  42088. if (!target) {
  42089. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  42090. }
  42091. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  42092. if (options.insertAt === "top") {
  42093. if (!lastStyleElementInsertedAtTop) {
  42094. target.insertBefore(style, target.firstChild);
  42095. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  42096. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  42097. } else {
  42098. target.appendChild(style);
  42099. }
  42100. stylesInsertedAtTop.push(style);
  42101. } else if (options.insertAt === "bottom") {
  42102. target.appendChild(style);
  42103. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  42104. var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
  42105. target.insertBefore(style, nextSibling);
  42106. } else {
  42107. throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  42108. }
  42109. }
  42110. function removeStyleElement (style) {
  42111. if (style.parentNode === null) return false;
  42112. style.parentNode.removeChild(style);
  42113. var idx = stylesInsertedAtTop.indexOf(style);
  42114. if(idx >= 0) {
  42115. stylesInsertedAtTop.splice(idx, 1);
  42116. }
  42117. }
  42118. function createStyleElement (options) {
  42119. var style = document.createElement("style");
  42120. options.attrs.type = "text/css";
  42121. addAttrs(style, options.attrs);
  42122. insertStyleElement(options, style);
  42123. return style;
  42124. }
  42125. function createLinkElement (options) {
  42126. var link = document.createElement("link");
  42127. options.attrs.type = "text/css";
  42128. options.attrs.rel = "stylesheet";
  42129. addAttrs(link, options.attrs);
  42130. insertStyleElement(options, link);
  42131. return link;
  42132. }
  42133. function addAttrs (el, attrs) {
  42134. Object.keys(attrs).forEach(function (key) {
  42135. el.setAttribute(key, attrs[key]);
  42136. });
  42137. }
  42138. function addStyle (obj, options) {
  42139. var style, update, remove, result;
  42140. // If a transform function was defined, run it on the css
  42141. if (options.transform && obj.css) {
  42142. result = options.transform(obj.css);
  42143. if (result) {
  42144. // If transform returns a value, use that instead of the original css.
  42145. // This allows running runtime transformations on the css.
  42146. obj.css = result;
  42147. } else {
  42148. // If the transform function returns a falsy value, don't add this css.
  42149. // This allows conditional loading of css
  42150. return function() {
  42151. // noop
  42152. };
  42153. }
  42154. }
  42155. if (options.singleton) {
  42156. var styleIndex = singletonCounter++;
  42157. style = singleton || (singleton = createStyleElement(options));
  42158. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  42159. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  42160. } else if (
  42161. obj.sourceMap &&
  42162. typeof URL === "function" &&
  42163. typeof URL.createObjectURL === "function" &&
  42164. typeof URL.revokeObjectURL === "function" &&
  42165. typeof Blob === "function" &&
  42166. typeof btoa === "function"
  42167. ) {
  42168. style = createLinkElement(options);
  42169. update = updateLink.bind(null, style, options);
  42170. remove = function () {
  42171. removeStyleElement(style);
  42172. if(style.href) URL.revokeObjectURL(style.href);
  42173. };
  42174. } else {
  42175. style = createStyleElement(options);
  42176. update = applyToTag.bind(null, style);
  42177. remove = function () {
  42178. removeStyleElement(style);
  42179. };
  42180. }
  42181. update(obj);
  42182. return function updateStyle (newObj) {
  42183. if (newObj) {
  42184. if (
  42185. newObj.css === obj.css &&
  42186. newObj.media === obj.media &&
  42187. newObj.sourceMap === obj.sourceMap
  42188. ) {
  42189. return;
  42190. }
  42191. update(obj = newObj);
  42192. } else {
  42193. remove();
  42194. }
  42195. };
  42196. }
  42197. var replaceText = (function () {
  42198. var textStore = [];
  42199. return function (index, replacement) {
  42200. textStore[index] = replacement;
  42201. return textStore.filter(Boolean).join('\n');
  42202. };
  42203. })();
  42204. function applyToSingletonTag (style, index, remove, obj) {
  42205. var css = remove ? "" : obj.css;
  42206. if (style.styleSheet) {
  42207. style.styleSheet.cssText = replaceText(index, css);
  42208. } else {
  42209. var cssNode = document.createTextNode(css);
  42210. var childNodes = style.childNodes;
  42211. if (childNodes[index]) style.removeChild(childNodes[index]);
  42212. if (childNodes.length) {
  42213. style.insertBefore(cssNode, childNodes[index]);
  42214. } else {
  42215. style.appendChild(cssNode);
  42216. }
  42217. }
  42218. }
  42219. function applyToTag (style, obj) {
  42220. var css = obj.css;
  42221. var media = obj.media;
  42222. if(media) {
  42223. style.setAttribute("media", media)
  42224. }
  42225. if(style.styleSheet) {
  42226. style.styleSheet.cssText = css;
  42227. } else {
  42228. while(style.firstChild) {
  42229. style.removeChild(style.firstChild);
  42230. }
  42231. style.appendChild(document.createTextNode(css));
  42232. }
  42233. }
  42234. function updateLink (link, options, obj) {
  42235. var css = obj.css;
  42236. var sourceMap = obj.sourceMap;
  42237. /*
  42238. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  42239. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  42240. on by default. Otherwise default to the convertToAbsoluteUrls option
  42241. directly
  42242. */
  42243. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  42244. if (options.convertToAbsoluteUrls || autoFixUrls) {
  42245. css = fixUrls(css);
  42246. }
  42247. if (sourceMap) {
  42248. // http://stackoverflow.com/a/26603875
  42249. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  42250. }
  42251. var blob = new Blob([css], { type: "text/css" });
  42252. var oldSrc = link.href;
  42253. link.href = URL.createObjectURL(blob);
  42254. if(oldSrc) URL.revokeObjectURL(oldSrc);
  42255. }
  42256. /***/ }),
  42257. /***/ "./node_modules/style-loader/lib/urls.js":
  42258. /*!***********************************************!*\
  42259. !*** ./node_modules/style-loader/lib/urls.js ***!
  42260. \***********************************************/
  42261. /*! dynamic exports provided */
  42262. /*! all exports used */
  42263. /***/ (function(module, exports) {
  42264. /**
  42265. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  42266. * embed the css on the page. This breaks all relative urls because now they are relative to a
  42267. * bundle instead of the current page.
  42268. *
  42269. * One solution is to only use full urls, but that may be impossible.
  42270. *
  42271. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  42272. *
  42273. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  42274. *
  42275. */
  42276. module.exports = function (css) {
  42277. // get current location
  42278. var location = typeof window !== "undefined" && window.location;
  42279. if (!location) {
  42280. throw new Error("fixUrls requires window.location");
  42281. }
  42282. // blank or null?
  42283. if (!css || typeof css !== "string") {
  42284. return css;
  42285. }
  42286. var baseUrl = location.protocol + "//" + location.host;
  42287. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  42288. // convert each url(...)
  42289. /*
  42290. This regular expression is just a way to recursively match brackets within
  42291. a string.
  42292. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  42293. ( = Start a capturing group
  42294. (?: = Start a non-capturing group
  42295. [^)(] = Match anything that isn't a parentheses
  42296. | = OR
  42297. \( = Match a start parentheses
  42298. (?: = Start another non-capturing groups
  42299. [^)(]+ = Match anything that isn't a parentheses
  42300. | = OR
  42301. \( = Match a start parentheses
  42302. [^)(]* = Match anything that isn't a parentheses
  42303. \) = Match a end parentheses
  42304. ) = End Group
  42305. *\) = Match anything and then a close parens
  42306. ) = Close non-capturing group
  42307. * = Match anything
  42308. ) = Close capturing group
  42309. \) = Match a close parens
  42310. /gi = Get all matches, not the first. Be case insensitive.
  42311. */
  42312. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  42313. // strip quotes (if they exist)
  42314. var unquotedOrigUrl = origUrl
  42315. .trim()
  42316. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  42317. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  42318. // already a full url? no change
  42319. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
  42320. return fullMatch;
  42321. }
  42322. // convert the url to a full url
  42323. var newUrl;
  42324. if (unquotedOrigUrl.indexOf("//") === 0) {
  42325. //TODO: should we add protocol?
  42326. newUrl = unquotedOrigUrl;
  42327. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  42328. // path should be relative to the base url
  42329. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  42330. } else {
  42331. // path should be relative to current directory
  42332. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  42333. }
  42334. // send back the fixed url(...)
  42335. return "url(" + JSON.stringify(newUrl) + ")";
  42336. });
  42337. // send back the fixed css
  42338. return fixedCss;
  42339. };
  42340. /***/ }),
  42341. /***/ "./node_modules/symbol-observable/es/index.js":
  42342. /*!****************************************************!*\
  42343. !*** ./node_modules/symbol-observable/es/index.js ***!
  42344. \****************************************************/
  42345. /*! exports provided: default */
  42346. /*! exports used: default */
  42347. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  42348. "use strict";
  42349. /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill_js__ = __webpack_require__(/*! ./ponyfill.js */ "./node_modules/symbol-observable/es/ponyfill.js");
  42350. /* global window */
  42351. var root;
  42352. if (typeof self !== 'undefined') {
  42353. root = self;
  42354. } else if (typeof window !== 'undefined') {
  42355. root = window;
  42356. } else if (typeof global !== 'undefined') {
  42357. root = global;
  42358. } else if (true) {
  42359. root = module;
  42360. } else {
  42361. root = Function('return this')();
  42362. }
  42363. var result = Object(__WEBPACK_IMPORTED_MODULE_0__ponyfill_js__["a" /* default */])(root);
  42364. /* harmony default export */ __webpack_exports__["a"] = (result);
  42365. /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../webpack/buildin/harmony-module.js */ "./node_modules/webpack/buildin/harmony-module.js")(module)))
  42366. /***/ }),
  42367. /***/ "./node_modules/symbol-observable/es/ponyfill.js":
  42368. /*!*******************************************************!*\
  42369. !*** ./node_modules/symbol-observable/es/ponyfill.js ***!
  42370. \*******************************************************/
  42371. /*! exports provided: default */
  42372. /*! exports used: default */
  42373. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  42374. "use strict";
  42375. /* harmony export (immutable) */ __webpack_exports__["a"] = symbolObservablePonyfill;
  42376. function symbolObservablePonyfill(root) {
  42377. var result;
  42378. var Symbol = root.Symbol;
  42379. if (typeof Symbol === 'function') {
  42380. if (Symbol.observable) {
  42381. result = Symbol.observable;
  42382. } else {
  42383. result = Symbol('observable');
  42384. Symbol.observable = result;
  42385. }
  42386. } else {
  42387. result = '@@observable';
  42388. }
  42389. return result;
  42390. };
  42391. /***/ }),
  42392. /***/ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js":
  42393. /*!****************************************************************!*\
  42394. !*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js ***!
  42395. \****************************************************************/
  42396. /*! exports provided: default */
  42397. /*! exports used: default */
  42398. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  42399. "use strict";
  42400. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return invariant; });
  42401. var isProduction = "development" === 'production';
  42402. var prefix = 'Invariant failed';
  42403. function invariant(condition, message) {
  42404. if (condition) {
  42405. return;
  42406. }
  42407. if (isProduction) {
  42408. throw new Error(prefix);
  42409. }
  42410. var provided = typeof message === 'function' ? message() : message;
  42411. var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
  42412. throw new Error(value);
  42413. }
  42414. /***/ }),
  42415. /***/ "./node_modules/tiny-warning/dist/tiny-warning.esm.js":
  42416. /*!************************************************************!*\
  42417. !*** ./node_modules/tiny-warning/dist/tiny-warning.esm.js ***!
  42418. \************************************************************/
  42419. /*! exports provided: default */
  42420. /*! exports used: default */
  42421. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  42422. "use strict";
  42423. var isProduction = "development" === 'production';
  42424. function warning(condition, message) {
  42425. if (!isProduction) {
  42426. if (condition) {
  42427. return;
  42428. }
  42429. var text = "Warning: " + message;
  42430. if (typeof console !== 'undefined') {
  42431. console.warn(text);
  42432. }
  42433. try {
  42434. throw Error(text);
  42435. } catch (x) {}
  42436. }
  42437. }
  42438. /* harmony default export */ __webpack_exports__["a"] = (warning);
  42439. /***/ }),
  42440. /***/ "./node_modules/url-parse/index.js":
  42441. /*!*****************************************!*\
  42442. !*** ./node_modules/url-parse/index.js ***!
  42443. \*****************************************/
  42444. /*! dynamic exports provided */
  42445. /*! all exports used */
  42446. /***/ (function(module, exports, __webpack_require__) {
  42447. "use strict";
  42448. /* WEBPACK VAR INJECTION */(function(global) {
  42449. var required = __webpack_require__(/*! requires-port */ "./node_modules/requires-port/index.js")
  42450. , qs = __webpack_require__(/*! querystringify */ "./node_modules/querystringify/index.js")
  42451. , controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/
  42452. , CRHTLF = /[\n\r\t]/g
  42453. , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//
  42454. , port = /:\d+$/
  42455. , protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i
  42456. , windowsDriveLetter = /^[a-zA-Z]:/;
  42457. /**
  42458. * Remove control characters and whitespace from the beginning of a string.
  42459. *
  42460. * @param {Object|String} str String to trim.
  42461. * @returns {String} A new string representing `str` stripped of control
  42462. * characters and whitespace from its beginning.
  42463. * @public
  42464. */
  42465. function trimLeft(str) {
  42466. return (str ? str : '').toString().replace(controlOrWhitespace, '');
  42467. }
  42468. /**
  42469. * These are the parse rules for the URL parser, it informs the parser
  42470. * about:
  42471. *
  42472. * 0. The char it Needs to parse, if it's a string it should be done using
  42473. * indexOf, RegExp using exec and NaN means set as current value.
  42474. * 1. The property we should set when parsing this value.
  42475. * 2. Indication if it's backwards or forward parsing, when set as number it's
  42476. * the value of extra chars that should be split off.
  42477. * 3. Inherit from location if non existing in the parser.
  42478. * 4. `toLowerCase` the resulting value.
  42479. */
  42480. var rules = [
  42481. ['#', 'hash'], // Extract from the back.
  42482. ['?', 'query'], // Extract from the back.
  42483. function sanitize(address, url) { // Sanitize what is left of the address
  42484. return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
  42485. },
  42486. ['/', 'pathname'], // Extract from the back.
  42487. ['@', 'auth', 1], // Extract from the front.
  42488. [NaN, 'host', undefined, 1, 1], // Set left over value.
  42489. [/:(\d*)$/, 'port', undefined, 1], // RegExp the back.
  42490. [NaN, 'hostname', undefined, 1, 1] // Set left over.
  42491. ];
  42492. /**
  42493. * These properties should not be copied or inherited from. This is only needed
  42494. * for all non blob URL's as a blob URL does not include a hash, only the
  42495. * origin.
  42496. *
  42497. * @type {Object}
  42498. * @private
  42499. */
  42500. var ignore = { hash: 1, query: 1 };
  42501. /**
  42502. * The location object differs when your code is loaded through a normal page,
  42503. * Worker or through a worker using a blob. And with the blobble begins the
  42504. * trouble as the location object will contain the URL of the blob, not the
  42505. * location of the page where our code is loaded in. The actual origin is
  42506. * encoded in the `pathname` so we can thankfully generate a good "default"
  42507. * location from it so we can generate proper relative URL's again.
  42508. *
  42509. * @param {Object|String} loc Optional default location object.
  42510. * @returns {Object} lolcation object.
  42511. * @public
  42512. */
  42513. function lolcation(loc) {
  42514. var globalVar;
  42515. if (typeof window !== 'undefined') globalVar = window;
  42516. else if (typeof global !== 'undefined') globalVar = global;
  42517. else if (typeof self !== 'undefined') globalVar = self;
  42518. else globalVar = {};
  42519. var location = globalVar.location || {};
  42520. loc = loc || location;
  42521. var finaldestination = {}
  42522. , type = typeof loc
  42523. , key;
  42524. if ('blob:' === loc.protocol) {
  42525. finaldestination = new Url(unescape(loc.pathname), {});
  42526. } else if ('string' === type) {
  42527. finaldestination = new Url(loc, {});
  42528. for (key in ignore) delete finaldestination[key];
  42529. } else if ('object' === type) {
  42530. for (key in loc) {
  42531. if (key in ignore) continue;
  42532. finaldestination[key] = loc[key];
  42533. }
  42534. if (finaldestination.slashes === undefined) {
  42535. finaldestination.slashes = slashes.test(loc.href);
  42536. }
  42537. }
  42538. return finaldestination;
  42539. }
  42540. /**
  42541. * Check whether a protocol scheme is special.
  42542. *
  42543. * @param {String} The protocol scheme of the URL
  42544. * @return {Boolean} `true` if the protocol scheme is special, else `false`
  42545. * @private
  42546. */
  42547. function isSpecial(scheme) {
  42548. return (
  42549. scheme === 'file:' ||
  42550. scheme === 'ftp:' ||
  42551. scheme === 'http:' ||
  42552. scheme === 'https:' ||
  42553. scheme === 'ws:' ||
  42554. scheme === 'wss:'
  42555. );
  42556. }
  42557. /**
  42558. * @typedef ProtocolExtract
  42559. * @type Object
  42560. * @property {String} protocol Protocol matched in the URL, in lowercase.
  42561. * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
  42562. * @property {String} rest Rest of the URL that is not part of the protocol.
  42563. */
  42564. /**
  42565. * Extract protocol information from a URL with/without double slash ("//").
  42566. *
  42567. * @param {String} address URL we want to extract from.
  42568. * @param {Object} location
  42569. * @return {ProtocolExtract} Extracted information.
  42570. * @private
  42571. */
  42572. function extractProtocol(address, location) {
  42573. address = trimLeft(address);
  42574. address = address.replace(CRHTLF, '');
  42575. location = location || {};
  42576. var match = protocolre.exec(address);
  42577. var protocol = match[1] ? match[1].toLowerCase() : '';
  42578. var forwardSlashes = !!match[2];
  42579. var otherSlashes = !!match[3];
  42580. var slashesCount = 0;
  42581. var rest;
  42582. if (forwardSlashes) {
  42583. if (otherSlashes) {
  42584. rest = match[2] + match[3] + match[4];
  42585. slashesCount = match[2].length + match[3].length;
  42586. } else {
  42587. rest = match[2] + match[4];
  42588. slashesCount = match[2].length;
  42589. }
  42590. } else {
  42591. if (otherSlashes) {
  42592. rest = match[3] + match[4];
  42593. slashesCount = match[3].length;
  42594. } else {
  42595. rest = match[4]
  42596. }
  42597. }
  42598. if (protocol === 'file:') {
  42599. if (slashesCount >= 2) {
  42600. rest = rest.slice(2);
  42601. }
  42602. } else if (isSpecial(protocol)) {
  42603. rest = match[4];
  42604. } else if (protocol) {
  42605. if (forwardSlashes) {
  42606. rest = rest.slice(2);
  42607. }
  42608. } else if (slashesCount >= 2 && isSpecial(location.protocol)) {
  42609. rest = match[4];
  42610. }
  42611. return {
  42612. protocol: protocol,
  42613. slashes: forwardSlashes || isSpecial(protocol),
  42614. slashesCount: slashesCount,
  42615. rest: rest
  42616. };
  42617. }
  42618. /**
  42619. * Resolve a relative URL pathname against a base URL pathname.
  42620. *
  42621. * @param {String} relative Pathname of the relative URL.
  42622. * @param {String} base Pathname of the base URL.
  42623. * @return {String} Resolved pathname.
  42624. * @private
  42625. */
  42626. function resolve(relative, base) {
  42627. if (relative === '') return base;
  42628. var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))
  42629. , i = path.length
  42630. , last = path[i - 1]
  42631. , unshift = false
  42632. , up = 0;
  42633. while (i--) {
  42634. if (path[i] === '.') {
  42635. path.splice(i, 1);
  42636. } else if (path[i] === '..') {
  42637. path.splice(i, 1);
  42638. up++;
  42639. } else if (up) {
  42640. if (i === 0) unshift = true;
  42641. path.splice(i, 1);
  42642. up--;
  42643. }
  42644. }
  42645. if (unshift) path.unshift('');
  42646. if (last === '.' || last === '..') path.push('');
  42647. return path.join('/');
  42648. }
  42649. /**
  42650. * The actual URL instance. Instead of returning an object we've opted-in to
  42651. * create an actual constructor as it's much more memory efficient and
  42652. * faster and it pleases my OCD.
  42653. *
  42654. * It is worth noting that we should not use `URL` as class name to prevent
  42655. * clashes with the global URL instance that got introduced in browsers.
  42656. *
  42657. * @constructor
  42658. * @param {String} address URL we want to parse.
  42659. * @param {Object|String} [location] Location defaults for relative paths.
  42660. * @param {Boolean|Function} [parser] Parser for the query string.
  42661. * @private
  42662. */
  42663. function Url(address, location, parser) {
  42664. address = trimLeft(address);
  42665. address = address.replace(CRHTLF, '');
  42666. if (!(this instanceof Url)) {
  42667. return new Url(address, location, parser);
  42668. }
  42669. var relative, extracted, parse, instruction, index, key
  42670. , instructions = rules.slice()
  42671. , type = typeof location
  42672. , url = this
  42673. , i = 0;
  42674. //
  42675. // The following if statements allows this module two have compatibility with
  42676. // 2 different API:
  42677. //
  42678. // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
  42679. // where the boolean indicates that the query string should also be parsed.
  42680. //
  42681. // 2. The `URL` interface of the browser which accepts a URL, object as
  42682. // arguments. The supplied object will be used as default values / fall-back
  42683. // for relative paths.
  42684. //
  42685. if ('object' !== type && 'string' !== type) {
  42686. parser = location;
  42687. location = null;
  42688. }
  42689. if (parser && 'function' !== typeof parser) parser = qs.parse;
  42690. location = lolcation(location);
  42691. //
  42692. // Extract protocol information before running the instructions.
  42693. //
  42694. extracted = extractProtocol(address || '', location);
  42695. relative = !extracted.protocol && !extracted.slashes;
  42696. url.slashes = extracted.slashes || relative && location.slashes;
  42697. url.protocol = extracted.protocol || location.protocol || '';
  42698. address = extracted.rest;
  42699. //
  42700. // When the authority component is absent the URL starts with a path
  42701. // component.
  42702. //
  42703. if (
  42704. extracted.protocol === 'file:' && (
  42705. extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) ||
  42706. (!extracted.slashes &&
  42707. (extracted.protocol ||
  42708. extracted.slashesCount < 2 ||
  42709. !isSpecial(url.protocol)))
  42710. ) {
  42711. instructions[3] = [/(.*)/, 'pathname'];
  42712. }
  42713. for (; i < instructions.length; i++) {
  42714. instruction = instructions[i];
  42715. if (typeof instruction === 'function') {
  42716. address = instruction(address, url);
  42717. continue;
  42718. }
  42719. parse = instruction[0];
  42720. key = instruction[1];
  42721. if (parse !== parse) {
  42722. url[key] = address;
  42723. } else if ('string' === typeof parse) {
  42724. index = parse === '@'
  42725. ? address.lastIndexOf(parse)
  42726. : address.indexOf(parse);
  42727. if (~index) {
  42728. if ('number' === typeof instruction[2]) {
  42729. url[key] = address.slice(0, index);
  42730. address = address.slice(index + instruction[2]);
  42731. } else {
  42732. url[key] = address.slice(index);
  42733. address = address.slice(0, index);
  42734. }
  42735. }
  42736. } else if ((index = parse.exec(address))) {
  42737. url[key] = index[1];
  42738. address = address.slice(0, index.index);
  42739. }
  42740. url[key] = url[key] || (
  42741. relative && instruction[3] ? location[key] || '' : ''
  42742. );
  42743. //
  42744. // Hostname, host and protocol should be lowercased so they can be used to
  42745. // create a proper `origin`.
  42746. //
  42747. if (instruction[4]) url[key] = url[key].toLowerCase();
  42748. }
  42749. //
  42750. // Also parse the supplied query string in to an object. If we're supplied
  42751. // with a custom parser as function use that instead of the default build-in
  42752. // parser.
  42753. //
  42754. if (parser) url.query = parser(url.query);
  42755. //
  42756. // If the URL is relative, resolve the pathname against the base URL.
  42757. //
  42758. if (
  42759. relative
  42760. && location.slashes
  42761. && url.pathname.charAt(0) !== '/'
  42762. && (url.pathname !== '' || location.pathname !== '')
  42763. ) {
  42764. url.pathname = resolve(url.pathname, location.pathname);
  42765. }
  42766. //
  42767. // Default to a / for pathname if none exists. This normalizes the URL
  42768. // to always have a /
  42769. //
  42770. if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
  42771. url.pathname = '/' + url.pathname;
  42772. }
  42773. //
  42774. // We should not add port numbers if they are already the default port number
  42775. // for a given protocol. As the host also contains the port number we're going
  42776. // override it with the hostname which contains no port number.
  42777. //
  42778. if (!required(url.port, url.protocol)) {
  42779. url.host = url.hostname;
  42780. url.port = '';
  42781. }
  42782. //
  42783. // Parse down the `auth` for the username and password.
  42784. //
  42785. url.username = url.password = '';
  42786. if (url.auth) {
  42787. index = url.auth.indexOf(':');
  42788. if (~index) {
  42789. url.username = url.auth.slice(0, index);
  42790. url.username = encodeURIComponent(decodeURIComponent(url.username));
  42791. url.password = url.auth.slice(index + 1);
  42792. url.password = encodeURIComponent(decodeURIComponent(url.password))
  42793. } else {
  42794. url.username = encodeURIComponent(decodeURIComponent(url.auth));
  42795. }
  42796. url.auth = url.password ? url.username +':'+ url.password : url.username;
  42797. }
  42798. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
  42799. ? url.protocol +'//'+ url.host
  42800. : 'null';
  42801. //
  42802. // The href is just the compiled result.
  42803. //
  42804. url.href = url.toString();
  42805. }
  42806. /**
  42807. * This is convenience method for changing properties in the URL instance to
  42808. * insure that they all propagate correctly.
  42809. *
  42810. * @param {String} part Property we need to adjust.
  42811. * @param {Mixed} value The newly assigned value.
  42812. * @param {Boolean|Function} fn When setting the query, it will be the function
  42813. * used to parse the query.
  42814. * When setting the protocol, double slash will be
  42815. * removed from the final url if it is true.
  42816. * @returns {URL} URL instance for chaining.
  42817. * @public
  42818. */
  42819. function set(part, value, fn) {
  42820. var url = this;
  42821. switch (part) {
  42822. case 'query':
  42823. if ('string' === typeof value && value.length) {
  42824. value = (fn || qs.parse)(value);
  42825. }
  42826. url[part] = value;
  42827. break;
  42828. case 'port':
  42829. url[part] = value;
  42830. if (!required(value, url.protocol)) {
  42831. url.host = url.hostname;
  42832. url[part] = '';
  42833. } else if (value) {
  42834. url.host = url.hostname +':'+ value;
  42835. }
  42836. break;
  42837. case 'hostname':
  42838. url[part] = value;
  42839. if (url.port) value += ':'+ url.port;
  42840. url.host = value;
  42841. break;
  42842. case 'host':
  42843. url[part] = value;
  42844. if (port.test(value)) {
  42845. value = value.split(':');
  42846. url.port = value.pop();
  42847. url.hostname = value.join(':');
  42848. } else {
  42849. url.hostname = value;
  42850. url.port = '';
  42851. }
  42852. break;
  42853. case 'protocol':
  42854. url.protocol = value.toLowerCase();
  42855. url.slashes = !fn;
  42856. break;
  42857. case 'pathname':
  42858. case 'hash':
  42859. if (value) {
  42860. var char = part === 'pathname' ? '/' : '#';
  42861. url[part] = value.charAt(0) !== char ? char + value : value;
  42862. } else {
  42863. url[part] = value;
  42864. }
  42865. break;
  42866. case 'username':
  42867. case 'password':
  42868. url[part] = encodeURIComponent(value);
  42869. break;
  42870. case 'auth':
  42871. var index = value.indexOf(':');
  42872. if (~index) {
  42873. url.username = value.slice(0, index);
  42874. url.username = encodeURIComponent(decodeURIComponent(url.username));
  42875. url.password = value.slice(index + 1);
  42876. url.password = encodeURIComponent(decodeURIComponent(url.password));
  42877. } else {
  42878. url.username = encodeURIComponent(decodeURIComponent(value));
  42879. }
  42880. }
  42881. for (var i = 0; i < rules.length; i++) {
  42882. var ins = rules[i];
  42883. if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
  42884. }
  42885. url.auth = url.password ? url.username +':'+ url.password : url.username;
  42886. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
  42887. ? url.protocol +'//'+ url.host
  42888. : 'null';
  42889. url.href = url.toString();
  42890. return url;
  42891. }
  42892. /**
  42893. * Transform the properties back in to a valid and full URL string.
  42894. *
  42895. * @param {Function} stringify Optional query stringify function.
  42896. * @returns {String} Compiled version of the URL.
  42897. * @public
  42898. */
  42899. function toString(stringify) {
  42900. if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
  42901. var query
  42902. , url = this
  42903. , host = url.host
  42904. , protocol = url.protocol;
  42905. if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
  42906. var result =
  42907. protocol +
  42908. ((url.protocol && url.slashes) || isSpecial(url.protocol) ? '//' : '');
  42909. if (url.username) {
  42910. result += url.username;
  42911. if (url.password) result += ':'+ url.password;
  42912. result += '@';
  42913. } else if (url.password) {
  42914. result += ':'+ url.password;
  42915. result += '@';
  42916. } else if (
  42917. url.protocol !== 'file:' &&
  42918. isSpecial(url.protocol) &&
  42919. !host &&
  42920. url.pathname !== '/'
  42921. ) {
  42922. //
  42923. // Add back the empty userinfo, otherwise the original invalid URL
  42924. // might be transformed into a valid one with `url.pathname` as host.
  42925. //
  42926. result += '@';
  42927. }
  42928. //
  42929. // Trailing colon is removed from `url.host` when it is parsed. If it still
  42930. // ends with a colon, then add back the trailing colon that was removed. This
  42931. // prevents an invalid URL from being transformed into a valid one.
  42932. //
  42933. if (host[host.length - 1] === ':' || (port.test(url.hostname) && !url.port)) {
  42934. host += ':';
  42935. }
  42936. result += host + url.pathname;
  42937. query = 'object' === typeof url.query ? stringify(url.query) : url.query;
  42938. if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;
  42939. if (url.hash) result += url.hash;
  42940. return result;
  42941. }
  42942. Url.prototype = { set: set, toString: toString };
  42943. //
  42944. // Expose the URL parser and some additional properties that might be useful for
  42945. // others or testing.
  42946. //
  42947. Url.extractProtocol = extractProtocol;
  42948. Url.location = lolcation;
  42949. Url.trimLeft = trimLeft;
  42950. Url.qs = qs;
  42951. module.exports = Url;
  42952. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  42953. /***/ }),
  42954. /***/ "./node_modules/url/url.js":
  42955. /*!*********************************!*\
  42956. !*** ./node_modules/url/url.js ***!
  42957. \*********************************/
  42958. /*! dynamic exports provided */
  42959. /*! all exports used */
  42960. /***/ (function(module, exports, __webpack_require__) {
  42961. "use strict";
  42962. // Copyright Joyent, Inc. and other Node contributors.
  42963. //
  42964. // Permission is hereby granted, free of charge, to any person obtaining a
  42965. // copy of this software and associated documentation files (the
  42966. // "Software"), to deal in the Software without restriction, including
  42967. // without limitation the rights to use, copy, modify, merge, publish,
  42968. // distribute, sublicense, and/or sell copies of the Software, and to permit
  42969. // persons to whom the Software is furnished to do so, subject to the
  42970. // following conditions:
  42971. //
  42972. // The above copyright notice and this permission notice shall be included
  42973. // in all copies or substantial portions of the Software.
  42974. //
  42975. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  42976. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  42977. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  42978. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  42979. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  42980. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  42981. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  42982. var punycode = __webpack_require__(/*! punycode */ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js");
  42983. var util = __webpack_require__(/*! ./util */ "./node_modules/url/util.js");
  42984. exports.parse = urlParse;
  42985. exports.resolve = urlResolve;
  42986. exports.resolveObject = urlResolveObject;
  42987. exports.format = urlFormat;
  42988. exports.Url = Url;
  42989. function Url() {
  42990. this.protocol = null;
  42991. this.slashes = null;
  42992. this.auth = null;
  42993. this.host = null;
  42994. this.port = null;
  42995. this.hostname = null;
  42996. this.hash = null;
  42997. this.search = null;
  42998. this.query = null;
  42999. this.pathname = null;
  43000. this.path = null;
  43001. this.href = null;
  43002. }
  43003. // Reference: RFC 3986, RFC 1808, RFC 2396
  43004. // define these here so at least they only have to be
  43005. // compiled once on the first module load.
  43006. var protocolPattern = /^([a-z0-9.+-]+:)/i,
  43007. portPattern = /:[0-9]*$/,
  43008. // Special case for a simple path URL
  43009. simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  43010. // RFC 2396: characters reserved for delimiting URLs.
  43011. // We actually just auto-escape these.
  43012. delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
  43013. // RFC 2396: characters not allowed for various reasons.
  43014. unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
  43015. // Allowed by RFCs, but cause of XSS attacks. Always escape these.
  43016. autoEscape = ['\''].concat(unwise),
  43017. // Characters that are never ever allowed in a hostname.
  43018. // Note that any invalid chars are also handled, but these
  43019. // are the ones that are *expected* to be seen, so we fast-path
  43020. // them.
  43021. nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
  43022. hostEndingChars = ['/', '?', '#'],
  43023. hostnameMaxLen = 255,
  43024. hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
  43025. hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  43026. // protocols that can allow "unsafe" and "unwise" chars.
  43027. unsafeProtocol = {
  43028. 'javascript': true,
  43029. 'javascript:': true
  43030. },
  43031. // protocols that never have a hostname.
  43032. hostlessProtocol = {
  43033. 'javascript': true,
  43034. 'javascript:': true
  43035. },
  43036. // protocols that always contain a // bit.
  43037. slashedProtocol = {
  43038. 'http': true,
  43039. 'https': true,
  43040. 'ftp': true,
  43041. 'gopher': true,
  43042. 'file': true,
  43043. 'http:': true,
  43044. 'https:': true,
  43045. 'ftp:': true,
  43046. 'gopher:': true,
  43047. 'file:': true
  43048. },
  43049. querystring = __webpack_require__(/*! querystring */ "./node_modules/querystring-es3/index.js");
  43050. function urlParse(url, parseQueryString, slashesDenoteHost) {
  43051. if (url && util.isObject(url) && url instanceof Url) return url;
  43052. var u = new Url;
  43053. u.parse(url, parseQueryString, slashesDenoteHost);
  43054. return u;
  43055. }
  43056. Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
  43057. if (!util.isString(url)) {
  43058. throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
  43059. }
  43060. // Copy chrome, IE, opera backslash-handling behavior.
  43061. // Back slashes before the query string get converted to forward slashes
  43062. // See: https://code.google.com/p/chromium/issues/detail?id=25916
  43063. var queryIndex = url.indexOf('?'),
  43064. splitter =
  43065. (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
  43066. uSplit = url.split(splitter),
  43067. slashRegex = /\\/g;
  43068. uSplit[0] = uSplit[0].replace(slashRegex, '/');
  43069. url = uSplit.join(splitter);
  43070. var rest = url;
  43071. // trim before proceeding.
  43072. // This is to support parse stuff like " http://foo.com \n"
  43073. rest = rest.trim();
  43074. if (!slashesDenoteHost && url.split('#').length === 1) {
  43075. // Try fast path regexp
  43076. var simplePath = simplePathPattern.exec(rest);
  43077. if (simplePath) {
  43078. this.path = rest;
  43079. this.href = rest;
  43080. this.pathname = simplePath[1];
  43081. if (simplePath[2]) {
  43082. this.search = simplePath[2];
  43083. if (parseQueryString) {
  43084. this.query = querystring.parse(this.search.substr(1));
  43085. } else {
  43086. this.query = this.search.substr(1);
  43087. }
  43088. } else if (parseQueryString) {
  43089. this.search = '';
  43090. this.query = {};
  43091. }
  43092. return this;
  43093. }
  43094. }
  43095. var proto = protocolPattern.exec(rest);
  43096. if (proto) {
  43097. proto = proto[0];
  43098. var lowerProto = proto.toLowerCase();
  43099. this.protocol = lowerProto;
  43100. rest = rest.substr(proto.length);
  43101. }
  43102. // figure out if it's got a host
  43103. // user@server is *always* interpreted as a hostname, and url
  43104. // resolution will treat //foo/bar as host=foo,path=bar because that's
  43105. // how the browser resolves relative URLs.
  43106. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  43107. var slashes = rest.substr(0, 2) === '//';
  43108. if (slashes && !(proto && hostlessProtocol[proto])) {
  43109. rest = rest.substr(2);
  43110. this.slashes = true;
  43111. }
  43112. }
  43113. if (!hostlessProtocol[proto] &&
  43114. (slashes || (proto && !slashedProtocol[proto]))) {
  43115. // there's a hostname.
  43116. // the first instance of /, ?, ;, or # ends the host.
  43117. //
  43118. // If there is an @ in the hostname, then non-host chars *are* allowed
  43119. // to the left of the last @ sign, unless some host-ending character
  43120. // comes *before* the @-sign.
  43121. // URLs are obnoxious.
  43122. //
  43123. // ex:
  43124. // http://a@b@c/ => user:a@b host:c
  43125. // http://a@b?@c => user:a host:c path:/?@c
  43126. // v0.12 TODO(isaacs): This is not quite how Chrome does things.
  43127. // Review our test case against browsers more comprehensively.
  43128. // find the first instance of any hostEndingChars
  43129. var hostEnd = -1;
  43130. for (var i = 0; i < hostEndingChars.length; i++) {
  43131. var hec = rest.indexOf(hostEndingChars[i]);
  43132. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
  43133. hostEnd = hec;
  43134. }
  43135. // at this point, either we have an explicit point where the
  43136. // auth portion cannot go past, or the last @ char is the decider.
  43137. var auth, atSign;
  43138. if (hostEnd === -1) {
  43139. // atSign can be anywhere.
  43140. atSign = rest.lastIndexOf('@');
  43141. } else {
  43142. // atSign must be in auth portion.
  43143. // http://a@b/c@d => host:b auth:a path:/c@d
  43144. atSign = rest.lastIndexOf('@', hostEnd);
  43145. }
  43146. // Now we have a portion which is definitely the auth.
  43147. // Pull that off.
  43148. if (atSign !== -1) {
  43149. auth = rest.slice(0, atSign);
  43150. rest = rest.slice(atSign + 1);
  43151. this.auth = decodeURIComponent(auth);
  43152. }
  43153. // the host is the remaining to the left of the first non-host char
  43154. hostEnd = -1;
  43155. for (var i = 0; i < nonHostChars.length; i++) {
  43156. var hec = rest.indexOf(nonHostChars[i]);
  43157. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
  43158. hostEnd = hec;
  43159. }
  43160. // if we still have not hit it, then the entire thing is a host.
  43161. if (hostEnd === -1)
  43162. hostEnd = rest.length;
  43163. this.host = rest.slice(0, hostEnd);
  43164. rest = rest.slice(hostEnd);
  43165. // pull out port.
  43166. this.parseHost();
  43167. // we've indicated that there is a hostname,
  43168. // so even if it's empty, it has to be present.
  43169. this.hostname = this.hostname || '';
  43170. // if hostname begins with [ and ends with ]
  43171. // assume that it's an IPv6 address.
  43172. var ipv6Hostname = this.hostname[0] === '[' &&
  43173. this.hostname[this.hostname.length - 1] === ']';
  43174. // validate a little.
  43175. if (!ipv6Hostname) {
  43176. var hostparts = this.hostname.split(/\./);
  43177. for (var i = 0, l = hostparts.length; i < l; i++) {
  43178. var part = hostparts[i];
  43179. if (!part) continue;
  43180. if (!part.match(hostnamePartPattern)) {
  43181. var newpart = '';
  43182. for (var j = 0, k = part.length; j < k; j++) {
  43183. if (part.charCodeAt(j) > 127) {
  43184. // we replace non-ASCII char with a temporary placeholder
  43185. // we need this to make sure size of hostname is not
  43186. // broken by replacing non-ASCII by nothing
  43187. newpart += 'x';
  43188. } else {
  43189. newpart += part[j];
  43190. }
  43191. }
  43192. // we test again with ASCII char only
  43193. if (!newpart.match(hostnamePartPattern)) {
  43194. var validParts = hostparts.slice(0, i);
  43195. var notHost = hostparts.slice(i + 1);
  43196. var bit = part.match(hostnamePartStart);
  43197. if (bit) {
  43198. validParts.push(bit[1]);
  43199. notHost.unshift(bit[2]);
  43200. }
  43201. if (notHost.length) {
  43202. rest = '/' + notHost.join('.') + rest;
  43203. }
  43204. this.hostname = validParts.join('.');
  43205. break;
  43206. }
  43207. }
  43208. }
  43209. }
  43210. if (this.hostname.length > hostnameMaxLen) {
  43211. this.hostname = '';
  43212. } else {
  43213. // hostnames are always lower case.
  43214. this.hostname = this.hostname.toLowerCase();
  43215. }
  43216. if (!ipv6Hostname) {
  43217. // IDNA Support: Returns a punycoded representation of "domain".
  43218. // It only converts parts of the domain name that
  43219. // have non-ASCII characters, i.e. it doesn't matter if
  43220. // you call it with a domain that already is ASCII-only.
  43221. this.hostname = punycode.toASCII(this.hostname);
  43222. }
  43223. var p = this.port ? ':' + this.port : '';
  43224. var h = this.hostname || '';
  43225. this.host = h + p;
  43226. this.href += this.host;
  43227. // strip [ and ] from the hostname
  43228. // the host field still retains them, though
  43229. if (ipv6Hostname) {
  43230. this.hostname = this.hostname.substr(1, this.hostname.length - 2);
  43231. if (rest[0] !== '/') {
  43232. rest = '/' + rest;
  43233. }
  43234. }
  43235. }
  43236. // now rest is set to the post-host stuff.
  43237. // chop off any delim chars.
  43238. if (!unsafeProtocol[lowerProto]) {
  43239. // First, make 100% sure that any "autoEscape" chars get
  43240. // escaped, even if encodeURIComponent doesn't think they
  43241. // need to be.
  43242. for (var i = 0, l = autoEscape.length; i < l; i++) {
  43243. var ae = autoEscape[i];
  43244. if (rest.indexOf(ae) === -1)
  43245. continue;
  43246. var esc = encodeURIComponent(ae);
  43247. if (esc === ae) {
  43248. esc = escape(ae);
  43249. }
  43250. rest = rest.split(ae).join(esc);
  43251. }
  43252. }
  43253. // chop off from the tail first.
  43254. var hash = rest.indexOf('#');
  43255. if (hash !== -1) {
  43256. // got a fragment string.
  43257. this.hash = rest.substr(hash);
  43258. rest = rest.slice(0, hash);
  43259. }
  43260. var qm = rest.indexOf('?');
  43261. if (qm !== -1) {
  43262. this.search = rest.substr(qm);
  43263. this.query = rest.substr(qm + 1);
  43264. if (parseQueryString) {
  43265. this.query = querystring.parse(this.query);
  43266. }
  43267. rest = rest.slice(0, qm);
  43268. } else if (parseQueryString) {
  43269. // no query string, but parseQueryString still requested
  43270. this.search = '';
  43271. this.query = {};
  43272. }
  43273. if (rest) this.pathname = rest;
  43274. if (slashedProtocol[lowerProto] &&
  43275. this.hostname && !this.pathname) {
  43276. this.pathname = '/';
  43277. }
  43278. //to support http.request
  43279. if (this.pathname || this.search) {
  43280. var p = this.pathname || '';
  43281. var s = this.search || '';
  43282. this.path = p + s;
  43283. }
  43284. // finally, reconstruct the href based on what has been validated.
  43285. this.href = this.format();
  43286. return this;
  43287. };
  43288. // format a parsed object into a url string
  43289. function urlFormat(obj) {
  43290. // ensure it's an object, and not a string url.
  43291. // If it's an obj, this is a no-op.
  43292. // this way, you can call url_format() on strings
  43293. // to clean up potentially wonky urls.
  43294. if (util.isString(obj)) obj = urlParse(obj);
  43295. if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
  43296. return obj.format();
  43297. }
  43298. Url.prototype.format = function() {
  43299. var auth = this.auth || '';
  43300. if (auth) {
  43301. auth = encodeURIComponent(auth);
  43302. auth = auth.replace(/%3A/i, ':');
  43303. auth += '@';
  43304. }
  43305. var protocol = this.protocol || '',
  43306. pathname = this.pathname || '',
  43307. hash = this.hash || '',
  43308. host = false,
  43309. query = '';
  43310. if (this.host) {
  43311. host = auth + this.host;
  43312. } else if (this.hostname) {
  43313. host = auth + (this.hostname.indexOf(':') === -1 ?
  43314. this.hostname :
  43315. '[' + this.hostname + ']');
  43316. if (this.port) {
  43317. host += ':' + this.port;
  43318. }
  43319. }
  43320. if (this.query &&
  43321. util.isObject(this.query) &&
  43322. Object.keys(this.query).length) {
  43323. query = querystring.stringify(this.query);
  43324. }
  43325. var search = this.search || (query && ('?' + query)) || '';
  43326. if (protocol && protocol.substr(-1) !== ':') protocol += ':';
  43327. // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
  43328. // unless they had them to begin with.
  43329. if (this.slashes ||
  43330. (!protocol || slashedProtocol[protocol]) && host !== false) {
  43331. host = '//' + (host || '');
  43332. if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
  43333. } else if (!host) {
  43334. host = '';
  43335. }
  43336. if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
  43337. if (search && search.charAt(0) !== '?') search = '?' + search;
  43338. pathname = pathname.replace(/[?#]/g, function(match) {
  43339. return encodeURIComponent(match);
  43340. });
  43341. search = search.replace('#', '%23');
  43342. return protocol + host + pathname + search + hash;
  43343. };
  43344. function urlResolve(source, relative) {
  43345. return urlParse(source, false, true).resolve(relative);
  43346. }
  43347. Url.prototype.resolve = function(relative) {
  43348. return this.resolveObject(urlParse(relative, false, true)).format();
  43349. };
  43350. function urlResolveObject(source, relative) {
  43351. if (!source) return relative;
  43352. return urlParse(source, false, true).resolveObject(relative);
  43353. }
  43354. Url.prototype.resolveObject = function(relative) {
  43355. if (util.isString(relative)) {
  43356. var rel = new Url();
  43357. rel.parse(relative, false, true);
  43358. relative = rel;
  43359. }
  43360. var result = new Url();
  43361. var tkeys = Object.keys(this);
  43362. for (var tk = 0; tk < tkeys.length; tk++) {
  43363. var tkey = tkeys[tk];
  43364. result[tkey] = this[tkey];
  43365. }
  43366. // hash is always overridden, no matter what.
  43367. // even href="" will remove it.
  43368. result.hash = relative.hash;
  43369. // if the relative url is empty, then there's nothing left to do here.
  43370. if (relative.href === '') {
  43371. result.href = result.format();
  43372. return result;
  43373. }
  43374. // hrefs like //foo/bar always cut to the protocol.
  43375. if (relative.slashes && !relative.protocol) {
  43376. // take everything except the protocol from relative
  43377. var rkeys = Object.keys(relative);
  43378. for (var rk = 0; rk < rkeys.length; rk++) {
  43379. var rkey = rkeys[rk];
  43380. if (rkey !== 'protocol')
  43381. result[rkey] = relative[rkey];
  43382. }
  43383. //urlParse appends trailing / to urls like http://www.example.com
  43384. if (slashedProtocol[result.protocol] &&
  43385. result.hostname && !result.pathname) {
  43386. result.path = result.pathname = '/';
  43387. }
  43388. result.href = result.format();
  43389. return result;
  43390. }
  43391. if (relative.protocol && relative.protocol !== result.protocol) {
  43392. // if it's a known url protocol, then changing
  43393. // the protocol does weird things
  43394. // first, if it's not file:, then we MUST have a host,
  43395. // and if there was a path
  43396. // to begin with, then we MUST have a path.
  43397. // if it is file:, then the host is dropped,
  43398. // because that's known to be hostless.
  43399. // anything else is assumed to be absolute.
  43400. if (!slashedProtocol[relative.protocol]) {
  43401. var keys = Object.keys(relative);
  43402. for (var v = 0; v < keys.length; v++) {
  43403. var k = keys[v];
  43404. result[k] = relative[k];
  43405. }
  43406. result.href = result.format();
  43407. return result;
  43408. }
  43409. result.protocol = relative.protocol;
  43410. if (!relative.host && !hostlessProtocol[relative.protocol]) {
  43411. var relPath = (relative.pathname || '').split('/');
  43412. while (relPath.length && !(relative.host = relPath.shift()));
  43413. if (!relative.host) relative.host = '';
  43414. if (!relative.hostname) relative.hostname = '';
  43415. if (relPath[0] !== '') relPath.unshift('');
  43416. if (relPath.length < 2) relPath.unshift('');
  43417. result.pathname = relPath.join('/');
  43418. } else {
  43419. result.pathname = relative.pathname;
  43420. }
  43421. result.search = relative.search;
  43422. result.query = relative.query;
  43423. result.host = relative.host || '';
  43424. result.auth = relative.auth;
  43425. result.hostname = relative.hostname || relative.host;
  43426. result.port = relative.port;
  43427. // to support http.request
  43428. if (result.pathname || result.search) {
  43429. var p = result.pathname || '';
  43430. var s = result.search || '';
  43431. result.path = p + s;
  43432. }
  43433. result.slashes = result.slashes || relative.slashes;
  43434. result.href = result.format();
  43435. return result;
  43436. }
  43437. var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
  43438. isRelAbs = (
  43439. relative.host ||
  43440. relative.pathname && relative.pathname.charAt(0) === '/'
  43441. ),
  43442. mustEndAbs = (isRelAbs || isSourceAbs ||
  43443. (result.host && relative.pathname)),
  43444. removeAllDots = mustEndAbs,
  43445. srcPath = result.pathname && result.pathname.split('/') || [],
  43446. relPath = relative.pathname && relative.pathname.split('/') || [],
  43447. psychotic = result.protocol && !slashedProtocol[result.protocol];
  43448. // if the url is a non-slashed url, then relative
  43449. // links like ../.. should be able
  43450. // to crawl up to the hostname, as well. This is strange.
  43451. // result.protocol has already been set by now.
  43452. // Later on, put the first path part into the host field.
  43453. if (psychotic) {
  43454. result.hostname = '';
  43455. result.port = null;
  43456. if (result.host) {
  43457. if (srcPath[0] === '') srcPath[0] = result.host;
  43458. else srcPath.unshift(result.host);
  43459. }
  43460. result.host = '';
  43461. if (relative.protocol) {
  43462. relative.hostname = null;
  43463. relative.port = null;
  43464. if (relative.host) {
  43465. if (relPath[0] === '') relPath[0] = relative.host;
  43466. else relPath.unshift(relative.host);
  43467. }
  43468. relative.host = null;
  43469. }
  43470. mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
  43471. }
  43472. if (isRelAbs) {
  43473. // it's absolute.
  43474. result.host = (relative.host || relative.host === '') ?
  43475. relative.host : result.host;
  43476. result.hostname = (relative.hostname || relative.hostname === '') ?
  43477. relative.hostname : result.hostname;
  43478. result.search = relative.search;
  43479. result.query = relative.query;
  43480. srcPath = relPath;
  43481. // fall through to the dot-handling below.
  43482. } else if (relPath.length) {
  43483. // it's relative
  43484. // throw away the existing file, and take the new path instead.
  43485. if (!srcPath) srcPath = [];
  43486. srcPath.pop();
  43487. srcPath = srcPath.concat(relPath);
  43488. result.search = relative.search;
  43489. result.query = relative.query;
  43490. } else if (!util.isNullOrUndefined(relative.search)) {
  43491. // just pull out the search.
  43492. // like href='?foo'.
  43493. // Put this after the other two cases because it simplifies the booleans
  43494. if (psychotic) {
  43495. result.hostname = result.host = srcPath.shift();
  43496. //occationaly the auth can get stuck only in host
  43497. //this especially happens in cases like
  43498. //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
  43499. var authInHost = result.host && result.host.indexOf('@') > 0 ?
  43500. result.host.split('@') : false;
  43501. if (authInHost) {
  43502. result.auth = authInHost.shift();
  43503. result.host = result.hostname = authInHost.shift();
  43504. }
  43505. }
  43506. result.search = relative.search;
  43507. result.query = relative.query;
  43508. //to support http.request
  43509. if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
  43510. result.path = (result.pathname ? result.pathname : '') +
  43511. (result.search ? result.search : '');
  43512. }
  43513. result.href = result.format();
  43514. return result;
  43515. }
  43516. if (!srcPath.length) {
  43517. // no path at all. easy.
  43518. // we've already handled the other stuff above.
  43519. result.pathname = null;
  43520. //to support http.request
  43521. if (result.search) {
  43522. result.path = '/' + result.search;
  43523. } else {
  43524. result.path = null;
  43525. }
  43526. result.href = result.format();
  43527. return result;
  43528. }
  43529. // if a url ENDs in . or .., then it must get a trailing slash.
  43530. // however, if it ends in anything else non-slashy,
  43531. // then it must NOT get a trailing slash.
  43532. var last = srcPath.slice(-1)[0];
  43533. var hasTrailingSlash = (
  43534. (result.host || relative.host || srcPath.length > 1) &&
  43535. (last === '.' || last === '..') || last === '');
  43536. // strip single dots, resolve double dots to parent dir
  43537. // if the path tries to go above the root, `up` ends up > 0
  43538. var up = 0;
  43539. for (var i = srcPath.length; i >= 0; i--) {
  43540. last = srcPath[i];
  43541. if (last === '.') {
  43542. srcPath.splice(i, 1);
  43543. } else if (last === '..') {
  43544. srcPath.splice(i, 1);
  43545. up++;
  43546. } else if (up) {
  43547. srcPath.splice(i, 1);
  43548. up--;
  43549. }
  43550. }
  43551. // if the path is allowed to go above the root, restore leading ..s
  43552. if (!mustEndAbs && !removeAllDots) {
  43553. for (; up--; up) {
  43554. srcPath.unshift('..');
  43555. }
  43556. }
  43557. if (mustEndAbs && srcPath[0] !== '' &&
  43558. (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
  43559. srcPath.unshift('');
  43560. }
  43561. if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
  43562. srcPath.push('');
  43563. }
  43564. var isAbsolute = srcPath[0] === '' ||
  43565. (srcPath[0] && srcPath[0].charAt(0) === '/');
  43566. // put the host back
  43567. if (psychotic) {
  43568. result.hostname = result.host = isAbsolute ? '' :
  43569. srcPath.length ? srcPath.shift() : '';
  43570. //occationaly the auth can get stuck only in host
  43571. //this especially happens in cases like
  43572. //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
  43573. var authInHost = result.host && result.host.indexOf('@') > 0 ?
  43574. result.host.split('@') : false;
  43575. if (authInHost) {
  43576. result.auth = authInHost.shift();
  43577. result.host = result.hostname = authInHost.shift();
  43578. }
  43579. }
  43580. mustEndAbs = mustEndAbs || (result.host && srcPath.length);
  43581. if (mustEndAbs && !isAbsolute) {
  43582. srcPath.unshift('');
  43583. }
  43584. if (!srcPath.length) {
  43585. result.pathname = null;
  43586. result.path = null;
  43587. } else {
  43588. result.pathname = srcPath.join('/');
  43589. }
  43590. //to support request.http
  43591. if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
  43592. result.path = (result.pathname ? result.pathname : '') +
  43593. (result.search ? result.search : '');
  43594. }
  43595. result.auth = relative.auth || result.auth;
  43596. result.slashes = result.slashes || relative.slashes;
  43597. result.href = result.format();
  43598. return result;
  43599. };
  43600. Url.prototype.parseHost = function() {
  43601. var host = this.host;
  43602. var port = portPattern.exec(host);
  43603. if (port) {
  43604. port = port[0];
  43605. if (port !== ':') {
  43606. this.port = port.substr(1);
  43607. }
  43608. host = host.substr(0, host.length - port.length);
  43609. }
  43610. if (host) this.hostname = host;
  43611. };
  43612. /***/ }),
  43613. /***/ "./node_modules/url/util.js":
  43614. /*!**********************************!*\
  43615. !*** ./node_modules/url/util.js ***!
  43616. \**********************************/
  43617. /*! dynamic exports provided */
  43618. /*! all exports used */
  43619. /***/ (function(module, exports, __webpack_require__) {
  43620. "use strict";
  43621. module.exports = {
  43622. isString: function(arg) {
  43623. return typeof(arg) === 'string';
  43624. },
  43625. isObject: function(arg) {
  43626. return typeof(arg) === 'object' && arg !== null;
  43627. },
  43628. isNull: function(arg) {
  43629. return arg === null;
  43630. },
  43631. isNullOrUndefined: function(arg) {
  43632. return arg == null;
  43633. }
  43634. };
  43635. /***/ }),
  43636. /***/ "./node_modules/value-equal/esm/value-equal.js":
  43637. /*!*****************************************************!*\
  43638. !*** ./node_modules/value-equal/esm/value-equal.js ***!
  43639. \*****************************************************/
  43640. /*! exports provided: default */
  43641. /*! exports used: default */
  43642. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  43643. "use strict";
  43644. function valueOf(obj) {
  43645. return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
  43646. }
  43647. function valueEqual(a, b) {
  43648. // Test for strict equality first.
  43649. if (a === b) return true;
  43650. // Otherwise, if either of them == null they are not equal.
  43651. if (a == null || b == null) return false;
  43652. if (Array.isArray(a)) {
  43653. return (
  43654. Array.isArray(b) &&
  43655. a.length === b.length &&
  43656. a.every(function(item, index) {
  43657. return valueEqual(item, b[index]);
  43658. })
  43659. );
  43660. }
  43661. if (typeof a === 'object' || typeof b === 'object') {
  43662. var aValue = valueOf(a);
  43663. var bValue = valueOf(b);
  43664. if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
  43665. return Object.keys(Object.assign({}, a, b)).every(function(key) {
  43666. return valueEqual(a[key], b[key]);
  43667. });
  43668. }
  43669. return false;
  43670. }
  43671. /* harmony default export */ __webpack_exports__["a"] = (valueEqual);
  43672. /***/ }),
  43673. /***/ "./node_modules/warning/warning.js":
  43674. /*!*****************************************!*\
  43675. !*** ./node_modules/warning/warning.js ***!
  43676. \*****************************************/
  43677. /*! dynamic exports provided */
  43678. /*! exports used: default */
  43679. /***/ (function(module, exports, __webpack_require__) {
  43680. "use strict";
  43681. /**
  43682. * Copyright (c) 2014-present, Facebook, Inc.
  43683. *
  43684. * This source code is licensed under the MIT license found in the
  43685. * LICENSE file in the root directory of this source tree.
  43686. */
  43687. /**
  43688. * Similar to invariant but only logs a warning if the condition is not met.
  43689. * This can be used to log issues in development environments in critical
  43690. * paths. Removing the logging code for production environments will keep the
  43691. * same logic and follow the same code paths.
  43692. */
  43693. var __DEV__ = "development" !== 'production';
  43694. var warning = function() {};
  43695. if (__DEV__) {
  43696. var printWarning = function printWarning(format, args) {
  43697. var len = arguments.length;
  43698. args = new Array(len > 1 ? len - 1 : 0);
  43699. for (var key = 1; key < len; key++) {
  43700. args[key - 1] = arguments[key];
  43701. }
  43702. var argIndex = 0;
  43703. var message = 'Warning: ' +
  43704. format.replace(/%s/g, function() {
  43705. return args[argIndex++];
  43706. });
  43707. if (typeof console !== 'undefined') {
  43708. console.error(message);
  43709. }
  43710. try {
  43711. // --- Welcome to debugging React ---
  43712. // This error was thrown as a convenience so that you can use this stack
  43713. // to find the callsite that caused this warning to fire.
  43714. throw new Error(message);
  43715. } catch (x) {}
  43716. }
  43717. warning = function(condition, format, args) {
  43718. var len = arguments.length;
  43719. args = new Array(len > 2 ? len - 2 : 0);
  43720. for (var key = 2; key < len; key++) {
  43721. args[key - 2] = arguments[key];
  43722. }
  43723. if (format === undefined) {
  43724. throw new Error(
  43725. '`warning(condition, format, ...args)` requires a warning ' +
  43726. 'message argument'
  43727. );
  43728. }
  43729. if (!condition) {
  43730. printWarning.apply(null, [format].concat(args));
  43731. }
  43732. };
  43733. }
  43734. module.exports = warning;
  43735. /***/ }),
  43736. /***/ "./node_modules/webpack/buildin/amd-options.js":
  43737. /*!****************************************!*\
  43738. !*** (webpack)/buildin/amd-options.js ***!
  43739. \****************************************/
  43740. /*! dynamic exports provided */
  43741. /*! all exports used */
  43742. /***/ (function(module, exports) {
  43743. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  43744. module.exports = __webpack_amd_options__;
  43745. /* WEBPACK VAR INJECTION */}.call(exports, {}))
  43746. /***/ }),
  43747. /***/ "./node_modules/webpack/buildin/global.js":
  43748. /*!***********************************!*\
  43749. !*** (webpack)/buildin/global.js ***!
  43750. \***********************************/
  43751. /*! dynamic exports provided */
  43752. /*! all exports used */
  43753. /***/ (function(module, exports) {
  43754. var g;
  43755. // This works in non-strict mode
  43756. g = (function() {
  43757. return this;
  43758. })();
  43759. try {
  43760. // This works if eval is allowed (see CSP)
  43761. g = g || Function("return this")() || (1,eval)("this");
  43762. } catch(e) {
  43763. // This works if the window reference is available
  43764. if(typeof window === "object")
  43765. g = window;
  43766. }
  43767. // g can still be undefined, but nothing to do about it...
  43768. // We return undefined, instead of nothing here, so it's
  43769. // easier to handle this case. if(!global) { ...}
  43770. module.exports = g;
  43771. /***/ }),
  43772. /***/ "./node_modules/webpack/buildin/harmony-module.js":
  43773. /*!*******************************************!*\
  43774. !*** (webpack)/buildin/harmony-module.js ***!
  43775. \*******************************************/
  43776. /*! dynamic exports provided */
  43777. /*! all exports used */
  43778. /***/ (function(module, exports) {
  43779. module.exports = function(originalModule) {
  43780. if(!originalModule.webpackPolyfill) {
  43781. var module = Object.create(originalModule);
  43782. // module.parent = undefined by default
  43783. if(!module.children) module.children = [];
  43784. Object.defineProperty(module, "loaded", {
  43785. enumerable: true,
  43786. get: function() {
  43787. return module.l;
  43788. }
  43789. });
  43790. Object.defineProperty(module, "id", {
  43791. enumerable: true,
  43792. get: function() {
  43793. return module.i;
  43794. }
  43795. });
  43796. Object.defineProperty(module, "exports", {
  43797. enumerable: true,
  43798. });
  43799. module.webpackPolyfill = 1;
  43800. }
  43801. return module;
  43802. };
  43803. /***/ }),
  43804. /***/ "./node_modules/webpack/buildin/module.js":
  43805. /*!***********************************!*\
  43806. !*** (webpack)/buildin/module.js ***!
  43807. \***********************************/
  43808. /*! dynamic exports provided */
  43809. /*! all exports used */
  43810. /***/ (function(module, exports) {
  43811. module.exports = function(module) {
  43812. if(!module.webpackPolyfill) {
  43813. module.deprecate = function() {};
  43814. module.paths = [];
  43815. // module.parent = undefined by default
  43816. if(!module.children) module.children = [];
  43817. Object.defineProperty(module, "loaded", {
  43818. enumerable: true,
  43819. get: function() {
  43820. return module.l;
  43821. }
  43822. });
  43823. Object.defineProperty(module, "id", {
  43824. enumerable: true,
  43825. get: function() {
  43826. return module.i;
  43827. }
  43828. });
  43829. module.webpackPolyfill = 1;
  43830. }
  43831. return module;
  43832. };
  43833. /***/ }),
  43834. /***/ "./node_modules/whatwg-fetch/fetch.js":
  43835. /*!********************************************!*\
  43836. !*** ./node_modules/whatwg-fetch/fetch.js ***!
  43837. \********************************************/
  43838. /*! dynamic exports provided */
  43839. /*! all exports used */
  43840. /***/ (function(module, exports) {
  43841. (function(self) {
  43842. 'use strict';
  43843. if (self.fetch) {
  43844. return
  43845. }
  43846. var support = {
  43847. searchParams: 'URLSearchParams' in self,
  43848. iterable: 'Symbol' in self && 'iterator' in Symbol,
  43849. blob: 'FileReader' in self && 'Blob' in self && (function() {
  43850. try {
  43851. new Blob()
  43852. return true
  43853. } catch(e) {
  43854. return false
  43855. }
  43856. })(),
  43857. formData: 'FormData' in self,
  43858. arrayBuffer: 'ArrayBuffer' in self
  43859. }
  43860. if (support.arrayBuffer) {
  43861. var viewClasses = [
  43862. '[object Int8Array]',
  43863. '[object Uint8Array]',
  43864. '[object Uint8ClampedArray]',
  43865. '[object Int16Array]',
  43866. '[object Uint16Array]',
  43867. '[object Int32Array]',
  43868. '[object Uint32Array]',
  43869. '[object Float32Array]',
  43870. '[object Float64Array]'
  43871. ]
  43872. var isDataView = function(obj) {
  43873. return obj && DataView.prototype.isPrototypeOf(obj)
  43874. }
  43875. var isArrayBufferView = ArrayBuffer.isView || function(obj) {
  43876. return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
  43877. }
  43878. }
  43879. function normalizeName(name) {
  43880. if (typeof name !== 'string') {
  43881. name = String(name)
  43882. }
  43883. if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
  43884. throw new TypeError('Invalid character in header field name')
  43885. }
  43886. return name.toLowerCase()
  43887. }
  43888. function normalizeValue(value) {
  43889. if (typeof value !== 'string') {
  43890. value = String(value)
  43891. }
  43892. return value
  43893. }
  43894. // Build a destructive iterator for the value list
  43895. function iteratorFor(items) {
  43896. var iterator = {
  43897. next: function() {
  43898. var value = items.shift()
  43899. return {done: value === undefined, value: value}
  43900. }
  43901. }
  43902. if (support.iterable) {
  43903. iterator[Symbol.iterator] = function() {
  43904. return iterator
  43905. }
  43906. }
  43907. return iterator
  43908. }
  43909. function Headers(headers) {
  43910. this.map = {}
  43911. if (headers instanceof Headers) {
  43912. headers.forEach(function(value, name) {
  43913. this.append(name, value)
  43914. }, this)
  43915. } else if (Array.isArray(headers)) {
  43916. headers.forEach(function(header) {
  43917. this.append(header[0], header[1])
  43918. }, this)
  43919. } else if (headers) {
  43920. Object.getOwnPropertyNames(headers).forEach(function(name) {
  43921. this.append(name, headers[name])
  43922. }, this)
  43923. }
  43924. }
  43925. Headers.prototype.append = function(name, value) {
  43926. name = normalizeName(name)
  43927. value = normalizeValue(value)
  43928. var oldValue = this.map[name]
  43929. this.map[name] = oldValue ? oldValue+','+value : value
  43930. }
  43931. Headers.prototype['delete'] = function(name) {
  43932. delete this.map[normalizeName(name)]
  43933. }
  43934. Headers.prototype.get = function(name) {
  43935. name = normalizeName(name)
  43936. return this.has(name) ? this.map[name] : null
  43937. }
  43938. Headers.prototype.has = function(name) {
  43939. return this.map.hasOwnProperty(normalizeName(name))
  43940. }
  43941. Headers.prototype.set = function(name, value) {
  43942. this.map[normalizeName(name)] = normalizeValue(value)
  43943. }
  43944. Headers.prototype.forEach = function(callback, thisArg) {
  43945. for (var name in this.map) {
  43946. if (this.map.hasOwnProperty(name)) {
  43947. callback.call(thisArg, this.map[name], name, this)
  43948. }
  43949. }
  43950. }
  43951. Headers.prototype.keys = function() {
  43952. var items = []
  43953. this.forEach(function(value, name) { items.push(name) })
  43954. return iteratorFor(items)
  43955. }
  43956. Headers.prototype.values = function() {
  43957. var items = []
  43958. this.forEach(function(value) { items.push(value) })
  43959. return iteratorFor(items)
  43960. }
  43961. Headers.prototype.entries = function() {
  43962. var items = []
  43963. this.forEach(function(value, name) { items.push([name, value]) })
  43964. return iteratorFor(items)
  43965. }
  43966. if (support.iterable) {
  43967. Headers.prototype[Symbol.iterator] = Headers.prototype.entries
  43968. }
  43969. function consumed(body) {
  43970. if (body.bodyUsed) {
  43971. return Promise.reject(new TypeError('Already read'))
  43972. }
  43973. body.bodyUsed = true
  43974. }
  43975. function fileReaderReady(reader) {
  43976. return new Promise(function(resolve, reject) {
  43977. reader.onload = function() {
  43978. resolve(reader.result)
  43979. }
  43980. reader.onerror = function() {
  43981. reject(reader.error)
  43982. }
  43983. })
  43984. }
  43985. function readBlobAsArrayBuffer(blob) {
  43986. var reader = new FileReader()
  43987. var promise = fileReaderReady(reader)
  43988. reader.readAsArrayBuffer(blob)
  43989. return promise
  43990. }
  43991. function readBlobAsText(blob) {
  43992. var reader = new FileReader()
  43993. var promise = fileReaderReady(reader)
  43994. reader.readAsText(blob)
  43995. return promise
  43996. }
  43997. function readArrayBufferAsText(buf) {
  43998. var view = new Uint8Array(buf)
  43999. var chars = new Array(view.length)
  44000. for (var i = 0; i < view.length; i++) {
  44001. chars[i] = String.fromCharCode(view[i])
  44002. }
  44003. return chars.join('')
  44004. }
  44005. function bufferClone(buf) {
  44006. if (buf.slice) {
  44007. return buf.slice(0)
  44008. } else {
  44009. var view = new Uint8Array(buf.byteLength)
  44010. view.set(new Uint8Array(buf))
  44011. return view.buffer
  44012. }
  44013. }
  44014. function Body() {
  44015. this.bodyUsed = false
  44016. this._initBody = function(body) {
  44017. this._bodyInit = body
  44018. if (!body) {
  44019. this._bodyText = ''
  44020. } else if (typeof body === 'string') {
  44021. this._bodyText = body
  44022. } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
  44023. this._bodyBlob = body
  44024. } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
  44025. this._bodyFormData = body
  44026. } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
  44027. this._bodyText = body.toString()
  44028. } else if (support.arrayBuffer && support.blob && isDataView(body)) {
  44029. this._bodyArrayBuffer = bufferClone(body.buffer)
  44030. // IE 10-11 can't handle a DataView body.
  44031. this._bodyInit = new Blob([this._bodyArrayBuffer])
  44032. } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
  44033. this._bodyArrayBuffer = bufferClone(body)
  44034. } else {
  44035. throw new Error('unsupported BodyInit type')
  44036. }
  44037. if (!this.headers.get('content-type')) {
  44038. if (typeof body === 'string') {
  44039. this.headers.set('content-type', 'text/plain;charset=UTF-8')
  44040. } else if (this._bodyBlob && this._bodyBlob.type) {
  44041. this.headers.set('content-type', this._bodyBlob.type)
  44042. } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
  44043. this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
  44044. }
  44045. }
  44046. }
  44047. if (support.blob) {
  44048. this.blob = function() {
  44049. var rejected = consumed(this)
  44050. if (rejected) {
  44051. return rejected
  44052. }
  44053. if (this._bodyBlob) {
  44054. return Promise.resolve(this._bodyBlob)
  44055. } else if (this._bodyArrayBuffer) {
  44056. return Promise.resolve(new Blob([this._bodyArrayBuffer]))
  44057. } else if (this._bodyFormData) {
  44058. throw new Error('could not read FormData body as blob')
  44059. } else {
  44060. return Promise.resolve(new Blob([this._bodyText]))
  44061. }
  44062. }
  44063. this.arrayBuffer = function() {
  44064. if (this._bodyArrayBuffer) {
  44065. return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
  44066. } else {
  44067. return this.blob().then(readBlobAsArrayBuffer)
  44068. }
  44069. }
  44070. }
  44071. this.text = function() {
  44072. var rejected = consumed(this)
  44073. if (rejected) {
  44074. return rejected
  44075. }
  44076. if (this._bodyBlob) {
  44077. return readBlobAsText(this._bodyBlob)
  44078. } else if (this._bodyArrayBuffer) {
  44079. return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
  44080. } else if (this._bodyFormData) {
  44081. throw new Error('could not read FormData body as text')
  44082. } else {
  44083. return Promise.resolve(this._bodyText)
  44084. }
  44085. }
  44086. if (support.formData) {
  44087. this.formData = function() {
  44088. return this.text().then(decode)
  44089. }
  44090. }
  44091. this.json = function() {
  44092. return this.text().then(JSON.parse)
  44093. }
  44094. return this
  44095. }
  44096. // HTTP methods whose capitalization should be normalized
  44097. var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
  44098. function normalizeMethod(method) {
  44099. var upcased = method.toUpperCase()
  44100. return (methods.indexOf(upcased) > -1) ? upcased : method
  44101. }
  44102. function Request(input, options) {
  44103. options = options || {}
  44104. var body = options.body
  44105. if (input instanceof Request) {
  44106. if (input.bodyUsed) {
  44107. throw new TypeError('Already read')
  44108. }
  44109. this.url = input.url
  44110. this.credentials = input.credentials
  44111. if (!options.headers) {
  44112. this.headers = new Headers(input.headers)
  44113. }
  44114. this.method = input.method
  44115. this.mode = input.mode
  44116. if (!body && input._bodyInit != null) {
  44117. body = input._bodyInit
  44118. input.bodyUsed = true
  44119. }
  44120. } else {
  44121. this.url = String(input)
  44122. }
  44123. this.credentials = options.credentials || this.credentials || 'omit'
  44124. if (options.headers || !this.headers) {
  44125. this.headers = new Headers(options.headers)
  44126. }
  44127. this.method = normalizeMethod(options.method || this.method || 'GET')
  44128. this.mode = options.mode || this.mode || null
  44129. this.referrer = null
  44130. if ((this.method === 'GET' || this.method === 'HEAD') && body) {
  44131. throw new TypeError('Body not allowed for GET or HEAD requests')
  44132. }
  44133. this._initBody(body)
  44134. }
  44135. Request.prototype.clone = function() {
  44136. return new Request(this, { body: this._bodyInit })
  44137. }
  44138. function decode(body) {
  44139. var form = new FormData()
  44140. body.trim().split('&').forEach(function(bytes) {
  44141. if (bytes) {
  44142. var split = bytes.split('=')
  44143. var name = split.shift().replace(/\+/g, ' ')
  44144. var value = split.join('=').replace(/\+/g, ' ')
  44145. form.append(decodeURIComponent(name), decodeURIComponent(value))
  44146. }
  44147. })
  44148. return form
  44149. }
  44150. function parseHeaders(rawHeaders) {
  44151. var headers = new Headers()
  44152. rawHeaders.split(/\r?\n/).forEach(function(line) {
  44153. var parts = line.split(':')
  44154. var key = parts.shift().trim()
  44155. if (key) {
  44156. var value = parts.join(':').trim()
  44157. headers.append(key, value)
  44158. }
  44159. })
  44160. return headers
  44161. }
  44162. Body.call(Request.prototype)
  44163. function Response(bodyInit, options) {
  44164. if (!options) {
  44165. options = {}
  44166. }
  44167. this.type = 'default'
  44168. this.status = 'status' in options ? options.status : 200
  44169. this.ok = this.status >= 200 && this.status < 300
  44170. this.statusText = 'statusText' in options ? options.statusText : 'OK'
  44171. this.headers = new Headers(options.headers)
  44172. this.url = options.url || ''
  44173. this._initBody(bodyInit)
  44174. }
  44175. Body.call(Response.prototype)
  44176. Response.prototype.clone = function() {
  44177. return new Response(this._bodyInit, {
  44178. status: this.status,
  44179. statusText: this.statusText,
  44180. headers: new Headers(this.headers),
  44181. url: this.url
  44182. })
  44183. }
  44184. Response.error = function() {
  44185. var response = new Response(null, {status: 0, statusText: ''})
  44186. response.type = 'error'
  44187. return response
  44188. }
  44189. var redirectStatuses = [301, 302, 303, 307, 308]
  44190. Response.redirect = function(url, status) {
  44191. if (redirectStatuses.indexOf(status) === -1) {
  44192. throw new RangeError('Invalid status code')
  44193. }
  44194. return new Response(null, {status: status, headers: {location: url}})
  44195. }
  44196. self.Headers = Headers
  44197. self.Request = Request
  44198. self.Response = Response
  44199. self.fetch = function(input, init) {
  44200. return new Promise(function(resolve, reject) {
  44201. var request = new Request(input, init)
  44202. var xhr = new XMLHttpRequest()
  44203. xhr.onload = function() {
  44204. var options = {
  44205. status: xhr.status,
  44206. statusText: xhr.statusText,
  44207. headers: parseHeaders(xhr.getAllResponseHeaders() || '')
  44208. }
  44209. options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
  44210. var body = 'response' in xhr ? xhr.response : xhr.responseText
  44211. resolve(new Response(body, options))
  44212. }
  44213. xhr.onerror = function() {
  44214. reject(new TypeError('Network request failed'))
  44215. }
  44216. xhr.ontimeout = function() {
  44217. reject(new TypeError('Network request failed'))
  44218. }
  44219. xhr.open(request.method, request.url, true)
  44220. if (request.credentials === 'include') {
  44221. xhr.withCredentials = true
  44222. }
  44223. if ('responseType' in xhr && support.blob) {
  44224. xhr.responseType = 'blob'
  44225. }
  44226. request.headers.forEach(function(value, name) {
  44227. xhr.setRequestHeader(name, value)
  44228. })
  44229. xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
  44230. })
  44231. }
  44232. self.fetch.polyfill = true
  44233. })(typeof self !== 'undefined' ? self : this);
  44234. /***/ }),
  44235. /***/ "./src/assets/css/common.css":
  44236. /*!***********************************!*\
  44237. !*** ./src/assets/css/common.css ***!
  44238. \***********************************/
  44239. /*! dynamic exports provided */
  44240. /***/ (function(module, exports, __webpack_require__) {
  44241. // style-loader: Adds some css to the DOM by adding a <style> tag
  44242. // load the styles
  44243. var content = __webpack_require__(/*! !../../../node_modules/css-loader??ref--1-oneOf-2-1!../../../node_modules/postcss-loader/lib??postcss!./common.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css");
  44244. if(typeof content === 'string') content = [[module.i, content, '']];
  44245. // Prepare cssTransformation
  44246. var transform;
  44247. var options = {"hmr":true}
  44248. options.transform = transform
  44249. // add the styles to the DOM
  44250. var update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
  44251. if(content.locals) module.exports = content.locals;
  44252. // Hot Module Replacement
  44253. if(true) {
  44254. // When the styles change, update the <style> tags
  44255. if(!content.locals) {
  44256. module.hot.accept(/*! !../../../node_modules/css-loader??ref--1-oneOf-2-1!../../../node_modules/postcss-loader/lib??postcss!./common.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css", function() {
  44257. var newContent = __webpack_require__(/*! !../../../node_modules/css-loader??ref--1-oneOf-2-1!../../../node_modules/postcss-loader/lib??postcss!./common.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css");
  44258. if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
  44259. update(newContent);
  44260. });
  44261. }
  44262. // When the module is disposed, remove the <style> tags
  44263. module.hot.dispose(function() { update(); });
  44264. }
  44265. /***/ }),
  44266. /***/ "./src/assets/images/arrow.png":
  44267. /*!*************************************!*\
  44268. !*** ./src/assets/images/arrow.png ***!
  44269. \*************************************/
  44270. /*! dynamic exports provided */
  44271. /*! all exports used */
  44272. /***/ (function(module, exports) {
  44273. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAADACAYAAABhy7FLAAAHtElEQVR4nO2c6Y8cxRnGf+8e3gvbrNY2lh0nJpxBgANJlAQCJCCIIAmXgCAkEEJCAgHhE39FPiUkSqJISRQkcoAI5MACxH0kiJhbHAZjc1k+sPCuvYd3Z6f48HTH1TUzPdO9PSga1fNlV69qup9+q97n6aqubnPOURITwE3AJuBl4DfAvjIHMjOsJJHvAzcAo15sBvgd8NDnQWQtcBtwak6bV4E7gV3dINIH/Ai4Fhjy4gvAU8DZwKAXPwTcBfwDqFdFZAPwE+DEIP4G8DNgJ7AOuB04KWjzFvBz4MOlEOkHrgCuBga8+BzwB+BBwP+xARcB1wPDXrwG/Bm4F1gsSuQYdIVHB/GXgF8Ae1qxB9YAtwKnBfHtKIPbOiEyCFwDXI7GRYpp4LfAozkEQpwH3AiMebE6cB9wNxpfTYl8BY2FLwQH/DfwK+DTAiRSjAM3A98O4h+hsfOmT2QYuA74IernFPuBXwPPliAQ4kwkfkd6MQf8E/ijmc2Zc+6nNFbE46grDuQcfCVwGXAcsBW4H5jMab8cddX3gvhbZnaHOed+D6xKgp8AvwT+m3NAgG8iXfGrYw7pxvNtfvt14BbvnHvN7AZzzq1FA3QfcA+S6laYAK4Ejs1p825ynDzfGU2OMwHcbWa7iijrd4ALySpoDRneV8lqzQKwGXiGCpX1KOAq4EtBfDvwV2AvsDppE+rO+0mb3Ush0o8G1vnJ/ynmgX8Bz9GorGcAPwCWefFF4BFUAIWVdT3wY+QhPrai/s/TlHHU/8cH8Z3AX4CPOyEyAFwAfJesss4CfwdeyCEQ4hvAxcCIF6sDTwAPo/HVlMhGlIXVwQFfA/4GTBUgkWIF0ppTgvhelJ0dPpEhVA1nklXWgwmBV0oQCLEpIXSEF3NItTeb2SFzzt1GY0VsAR4gX1OKYhS4BPhaEH/fzO4cIKv/k+i+4c0KCaSYAf6EdOcKZBGkf805N4EG6CTwGJLqbmMYODch8bCZ7St7F18pzCwjy0VR1H3zyZTMyFLct5FEiXlNVe5bmkh0X4juK0T37Qn3HUPk16N+fxZNTVuhK+57IvAtDlfHRjSw/4OWIpqhUvddgRZlwmrysRMt3uSNqdLua8DJqBJ8BV1EywzHkNWaGqqw18lqTfODd6is48A5aN3Dxy7gSZTJlUmbtUGbPUmb3JWEdkT6kIecTlZTashh36BRWU9CzuxnrQ68iMZGU9/JI7IKXeFEEP8I9f/BVuxRiZ5N4zrLPpSdTzoh0o/KaxNZTZlH3rI1h0CI45H3+L7jkC5twfOdkMja5Er8cgap3zOUu6MfRbcPG4P4fpTZXT6RQVQNJweNZ5FIvVeCQIgvI/EbCeKvAy+Y2YI55y6lsSLeQWtnVd7RD6O1tOOC+B4zu3+A7KrfNPA08EGFBFLMoXuSbcBZ3nlHQcq6Ag3QaVRi810gEWIZkoYxYIuZTfXEvKao++aTKZmR0H1BXZrnvq1JlJjXVOW+pYlE94XovkJ0355w3yHkpOOoKt5Bj1lboSvuu46sdqxKCG1DgtYMlbrvCHACjePIx37gbdS1rVDafQ2V49FkNaWORGtNk/h2VO6VKesYysKKID6JrnwGpfcEDk8jU0wlbXJduRNl3YBKz9eURVRJO2lU1nWoQnzfcUgCPqSEsi5HV3hEEP8UXWFeNQ0nvx0P4geT3zY8OW1GpA9lYAPZLNTQsmXHWzGQQB5L1nccyswOvOyERFYmV+JvTgF5QzuNaIVUa1YF8RmUnUmfSD/q1/VB44WEQN6GhE6xJiE0GMQ/Bt4zs0Vzzp1OY0XsRl2xQHUYRF11VBCfMrMXB8jukDmEHLbUpqU2WEArUXuQM6fnHQIp6wgaoIeQtNcaj1E5BoAvJiR2mNlsT8xrirpvPpmSGQndFw7f0bdy39YkSsxrqnLf0kSi+0J0XyG6b0+4bz/K4hDK1iQtHh4m6Ir7jiXk03E0nBxnitalWqn7pg+aluW0mUfq2u44pdzXUBaWk60mkJSHc1qHynSaCpV1EGUhHGj+lbfK1ELSJvdOrx0RQ4K2PIg7NBZmaFTWUbJjJ8UBJGhNT5ZHZBApY3i/klZHu/5Pq8lHDSlzQ3aaETGUgVDaXUKgyGLNaEIozM5BlKH/nTgksgz1c5iFOdprRCukWjMcxGto7Mz7RPpQFsaCxvWEQMc3ODkYSQj1BfFp4ICZ1c05t5rGiphNSLTdhFIAfQmZsNQXzGzvANl7hzpKWTe2gNXRYJ1FQyDNTh9IWQdQ1yyigVRlFlqhDxVEP+qaWk/Ma4q6bz6ZkhkJ3RcOK27hh0dl5jVVuW9pItF9IbpvEiO6bw+4b9EVo1z3TV9rSZl26r5LWTEaJuu+i2a2u6j7VrViVNp944oRxBUjIa4Y9cSKUVHE5zV5iM9r2pOJz2tKEonuC9F9hei+PeG+RXf4dsV9y7xfU6n7VrXDd0nPa+IO37jDF+IO3x7Z4VsU8f2aPMT3a9qTie/XlCQS3Rei+wrRfXvCfYt+kaUr7ht+keWU5AR5X2Sp1H2r+iJLafeNX2SB+EUWIX6RpSe+yFIU8XtoeejN76HFeQ3EeY0Q5zUQ5zVCnNfEeQ1xXtMGcV5ThEic10Cc18R5zf/5vOZzOGdn+Awy41HF8ePswwAAAABJRU5ErkJggg=="
  44274. /***/ }),
  44275. /***/ "./src/assets/images/close.png":
  44276. /*!*************************************!*\
  44277. !*** ./src/assets/images/close.png ***!
  44278. \*************************************/
  44279. /*! dynamic exports provided */
  44280. /*! all exports used */
  44281. /***/ (function(module, exports) {
  44282. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAYAAAAHkiXEAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAAchJREFUeNrt2UGuwUAcBvDpmzoAERJ7FhJburBpxMYFunUDi8Yp7LmCukLTTqMbV8DKgqULaDpv0fwthHh5YWa89/2WIpnP969RU8YAAAAAAAAAAADgb0nTNE3TcllIIYVcLsNKWAkrjYbuXJSDclFOVet/qVoo62f9rL9YsIQlLPG8klNySo4QugZB61IOynXNqYitaqG8l/fy3mTCa7zGa52OnMqpnLbbdmAHdpAkkRM5keO6g/FgPBgfj+/KEXWjbtSt14scYSh96Uu/1WIBC1iw3+eH/JAffF9VL5aqhe4XEMdFAe32tQAnd/I3DELXus8oH4DqQkwtnmgbwLsLMr14on0Ary7sU4onxgyA/LbATyueGDcA8tNC2ZzN2TzLPq14YuwAyO39enH72mpZM2tmzXY7et/t65fNZXPZuO7wPDwPz6eT7s/xiPEDIA+/EeRDrvhbyv4Jw33GD4C2IF7lVV5dr+nKp63muhV5zGNes8lXfMVXcWzKWdMzxm5B+BHWBLehmuCPmCY4itAEh3EFHEf/l+NoUwowJYdy9MxVCCGEkDIZJaNktN3qfiRJOSgX5dTd18vhoTwAAAAAAAAAAABo9Q1dIQnjg/qehgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0xMi0yNVQxMTo0MTozNCswODowMADgOrkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMTItMjVUMTE6NDE6MzQrMDg6MDBxvYIFAAAATHRFWHRzdmc6YmFzZS11cmkAZmlsZTovLy9ob21lL2FkbWluL2ljb24tZm9udC90bXAvaWNvbl9keTJ5YTIzbm96cDhwdmkvY2xvc2Uuc3ZnUNgRCAAAAABJRU5ErkJggg=="
  44283. /***/ }),
  44284. /***/ "./src/assets/images/earp.png":
  44285. /*!************************************!*\
  44286. !*** ./src/assets/images/earp.png ***!
  44287. \************************************/
  44288. /*! dynamic exports provided */
  44289. /*! all exports used */
  44290. /***/ (function(module, exports) {
  44291. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAaEAYAAACGC4J8AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAAvlJREFUWMPlWTtLM0EUnUniM6BGReMDwV7sVVCCBHwUWgi2KRRL09hpav+BlRbBH2CQmMKI/gMF+wjGRAkqPhPEMMfi7ubLJBszeegI32kOd/bOnXvu3Z3MbjirMwAAaG4ma3qagYFhcZHskRHGGWd8cJDsnh55dipFHI8TX14Sh0IU5+SE27iN2z4+6p13jYKdTggIiM1Nsp+f8SN4epLXcTprzZ/XJnx2lqzdXeK+PtnL7NTpKXE0SpxIUEcTibxMOOMDA2SY7PUSezzEjY1y/Ntb4pUVzjnn/OioTn0tJ9zvJ85m5Q69vBBvbVGn2tpqXk9AQLS3U9xAgPj1VV43myW/jY2fE24sYH1rnp3R9d7e32mA251b1xKBQJ0XnJuz7ngwSMILb82fB63b0EB57O3JeQlB15eWahTuchE/PPyLDQERjRI7HL8t3DpPu504ErF+JN3uKgNvb8sBUynizk7dwovylfaKRELOe2enwkDd3TQxnZYDra/rFqqW/+qqnPfnJ40PDZUPAADw+eQA9/cUoKlJt0C1AjgclHc8Luvw+wv9bdZhzJObicPDP3cCKwHKM5sl6+Dge11WFQQAJJNy5ZaXdQurFJT3/LysI5Mh5rkDYO4OkHf1vDM6GBiurnQLqg6xmGyb7yguV1EB6ChqCrfb5Yl3d7qlVAwwMCST1uP9/cUFAANDa6t1tExGt57qkE5bj7e0FBfgP0VBAdbWijw444yPjupOtGJwxhmfnLQe9/lyNu2KU1P4FrHYXzn6loN5XqG8b26+1+XxGAXY34cSZmZ0CyxbAADAwoKanmDQeAQmJtTCq/rpxvi4mt/YmFEAhfd4MLBq3qq0oPBbYym43UYBSv1c5IEzzvjbm25panh/V/WzUWfNr7DlcH2tW5oa1PUYd0AkojZB1U8jwMAQDqs5h8PGrjk8TFzqc3YopFtXxXUQEBDHx9Z6Hh/puvn/RG6C10sOFxemcOKODt2CKi4AAKCrizgcJn3n5+a5x/T7AkfwNo4jsYYoAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTIxVDE1OjU1OjE3KzA4OjAwr8B+8gAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMi0yMVQxNTo1NToxNyswODowMN6dxk4AAABadEVYdHN2ZzpiYXNlLXVyaQBmaWxlOi8vL2hvbWUvYWRtaW4vaWNvbi1mb250L3RtcC9pY29uX25mcXc0azNtZ3h3dXE1bWkvJUU4JTgwJUIzJUU2JTlDJUJBLnN2Z/n71JwAAAAASUVORK5CYII="
  44292. /***/ }),
  44293. /***/ "./src/assets/images/hot_music_bg_2x.jpg":
  44294. /*!***********************************************!*\
  44295. !*** ./src/assets/images/hot_music_bg_2x.jpg ***!
  44296. \***********************************************/
  44297. /*! dynamic exports provided */
  44298. /*! all exports used */
  44299. /***/ (function(module, exports) {
  44300. module.exports = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEkAu4DASIAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAQACAwQF/8QAMRABAQACAQMEAgEEAgEDBQAAAAECETEDIVESMkFhE3EiBIGRoSNSQjNi8BSCsdHh/8QAGgEBAQEBAQEBAAAAAAAAAAAAAAECBAMFBv/EABwRAQEBAQEAAwEAAAAAAAAAAAABESESAjFRQf/aAAwDAQACEQMRAD8A+9n7sv2y3n78v2zp8R+yApSKzRpqgVkVoVFYq00NKrNDTNiA0ihWLBpqhFZ0K2zQZGmtAVnQa0hWLA3YyKzoWNiisaGmhQA00LEViprQ0DOlYUKzoNaQM6WmhoUaDWloGQ3pnQBFaRWU1oaAaWjpaAI6WgGitLQJLR0ARWgC0dHQM6J0tKgKOgBOOFyusZa36cMPdfVfGP8A+xNYmNt1Ju/Tf45j/wCplJ9TvVepdax1jPEYB0mcx9mMn3e9ZyyuV3lbRo6RAdHSBQxaMgLR0joRQ6MjUxviiWsyNyGY3xWvRl4RNZOjMMvB9N8KmiRpavg6+kFEdHgR0nQ6np3qfrbp0sZ0sL1M53+I6Y9fC47t1fDz9XO9TLfxOIjHbyqdTOZXKXvXWZdPq++enLzHBrGC2Ot6WXT7y7nmOsu+nvqSfTPQ9Xe7/jGepl68vqcIz9sHRSqm+nO7LfT5GaM/df2y3l7r+2dPdACkUA1Cs6Fa0KgyGrAKyK1oUVnQa0AZRqRWdM1us0VnQrSBhNDQ0zRprQBmwVqrRquYbsGgZ0GtKorLOm9AVnQsa0rBWBWloGU1oAEVoAKdLQMprSFZ0tNABpaOloBpaOloBpaOkA0mloGSVpAaWjpaUGlpqTd1Jut+iY++9/8ArBNYxxuV1jNt+nHH3X1XxOFllbNTWOPiM6QOWds1xj4jOigGjpGQAdOmPSzy+NT7a/H08ffnu+MRNcmscbeJa6fkwx9mH96MurnfnX6EM6Ofzqfun8eE93U/w583v3IddP8AinEypmeM9uEczER0/JfiSf2XryvyzpqRUO8vNW75oMiBmz/dHQi7nukIdmBqANHRkakEtGGNucl4tev8WGtSaeaR1/JlrW0Zu0dTqYz+Evacsyy8Val5FwxvwDRjEwynty/yt54847/Qjppvp8uU6mN+r9uvT5Eoz91/Yay91/bOnuzAGhRQCKioUpBkNDQrOhW2aKzoNAVmhqsiihoVBkaaWhWKmqBRoVoVFY0mtDQMUabsGhWRY3+xYDGhprSFZ0NNLSKwG7BYozpaOlpAaDSBnS00NCjSnay63o0A6/1HVnVuNmOtOJQTgWjtbAaWjtbAaRQDS0V3BaWjo443LgGdNTDtvK+mNdseO981m97u96Ibnqawmp/tgkGToumPSut5axn2GuWm8Onll7Z/dv1YYe3H1XzWcs8sub28QNa9GGPvy3fEX5Jj/wCnjMftzkKJhyyyy91tGjpaAHRWlFIWpDpE0SNRJUTQhgEjRiITARCdCNaANQNSCGQoyIih0UIlo6MEUKQguMy5kqw6Wsv45XFpvpzuGs5+6/sHP35fsPesoEUVlFIDQIoqGiiqGa0KgxUVoVmxlusihmxvQqDCaFFFBWkFpmxoDUZ0GtLQMUabo0KyrCkGNLTQVWdBrQ0KyjpCshrSEZWikVnS01paBkNaGgCOloULR0tANLR0tAEdLQBNTG1rcx9vPkQemTvl/gXK3txPCWgCM+nSdPU3ndQNcpN3s6Tpam87qG9STthNfbF3bu9w6365j26eOvusW3K97aCA0dIgpCpHTHpZX4/yjNrmXb8Mnvykawx6dzmMltomu39L05OjvKS3Lv3Z6v8ATT3dOf8A2vTuSyceIYmvP1d14J0svGj+LzlI9nU6eOfO5fMcv/pZv33/AAa16cfRhOczrp+a7z+mw85MZ9LpztOpq/a6mxz/AOPxVLh/1ZyxuN1UNN+rH/qd4/8AViERrePg7x8MrQNfxOp5EMmxGpNHahiIOzUWl6YITGfTfir+U+xGyx69cytTLG/IYdFvCdttWbiM656aw5Zb6c7qVjP35fsN5z+V/bD3SJJAEQKKCEUaRAo0qRUGUdBFFZbrOiDKpsArKOloVhNDQAfLQqEFgKFZ5DdZGoNI6SDNg00tCs6TWgDGQbsGlNY0tNaWkNZ0GtIVnQbZoAaaAo0igCKAImTd7Ay1Mdd8v8Htjx3o55BW2/U8M6aaxwuX68gej0vXu3iN9ToTGb3rH52unnj0+07+Wer1PXNfCM91n1THthP71i97u96SNMnRaxwyy4gMaUjt+PHH35f2h/JMe2GMhqb+MY9LK/Gp9t+jp4+7Ld8RjLLLLmiCddfySezCRm55XnL/AAIdCYHo/pMf5XLx2cHs6c/F0N3nW/7lT5fTh/U5erq9uMezXT/qMse2X8o497ToM/j1T+pw+ZlFf6mf+ON/u8phieY6Z9TPPm9vEYUIq73W/hFaBQpCFGIE1jFMWpEQ6RWhFCkM0nShghZuGN+GlA1dPeHHeeFn1bO3puvJME1nDPHL5/y7dP3OWXTxvx3+h08c8b/C7gcreV/nl+xyc/fl+2XuyryFbtCiogWIaKQZSQq0KVUVlHQAVlqhACxqs0WMogVlGwDSFKRGdJEBQVpFlZ0ihWdLRQrKOloBWWgKBppaBnQ01paBnVFjeheDRjQ00laZ0tNLSDOlprR1PkGZjv8ASvGpwb3WkGdGTd7NTH5vaG5amsZqGpo9OOPu73wMsrf14SAIt49O3ve0U1z/ALOmPTyy+p9tbxx9s3fLOVyy5vYRr/jw/wDdRl1Mrx2n0xo6MODR0igNGI6BOmHRyzm+J9jHC2ztdPajHyufTzToZTOb1Z86b/qsv4zGfPd2cOpl07lu97wJLtcDq34dfyYzjFflvxFa2sTDLxTOnl4P5MvoevLyJ1qdPL6P4r5jPqy81bvmh1udO+Yvx3zGN3zT380Otfjv0fRfpmb80y3zROn0UzG+Fu+WpbpE6lFs7EUKQGEKURowSwiVGCNCKEQwRSbdOnO7Jw5RGM/fl+2G8/fl+2dbdKhGwIJJAERUUUGgUgxIMo1kVVloUGVSqisCytIVhNZMioEVALZGgQOgEGkUis1GjQ0kkAoKAaWktAEdLQBLSBlX9FCs/wBhy2v0is8fsNmTyDEm+Gu2P3Tb8TtGQFu+V2aMxt+oDDc6dvPaNbmPtm6xbbyI1vHH2zdZtt5qQYNFLngEm8elleezfpwx913RNcpN8d28elleezV6kntjFzt5oddPRhj7qfXhj7cXGIMdL1crxqNYdfKT+U25ETI659a2ak05JQPopHQBEwEUgKGjATUDUEbwxuU7LVa6ecxx1Vld21GWZDpQiIwNQRLRQD0rVnFaUmxBMrOYfVL9Ns3GVAmOfos9tMzsv8oqY6N9LlzmUvFdOnO4lc8/fl+xDn78v2y9xpmxoXgRlJCpJAFpCoqQNFFBCKma0EGU0KDIuvk1nQ0qzooUCmmzsgylpAkgipJaAVlqgWBFChEANLRAIHQ0ipbWqtUAkgFUmzJ5VvgF2n3Re6UlvAIzG1rUx571nLK39A1uY/dZuVvIQJdk3jhb9AyZjbxG9YYc96L1L8TQhnTk75U/kmPtjlbvlBn61lnleayloVI6OgBKkt4gg0Wp0878Nzo5fNglrlpqR1nRnzWvx4Tm/wCzU2OCd/8AinhevpziT/CGuDUdfy4fEP5Z4qptcdHTr+X6X5Z4DrloyOv5fo/kngOuUjbczl+D6sfH+kTXOTu01/E6xE1gxr0xekTQYvStAVFCIdEGCFJAjrfKkaiI55dKXjtVhlnhe/d1aw5DXHP35ftlrP35ftl0kR2EgEQCSQAU1a2isn4SiKElsVVmkVAArQrNRFRRZ2ZatZFVBoAVQoVaGikAltC4KNmjQBLSFQIoJJAkkgkFoFVxyr9DQK8gzG36O5OBVMdd8lcvidoze6BJSWtzD5yoMNzC/PZeqY+2M3K3kOt7xx471nLO36ZQYkkCTWOFvDpj0fN/wGxxMlvEtd/T08OeVerJ7cRN/GMelledRudKT3ZVi9TK/Ov0ze/Ina7b6ePj/wDK/LJxHFB5db1cvjUZueV/8qygw7t5qUaBk6KBaiR0CiRBQ6UIhxalE4CI2ojBE1NiHaIdlmFUKEIh2YNLQNNOe7GpnPlGbGjBO7QJrDllvDkSuOfuv7Zsay91/Yt06CMogVKpUAkhRVDlwECz+koigaaAoFaZqCCoRUqkKNM1ti8gKiBRVDYNCpJIDSOxsUUNVkEqkKEdBAaRQBBbFKGzJ5EWtrUnPKt7dme4LK2hctzD5tFYk3w1MfJuUntZtt5Br1Se2M228hBiSaxwyvxoGTJbxHWYY498qL1JPbBN/Bj0reezWsMeeWLnb8shldL1P+sYuWV5oQuRHYQHZZIFIyW8RESanTyvxW50svpTXOF0nSvmNTo/+5E9RyWnadGeafxY+aJ6jjE7fiw+/wDJ/Hh/8pp6jgnf8WH/AMp/Fj9/5NT1HGF2/Fj9r8U80PUczI3+PXyvR9jOsk+ir03wGqJaIIoy6GVI1B8mIiKIBalJgM+mziqZ2e6NHnkFjlLw6YcuN6f/AFrXTyyxur/sSxjO/wAr+2Wsvdf2y6UiSSKlUgCVAqtSSKEltBUIUVKpVADSW0UC0qisinQooSQJbVCKkkKNLR2Ngqy0yKlUqgEkC2glEpNnWuRage0A21J5AGY+V6pOGLlvkG7lJwxbv5CFSMxtbmEnIaxJbw3j0/NVzk7Yxi5W80Trp/HHjkXO3js5oXDe/NWggOloNzHK/AMp1nT83/DWsMedf3E9OMlvE23OnlfjTd6uM47s3q34kiG1qdLzWvx4Tn/dcLnlfmoTK776ePg/lx+JXnIeXW9bxP8AY/Ll9RzIvmN/ly8r13zWEGRrdvzVq/NGzLsCkoqEhA01jb5rm3jwiVr1XzWpllrlhoZameX01M/piJEx29UW8b4c1BMdPTBcPAh3RMWrDF6vJllApIRENQA1IiJU1hyy1hyI4Ze6/tlrP35ftl0qkkglUKKkkCs7A2hlWUioARUWIJICg0I0lVWQO2aRRQkgVBoRpKpBoSAIECpJVAJK9gRZ2ZNgFIe0+6zbaK1uThm3YMlvAAOkw8r1Y48BrMwt57Naxx/bNytZQxq534jNtvKQuLuu6amFvwDLdx/jMse/lqdOfNPqxw4/0Jv4544ZX41+3SdKfNWed9MuPHlyuVvNE7XbeGPGv7M3qeI5IMbuWV5rI2dqqS2gMIhQRBBGDV8VqYZX/wAapoTU6efgzpZfSJsYaxa/Dl9NTpZa+BLYwt6dPxZeYp0r9CbGIWvx5fRnTy+jTYy0fx5eD6cvFE1k7Wr4qEaMZMQKRipSQZNolTXwy2II0kIjKogalhY0t2CNtYcsTKN4ciPPl7r+wr7r+06FSSBAgWIJIIUioqWwgQIFGkthFCSFTJtZqLEqFRUFtbDEkkEqhsVIADsEIsSsG13oq3od6deRaIe05FytZamNorJkta1jjyLn4QMxk5qucnEY3vlBitt5CMlvEVQm5h5p/jihrExt4jc6fm/4Fz8Rm5W80TrpvHEXqeI5oXDcreaEgdulcZ0+9n24pBJiTUwyvw1Ol5obHNO8wxn/APV6scfmf2E1ymGV+K1Oll86jV6s+JWb1b8SCdanS85Nzp4/bl68r8i23m0TK76wng+vCfMedB5ej8uP2PzTxXDZDzHb830vzXxHFB5jt+XL6P5cvpwb2Fjp+XL6/wAL82X0xsBI6zq2+Gp1cvEcceWhLI6zq3xGvy/ThK18iZHedSfZ9eNcDETzHf8AjfC9GN4cTBMdPx+KvRWZbPmt450TouNN7TTXq7dzvGiMTk1qYz4FxoapwVOEITAYBSQguPhrp7l0msORHmy99/aXUn88v2JXupW1sKqVQqCSQqFIQCQFNZpFQSGwipJCis0i8iwBrQorOikKgQipJAEkCrPem6FqLFqTlWjWz6Z8gFrydycM22g1uYs3O1lSbDEmphflrUiLrElvEamHmq5+GblaHXTWOIuc+HOgMauVvyAkXCgZjb8Ak1On5rfpxxE1zkt4jUwvzdG5ycd2b1L8dg63MMZ9n1Y48f6cbbeaNh5db1PEZueV+WNnamK23lJCpJAUkiHa2CoSyQwobIhQhAkQiHEswwGoYPg48iNQwGDJhnPYRrG6sqI36O3Kxx792pZRll21Bnoyu6hCKZdNzJiGCV035WoxGojOHSW0oVBowQtYcstYckT+OGfuv7c63lf539i93u1BEOFsCEhUkBSyQgqENgWaRUWBJIotCvIFI+VsCw7ZIFSR0gAaNAkl3RRaDryNycCrW1qQXKjkDcmbdtenytSAyfSfVPgXKop1JyLlJwwlMNyv6G1paTVxbG2pjfDXo800452jveI62YyfH9xc5DRmYZfUamHnuzc/EZuVvNFx13MfEZvU8RzQeWrnlfoboQYdrYQpLKBrS0ydgdFndO/oCkhMKWkiYkjFEUgWiCIYlEIYRCCl01Ltk4iNKIyiGUickZrSgMQaaYaEMIhEMMBEMIhRDEogM5IhVmprDllrDkK8+Xuv7Bz91/bLoVrlnWkdoBKwJqqhJVSoSAqQqKgkKlboWgXBQaoioEUWAqJBDaq2C7jRttZsFO5BclqLciDOrT6Vcmd0VrtBcgNC4blay16avT9gym9SC5SIM6p9K9XiM3Ki5W9SH1SOWwi46XP6Fyvlja2GHKskKqSSKkkCSQJJAiEJh2thASyga2Yzsy9waW1tCJBKjULMrQJRIQnbOyDULMKIVEhGjGJy0qVqVqXbE7mciNwgohhZhEbUGzBGkCBjTMMRGogREdhKjTWHLEbw5QebP35fsHP35fsOkiSSKlsCopFgWwWlVtWxBkNIVkVrQqKzpJChECqj+y7ruipLuNfYLUVsWouyAtZttatjNyFWqtVeoXKin0/a1GN0Ct7guTItRca9VG75Z2SkiFuizUaW1sJRJJFxJIEhUotraSC2tpAdrYQHa2EB2ggKCApbWwRgQNIbWxGkDAOJ0ydiFLZESSUMpESI2oNmCKctMpUbh2IRGoYxG4jNMIUEaajOzBGkIQaMZIjSGyiFKIQxvDlhvDkK82fvy/YOfvv7DoVBAVUJCoJIJk0IJIWim1jdVAsh2thI1itW6ELh3RbUEFtIUAKdgqoKpFQq2KKtjaQIaLNRo9oNhAdhIEhtCna2EB2NpAkgC2tpIq2tpAtraQLa2kB2ggKCNMKG1sQpICggJlBBpCERGA4iHZGlBDCIQJjJlErSUIyZwhvRio1K0xDKiWOiEvYiFqMbagjS2IRCQYITBCgYQRE30+WGsOSJXDL3X9s1J0LAEhpBJBCpIBJCspIaZoSFhgqSKkkgqEgTNSFASQFCQ0lUgZSQ0qEkAkhUqkASQKjaSKkkCFSAJIVJIEkgRSBbUSApIRJIEokBSQhSShjSTNSpJAZWkhKlEliExIQtRIqUVRIRqNJCGNRISkxIZaKQGJIQmJIhhSEMaw5SEr//2Q=="
  44301. /***/ }),
  44302. /***/ "./src/assets/images/index_icon_2x.png":
  44303. /*!*********************************************!*\
  44304. !*** ./src/assets/images/index_icon_2x.png ***!
  44305. \*********************************************/
  44306. /*! dynamic exports provided */
  44307. /*! all exports used */
  44308. /***/ (function(module, exports, __webpack_require__) {
  44309. module.exports = __webpack_require__.p + "static/media/index_icon_2x.5207a28c.png";
  44310. /***/ }),
  44311. /***/ "./src/assets/images/logo.png":
  44312. /*!************************************!*\
  44313. !*** ./src/assets/images/logo.png ***!
  44314. \************************************/
  44315. /*! dynamic exports provided */
  44316. /*! all exports used */
  44317. /***/ (function(module, exports) {
  44318. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAiCAYAAAAah5Z6AAAJ/klEQVR4Ae3dA5AjTRsH8D7bvte2bZ5t27Zt27Zt27aNtZNbb7a//011ZZ501c5NMNnc985T9dvbme5kUrPzZFrJMRr+6QpW8k+T/6B/mnxRfmnycU97/rzK8+M4wEwmX6f8CC5QILt/2vyLycVsuOfHe35cYL7KZFJ+0OTwdpIA81Umk9Ks8sTFHtG8E0+894AnJydzW1g4j1m1gQd//+8LH+fLzS2TiT3vE7ibHNYxU5TEAEdJSTy8VjPtBMHxgenFOa8CGYD5iKqQMcVykxzMTR/AabgBFgiAK3AC9sNO2AobYT1sEDbCFtgBe+AInBGPvQ8hEAuMYs50yAMKvM8tA0fx6KWredDnvyn7cJdwTIq4OIfthPOXXthxB6aXOMnJgqcjCHbAX8B08tTrCYG9UNJMEE01wahIBkYxXcmRrgCP6j2EJ8fE2C/8+HMXlTLL8An2fbE793G/jIV54Btf8Oh5S3lybCy3jp2qJ/mYXtx7URyYDkZEWWAagsHoCIMWKRw/BIyMWxpvFL1IvQhID1khB+SC3JBHyEt+zy3Kc4q62cXjMkNG8TxpnE4Q/6yv8riDR0USqKL6DVfKreOn2/dZRk3STgRjEoR5SE6I4moccSFBmAsywt9A4xgwDS0gDIyO4BSO3w4iwMh4msKxp5I6F4EZSTtBMhZW7go0MRJv3+Wh5Wrb64TXa6XeQbbueikThKAR6sJjjD+2aR1XY0PqJQiaVTFrNqnJYbPxyG4DuF+GQg71gj79xV7HFh3NowaM5GFVGnD/3G95M0FKQSWoCEz4ASoJeeFvsp0RGHxJ9hV2KfkMCM1jmw5yNSYa2P/RTpDIdj3onUMZxqXlAYU/4s9mL1L7JRKbxaL0P/yzveaNBDlOtnOIfQfIvoKwnmx/AAyWkX2fmQniEjmMfvwVUrdjaiSI8u5vi4iU+xt2wd/8zZOe+otybQmXr/HAt782OkHGke0Pxb4nYvu62O5A6pSW3o0skM4DCWL8hWYmiD+pWyFVEiSyfU+1z/HoiUOzyj/vOzwpINAxCS5cVu8cURYef+a8Q3mSfwAPKPqJkQlSlmxXhHxke4J9/FyN3mJfoNje6sYJpZ3VMpDpP5Ygd7gaVhceb+Vq3HGy/hepkiDxp8+pTavW3RzKns1coF74fv48+Idi3C9TEY4mlX1/QJGPeVi1RkqfxD4sfPIs90ub36gEyQLRYrsflCTlvwITrpLOXUFSp4UbJ3Tbf7yJVQdofK/3saIujTo6HpNE6uf2eoL4Z39dmQEXHXNlmJd23G2hYfaLPuSXUvaymLWb1aRq0l7ZF/xjcZ4cH2/fH163pZGjWBvE9h7S5HoqjW33F/sjyYRTMhRx44S+CdshwksJ4gfeiAho6+U5GBr+ImG0mliNIJNXE4TOjCfef+hQFvTxT2qz6voth7LwRm3tZTEr1tn3R/UYRJtiRiUIfSeLhpvi9zHAiPfIjPd58e9h108oTT6vKQN3wBsRAkzSCsLBGxEITDIFjIxJmgkSWqamOq+xfY9j8nz9l70s7sARh7LAD36QEkG9I9msVtr8MipBMkkzvDZ4C5hkO9Co7WKCvA5JZFAgNRQFGluB/Z9LD93gjEGTlX7aCVK6hv1iRrPJMQne+krtjIdHcL8sr6jJ8+0/avIcPu7wuNhd++1loSWqGjlROJLsX0/LiOLS2quMLiZIAzAirHBVPD97gepAoxowL7rkwWUnoXAYOru/GNXAJlbQl3+oHevjp7lcnnj3vr3cMmi0ss8/15s8bs9B+37rhBmOHfu5S2g/xMgE+ZDsL0bLJPfoCJcLJzQNXARPxzOgUQWYBtrciIfswLzGuJjpswmCYVz1LmG1KiNUtDyyQy/HCcGISLUjLlbzBn30o8NjopetsZeHVW1oZIJ0JPuH0DLiLUgQda5BWidPaDqYT+o8gHJSnSGk/KBU9gPQOCclXqTeNVlSku5+iVfqppXOS4DPJgjQeQylTyKXx27eIcolNhsZFlYlXLxir4NhYaMSJDsEQRLEggXyAZPMB07G0+s5cUKLwQVRdg96QRapzijpjvCVVL4KaLR0cU1WTrCRul2AuSlKmpMwPkFcn3StROo+duP1PaFzaLoSJKrvMLU/ceiYVA5p8yt3ksRbd+xrsFCPB/9cktaTR76UZSl+mYsalSAjxPYw6CR+nwKM+BIS4TJ8BjHwCHLoOKHp4Rz0JEtV5HJ6Z4kDedn6r0DDD3K4eNEVBxqfAXPTGa7GJR9PkD2k7io3Xh99w9qjJ0GUkSZc9JrNIjpKhfmRFMvj9qp9E3zQyqhh3p8gCS5ABkgLhyEZ/iGjXJchEb5Sl20rMd/NP3h2aXQsDH6T6hSAu9KHc4q7cdENNKBJsvgluYO8Bcl0JNKN11db+pu8pZ0ggmXIWIe+SNBnvzr/OfWmHRzuHvgglREJkgXuQBR8Akx4B0LhMeQgI1w9pDb/FrG/nIt/8A/guvQ5kjekOlnhFNAYlUL/hkasxnFpQi4B5gHdnVpyb2wwDeOl15nFjQTJAqGkznjNBKF3hoSrN9RlJcEhPOSPcrqTI7JTHzU5AM02o9ZifQux8EcKSxmewe9wHSYDk2SFozDXhQSpDBay4LELpAW56bVJYzKKyqwxJi8LlGaUmQfQJToJPpog8gfbGnjgDkeH7C2QUzNB6LwHEkO90BMTuXXKHIfJPlnIb2V47LbdDskRd+SEGA0zJEHeh/LAUlAMPodOGjPfuaGJEyc0DywkfY1ZZLkK9RoclW7hgzWe9yONES7qM6DxJjAPKAw03vPBJlZ/2mfw4OujfZr+2gkizYskPnysXvAiUeKOnuTW0ZOVpST4Igfla34SbtxSyqmYjdtIx/yl+kRhWAp1qsA9OA99oWgK9SpAmLRso6SeeQ0SY1OoV4PUsXlwYi070CjjYwnyFsSI8tvwugdf3+viObk4xlu6v9UkIP97ZGhXp9hYJYHQgTfgW00MSZBsEMPVOAFMklfH83wOK6QLeA7kB6ahnjRsGw2v6fziht6QC5gbMomE1FoHJYvycoJsFmWHIB8wDe8CjbM6jp8PDgMXx9L7vVik+bRjL5kYJMjnQSwjJ/KAQh/qek4cfzswnTydIGngQ+gDj4BGLWBO+BW2cjWSYBV8pXFBFoGKIPdRwrVWAggrwcjQ0/GXBx5+hLQGJUgGcbx6GnfMtPApDJfWadl0fLiKHqeeOFYGl75Z0T/HG8oXN0S27c4tQ8fxqD5DeVjFejzwve/IHUOfgPT5/wSmj8cT5BzQiILzpOOnV3tyYR+B7tJIluxtoBEDT2A/9NR6dyQKiASMMGCZ+3Kdd8uf4CLE+sDnYdLBE6ARBYegFDBXKD9S77t5C/QB5qtMJuWHxre7m8lhMhNE8Nb/D7KDNKt8msmkUWgymf4He4sPmbqL0+kAAAAASUVORK5CYII="
  44319. /***/ }),
  44320. /***/ "./src/assets/images/needle-ip6.png":
  44321. /*!******************************************!*\
  44322. !*** ./src/assets/images/needle-ip6.png ***!
  44323. \******************************************/
  44324. /*! dynamic exports provided */
  44325. /*! all exports used */
  44326. /***/ (function(module, exports) {
  44327. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAGbCAMAAABTUL0EAAAC9FBMVEUAAAAHAQMHAAIHAAIHAAIEAAEHAAIFAAEHAAIEAQIGAQILBQYHAAIDAAEGAAIJAwQEAAEEAQIGAAIGAAIHAAIHAAIHAAIHAAIGAAEHAAIHAAIEAAEHAAIHAAIHAAIGAAEHAAIGAAH09PT9/f0GAAH4+Pn////29vb8/PwdFxmHh4fw8PD5+fn9/f39/f3e3t/w8PD29vb29vb////19fUzLS/9/f39/f39/f0pIyUIAgT6+vr39/fu7e7j4uI9Nzn8/PympqbNzc37+/vy8vLu7e3T0tP///93c3RgW1z8/Pz6+vr4+Pjz8/P9/f3d3Nz9/f3W1dWvra6VkpOBfn9wbG1QSkv8/Pz39/f7+/vn5ubNzMz9/f2qqKibmJmMiYr9/f37+/v8/Pzr6url5OTZ2Njw8PHIxsb+/v65t7hoY2X6+vpKSkpnZmf9/f38/Pz8/Py/vb79/f21s7SloqP8/PwHAQP7+/szMjL29vb9/f39/f3y8vPc29v9/f3Pzs7+/v7+/v7+/v6Gg4RZVFX6+vr5+fn39/f////////6+vrg39/Kycn9/f3d3d1GQUPGxcX6+vrz8/Pv7+/9/f3DwcH7+/udnJ3w8PH6+vrs7Ozp6erm5uaem5z4+PihoKGVlZXl5eXo5+fY19hjX2A2MDLq6ur09PXz8/Pa2dqsqqvp6eno6OjR0dK5ubqJiIhta2zBwMDv7++hn5/t7e06NTcjHR/Ew8MnIiTn5+fc29vHxscqJCb////39/jc3Nve3t7k5OPi4uLf39/p6ejd3dzg4ODu7u3h4eHs7Ozq6unm5ubl5eX9/f34+Pj09PPn5+fe3t+ysrLv7+/r6+r29vbx8fHw8PD7+/v6+vnz8/P19fXy8vL6+vrn5+bd3d3X19ba2to9PT07OzvZ2djz8/LS0tHU1NTOzs61tbXHx8e9vb3BwcG6uro/Pz+3t7dZWVnKysrExMRubm5ERESKiopNTUyrq6qfn551dXV9fX1gYGAVDWfXAAAAvXRSTlMABAdKRxFBGEUSDkwKDzgMFhQyGh01QygiID8VPTsmLy0rAwEq4QYNClARCPoECeHlKhb671bNfW1TU/X14cpZTxEP7+ndtYNvZSP8+OzXxMG5kH10bF5cEejSrpCNgXtmRN3Yzr62pqWZaD4YFeK4oJ2WlIh5TzET8tHGxr+7tK2biXZiVjob8uvXxqp0XltQNR/BtKNJOdOuqJ2Uh2JKKOfVdCsr9N/Y1ZuOgFZRMyAd9pGGYkY3N7qxkD84LzG4AAAaf0lEQVR42uTXyYvTUBwH8LjEmGqnjR3XuLY66WRoVPBU9ZAexP2k4ILoQYuHFkFkqDigCJ7UccTDyKjMgIjivisor9N2pm0c0ZFu2Nal4B/iS6Z5Sdrn0h5fPuecvvx+3/cL5ZVijG5gDcbmtRibcV8OMLqY5KVI4fVHPLrHACP3BSMHMB57dBE/mQENA4wyLqAywBgmMyAp6tE9ATjJ5nySAOeJRxclacWkKINsAhhKc0AKwNjEIEQF1CMyyHWAUWgaoWwBYFxnELGHnIB8XTKDDAGcYsqaT6oIcIYYRO7yUaTwdQkMchtg5VKWfHIA6zaDCAQFRAUEntENArxS1rRfJYA3yOh4IUCRw+uPupG7AK+gZOvxKAWAd9eNRAl65bWWdiMPwB9VM/m8UgV/9MCNkNTRagmF3MggaNugGwmRVEGULyBwPHINtOkaj3BCgKSA1FORRwZAmwZ4hKQzsb5jvKEPtKWPN5C1YeqO+WMcMtDmAHFIzE/WhqnvmMwZhkAbhjgDWW9Y/ZhmOWRkA2jZhhEOYYk6o/WaFjnDI9CyR5xBJKyi0QgZboIW3eTIHiDtmuZMwqAlYY7wAdJGKMYaIn0tvfAR1hAjcoDUEQqxJk/7WsjnKWsSIu4JQ7eQyJpEwv+9XxHWRCTuBjIvGW3C3gD/5QZLm5C6YJAPLhlt0f8f99DpftoCLhipAcGEJJm2GAn/c71GaAtZIjefqRqirR7dA39ReEhbkVtAeg01JsTy/dfBH5Rz1ZeN+RBbQHXexoRYzu0ZvrELNKkoiUS+GLbmI3SR+cIbfE0JcTzTuWjh8LuL6wBSziTiP2upxFjp3oh1fkguICMh2WmACTGexctXzl82q3vv4Vv3n1eV76naT0gLqNDvRGQ75ANZE6JpuGOdy1fP65g1c0ZvMHismP+YjsOEftVGE2OZygNTPsTvF3rLpJDLSIjVdmxFx5LZakD3P2cmk6PxXz9r8dHkZKYSpp0aV0gi+/1quBgF0QgI7tiihSvnL10wc04wuBeUPnxMj9d+wQnKTijlNW+cKlEg+D7EF1HI5dA4TTs2pzf4anM1PwFHqKYFlK9+7YffuEI2qR9TQoEeQXao6ju2Wt+xLZ8zY4nUeK1W+5H++KEEXjocstATsFc+U0MkCaID0t4xWEJwx2bAHXuh7lh2NB6Pj6YTY7nKiWeCZLPxMUckuxxO9NBrO7b1WxnWdGo8Hh9PJyYznzdetWc8kA9G1COERKfloX91oAJ3LK2OUCo5oVS/XvDZNB+9i6SQHI101nestzd4ydixrFpC5ylb83lhRqIYfXrnztupHXvxqapMJFOohM7so2zON23a3FjEAxN6//p1d/ee0/BWTKTVEkrBEirv2E7Z3bRp0100o/b0UlhD3UcrOaOE8sVPFyi7UwNy8p2LVs3rWLJg5oyDDSV00sYlrSc0fa6Dg7fQvI6ls2bPOPQV/tGjEspUdvspu4Mj5GCZxfAhgwHN3LbOKKHkpFLeuJ6yO62E3J3asQh3rKGEwBHK7mBAc00ldBaU8qYSKhynbE8tIdazuF5Cp3bqJfRjqoQo27OW0JWGEtp/lbI77aE3SuhAAZZQ1riELlN2N1VCHr2ELoFifsJUQuco2/vNzrmzNBYFcXzkFrts2t1mYV+wsIRNsSy+wIhC4gN84RMUH2gKFcEHFqKgFhEF7UQFGwu/iUaRWMRCrhKCWt3v4Tnn5ubcmUhsrJz5f4TA+WVm/j9uVZUPoR8GQv1xBKGbNZmE9BvzIfRNQaimS58VLYQSk8A9AYR+FSchBaHiH72BUB1wD4HQYU5B6DyA0K17DOxjIPQhgNBAzMsGd1cDoR3gniKEvv80EGpKhiD0mPVyzcA9IQipNxZdd2+vBUJlEFInj98+hJbDELoQCJVBSJU/CEJTcnf1766fixAa+mcg9GS2jUdV/hwB9/gQ0icPDaFIr2vvrvomJOuYhtAnC6ExA6GM+YF0+XMg2waZhAyEbAOdkLtr6O6qb0KpgkDopfIngJCz6eLyRyYhBKGPTp+BkG2gN/4A95Qg9MVAKE40mH3gHgyhKNVgZB0jDXQraaBHgX1sA/1VvbFlosHUvqcPBr1B+eMMJhWEzjIlDSYh6xiGkHMabqCzd7ET4B4CoV4CoUVgH6zB9MXCELoqrAH74AZ6KxlqoBWEhleAe4gGkyIuXj1wj942iIsnGkwFDWYcazAyCZVpMKtEg5kD7sEaTGSkIBpMxQZ6mmgwMgkRDSadxxpM7X/gHtNAWwhVYw2mQzQYrMFE96wGI5PQSxCaxRqMQIiWP+m8pyF0GUBoV+6uAYT8k8dWEkHIy8skhDWYiNZgBELlELIaDIHQzF/gHgyhiQfs4s0LhIgG0+JrMIGLl98G7sEajKM0GIFQJQ1miQrBAiECoU7s4g3LOobLn5oUhlBMIEQgtO7eixD8OoQyJSF4AdgHazDpagyhefGEiAbTglw8Ly43IeLi9WAhONcG7INdvFkCoQ1gHwyhdgKhbvafy6EaTCMWghvExXtm79p1m4ii4CLoItHTUq+Qi7iwCLhIkGJB7NjmISgCElgCF0EipgAUIRSqKBINKSjyLxENQkh2kRjJDqbzf7B7vbt3Z/ZhUd+5/zBzz5lzzgytwfSIhBy3pCISCtdgxkhCXz3nH+7i9akdO9R9JpJQbUFCpzEJ3RUJZRaC8TRKlRAtBA+wEpJTBZNQYzj9AfeZOo1CEqo/T5OQrhJyfPGIhN56zj8iIbjPlDCd2cXb9PE06rFIiITpYBcPSEiaEJHQkUio7CrBkBCcRr2W7kok9M6cRtkjcY3oqR0TCS0hoY/pq4RzHYlnSGiPSGhblRCR0BaRkEb0dBpFJOSrHaPTqLaOxPNJ6JoloXPISvCcf0hCD4iEdiVMEwndQRK6qawEIqEeZyV4zj8koY5PlZDn/KOshNU0Cck4cCkJDR95rj9VQv9HQgOyy9GyIjtV+KMUCWk6liGhGjhVBJqQSIhISNF1S5wquhMioRue648qoTWMrluXXQ6SUPUFkpCi65iEjoPUKJFQGQlRdN0H6a5IQv0ttMuZiYTILqeFqVFqxzKBLWSX80mWVGiXszP5A04VTZEQpkZ9rpBThaLrKDWqRU4VWoNhzy57JG528bave64/PBLvrlFWgoY/mBpVi5wq4m7D10cPdjkhCckhuCA1ynp2ySG4hISiCbQyagt28WD4IyMGdqrIZiXo/BCdKgKMnUQOwckNtPZd8Ui8HptzmgGrZhtZEro9PtOAtWwh+BWHIqnbsBNoioc0UQDrclxC3bV+iz76Z57rD7qN+PxQBriF5pxdkhV3tcSA3UZjNbF904lvriXVPn708hngj36POno53V/Cy5/7/hTnh+ro8aOv2SWGU8Vt8EfPcRtmZdr5mGP66Hcm87R0P/X10eNHXw28PJSrVdbRt6WalX/0nbCYlody9qOPMfawovFYadwGq2bjb57rD6R766GcJLY4b1VB0n1/NVVM/xXGWLq/smLOEjSCLj4eO7J7MItoNucdcGlR6CBy50xEIS2VYzFdq5iGVdOfgmLaKNNhwypRqKiYPrANq9nnlPBqPnq7EfylYhrW2NZMwist4yWWSxZjzq8r2mLaYCxaKk+EV6X7kTLd2BilMfZbrl1Wmc7D2NnFe/1jkTIdNawDwpjC66hhbVQsxr7LqDynYW2PEWNNDTfCYtpOfzqIsbmvfyw1/THCK/xj8lzKYKxFtWLT+W28pGGNMDZEjCn1hzBWCzAGmsdLz/VHGNtHjI0OpSsixk7uzVFXdH6hkzG2cQEYGwtjXCtaXVGZLXkYezpMafe/fmrPgzFWRe1euUiMscvH0Qw63qWaqd0IMWY1j83ZYgatC8QijD0JDGFSLb3GPwZjVleMrqNsu6FACasrXjUY86ndeON6x0ra/UoPZDO5Vfxr70xjo6qiOD6jYlNHRawGqiIa0aSGGLSugUqM4BJUVKRGUUgUVPjg7gfEXWNAjPsW16DGLUajX4wmb9qhpdNO22nTdqZ0pkOnWNqyirK4ffHc8+59590773X44pd33glhacKXX84953+Wex/17uV87E7RNiMpFN4fM+dj9XXuckOEae7PUhkLnbGr4m4p1JabE0ohnEE7u1TLrtOkUH/82QhzM/Y8YnfbK69UsXLvCgEgrdy4V3wYicJ0+HCXWdLXz3dLofCDCSXlRmwRdoXsrWkxhA6/jGSUG4tho1OF6bCx6CGFasSjQu4wfRv3R151KXRUDG4mKDUdNj28pNC1c11hOtEcfrZFSSEM06Smaf6T/jjC20wpdAs2FlWmD/tmJIVkmL5ohWp6YKYP36ugrhCGaWx64PzHGW88xX2bSnaFVJiur3Nnemi9LnwnwtvMMH0vZXpbLHL/NhIA0tT0aizIlAuFy0IqTFPT4yox3iAXCktWGaYp09vvLikXCrWQ2fSAmt5wobXMP5gtmx5y/gObHmtcLgRyOhtn3jiLYtODMn3scnIhuyLj/vkoyvQ43jhyMQ1Zh6CoF6me93sDTqaXLlSzQrqQitPs2x7UN7PF4vNblBbCON2czDEvyUyxWPMkymk7TotD1ptn/gqlWyyKKHTNwrwYkalDtrUvm7mR9ZBMiUXlQrGlA9tlXwgzGchF5q96mC5UX5fphzgtMxmGId6BmlxIaqE7C129zXjIVBjqYv2oe5RcyJbTsZXp7ZjJ7DCEgXoO56080kKyIps3O5Ptk5lsMwbq/jznMVlUaaGZyoWWXQeZDOSiVENCL2YeZzwFAkCyIhN9IUHo3oFcUoShISIUv5HvkANdCIt6GaePrNkAFxGbEzJQYyobjL/FVw5JF3LF6RcgDLUJNSRTGRDann7mnAhXw76QSPXikCGhW67LoxpSqQzlEN+NDxWn4ZCJTAZyMXYzqKEU6kWV7IEQ39VF7ZBhGIotxUAtU5lNqGuA7TNntgtNgUzmhKHYovR2jRBKaraPe6hMJuSiDEPzPo3bqWzITYhtkxoP2SQKQ0BodR2mMkz2KKnb+3q7FnJ9/T7qhKGZqIYwlV1vENoqCHG900phiAL1YpHsgVCjTagVCRW4XnVRYUgFakHo0QIQ2oqCEYsOUbhyJnTEsdD4QL2oCK0COdTXHhJyhyEI1E4qE3UrCkYi1A2EZjGNQxSoMZXZcmhpSMgIQzKVqWQfu8qDENtcplIZrHYSoZXpXLKE0ABTPQSABCFMZYpQzSKDEGb7AZ6jDgxDTrKXgrFmQykhtnWZTWiSkkOS0OWehJ5jeb/eTmUoh4jQZd6E7uBO6AyH0EWlhERt/zDLLqwjGN2E5hmEoLYHQulneROa5u9DjUgol36G5ZqnRsgnDqk+9VMsd/S8Ca3wJMRzooiSmgiRHiohNBhfy3Iq7U3oyXQO6rKEi5CYuV7McrPBm9BNWLlSF1ZMFAczd3EmVKEIUW3ft1UjBLsft7F8DJ98yJPQkJvQlSyXhT0JYQdNdPLlRLFJEOrPz2HZhvUmBF3YfkUIt2MS3UCowLL94U3ooULeIIQttOfOivAzL0JHxh6Zle9vMwhB6cqyMNMJTZeEbp6bz7aJzQYUREOiuMfCjONFcocQ9oegC4uEProwg4RaHEJYdrC8tSDrMoPQcknIKDsu5njzRRGSnXw5UVwCmw1JRYjKjhs4rpx7E7p2fnww2axKVxLVHK8t+BBaEN+eTJmE8ixnitSnxomiJPTC7dj+SLQ0bVaiGiUjx3mQJHSqRggb1b0pVZiRZOT43rKL0MwZsPsBG1Y4dMXS1ZSMLAWRTUjMXMVmA+6gYXFPpauSjNipZthlVFNpezuGStcClR1yHoSC6PUIO5OEphgttFULgVCJIMrcz1AQeRKCO5xzUVSbgmgOw8+zR+3tmEqD0DIS1UQI0j1DQaQRosLsmtnxQZKMQhCJHhrLBRkkJNsfULoqQVRflxaiWgki6hDxG7tGqf3hLjvm3Y6SkQQRdogG4w/wS/eSkFmYXbSyRBBBMsvmX+I3MotS6YplhxLVL1MvX4VqOGbb13BN907ZQb38WZogGmpCRZSdy/ClOCJEotoURMNwzjBWJ3MM75hR2aEJouVrMlnVQxseRkQoie5gmcw0US0EEfZhlSASgEZGhoeHIBSlkvfw+5wSEiLJ6HQZ75Y9NHChkWKxODIMjy/DOXuPXzNfiWqUjJTu6zeku3rxnbjhom0jDY1wzmbz2/8gUa0LIlwhAkIN4EHj/+zbvwsQNSXav+BXu5JkJEFkd4gEodYhcKG/9+7de+DPseLI5paO5m/ZfZQrSr18TRA9Eoc41NG6eaR4YO+2bdv2HhwdKw43bmr/gN/c1UcQLZ6bgzes4JDtA0Bgf4+Pjo00tCTefAP+Q4SV2YRKBNEtswWhxuE/D9iE/v0DnSix8fxo9MWHb1i3fu0lXJaHSRBpHaLVK8QXpBtHdhzahnaoRzjR0KYvXrnPsm0dl5U0XRBR/2MlfGOhtWHkj32Cz6+/HvgLj1miYDnGZZ2IBFG1WxDFlg72tbc0FMf3Ax+wbQfHx8eKectlXHb0kZBHul/V35doGS6OHgRAwvbvHG+zNOPybXsSRJTuccvqx1SiCQj9dcAmtG/EMmwdk093RH3S/fMbIZWNjI32HLJdqNMyrZbL5MNM9yqZfW0T2rVPOFCX5WEPM9HXRrqnyswmtHP/r4cSlqc9xURfu9K9lszebk4MDY+Njh8ct3zsBiaTD0r3ejK7sx18qDjaZvnaeiZfTjbSPTViN0JZ1mxNYLVMVLVfMlvydUfKmtiYvFHgEDI2ZOYt6rTK2FtM+vo+O0QrrbL2+BsRFqbVruq1uMsWWuVtPZOuNbWqgZD6qJJ1OFbLZAXdIURv5z5qHZ5dzePGWdT10pftQssOj09n5zPnRTgYEsJ3rOSn3ZYcHh74dTGTEaz6FoX6Ltf88nwAj7D7mawPGx9Kfqg8H2lbuCzHSheS376rWVAWj4V4hD3GIlTLh2HVJ0rr68qFH+SDVniQxZtE+hmLXbRiAkA6n0KBRTff/ERp7Kpy8UfhGRgYOJtBN1+eMZnHcMpR63vAEA/xSafnBr+br/IYfasjtniO3/kiPognHY9nAt/NRymkP5IfWz2/3Pmy8QCfTCbw3Xz19rLrVVj40oK3A23R+WTA8vk3A97NpyfgXT38mpsMPob/KPfJd+Vyua8CHqrpVVj3lOOhTp8ATXwAT1ducDCbnR/sbr52l5z2z5bNsshMPo77DGb7+3t724K9pe+zobfkeuOAER/lPognmUy2tX0YBbvg1kuuvjSI542mHFqH+tW7PRyI+ACebD/S6etLpX6+4ocHbQF1cQAPnDGyd0L1k5KPFqCJj/AeQadZ2IL1Tk82gJc+aMphDKTJgeiAOXzQe5rRulPuoH5f8MpYSYgG0vKYPboQHcg8YIoPek93d3tHe8Fy29rglbE0kNZD9TUXSkDGAbP5IJ6OjkQiY+kWwG+XqxuK9kCaQnX9AgLkOmAQf5AP4tk0aDFYSqOBtB6qL9tgOhAeMMUH8LQmvcZnAfyihz6QplD9cokDER/A09rdacfy7Bb4PdD7wzSQxrqDdodm6Q6EBywl+TQlJJedPXuSQV9Ko1Ct1x23XIiAMIXlu+QBk3xaZAJL9/T07GjV94eDt5Tml8xeWEAnDCKQ7UDtgk8jJDDlQWCjWpG7PniXzb1DdQy+JWCfMIxA5EBNjVmHxpZxQeiPgaAvpfmF6qV4wsiB7AOm7TQ2CEJ7BDKyAH4WRl+EpVB9cx5PmB2ipQN1W5qlfhOBqEP72QPBW0rzC9XPX4iA5Alr79jUmjB39rp29YAVOwO+P+wXqq+ty+QdQOBAdGuKAtHvgtDvhYDvD9MirPvOQgw+jAMxWuYw0NBxr/FQURDa1RXwpTRJqOTOQuzpXM6J0QRBs44dQOg3feM6gM+g+4Xqb7IKUL/lY1kMRA3az+4LZjKjOwsUiJZ/YQNKWr42gJpxXCvNAvhQml+oXr1RAGrrnGgPZFQQ2p1xx6Hg5TL3nQUtVM/7ui2VQvfwt9YdQjMmg+1CTqg2646ap1MFqXtaMj6EknuEZmxx7ehHgmhGN18Rii2y0OI7KF2ZFt+tF6/rI4E0rZtPhK6XbkLpqtQ69eJ1XSSYRqHaJoSR+hrFgNKVlw2hqlYVRySgpr03KPfQ7nS8ZMxIV6XF625V1keCai5C+IV7cKFHiMEm1M1+Nzm7du5Wmez8AD8oQx+blNuwy/zSlb/dEegXdyShCnWr49VO73Tlb2vPDTQgtYfm3Oq43CNdpSfgc/8PRwQbkPtWx3Q4Y0tqS9PVnn5fPut+OjbogJyN8zPtjfObvXqtCb9Liq8cwwLQsbRxDi/C1nr0Wse8A9G3lZMDz0cQcp8xeABtjUevdWfBg8/7px7HA5A8Y7iSL4aJxtWgEey15kr4PFFRyeCEyTM2pQpX8vEWOQwTdRLdO0QgMovXsz8XDsTg4UFaycflIbtDrbMYxEA0rCewd0/g4UDOxaBq7J2pYWKtR6/19y2uBPaaOGAcHEi60CTjY67LryQYVLySZvysagqPA+aqN3RC185GEHrxOqr+9UGVCEAsDphTb0hCNEy8vbTXOib//uZJJ0zicsBoEGQ+b27e4oyPFWUQeunzE9gEICLkMUxc5S2gr3yXT4D23/vwv8VZ+10FnwBddpg4n8BQAmOiEMsME/1ucX4o+PBQiDohv6tB6n0vngms7DCRbnEyTWDew0TfW5xnf88ugZUN1eBFS9TrMfd8zjCBTRSq8X6ZsMW/vPflEx9+Us2oAitDSG1Tn3bK0cJOm37yiWeeXs2qAjucUA3HbPppYNOPP3mG4MM2gfmFauFEJx9//PEnnzhjZsinNFQLJzpjxoknzjjjzKnTqqsYJ3jfQFQ97fSpU2dOnXr6tJMqTg39hwipYwaIqqdNq64+qQrye8jHDETHTAJEFVVVVRUnnFp53OSQj0FIIDqusnLKlMrKSccdM/mIkI9GSCFCmzz52JCPSQgRASNh8Gc05OOBCBkhnJCPP6IQz8QWsgntf7f/AACDRxe+qBzsAAAAAElFTkSuQmCC"
  44328. /***/ }),
  44329. /***/ "./src/assets/images/play.png":
  44330. /*!************************************!*\
  44331. !*** ./src/assets/images/play.png ***!
  44332. \************************************/
  44333. /*! dynamic exports provided */
  44334. /*! all exports used */
  44335. /***/ (function(module, exports) {
  44336. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACoCAMAAABDlVWGAAABJlBMVEUAAAAAAAD////l5eX///9iYmKDg4Pn5+f///9YWFj////09PT////4+Pjt7e3///////9oaGhBQUH////////////////CwsIaGhr///8xMTEkJCT////7+/vp6en///////////////+srKyoqKienp58fHz////y8vKTk5P///8EBAT////////////////V1dW3t7f////////////////////v7++jo6N9fX3///////+UlJT////s7Oz////Nzc3///////+RkZGPj495eXkTExP////////29vb////k5OTPz882Njb////////////c3Nz///////9ycnJsbGz///9dXV3////////Q0ND///9QUFD///////////////////9FeiN6AAAAYXRSTlNmAP3c+oWT3ueB9vA19ealRId5EQbuurpu83RxD/nh05dfAquooo+M7JtzaSolE+vMspJ3Wj7w6KSQj6ucKeXNxLWnmpmObVYd8t3axXZRSt7TvbKLideCeSzHnn4V3Nh6YarbPAAABlRJREFUeNrU14lWEmEYh/GXcdj3HQTZRCkS913UNE2zbLd9Oc/930Q2LmVpwPAC03MD/M5835n/IC6dkqHnzcVoZvdkLp2HfHruZDcTXWw+DyVdOilAt6uNjI8782Ua1W2XjTShtdDSmzRdlH6zFKq5bKQBTS5H57gqXJrP1tsb7kShkBPJFQoJ90a7np0vhblqLrrc8R7oQ4vVPZOLIp8mp8flzsanJ59FuMjcqxZdHVKFxvYDWK1lPQXpooInu4ZVYD/m6pAWNLn0DSvvekJ6KLHuxerb0qyrQwrQViV/oZzKSc/lpi6sgUrLdSN16MyWARBcOBWbnS4EAYytj67r1KGtqMUseaSvPCWLGr14u+pDZysmwFhc+i4+BmBWZgcATTXTFvO9qOS3qOlmShu68g7A6xa13F6A7yuq0ORnA9jZENU2dgDjc1IPGvMB4QNR7+AJ4IspQVObBjDmF+Wur6qxmdKAbpeBoEcGlCcIlLf7hx7lOzxOlYeaP+oTmmoYQFsGWhswGql+oMUMEInLgItHgEzRPvS43OHYVY+/fGwXGvIBkzKU6oAvZA8aywOPZEg9AvIxO9AXAZg4lKF1OAGBF71DX5jw5EyG2NkTMJ/3Co2ZcM8tQ819D8xYb9CVgA2nijSw0gs0tArBzk59aRBWQ91Dj30QjssIiofBd9wttFiGiTMZSWcTUC52B629Bg5lRB0Cr2tdQRvAfRlZ94FGN9AjA+oywupgHHWGzuRhTEbaGORnOkFTZYj4ZaT5I1BOdYBuAnEZcXFg89/QmAFtGXltMGL/ghZ9I7+g19fUV/wHtAJBvzggfxAqd0NXDPCII/KAsXIXNPXOIQd/efjvUndAmxB2xMH/zB+G5u3Qr2k4EMd0AOmvt0IrsCMOagcqt0FbJkyLg5oGs3ULNApecVReiP4NnTHALY7KDcbHv6BbDno1XTUGW39CWwa8F4flB6P1B3TRgQ/UeqSLN6GzAQd83f1dHAKzN6AfoCQOrARLN6Andr9GpiITT9/KwPLAye/QGATFTusAxsOCDKogxH6D7sOC2GkNq+B9GVALsP8LWgzAqdjJ4LJXCRlIpxAoXkOrtteT6yYmH8gg8kL1GroHU/1CoTSQBZ6CvSto0oRc/1DM7GNRLwdm8hK6DF5RgMI9j6jnheVLaBTWdaAwPy7KrUP0Alqbg4QWlPCU6JaAuZoFDcGaqEHh6RdRLQIhC/oBsppQzAXVN1UWlixoBjyqUIhozr8H3vyE1lYhpwnVnv8CpH9CZyAi2lAIPtK8pDPn0Cp8UoWqz/8zqJ5DGzCpCdWf/0lonEMzMK0J1Z//acicQ30wrgnVn/9x8LkkCWFRherPfxiSEgKvLlR//r0QkmWY14Xqz/88LEsTsqpQ/fm3RlQWoa4L1Z//OixKFNq6UP35vw9RycDGMKAYD3P9vEhlF9y6UP35d8OuvISELlR//hPwUqxh0oTqz781TbIKueFB4em4rb/Mq5IfMpRn0nOPIS+ADBUatvcz/w/0B/X2VgMACMNQ9AMnWOADKwT/QuahyZYcDcte7e146X9W+vFmWmEzOeOJGfjMCmWOEubMYw7no7wizHPHvMuMAMFIOo5IxsiOjJDLSOOM2cDYN44hxliMjGnL2OAOWMCgGgz84uBEDKDFIG8ORLhzLPO2Y5kK6PpMdJiBsR28nQkMOBEMJtTixISY4JUTZWPCgVXevesgCINhGG7dZPLEIg7GRRsMTsaoMTEOnmLUuBgn+e//JuTHGt0aKT3y3QIFpj6vO9ctnbnAmr9PIysefn0E0PfhkjW92HFtnQHULn5AAG9aISZGF3NaQYxVrInRrcVYBW4H5vkPEPIfuIV5UGXhClHT8Qv9oXQ/MckoTfb+wVTGqK8ZUl9+4mmUnpGj03pOmzlH5y/w5w6ZiAil+G9qA0KpkfWMTxKsJ6530wel3try9CwjSscg27BTDcw321gHjzyuEjj9IbwP1hPeDqHo2abP0pn5XMR/NhTB/fyo2gv3q0gh1JSkEHCrUuMSG1VxCdxDOtfR1ZDr4AGUwIUACi5JJZMyx1RHUgY3kIn0LBuFQk2EFlv7J3t0+id7JPi86wlJsfm9FUVbQrZR1LrPmQ0hKZfSXC7Fzr5LeD7uGoYBQBCGV56PS2g5ewGy+NkUNbjr9gAAAABJRU5ErkJggg=="
  44337. /***/ }),
  44338. /***/ "./src/assets/images/play_bg.jpg":
  44339. /*!***************************************!*\
  44340. !*** ./src/assets/images/play_bg.jpg ***!
  44341. \***************************************/
  44342. /*! dynamic exports provided */
  44343. /*! all exports used */
  44344. /***/ (function(module, exports, __webpack_require__) {
  44345. module.exports = __webpack_require__.p + "static/media/play_bg.5636b7ab.jpg";
  44346. /***/ }),
  44347. /***/ "./src/assets/images/play_disc.png":
  44348. /*!*****************************************!*\
  44349. !*** ./src/assets/images/play_disc.png ***!
  44350. \*****************************************/
  44351. /*! dynamic exports provided */
  44352. /*! all exports used */
  44353. /***/ (function(module, exports, __webpack_require__) {
  44354. module.exports = __webpack_require__.p + "static/media/play_disc.c34e4343.png";
  44355. /***/ }),
  44356. /***/ "./src/assets/images/recommand_bg_2x.png":
  44357. /*!***********************************************!*\
  44358. !*** ./src/assets/images/recommand_bg_2x.png ***!
  44359. \***********************************************/
  44360. /*! dynamic exports provided */
  44361. /*! all exports used */
  44362. /***/ (function(module, exports, __webpack_require__) {
  44363. module.exports = __webpack_require__.p + "static/media/recommand_bg_2x.d045fafc.png";
  44364. /***/ }),
  44365. /***/ "./src/assets/images/search.png":
  44366. /*!**************************************!*\
  44367. !*** ./src/assets/images/search.png ***!
  44368. \**************************************/
  44369. /*! dynamic exports provided */
  44370. /*! all exports used */
  44371. /***/ (function(module, exports) {
  44372. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAYAAAAHkiXEAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAACCBJREFUeNrtmm1MU2cbx6/rlDUFAhiDCnPIySQDEoxKl6G8ZSggDgTFUD8ofsDXhUV8K1AUDabhpQWtZm5uIdPAQpC4MDdRoLxso8YO1MUXEAIuDQPWxmyEWR1Uzrn24Tz1eUJiHpVy+jzx/L407Yf7uv7X/5z7vntfN4CEhISEhISEhISE6KC7E5hJeVl5WXmZnx9zgDnAHIiKIjWpSR0YiLmYi7mLFkELtEDL339DNERD9NgYZmEWZg0Oqi1qi9py9667839V3GYAERERoj5Nn6ZPU6lgASyABTk5kAu5kPvhh9AJndApl7/0gNmQDdkWC9jABrbGRo+9Hns99lZVHTQfNB80j466S+d/Q3QDdP26fl1/TAyshJWw8vRpKIESKFEqgQUW2IEB6IIu6GpsBCMYwdjczEQz0Uy0xSIfk4/Jx6xWh9ahdWh9fKiP+qgvIIAUpCDF++9DOqRDekaGYEBKCpRCKZQSoS/6oq/BYNfZdXbdiRMlWIIlODnp7sKLboDOU+ep89y9G5SgBOWnn6IJTWj67TeaR/No3tGj6nH1uHq8vh4REZHodeNUxVXFVcUFBXGrudXc6hMnIBzCIXz7dsiADMjo7oY2aIO2TZvyVfmqfJXVKpb+FzHnBlRoK7QVWo0G5ShHeWmp8GR+/z2ZyUzmrVsLwgrCCsIeP56z+P0V/RX96eloRCMav/4amqAJmv78E3IgB3JWrXK3EXNmQEV2RXZFdmYmXsWrePXSJQzGYAyuqbHfst+y38rJEaYCnhdLaJVflV+V38qVnJbTctoffwQTmMB0/75iQjGhmEhI2Ne8r3lf89SUWPk4kbl6QH2NvkZfs3Ah+IM/+Hd0YC/2Ym9Pj/2u/a79blaWUPjpabGFtk61TrVOWa3JPsk+yT59fbAe1sP6Q4eexT+LfxbPMG31bfVt9R0dYuflcgOS/JL8kvwqKoTFNCqKs3E2zpacXHyo+FDxoUePxBY4E2OvsdfYOzCQJE+SJ8mXLsURHMGRnTtTvFK8UrxqalqHW4dbh//6S6x8GFcNVHmz8mblTX9/YRu5axeEQAiEfPmlZlQzqhkdGhJL0MvCR/KRfGRxMRRBERQhckbOyBnz8sTOw2UG8HV8HV+Xnu7cv/OhfCgf+sUXYgt6WQo1hZpCzfAwbIANsKGlBcZhHMY3bxY7D5cZgHVYh3Wpqc4/RILAe/fEFvSqkC/5ku/ly1ALtVDLssIaFhEhVnyXGUDX6TpdDw3FTMzEzJs3xRIw6wKMMCPMyK1bzu+8kTfyxvfeEy2+y0baBbtgV2Agf5Q/yh8dGxNLwGzBS3gJL/1HvkEQBEFvvy1WfNcZcB7Ow3kvL2zGZmx++lQsAbPlsfKx8rHSbn/+gxKUoPT2Fiu+6wzYA3tgj80GnuAJngEBYgmYLYpyRbmi/N9PPEZhFEb9/rtY8T1cNRB2YRd2jY6SiUxkYlmxBMy6AIs9FnssZlmykpWsALgbd+Nu8aZQ1y3COZRDOT/9BCtgBayIiTlFp+gUzZsnlpDXzvsYHaNj69eDGcxgnpriT/In+ZM//yxWfNcZcI2u0bXLl4Vj4bfecgw4BhwDqaliCXlVjtNxOk4Mgw50oGPjRiqlUirt6Jjrw8GZuMyAp4NPB58OdnfDZtgMm3t78RE+wkdHjghCPVw21bkKrxqvGq+arVtpP+2n/SEhkAZpkPbVV2Ln4TIDnp9uxkEcxBUWwg24ATfCw73PeJ/xPvPxx2ILexHOlicuw2W4TKuFFEiBlO7u/MH8wfzBb74ROx/X7YL+Rf5Y/lj+2JUrsByWw/IrV4TebWWlIDw2VmyBThoaGhoaGmQyxp/xZ/zr6oADDriAAMqkTMrMy5ttI+h1cbkBTvjb/G3+9rZtMAmTMPnwIXOHucPcaWzUFeuKdcVxcWIJFKZAhcKis+gsugsXhDOfjz7CaqzG6k8+KRgqGCoYMpvFymcmc94RK6MyKiOWlUXJomRRTU1wFs7C2ZAQfIAP8IFabc+2Z9uzP/vM1X0CoRMWGooLcSEuvHABqqEaqletEnrPExNcFpfFZa1YoUENatBimes6vIg5ewOcOAUq5ivmK+avXg0+4AM+zc3Cvvv0ae9g72Dv4Hv39Kye1bPbtjnn6FeNo4vVxepiIyP1HnoPvcfnn+NDfIgP79+HeIiH+LAwMIABDKOjYAELWPz8ZFaZVWbt7HQ+IG6pPrjxWop+Qj+hn0hNpe20nbaXl0MMxEBMRAQkQAIkOBwUSqEUajbjDtyBOywW7MEe7LHZaCftpJ0KBRyGw3A4KAj6oA/6IiOFZvuSJbAFtsCWyUlaRItoUW3t9Lnpc9PniouZPCaPyfP0dBbeefrpPL3lArgALiAhQew3wu0Xs5z3gyprK2sraz/4gHqoh3o2bhSa6LGx1Emd1PnOO0KjJzBQ6OVOTcEROAJHbDZaR+to3S+/IIsssj/8MG2aNk2bGhqKEosSixL/+GNmvOdT4v+IEW43wF0IU92SJTKNTCPTdHaSjnSke/ddSIRESBwe5lq4Fq4lIUGj0Wg0ml9/nas8XN4T/n+hrb2tva19YmJt2dqytWXffssUMoVMYUYGLIWlsJRlmWQmmUnetGkNu4Zdw373XXt7e3t7+/i4q/N4Yw1w4m4j3ngDnLjLCMmAGYhtxBu7CL8sL9o1oQENaBgaCjYEG4INYWEqlUqlUnHcq44vGfCSOI0QGjhGI12ki3Tx2bMnsU9in8RGRIh91fKNxdlHcH66Ox8JCQkJCQkJCQmJ1+AftC7wCSxDskEAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTctMTItMjVUMTE6Mjc6NDArMDg6MDAbwa23AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE3LTEyLTI1VDExOjI3OjQwKzA4OjAwapwVCwAAAE50RVh0c3ZnOmJhc2UtdXJpAGZpbGU6Ly8vaG9tZS9hZG1pbi9pY29uLWZvbnQvdG1wL2ljb25fc3VrbjFwc3c4bGNnemFvci9zZWFyY2guc3ZncCd/SwAAAABJRU5ErkJggg=="
  44373. /***/ }),
  44374. /***/ "./src/assets/images/stop.png":
  44375. /*!************************************!*\
  44376. !*** ./src/assets/images/stop.png ***!
  44377. \************************************/
  44378. /*! dynamic exports provided */
  44379. /*! all exports used */
  44380. /***/ (function(module, exports) {
  44381. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACoEAYAAAAk23n3AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAGHpJREFUeNrtnXmQVMUdx7sXFJZbFuRWMAa5lkOjhiNyagClkioUKiGGMigqpKiK8b9UJURBiDFWJIlWUqhIQgyoGDWEK9y73EfBBkMO5WYjQoA9XFjY98sf3+1l32y/2ZnZme15M9/PP7967828+fWvu7/Tr18fShFCCCGEEEIIIYQQQgghhBASgXbtAMkMREREcnNx1KuX33buDNuhgxIlSjp0UFpppfPycNyqFY61xnG7doE/pJVW+uJFfE4Ex2VlOD5/Hh86exbnzXFxMeyxY7BHj2qttdaXL7uOGwk3FFBiBYLYvDmOBg+GHTjQb/PzYe+4A7ZTJ9d+x4cR1iNHYIuKIMRFRTg+eBD20CGdo3N0zpUrrj0m6QUFNEuBQJqW3ujREI4RI9ByGzoU5++6C/bGG1376xbTUt23D7awEPEqKMDx5s0Q2NJS156SxoUCmuGIJ554gwZBGCdOxNkJE2CNUDZt2vAfUqKkvBy/c/1RGfbUKdhz52qseeTWSitdXo7jSAGKfMQ2LWJV/SjfurW/CyAvDxeN7dABtkcP2J49YU3XQosWyYlyZSWsEdbVq+HPqlXoKvj44+T8Dkk3KKAZAoRywABU3ClTcHbqVNjevRO7a1WV/5F2/37c3xxff+RFC+zsWddxiC9enTohPQMG4Gxk18Sdd8Ka602aJPZrhw/DrlhhLITVdB0QQhoFVPy2bfEIPmsWjg8ckIS4ehV282bYn/wE9xs3DrZ1a9fpdY2JA+z99yNOc+fCbtvmj2O87NqF+z7xBONNSAowj+CocG+8AVteHl9FPXcOdvFi2MmTjRC7Tl/YMX3JiOfDD/vz6fz5+PKptBT3+d3vcNyvn+v0ERIKUGG0hh0/HhVp/fr4KuClS7Bvvum/zw03uE5ftmHijnyYMMGfLyaf6sPzYFetgh0zxnW6CEkrah6ZRURk7974BNN8fuZM3KdVK9fpIdFBfjVvjvx65JG4/yg98cTbuRN20iTX6SGkUfH3Me7cGVutuXwZ9o038D3zsoNkCv6umiVLYK9cia18bN2K73/ta67TQUhSQcHu3RsF/aOPYqsQFy/Czp8Pa2bykGwB+d61K+yCBbAlJbGVn3fegTXDtQgJCf63ti+9FFtLorTUL5jt27tOB0kvUC7y8mAXLkT5KiuLXq4qKvzlyky1JSTNQAGdOBH2+PHoBdsMe1m0CBWhY0fX/pNwgXJz880oR7/5jb9cWfDEE+8//8EBX0YRx/hbBMuWxfZotWYNLIenkORiJlLE9lLK8/C511/ncDbSqPgHVJ8+Hb2gnjoF+41vuPabZBcod5Mnw545E72cHjvGl1AkJaBgNWsG+4tf1PyDB/2zi4jIa6/xn52kAyiPZqC/GaAfVH6vXYOdPx+fT8IaCSQ7QQHq0QMFateu6P/gJ07Ajh7t2m9CooFyOnas/wkpiC1bYDkKhMQIhPO++1BwioujF7B334XlW3MSLvxrKvzxj9HLuemqGjbMtd8kTUGB+v73UVCC3maaYSEzZrj2l5BkgvL/5JMo32biRiRmON73vufaX+IYFAQz99ysrhPEyZMoYPfc49pvQlIJyvudd8IePRq9XrzyCmxOjmu/SSOBDM/NhV25MrBseOKJt2kTrFmYl5DswIxP9veFBrFsGT6f7TsXZDDI6JYtYxsnt3w5bK0V0AnJQowwoj78/vfRGxx//atpoLj2myQJZGi7drCFhdGF0zzKa67UT0gt/F1ezz8f25MbF4gOLf63jEHLxJnxcLNnu/aXkDCB+jVnjr8eRVJYyGUWQwYyrkUL2K1b7RlrBgzzbSIhDQEC+Z3voD4FjV4pKDBdaK79JQGYvhfYjRujC+e3vuXaX0IyCdSradP89czSR8qXTekFcicnBzborbp5xHjsMdf+EpLJoJ7NmBH90f4Pf4Dluwbn4B/t5ZclKs8849pPQrIJ/8SUIJ5/3rWfWQsyYPbs6Bk0d65rPwnJZlAPzYLOQfBdRKOBgI8eDRvUaf3223xEIMQ9ph7CLl1qr6+VlVxOL8X4V0f67LO63Zy1x5+xk5qQdKJmWUgRCR4dY1aH4upPScMf+KBl5cyCsJxySUg6g3raqRPq7cmT9vq8ZQvXI00S/oWMI6mowPW773btJyEkdlBv770X9Tho9afnnnPtZ2ip2T9dRESqquwB5rJyhIQZ1OOnn7bX72vX2DcaJwic2awtaM+h5ctd+0kISR6o1++/H72Ljlvk1AsCFrTLpelk5grwhGQSqNc33QRrtsipRfWeTq79TFsQJbOvep3oVc9o4J5DhGQy/l1vI2cyUQfqgIC0bAn76ad2AX3tNdd+EkIaj5p9663861+wXHe0OlAvvRT4yM6+D0KyDv8jfdDmjj/9qWs/3QXIE0+8L38ZgTCbVUXyzW+69pMQ4g7owJQpdn344gvoyK23uvbTUWA++sjeWbx+vWv/CCHpA3Rh3Tq7kGbRqBwkeOxYeyDM3PZ+/Vz7SQhJHyCgAwdCHyzrjYqIyPDhrv1spEDs2GEPwKJFrv0jhKQv0IlXX7U/uW7a5Nq/1CXcE0+8hx6yJ7ysDPbmm137SQhJXyAanTvDlpfbG2Jjxrj2M8kJNstZ7dtnT/D8+a79JISEBzS4XnzRrieFha79S15CRURk/Hh7Qi9ehOXMIkJI7EA3zJTvkhK7vowc6drPhic06tsztjwJIYkTvSX60Ueu/WtgwvLzqzs6I6ZkmeWrunRx7SchJLxAR7p1g40cT250J4SjeqJPxXrjDdf+EUIyB+hK0JYhIZoKbqZe1rxdj6R6PJdrP7Md5MOkSciUDz/E8Sef2O3f/obPTZ8Om5Pj2v+kx6M6XbDTppkJHYFxqX5EhOWMOdcgHwYPtgvopUuwLVu69jPGhMyaZU/I9u2u/ctW/FujLF8uDWLzZth27VynKzlxadsW6dm4sWFxefddE2fX6cpWkA+7d9vzJwS7f6IA7d9vT8Bjj7n2L1tB/N98s2ECUQtPPPE2bMBB+Fqkxu/oLzkTZelS1+nLVpCfjz9uL687drj2L9hxERHp399eoELUhM4w/HvPpIopU1ynM+64iIjI5MmpjcvQoa7TmW2gvLdqhfhbhjd54ol3++3J+r0ktxymTrWff+89rbXWurw8lcEjFrTSSn/726n9kWnTXCczPf0Oa1zCi87ROTqnrAxHH3xQ9wNKKx2kU/GTZAF9+OE6p0SJyqbVUtINUaJSOYxDlCjp3991MhODcclYoupOGgmo/616377+q+fPw27cmJookXrRSivdokVq7x/WlyYpXNE81HHJFNatg7140X/ejE/v06ehv9DwFqhWWukHH6xzXpQo+eADNKmvXm2UeBFHiLj2ID1hXFwB3amsxNGHH9o/NXFiQ38nSY/wEybUTYHSSq9albIIEUJITKxeXeeUKFFi0a04SVhA8ejepg2OvvpV/9Vr1+Dghg2NHClCCIlg7VrYqqqaU1pppe+7z7y1T/TOibdAtdJKm3X3brjBf3H7djShL11yFzRCSLaD0T8XLuBo1y7/1RtvNEKa6P0TF1BRogKX0GfLkxCSbgStWJ/4ViAN7AMdMcJ+PoMWNCWEZAhBuhSkY/UTt4DWzPXVSis9ZIj/alUVWqa7d7sNFCGE1EKUqJqV6mv1hSqllLr33kTXMEiwBTp4MGytHxQlSoqK0PdZWuo6XoQQYoAulZTg6OOP/VdNgzD+iQ/xC6hWWulBg+zn9+1zHShCCInOgQP28xZdq4cEW6D5+fbzRUWuQkIIIfVS/aRsPx+ka8FQQAkhWcbBg/bz8S/0nqCA3nFHnVOiRMnhw07jQggh0dBKK23RKa200r17x3u7mAUUk+/N4gudOl2/oERJeTk6aT/7zHV8CCEkOsXFsJcv+8936xbv2/g4W6A9e8JqXXNKK6300aOuQ0IIIfWBmUkiaPgdO+a/anZWuOWWWO+XoIBGEukIIYSkMVpppT/91H6xV69YbxOngAbt437qlOt4EEJIzIgSJadP2y927hzrbeIU0I4d7ec//9x1PAghJGa00kpbdEsrrXSQztUldgEVJUry8uwXzcrzhBASFiy6FVXn6hJnC9RyY1GihAJKCAkRokTJuXP2i6logWqllbYsPKqVVtrMMSWEkBCglVbasmaHVlrp2Ldfj7MFeuON9vNm7xFCCAkLV67UOSVKlKRsHCgFlBCSKVgEVCutdPPmsd4hzpdIFgEVJUoooISQsBE5E0lV61kqBJQQQjIFUaIkJ0D/Yt+OOs6XSJaWplZa6aBHe0IISVcsfZ1aaaUtj/YBxNkCDXpUp4ASQkJE1IYfBZQQQuoh6G177O904hRQy7gpUaKkbVvXoSCEkPiw6JYoURL7nm5xCqhlxpFWWunYpz4RQohzRImSDh3qnNdKKx00Q6kuDRdQpZR1iichhKQrQQ2/OKemxymgQcpsUXJCCElXghYN0UornTIBNUvhR9Kjh+t4EEJIzGillQ5aeT5I5+oSp4AGrTwftFI9IYSkK5aV50WJkqCV6uuSoIDWGqkvSpRQQAkh6Q82xzR7ukW2QEXQMj1xItb7xSyg2IypogJHtXbfrF7+CbvZ1dqtkxBC0g1RoqRbNxxEznkvLobOWebIBxD/XHhRouTIkTrntdJKDxjgOj6EEBKIVlrp/Pw654N0rR7iF1CttNJFRfaLAwe6jg8hhETHolNaaaUPHYr3Tgm2QIME1KLshBCSVgTpVJCuBZPgcnYHD9Y5JUqUDBniNC6EEFIvFp2K2jAMpoECWquztbpvAS+TODeeEJI+4O37TTfhqE8f/1Wz+lIjPMLrHJ2jc8wP7t/vv9qkCew997gNFyGE1EKUKBk+HAeRCynv2ePXtdhJfEV6UaKksLDOea200sZRQghJA6Lq0vbtid42cQHVSittEVCllFJjxjRqcAghpF7Gjq1zSpQoKShI9I4NbIFu2oSDq1f9F4cORZ9Du3ZO4kQIIUopvJMxix3ddZf/qtGtrVsTvX/CAoo+g5ISHO3Y4b/atCkEdty4xg8Z8SFKlFy6lNofuXDBdTITw5TfVBHWuGQa48fDRvZ9FhRAxxKvH0nalXP16jqntNJKT5zYaDEidrTSSu/dm7L7ixIlKbx/Skm132GNSwahlVZ6wgT7xTVrXLtX3UTOzxcr58/jOvdMcgXyoVcv2MpKSSqeh/wN36gL+G+6mjwvuXG5cgVxCVoujaQa5ENuLmxJiT2f+vd37WeEw4cP2x1lS9Q1qNDPPps87RRPvJdfdp2uBsdFREReeSW5AvqDH7hOV7aDfJg82V5u//EP1/4FODx3rr1ALVni2j8CkB/PPAN7+XJ8wnDtGuy8ebBmWbDwgnTk5MAuXAhbVRVfXCoqUDHnzHGdHgKQHytW2PPrxz9O1u8krQLAsX79cHT4sP9qSYlZRgqdtmVljRNGEgQKWI8e6CP67ndxduBA5FMtYdRKK/3Pf+L80qXIv3//27X/KYuLiIjccQeOHn0U6e7d2x8Psx6umZH31ltYBu30adf+ZzvIPzP658wZ2Nxc/6f69kV+xb/6UiMlYN8+u/LPmOHaP0JI5gKdmT3b/ui+Z49r/2JMwFNP2RMQOdyJEEKSB3Rm/357A27mTNf+xZiANm1gy8rsQjpokGs/CSGZgxkNYtebsjKjS679jDNBr79u/yfgSyVCSPKArvzpT3a9WbzYtX/xJ8gTT7wBA6r/BiLG2VVW4nr37q79JISEF+hJz56wV69m3BMvUrF2rf2fYcEC1/4RQsILdCRoHK9lhmTYwD/AAw/YE1haiusdO7r2kxASHqAfXbrAlpfb9SUDVoVDQrQ2wwjsCV240LWfhJDwAN1YtMiuJ7t2ufYvRQmeODH6WzLuK08ICcZMAIF4WGbSVT/xuvYzdQEQEZHCQvs/x69/7do/Qkj6Ap148027fmzb5tq/RgrA6NH2AFy9at7eu/aTEJI+QBfuvhs6EbRWwciRrv1svICIiMif/2xvgm/Y4No/Qoh7at6hVLcw7cL57ruu/Wz8wHjiiXf77YF9GSIiMnmyaz8JIe6ADkyfbteHigrY225z7afjAP3sZ/YAnTkDy72VCMkmzPBG1P9z5+xPqi+84NpP5yAaLVogIJ98YhfS3/7WtZ+EkMYD9X7ZMrseHD0KvWjVyrWfaQMC8vWv2wNmpoJatiUlhGQM0IFJkyQITzzx7r/ftZ9pC6K0dKk9eqdOweblufaTEJI8IIw334z6/d//2us/FyGqF9PnCXv8uD2QK1e69pMQ0nBQn81b9r/8hQ2nJIGAjRkDaxn35Ykn3pNPuvaTEJI40Tc7NPV+9GjXfoYWBPjFF+0BNtv0Dh/u2k9CSOwYYYS1LEMnIlytLQmYfeUR0O3b7YE+ccL0obj2lxASjFkHGPX2s8/s9bmgAJ+74QbX/mYMCGy3btE7mbdsQeCbNXPtLyHkOqifLVrA7t5tr7/FxbBdu7r2N2NBgIcNg71yxZ4RZmn/8O9bTkiYQT3MyYFdudJeX80aGPfd59rfrAGBf/ppicq8ea79JCSbQT385S8DqyhfBrsFGfDzn0fPoGefde0nIdkEKt+PfhS9gcOF1J3jf0R4550AFfUgpI8/7tpfQjIZ1LM5c6I3aFasMPXWtb+kGmRI8+bIoPXr7bl37RrstGmu/SUkk0C9e+KJmgaLVTjXreNL3jQHuWXe9m3ZYhfSqiq2SAlpOKhPs2bV1Csr27dz8Y+QgQxr2xYZGDRswjzaz5nj2l9CwkRsfZy7d5t66NpfkiB+IQ1a0dowbx4shz8RUhvUiyZNYIP2YTds20bhzDD8j/Zr10YvAOZlVG6ua78JcYm/3li24Kl5mBNPvE2b+Kie4SC3mzf3C2UQW7dyiijJRvxTLoO6wOT6W3W+HMouzKM67Ny50YXULKc1dKhrvwlJJWZGEMq7mVoZhHmU53CkrAcF4amnYINWhzGb3z39tGt/CUkG/obED38YvfxXVnLmEIkKCsiIESgwZlO7IN5/H5/v0MG134TEg38F+KCFjA1nz8KOGePabxISUGC6doUtLIxewE6f5l4tJAz49xwywhhEQYGpB679JiHFvx6p2X45aMCwmYGxeDHsTTe59p9kN/6WZtAulwZTrhcs4HqcJCWggJmVtE+ejF4gi4tREB95xLXfJDtAuTN9mtOnw1r2Vfdx4gTsqFGu/SdZAgpc+/awQbuI1m6ciifehg2w+fmu/SeZBcrV3XejsAXt3BDJW2/xSYmkBSjADzyAAvnpp9ELrlnU5NVXYTt3du0/CRcob7fcgvKzZIn/ETzoD/yTT9hXT9IalNaWLWv6kkTk+vCnIMrLazbP41t9YgHlxLzU/NWvYitXFRUoTy+8gOMWLVyng5C4QMH90pdgg7Y0iKSkBNa8tOrWzXU6SOOCfO/VC3bRItgvvqi36Hjiiffeezi47TbX6SAkqaBgjxoFa4aJ1IfZ+8n0WQ0e7DodJLlA+O69F/m7fDms6eqpD7NIzsiRrtNBSKOCijNuHCrArl2xVRjD3r2wM2fiPq1bu04PiY5/dTCTb/v3x5zlnnji7dxpxnO6Tg8haYVfUNesqa41Xmy1q7QUdulS3Oehh8w4VtfpyjaQD7m5sJMn+7eyiOFR3Jfvq1fDjh3rOl2EhAoz7AkVaPFiHJeVxddS/d//YM3b2ilTYDl8paHUDFT3xBPv0UcR17ff9v+hxYr5vMnnAQNcp4+QjAIVq00bs6gD7J498VVUg+ljM1NVn3sOdvx48zuu0+saxKN9e/8UyIUL/XGPMnwoKmaZOHbBhBWuvJ4hoCL26YOjqVNhp0yB7dcvsbtWVcEePgx74ABsUZESJUoOHVJaaaUPH9Zaa63PnHEdh9jipDX8794d/vfvj6uDBsGaiQ5DhsD27Qub6E4FJn4rVhiLeB054joepGFQQDMcCIYRiAcfhB0/HnbECNhkzXm+fBn26NEaK0qUnD4NoTp7FufPn8f58+dxXFEBe+GC/35XrviPmzXDfZo2xfdbt8Zxy5a4npcHa8bRduwI2707bK9esLfeWnO/pFBZCX8KCnC8Zg38WrUKQvnxx8n5HZJuUECzFP8j46hRqPBGUIcNg/3KV2CbN3ftr1vMH8PevbCFhRDMwkIcb96sc3SOziktde0paVwooMSKf4uG/HwIbK1HXFGixJw3XQddusCm+6Z8IrBnziAdR44gHUVFOP/3v+P8wYM4PnQIAllZ6dpzkl6keUEnYaFGcLXSSvfsCQHq2RPHRlgtj9iiREmtl1VaaaVbt8b5pk39569dw/nIlt6lS7Cff47Pma4B01VQXIxj07Vw/DgEMbKLgBBCCCGEEEIIIYQQQgghhBBCGsj/AW6I3epCxYCDAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTI4VDE0OjA0OjI0KzA4OjAwjt9zqwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMi0yOFQxNDowNDoyNCswODowMP+CyxcAAABadEVYdHN2ZzpiYXNlLXVyaQBmaWxlOi8vL2hvbWUvYWRtaW4vaWNvbi1mb250L3RtcC9pY29uX2J2cmMwYzBscmp0YzV3bWkvJUU2JTlBJTgyJUU1JTgxJTlDLnN2ZwIcpRYAAAAASUVORK5CYII="
  44382. /***/ }),
  44383. /***/ "./src/assets/images/time.png":
  44384. /*!************************************!*\
  44385. !*** ./src/assets/images/time.png ***!
  44386. \************************************/
  44387. /*! dynamic exports provided */
  44388. /*! all exports used */
  44389. /***/ (function(module, exports) {
  44390. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAYAAAAHkiXEAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAChZJREFUeNrtm3tMU9cfwL/ftqB0oMHwEF9LXIzDgWSKwW7gSgfNIMrmGmRmGVMZsuyFLCBxWJdNHRAM7iEzk2yJbuJkYTKNimB7LhREYTjHQw3LgDHJkvHaqAqV9n73x/3dMt2P2ELh7tHPP825Ped8v+f7Peee1/cCuHHjxo0bN24kAaVW4F7q59fPr5/v5TVsHjYPm1UqfA1fw9dUKtgLe2FvcDDoQAe6efOgDMqgbNYse0Ed6EA3NARPwVPwVE8PdEEXdF2/TgfoAB2or/fy8fLx8qmvV/WoelQ9w8NSt1NEcgcwYsRIrRZSL72ET+KT+OT69aQnPemVSpc1dDfuxt23b5OBDGQ4cYKsZCVrcbHGQ+Oh8aiulqr90+4AQ4OhwdDw2GOy/bL9sv379sFW2ApbVSp7BjWoQd3fD8VQDMVnz0IqpEJqdTVdpat0taXF+pz1OetznZ0ezR7NHs23b4vFRpePLh9drlQKzxcvxiN4BI+EhlIyJVPyE09gLMZibFwc5VAO5cyZc7e8ujohkZkZjdEYjRcv/mscIL5SRrJHskeyCwuhD/qgLy0NoiEaohHxA/wAP2hooBN0gk4UFPSW9pb2lp48uSFpQ9KGpDt3XKXHmfYz7WfaZ8xQ9ih7lD0JCTRIgzS4fTv4gi/4hoeDHvSg53kwgQlMBw8KpUSHjIxMtZ1cjmHAMGAYePBBlsJSWEpzM2OMMUbEzrKz7OzPPzMVUzGVTie1nsZ3je8a392wQXgV3rhh15MYMbpypSa8JrwmfOFCqfV0mOrC6sLqwuDg/9+g8nKTyWQymXx9pdbzXiq6K7oruufMYZ+zz9nnp079pcMQI0YPPyy1nuNSVVlVWVW5aJFd4bsM//77b9Pb9DbJZFLreT9EPdkitogt+vBDezveYG+wN7q7hfYsWCC1nnbEdyv3NPc093RTk6gw9zr3Ovd6UZHU+k0WsQPd3aG+/VZst9T6/UVBbiO3kdt4+vRU9XhBnp8fy2JZLCs72/77v+eulmcfEcSIUUXF3Y7Yt2+y9U94FWQ0Go1G48qVGI3RGH3pkvC0r0/4DQkRVg9i2nUIk+Yjj2AURmFUa6v4nExkIlNIiGaXZpdmV1ubq+VWhlaGVoYGBHhoPbQe2tZWiId4iPf1pR7qoZ7wcE2yJlmT/P33ztY74R4qLB9zc4EDDji5HMuxHMuzsqbK8FKjbdG2aFt+/RVX4SpclZ0NMpCBTKHA43gcj+fmTrRepx0g9nzYBttgW2yssJFpa2PPsGfYM0ePSm2oqYYlsSSWdPgw3ISbcPP6dciETMiMi6teV72uet2jjzpbn9MOwK24FbempIhp+oa+oW8KC9/Bd/Ad5HmpDTTViO3EARzAgcJC8Tmv4TW8ZssWZ+tz2AH2SbUIiqAoMVE8W/F83PNxz8e/+kpqw0w3o0GjQaNBpaVgAxvYRkaEN0JiIhERETo8tzrsAE2CJkGTEBYGnuAJnn5+EAiBEMhxkf6R/pH+ZrPUBpluYrWx2ljt779jMRZjcU2NMBcGBhojjBHGiNBQR+tx2AH8Sf4kfzIiQkxTCZVQickktSGkhi/mi/nisdNUzMM8zFu92tHyTs4BY1txbMM2bHP9cu+fBvqgD/pcvSqmZadlp2Wnly51tLzDDsDNuBk3BwWJaf4yf5m/3N0ttQGkRpYgS5Al/PSTmKZltIyWzZvnaHmFw5IsYAGLt7c9nQ/5kH/zptQGEEE96lGfkcH0TM/0k9+HKGoVtYra/PyoqKioqKjBwfHy2TpsHbaOoSEEBAQAPI/n8fyfburuJ8fRjBRP8RQ/tsyU75fvl++XyUALWtBOoWUdhQMOuLHl8WSx7LTstOw8dEhIje8APovP4rPkcjnIQQ4ANEADNGCzOSrH8RHwMXwMH5vN8B68B+8B2BQ2hU3huKddBX+OP8efGx6W6+V6ub6paarkYCqmYqrFAnVQB3Xj5/M44HHA48Ds2XwBX8AXAEAFVEDF0BCIQ+I+OO6AC3ABLnR3Cz0NQIYylOHixcKfU2eIe4mpi6mLqevoEBoYHj5dcseDb+Qb+caHHhLtgjmYgzljc8L9cHwVpAMd6K5dE5PC4dfy5VIbQGoEg/9p3b8KVsGq69cdLe+4A8qgDMrqxgZjMARDsBjN8N+FVtAKWqHRiGlUoxrVtbVTJpCL4+K4uB9/FM7DrdaawprCmsKx5el/BfFmjEWySBZps7GX2cvs5fZ2Z+tx+jCOVKQiVUmJeAxty7Bl2DJefFFqg0w3ZCYzmZOTYTfsht0yGRyEg3CwpMTZepy/D9CDHvSffgoGMIBhdBTOwTk4l54uhp9IbZip5tSKUytOrVAqZTqZTqZLTxftYK2yVlmrPvvM2fqcdoBw4dLVBQtgASw4ehRmwAyYMXeuJc2SZknLzJTaQFONz1qftT5rs7PpLXqL3goIgCAIgqDDh4XDOedPBiZ+Z5sGaZCm1wvrXrOZRmiERnbsOG8+bz5vXrZMakO5GuGdHxJCa2gNrdm+HffgHtwzNCS3yC1yy65dE613wg4QRsKNGzAIgzC4YwfEQizEennJveXecu/S0tre2t7aXh8fqQ03WYToh1mzhA5XWgpykIN85kxaSAtp4fbta95c8+aaN3/5RTIFxQsI7gXuBe6FsjJ71MAxdowdq6r624RvOIk93CaRS+QSDQZ71McmbhO36fhxV8mZdNgIIiIi0Z0rd67cuZKcDP3QD/0XL8JcmAtzY2KUOcocZc6ZM/ae9DdHCDCbPdvrO6/vvL6rqKBX6BV6RaPBj/Aj/OjCBXOzudncvHmzq+S5LG5HiBq4dUsRqAhUBMbHiwqLDfBa4rXEa0lDg/GI8YjxSFiYNOYdH/FSXfG14mvF142NEAABEKBWC8HEtbXyDHmGPGPt2nWX111ed3ksKnuyuDxwSjy+NXeZu8xdsbHQAR3Q8eWXwr5h6VJsx3Zsb2wUJrW8PKlGhtjTWT7LZ/kFBXwYH8aHXboESZAESUuWwA/wA/zwxRczt83cNnObVnu/Y+m/PcZyY7mxfMsWLoaL4WL6++1zRSWrZJWDg2wv28v25uZOVRDs3UHDeXnC72+/3R3p1tfHnmXPsmenb2M57R9omB4wPWB6wN/flmpLtaXu3ElKUpIyNVVcRdkzinE3ndAJnRxHq2k1rW5pkfnL/GX+nZ0YgiEYMnYhRK3USq3e3pRLuZS7eDF8Ap/AJ+IhmVotjkB7w8UvZuIpnuIPHbL52fxsfnv2xGyK2RSzqb//X+uAexFD/jxTPFM8U55/npqoiZo2bhQMv3Klfas/UdSgBrXNhutxPa5vahI+BDl2TOGt8FZ4Hz0adSvqVtSt3l6p2i+5A8ZD/I7AGmmNtEZGRAihkMHBlE7plD5/Pr6Kr+KrY/sMKqIiKjKbhXw9PUK+a9eEq8VLl/7x73A3bty4cePGjWv5A++XZiUanSzcAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTI1VDExOjQxOjM0KzA4OjAwAOA6uQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMi0yNVQxMTo0MTozNCswODowMHG9ggUAAABLdEVYdHN2ZzpiYXNlLXVyaQBmaWxlOi8vL2hvbWUvYWRtaW4vaWNvbi1mb250L3RtcC9pY29uX2R5MnlhMjNub3pwOHB2aS90aW1lLnN2Z2uSJuUAAAAASUVORK5CYII="
  44391. /***/ }),
  44392. /***/ "./src/assets/images/usericn_2x.png":
  44393. /*!******************************************!*\
  44394. !*** ./src/assets/images/usericn_2x.png ***!
  44395. \******************************************/
  44396. /*! dynamic exports provided */
  44397. /*! all exports used */
  44398. /***/ (function(module, exports) {
  44399. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAyCAYAAAC+jCIaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDphZGVkNDMwOS1jZjk5LTQxMzctODk0MC05NjYwNjEwZmVlYTIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Qjk4QkZDRkFBMUM0MTFFNjhGQTQ5QkY2MTUwNUU2RDEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Qjk4QkZDRjlBMUM0MTFFNjhGQTQ5QkY2MTUwNUU2RDEiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphZGVkNDMwOS1jZjk5LTQxMzctODk0MC05NjYwNjEwZmVlYTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6YWRlZDQzMDktY2Y5OS00MTM3LTg5NDAtOTY2MDYxMGZlZWEyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+7C5auwAAC/NJREFUeNrsW3twVUcZ/+25yc07DI+ABRpCeAyvoWo74NRiiW0RqKHgOKQ8OrXUqqODTKuZ2ql2plpaSgUKHTUV6h9qkWAFCa3AWBIcrBooBDuE2kITwjClvBsSyOvmrN8+zjl7bvKPc28uc539Zk52z949e779zm+/124Y5xzxdGX2DFVhrJj+LgV4Gd1MYUAR9e6htrNUb6FnD1C9mq5m6kvdOBUMg+vqkSxqnXuXZoXB49WoS/7ovozup1BZRGUPlWc5eAsDO0Cl4o/Df1aQN9agvX9PjMH9Jd7ARqNX51p+IPnxKYBTRCXJj5+legvgHiC+qsGcZoDHPe+q6pdPIx2J9QussplCIGtoeoupjEgRGVNWde4J0GUKXD+i64xoSAGwiqm+hsrFVEZMxsx+oo3A5UpwccVfioAl5UdvIfmxSBg0JvAkuWpxcl9+/w/AcuIbrpbNXEDFcbqW0AeJiA9gioWrryI+mG7gju7bSH2XpIDnBfSu4/R68a6IAIq8EADGA49oo74OlUuorVHwmQr+CBQkP3dJ/6DSUuSuBx6H6qJvqvhLPbAIVKtoyjvpsxQwQ02xuMsEmFipSnexfKq/TtXHB5DfVQSQnfTCAsWDpzu5DygW0hz6G6rf81kK+KNL8+do8HAlJ1He+qi6pFAdU80KkOVTfaD5Sz2wyPxVkPg3hMAmJiyBoz4c9wDFtH5gLAQ00ZvKdQTQigHgtYKAIfmT4OFKI7HiMWB5+QGOiM+s5Y8g+9sr1W9am2kTKdhdJ8YaCP4g5UcaXILGA4yjVyQpr1EPAaMf0aByPYbNTyEmNlD8pR5YwqeiGW2Bsd656Qlo34WFBKHXmzSLqt0DFxVbrpTNKE4in8U0+hYBDAlw8c5oJrK/9wTy11fBGT4i5DdlLVuBrEUVKKj6LbJX/hAsKxr2K2ks7fgnjT9I+Tks8EKZ4ZmSmIfcDeSOAXJGgQ+9R4ueafAxwwyIMZLO383SWPwFEnY+Mz6OAgr3zR0MbRUCl2cKNfC0ViMVwl5MSnShzNsLNGi+708RqHJ/+hLFWCPQtqICbnNTEPHpb9S9649Aby+i8x9AzrNrgcyMAHw0FvVLCn9KGxF/cs6mCXYN35xo9HLDtf+G8ZvhqAdmXMmPpy+w2JXZM8YQ/03MMIGFr72OSOn4UEf31Em0PrY8pMkKq2sQ0dqi9+oVtC6a6/8oojEqSilCbEmEwWvzZtEyd5tIWTmePs0iTeUMHoKO55+hn1wjWuRyrRTuOSijyci4CQTAtXCGFqF79w50/GK9CQh6EKUUFSbEH2pLiD+HkO06SoSuXq880Fw51OULtdoE6iVa/xXg+qlwvzCJiZXintMtaamxaEoP6tKYUt+lwnlvyCcQ2qy1ohw9Rw7h+oYX0fq1ecaKY+bYiRKN4figcsaUIPrF2eh4eQ04aaSw0+74Dr24d5tO4fozlUBPD6L3L4RTMjboy6WvliT+uOOvy4xC0jeTgWFzyFFfAUwk8E97RYHqkx3Ax1uVfCaTFh37fWDkYmBoGXjuBIpx802Aka+WFP5uCmWo5F04nXBNaCYS/qDNv5OrXoCpfe1qHzPc00kjRyNj4iS0/7gyzhHl8nmmxk7I5HCZnA3clcy55eh6awd4W1sov+WXTjiD4n50Ct17diG64OuI0rOdVZuCeXCeMH/EV1nIGf38GwSsif2o3veAD54m1d5NMfdtpO4/qy5zKV7/kDTZHANcLHH+bpbGoilMM51vPxdE143Xqnzbn0ORlk4r+ILILV9IH+1N8M4OP0oMfAU53rTEXRg2zfQ1Mm+fidi/3umTNOUFBcgjs1dYUxuKEEWf7rq3/Wfj8l4J80dInhZy2I9R5Nd2Qv0mTN3JZ4F3F6irt1OZysPl4A3LgOaNQPtJ1bftfeDoMg/x3ujT0lVjieU9jIccxyDB2PPPg4g1vifr0S/NRqS4JABfJBOZ981Dx47tffLJzAcgL0qcRXeY+QLnlpFwz7b0yVflPv4UMmbcSTo4A7yrU8La6+M2faAmS89yHZToZZQE/viwkL7vPg80kAVrrQfyyE8d810S5Kd9Y+0b5DqNWkrabYLq21BB/S7rSNHXukXpDCzTkYpzIhk6fK3lIGvJQ/5qEkCL/ecE+PlzfaK4wB1liX82znRUzoxsv28mfcBl3D7DfyZW/46fGPUWgSx7YqGsfPIobp8v1k5AeRi4uJcERdiYtFrL1fH7sknPqd8u7lN9Y9cMR56Ho8W0dN45vyS1VD8JT/E31nAEPQ2H5V02aSjnllESXFnli9D1xh/iPrShuZRpvZiEdMMlM0flnvsYzriJXtrAB1xs31tSU/XU/RUdr/w8yLpTv8iYserZC5/4z+nxLiYB+ZeCRWnkr9wu4MQPVNph8Cz4SVPPOgydre4bn6C+3Qp0nAdmUKYr2MW0BZbYQ5N7apz3Aw5V79j8K1WJRJDz4HI4ZBJZfh4B7khob87PfQUgPZ4EHhtNhRA7ekhGeP5msv6x45cbcO2Be3FjLfk07ddCijc6+171bMO7Qb5LUeL8MafR0+h9DICI9ER76zFy2KcDxd+k61uq3npUSpkXTNKayfV3Ogw/9Xj6aiygNrRN423dGInR2PuN6P7HQeUAzytHzsOPouvPO0KC4P4WBjP9rbok8Fhr3nTv3S2BEiHTZ/pZfi5LmxxvG8cpLUV0/kKZ7+rZtzt4RpnXJPDn1gb6mhuJUVpwgz6nnXiK9u7YCYynqHD8U6p+XTntqo8Tl3H163VpCyy6qpk6+qLB1DdVJ+47fvOqFJoTjSJ6x0z07N+LkKej0GiaUpENq04Cj2IM14sAe5ub0LWnBrk/WY2Mu+42zVqfs1ZsbCnyfraeVkMmuv6ySz7r7XtS4VKZBP5YdeAMmYuLRFt4m2oWuSq3BzizWV1ujNr0dqDs4yVVWbBxrRLM1WkLrCF19adpGtu5t4rBQuaNa+j0nvoQXXX7ZVtnzZ/gdnaGzCX0dorhaWwXYyeBx9M02HYzEdr56kb0njiO3KefQ97z65B55yw4wyg4y4yAZWchMnEysr+zCgWbtsAZOgyxfx9B1683hQIAqm+XYyeDP5prOCbW4Cicrpou/w04fD9wipz4k6vBD89XbYLyp/uJ9sCkSh8rWfzdFJKbulfLZhYLNxJyv5D12WDwvK/IrSUo3PJ7fLpsEXDpUiiA9pOU6r6d7qcOOXDoTKIM6oN+xdLXgtovVDY5AzmPrUTmVxea4XmcY+2S6XwTnVUvg3d3m9Gg5I/KMwkf9KstNfgTR1/0to4TJZNHAcVHL4FdfhvBviALNFTRHGBcJVBPQOPdWppyLhRWupK/tD9BSuAS2wdb5dES45hxCDxBzl3liQwQGmAUIy4lbbUtGQx6J0ihtoe2Ms2U2iCneKJkLDLnLkAmmWfnMyPBYzG458+h99gRAlUN3NPN4SPNyokUx4Ulf0kCluBI8ifzI0yfxTJPLgRhanjPMN7p4K7YPiD+XCW/NAVWhlcZTEC4UjZjBAljvT4V2n8evF8nM5QJq0wWqOJoGwFD7HivJ6DIvUPOyFFqOS1NY2eVkYlnYfAbvheneiW1Dwh/9FYlP3kmS2fQ+zisxnGaEMg8jx+VHujTmUKzGlJ3aCPNbREJvy10djw4axWXTIWxFcTbqVzO1EG6gSLiD2SH0eanR8xj0v0sA+NMP5kXiLMrKeCPtfkg8pLOfp4rLgMftKWCv5uUeVfgqtF7fEJDuOZ2j7mX6J0sFX1kX7CpTJiCgacaCP4YrWquo0WEz4d52kqDytUaYCpSyR/YNvnu0GlSU+zcA16q+UutKYyjM+IfI+gjPcn0vy8JZ5fuh+uvd0E4q/QB66hdRC9N8eAbYBJBwRLCz5MQ/HGUEW9TiZfhGlwXiLdGgladjv6aUixXxR+IP+4uJYbEv88J4AzXErqg/3miju5vBn+pc94tWRpQU2jJkgWWJQssSxZYlixZYFmywLJkgWXJkgWWJQssSxZYlixZYFmywLJkgWXJkgWWJQssSxZYlixZYFmywLJkgWXJkgWWJQssSxZYlixZYFmywLJkgWXJ0v9C/xVgAOJxA9sU/5U5AAAAAElFTkSuQmCC"
  44400. /***/ }),
  44401. /***/ "./src/index.css":
  44402. /*!***********************!*\
  44403. !*** ./src/index.css ***!
  44404. \***********************/
  44405. /*! dynamic exports provided */
  44406. /***/ (function(module, exports, __webpack_require__) {
  44407. // style-loader: Adds some css to the DOM by adding a <style> tag
  44408. // load the styles
  44409. var content = __webpack_require__(/*! !../node_modules/css-loader??ref--1-oneOf-2-1!../node_modules/postcss-loader/lib??postcss!./index.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css");
  44410. if(typeof content === 'string') content = [[module.i, content, '']];
  44411. // Prepare cssTransformation
  44412. var transform;
  44413. var options = {"hmr":true}
  44414. options.transform = transform
  44415. // add the styles to the DOM
  44416. var update = __webpack_require__(/*! ../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
  44417. if(content.locals) module.exports = content.locals;
  44418. // Hot Module Replacement
  44419. if(true) {
  44420. // When the styles change, update the <style> tags
  44421. if(!content.locals) {
  44422. module.hot.accept(/*! !../node_modules/css-loader??ref--1-oneOf-2-1!../node_modules/postcss-loader/lib??postcss!./index.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css", function() {
  44423. var newContent = __webpack_require__(/*! !../node_modules/css-loader??ref--1-oneOf-2-1!../node_modules/postcss-loader/lib??postcss!./index.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css");
  44424. if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
  44425. update(newContent);
  44426. });
  44427. }
  44428. // When the module is disposed, remove the <style> tags
  44429. module.hot.dispose(function() { update(); });
  44430. }
  44431. /***/ }),
  44432. /***/ "./src/index.js":
  44433. /*!**********************!*\
  44434. !*** ./src/index.js ***!
  44435. \**********************/
  44436. /*! no exports provided */
  44437. /*! all exports used */
  44438. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  44439. "use strict";
  44440. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  44441. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  44442. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  44443. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
  44444. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);
  44445. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
  44446. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__redux_store__ = __webpack_require__(/*! ./redux/store */ "./src/redux/store.js");
  44447. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__router_index__ = __webpack_require__(/*! ./router/index */ "./src/router/index.js");
  44448. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_css__ = __webpack_require__(/*! ./index.css */ "./src/index.css");
  44449. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_css__);
  44450. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__assets_css_common_css__ = __webpack_require__(/*! ./assets/css/common.css */ "./src/assets/css/common.css");
  44451. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__assets_css_common_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__assets_css_common_css__);
  44452. var _jsxFileName = 'D:\\react\\nbjk-h5\\src\\index.js';
  44453. /* css */
  44454. __WEBPACK_IMPORTED_MODULE_3__redux_store__["a" /* default */].subscribe(function () {
  44455. console.log(__WEBPACK_IMPORTED_MODULE_3__redux_store__["a" /* default */].getState());
  44456. });
  44457. __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
  44458. __WEBPACK_IMPORTED_MODULE_2_react_redux__["a" /* Provider */],
  44459. { store: __WEBPACK_IMPORTED_MODULE_3__redux_store__["a" /* default */], __source: {
  44460. fileName: _jsxFileName,
  44461. lineNumber: 18
  44462. },
  44463. __self: this
  44464. },
  44465. __WEBPACK_IMPORTED_MODULE_4__router_index__["a" /* default */]
  44466. ), document.getElementById('root'));
  44467. /***/ }),
  44468. /***/ "./src/redux/actionTypes.js":
  44469. /*!**********************************!*\
  44470. !*** ./src/redux/actionTypes.js ***!
  44471. \**********************************/
  44472. /*! exports provided: IS_SHOW_COVER_PAGE, IS_SHOW_MENU, IS_PLAY */
  44473. /*! exports used: IS_PLAY, IS_SHOW_COVER_PAGE, IS_SHOW_MENU */
  44474. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  44475. "use strict";
  44476. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return IS_SHOW_COVER_PAGE; });
  44477. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return IS_SHOW_MENU; });
  44478. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IS_PLAY; });
  44479. /*
  44480. *
  44481. * actionTypes by wuwc on 2017-12-21
  44482. *
  44483. * */
  44484. var IS_SHOW_COVER_PAGE = "IS_SHOW_COVER_PAGE";
  44485. var IS_SHOW_MENU = "IS_SHOW_MENU";
  44486. var IS_PLAY = "IS_PLAY";
  44487. /***/ }),
  44488. /***/ "./src/redux/reducers.js":
  44489. /*!*******************************!*\
  44490. !*** ./src/redux/reducers.js ***!
  44491. \*******************************/
  44492. /*! exports provided: default */
  44493. /*! exports used: default */
  44494. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  44495. "use strict";
  44496. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(/*! ./actionTypes */ "./src/redux/actionTypes.js");
  44497. /*
  44498. *
  44499. * reducers by wuwc on 2017-12-21
  44500. *
  44501. * */
  44502. var initialState = {
  44503. isShowCoverPage: false,
  44504. isShowMenu: false,
  44505. isPlay: true
  44506. };
  44507. /* a状态的reducer, 通过此reducer改变a的状态 */
  44508. var a = function a() {
  44509. var isShowCoverPage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState.isShowCoverPage;
  44510. var action = arguments[1];
  44511. switch (action.type) {
  44512. case __WEBPACK_IMPORTED_MODULE_0__actionTypes__["b" /* IS_SHOW_COVER_PAGE */]:
  44513. return action.isShowCoverPage;
  44514. default:
  44515. return isShowCoverPage;
  44516. }
  44517. };
  44518. /* b状态的reducer, 通过此reducer改变b的状态 */
  44519. var b = function b() {
  44520. var isShowMenu = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState.isShowMenu;
  44521. var action = arguments[1];
  44522. switch (action.type) {
  44523. case __WEBPACK_IMPORTED_MODULE_0__actionTypes__["c" /* IS_SHOW_MENU */]:
  44524. return action.isShowMenu;
  44525. default:
  44526. return isShowMenu;
  44527. }
  44528. };
  44529. var isPlay = function isPlay() {
  44530. var isPlay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState.isPlay;
  44531. var action = arguments[1];
  44532. switch (action.type) {
  44533. case __WEBPACK_IMPORTED_MODULE_0__actionTypes__["a" /* IS_PLAY */]:
  44534. return action.isPlay;
  44535. default:
  44536. return isPlay;
  44537. }
  44538. };
  44539. /* harmony default export */ __webpack_exports__["a"] = ({ a: a, b: b, isPlay: isPlay });
  44540. /***/ }),
  44541. /***/ "./src/redux/store.js":
  44542. /*!****************************!*\
  44543. !*** ./src/redux/store.js ***!
  44544. \****************************/
  44545. /*! exports provided: default */
  44546. /*! exports used: default */
  44547. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  44548. "use strict";
  44549. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js");
  44550. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(/*! redux-thunk */ "./node_modules/redux-thunk/es/index.js");
  44551. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers__ = __webpack_require__(/*! ./reducers */ "./src/redux/reducers.js");
  44552. /*
  44553. *
  44554. * store by wuwc on 2017-12-21
  44555. *
  44556. * */
  44557. var store = Object(__WEBPACK_IMPORTED_MODULE_0_redux__["d" /* createStore */])(Object(__WEBPACK_IMPORTED_MODULE_0_redux__["c" /* combineReducers */])(__WEBPACK_IMPORTED_MODULE_2__reducers__["a" /* default */]), Object(__WEBPACK_IMPORTED_MODULE_0_redux__["a" /* applyMiddleware */])(__WEBPACK_IMPORTED_MODULE_1_redux_thunk__["a" /* default */]));
  44558. /* harmony default export */ __webpack_exports__["a"] = (store);
  44559. /***/ }),
  44560. /***/ "./src/router/index.js":
  44561. /*!*****************************!*\
  44562. !*** ./src/router/index.js ***!
  44563. \*****************************/
  44564. /*! exports provided: default */
  44565. /*! exports used: default */
  44566. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  44567. "use strict";
  44568. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  44569. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  44570. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router_dom__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
  44571. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__ = __webpack_require__(/*! ../utils/asyncComponent */ "./src/utils/asyncComponent.js");
  44572. var _jsxFileName = 'D:\\react\\nbjk-h5\\src\\router\\index.js',
  44573. _this = this;
  44574. /*
  44575. *
  44576. * router by wuwc 2017-12-20
  44577. *
  44578. * */
  44579. var routes = [{
  44580. path: '/',
  44581. exact: true,
  44582. component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
  44583. return __webpack_require__.e/* import() */(0/* duplicate */).then(__webpack_require__.bind(null, /*! ../views/videoKindList/videoKindList */ "./src/views/videoKindList/videoKindList.js"));
  44584. })
  44585. }, {
  44586. path: '/videoKindList',
  44587. exact: true,
  44588. component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
  44589. return __webpack_require__.e/* import() */(0/* duplicate */).then(__webpack_require__.bind(null, /*! ../views/videoKindList/videoKindList */ "./src/views/videoKindList/videoKindList.js"));
  44590. })
  44591. }, {
  44592. path: '/videoList',
  44593. exact: true,
  44594. component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
  44595. return __webpack_require__.e/* import() */(1).then(__webpack_require__.bind(null, /*! ../views/videoList/videoList */ "./src/views/videoList/videoList.js"));
  44596. })
  44597. }, {
  44598. path: '/login',
  44599. exact: true,
  44600. component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
  44601. return __webpack_require__.e/* import() */(2).then(__webpack_require__.bind(null, /*! ../views/login/login */ "./src/views/login/login.js"));
  44602. })
  44603. // {
  44604. // path: '/play/:songId',
  44605. // exact: false,
  44606. // component: asyncComponent(() => import('../containers/Play'))
  44607. // }
  44608. }];
  44609. /* 本地环境使用BrowserRouter, 线上环境使用HashRouter */
  44610. var Router = true ? __WEBPACK_IMPORTED_MODULE_1_react_router_dom__["a" /* BrowserRouter */] : HashRouter;
  44611. var RouterConfig = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
  44612. Router,
  44613. {
  44614. __source: {
  44615. fileName: _jsxFileName,
  44616. lineNumber: 43
  44617. },
  44618. __self: this
  44619. },
  44620. __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
  44621. __WEBPACK_IMPORTED_MODULE_1_react_router_dom__["d" /* Switch */],
  44622. {
  44623. __source: {
  44624. fileName: _jsxFileName,
  44625. lineNumber: 44
  44626. },
  44627. __self: this
  44628. },
  44629. routes.map(function (route, index) {
  44630. return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__["c" /* Route */], {
  44631. key: index,
  44632. path: route.path,
  44633. exact: route.exact,
  44634. component: route.component,
  44635. __source: {
  44636. fileName: _jsxFileName,
  44637. lineNumber: 47
  44638. },
  44639. __self: _this
  44640. });
  44641. }),
  44642. __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__["b" /* Redirect */], { from: '', to: '/', __source: {
  44643. fileName: _jsxFileName,
  44644. lineNumber: 55
  44645. },
  44646. __self: this
  44647. })
  44648. )
  44649. );
  44650. /* harmony default export */ __webpack_exports__["a"] = (RouterConfig);
  44651. /***/ }),
  44652. /***/ "./src/utils/asyncComponent.js":
  44653. /*!*************************************!*\
  44654. !*** ./src/utils/asyncComponent.js ***!
  44655. \*************************************/
  44656. /*! exports provided: asyncComponent */
  44657. /*! exports used: asyncComponent */
  44658. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  44659. "use strict";
  44660. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return asyncComponent; });
  44661. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  44662. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
  44663. var _jsxFileName = 'D:\\react\\nbjk-h5\\src\\utils\\asyncComponent.js';
  44664. 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; }; }();
  44665. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  44666. 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; }
  44667. 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; }
  44668. /**
  44669. * Created by Administrator on 2017/11/13.
  44670. */
  44671. var asyncComponent = function asyncComponent(loadComponent) {
  44672. return function (_React$Component) {
  44673. _inherits(AsyncComponent, _React$Component);
  44674. function AsyncComponent() {
  44675. var _ref;
  44676. var _temp, _this, _ret;
  44677. _classCallCheck(this, AsyncComponent);
  44678. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  44679. args[_key] = arguments[_key];
  44680. }
  44681. return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AsyncComponent.__proto__ || Object.getPrototypeOf(AsyncComponent)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
  44682. Component: null
  44683. }, _temp), _possibleConstructorReturn(_this, _ret);
  44684. }
  44685. _createClass(AsyncComponent, [{
  44686. key: 'componentWillMount',
  44687. value: function componentWillMount() {
  44688. var _this2 = this;
  44689. if (this.hasLoadedComponent()) {
  44690. return;
  44691. }
  44692. loadComponent().then(function (module) {
  44693. return module.default;
  44694. }).then(function (Component) {
  44695. _this2.setState({ Component: Component });
  44696. }).catch(function (err) {
  44697. console.error('Cannot load component in <AsyncComponent />');
  44698. throw err;
  44699. });
  44700. }
  44701. }, {
  44702. key: 'hasLoadedComponent',
  44703. value: function hasLoadedComponent() {
  44704. return this.state.Component !== null;
  44705. }
  44706. }, {
  44707. key: 'render',
  44708. value: function render() {
  44709. var Component = this.state.Component;
  44710. return Component ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, Object.assign({}, this.props, {
  44711. __source: {
  44712. fileName: _jsxFileName,
  44713. lineNumber: 34
  44714. },
  44715. __self: this
  44716. })) : null;
  44717. }
  44718. }]);
  44719. return AsyncComponent;
  44720. }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
  44721. };
  44722. /***/ }),
  44723. /***/ 0:
  44724. /*!********************************************************************************************************!*\
  44725. !*** multi ./config/polyfills.js ./node_modules/react-dev-utils/webpackHotDevClient.js ./src/index.js ***!
  44726. \********************************************************************************************************/
  44727. /*! dynamic exports provided */
  44728. /*! all exports used */
  44729. /***/ (function(module, exports, __webpack_require__) {
  44730. __webpack_require__(/*! D:\react\nbjk-h5\config\polyfills.js */"./config/polyfills.js");
  44731. __webpack_require__(/*! D:\react\nbjk-h5\node_modules\react-dev-utils\webpackHotDevClient.js */"./node_modules/react-dev-utils/webpackHotDevClient.js");
  44732. module.exports = __webpack_require__(/*! D:\react\nbjk-h5\src\index.js */"./src/index.js");
  44733. /***/ })
  44734. /******/ });
  44735. //# sourceMappingURL=bundle.js.map