ReactNativeRenderer-profiling.js 272 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @noflow
  8. * @nolint
  9. * @providesModule ReactNativeRenderer-profiling
  10. * @preventMunge
  11. * @generated
  12. */
  13. "use strict";
  14. require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore");
  15. var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"),
  16. React = require("react"),
  17. Scheduler = require("scheduler"),
  18. tracing = require("scheduler/tracing");
  19. function getParent(inst) {
  20. do inst = inst.return;
  21. while (inst && 5 !== inst.tag);
  22. return inst ? inst : null;
  23. }
  24. function traverseTwoPhase(inst, fn, arg) {
  25. for (var path = []; inst; ) path.push(inst), (inst = getParent(inst));
  26. for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg);
  27. for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg);
  28. }
  29. function invokeGuardedCallbackImpl(name, func, context, a, b, c, d, e, f) {
  30. var funcArgs = Array.prototype.slice.call(arguments, 3);
  31. try {
  32. func.apply(context, funcArgs);
  33. } catch (error) {
  34. this.onError(error);
  35. }
  36. }
  37. var hasError = !1,
  38. caughtError = null,
  39. hasRethrowError = !1,
  40. rethrowError = null,
  41. reporter = {
  42. onError: function(error) {
  43. hasError = !0;
  44. caughtError = error;
  45. }
  46. };
  47. function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
  48. hasError = !1;
  49. caughtError = null;
  50. invokeGuardedCallbackImpl.apply(reporter, arguments);
  51. }
  52. function invokeGuardedCallbackAndCatchFirstError(
  53. name,
  54. func,
  55. context,
  56. a,
  57. b,
  58. c,
  59. d,
  60. e,
  61. f
  62. ) {
  63. invokeGuardedCallback.apply(this, arguments);
  64. if (hasError) {
  65. if (hasError) {
  66. var error = caughtError;
  67. hasError = !1;
  68. caughtError = null;
  69. } else
  70. throw Error(
  71. "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue."
  72. );
  73. hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
  74. }
  75. }
  76. var getFiberCurrentPropsFromNode = null,
  77. getInstanceFromNode = null,
  78. getNodeFromInstance = null;
  79. function executeDispatch(event, listener, inst) {
  80. var type = event.type || "unknown-event";
  81. event.currentTarget = getNodeFromInstance(inst);
  82. invokeGuardedCallbackAndCatchFirstError(type, listener, void 0, event);
  83. event.currentTarget = null;
  84. }
  85. function executeDirectDispatch(event) {
  86. var dispatchListener = event._dispatchListeners,
  87. dispatchInstance = event._dispatchInstances;
  88. if (Array.isArray(dispatchListener))
  89. throw Error("executeDirectDispatch(...): Invalid `event`.");
  90. event.currentTarget = dispatchListener
  91. ? getNodeFromInstance(dispatchInstance)
  92. : null;
  93. dispatchListener = dispatchListener ? dispatchListener(event) : null;
  94. event.currentTarget = null;
  95. event._dispatchListeners = null;
  96. event._dispatchInstances = null;
  97. return dispatchListener;
  98. }
  99. function getListener(inst, registrationName) {
  100. var listener = inst.stateNode;
  101. if (!listener) return null;
  102. var props = getFiberCurrentPropsFromNode(listener);
  103. if (!props) return null;
  104. listener = props[registrationName];
  105. a: switch (registrationName) {
  106. case "onClick":
  107. case "onClickCapture":
  108. case "onDoubleClick":
  109. case "onDoubleClickCapture":
  110. case "onMouseDown":
  111. case "onMouseDownCapture":
  112. case "onMouseMove":
  113. case "onMouseMoveCapture":
  114. case "onMouseUp":
  115. case "onMouseUpCapture":
  116. case "onMouseEnter":
  117. (props = !props.disabled) ||
  118. ((inst = inst.type),
  119. (props = !(
  120. "button" === inst ||
  121. "input" === inst ||
  122. "select" === inst ||
  123. "textarea" === inst
  124. )));
  125. inst = !props;
  126. break a;
  127. default:
  128. inst = !1;
  129. }
  130. if (inst) return null;
  131. if (listener && "function" !== typeof listener)
  132. throw Error(
  133. "Expected `" +
  134. registrationName +
  135. "` listener to be a function, instead got a value of `" +
  136. typeof listener +
  137. "` type."
  138. );
  139. return listener;
  140. }
  141. function accumulateInto(current, next) {
  142. if (null == next)
  143. throw Error(
  144. "accumulateInto(...): Accumulated items must not be null or undefined."
  145. );
  146. if (null == current) return next;
  147. if (Array.isArray(current)) {
  148. if (Array.isArray(next)) return current.push.apply(current, next), current;
  149. current.push(next);
  150. return current;
  151. }
  152. return Array.isArray(next) ? [current].concat(next) : [current, next];
  153. }
  154. function forEachAccumulated(arr, cb, scope) {
  155. Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
  156. }
  157. function accumulateDirectionalDispatches(inst, phase, event) {
  158. if (
  159. (phase = getListener(
  160. inst,
  161. event.dispatchConfig.phasedRegistrationNames[phase]
  162. ))
  163. )
  164. (event._dispatchListeners = accumulateInto(
  165. event._dispatchListeners,
  166. phase
  167. )),
  168. (event._dispatchInstances = accumulateInto(
  169. event._dispatchInstances,
  170. inst
  171. ));
  172. }
  173. function accumulateTwoPhaseDispatchesSingle(event) {
  174. event &&
  175. event.dispatchConfig.phasedRegistrationNames &&
  176. traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
  177. }
  178. function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
  179. if (event && event.dispatchConfig.phasedRegistrationNames) {
  180. var targetInst = event._targetInst;
  181. targetInst = targetInst ? getParent(targetInst) : null;
  182. traverseTwoPhase(targetInst, accumulateDirectionalDispatches, event);
  183. }
  184. }
  185. function accumulateDirectDispatchesSingle(event) {
  186. if (event && event.dispatchConfig.registrationName) {
  187. var inst = event._targetInst;
  188. if (inst && event && event.dispatchConfig.registrationName) {
  189. var listener = getListener(inst, event.dispatchConfig.registrationName);
  190. listener &&
  191. ((event._dispatchListeners = accumulateInto(
  192. event._dispatchListeners,
  193. listener
  194. )),
  195. (event._dispatchInstances = accumulateInto(
  196. event._dispatchInstances,
  197. inst
  198. )));
  199. }
  200. }
  201. }
  202. function functionThatReturnsTrue() {
  203. return !0;
  204. }
  205. function functionThatReturnsFalse() {
  206. return !1;
  207. }
  208. function SyntheticEvent(
  209. dispatchConfig,
  210. targetInst,
  211. nativeEvent,
  212. nativeEventTarget
  213. ) {
  214. this.dispatchConfig = dispatchConfig;
  215. this._targetInst = targetInst;
  216. this.nativeEvent = nativeEvent;
  217. dispatchConfig = this.constructor.Interface;
  218. for (var propName in dispatchConfig)
  219. dispatchConfig.hasOwnProperty(propName) &&
  220. ((targetInst = dispatchConfig[propName])
  221. ? (this[propName] = targetInst(nativeEvent))
  222. : "target" === propName
  223. ? (this.target = nativeEventTarget)
  224. : (this[propName] = nativeEvent[propName]));
  225. this.isDefaultPrevented = (null != nativeEvent.defaultPrevented
  226. ? nativeEvent.defaultPrevented
  227. : !1 === nativeEvent.returnValue)
  228. ? functionThatReturnsTrue
  229. : functionThatReturnsFalse;
  230. this.isPropagationStopped = functionThatReturnsFalse;
  231. return this;
  232. }
  233. Object.assign(SyntheticEvent.prototype, {
  234. preventDefault: function() {
  235. this.defaultPrevented = !0;
  236. var event = this.nativeEvent;
  237. event &&
  238. (event.preventDefault
  239. ? event.preventDefault()
  240. : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
  241. (this.isDefaultPrevented = functionThatReturnsTrue));
  242. },
  243. stopPropagation: function() {
  244. var event = this.nativeEvent;
  245. event &&
  246. (event.stopPropagation
  247. ? event.stopPropagation()
  248. : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = !0),
  249. (this.isPropagationStopped = functionThatReturnsTrue));
  250. },
  251. persist: function() {
  252. this.isPersistent = functionThatReturnsTrue;
  253. },
  254. isPersistent: functionThatReturnsFalse,
  255. destructor: function() {
  256. var Interface = this.constructor.Interface,
  257. propName;
  258. for (propName in Interface) this[propName] = null;
  259. this.nativeEvent = this._targetInst = this.dispatchConfig = null;
  260. this.isPropagationStopped = this.isDefaultPrevented = functionThatReturnsFalse;
  261. this._dispatchInstances = this._dispatchListeners = null;
  262. }
  263. });
  264. SyntheticEvent.Interface = {
  265. type: null,
  266. target: null,
  267. currentTarget: function() {
  268. return null;
  269. },
  270. eventPhase: null,
  271. bubbles: null,
  272. cancelable: null,
  273. timeStamp: function(event) {
  274. return event.timeStamp || Date.now();
  275. },
  276. defaultPrevented: null,
  277. isTrusted: null
  278. };
  279. SyntheticEvent.extend = function(Interface) {
  280. function E() {}
  281. function Class() {
  282. return Super.apply(this, arguments);
  283. }
  284. var Super = this;
  285. E.prototype = Super.prototype;
  286. var prototype = new E();
  287. Object.assign(prototype, Class.prototype);
  288. Class.prototype = prototype;
  289. Class.prototype.constructor = Class;
  290. Class.Interface = Object.assign({}, Super.Interface, Interface);
  291. Class.extend = Super.extend;
  292. addEventPoolingTo(Class);
  293. return Class;
  294. };
  295. addEventPoolingTo(SyntheticEvent);
  296. function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
  297. if (this.eventPool.length) {
  298. var instance = this.eventPool.pop();
  299. this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
  300. return instance;
  301. }
  302. return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);
  303. }
  304. function releasePooledEvent(event) {
  305. if (!(event instanceof this))
  306. throw Error(
  307. "Trying to release an event instance into a pool of a different type."
  308. );
  309. event.destructor();
  310. 10 > this.eventPool.length && this.eventPool.push(event);
  311. }
  312. function addEventPoolingTo(EventConstructor) {
  313. EventConstructor.eventPool = [];
  314. EventConstructor.getPooled = getPooledEvent;
  315. EventConstructor.release = releasePooledEvent;
  316. }
  317. var ResponderSyntheticEvent = SyntheticEvent.extend({
  318. touchHistory: function() {
  319. return null;
  320. }
  321. });
  322. function isStartish(topLevelType) {
  323. return "topTouchStart" === topLevelType;
  324. }
  325. function isMoveish(topLevelType) {
  326. return "topTouchMove" === topLevelType;
  327. }
  328. var startDependencies = ["topTouchStart"],
  329. moveDependencies = ["topTouchMove"],
  330. endDependencies = ["topTouchCancel", "topTouchEnd"],
  331. touchBank = [],
  332. touchHistory = {
  333. touchBank: touchBank,
  334. numberActiveTouches: 0,
  335. indexOfSingleActiveTouch: -1,
  336. mostRecentTimeStamp: 0
  337. };
  338. function timestampForTouch(touch) {
  339. return touch.timeStamp || touch.timestamp;
  340. }
  341. function getTouchIdentifier(_ref) {
  342. _ref = _ref.identifier;
  343. if (null == _ref) throw Error("Touch object is missing identifier.");
  344. return _ref;
  345. }
  346. function recordTouchStart(touch) {
  347. var identifier = getTouchIdentifier(touch),
  348. touchRecord = touchBank[identifier];
  349. touchRecord
  350. ? ((touchRecord.touchActive = !0),
  351. (touchRecord.startPageX = touch.pageX),
  352. (touchRecord.startPageY = touch.pageY),
  353. (touchRecord.startTimeStamp = timestampForTouch(touch)),
  354. (touchRecord.currentPageX = touch.pageX),
  355. (touchRecord.currentPageY = touch.pageY),
  356. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  357. (touchRecord.previousPageX = touch.pageX),
  358. (touchRecord.previousPageY = touch.pageY),
  359. (touchRecord.previousTimeStamp = timestampForTouch(touch)))
  360. : ((touchRecord = {
  361. touchActive: !0,
  362. startPageX: touch.pageX,
  363. startPageY: touch.pageY,
  364. startTimeStamp: timestampForTouch(touch),
  365. currentPageX: touch.pageX,
  366. currentPageY: touch.pageY,
  367. currentTimeStamp: timestampForTouch(touch),
  368. previousPageX: touch.pageX,
  369. previousPageY: touch.pageY,
  370. previousTimeStamp: timestampForTouch(touch)
  371. }),
  372. (touchBank[identifier] = touchRecord));
  373. touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
  374. }
  375. function recordTouchMove(touch) {
  376. var touchRecord = touchBank[getTouchIdentifier(touch)];
  377. touchRecord &&
  378. ((touchRecord.touchActive = !0),
  379. (touchRecord.previousPageX = touchRecord.currentPageX),
  380. (touchRecord.previousPageY = touchRecord.currentPageY),
  381. (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
  382. (touchRecord.currentPageX = touch.pageX),
  383. (touchRecord.currentPageY = touch.pageY),
  384. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  385. (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));
  386. }
  387. function recordTouchEnd(touch) {
  388. var touchRecord = touchBank[getTouchIdentifier(touch)];
  389. touchRecord &&
  390. ((touchRecord.touchActive = !1),
  391. (touchRecord.previousPageX = touchRecord.currentPageX),
  392. (touchRecord.previousPageY = touchRecord.currentPageY),
  393. (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
  394. (touchRecord.currentPageX = touch.pageX),
  395. (touchRecord.currentPageY = touch.pageY),
  396. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  397. (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));
  398. }
  399. var ResponderTouchHistoryStore = {
  400. recordTouchTrack: function(topLevelType, nativeEvent) {
  401. if (isMoveish(topLevelType))
  402. nativeEvent.changedTouches.forEach(recordTouchMove);
  403. else if (isStartish(topLevelType))
  404. nativeEvent.changedTouches.forEach(recordTouchStart),
  405. (touchHistory.numberActiveTouches = nativeEvent.touches.length),
  406. 1 === touchHistory.numberActiveTouches &&
  407. (touchHistory.indexOfSingleActiveTouch =
  408. nativeEvent.touches[0].identifier);
  409. else if (
  410. "topTouchEnd" === topLevelType ||
  411. "topTouchCancel" === topLevelType
  412. )
  413. if (
  414. (nativeEvent.changedTouches.forEach(recordTouchEnd),
  415. (touchHistory.numberActiveTouches = nativeEvent.touches.length),
  416. 1 === touchHistory.numberActiveTouches)
  417. )
  418. for (topLevelType = 0; topLevelType < touchBank.length; topLevelType++)
  419. if (
  420. ((nativeEvent = touchBank[topLevelType]),
  421. null != nativeEvent && nativeEvent.touchActive)
  422. ) {
  423. touchHistory.indexOfSingleActiveTouch = topLevelType;
  424. break;
  425. }
  426. },
  427. touchHistory: touchHistory
  428. };
  429. function accumulate(current, next) {
  430. if (null == next)
  431. throw Error(
  432. "accumulate(...): Accumulated items must not be null or undefined."
  433. );
  434. return null == current
  435. ? next
  436. : Array.isArray(current)
  437. ? current.concat(next)
  438. : Array.isArray(next)
  439. ? [current].concat(next)
  440. : [current, next];
  441. }
  442. var responderInst = null,
  443. trackedTouchCount = 0;
  444. function changeResponder(nextResponderInst, blockHostResponder) {
  445. var oldResponderInst = responderInst;
  446. responderInst = nextResponderInst;
  447. if (null !== ResponderEventPlugin.GlobalResponderHandler)
  448. ResponderEventPlugin.GlobalResponderHandler.onChange(
  449. oldResponderInst,
  450. nextResponderInst,
  451. blockHostResponder
  452. );
  453. }
  454. var eventTypes = {
  455. startShouldSetResponder: {
  456. phasedRegistrationNames: {
  457. bubbled: "onStartShouldSetResponder",
  458. captured: "onStartShouldSetResponderCapture"
  459. },
  460. dependencies: startDependencies
  461. },
  462. scrollShouldSetResponder: {
  463. phasedRegistrationNames: {
  464. bubbled: "onScrollShouldSetResponder",
  465. captured: "onScrollShouldSetResponderCapture"
  466. },
  467. dependencies: ["topScroll"]
  468. },
  469. selectionChangeShouldSetResponder: {
  470. phasedRegistrationNames: {
  471. bubbled: "onSelectionChangeShouldSetResponder",
  472. captured: "onSelectionChangeShouldSetResponderCapture"
  473. },
  474. dependencies: ["topSelectionChange"]
  475. },
  476. moveShouldSetResponder: {
  477. phasedRegistrationNames: {
  478. bubbled: "onMoveShouldSetResponder",
  479. captured: "onMoveShouldSetResponderCapture"
  480. },
  481. dependencies: moveDependencies
  482. },
  483. responderStart: {
  484. registrationName: "onResponderStart",
  485. dependencies: startDependencies
  486. },
  487. responderMove: {
  488. registrationName: "onResponderMove",
  489. dependencies: moveDependencies
  490. },
  491. responderEnd: {
  492. registrationName: "onResponderEnd",
  493. dependencies: endDependencies
  494. },
  495. responderRelease: {
  496. registrationName: "onResponderRelease",
  497. dependencies: endDependencies
  498. },
  499. responderTerminationRequest: {
  500. registrationName: "onResponderTerminationRequest",
  501. dependencies: []
  502. },
  503. responderGrant: { registrationName: "onResponderGrant", dependencies: [] },
  504. responderReject: {
  505. registrationName: "onResponderReject",
  506. dependencies: []
  507. },
  508. responderTerminate: {
  509. registrationName: "onResponderTerminate",
  510. dependencies: []
  511. }
  512. },
  513. ResponderEventPlugin = {
  514. _getResponder: function() {
  515. return responderInst;
  516. },
  517. eventTypes: eventTypes,
  518. extractEvents: function(
  519. topLevelType,
  520. targetInst,
  521. nativeEvent,
  522. nativeEventTarget
  523. ) {
  524. if (isStartish(topLevelType)) trackedTouchCount += 1;
  525. else if (
  526. "topTouchEnd" === topLevelType ||
  527. "topTouchCancel" === topLevelType
  528. )
  529. if (0 <= trackedTouchCount) --trackedTouchCount;
  530. else return null;
  531. ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
  532. if (
  533. targetInst &&
  534. (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) ||
  535. (0 < trackedTouchCount && "topSelectionChange" === topLevelType) ||
  536. isStartish(topLevelType) ||
  537. isMoveish(topLevelType))
  538. ) {
  539. var shouldSetEventType = isStartish(topLevelType)
  540. ? eventTypes.startShouldSetResponder
  541. : isMoveish(topLevelType)
  542. ? eventTypes.moveShouldSetResponder
  543. : "topSelectionChange" === topLevelType
  544. ? eventTypes.selectionChangeShouldSetResponder
  545. : eventTypes.scrollShouldSetResponder;
  546. if (responderInst)
  547. b: {
  548. var JSCompiler_temp = responderInst;
  549. for (
  550. var depthA = 0, tempA = JSCompiler_temp;
  551. tempA;
  552. tempA = getParent(tempA)
  553. )
  554. depthA++;
  555. tempA = 0;
  556. for (var tempB = targetInst; tempB; tempB = getParent(tempB))
  557. tempA++;
  558. for (; 0 < depthA - tempA; )
  559. (JSCompiler_temp = getParent(JSCompiler_temp)), depthA--;
  560. for (; 0 < tempA - depthA; )
  561. (targetInst = getParent(targetInst)), tempA--;
  562. for (; depthA--; ) {
  563. if (
  564. JSCompiler_temp === targetInst ||
  565. JSCompiler_temp === targetInst.alternate
  566. )
  567. break b;
  568. JSCompiler_temp = getParent(JSCompiler_temp);
  569. targetInst = getParent(targetInst);
  570. }
  571. JSCompiler_temp = null;
  572. }
  573. else JSCompiler_temp = targetInst;
  574. targetInst = JSCompiler_temp === responderInst;
  575. JSCompiler_temp = ResponderSyntheticEvent.getPooled(
  576. shouldSetEventType,
  577. JSCompiler_temp,
  578. nativeEvent,
  579. nativeEventTarget
  580. );
  581. JSCompiler_temp.touchHistory = ResponderTouchHistoryStore.touchHistory;
  582. targetInst
  583. ? forEachAccumulated(
  584. JSCompiler_temp,
  585. accumulateTwoPhaseDispatchesSingleSkipTarget
  586. )
  587. : forEachAccumulated(
  588. JSCompiler_temp,
  589. accumulateTwoPhaseDispatchesSingle
  590. );
  591. b: {
  592. shouldSetEventType = JSCompiler_temp._dispatchListeners;
  593. targetInst = JSCompiler_temp._dispatchInstances;
  594. if (Array.isArray(shouldSetEventType))
  595. for (
  596. depthA = 0;
  597. depthA < shouldSetEventType.length &&
  598. !JSCompiler_temp.isPropagationStopped();
  599. depthA++
  600. ) {
  601. if (
  602. shouldSetEventType[depthA](JSCompiler_temp, targetInst[depthA])
  603. ) {
  604. shouldSetEventType = targetInst[depthA];
  605. break b;
  606. }
  607. }
  608. else if (
  609. shouldSetEventType &&
  610. shouldSetEventType(JSCompiler_temp, targetInst)
  611. ) {
  612. shouldSetEventType = targetInst;
  613. break b;
  614. }
  615. shouldSetEventType = null;
  616. }
  617. JSCompiler_temp._dispatchInstances = null;
  618. JSCompiler_temp._dispatchListeners = null;
  619. JSCompiler_temp.isPersistent() ||
  620. JSCompiler_temp.constructor.release(JSCompiler_temp);
  621. if (shouldSetEventType && shouldSetEventType !== responderInst)
  622. if (
  623. ((JSCompiler_temp = ResponderSyntheticEvent.getPooled(
  624. eventTypes.responderGrant,
  625. shouldSetEventType,
  626. nativeEvent,
  627. nativeEventTarget
  628. )),
  629. (JSCompiler_temp.touchHistory =
  630. ResponderTouchHistoryStore.touchHistory),
  631. forEachAccumulated(
  632. JSCompiler_temp,
  633. accumulateDirectDispatchesSingle
  634. ),
  635. (targetInst = !0 === executeDirectDispatch(JSCompiler_temp)),
  636. responderInst)
  637. )
  638. if (
  639. ((depthA = ResponderSyntheticEvent.getPooled(
  640. eventTypes.responderTerminationRequest,
  641. responderInst,
  642. nativeEvent,
  643. nativeEventTarget
  644. )),
  645. (depthA.touchHistory = ResponderTouchHistoryStore.touchHistory),
  646. forEachAccumulated(depthA, accumulateDirectDispatchesSingle),
  647. (tempA =
  648. !depthA._dispatchListeners || executeDirectDispatch(depthA)),
  649. depthA.isPersistent() || depthA.constructor.release(depthA),
  650. tempA)
  651. ) {
  652. depthA = ResponderSyntheticEvent.getPooled(
  653. eventTypes.responderTerminate,
  654. responderInst,
  655. nativeEvent,
  656. nativeEventTarget
  657. );
  658. depthA.touchHistory = ResponderTouchHistoryStore.touchHistory;
  659. forEachAccumulated(depthA, accumulateDirectDispatchesSingle);
  660. var JSCompiler_temp$jscomp$0 = accumulate(
  661. JSCompiler_temp$jscomp$0,
  662. [JSCompiler_temp, depthA]
  663. );
  664. changeResponder(shouldSetEventType, targetInst);
  665. } else
  666. (shouldSetEventType = ResponderSyntheticEvent.getPooled(
  667. eventTypes.responderReject,
  668. shouldSetEventType,
  669. nativeEvent,
  670. nativeEventTarget
  671. )),
  672. (shouldSetEventType.touchHistory =
  673. ResponderTouchHistoryStore.touchHistory),
  674. forEachAccumulated(
  675. shouldSetEventType,
  676. accumulateDirectDispatchesSingle
  677. ),
  678. (JSCompiler_temp$jscomp$0 = accumulate(
  679. JSCompiler_temp$jscomp$0,
  680. shouldSetEventType
  681. ));
  682. else
  683. (JSCompiler_temp$jscomp$0 = accumulate(
  684. JSCompiler_temp$jscomp$0,
  685. JSCompiler_temp
  686. )),
  687. changeResponder(shouldSetEventType, targetInst);
  688. else JSCompiler_temp$jscomp$0 = null;
  689. } else JSCompiler_temp$jscomp$0 = null;
  690. shouldSetEventType = responderInst && isStartish(topLevelType);
  691. JSCompiler_temp = responderInst && isMoveish(topLevelType);
  692. targetInst =
  693. responderInst &&
  694. ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType);
  695. if (
  696. (shouldSetEventType = shouldSetEventType
  697. ? eventTypes.responderStart
  698. : JSCompiler_temp
  699. ? eventTypes.responderMove
  700. : targetInst
  701. ? eventTypes.responderEnd
  702. : null)
  703. )
  704. (shouldSetEventType = ResponderSyntheticEvent.getPooled(
  705. shouldSetEventType,
  706. responderInst,
  707. nativeEvent,
  708. nativeEventTarget
  709. )),
  710. (shouldSetEventType.touchHistory =
  711. ResponderTouchHistoryStore.touchHistory),
  712. forEachAccumulated(
  713. shouldSetEventType,
  714. accumulateDirectDispatchesSingle
  715. ),
  716. (JSCompiler_temp$jscomp$0 = accumulate(
  717. JSCompiler_temp$jscomp$0,
  718. shouldSetEventType
  719. ));
  720. shouldSetEventType = responderInst && "topTouchCancel" === topLevelType;
  721. if (
  722. (topLevelType =
  723. responderInst &&
  724. !shouldSetEventType &&
  725. ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType))
  726. )
  727. a: {
  728. if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length)
  729. for (
  730. JSCompiler_temp = 0;
  731. JSCompiler_temp < topLevelType.length;
  732. JSCompiler_temp++
  733. )
  734. if (
  735. ((targetInst = topLevelType[JSCompiler_temp].target),
  736. null !== targetInst &&
  737. void 0 !== targetInst &&
  738. 0 !== targetInst)
  739. ) {
  740. depthA = getInstanceFromNode(targetInst);
  741. b: {
  742. for (targetInst = responderInst; depthA; ) {
  743. if (
  744. targetInst === depthA ||
  745. targetInst === depthA.alternate
  746. ) {
  747. targetInst = !0;
  748. break b;
  749. }
  750. depthA = getParent(depthA);
  751. }
  752. targetInst = !1;
  753. }
  754. if (targetInst) {
  755. topLevelType = !1;
  756. break a;
  757. }
  758. }
  759. topLevelType = !0;
  760. }
  761. if (
  762. (topLevelType = shouldSetEventType
  763. ? eventTypes.responderTerminate
  764. : topLevelType
  765. ? eventTypes.responderRelease
  766. : null)
  767. )
  768. (nativeEvent = ResponderSyntheticEvent.getPooled(
  769. topLevelType,
  770. responderInst,
  771. nativeEvent,
  772. nativeEventTarget
  773. )),
  774. (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory),
  775. forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle),
  776. (JSCompiler_temp$jscomp$0 = accumulate(
  777. JSCompiler_temp$jscomp$0,
  778. nativeEvent
  779. )),
  780. changeResponder(null);
  781. return JSCompiler_temp$jscomp$0;
  782. },
  783. GlobalResponderHandler: null,
  784. injection: {
  785. injectGlobalResponderHandler: function(GlobalResponderHandler) {
  786. ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
  787. }
  788. }
  789. },
  790. eventPluginOrder = null,
  791. namesToPlugins = {};
  792. function recomputePluginOrdering() {
  793. if (eventPluginOrder)
  794. for (var pluginName in namesToPlugins) {
  795. var pluginModule = namesToPlugins[pluginName],
  796. pluginIndex = eventPluginOrder.indexOf(pluginName);
  797. if (!(-1 < pluginIndex))
  798. throw Error(
  799. "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" +
  800. pluginName +
  801. "`."
  802. );
  803. if (!plugins[pluginIndex]) {
  804. if (!pluginModule.extractEvents)
  805. throw Error(
  806. "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" +
  807. pluginName +
  808. "` does not."
  809. );
  810. plugins[pluginIndex] = pluginModule;
  811. pluginIndex = pluginModule.eventTypes;
  812. for (var eventName in pluginIndex) {
  813. var JSCompiler_inline_result = void 0;
  814. var dispatchConfig = pluginIndex[eventName],
  815. pluginModule$jscomp$0 = pluginModule,
  816. eventName$jscomp$0 = eventName;
  817. if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0))
  818. throw Error(
  819. "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" +
  820. eventName$jscomp$0 +
  821. "`."
  822. );
  823. eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
  824. var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  825. if (phasedRegistrationNames) {
  826. for (JSCompiler_inline_result in phasedRegistrationNames)
  827. phasedRegistrationNames.hasOwnProperty(
  828. JSCompiler_inline_result
  829. ) &&
  830. publishRegistrationName(
  831. phasedRegistrationNames[JSCompiler_inline_result],
  832. pluginModule$jscomp$0,
  833. eventName$jscomp$0
  834. );
  835. JSCompiler_inline_result = !0;
  836. } else
  837. dispatchConfig.registrationName
  838. ? (publishRegistrationName(
  839. dispatchConfig.registrationName,
  840. pluginModule$jscomp$0,
  841. eventName$jscomp$0
  842. ),
  843. (JSCompiler_inline_result = !0))
  844. : (JSCompiler_inline_result = !1);
  845. if (!JSCompiler_inline_result)
  846. throw Error(
  847. "EventPluginRegistry: Failed to publish event `" +
  848. eventName +
  849. "` for plugin `" +
  850. pluginName +
  851. "`."
  852. );
  853. }
  854. }
  855. }
  856. }
  857. function publishRegistrationName(registrationName, pluginModule) {
  858. if (registrationNameModules[registrationName])
  859. throw Error(
  860. "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" +
  861. registrationName +
  862. "`."
  863. );
  864. registrationNameModules[registrationName] = pluginModule;
  865. }
  866. var plugins = [],
  867. eventNameDispatchConfigs = {},
  868. registrationNameModules = {},
  869. customBubblingEventTypes =
  870. ReactNativePrivateInterface.ReactNativeViewConfigRegistry
  871. .customBubblingEventTypes,
  872. customDirectEventTypes =
  873. ReactNativePrivateInterface.ReactNativeViewConfigRegistry
  874. .customDirectEventTypes;
  875. if (eventPluginOrder)
  876. throw Error(
  877. "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."
  878. );
  879. eventPluginOrder = Array.prototype.slice.call([
  880. "ResponderEventPlugin",
  881. "ReactNativeBridgeEventPlugin"
  882. ]);
  883. recomputePluginOrdering();
  884. var injectedNamesToPlugins$jscomp$inline_94 = {
  885. ResponderEventPlugin: ResponderEventPlugin,
  886. ReactNativeBridgeEventPlugin: {
  887. eventTypes: {},
  888. extractEvents: function(
  889. topLevelType,
  890. targetInst,
  891. nativeEvent,
  892. nativeEventTarget
  893. ) {
  894. if (null == targetInst) return null;
  895. var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],
  896. directDispatchConfig = customDirectEventTypes[topLevelType];
  897. if (!bubbleDispatchConfig && !directDispatchConfig)
  898. throw Error(
  899. 'Unsupported top level event type "' + topLevelType + '" dispatched'
  900. );
  901. topLevelType = SyntheticEvent.getPooled(
  902. bubbleDispatchConfig || directDispatchConfig,
  903. targetInst,
  904. nativeEvent,
  905. nativeEventTarget
  906. );
  907. if (bubbleDispatchConfig)
  908. forEachAccumulated(topLevelType, accumulateTwoPhaseDispatchesSingle);
  909. else if (directDispatchConfig)
  910. forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);
  911. else return null;
  912. return topLevelType;
  913. }
  914. }
  915. },
  916. isOrderingDirty$jscomp$inline_95 = !1,
  917. pluginName$jscomp$inline_96;
  918. for (pluginName$jscomp$inline_96 in injectedNamesToPlugins$jscomp$inline_94)
  919. if (
  920. injectedNamesToPlugins$jscomp$inline_94.hasOwnProperty(
  921. pluginName$jscomp$inline_96
  922. )
  923. ) {
  924. var pluginModule$jscomp$inline_97 =
  925. injectedNamesToPlugins$jscomp$inline_94[pluginName$jscomp$inline_96];
  926. if (
  927. !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_96) ||
  928. namesToPlugins[pluginName$jscomp$inline_96] !==
  929. pluginModule$jscomp$inline_97
  930. ) {
  931. if (namesToPlugins[pluginName$jscomp$inline_96])
  932. throw Error(
  933. "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
  934. pluginName$jscomp$inline_96 +
  935. "`."
  936. );
  937. namesToPlugins[
  938. pluginName$jscomp$inline_96
  939. ] = pluginModule$jscomp$inline_97;
  940. isOrderingDirty$jscomp$inline_95 = !0;
  941. }
  942. }
  943. isOrderingDirty$jscomp$inline_95 && recomputePluginOrdering();
  944. var instanceCache = new Map(),
  945. instanceProps = new Map();
  946. function getInstanceFromTag(tag) {
  947. return instanceCache.get(tag) || null;
  948. }
  949. function batchedUpdatesImpl(fn, bookkeeping) {
  950. return fn(bookkeeping);
  951. }
  952. var isInsideEventHandler = !1;
  953. function batchedUpdates(fn, bookkeeping) {
  954. if (isInsideEventHandler) return fn(bookkeeping);
  955. isInsideEventHandler = !0;
  956. try {
  957. return batchedUpdatesImpl(fn, bookkeeping);
  958. } finally {
  959. isInsideEventHandler = !1;
  960. }
  961. }
  962. var eventQueue = null;
  963. function executeDispatchesAndReleaseTopLevel(e) {
  964. if (e) {
  965. var dispatchListeners = e._dispatchListeners,
  966. dispatchInstances = e._dispatchInstances;
  967. if (Array.isArray(dispatchListeners))
  968. for (
  969. var i = 0;
  970. i < dispatchListeners.length && !e.isPropagationStopped();
  971. i++
  972. )
  973. executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);
  974. else
  975. dispatchListeners &&
  976. executeDispatch(e, dispatchListeners, dispatchInstances);
  977. e._dispatchListeners = null;
  978. e._dispatchInstances = null;
  979. e.isPersistent() || e.constructor.release(e);
  980. }
  981. }
  982. var EMPTY_NATIVE_EVENT = {};
  983. function _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam) {
  984. var nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT,
  985. inst = getInstanceFromTag(rootNodeID),
  986. target = null;
  987. null != inst && (target = inst.stateNode);
  988. batchedUpdates(function() {
  989. var events = target;
  990. for (var events$jscomp$0 = null, i = 0; i < plugins.length; i++) {
  991. var possiblePlugin = plugins[i];
  992. possiblePlugin &&
  993. (possiblePlugin = possiblePlugin.extractEvents(
  994. topLevelType,
  995. inst,
  996. nativeEvent,
  997. events,
  998. 1
  999. )) &&
  1000. (events$jscomp$0 = accumulateInto(events$jscomp$0, possiblePlugin));
  1001. }
  1002. events = events$jscomp$0;
  1003. null !== events && (eventQueue = accumulateInto(eventQueue, events));
  1004. events = eventQueue;
  1005. eventQueue = null;
  1006. if (events) {
  1007. forEachAccumulated(events, executeDispatchesAndReleaseTopLevel);
  1008. if (eventQueue)
  1009. throw Error(
  1010. "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."
  1011. );
  1012. if (hasRethrowError)
  1013. throw ((events = rethrowError),
  1014. (hasRethrowError = !1),
  1015. (rethrowError = null),
  1016. events);
  1017. }
  1018. });
  1019. }
  1020. ReactNativePrivateInterface.RCTEventEmitter.register({
  1021. receiveEvent: function(rootNodeID, topLevelType, nativeEventParam) {
  1022. _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam);
  1023. },
  1024. receiveTouches: function(eventTopLevelType, touches, changedIndices) {
  1025. if (
  1026. "topTouchEnd" === eventTopLevelType ||
  1027. "topTouchCancel" === eventTopLevelType
  1028. ) {
  1029. var JSCompiler_temp = [];
  1030. for (var i = 0; i < changedIndices.length; i++) {
  1031. var index = changedIndices[i];
  1032. JSCompiler_temp.push(touches[index]);
  1033. touches[index] = null;
  1034. }
  1035. for (i = changedIndices = 0; i < touches.length; i++)
  1036. (index = touches[i]),
  1037. null !== index && (touches[changedIndices++] = index);
  1038. touches.length = changedIndices;
  1039. } else
  1040. for (JSCompiler_temp = [], i = 0; i < changedIndices.length; i++)
  1041. JSCompiler_temp.push(touches[changedIndices[i]]);
  1042. for (
  1043. changedIndices = 0;
  1044. changedIndices < JSCompiler_temp.length;
  1045. changedIndices++
  1046. ) {
  1047. i = JSCompiler_temp[changedIndices];
  1048. i.changedTouches = JSCompiler_temp;
  1049. i.touches = touches;
  1050. index = null;
  1051. var target = i.target;
  1052. null === target || void 0 === target || 1 > target || (index = target);
  1053. _receiveRootNodeIDEvent(index, eventTopLevelType, i);
  1054. }
  1055. }
  1056. });
  1057. getFiberCurrentPropsFromNode = function(stateNode) {
  1058. return instanceProps.get(stateNode._nativeTag) || null;
  1059. };
  1060. getInstanceFromNode = getInstanceFromTag;
  1061. getNodeFromInstance = function(inst) {
  1062. inst = inst.stateNode;
  1063. var tag = inst._nativeTag;
  1064. void 0 === tag && ((inst = inst.canonical), (tag = inst._nativeTag));
  1065. if (!tag) throw Error("All native instances should have a tag.");
  1066. return inst;
  1067. };
  1068. ResponderEventPlugin.injection.injectGlobalResponderHandler({
  1069. onChange: function(from, to, blockNativeResponder) {
  1070. null !== to
  1071. ? ReactNativePrivateInterface.UIManager.setJSResponder(
  1072. to.stateNode._nativeTag,
  1073. blockNativeResponder
  1074. )
  1075. : ReactNativePrivateInterface.UIManager.clearJSResponder();
  1076. }
  1077. });
  1078. var ReactSharedInternals =
  1079. React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
  1080. ReactSharedInternals.hasOwnProperty("ReactCurrentDispatcher") ||
  1081. (ReactSharedInternals.ReactCurrentDispatcher = { current: null });
  1082. ReactSharedInternals.hasOwnProperty("ReactCurrentBatchConfig") ||
  1083. (ReactSharedInternals.ReactCurrentBatchConfig = { suspense: null });
  1084. var hasSymbol = "function" === typeof Symbol && Symbol.for,
  1085. REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103,
  1086. REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106,
  1087. REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107,
  1088. REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108,
  1089. REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114,
  1090. REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109,
  1091. REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110,
  1092. REACT_CONCURRENT_MODE_TYPE = hasSymbol
  1093. ? Symbol.for("react.concurrent_mode")
  1094. : 60111,
  1095. REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112,
  1096. REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113,
  1097. REACT_SUSPENSE_LIST_TYPE = hasSymbol
  1098. ? Symbol.for("react.suspense_list")
  1099. : 60120,
  1100. REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115,
  1101. REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116,
  1102. REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121,
  1103. MAYBE_ITERATOR_SYMBOL = "function" === typeof Symbol && Symbol.iterator;
  1104. function getIteratorFn(maybeIterable) {
  1105. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  1106. maybeIterable =
  1107. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  1108. maybeIterable["@@iterator"];
  1109. return "function" === typeof maybeIterable ? maybeIterable : null;
  1110. }
  1111. function initializeLazyComponentType(lazyComponent) {
  1112. if (-1 === lazyComponent._status) {
  1113. var ctor = lazyComponent._result;
  1114. ctor || (ctor = lazyComponent._ctor);
  1115. ctor = ctor();
  1116. lazyComponent._status = 0;
  1117. lazyComponent._result = ctor;
  1118. ctor.then(
  1119. function(moduleObject) {
  1120. 0 === lazyComponent._status &&
  1121. ((moduleObject = moduleObject.default),
  1122. (lazyComponent._status = 1),
  1123. (lazyComponent._result = moduleObject));
  1124. },
  1125. function(error) {
  1126. 0 === lazyComponent._status &&
  1127. ((lazyComponent._status = 2), (lazyComponent._result = error));
  1128. }
  1129. );
  1130. }
  1131. }
  1132. function getComponentName(type) {
  1133. if (null == type) return null;
  1134. if ("function" === typeof type) return type.displayName || type.name || null;
  1135. if ("string" === typeof type) return type;
  1136. switch (type) {
  1137. case REACT_FRAGMENT_TYPE:
  1138. return "Fragment";
  1139. case REACT_PORTAL_TYPE:
  1140. return "Portal";
  1141. case REACT_PROFILER_TYPE:
  1142. return "Profiler";
  1143. case REACT_STRICT_MODE_TYPE:
  1144. return "StrictMode";
  1145. case REACT_SUSPENSE_TYPE:
  1146. return "Suspense";
  1147. case REACT_SUSPENSE_LIST_TYPE:
  1148. return "SuspenseList";
  1149. }
  1150. if ("object" === typeof type)
  1151. switch (type.$$typeof) {
  1152. case REACT_CONTEXT_TYPE:
  1153. return (type.displayName || "Context") + ".Consumer";
  1154. case REACT_PROVIDER_TYPE:
  1155. return (type._context.displayName || "Context") + ".Provider";
  1156. case REACT_FORWARD_REF_TYPE:
  1157. var innerType = type.render;
  1158. innerType = innerType.displayName || innerType.name || "";
  1159. return (
  1160. type.displayName ||
  1161. ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef")
  1162. );
  1163. case REACT_MEMO_TYPE:
  1164. return getComponentName(type.type);
  1165. case REACT_BLOCK_TYPE:
  1166. return getComponentName(type.render);
  1167. case REACT_LAZY_TYPE:
  1168. if ((type = 1 === type._status ? type._result : null))
  1169. return getComponentName(type);
  1170. }
  1171. return null;
  1172. }
  1173. function getNearestMountedFiber(fiber) {
  1174. var node = fiber,
  1175. nearestMounted = fiber;
  1176. if (fiber.alternate) for (; node.return; ) node = node.return;
  1177. else {
  1178. fiber = node;
  1179. do
  1180. (node = fiber),
  1181. 0 !== (node.effectTag & 1026) && (nearestMounted = node.return),
  1182. (fiber = node.return);
  1183. while (fiber);
  1184. }
  1185. return 3 === node.tag ? nearestMounted : null;
  1186. }
  1187. function assertIsMounted(fiber) {
  1188. if (getNearestMountedFiber(fiber) !== fiber)
  1189. throw Error("Unable to find node on an unmounted component.");
  1190. }
  1191. function findCurrentFiberUsingSlowPath(fiber) {
  1192. var alternate = fiber.alternate;
  1193. if (!alternate) {
  1194. alternate = getNearestMountedFiber(fiber);
  1195. if (null === alternate)
  1196. throw Error("Unable to find node on an unmounted component.");
  1197. return alternate !== fiber ? null : fiber;
  1198. }
  1199. for (var a = fiber, b = alternate; ; ) {
  1200. var parentA = a.return;
  1201. if (null === parentA) break;
  1202. var parentB = parentA.alternate;
  1203. if (null === parentB) {
  1204. b = parentA.return;
  1205. if (null !== b) {
  1206. a = b;
  1207. continue;
  1208. }
  1209. break;
  1210. }
  1211. if (parentA.child === parentB.child) {
  1212. for (parentB = parentA.child; parentB; ) {
  1213. if (parentB === a) return assertIsMounted(parentA), fiber;
  1214. if (parentB === b) return assertIsMounted(parentA), alternate;
  1215. parentB = parentB.sibling;
  1216. }
  1217. throw Error("Unable to find node on an unmounted component.");
  1218. }
  1219. if (a.return !== b.return) (a = parentA), (b = parentB);
  1220. else {
  1221. for (var didFindChild = !1, _child = parentA.child; _child; ) {
  1222. if (_child === a) {
  1223. didFindChild = !0;
  1224. a = parentA;
  1225. b = parentB;
  1226. break;
  1227. }
  1228. if (_child === b) {
  1229. didFindChild = !0;
  1230. b = parentA;
  1231. a = parentB;
  1232. break;
  1233. }
  1234. _child = _child.sibling;
  1235. }
  1236. if (!didFindChild) {
  1237. for (_child = parentB.child; _child; ) {
  1238. if (_child === a) {
  1239. didFindChild = !0;
  1240. a = parentB;
  1241. b = parentA;
  1242. break;
  1243. }
  1244. if (_child === b) {
  1245. didFindChild = !0;
  1246. b = parentB;
  1247. a = parentA;
  1248. break;
  1249. }
  1250. _child = _child.sibling;
  1251. }
  1252. if (!didFindChild)
  1253. throw Error(
  1254. "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
  1255. );
  1256. }
  1257. }
  1258. if (a.alternate !== b)
  1259. throw Error(
  1260. "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
  1261. );
  1262. }
  1263. if (3 !== a.tag)
  1264. throw Error("Unable to find node on an unmounted component.");
  1265. return a.stateNode.current === a ? fiber : alternate;
  1266. }
  1267. function findCurrentHostFiber(parent) {
  1268. parent = findCurrentFiberUsingSlowPath(parent);
  1269. if (!parent) return null;
  1270. for (var node = parent; ; ) {
  1271. if (5 === node.tag || 6 === node.tag) return node;
  1272. if (node.child) (node.child.return = node), (node = node.child);
  1273. else {
  1274. if (node === parent) break;
  1275. for (; !node.sibling; ) {
  1276. if (!node.return || node.return === parent) return null;
  1277. node = node.return;
  1278. }
  1279. node.sibling.return = node.return;
  1280. node = node.sibling;
  1281. }
  1282. }
  1283. return null;
  1284. }
  1285. var emptyObject = {},
  1286. removedKeys = null,
  1287. removedKeyCount = 0,
  1288. deepDifferOptions = { unsafelyIgnoreFunctions: !0 };
  1289. function defaultDiffer(prevProp, nextProp) {
  1290. return "object" !== typeof nextProp || null === nextProp
  1291. ? !0
  1292. : ReactNativePrivateInterface.deepDiffer(
  1293. prevProp,
  1294. nextProp,
  1295. deepDifferOptions
  1296. );
  1297. }
  1298. function restoreDeletedValuesInNestedArray(
  1299. updatePayload,
  1300. node,
  1301. validAttributes
  1302. ) {
  1303. if (Array.isArray(node))
  1304. for (var i = node.length; i-- && 0 < removedKeyCount; )
  1305. restoreDeletedValuesInNestedArray(
  1306. updatePayload,
  1307. node[i],
  1308. validAttributes
  1309. );
  1310. else if (node && 0 < removedKeyCount)
  1311. for (i in removedKeys)
  1312. if (removedKeys[i]) {
  1313. var nextProp = node[i];
  1314. if (void 0 !== nextProp) {
  1315. var attributeConfig = validAttributes[i];
  1316. if (attributeConfig) {
  1317. "function" === typeof nextProp && (nextProp = !0);
  1318. "undefined" === typeof nextProp && (nextProp = null);
  1319. if ("object" !== typeof attributeConfig)
  1320. updatePayload[i] = nextProp;
  1321. else if (
  1322. "function" === typeof attributeConfig.diff ||
  1323. "function" === typeof attributeConfig.process
  1324. )
  1325. (nextProp =
  1326. "function" === typeof attributeConfig.process
  1327. ? attributeConfig.process(nextProp)
  1328. : nextProp),
  1329. (updatePayload[i] = nextProp);
  1330. removedKeys[i] = !1;
  1331. removedKeyCount--;
  1332. }
  1333. }
  1334. }
  1335. }
  1336. function diffNestedProperty(
  1337. updatePayload,
  1338. prevProp,
  1339. nextProp,
  1340. validAttributes
  1341. ) {
  1342. if (!updatePayload && prevProp === nextProp) return updatePayload;
  1343. if (!prevProp || !nextProp)
  1344. return nextProp
  1345. ? addNestedProperty(updatePayload, nextProp, validAttributes)
  1346. : prevProp
  1347. ? clearNestedProperty(updatePayload, prevProp, validAttributes)
  1348. : updatePayload;
  1349. if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
  1350. return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
  1351. if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
  1352. var minLength =
  1353. prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
  1354. i;
  1355. for (i = 0; i < minLength; i++)
  1356. updatePayload = diffNestedProperty(
  1357. updatePayload,
  1358. prevProp[i],
  1359. nextProp[i],
  1360. validAttributes
  1361. );
  1362. for (; i < prevProp.length; i++)
  1363. updatePayload = clearNestedProperty(
  1364. updatePayload,
  1365. prevProp[i],
  1366. validAttributes
  1367. );
  1368. for (; i < nextProp.length; i++)
  1369. updatePayload = addNestedProperty(
  1370. updatePayload,
  1371. nextProp[i],
  1372. validAttributes
  1373. );
  1374. return updatePayload;
  1375. }
  1376. return Array.isArray(prevProp)
  1377. ? diffProperties(
  1378. updatePayload,
  1379. ReactNativePrivateInterface.flattenStyle(prevProp),
  1380. nextProp,
  1381. validAttributes
  1382. )
  1383. : diffProperties(
  1384. updatePayload,
  1385. prevProp,
  1386. ReactNativePrivateInterface.flattenStyle(nextProp),
  1387. validAttributes
  1388. );
  1389. }
  1390. function addNestedProperty(updatePayload, nextProp, validAttributes) {
  1391. if (!nextProp) return updatePayload;
  1392. if (!Array.isArray(nextProp))
  1393. return diffProperties(
  1394. updatePayload,
  1395. emptyObject,
  1396. nextProp,
  1397. validAttributes
  1398. );
  1399. for (var i = 0; i < nextProp.length; i++)
  1400. updatePayload = addNestedProperty(
  1401. updatePayload,
  1402. nextProp[i],
  1403. validAttributes
  1404. );
  1405. return updatePayload;
  1406. }
  1407. function clearNestedProperty(updatePayload, prevProp, validAttributes) {
  1408. if (!prevProp) return updatePayload;
  1409. if (!Array.isArray(prevProp))
  1410. return diffProperties(
  1411. updatePayload,
  1412. prevProp,
  1413. emptyObject,
  1414. validAttributes
  1415. );
  1416. for (var i = 0; i < prevProp.length; i++)
  1417. updatePayload = clearNestedProperty(
  1418. updatePayload,
  1419. prevProp[i],
  1420. validAttributes
  1421. );
  1422. return updatePayload;
  1423. }
  1424. function diffProperties(updatePayload, prevProps, nextProps, validAttributes) {
  1425. var attributeConfig, propKey;
  1426. for (propKey in nextProps)
  1427. if ((attributeConfig = validAttributes[propKey])) {
  1428. var prevProp = prevProps[propKey];
  1429. var nextProp = nextProps[propKey];
  1430. "function" === typeof nextProp &&
  1431. ((nextProp = !0), "function" === typeof prevProp && (prevProp = !0));
  1432. "undefined" === typeof nextProp &&
  1433. ((nextProp = null),
  1434. "undefined" === typeof prevProp && (prevProp = null));
  1435. removedKeys && (removedKeys[propKey] = !1);
  1436. if (updatePayload && void 0 !== updatePayload[propKey])
  1437. if ("object" !== typeof attributeConfig)
  1438. updatePayload[propKey] = nextProp;
  1439. else {
  1440. if (
  1441. "function" === typeof attributeConfig.diff ||
  1442. "function" === typeof attributeConfig.process
  1443. )
  1444. (attributeConfig =
  1445. "function" === typeof attributeConfig.process
  1446. ? attributeConfig.process(nextProp)
  1447. : nextProp),
  1448. (updatePayload[propKey] = attributeConfig);
  1449. }
  1450. else if (prevProp !== nextProp)
  1451. if ("object" !== typeof attributeConfig)
  1452. defaultDiffer(prevProp, nextProp) &&
  1453. ((updatePayload || (updatePayload = {}))[propKey] = nextProp);
  1454. else if (
  1455. "function" === typeof attributeConfig.diff ||
  1456. "function" === typeof attributeConfig.process
  1457. ) {
  1458. if (
  1459. void 0 === prevProp ||
  1460. ("function" === typeof attributeConfig.diff
  1461. ? attributeConfig.diff(prevProp, nextProp)
  1462. : defaultDiffer(prevProp, nextProp))
  1463. )
  1464. (attributeConfig =
  1465. "function" === typeof attributeConfig.process
  1466. ? attributeConfig.process(nextProp)
  1467. : nextProp),
  1468. ((updatePayload || (updatePayload = {}))[
  1469. propKey
  1470. ] = attributeConfig);
  1471. } else
  1472. (removedKeys = null),
  1473. (removedKeyCount = 0),
  1474. (updatePayload = diffNestedProperty(
  1475. updatePayload,
  1476. prevProp,
  1477. nextProp,
  1478. attributeConfig
  1479. )),
  1480. 0 < removedKeyCount &&
  1481. updatePayload &&
  1482. (restoreDeletedValuesInNestedArray(
  1483. updatePayload,
  1484. nextProp,
  1485. attributeConfig
  1486. ),
  1487. (removedKeys = null));
  1488. }
  1489. for (var _propKey in prevProps)
  1490. void 0 === nextProps[_propKey] &&
  1491. (!(attributeConfig = validAttributes[_propKey]) ||
  1492. (updatePayload && void 0 !== updatePayload[_propKey]) ||
  1493. ((prevProp = prevProps[_propKey]),
  1494. void 0 !== prevProp &&
  1495. ("object" !== typeof attributeConfig ||
  1496. "function" === typeof attributeConfig.diff ||
  1497. "function" === typeof attributeConfig.process
  1498. ? (((updatePayload || (updatePayload = {}))[_propKey] = null),
  1499. removedKeys || (removedKeys = {}),
  1500. removedKeys[_propKey] ||
  1501. ((removedKeys[_propKey] = !0), removedKeyCount++))
  1502. : (updatePayload = clearNestedProperty(
  1503. updatePayload,
  1504. prevProp,
  1505. attributeConfig
  1506. )))));
  1507. return updatePayload;
  1508. }
  1509. function mountSafeCallback_NOT_REALLY_SAFE(context, callback) {
  1510. return function() {
  1511. if (
  1512. callback &&
  1513. ("boolean" !== typeof context.__isMounted || context.__isMounted)
  1514. )
  1515. return callback.apply(context, arguments);
  1516. };
  1517. }
  1518. var ReactNativeFiberHostComponent = (function() {
  1519. function ReactNativeFiberHostComponent(tag, viewConfig) {
  1520. this._nativeTag = tag;
  1521. this._children = [];
  1522. this.viewConfig = viewConfig;
  1523. }
  1524. var _proto = ReactNativeFiberHostComponent.prototype;
  1525. _proto.blur = function() {
  1526. ReactNativePrivateInterface.TextInputState.blurTextInput(this);
  1527. };
  1528. _proto.focus = function() {
  1529. ReactNativePrivateInterface.TextInputState.focusTextInput(this);
  1530. };
  1531. _proto.measure = function(callback) {
  1532. ReactNativePrivateInterface.UIManager.measure(
  1533. this._nativeTag,
  1534. mountSafeCallback_NOT_REALLY_SAFE(this, callback)
  1535. );
  1536. };
  1537. _proto.measureInWindow = function(callback) {
  1538. ReactNativePrivateInterface.UIManager.measureInWindow(
  1539. this._nativeTag,
  1540. mountSafeCallback_NOT_REALLY_SAFE(this, callback)
  1541. );
  1542. };
  1543. _proto.measureLayout = function(relativeToNativeNode, onSuccess, onFail) {
  1544. if ("number" === typeof relativeToNativeNode)
  1545. var relativeNode = relativeToNativeNode;
  1546. else
  1547. relativeToNativeNode._nativeTag &&
  1548. (relativeNode = relativeToNativeNode._nativeTag);
  1549. null != relativeNode &&
  1550. ReactNativePrivateInterface.UIManager.measureLayout(
  1551. this._nativeTag,
  1552. relativeNode,
  1553. mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
  1554. mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
  1555. );
  1556. };
  1557. _proto.setNativeProps = function(nativeProps) {
  1558. nativeProps = diffProperties(
  1559. null,
  1560. emptyObject,
  1561. nativeProps,
  1562. this.viewConfig.validAttributes
  1563. );
  1564. null != nativeProps &&
  1565. ReactNativePrivateInterface.UIManager.updateView(
  1566. this._nativeTag,
  1567. this.viewConfig.uiViewClassName,
  1568. nativeProps
  1569. );
  1570. };
  1571. return ReactNativeFiberHostComponent;
  1572. })();
  1573. function shim() {
  1574. throw Error(
  1575. "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue."
  1576. );
  1577. }
  1578. var getViewConfigForType =
  1579. ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
  1580. UPDATE_SIGNAL = {},
  1581. nextReactTag = 3;
  1582. function allocateTag() {
  1583. var tag = nextReactTag;
  1584. 1 === tag % 10 && (tag += 2);
  1585. nextReactTag = tag + 2;
  1586. return tag;
  1587. }
  1588. function recursivelyUncacheFiberNode(node) {
  1589. if ("number" === typeof node)
  1590. instanceCache.delete(node), instanceProps.delete(node);
  1591. else {
  1592. var tag = node._nativeTag;
  1593. instanceCache.delete(tag);
  1594. instanceProps.delete(tag);
  1595. node._children.forEach(recursivelyUncacheFiberNode);
  1596. }
  1597. }
  1598. function finalizeInitialChildren(parentInstance) {
  1599. if (0 === parentInstance._children.length) return !1;
  1600. var nativeTags = parentInstance._children.map(function(child) {
  1601. return "number" === typeof child ? child : child._nativeTag;
  1602. });
  1603. ReactNativePrivateInterface.UIManager.setChildren(
  1604. parentInstance._nativeTag,
  1605. nativeTags
  1606. );
  1607. return !1;
  1608. }
  1609. var scheduleTimeout = setTimeout,
  1610. cancelTimeout = clearTimeout,
  1611. valueStack = [],
  1612. index = -1;
  1613. function pop(cursor) {
  1614. 0 > index ||
  1615. ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
  1616. }
  1617. function push(cursor, value) {
  1618. index++;
  1619. valueStack[index] = cursor.current;
  1620. cursor.current = value;
  1621. }
  1622. var emptyContextObject = {},
  1623. contextStackCursor = { current: emptyContextObject },
  1624. didPerformWorkStackCursor = { current: !1 },
  1625. previousContext = emptyContextObject;
  1626. function getMaskedContext(workInProgress, unmaskedContext) {
  1627. var contextTypes = workInProgress.type.contextTypes;
  1628. if (!contextTypes) return emptyContextObject;
  1629. var instance = workInProgress.stateNode;
  1630. if (
  1631. instance &&
  1632. instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext
  1633. )
  1634. return instance.__reactInternalMemoizedMaskedChildContext;
  1635. var context = {},
  1636. key;
  1637. for (key in contextTypes) context[key] = unmaskedContext[key];
  1638. instance &&
  1639. ((workInProgress = workInProgress.stateNode),
  1640. (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
  1641. (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
  1642. return context;
  1643. }
  1644. function isContextProvider(type) {
  1645. type = type.childContextTypes;
  1646. return null !== type && void 0 !== type;
  1647. }
  1648. function popContext() {
  1649. pop(didPerformWorkStackCursor);
  1650. pop(contextStackCursor);
  1651. }
  1652. function pushTopLevelContextObject(fiber, context, didChange) {
  1653. if (contextStackCursor.current !== emptyContextObject)
  1654. throw Error(
  1655. "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."
  1656. );
  1657. push(contextStackCursor, context);
  1658. push(didPerformWorkStackCursor, didChange);
  1659. }
  1660. function processChildContext(fiber, type, parentContext) {
  1661. var instance = fiber.stateNode;
  1662. fiber = type.childContextTypes;
  1663. if ("function" !== typeof instance.getChildContext) return parentContext;
  1664. instance = instance.getChildContext();
  1665. for (var contextKey in instance)
  1666. if (!(contextKey in fiber))
  1667. throw Error(
  1668. (getComponentName(type) || "Unknown") +
  1669. '.getChildContext(): key "' +
  1670. contextKey +
  1671. '" is not defined in childContextTypes.'
  1672. );
  1673. return Object.assign({}, parentContext, {}, instance);
  1674. }
  1675. function pushContextProvider(workInProgress) {
  1676. workInProgress =
  1677. ((workInProgress = workInProgress.stateNode) &&
  1678. workInProgress.__reactInternalMemoizedMergedChildContext) ||
  1679. emptyContextObject;
  1680. previousContext = contextStackCursor.current;
  1681. push(contextStackCursor, workInProgress);
  1682. push(didPerformWorkStackCursor, didPerformWorkStackCursor.current);
  1683. return !0;
  1684. }
  1685. function invalidateContextProvider(workInProgress, type, didChange) {
  1686. var instance = workInProgress.stateNode;
  1687. if (!instance)
  1688. throw Error(
  1689. "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."
  1690. );
  1691. didChange
  1692. ? ((workInProgress = processChildContext(
  1693. workInProgress,
  1694. type,
  1695. previousContext
  1696. )),
  1697. (instance.__reactInternalMemoizedMergedChildContext = workInProgress),
  1698. pop(didPerformWorkStackCursor),
  1699. pop(contextStackCursor),
  1700. push(contextStackCursor, workInProgress))
  1701. : pop(didPerformWorkStackCursor);
  1702. push(didPerformWorkStackCursor, didChange);
  1703. }
  1704. var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
  1705. Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
  1706. Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
  1707. Scheduler_shouldYield = Scheduler.unstable_shouldYield,
  1708. Scheduler_requestPaint = Scheduler.unstable_requestPaint,
  1709. Scheduler_now = Scheduler.unstable_now,
  1710. Scheduler_getCurrentPriorityLevel =
  1711. Scheduler.unstable_getCurrentPriorityLevel,
  1712. Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
  1713. Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  1714. Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
  1715. Scheduler_LowPriority = Scheduler.unstable_LowPriority,
  1716. Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
  1717. if (
  1718. null == tracing.__interactionsRef ||
  1719. null == tracing.__interactionsRef.current
  1720. )
  1721. throw Error(
  1722. "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"
  1723. );
  1724. var fakeCallbackNode = {},
  1725. requestPaint =
  1726. void 0 !== Scheduler_requestPaint ? Scheduler_requestPaint : function() {},
  1727. syncQueue = null,
  1728. immediateQueueCallbackNode = null,
  1729. isFlushingSyncQueue = !1,
  1730. initialTimeMs = Scheduler_now(),
  1731. now =
  1732. 1e4 > initialTimeMs
  1733. ? Scheduler_now
  1734. : function() {
  1735. return Scheduler_now() - initialTimeMs;
  1736. };
  1737. function getCurrentPriorityLevel() {
  1738. switch (Scheduler_getCurrentPriorityLevel()) {
  1739. case Scheduler_ImmediatePriority:
  1740. return 99;
  1741. case Scheduler_UserBlockingPriority:
  1742. return 98;
  1743. case Scheduler_NormalPriority:
  1744. return 97;
  1745. case Scheduler_LowPriority:
  1746. return 96;
  1747. case Scheduler_IdlePriority:
  1748. return 95;
  1749. default:
  1750. throw Error("Unknown priority level.");
  1751. }
  1752. }
  1753. function reactPriorityToSchedulerPriority(reactPriorityLevel) {
  1754. switch (reactPriorityLevel) {
  1755. case 99:
  1756. return Scheduler_ImmediatePriority;
  1757. case 98:
  1758. return Scheduler_UserBlockingPriority;
  1759. case 97:
  1760. return Scheduler_NormalPriority;
  1761. case 96:
  1762. return Scheduler_LowPriority;
  1763. case 95:
  1764. return Scheduler_IdlePriority;
  1765. default:
  1766. throw Error("Unknown priority level.");
  1767. }
  1768. }
  1769. function runWithPriority(reactPriorityLevel, fn) {
  1770. reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  1771. return Scheduler_runWithPriority(reactPriorityLevel, fn);
  1772. }
  1773. function scheduleCallback(reactPriorityLevel, callback, options) {
  1774. reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  1775. return Scheduler_scheduleCallback(reactPriorityLevel, callback, options);
  1776. }
  1777. function scheduleSyncCallback(callback) {
  1778. null === syncQueue
  1779. ? ((syncQueue = [callback]),
  1780. (immediateQueueCallbackNode = Scheduler_scheduleCallback(
  1781. Scheduler_ImmediatePriority,
  1782. flushSyncCallbackQueueImpl
  1783. )))
  1784. : syncQueue.push(callback);
  1785. return fakeCallbackNode;
  1786. }
  1787. function flushSyncCallbackQueue() {
  1788. if (null !== immediateQueueCallbackNode) {
  1789. var node = immediateQueueCallbackNode;
  1790. immediateQueueCallbackNode = null;
  1791. Scheduler_cancelCallback(node);
  1792. }
  1793. flushSyncCallbackQueueImpl();
  1794. }
  1795. function flushSyncCallbackQueueImpl() {
  1796. if (!isFlushingSyncQueue && null !== syncQueue) {
  1797. isFlushingSyncQueue = !0;
  1798. var i = 0;
  1799. try {
  1800. var queue = syncQueue;
  1801. runWithPriority(99, function() {
  1802. for (; i < queue.length; i++) {
  1803. var callback = queue[i];
  1804. do callback = callback(!0);
  1805. while (null !== callback);
  1806. }
  1807. });
  1808. syncQueue = null;
  1809. } catch (error) {
  1810. throw (null !== syncQueue && (syncQueue = syncQueue.slice(i + 1)),
  1811. Scheduler_scheduleCallback(
  1812. Scheduler_ImmediatePriority,
  1813. flushSyncCallbackQueue
  1814. ),
  1815. error);
  1816. } finally {
  1817. isFlushingSyncQueue = !1;
  1818. }
  1819. }
  1820. }
  1821. function inferPriorityFromExpirationTime(currentTime, expirationTime) {
  1822. if (1073741823 === expirationTime) return 99;
  1823. if (1 === expirationTime || 2 === expirationTime) return 95;
  1824. currentTime =
  1825. 10 * (1073741821 - expirationTime) - 10 * (1073741821 - currentTime);
  1826. return 0 >= currentTime
  1827. ? 99
  1828. : 250 >= currentTime
  1829. ? 98
  1830. : 5250 >= currentTime
  1831. ? 97
  1832. : 95;
  1833. }
  1834. function is(x, y) {
  1835. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  1836. }
  1837. var objectIs = "function" === typeof Object.is ? Object.is : is,
  1838. hasOwnProperty = Object.prototype.hasOwnProperty;
  1839. function shallowEqual(objA, objB) {
  1840. if (objectIs(objA, objB)) return !0;
  1841. if (
  1842. "object" !== typeof objA ||
  1843. null === objA ||
  1844. "object" !== typeof objB ||
  1845. null === objB
  1846. )
  1847. return !1;
  1848. var keysA = Object.keys(objA),
  1849. keysB = Object.keys(objB);
  1850. if (keysA.length !== keysB.length) return !1;
  1851. for (keysB = 0; keysB < keysA.length; keysB++)
  1852. if (
  1853. !hasOwnProperty.call(objB, keysA[keysB]) ||
  1854. !objectIs(objA[keysA[keysB]], objB[keysA[keysB]])
  1855. )
  1856. return !1;
  1857. return !0;
  1858. }
  1859. var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
  1860. function getStackByFiberInDevAndProd(workInProgress) {
  1861. var info = "";
  1862. do {
  1863. a: switch (workInProgress.tag) {
  1864. case 3:
  1865. case 4:
  1866. case 6:
  1867. case 7:
  1868. case 10:
  1869. case 9:
  1870. var JSCompiler_inline_result = "";
  1871. break a;
  1872. default:
  1873. var owner = workInProgress._debugOwner,
  1874. source = workInProgress._debugSource,
  1875. name = getComponentName(workInProgress.type);
  1876. JSCompiler_inline_result = null;
  1877. owner && (JSCompiler_inline_result = getComponentName(owner.type));
  1878. owner = name;
  1879. name = "";
  1880. source
  1881. ? (name =
  1882. " (at " +
  1883. source.fileName.replace(BEFORE_SLASH_RE, "") +
  1884. ":" +
  1885. source.lineNumber +
  1886. ")")
  1887. : JSCompiler_inline_result &&
  1888. (name = " (created by " + JSCompiler_inline_result + ")");
  1889. JSCompiler_inline_result = "\n in " + (owner || "Unknown") + name;
  1890. }
  1891. info += JSCompiler_inline_result;
  1892. workInProgress = workInProgress.return;
  1893. } while (workInProgress);
  1894. return info;
  1895. }
  1896. function resolveDefaultProps(Component, baseProps) {
  1897. if (Component && Component.defaultProps) {
  1898. baseProps = Object.assign({}, baseProps);
  1899. Component = Component.defaultProps;
  1900. for (var propName in Component)
  1901. void 0 === baseProps[propName] &&
  1902. (baseProps[propName] = Component[propName]);
  1903. }
  1904. return baseProps;
  1905. }
  1906. var valueCursor = { current: null },
  1907. currentlyRenderingFiber = null,
  1908. lastContextDependency = null,
  1909. lastContextWithAllBitsObserved = null;
  1910. function resetContextDependencies() {
  1911. lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = null;
  1912. }
  1913. function popProvider(providerFiber) {
  1914. var currentValue = valueCursor.current;
  1915. pop(valueCursor);
  1916. providerFiber.type._context._currentValue = currentValue;
  1917. }
  1918. function scheduleWorkOnParentPath(parent, renderExpirationTime) {
  1919. for (; null !== parent; ) {
  1920. var alternate = parent.alternate;
  1921. if (parent.childExpirationTime < renderExpirationTime)
  1922. (parent.childExpirationTime = renderExpirationTime),
  1923. null !== alternate &&
  1924. alternate.childExpirationTime < renderExpirationTime &&
  1925. (alternate.childExpirationTime = renderExpirationTime);
  1926. else if (
  1927. null !== alternate &&
  1928. alternate.childExpirationTime < renderExpirationTime
  1929. )
  1930. alternate.childExpirationTime = renderExpirationTime;
  1931. else break;
  1932. parent = parent.return;
  1933. }
  1934. }
  1935. function prepareToReadContext(workInProgress, renderExpirationTime) {
  1936. currentlyRenderingFiber = workInProgress;
  1937. lastContextWithAllBitsObserved = lastContextDependency = null;
  1938. workInProgress = workInProgress.dependencies;
  1939. null !== workInProgress &&
  1940. null !== workInProgress.firstContext &&
  1941. (workInProgress.expirationTime >= renderExpirationTime &&
  1942. (didReceiveUpdate = !0),
  1943. (workInProgress.firstContext = null));
  1944. }
  1945. function readContext(context, observedBits) {
  1946. if (
  1947. lastContextWithAllBitsObserved !== context &&
  1948. !1 !== observedBits &&
  1949. 0 !== observedBits
  1950. ) {
  1951. if ("number" !== typeof observedBits || 1073741823 === observedBits)
  1952. (lastContextWithAllBitsObserved = context), (observedBits = 1073741823);
  1953. observedBits = { context: context, observedBits: observedBits, next: null };
  1954. if (null === lastContextDependency) {
  1955. if (null === currentlyRenderingFiber)
  1956. throw Error(
  1957. "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()."
  1958. );
  1959. lastContextDependency = observedBits;
  1960. currentlyRenderingFiber.dependencies = {
  1961. expirationTime: 0,
  1962. firstContext: observedBits,
  1963. responders: null
  1964. };
  1965. } else lastContextDependency = lastContextDependency.next = observedBits;
  1966. }
  1967. return context._currentValue;
  1968. }
  1969. var hasForceUpdate = !1;
  1970. function initializeUpdateQueue(fiber) {
  1971. fiber.updateQueue = {
  1972. baseState: fiber.memoizedState,
  1973. baseQueue: null,
  1974. shared: { pending: null },
  1975. effects: null
  1976. };
  1977. }
  1978. function cloneUpdateQueue(current, workInProgress) {
  1979. current = current.updateQueue;
  1980. workInProgress.updateQueue === current &&
  1981. (workInProgress.updateQueue = {
  1982. baseState: current.baseState,
  1983. baseQueue: current.baseQueue,
  1984. shared: current.shared,
  1985. effects: current.effects
  1986. });
  1987. }
  1988. function createUpdate(expirationTime, suspenseConfig) {
  1989. expirationTime = {
  1990. expirationTime: expirationTime,
  1991. suspenseConfig: suspenseConfig,
  1992. tag: 0,
  1993. payload: null,
  1994. callback: null,
  1995. next: null
  1996. };
  1997. return (expirationTime.next = expirationTime);
  1998. }
  1999. function enqueueUpdate(fiber, update) {
  2000. fiber = fiber.updateQueue;
  2001. if (null !== fiber) {
  2002. fiber = fiber.shared;
  2003. var pending = fiber.pending;
  2004. null === pending
  2005. ? (update.next = update)
  2006. : ((update.next = pending.next), (pending.next = update));
  2007. fiber.pending = update;
  2008. }
  2009. }
  2010. function enqueueCapturedUpdate(workInProgress, update) {
  2011. var current = workInProgress.alternate;
  2012. null !== current && cloneUpdateQueue(current, workInProgress);
  2013. workInProgress = workInProgress.updateQueue;
  2014. current = workInProgress.baseQueue;
  2015. null === current
  2016. ? ((workInProgress.baseQueue = update.next = update),
  2017. (update.next = update))
  2018. : ((update.next = current.next), (current.next = update));
  2019. }
  2020. function processUpdateQueue(
  2021. workInProgress$jscomp$0,
  2022. props,
  2023. instance,
  2024. renderExpirationTime
  2025. ) {
  2026. var queue = workInProgress$jscomp$0.updateQueue;
  2027. hasForceUpdate = !1;
  2028. var baseQueue = queue.baseQueue,
  2029. pendingQueue = queue.shared.pending;
  2030. if (null !== pendingQueue) {
  2031. if (null !== baseQueue) {
  2032. var baseFirst = baseQueue.next;
  2033. baseQueue.next = pendingQueue.next;
  2034. pendingQueue.next = baseFirst;
  2035. }
  2036. baseQueue = pendingQueue;
  2037. queue.shared.pending = null;
  2038. baseFirst = workInProgress$jscomp$0.alternate;
  2039. null !== baseFirst &&
  2040. ((baseFirst = baseFirst.updateQueue),
  2041. null !== baseFirst && (baseFirst.baseQueue = pendingQueue));
  2042. }
  2043. if (null !== baseQueue) {
  2044. baseFirst = baseQueue.next;
  2045. var newState = queue.baseState,
  2046. newExpirationTime = 0,
  2047. newBaseState = null,
  2048. newBaseQueueFirst = null,
  2049. newBaseQueueLast = null;
  2050. if (null !== baseFirst) {
  2051. var update = baseFirst;
  2052. do {
  2053. pendingQueue = update.expirationTime;
  2054. if (pendingQueue < renderExpirationTime) {
  2055. var clone = {
  2056. expirationTime: update.expirationTime,
  2057. suspenseConfig: update.suspenseConfig,
  2058. tag: update.tag,
  2059. payload: update.payload,
  2060. callback: update.callback,
  2061. next: null
  2062. };
  2063. null === newBaseQueueLast
  2064. ? ((newBaseQueueFirst = newBaseQueueLast = clone),
  2065. (newBaseState = newState))
  2066. : (newBaseQueueLast = newBaseQueueLast.next = clone);
  2067. pendingQueue > newExpirationTime &&
  2068. (newExpirationTime = pendingQueue);
  2069. } else {
  2070. null !== newBaseQueueLast &&
  2071. (newBaseQueueLast = newBaseQueueLast.next = {
  2072. expirationTime: 1073741823,
  2073. suspenseConfig: update.suspenseConfig,
  2074. tag: update.tag,
  2075. payload: update.payload,
  2076. callback: update.callback,
  2077. next: null
  2078. });
  2079. markRenderEventTimeAndConfig(pendingQueue, update.suspenseConfig);
  2080. a: {
  2081. var workInProgress = workInProgress$jscomp$0,
  2082. update$jscomp$0 = update;
  2083. pendingQueue = props;
  2084. clone = instance;
  2085. switch (update$jscomp$0.tag) {
  2086. case 1:
  2087. workInProgress = update$jscomp$0.payload;
  2088. if ("function" === typeof workInProgress) {
  2089. newState = workInProgress.call(clone, newState, pendingQueue);
  2090. break a;
  2091. }
  2092. newState = workInProgress;
  2093. break a;
  2094. case 3:
  2095. workInProgress.effectTag =
  2096. (workInProgress.effectTag & -4097) | 64;
  2097. case 0:
  2098. workInProgress = update$jscomp$0.payload;
  2099. pendingQueue =
  2100. "function" === typeof workInProgress
  2101. ? workInProgress.call(clone, newState, pendingQueue)
  2102. : workInProgress;
  2103. if (null === pendingQueue || void 0 === pendingQueue) break a;
  2104. newState = Object.assign({}, newState, pendingQueue);
  2105. break a;
  2106. case 2:
  2107. hasForceUpdate = !0;
  2108. }
  2109. }
  2110. null !== update.callback &&
  2111. ((workInProgress$jscomp$0.effectTag |= 32),
  2112. (pendingQueue = queue.effects),
  2113. null === pendingQueue
  2114. ? (queue.effects = [update])
  2115. : pendingQueue.push(update));
  2116. }
  2117. update = update.next;
  2118. if (null === update || update === baseFirst)
  2119. if (((pendingQueue = queue.shared.pending), null === pendingQueue))
  2120. break;
  2121. else
  2122. (update = baseQueue.next = pendingQueue.next),
  2123. (pendingQueue.next = baseFirst),
  2124. (queue.baseQueue = baseQueue = pendingQueue),
  2125. (queue.shared.pending = null);
  2126. } while (1);
  2127. }
  2128. null === newBaseQueueLast
  2129. ? (newBaseState = newState)
  2130. : (newBaseQueueLast.next = newBaseQueueFirst);
  2131. queue.baseState = newBaseState;
  2132. queue.baseQueue = newBaseQueueLast;
  2133. markUnprocessedUpdateTime(newExpirationTime);
  2134. workInProgress$jscomp$0.expirationTime = newExpirationTime;
  2135. workInProgress$jscomp$0.memoizedState = newState;
  2136. }
  2137. }
  2138. function commitUpdateQueue(finishedWork, finishedQueue, instance) {
  2139. finishedWork = finishedQueue.effects;
  2140. finishedQueue.effects = null;
  2141. if (null !== finishedWork)
  2142. for (
  2143. finishedQueue = 0;
  2144. finishedQueue < finishedWork.length;
  2145. finishedQueue++
  2146. ) {
  2147. var effect = finishedWork[finishedQueue],
  2148. callback = effect.callback;
  2149. if (null !== callback) {
  2150. effect.callback = null;
  2151. if ("function" !== typeof callback)
  2152. throw Error(
  2153. "Invalid argument passed as callback. Expected a function. Instead received: " +
  2154. callback
  2155. );
  2156. callback.call(instance);
  2157. }
  2158. }
  2159. }
  2160. var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
  2161. emptyRefsObject = new React.Component().refs;
  2162. function applyDerivedStateFromProps(
  2163. workInProgress,
  2164. ctor,
  2165. getDerivedStateFromProps,
  2166. nextProps
  2167. ) {
  2168. ctor = workInProgress.memoizedState;
  2169. getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
  2170. getDerivedStateFromProps =
  2171. null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
  2172. ? ctor
  2173. : Object.assign({}, ctor, getDerivedStateFromProps);
  2174. workInProgress.memoizedState = getDerivedStateFromProps;
  2175. 0 === workInProgress.expirationTime &&
  2176. (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
  2177. }
  2178. var classComponentUpdater = {
  2179. isMounted: function(component) {
  2180. return (component = component._reactInternalFiber)
  2181. ? getNearestMountedFiber(component) === component
  2182. : !1;
  2183. },
  2184. enqueueSetState: function(inst, payload, callback) {
  2185. inst = inst._reactInternalFiber;
  2186. var currentTime = requestCurrentTimeForUpdate(),
  2187. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2188. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2189. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2190. suspenseConfig.payload = payload;
  2191. void 0 !== callback &&
  2192. null !== callback &&
  2193. (suspenseConfig.callback = callback);
  2194. enqueueUpdate(inst, suspenseConfig);
  2195. scheduleWork(inst, currentTime);
  2196. },
  2197. enqueueReplaceState: function(inst, payload, callback) {
  2198. inst = inst._reactInternalFiber;
  2199. var currentTime = requestCurrentTimeForUpdate(),
  2200. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2201. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2202. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2203. suspenseConfig.tag = 1;
  2204. suspenseConfig.payload = payload;
  2205. void 0 !== callback &&
  2206. null !== callback &&
  2207. (suspenseConfig.callback = callback);
  2208. enqueueUpdate(inst, suspenseConfig);
  2209. scheduleWork(inst, currentTime);
  2210. },
  2211. enqueueForceUpdate: function(inst, callback) {
  2212. inst = inst._reactInternalFiber;
  2213. var currentTime = requestCurrentTimeForUpdate(),
  2214. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2215. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2216. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2217. suspenseConfig.tag = 2;
  2218. void 0 !== callback &&
  2219. null !== callback &&
  2220. (suspenseConfig.callback = callback);
  2221. enqueueUpdate(inst, suspenseConfig);
  2222. scheduleWork(inst, currentTime);
  2223. }
  2224. };
  2225. function checkShouldComponentUpdate(
  2226. workInProgress,
  2227. ctor,
  2228. oldProps,
  2229. newProps,
  2230. oldState,
  2231. newState,
  2232. nextContext
  2233. ) {
  2234. workInProgress = workInProgress.stateNode;
  2235. return "function" === typeof workInProgress.shouldComponentUpdate
  2236. ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
  2237. : ctor.prototype && ctor.prototype.isPureReactComponent
  2238. ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
  2239. : !0;
  2240. }
  2241. function constructClassInstance(workInProgress, ctor, props) {
  2242. var isLegacyContextConsumer = !1,
  2243. unmaskedContext = emptyContextObject;
  2244. var context = ctor.contextType;
  2245. "object" === typeof context && null !== context
  2246. ? (context = readContext(context))
  2247. : ((unmaskedContext = isContextProvider(ctor)
  2248. ? previousContext
  2249. : contextStackCursor.current),
  2250. (isLegacyContextConsumer = ctor.contextTypes),
  2251. (context = (isLegacyContextConsumer =
  2252. null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer)
  2253. ? getMaskedContext(workInProgress, unmaskedContext)
  2254. : emptyContextObject));
  2255. ctor = new ctor(props, context);
  2256. workInProgress.memoizedState =
  2257. null !== ctor.state && void 0 !== ctor.state ? ctor.state : null;
  2258. ctor.updater = classComponentUpdater;
  2259. workInProgress.stateNode = ctor;
  2260. ctor._reactInternalFiber = workInProgress;
  2261. isLegacyContextConsumer &&
  2262. ((workInProgress = workInProgress.stateNode),
  2263. (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
  2264. (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
  2265. return ctor;
  2266. }
  2267. function callComponentWillReceiveProps(
  2268. workInProgress,
  2269. instance,
  2270. newProps,
  2271. nextContext
  2272. ) {
  2273. workInProgress = instance.state;
  2274. "function" === typeof instance.componentWillReceiveProps &&
  2275. instance.componentWillReceiveProps(newProps, nextContext);
  2276. "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  2277. instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  2278. instance.state !== workInProgress &&
  2279. classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  2280. }
  2281. function mountClassInstance(
  2282. workInProgress,
  2283. ctor,
  2284. newProps,
  2285. renderExpirationTime
  2286. ) {
  2287. var instance = workInProgress.stateNode;
  2288. instance.props = newProps;
  2289. instance.state = workInProgress.memoizedState;
  2290. instance.refs = emptyRefsObject;
  2291. initializeUpdateQueue(workInProgress);
  2292. var contextType = ctor.contextType;
  2293. "object" === typeof contextType && null !== contextType
  2294. ? (instance.context = readContext(contextType))
  2295. : ((contextType = isContextProvider(ctor)
  2296. ? previousContext
  2297. : contextStackCursor.current),
  2298. (instance.context = getMaskedContext(workInProgress, contextType)));
  2299. processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  2300. instance.state = workInProgress.memoizedState;
  2301. contextType = ctor.getDerivedStateFromProps;
  2302. "function" === typeof contextType &&
  2303. (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps),
  2304. (instance.state = workInProgress.memoizedState));
  2305. "function" === typeof ctor.getDerivedStateFromProps ||
  2306. "function" === typeof instance.getSnapshotBeforeUpdate ||
  2307. ("function" !== typeof instance.UNSAFE_componentWillMount &&
  2308. "function" !== typeof instance.componentWillMount) ||
  2309. ((ctor = instance.state),
  2310. "function" === typeof instance.componentWillMount &&
  2311. instance.componentWillMount(),
  2312. "function" === typeof instance.UNSAFE_componentWillMount &&
  2313. instance.UNSAFE_componentWillMount(),
  2314. ctor !== instance.state &&
  2315. classComponentUpdater.enqueueReplaceState(instance, instance.state, null),
  2316. processUpdateQueue(
  2317. workInProgress,
  2318. newProps,
  2319. instance,
  2320. renderExpirationTime
  2321. ),
  2322. (instance.state = workInProgress.memoizedState));
  2323. "function" === typeof instance.componentDidMount &&
  2324. (workInProgress.effectTag |= 4);
  2325. }
  2326. var isArray = Array.isArray;
  2327. function coerceRef(returnFiber, current, element) {
  2328. returnFiber = element.ref;
  2329. if (
  2330. null !== returnFiber &&
  2331. "function" !== typeof returnFiber &&
  2332. "object" !== typeof returnFiber
  2333. ) {
  2334. if (element._owner) {
  2335. element = element._owner;
  2336. if (element) {
  2337. if (1 !== element.tag)
  2338. throw Error(
  2339. "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"
  2340. );
  2341. var inst = element.stateNode;
  2342. }
  2343. if (!inst)
  2344. throw Error(
  2345. "Missing owner for string ref " +
  2346. returnFiber +
  2347. ". This error is likely caused by a bug in React. Please file an issue."
  2348. );
  2349. var stringRef = "" + returnFiber;
  2350. if (
  2351. null !== current &&
  2352. null !== current.ref &&
  2353. "function" === typeof current.ref &&
  2354. current.ref._stringRef === stringRef
  2355. )
  2356. return current.ref;
  2357. current = function(value) {
  2358. var refs = inst.refs;
  2359. refs === emptyRefsObject && (refs = inst.refs = {});
  2360. null === value ? delete refs[stringRef] : (refs[stringRef] = value);
  2361. };
  2362. current._stringRef = stringRef;
  2363. return current;
  2364. }
  2365. if ("string" !== typeof returnFiber)
  2366. throw Error(
  2367. "Expected ref to be a function, a string, an object returned by React.createRef(), or null."
  2368. );
  2369. if (!element._owner)
  2370. throw Error(
  2371. "Element ref was specified as a string (" +
  2372. returnFiber +
  2373. ") 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."
  2374. );
  2375. }
  2376. return returnFiber;
  2377. }
  2378. function throwOnInvalidObjectType(returnFiber, newChild) {
  2379. if ("textarea" !== returnFiber.type)
  2380. throw Error(
  2381. "Objects are not valid as a React child (found: " +
  2382. ("[object Object]" === Object.prototype.toString.call(newChild)
  2383. ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
  2384. : newChild) +
  2385. ")."
  2386. );
  2387. }
  2388. function ChildReconciler(shouldTrackSideEffects) {
  2389. function deleteChild(returnFiber, childToDelete) {
  2390. if (shouldTrackSideEffects) {
  2391. var last = returnFiber.lastEffect;
  2392. null !== last
  2393. ? ((last.nextEffect = childToDelete),
  2394. (returnFiber.lastEffect = childToDelete))
  2395. : (returnFiber.firstEffect = returnFiber.lastEffect = childToDelete);
  2396. childToDelete.nextEffect = null;
  2397. childToDelete.effectTag = 8;
  2398. }
  2399. }
  2400. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  2401. if (!shouldTrackSideEffects) return null;
  2402. for (; null !== currentFirstChild; )
  2403. deleteChild(returnFiber, currentFirstChild),
  2404. (currentFirstChild = currentFirstChild.sibling);
  2405. return null;
  2406. }
  2407. function mapRemainingChildren(returnFiber, currentFirstChild) {
  2408. for (returnFiber = new Map(); null !== currentFirstChild; )
  2409. null !== currentFirstChild.key
  2410. ? returnFiber.set(currentFirstChild.key, currentFirstChild)
  2411. : returnFiber.set(currentFirstChild.index, currentFirstChild),
  2412. (currentFirstChild = currentFirstChild.sibling);
  2413. return returnFiber;
  2414. }
  2415. function useFiber(fiber, pendingProps) {
  2416. fiber = createWorkInProgress(fiber, pendingProps);
  2417. fiber.index = 0;
  2418. fiber.sibling = null;
  2419. return fiber;
  2420. }
  2421. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  2422. newFiber.index = newIndex;
  2423. if (!shouldTrackSideEffects) return lastPlacedIndex;
  2424. newIndex = newFiber.alternate;
  2425. if (null !== newIndex)
  2426. return (
  2427. (newIndex = newIndex.index),
  2428. newIndex < lastPlacedIndex
  2429. ? ((newFiber.effectTag = 2), lastPlacedIndex)
  2430. : newIndex
  2431. );
  2432. newFiber.effectTag = 2;
  2433. return lastPlacedIndex;
  2434. }
  2435. function placeSingleChild(newFiber) {
  2436. shouldTrackSideEffects &&
  2437. null === newFiber.alternate &&
  2438. (newFiber.effectTag = 2);
  2439. return newFiber;
  2440. }
  2441. function updateTextNode(returnFiber, current, textContent, expirationTime) {
  2442. if (null === current || 6 !== current.tag)
  2443. return (
  2444. (current = createFiberFromText(
  2445. textContent,
  2446. returnFiber.mode,
  2447. expirationTime
  2448. )),
  2449. (current.return = returnFiber),
  2450. current
  2451. );
  2452. current = useFiber(current, textContent);
  2453. current.return = returnFiber;
  2454. return current;
  2455. }
  2456. function updateElement(returnFiber, current, element, expirationTime) {
  2457. if (null !== current && current.elementType === element.type)
  2458. return (
  2459. (expirationTime = useFiber(current, element.props)),
  2460. (expirationTime.ref = coerceRef(returnFiber, current, element)),
  2461. (expirationTime.return = returnFiber),
  2462. expirationTime
  2463. );
  2464. expirationTime = createFiberFromTypeAndProps(
  2465. element.type,
  2466. element.key,
  2467. element.props,
  2468. null,
  2469. returnFiber.mode,
  2470. expirationTime
  2471. );
  2472. expirationTime.ref = coerceRef(returnFiber, current, element);
  2473. expirationTime.return = returnFiber;
  2474. return expirationTime;
  2475. }
  2476. function updatePortal(returnFiber, current, portal, expirationTime) {
  2477. if (
  2478. null === current ||
  2479. 4 !== current.tag ||
  2480. current.stateNode.containerInfo !== portal.containerInfo ||
  2481. current.stateNode.implementation !== portal.implementation
  2482. )
  2483. return (
  2484. (current = createFiberFromPortal(
  2485. portal,
  2486. returnFiber.mode,
  2487. expirationTime
  2488. )),
  2489. (current.return = returnFiber),
  2490. current
  2491. );
  2492. current = useFiber(current, portal.children || []);
  2493. current.return = returnFiber;
  2494. return current;
  2495. }
  2496. function updateFragment(returnFiber, current, fragment, expirationTime, key) {
  2497. if (null === current || 7 !== current.tag)
  2498. return (
  2499. (current = createFiberFromFragment(
  2500. fragment,
  2501. returnFiber.mode,
  2502. expirationTime,
  2503. key
  2504. )),
  2505. (current.return = returnFiber),
  2506. current
  2507. );
  2508. current = useFiber(current, fragment);
  2509. current.return = returnFiber;
  2510. return current;
  2511. }
  2512. function createChild(returnFiber, newChild, expirationTime) {
  2513. if ("string" === typeof newChild || "number" === typeof newChild)
  2514. return (
  2515. (newChild = createFiberFromText(
  2516. "" + newChild,
  2517. returnFiber.mode,
  2518. expirationTime
  2519. )),
  2520. (newChild.return = returnFiber),
  2521. newChild
  2522. );
  2523. if ("object" === typeof newChild && null !== newChild) {
  2524. switch (newChild.$$typeof) {
  2525. case REACT_ELEMENT_TYPE:
  2526. return (
  2527. (expirationTime = createFiberFromTypeAndProps(
  2528. newChild.type,
  2529. newChild.key,
  2530. newChild.props,
  2531. null,
  2532. returnFiber.mode,
  2533. expirationTime
  2534. )),
  2535. (expirationTime.ref = coerceRef(returnFiber, null, newChild)),
  2536. (expirationTime.return = returnFiber),
  2537. expirationTime
  2538. );
  2539. case REACT_PORTAL_TYPE:
  2540. return (
  2541. (newChild = createFiberFromPortal(
  2542. newChild,
  2543. returnFiber.mode,
  2544. expirationTime
  2545. )),
  2546. (newChild.return = returnFiber),
  2547. newChild
  2548. );
  2549. }
  2550. if (isArray(newChild) || getIteratorFn(newChild))
  2551. return (
  2552. (newChild = createFiberFromFragment(
  2553. newChild,
  2554. returnFiber.mode,
  2555. expirationTime,
  2556. null
  2557. )),
  2558. (newChild.return = returnFiber),
  2559. newChild
  2560. );
  2561. throwOnInvalidObjectType(returnFiber, newChild);
  2562. }
  2563. return null;
  2564. }
  2565. function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
  2566. var key = null !== oldFiber ? oldFiber.key : null;
  2567. if ("string" === typeof newChild || "number" === typeof newChild)
  2568. return null !== key
  2569. ? null
  2570. : updateTextNode(returnFiber, oldFiber, "" + newChild, expirationTime);
  2571. if ("object" === typeof newChild && null !== newChild) {
  2572. switch (newChild.$$typeof) {
  2573. case REACT_ELEMENT_TYPE:
  2574. return newChild.key === key
  2575. ? newChild.type === REACT_FRAGMENT_TYPE
  2576. ? updateFragment(
  2577. returnFiber,
  2578. oldFiber,
  2579. newChild.props.children,
  2580. expirationTime,
  2581. key
  2582. )
  2583. : updateElement(returnFiber, oldFiber, newChild, expirationTime)
  2584. : null;
  2585. case REACT_PORTAL_TYPE:
  2586. return newChild.key === key
  2587. ? updatePortal(returnFiber, oldFiber, newChild, expirationTime)
  2588. : null;
  2589. }
  2590. if (isArray(newChild) || getIteratorFn(newChild))
  2591. return null !== key
  2592. ? null
  2593. : updateFragment(
  2594. returnFiber,
  2595. oldFiber,
  2596. newChild,
  2597. expirationTime,
  2598. null
  2599. );
  2600. throwOnInvalidObjectType(returnFiber, newChild);
  2601. }
  2602. return null;
  2603. }
  2604. function updateFromMap(
  2605. existingChildren,
  2606. returnFiber,
  2607. newIdx,
  2608. newChild,
  2609. expirationTime
  2610. ) {
  2611. if ("string" === typeof newChild || "number" === typeof newChild)
  2612. return (
  2613. (existingChildren = existingChildren.get(newIdx) || null),
  2614. updateTextNode(
  2615. returnFiber,
  2616. existingChildren,
  2617. "" + newChild,
  2618. expirationTime
  2619. )
  2620. );
  2621. if ("object" === typeof newChild && null !== newChild) {
  2622. switch (newChild.$$typeof) {
  2623. case REACT_ELEMENT_TYPE:
  2624. return (
  2625. (existingChildren =
  2626. existingChildren.get(
  2627. null === newChild.key ? newIdx : newChild.key
  2628. ) || null),
  2629. newChild.type === REACT_FRAGMENT_TYPE
  2630. ? updateFragment(
  2631. returnFiber,
  2632. existingChildren,
  2633. newChild.props.children,
  2634. expirationTime,
  2635. newChild.key
  2636. )
  2637. : updateElement(
  2638. returnFiber,
  2639. existingChildren,
  2640. newChild,
  2641. expirationTime
  2642. )
  2643. );
  2644. case REACT_PORTAL_TYPE:
  2645. return (
  2646. (existingChildren =
  2647. existingChildren.get(
  2648. null === newChild.key ? newIdx : newChild.key
  2649. ) || null),
  2650. updatePortal(
  2651. returnFiber,
  2652. existingChildren,
  2653. newChild,
  2654. expirationTime
  2655. )
  2656. );
  2657. }
  2658. if (isArray(newChild) || getIteratorFn(newChild))
  2659. return (
  2660. (existingChildren = existingChildren.get(newIdx) || null),
  2661. updateFragment(
  2662. returnFiber,
  2663. existingChildren,
  2664. newChild,
  2665. expirationTime,
  2666. null
  2667. )
  2668. );
  2669. throwOnInvalidObjectType(returnFiber, newChild);
  2670. }
  2671. return null;
  2672. }
  2673. function reconcileChildrenArray(
  2674. returnFiber,
  2675. currentFirstChild,
  2676. newChildren,
  2677. expirationTime
  2678. ) {
  2679. for (
  2680. var resultingFirstChild = null,
  2681. previousNewFiber = null,
  2682. oldFiber = currentFirstChild,
  2683. newIdx = (currentFirstChild = 0),
  2684. nextOldFiber = null;
  2685. null !== oldFiber && newIdx < newChildren.length;
  2686. newIdx++
  2687. ) {
  2688. oldFiber.index > newIdx
  2689. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  2690. : (nextOldFiber = oldFiber.sibling);
  2691. var newFiber = updateSlot(
  2692. returnFiber,
  2693. oldFiber,
  2694. newChildren[newIdx],
  2695. expirationTime
  2696. );
  2697. if (null === newFiber) {
  2698. null === oldFiber && (oldFiber = nextOldFiber);
  2699. break;
  2700. }
  2701. shouldTrackSideEffects &&
  2702. oldFiber &&
  2703. null === newFiber.alternate &&
  2704. deleteChild(returnFiber, oldFiber);
  2705. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  2706. null === previousNewFiber
  2707. ? (resultingFirstChild = newFiber)
  2708. : (previousNewFiber.sibling = newFiber);
  2709. previousNewFiber = newFiber;
  2710. oldFiber = nextOldFiber;
  2711. }
  2712. if (newIdx === newChildren.length)
  2713. return (
  2714. deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild
  2715. );
  2716. if (null === oldFiber) {
  2717. for (; newIdx < newChildren.length; newIdx++)
  2718. (oldFiber = createChild(
  2719. returnFiber,
  2720. newChildren[newIdx],
  2721. expirationTime
  2722. )),
  2723. null !== oldFiber &&
  2724. ((currentFirstChild = placeChild(
  2725. oldFiber,
  2726. currentFirstChild,
  2727. newIdx
  2728. )),
  2729. null === previousNewFiber
  2730. ? (resultingFirstChild = oldFiber)
  2731. : (previousNewFiber.sibling = oldFiber),
  2732. (previousNewFiber = oldFiber));
  2733. return resultingFirstChild;
  2734. }
  2735. for (
  2736. oldFiber = mapRemainingChildren(returnFiber, oldFiber);
  2737. newIdx < newChildren.length;
  2738. newIdx++
  2739. )
  2740. (nextOldFiber = updateFromMap(
  2741. oldFiber,
  2742. returnFiber,
  2743. newIdx,
  2744. newChildren[newIdx],
  2745. expirationTime
  2746. )),
  2747. null !== nextOldFiber &&
  2748. (shouldTrackSideEffects &&
  2749. null !== nextOldFiber.alternate &&
  2750. oldFiber.delete(
  2751. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  2752. ),
  2753. (currentFirstChild = placeChild(
  2754. nextOldFiber,
  2755. currentFirstChild,
  2756. newIdx
  2757. )),
  2758. null === previousNewFiber
  2759. ? (resultingFirstChild = nextOldFiber)
  2760. : (previousNewFiber.sibling = nextOldFiber),
  2761. (previousNewFiber = nextOldFiber));
  2762. shouldTrackSideEffects &&
  2763. oldFiber.forEach(function(child) {
  2764. return deleteChild(returnFiber, child);
  2765. });
  2766. return resultingFirstChild;
  2767. }
  2768. function reconcileChildrenIterator(
  2769. returnFiber,
  2770. currentFirstChild,
  2771. newChildrenIterable,
  2772. expirationTime
  2773. ) {
  2774. var iteratorFn = getIteratorFn(newChildrenIterable);
  2775. if ("function" !== typeof iteratorFn)
  2776. throw Error(
  2777. "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
  2778. );
  2779. newChildrenIterable = iteratorFn.call(newChildrenIterable);
  2780. if (null == newChildrenIterable)
  2781. throw Error("An iterable object provided no iterator.");
  2782. for (
  2783. var previousNewFiber = (iteratorFn = null),
  2784. oldFiber = currentFirstChild,
  2785. newIdx = (currentFirstChild = 0),
  2786. nextOldFiber = null,
  2787. step = newChildrenIterable.next();
  2788. null !== oldFiber && !step.done;
  2789. newIdx++, step = newChildrenIterable.next()
  2790. ) {
  2791. oldFiber.index > newIdx
  2792. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  2793. : (nextOldFiber = oldFiber.sibling);
  2794. var newFiber = updateSlot(
  2795. returnFiber,
  2796. oldFiber,
  2797. step.value,
  2798. expirationTime
  2799. );
  2800. if (null === newFiber) {
  2801. null === oldFiber && (oldFiber = nextOldFiber);
  2802. break;
  2803. }
  2804. shouldTrackSideEffects &&
  2805. oldFiber &&
  2806. null === newFiber.alternate &&
  2807. deleteChild(returnFiber, oldFiber);
  2808. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  2809. null === previousNewFiber
  2810. ? (iteratorFn = newFiber)
  2811. : (previousNewFiber.sibling = newFiber);
  2812. previousNewFiber = newFiber;
  2813. oldFiber = nextOldFiber;
  2814. }
  2815. if (step.done)
  2816. return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;
  2817. if (null === oldFiber) {
  2818. for (; !step.done; newIdx++, step = newChildrenIterable.next())
  2819. (step = createChild(returnFiber, step.value, expirationTime)),
  2820. null !== step &&
  2821. ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  2822. null === previousNewFiber
  2823. ? (iteratorFn = step)
  2824. : (previousNewFiber.sibling = step),
  2825. (previousNewFiber = step));
  2826. return iteratorFn;
  2827. }
  2828. for (
  2829. oldFiber = mapRemainingChildren(returnFiber, oldFiber);
  2830. !step.done;
  2831. newIdx++, step = newChildrenIterable.next()
  2832. )
  2833. (step = updateFromMap(
  2834. oldFiber,
  2835. returnFiber,
  2836. newIdx,
  2837. step.value,
  2838. expirationTime
  2839. )),
  2840. null !== step &&
  2841. (shouldTrackSideEffects &&
  2842. null !== step.alternate &&
  2843. oldFiber.delete(null === step.key ? newIdx : step.key),
  2844. (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  2845. null === previousNewFiber
  2846. ? (iteratorFn = step)
  2847. : (previousNewFiber.sibling = step),
  2848. (previousNewFiber = step));
  2849. shouldTrackSideEffects &&
  2850. oldFiber.forEach(function(child) {
  2851. return deleteChild(returnFiber, child);
  2852. });
  2853. return iteratorFn;
  2854. }
  2855. return function(returnFiber, currentFirstChild, newChild, expirationTime) {
  2856. var isUnkeyedTopLevelFragment =
  2857. "object" === typeof newChild &&
  2858. null !== newChild &&
  2859. newChild.type === REACT_FRAGMENT_TYPE &&
  2860. null === newChild.key;
  2861. isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
  2862. var isObject = "object" === typeof newChild && null !== newChild;
  2863. if (isObject)
  2864. switch (newChild.$$typeof) {
  2865. case REACT_ELEMENT_TYPE:
  2866. a: {
  2867. isObject = newChild.key;
  2868. for (
  2869. isUnkeyedTopLevelFragment = currentFirstChild;
  2870. null !== isUnkeyedTopLevelFragment;
  2871. ) {
  2872. if (isUnkeyedTopLevelFragment.key === isObject) {
  2873. switch (isUnkeyedTopLevelFragment.tag) {
  2874. case 7:
  2875. if (newChild.type === REACT_FRAGMENT_TYPE) {
  2876. deleteRemainingChildren(
  2877. returnFiber,
  2878. isUnkeyedTopLevelFragment.sibling
  2879. );
  2880. currentFirstChild = useFiber(
  2881. isUnkeyedTopLevelFragment,
  2882. newChild.props.children
  2883. );
  2884. currentFirstChild.return = returnFiber;
  2885. returnFiber = currentFirstChild;
  2886. break a;
  2887. }
  2888. break;
  2889. default:
  2890. if (
  2891. isUnkeyedTopLevelFragment.elementType === newChild.type
  2892. ) {
  2893. deleteRemainingChildren(
  2894. returnFiber,
  2895. isUnkeyedTopLevelFragment.sibling
  2896. );
  2897. currentFirstChild = useFiber(
  2898. isUnkeyedTopLevelFragment,
  2899. newChild.props
  2900. );
  2901. currentFirstChild.ref = coerceRef(
  2902. returnFiber,
  2903. isUnkeyedTopLevelFragment,
  2904. newChild
  2905. );
  2906. currentFirstChild.return = returnFiber;
  2907. returnFiber = currentFirstChild;
  2908. break a;
  2909. }
  2910. }
  2911. deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment);
  2912. break;
  2913. } else deleteChild(returnFiber, isUnkeyedTopLevelFragment);
  2914. isUnkeyedTopLevelFragment = isUnkeyedTopLevelFragment.sibling;
  2915. }
  2916. newChild.type === REACT_FRAGMENT_TYPE
  2917. ? ((currentFirstChild = createFiberFromFragment(
  2918. newChild.props.children,
  2919. returnFiber.mode,
  2920. expirationTime,
  2921. newChild.key
  2922. )),
  2923. (currentFirstChild.return = returnFiber),
  2924. (returnFiber = currentFirstChild))
  2925. : ((expirationTime = createFiberFromTypeAndProps(
  2926. newChild.type,
  2927. newChild.key,
  2928. newChild.props,
  2929. null,
  2930. returnFiber.mode,
  2931. expirationTime
  2932. )),
  2933. (expirationTime.ref = coerceRef(
  2934. returnFiber,
  2935. currentFirstChild,
  2936. newChild
  2937. )),
  2938. (expirationTime.return = returnFiber),
  2939. (returnFiber = expirationTime));
  2940. }
  2941. return placeSingleChild(returnFiber);
  2942. case REACT_PORTAL_TYPE:
  2943. a: {
  2944. for (
  2945. isUnkeyedTopLevelFragment = newChild.key;
  2946. null !== currentFirstChild;
  2947. ) {
  2948. if (currentFirstChild.key === isUnkeyedTopLevelFragment)
  2949. if (
  2950. 4 === currentFirstChild.tag &&
  2951. currentFirstChild.stateNode.containerInfo ===
  2952. newChild.containerInfo &&
  2953. currentFirstChild.stateNode.implementation ===
  2954. newChild.implementation
  2955. ) {
  2956. deleteRemainingChildren(
  2957. returnFiber,
  2958. currentFirstChild.sibling
  2959. );
  2960. currentFirstChild = useFiber(
  2961. currentFirstChild,
  2962. newChild.children || []
  2963. );
  2964. currentFirstChild.return = returnFiber;
  2965. returnFiber = currentFirstChild;
  2966. break a;
  2967. } else {
  2968. deleteRemainingChildren(returnFiber, currentFirstChild);
  2969. break;
  2970. }
  2971. else deleteChild(returnFiber, currentFirstChild);
  2972. currentFirstChild = currentFirstChild.sibling;
  2973. }
  2974. currentFirstChild = createFiberFromPortal(
  2975. newChild,
  2976. returnFiber.mode,
  2977. expirationTime
  2978. );
  2979. currentFirstChild.return = returnFiber;
  2980. returnFiber = currentFirstChild;
  2981. }
  2982. return placeSingleChild(returnFiber);
  2983. }
  2984. if ("string" === typeof newChild || "number" === typeof newChild)
  2985. return (
  2986. (newChild = "" + newChild),
  2987. null !== currentFirstChild && 6 === currentFirstChild.tag
  2988. ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
  2989. (currentFirstChild = useFiber(currentFirstChild, newChild)),
  2990. (currentFirstChild.return = returnFiber),
  2991. (returnFiber = currentFirstChild))
  2992. : (deleteRemainingChildren(returnFiber, currentFirstChild),
  2993. (currentFirstChild = createFiberFromText(
  2994. newChild,
  2995. returnFiber.mode,
  2996. expirationTime
  2997. )),
  2998. (currentFirstChild.return = returnFiber),
  2999. (returnFiber = currentFirstChild)),
  3000. placeSingleChild(returnFiber)
  3001. );
  3002. if (isArray(newChild))
  3003. return reconcileChildrenArray(
  3004. returnFiber,
  3005. currentFirstChild,
  3006. newChild,
  3007. expirationTime
  3008. );
  3009. if (getIteratorFn(newChild))
  3010. return reconcileChildrenIterator(
  3011. returnFiber,
  3012. currentFirstChild,
  3013. newChild,
  3014. expirationTime
  3015. );
  3016. isObject && throwOnInvalidObjectType(returnFiber, newChild);
  3017. if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
  3018. switch (returnFiber.tag) {
  3019. case 1:
  3020. case 0:
  3021. throw ((returnFiber = returnFiber.type),
  3022. Error(
  3023. (returnFiber.displayName || returnFiber.name || "Component") +
  3024. "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."
  3025. ));
  3026. }
  3027. return deleteRemainingChildren(returnFiber, currentFirstChild);
  3028. };
  3029. }
  3030. var reconcileChildFibers = ChildReconciler(!0),
  3031. mountChildFibers = ChildReconciler(!1),
  3032. NO_CONTEXT = {},
  3033. contextStackCursor$1 = { current: NO_CONTEXT },
  3034. contextFiberStackCursor = { current: NO_CONTEXT },
  3035. rootInstanceStackCursor = { current: NO_CONTEXT };
  3036. function requiredContext(c) {
  3037. if (c === NO_CONTEXT)
  3038. throw Error(
  3039. "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
  3040. );
  3041. return c;
  3042. }
  3043. function pushHostContainer(fiber, nextRootInstance) {
  3044. push(rootInstanceStackCursor, nextRootInstance);
  3045. push(contextFiberStackCursor, fiber);
  3046. push(contextStackCursor$1, NO_CONTEXT);
  3047. pop(contextStackCursor$1);
  3048. push(contextStackCursor$1, { isInAParentText: !1 });
  3049. }
  3050. function popHostContainer() {
  3051. pop(contextStackCursor$1);
  3052. pop(contextFiberStackCursor);
  3053. pop(rootInstanceStackCursor);
  3054. }
  3055. function pushHostContext(fiber) {
  3056. requiredContext(rootInstanceStackCursor.current);
  3057. var context = requiredContext(contextStackCursor$1.current);
  3058. var nextContext = fiber.type;
  3059. nextContext =
  3060. "AndroidTextInput" === nextContext ||
  3061. "RCTMultilineTextInputView" === nextContext ||
  3062. "RCTSinglelineTextInputView" === nextContext ||
  3063. "RCTText" === nextContext ||
  3064. "RCTVirtualText" === nextContext;
  3065. nextContext =
  3066. context.isInAParentText !== nextContext
  3067. ? { isInAParentText: nextContext }
  3068. : context;
  3069. context !== nextContext &&
  3070. (push(contextFiberStackCursor, fiber),
  3071. push(contextStackCursor$1, nextContext));
  3072. }
  3073. function popHostContext(fiber) {
  3074. contextFiberStackCursor.current === fiber &&
  3075. (pop(contextStackCursor$1), pop(contextFiberStackCursor));
  3076. }
  3077. var suspenseStackCursor = { current: 0 };
  3078. function findFirstSuspended(row) {
  3079. for (var node = row; null !== node; ) {
  3080. if (13 === node.tag) {
  3081. var state = node.memoizedState;
  3082. if (null !== state && (null === state.dehydrated || shim() || shim()))
  3083. return node;
  3084. } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
  3085. if (0 !== (node.effectTag & 64)) return node;
  3086. } else if (null !== node.child) {
  3087. node.child.return = node;
  3088. node = node.child;
  3089. continue;
  3090. }
  3091. if (node === row) break;
  3092. for (; null === node.sibling; ) {
  3093. if (null === node.return || node.return === row) return null;
  3094. node = node.return;
  3095. }
  3096. node.sibling.return = node.return;
  3097. node = node.sibling;
  3098. }
  3099. return null;
  3100. }
  3101. function createDeprecatedResponderListener(responder, props) {
  3102. return { responder: responder, props: props };
  3103. }
  3104. var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
  3105. ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig,
  3106. renderExpirationTime = 0,
  3107. currentlyRenderingFiber$1 = null,
  3108. currentHook = null,
  3109. workInProgressHook = null,
  3110. didScheduleRenderPhaseUpdate = !1;
  3111. function throwInvalidHookError() {
  3112. throw Error(
  3113. "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."
  3114. );
  3115. }
  3116. function areHookInputsEqual(nextDeps, prevDeps) {
  3117. if (null === prevDeps) return !1;
  3118. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
  3119. if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
  3120. return !0;
  3121. }
  3122. function renderWithHooks(
  3123. current,
  3124. workInProgress,
  3125. Component,
  3126. props,
  3127. secondArg,
  3128. nextRenderExpirationTime
  3129. ) {
  3130. renderExpirationTime = nextRenderExpirationTime;
  3131. currentlyRenderingFiber$1 = workInProgress;
  3132. workInProgress.memoizedState = null;
  3133. workInProgress.updateQueue = null;
  3134. workInProgress.expirationTime = 0;
  3135. ReactCurrentDispatcher.current =
  3136. null === current || null === current.memoizedState
  3137. ? HooksDispatcherOnMount
  3138. : HooksDispatcherOnUpdate;
  3139. current = Component(props, secondArg);
  3140. if (workInProgress.expirationTime === renderExpirationTime) {
  3141. nextRenderExpirationTime = 0;
  3142. do {
  3143. workInProgress.expirationTime = 0;
  3144. if (!(25 > nextRenderExpirationTime))
  3145. throw Error(
  3146. "Too many re-renders. React limits the number of renders to prevent an infinite loop."
  3147. );
  3148. nextRenderExpirationTime += 1;
  3149. workInProgressHook = currentHook = null;
  3150. workInProgress.updateQueue = null;
  3151. ReactCurrentDispatcher.current = HooksDispatcherOnRerender;
  3152. current = Component(props, secondArg);
  3153. } while (workInProgress.expirationTime === renderExpirationTime);
  3154. }
  3155. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  3156. workInProgress = null !== currentHook && null !== currentHook.next;
  3157. renderExpirationTime = 0;
  3158. workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
  3159. didScheduleRenderPhaseUpdate = !1;
  3160. if (workInProgress)
  3161. throw Error(
  3162. "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
  3163. );
  3164. return current;
  3165. }
  3166. function mountWorkInProgressHook() {
  3167. var hook = {
  3168. memoizedState: null,
  3169. baseState: null,
  3170. baseQueue: null,
  3171. queue: null,
  3172. next: null
  3173. };
  3174. null === workInProgressHook
  3175. ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook)
  3176. : (workInProgressHook = workInProgressHook.next = hook);
  3177. return workInProgressHook;
  3178. }
  3179. function updateWorkInProgressHook() {
  3180. if (null === currentHook) {
  3181. var nextCurrentHook = currentlyRenderingFiber$1.alternate;
  3182. nextCurrentHook =
  3183. null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
  3184. } else nextCurrentHook = currentHook.next;
  3185. var nextWorkInProgressHook =
  3186. null === workInProgressHook
  3187. ? currentlyRenderingFiber$1.memoizedState
  3188. : workInProgressHook.next;
  3189. if (null !== nextWorkInProgressHook)
  3190. (workInProgressHook = nextWorkInProgressHook),
  3191. (currentHook = nextCurrentHook);
  3192. else {
  3193. if (null === nextCurrentHook)
  3194. throw Error("Rendered more hooks than during the previous render.");
  3195. currentHook = nextCurrentHook;
  3196. nextCurrentHook = {
  3197. memoizedState: currentHook.memoizedState,
  3198. baseState: currentHook.baseState,
  3199. baseQueue: currentHook.baseQueue,
  3200. queue: currentHook.queue,
  3201. next: null
  3202. };
  3203. null === workInProgressHook
  3204. ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = nextCurrentHook)
  3205. : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
  3206. }
  3207. return workInProgressHook;
  3208. }
  3209. function basicStateReducer(state, action) {
  3210. return "function" === typeof action ? action(state) : action;
  3211. }
  3212. function updateReducer(reducer) {
  3213. var hook = updateWorkInProgressHook(),
  3214. queue = hook.queue;
  3215. if (null === queue)
  3216. throw Error(
  3217. "Should have a queue. This is likely a bug in React. Please file an issue."
  3218. );
  3219. queue.lastRenderedReducer = reducer;
  3220. var current = currentHook,
  3221. baseQueue = current.baseQueue,
  3222. pendingQueue = queue.pending;
  3223. if (null !== pendingQueue) {
  3224. if (null !== baseQueue) {
  3225. var baseFirst = baseQueue.next;
  3226. baseQueue.next = pendingQueue.next;
  3227. pendingQueue.next = baseFirst;
  3228. }
  3229. current.baseQueue = baseQueue = pendingQueue;
  3230. queue.pending = null;
  3231. }
  3232. if (null !== baseQueue) {
  3233. baseQueue = baseQueue.next;
  3234. current = current.baseState;
  3235. var newBaseQueueLast = (baseFirst = pendingQueue = null),
  3236. update = baseQueue;
  3237. do {
  3238. var updateExpirationTime = update.expirationTime;
  3239. if (updateExpirationTime < renderExpirationTime) {
  3240. var clone = {
  3241. expirationTime: update.expirationTime,
  3242. suspenseConfig: update.suspenseConfig,
  3243. action: update.action,
  3244. eagerReducer: update.eagerReducer,
  3245. eagerState: update.eagerState,
  3246. next: null
  3247. };
  3248. null === newBaseQueueLast
  3249. ? ((baseFirst = newBaseQueueLast = clone), (pendingQueue = current))
  3250. : (newBaseQueueLast = newBaseQueueLast.next = clone);
  3251. updateExpirationTime > currentlyRenderingFiber$1.expirationTime &&
  3252. ((currentlyRenderingFiber$1.expirationTime = updateExpirationTime),
  3253. markUnprocessedUpdateTime(updateExpirationTime));
  3254. } else
  3255. null !== newBaseQueueLast &&
  3256. (newBaseQueueLast = newBaseQueueLast.next = {
  3257. expirationTime: 1073741823,
  3258. suspenseConfig: update.suspenseConfig,
  3259. action: update.action,
  3260. eagerReducer: update.eagerReducer,
  3261. eagerState: update.eagerState,
  3262. next: null
  3263. }),
  3264. markRenderEventTimeAndConfig(
  3265. updateExpirationTime,
  3266. update.suspenseConfig
  3267. ),
  3268. (current =
  3269. update.eagerReducer === reducer
  3270. ? update.eagerState
  3271. : reducer(current, update.action));
  3272. update = update.next;
  3273. } while (null !== update && update !== baseQueue);
  3274. null === newBaseQueueLast
  3275. ? (pendingQueue = current)
  3276. : (newBaseQueueLast.next = baseFirst);
  3277. objectIs(current, hook.memoizedState) || (didReceiveUpdate = !0);
  3278. hook.memoizedState = current;
  3279. hook.baseState = pendingQueue;
  3280. hook.baseQueue = newBaseQueueLast;
  3281. queue.lastRenderedState = current;
  3282. }
  3283. return [hook.memoizedState, queue.dispatch];
  3284. }
  3285. function rerenderReducer(reducer) {
  3286. var hook = updateWorkInProgressHook(),
  3287. queue = hook.queue;
  3288. if (null === queue)
  3289. throw Error(
  3290. "Should have a queue. This is likely a bug in React. Please file an issue."
  3291. );
  3292. queue.lastRenderedReducer = reducer;
  3293. var dispatch = queue.dispatch,
  3294. lastRenderPhaseUpdate = queue.pending,
  3295. newState = hook.memoizedState;
  3296. if (null !== lastRenderPhaseUpdate) {
  3297. queue.pending = null;
  3298. var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
  3299. do (newState = reducer(newState, update.action)), (update = update.next);
  3300. while (update !== lastRenderPhaseUpdate);
  3301. objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);
  3302. hook.memoizedState = newState;
  3303. null === hook.baseQueue && (hook.baseState = newState);
  3304. queue.lastRenderedState = newState;
  3305. }
  3306. return [newState, dispatch];
  3307. }
  3308. function mountState(initialState) {
  3309. var hook = mountWorkInProgressHook();
  3310. "function" === typeof initialState && (initialState = initialState());
  3311. hook.memoizedState = hook.baseState = initialState;
  3312. initialState = hook.queue = {
  3313. pending: null,
  3314. dispatch: null,
  3315. lastRenderedReducer: basicStateReducer,
  3316. lastRenderedState: initialState
  3317. };
  3318. initialState = initialState.dispatch = dispatchAction.bind(
  3319. null,
  3320. currentlyRenderingFiber$1,
  3321. initialState
  3322. );
  3323. return [hook.memoizedState, initialState];
  3324. }
  3325. function pushEffect(tag, create, destroy, deps) {
  3326. tag = { tag: tag, create: create, destroy: destroy, deps: deps, next: null };
  3327. create = currentlyRenderingFiber$1.updateQueue;
  3328. null === create
  3329. ? ((create = { lastEffect: null }),
  3330. (currentlyRenderingFiber$1.updateQueue = create),
  3331. (create.lastEffect = tag.next = tag))
  3332. : ((destroy = create.lastEffect),
  3333. null === destroy
  3334. ? (create.lastEffect = tag.next = tag)
  3335. : ((deps = destroy.next),
  3336. (destroy.next = tag),
  3337. (tag.next = deps),
  3338. (create.lastEffect = tag)));
  3339. return tag;
  3340. }
  3341. function updateRef() {
  3342. return updateWorkInProgressHook().memoizedState;
  3343. }
  3344. function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  3345. var hook = mountWorkInProgressHook();
  3346. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  3347. hook.memoizedState = pushEffect(
  3348. 1 | hookEffectTag,
  3349. create,
  3350. void 0,
  3351. void 0 === deps ? null : deps
  3352. );
  3353. }
  3354. function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  3355. var hook = updateWorkInProgressHook();
  3356. deps = void 0 === deps ? null : deps;
  3357. var destroy = void 0;
  3358. if (null !== currentHook) {
  3359. var prevEffect = currentHook.memoizedState;
  3360. destroy = prevEffect.destroy;
  3361. if (null !== deps && areHookInputsEqual(deps, prevEffect.deps)) {
  3362. pushEffect(hookEffectTag, create, destroy, deps);
  3363. return;
  3364. }
  3365. }
  3366. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  3367. hook.memoizedState = pushEffect(1 | hookEffectTag, create, destroy, deps);
  3368. }
  3369. function mountEffect(create, deps) {
  3370. return mountEffectImpl(516, 4, create, deps);
  3371. }
  3372. function updateEffect(create, deps) {
  3373. return updateEffectImpl(516, 4, create, deps);
  3374. }
  3375. function updateLayoutEffect(create, deps) {
  3376. return updateEffectImpl(4, 2, create, deps);
  3377. }
  3378. function imperativeHandleEffect(create, ref) {
  3379. if ("function" === typeof ref)
  3380. return (
  3381. (create = create()),
  3382. ref(create),
  3383. function() {
  3384. ref(null);
  3385. }
  3386. );
  3387. if (null !== ref && void 0 !== ref)
  3388. return (
  3389. (create = create()),
  3390. (ref.current = create),
  3391. function() {
  3392. ref.current = null;
  3393. }
  3394. );
  3395. }
  3396. function updateImperativeHandle(ref, create, deps) {
  3397. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  3398. return updateEffectImpl(
  3399. 4,
  3400. 2,
  3401. imperativeHandleEffect.bind(null, create, ref),
  3402. deps
  3403. );
  3404. }
  3405. function mountDebugValue() {}
  3406. function mountCallback(callback, deps) {
  3407. mountWorkInProgressHook().memoizedState = [
  3408. callback,
  3409. void 0 === deps ? null : deps
  3410. ];
  3411. return callback;
  3412. }
  3413. function updateCallback(callback, deps) {
  3414. var hook = updateWorkInProgressHook();
  3415. deps = void 0 === deps ? null : deps;
  3416. var prevState = hook.memoizedState;
  3417. if (
  3418. null !== prevState &&
  3419. null !== deps &&
  3420. areHookInputsEqual(deps, prevState[1])
  3421. )
  3422. return prevState[0];
  3423. hook.memoizedState = [callback, deps];
  3424. return callback;
  3425. }
  3426. function updateMemo(nextCreate, deps) {
  3427. var hook = updateWorkInProgressHook();
  3428. deps = void 0 === deps ? null : deps;
  3429. var prevState = hook.memoizedState;
  3430. if (
  3431. null !== prevState &&
  3432. null !== deps &&
  3433. areHookInputsEqual(deps, prevState[1])
  3434. )
  3435. return prevState[0];
  3436. nextCreate = nextCreate();
  3437. hook.memoizedState = [nextCreate, deps];
  3438. return nextCreate;
  3439. }
  3440. function startTransition(setPending, config, callback) {
  3441. var priorityLevel = getCurrentPriorityLevel();
  3442. runWithPriority(98 > priorityLevel ? 98 : priorityLevel, function() {
  3443. setPending(!0);
  3444. });
  3445. runWithPriority(97 < priorityLevel ? 97 : priorityLevel, function() {
  3446. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3447. ReactCurrentBatchConfig$1.suspense = void 0 === config ? null : config;
  3448. try {
  3449. setPending(!1), callback();
  3450. } finally {
  3451. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3452. }
  3453. });
  3454. }
  3455. function dispatchAction(fiber, queue, action) {
  3456. var currentTime = requestCurrentTimeForUpdate(),
  3457. suspenseConfig = ReactCurrentBatchConfig.suspense;
  3458. currentTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  3459. suspenseConfig = {
  3460. expirationTime: currentTime,
  3461. suspenseConfig: suspenseConfig,
  3462. action: action,
  3463. eagerReducer: null,
  3464. eagerState: null,
  3465. next: null
  3466. };
  3467. var pending = queue.pending;
  3468. null === pending
  3469. ? (suspenseConfig.next = suspenseConfig)
  3470. : ((suspenseConfig.next = pending.next), (pending.next = suspenseConfig));
  3471. queue.pending = suspenseConfig;
  3472. pending = fiber.alternate;
  3473. if (
  3474. fiber === currentlyRenderingFiber$1 ||
  3475. (null !== pending && pending === currentlyRenderingFiber$1)
  3476. )
  3477. (didScheduleRenderPhaseUpdate = !0),
  3478. (suspenseConfig.expirationTime = renderExpirationTime),
  3479. (currentlyRenderingFiber$1.expirationTime = renderExpirationTime);
  3480. else {
  3481. if (
  3482. 0 === fiber.expirationTime &&
  3483. (null === pending || 0 === pending.expirationTime) &&
  3484. ((pending = queue.lastRenderedReducer), null !== pending)
  3485. )
  3486. try {
  3487. var currentState = queue.lastRenderedState,
  3488. eagerState = pending(currentState, action);
  3489. suspenseConfig.eagerReducer = pending;
  3490. suspenseConfig.eagerState = eagerState;
  3491. if (objectIs(eagerState, currentState)) return;
  3492. } catch (error) {
  3493. } finally {
  3494. }
  3495. scheduleWork(fiber, currentTime);
  3496. }
  3497. }
  3498. function updateEventListener() {}
  3499. var ContextOnlyDispatcher = {
  3500. readContext: readContext,
  3501. useCallback: throwInvalidHookError,
  3502. useContext: throwInvalidHookError,
  3503. useEffect: throwInvalidHookError,
  3504. useImperativeHandle: throwInvalidHookError,
  3505. useLayoutEffect: throwInvalidHookError,
  3506. useMemo: throwInvalidHookError,
  3507. useReducer: throwInvalidHookError,
  3508. useRef: throwInvalidHookError,
  3509. useState: throwInvalidHookError,
  3510. useDebugValue: throwInvalidHookError,
  3511. useResponder: throwInvalidHookError,
  3512. useDeferredValue: throwInvalidHookError,
  3513. useTransition: throwInvalidHookError,
  3514. useEvent: throwInvalidHookError
  3515. },
  3516. HooksDispatcherOnMount = {
  3517. readContext: readContext,
  3518. useCallback: mountCallback,
  3519. useContext: readContext,
  3520. useEffect: mountEffect,
  3521. useImperativeHandle: function(ref, create, deps) {
  3522. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  3523. return mountEffectImpl(
  3524. 4,
  3525. 2,
  3526. imperativeHandleEffect.bind(null, create, ref),
  3527. deps
  3528. );
  3529. },
  3530. useLayoutEffect: function(create, deps) {
  3531. return mountEffectImpl(4, 2, create, deps);
  3532. },
  3533. useMemo: function(nextCreate, deps) {
  3534. var hook = mountWorkInProgressHook();
  3535. deps = void 0 === deps ? null : deps;
  3536. nextCreate = nextCreate();
  3537. hook.memoizedState = [nextCreate, deps];
  3538. return nextCreate;
  3539. },
  3540. useReducer: function(reducer, initialArg, init) {
  3541. var hook = mountWorkInProgressHook();
  3542. initialArg = void 0 !== init ? init(initialArg) : initialArg;
  3543. hook.memoizedState = hook.baseState = initialArg;
  3544. reducer = hook.queue = {
  3545. pending: null,
  3546. dispatch: null,
  3547. lastRenderedReducer: reducer,
  3548. lastRenderedState: initialArg
  3549. };
  3550. reducer = reducer.dispatch = dispatchAction.bind(
  3551. null,
  3552. currentlyRenderingFiber$1,
  3553. reducer
  3554. );
  3555. return [hook.memoizedState, reducer];
  3556. },
  3557. useRef: function(initialValue) {
  3558. var hook = mountWorkInProgressHook();
  3559. initialValue = { current: initialValue };
  3560. return (hook.memoizedState = initialValue);
  3561. },
  3562. useState: mountState,
  3563. useDebugValue: mountDebugValue,
  3564. useResponder: createDeprecatedResponderListener,
  3565. useDeferredValue: function(value, config) {
  3566. var _mountState = mountState(value),
  3567. prevValue = _mountState[0],
  3568. setValue = _mountState[1];
  3569. mountEffect(
  3570. function() {
  3571. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3572. ReactCurrentBatchConfig$1.suspense =
  3573. void 0 === config ? null : config;
  3574. try {
  3575. setValue(value);
  3576. } finally {
  3577. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3578. }
  3579. },
  3580. [value, config]
  3581. );
  3582. return prevValue;
  3583. },
  3584. useTransition: function(config) {
  3585. var _mountState2 = mountState(!1),
  3586. isPending = _mountState2[0];
  3587. _mountState2 = _mountState2[1];
  3588. return [
  3589. mountCallback(startTransition.bind(null, _mountState2, config), [
  3590. _mountState2,
  3591. config
  3592. ]),
  3593. isPending
  3594. ];
  3595. },
  3596. useEvent: function() {}
  3597. },
  3598. HooksDispatcherOnUpdate = {
  3599. readContext: readContext,
  3600. useCallback: updateCallback,
  3601. useContext: readContext,
  3602. useEffect: updateEffect,
  3603. useImperativeHandle: updateImperativeHandle,
  3604. useLayoutEffect: updateLayoutEffect,
  3605. useMemo: updateMemo,
  3606. useReducer: updateReducer,
  3607. useRef: updateRef,
  3608. useState: function() {
  3609. return updateReducer(basicStateReducer);
  3610. },
  3611. useDebugValue: mountDebugValue,
  3612. useResponder: createDeprecatedResponderListener,
  3613. useDeferredValue: function(value, config) {
  3614. var _updateState = updateReducer(basicStateReducer),
  3615. prevValue = _updateState[0],
  3616. setValue = _updateState[1];
  3617. updateEffect(
  3618. function() {
  3619. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3620. ReactCurrentBatchConfig$1.suspense =
  3621. void 0 === config ? null : config;
  3622. try {
  3623. setValue(value);
  3624. } finally {
  3625. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3626. }
  3627. },
  3628. [value, config]
  3629. );
  3630. return prevValue;
  3631. },
  3632. useTransition: function(config) {
  3633. var _updateState2 = updateReducer(basicStateReducer),
  3634. isPending = _updateState2[0];
  3635. _updateState2 = _updateState2[1];
  3636. return [
  3637. updateCallback(startTransition.bind(null, _updateState2, config), [
  3638. _updateState2,
  3639. config
  3640. ]),
  3641. isPending
  3642. ];
  3643. },
  3644. useEvent: updateEventListener
  3645. },
  3646. HooksDispatcherOnRerender = {
  3647. readContext: readContext,
  3648. useCallback: updateCallback,
  3649. useContext: readContext,
  3650. useEffect: updateEffect,
  3651. useImperativeHandle: updateImperativeHandle,
  3652. useLayoutEffect: updateLayoutEffect,
  3653. useMemo: updateMemo,
  3654. useReducer: rerenderReducer,
  3655. useRef: updateRef,
  3656. useState: function() {
  3657. return rerenderReducer(basicStateReducer);
  3658. },
  3659. useDebugValue: mountDebugValue,
  3660. useResponder: createDeprecatedResponderListener,
  3661. useDeferredValue: function(value, config) {
  3662. var _rerenderState = rerenderReducer(basicStateReducer),
  3663. prevValue = _rerenderState[0],
  3664. setValue = _rerenderState[1];
  3665. updateEffect(
  3666. function() {
  3667. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3668. ReactCurrentBatchConfig$1.suspense =
  3669. void 0 === config ? null : config;
  3670. try {
  3671. setValue(value);
  3672. } finally {
  3673. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3674. }
  3675. },
  3676. [value, config]
  3677. );
  3678. return prevValue;
  3679. },
  3680. useTransition: function(config) {
  3681. var _rerenderState2 = rerenderReducer(basicStateReducer),
  3682. isPending = _rerenderState2[0];
  3683. _rerenderState2 = _rerenderState2[1];
  3684. return [
  3685. updateCallback(startTransition.bind(null, _rerenderState2, config), [
  3686. _rerenderState2,
  3687. config
  3688. ]),
  3689. isPending
  3690. ];
  3691. },
  3692. useEvent: updateEventListener
  3693. },
  3694. now$1 = Scheduler.unstable_now,
  3695. commitTime = 0,
  3696. profilerStartTime = -1;
  3697. function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
  3698. if (0 <= profilerStartTime) {
  3699. var elapsedTime = now$1() - profilerStartTime;
  3700. fiber.actualDuration += elapsedTime;
  3701. overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
  3702. profilerStartTime = -1;
  3703. }
  3704. }
  3705. var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
  3706. didReceiveUpdate = !1;
  3707. function reconcileChildren(
  3708. current,
  3709. workInProgress,
  3710. nextChildren,
  3711. renderExpirationTime
  3712. ) {
  3713. workInProgress.child =
  3714. null === current
  3715. ? mountChildFibers(
  3716. workInProgress,
  3717. null,
  3718. nextChildren,
  3719. renderExpirationTime
  3720. )
  3721. : reconcileChildFibers(
  3722. workInProgress,
  3723. current.child,
  3724. nextChildren,
  3725. renderExpirationTime
  3726. );
  3727. }
  3728. function updateForwardRef(
  3729. current,
  3730. workInProgress,
  3731. Component,
  3732. nextProps,
  3733. renderExpirationTime
  3734. ) {
  3735. Component = Component.render;
  3736. var ref = workInProgress.ref;
  3737. prepareToReadContext(workInProgress, renderExpirationTime);
  3738. nextProps = renderWithHooks(
  3739. current,
  3740. workInProgress,
  3741. Component,
  3742. nextProps,
  3743. ref,
  3744. renderExpirationTime
  3745. );
  3746. if (null !== current && !didReceiveUpdate)
  3747. return (
  3748. (workInProgress.updateQueue = current.updateQueue),
  3749. (workInProgress.effectTag &= -517),
  3750. current.expirationTime <= renderExpirationTime &&
  3751. (current.expirationTime = 0),
  3752. bailoutOnAlreadyFinishedWork(
  3753. current,
  3754. workInProgress,
  3755. renderExpirationTime
  3756. )
  3757. );
  3758. workInProgress.effectTag |= 1;
  3759. reconcileChildren(current, workInProgress, nextProps, renderExpirationTime);
  3760. return workInProgress.child;
  3761. }
  3762. function updateMemoComponent(
  3763. current,
  3764. workInProgress,
  3765. Component,
  3766. nextProps,
  3767. updateExpirationTime,
  3768. renderExpirationTime
  3769. ) {
  3770. if (null === current) {
  3771. var type = Component.type;
  3772. if (
  3773. "function" === typeof type &&
  3774. !shouldConstruct(type) &&
  3775. void 0 === type.defaultProps &&
  3776. null === Component.compare &&
  3777. void 0 === Component.defaultProps
  3778. )
  3779. return (
  3780. (workInProgress.tag = 15),
  3781. (workInProgress.type = type),
  3782. updateSimpleMemoComponent(
  3783. current,
  3784. workInProgress,
  3785. type,
  3786. nextProps,
  3787. updateExpirationTime,
  3788. renderExpirationTime
  3789. )
  3790. );
  3791. current = createFiberFromTypeAndProps(
  3792. Component.type,
  3793. null,
  3794. nextProps,
  3795. null,
  3796. workInProgress.mode,
  3797. renderExpirationTime
  3798. );
  3799. current.ref = workInProgress.ref;
  3800. current.return = workInProgress;
  3801. return (workInProgress.child = current);
  3802. }
  3803. type = current.child;
  3804. if (
  3805. updateExpirationTime < renderExpirationTime &&
  3806. ((updateExpirationTime = type.memoizedProps),
  3807. (Component = Component.compare),
  3808. (Component = null !== Component ? Component : shallowEqual),
  3809. Component(updateExpirationTime, nextProps) &&
  3810. current.ref === workInProgress.ref)
  3811. )
  3812. return bailoutOnAlreadyFinishedWork(
  3813. current,
  3814. workInProgress,
  3815. renderExpirationTime
  3816. );
  3817. workInProgress.effectTag |= 1;
  3818. current = createWorkInProgress(type, nextProps);
  3819. current.ref = workInProgress.ref;
  3820. current.return = workInProgress;
  3821. return (workInProgress.child = current);
  3822. }
  3823. function updateSimpleMemoComponent(
  3824. current,
  3825. workInProgress,
  3826. Component,
  3827. nextProps,
  3828. updateExpirationTime,
  3829. renderExpirationTime
  3830. ) {
  3831. return null !== current &&
  3832. shallowEqual(current.memoizedProps, nextProps) &&
  3833. current.ref === workInProgress.ref &&
  3834. ((didReceiveUpdate = !1), updateExpirationTime < renderExpirationTime)
  3835. ? ((workInProgress.expirationTime = current.expirationTime),
  3836. bailoutOnAlreadyFinishedWork(
  3837. current,
  3838. workInProgress,
  3839. renderExpirationTime
  3840. ))
  3841. : updateFunctionComponent(
  3842. current,
  3843. workInProgress,
  3844. Component,
  3845. nextProps,
  3846. renderExpirationTime
  3847. );
  3848. }
  3849. function markRef(current, workInProgress) {
  3850. var ref = workInProgress.ref;
  3851. if (
  3852. (null === current && null !== ref) ||
  3853. (null !== current && current.ref !== ref)
  3854. )
  3855. workInProgress.effectTag |= 128;
  3856. }
  3857. function updateFunctionComponent(
  3858. current,
  3859. workInProgress,
  3860. Component,
  3861. nextProps,
  3862. renderExpirationTime
  3863. ) {
  3864. var context = isContextProvider(Component)
  3865. ? previousContext
  3866. : contextStackCursor.current;
  3867. context = getMaskedContext(workInProgress, context);
  3868. prepareToReadContext(workInProgress, renderExpirationTime);
  3869. Component = renderWithHooks(
  3870. current,
  3871. workInProgress,
  3872. Component,
  3873. nextProps,
  3874. context,
  3875. renderExpirationTime
  3876. );
  3877. if (null !== current && !didReceiveUpdate)
  3878. return (
  3879. (workInProgress.updateQueue = current.updateQueue),
  3880. (workInProgress.effectTag &= -517),
  3881. current.expirationTime <= renderExpirationTime &&
  3882. (current.expirationTime = 0),
  3883. bailoutOnAlreadyFinishedWork(
  3884. current,
  3885. workInProgress,
  3886. renderExpirationTime
  3887. )
  3888. );
  3889. workInProgress.effectTag |= 1;
  3890. reconcileChildren(current, workInProgress, Component, renderExpirationTime);
  3891. return workInProgress.child;
  3892. }
  3893. function updateClassComponent(
  3894. current,
  3895. workInProgress,
  3896. Component,
  3897. nextProps,
  3898. renderExpirationTime
  3899. ) {
  3900. if (isContextProvider(Component)) {
  3901. var hasContext = !0;
  3902. pushContextProvider(workInProgress);
  3903. } else hasContext = !1;
  3904. prepareToReadContext(workInProgress, renderExpirationTime);
  3905. if (null === workInProgress.stateNode)
  3906. null !== current &&
  3907. ((current.alternate = null),
  3908. (workInProgress.alternate = null),
  3909. (workInProgress.effectTag |= 2)),
  3910. constructClassInstance(workInProgress, Component, nextProps),
  3911. mountClassInstance(
  3912. workInProgress,
  3913. Component,
  3914. nextProps,
  3915. renderExpirationTime
  3916. ),
  3917. (nextProps = !0);
  3918. else if (null === current) {
  3919. var instance = workInProgress.stateNode,
  3920. oldProps = workInProgress.memoizedProps;
  3921. instance.props = oldProps;
  3922. var oldContext = instance.context,
  3923. contextType = Component.contextType;
  3924. "object" === typeof contextType && null !== contextType
  3925. ? (contextType = readContext(contextType))
  3926. : ((contextType = isContextProvider(Component)
  3927. ? previousContext
  3928. : contextStackCursor.current),
  3929. (contextType = getMaskedContext(workInProgress, contextType)));
  3930. var getDerivedStateFromProps = Component.getDerivedStateFromProps,
  3931. hasNewLifecycles =
  3932. "function" === typeof getDerivedStateFromProps ||
  3933. "function" === typeof instance.getSnapshotBeforeUpdate;
  3934. hasNewLifecycles ||
  3935. ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
  3936. "function" !== typeof instance.componentWillReceiveProps) ||
  3937. ((oldProps !== nextProps || oldContext !== contextType) &&
  3938. callComponentWillReceiveProps(
  3939. workInProgress,
  3940. instance,
  3941. nextProps,
  3942. contextType
  3943. ));
  3944. hasForceUpdate = !1;
  3945. var oldState = workInProgress.memoizedState;
  3946. instance.state = oldState;
  3947. processUpdateQueue(
  3948. workInProgress,
  3949. nextProps,
  3950. instance,
  3951. renderExpirationTime
  3952. );
  3953. oldContext = workInProgress.memoizedState;
  3954. oldProps !== nextProps ||
  3955. oldState !== oldContext ||
  3956. didPerformWorkStackCursor.current ||
  3957. hasForceUpdate
  3958. ? ("function" === typeof getDerivedStateFromProps &&
  3959. (applyDerivedStateFromProps(
  3960. workInProgress,
  3961. Component,
  3962. getDerivedStateFromProps,
  3963. nextProps
  3964. ),
  3965. (oldContext = workInProgress.memoizedState)),
  3966. (oldProps =
  3967. hasForceUpdate ||
  3968. checkShouldComponentUpdate(
  3969. workInProgress,
  3970. Component,
  3971. oldProps,
  3972. nextProps,
  3973. oldState,
  3974. oldContext,
  3975. contextType
  3976. ))
  3977. ? (hasNewLifecycles ||
  3978. ("function" !== typeof instance.UNSAFE_componentWillMount &&
  3979. "function" !== typeof instance.componentWillMount) ||
  3980. ("function" === typeof instance.componentWillMount &&
  3981. instance.componentWillMount(),
  3982. "function" === typeof instance.UNSAFE_componentWillMount &&
  3983. instance.UNSAFE_componentWillMount()),
  3984. "function" === typeof instance.componentDidMount &&
  3985. (workInProgress.effectTag |= 4))
  3986. : ("function" === typeof instance.componentDidMount &&
  3987. (workInProgress.effectTag |= 4),
  3988. (workInProgress.memoizedProps = nextProps),
  3989. (workInProgress.memoizedState = oldContext)),
  3990. (instance.props = nextProps),
  3991. (instance.state = oldContext),
  3992. (instance.context = contextType),
  3993. (nextProps = oldProps))
  3994. : ("function" === typeof instance.componentDidMount &&
  3995. (workInProgress.effectTag |= 4),
  3996. (nextProps = !1));
  3997. } else
  3998. (instance = workInProgress.stateNode),
  3999. cloneUpdateQueue(current, workInProgress),
  4000. (oldProps = workInProgress.memoizedProps),
  4001. (instance.props =
  4002. workInProgress.type === workInProgress.elementType
  4003. ? oldProps
  4004. : resolveDefaultProps(workInProgress.type, oldProps)),
  4005. (oldContext = instance.context),
  4006. (contextType = Component.contextType),
  4007. "object" === typeof contextType && null !== contextType
  4008. ? (contextType = readContext(contextType))
  4009. : ((contextType = isContextProvider(Component)
  4010. ? previousContext
  4011. : contextStackCursor.current),
  4012. (contextType = getMaskedContext(workInProgress, contextType))),
  4013. (getDerivedStateFromProps = Component.getDerivedStateFromProps),
  4014. (hasNewLifecycles =
  4015. "function" === typeof getDerivedStateFromProps ||
  4016. "function" === typeof instance.getSnapshotBeforeUpdate) ||
  4017. ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
  4018. "function" !== typeof instance.componentWillReceiveProps) ||
  4019. ((oldProps !== nextProps || oldContext !== contextType) &&
  4020. callComponentWillReceiveProps(
  4021. workInProgress,
  4022. instance,
  4023. nextProps,
  4024. contextType
  4025. )),
  4026. (hasForceUpdate = !1),
  4027. (oldContext = workInProgress.memoizedState),
  4028. (instance.state = oldContext),
  4029. processUpdateQueue(
  4030. workInProgress,
  4031. nextProps,
  4032. instance,
  4033. renderExpirationTime
  4034. ),
  4035. (oldState = workInProgress.memoizedState),
  4036. oldProps !== nextProps ||
  4037. oldContext !== oldState ||
  4038. didPerformWorkStackCursor.current ||
  4039. hasForceUpdate
  4040. ? ("function" === typeof getDerivedStateFromProps &&
  4041. (applyDerivedStateFromProps(
  4042. workInProgress,
  4043. Component,
  4044. getDerivedStateFromProps,
  4045. nextProps
  4046. ),
  4047. (oldState = workInProgress.memoizedState)),
  4048. (getDerivedStateFromProps =
  4049. hasForceUpdate ||
  4050. checkShouldComponentUpdate(
  4051. workInProgress,
  4052. Component,
  4053. oldProps,
  4054. nextProps,
  4055. oldContext,
  4056. oldState,
  4057. contextType
  4058. ))
  4059. ? (hasNewLifecycles ||
  4060. ("function" !== typeof instance.UNSAFE_componentWillUpdate &&
  4061. "function" !== typeof instance.componentWillUpdate) ||
  4062. ("function" === typeof instance.componentWillUpdate &&
  4063. instance.componentWillUpdate(
  4064. nextProps,
  4065. oldState,
  4066. contextType
  4067. ),
  4068. "function" === typeof instance.UNSAFE_componentWillUpdate &&
  4069. instance.UNSAFE_componentWillUpdate(
  4070. nextProps,
  4071. oldState,
  4072. contextType
  4073. )),
  4074. "function" === typeof instance.componentDidUpdate &&
  4075. (workInProgress.effectTag |= 4),
  4076. "function" === typeof instance.getSnapshotBeforeUpdate &&
  4077. (workInProgress.effectTag |= 256))
  4078. : ("function" !== typeof instance.componentDidUpdate ||
  4079. (oldProps === current.memoizedProps &&
  4080. oldContext === current.memoizedState) ||
  4081. (workInProgress.effectTag |= 4),
  4082. "function" !== typeof instance.getSnapshotBeforeUpdate ||
  4083. (oldProps === current.memoizedProps &&
  4084. oldContext === current.memoizedState) ||
  4085. (workInProgress.effectTag |= 256),
  4086. (workInProgress.memoizedProps = nextProps),
  4087. (workInProgress.memoizedState = oldState)),
  4088. (instance.props = nextProps),
  4089. (instance.state = oldState),
  4090. (instance.context = contextType),
  4091. (nextProps = getDerivedStateFromProps))
  4092. : ("function" !== typeof instance.componentDidUpdate ||
  4093. (oldProps === current.memoizedProps &&
  4094. oldContext === current.memoizedState) ||
  4095. (workInProgress.effectTag |= 4),
  4096. "function" !== typeof instance.getSnapshotBeforeUpdate ||
  4097. (oldProps === current.memoizedProps &&
  4098. oldContext === current.memoizedState) ||
  4099. (workInProgress.effectTag |= 256),
  4100. (nextProps = !1));
  4101. return finishClassComponent(
  4102. current,
  4103. workInProgress,
  4104. Component,
  4105. nextProps,
  4106. hasContext,
  4107. renderExpirationTime
  4108. );
  4109. }
  4110. function finishClassComponent(
  4111. current,
  4112. workInProgress,
  4113. Component,
  4114. shouldUpdate,
  4115. hasContext,
  4116. renderExpirationTime
  4117. ) {
  4118. markRef(current, workInProgress);
  4119. var didCaptureError = 0 !== (workInProgress.effectTag & 64);
  4120. if (!shouldUpdate && !didCaptureError)
  4121. return (
  4122. hasContext && invalidateContextProvider(workInProgress, Component, !1),
  4123. bailoutOnAlreadyFinishedWork(
  4124. current,
  4125. workInProgress,
  4126. renderExpirationTime
  4127. )
  4128. );
  4129. shouldUpdate = workInProgress.stateNode;
  4130. ReactCurrentOwner$1.current = workInProgress;
  4131. if (
  4132. didCaptureError &&
  4133. "function" !== typeof Component.getDerivedStateFromError
  4134. ) {
  4135. var nextChildren = null;
  4136. profilerStartTime = -1;
  4137. } else nextChildren = shouldUpdate.render();
  4138. workInProgress.effectTag |= 1;
  4139. null !== current && didCaptureError
  4140. ? ((didCaptureError = nextChildren),
  4141. (workInProgress.child = reconcileChildFibers(
  4142. workInProgress,
  4143. current.child,
  4144. null,
  4145. renderExpirationTime
  4146. )),
  4147. (workInProgress.child = reconcileChildFibers(
  4148. workInProgress,
  4149. null,
  4150. didCaptureError,
  4151. renderExpirationTime
  4152. )))
  4153. : reconcileChildren(
  4154. current,
  4155. workInProgress,
  4156. nextChildren,
  4157. renderExpirationTime
  4158. );
  4159. workInProgress.memoizedState = shouldUpdate.state;
  4160. hasContext && invalidateContextProvider(workInProgress, Component, !0);
  4161. return workInProgress.child;
  4162. }
  4163. function pushHostRootContext(workInProgress) {
  4164. var root = workInProgress.stateNode;
  4165. root.pendingContext
  4166. ? pushTopLevelContextObject(
  4167. workInProgress,
  4168. root.pendingContext,
  4169. root.pendingContext !== root.context
  4170. )
  4171. : root.context &&
  4172. pushTopLevelContextObject(workInProgress, root.context, !1);
  4173. pushHostContainer(workInProgress, root.containerInfo);
  4174. }
  4175. var SUSPENDED_MARKER = { dehydrated: null, retryTime: 0 };
  4176. function updateSuspenseComponent(
  4177. current,
  4178. workInProgress,
  4179. renderExpirationTime
  4180. ) {
  4181. var mode = workInProgress.mode,
  4182. nextProps = workInProgress.pendingProps,
  4183. suspenseContext = suspenseStackCursor.current,
  4184. nextDidTimeout = !1,
  4185. JSCompiler_temp;
  4186. (JSCompiler_temp = 0 !== (workInProgress.effectTag & 64)) ||
  4187. (JSCompiler_temp =
  4188. 0 !== (suspenseContext & 2) &&
  4189. (null === current || null !== current.memoizedState));
  4190. JSCompiler_temp
  4191. ? ((nextDidTimeout = !0), (workInProgress.effectTag &= -65))
  4192. : (null !== current && null === current.memoizedState) ||
  4193. void 0 === nextProps.fallback ||
  4194. !0 === nextProps.unstable_avoidThisFallback ||
  4195. (suspenseContext |= 1);
  4196. push(suspenseStackCursor, suspenseContext & 1);
  4197. if (null === current) {
  4198. if (nextDidTimeout) {
  4199. nextDidTimeout = nextProps.fallback;
  4200. nextProps = createFiberFromFragment(null, mode, 0, null);
  4201. nextProps.return = workInProgress;
  4202. if (0 === (workInProgress.mode & 2))
  4203. for (
  4204. current =
  4205. null !== workInProgress.memoizedState
  4206. ? workInProgress.child.child
  4207. : workInProgress.child,
  4208. nextProps.child = current;
  4209. null !== current;
  4210. )
  4211. (current.return = nextProps), (current = current.sibling);
  4212. renderExpirationTime = createFiberFromFragment(
  4213. nextDidTimeout,
  4214. mode,
  4215. renderExpirationTime,
  4216. null
  4217. );
  4218. renderExpirationTime.return = workInProgress;
  4219. nextProps.sibling = renderExpirationTime;
  4220. workInProgress.memoizedState = SUSPENDED_MARKER;
  4221. workInProgress.child = nextProps;
  4222. return renderExpirationTime;
  4223. }
  4224. mode = nextProps.children;
  4225. workInProgress.memoizedState = null;
  4226. return (workInProgress.child = mountChildFibers(
  4227. workInProgress,
  4228. null,
  4229. mode,
  4230. renderExpirationTime
  4231. ));
  4232. }
  4233. if (null !== current.memoizedState) {
  4234. current = current.child;
  4235. mode = current.sibling;
  4236. if (nextDidTimeout) {
  4237. nextProps = nextProps.fallback;
  4238. renderExpirationTime = createWorkInProgress(
  4239. current,
  4240. current.pendingProps
  4241. );
  4242. renderExpirationTime.return = workInProgress;
  4243. if (
  4244. 0 === (workInProgress.mode & 2) &&
  4245. ((nextDidTimeout =
  4246. null !== workInProgress.memoizedState
  4247. ? workInProgress.child.child
  4248. : workInProgress.child),
  4249. nextDidTimeout !== current.child)
  4250. )
  4251. for (
  4252. renderExpirationTime.child = nextDidTimeout;
  4253. null !== nextDidTimeout;
  4254. )
  4255. (nextDidTimeout.return = renderExpirationTime),
  4256. (nextDidTimeout = nextDidTimeout.sibling);
  4257. if (workInProgress.mode & 8) {
  4258. nextDidTimeout = 0;
  4259. for (current = renderExpirationTime.child; null !== current; )
  4260. (nextDidTimeout += current.treeBaseDuration),
  4261. (current = current.sibling);
  4262. renderExpirationTime.treeBaseDuration = nextDidTimeout;
  4263. }
  4264. mode = createWorkInProgress(mode, nextProps);
  4265. mode.return = workInProgress;
  4266. renderExpirationTime.sibling = mode;
  4267. renderExpirationTime.childExpirationTime = 0;
  4268. workInProgress.memoizedState = SUSPENDED_MARKER;
  4269. workInProgress.child = renderExpirationTime;
  4270. return mode;
  4271. }
  4272. renderExpirationTime = reconcileChildFibers(
  4273. workInProgress,
  4274. current.child,
  4275. nextProps.children,
  4276. renderExpirationTime
  4277. );
  4278. workInProgress.memoizedState = null;
  4279. return (workInProgress.child = renderExpirationTime);
  4280. }
  4281. current = current.child;
  4282. if (nextDidTimeout) {
  4283. nextDidTimeout = nextProps.fallback;
  4284. nextProps = createFiberFromFragment(null, mode, 0, null);
  4285. nextProps.return = workInProgress;
  4286. nextProps.child = current;
  4287. null !== current && (current.return = nextProps);
  4288. if (0 === (workInProgress.mode & 2))
  4289. for (
  4290. current =
  4291. null !== workInProgress.memoizedState
  4292. ? workInProgress.child.child
  4293. : workInProgress.child,
  4294. nextProps.child = current;
  4295. null !== current;
  4296. )
  4297. (current.return = nextProps), (current = current.sibling);
  4298. if (workInProgress.mode & 8) {
  4299. current = 0;
  4300. for (suspenseContext = nextProps.child; null !== suspenseContext; )
  4301. (current += suspenseContext.treeBaseDuration),
  4302. (suspenseContext = suspenseContext.sibling);
  4303. nextProps.treeBaseDuration = current;
  4304. }
  4305. renderExpirationTime = createFiberFromFragment(
  4306. nextDidTimeout,
  4307. mode,
  4308. renderExpirationTime,
  4309. null
  4310. );
  4311. renderExpirationTime.return = workInProgress;
  4312. nextProps.sibling = renderExpirationTime;
  4313. renderExpirationTime.effectTag |= 2;
  4314. nextProps.childExpirationTime = 0;
  4315. workInProgress.memoizedState = SUSPENDED_MARKER;
  4316. workInProgress.child = nextProps;
  4317. return renderExpirationTime;
  4318. }
  4319. workInProgress.memoizedState = null;
  4320. return (workInProgress.child = reconcileChildFibers(
  4321. workInProgress,
  4322. current,
  4323. nextProps.children,
  4324. renderExpirationTime
  4325. ));
  4326. }
  4327. function scheduleWorkOnFiber(fiber, renderExpirationTime) {
  4328. fiber.expirationTime < renderExpirationTime &&
  4329. (fiber.expirationTime = renderExpirationTime);
  4330. var alternate = fiber.alternate;
  4331. null !== alternate &&
  4332. alternate.expirationTime < renderExpirationTime &&
  4333. (alternate.expirationTime = renderExpirationTime);
  4334. scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
  4335. }
  4336. function initSuspenseListRenderState(
  4337. workInProgress,
  4338. isBackwards,
  4339. tail,
  4340. lastContentRow,
  4341. tailMode,
  4342. lastEffectBeforeRendering
  4343. ) {
  4344. var renderState = workInProgress.memoizedState;
  4345. null === renderState
  4346. ? (workInProgress.memoizedState = {
  4347. isBackwards: isBackwards,
  4348. rendering: null,
  4349. renderingStartTime: 0,
  4350. last: lastContentRow,
  4351. tail: tail,
  4352. tailExpiration: 0,
  4353. tailMode: tailMode,
  4354. lastEffect: lastEffectBeforeRendering
  4355. })
  4356. : ((renderState.isBackwards = isBackwards),
  4357. (renderState.rendering = null),
  4358. (renderState.renderingStartTime = 0),
  4359. (renderState.last = lastContentRow),
  4360. (renderState.tail = tail),
  4361. (renderState.tailExpiration = 0),
  4362. (renderState.tailMode = tailMode),
  4363. (renderState.lastEffect = lastEffectBeforeRendering));
  4364. }
  4365. function updateSuspenseListComponent(
  4366. current,
  4367. workInProgress,
  4368. renderExpirationTime
  4369. ) {
  4370. var nextProps = workInProgress.pendingProps,
  4371. revealOrder = nextProps.revealOrder,
  4372. tailMode = nextProps.tail;
  4373. reconcileChildren(
  4374. current,
  4375. workInProgress,
  4376. nextProps.children,
  4377. renderExpirationTime
  4378. );
  4379. nextProps = suspenseStackCursor.current;
  4380. if (0 !== (nextProps & 2))
  4381. (nextProps = (nextProps & 1) | 2), (workInProgress.effectTag |= 64);
  4382. else {
  4383. if (null !== current && 0 !== (current.effectTag & 64))
  4384. a: for (current = workInProgress.child; null !== current; ) {
  4385. if (13 === current.tag)
  4386. null !== current.memoizedState &&
  4387. scheduleWorkOnFiber(current, renderExpirationTime);
  4388. else if (19 === current.tag)
  4389. scheduleWorkOnFiber(current, renderExpirationTime);
  4390. else if (null !== current.child) {
  4391. current.child.return = current;
  4392. current = current.child;
  4393. continue;
  4394. }
  4395. if (current === workInProgress) break a;
  4396. for (; null === current.sibling; ) {
  4397. if (null === current.return || current.return === workInProgress)
  4398. break a;
  4399. current = current.return;
  4400. }
  4401. current.sibling.return = current.return;
  4402. current = current.sibling;
  4403. }
  4404. nextProps &= 1;
  4405. }
  4406. push(suspenseStackCursor, nextProps);
  4407. if (0 === (workInProgress.mode & 2)) workInProgress.memoizedState = null;
  4408. else
  4409. switch (revealOrder) {
  4410. case "forwards":
  4411. renderExpirationTime = workInProgress.child;
  4412. for (revealOrder = null; null !== renderExpirationTime; )
  4413. (current = renderExpirationTime.alternate),
  4414. null !== current &&
  4415. null === findFirstSuspended(current) &&
  4416. (revealOrder = renderExpirationTime),
  4417. (renderExpirationTime = renderExpirationTime.sibling);
  4418. renderExpirationTime = revealOrder;
  4419. null === renderExpirationTime
  4420. ? ((revealOrder = workInProgress.child),
  4421. (workInProgress.child = null))
  4422. : ((revealOrder = renderExpirationTime.sibling),
  4423. (renderExpirationTime.sibling = null));
  4424. initSuspenseListRenderState(
  4425. workInProgress,
  4426. !1,
  4427. revealOrder,
  4428. renderExpirationTime,
  4429. tailMode,
  4430. workInProgress.lastEffect
  4431. );
  4432. break;
  4433. case "backwards":
  4434. renderExpirationTime = null;
  4435. revealOrder = workInProgress.child;
  4436. for (workInProgress.child = null; null !== revealOrder; ) {
  4437. current = revealOrder.alternate;
  4438. if (null !== current && null === findFirstSuspended(current)) {
  4439. workInProgress.child = revealOrder;
  4440. break;
  4441. }
  4442. current = revealOrder.sibling;
  4443. revealOrder.sibling = renderExpirationTime;
  4444. renderExpirationTime = revealOrder;
  4445. revealOrder = current;
  4446. }
  4447. initSuspenseListRenderState(
  4448. workInProgress,
  4449. !0,
  4450. renderExpirationTime,
  4451. null,
  4452. tailMode,
  4453. workInProgress.lastEffect
  4454. );
  4455. break;
  4456. case "together":
  4457. initSuspenseListRenderState(
  4458. workInProgress,
  4459. !1,
  4460. null,
  4461. null,
  4462. void 0,
  4463. workInProgress.lastEffect
  4464. );
  4465. break;
  4466. default:
  4467. workInProgress.memoizedState = null;
  4468. }
  4469. return workInProgress.child;
  4470. }
  4471. function bailoutOnAlreadyFinishedWork(
  4472. current,
  4473. workInProgress,
  4474. renderExpirationTime
  4475. ) {
  4476. null !== current && (workInProgress.dependencies = current.dependencies);
  4477. profilerStartTime = -1;
  4478. var updateExpirationTime = workInProgress.expirationTime;
  4479. 0 !== updateExpirationTime && markUnprocessedUpdateTime(updateExpirationTime);
  4480. if (workInProgress.childExpirationTime < renderExpirationTime) return null;
  4481. if (null !== current && workInProgress.child !== current.child)
  4482. throw Error("Resuming work not yet implemented.");
  4483. if (null !== workInProgress.child) {
  4484. current = workInProgress.child;
  4485. renderExpirationTime = createWorkInProgress(current, current.pendingProps);
  4486. workInProgress.child = renderExpirationTime;
  4487. for (
  4488. renderExpirationTime.return = workInProgress;
  4489. null !== current.sibling;
  4490. )
  4491. (current = current.sibling),
  4492. (renderExpirationTime = renderExpirationTime.sibling = createWorkInProgress(
  4493. current,
  4494. current.pendingProps
  4495. )),
  4496. (renderExpirationTime.return = workInProgress);
  4497. renderExpirationTime.sibling = null;
  4498. }
  4499. return workInProgress.child;
  4500. }
  4501. var appendAllChildren,
  4502. updateHostContainer,
  4503. updateHostComponent$1,
  4504. updateHostText$1;
  4505. appendAllChildren = function(parent, workInProgress) {
  4506. for (var node = workInProgress.child; null !== node; ) {
  4507. if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
  4508. else if (4 !== node.tag && null !== node.child) {
  4509. node.child.return = node;
  4510. node = node.child;
  4511. continue;
  4512. }
  4513. if (node === workInProgress) break;
  4514. for (; null === node.sibling; ) {
  4515. if (null === node.return || node.return === workInProgress) return;
  4516. node = node.return;
  4517. }
  4518. node.sibling.return = node.return;
  4519. node = node.sibling;
  4520. }
  4521. };
  4522. updateHostContainer = function() {};
  4523. updateHostComponent$1 = function(current, workInProgress, type, newProps) {
  4524. current.memoizedProps !== newProps &&
  4525. (requiredContext(contextStackCursor$1.current),
  4526. (workInProgress.updateQueue = UPDATE_SIGNAL)) &&
  4527. (workInProgress.effectTag |= 4);
  4528. };
  4529. updateHostText$1 = function(current, workInProgress, oldText, newText) {
  4530. oldText !== newText && (workInProgress.effectTag |= 4);
  4531. };
  4532. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  4533. switch (renderState.tailMode) {
  4534. case "hidden":
  4535. hasRenderedATailFallback = renderState.tail;
  4536. for (var lastTailNode = null; null !== hasRenderedATailFallback; )
  4537. null !== hasRenderedATailFallback.alternate &&
  4538. (lastTailNode = hasRenderedATailFallback),
  4539. (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
  4540. null === lastTailNode
  4541. ? (renderState.tail = null)
  4542. : (lastTailNode.sibling = null);
  4543. break;
  4544. case "collapsed":
  4545. lastTailNode = renderState.tail;
  4546. for (var _lastTailNode = null; null !== lastTailNode; )
  4547. null !== lastTailNode.alternate && (_lastTailNode = lastTailNode),
  4548. (lastTailNode = lastTailNode.sibling);
  4549. null === _lastTailNode
  4550. ? hasRenderedATailFallback || null === renderState.tail
  4551. ? (renderState.tail = null)
  4552. : (renderState.tail.sibling = null)
  4553. : (_lastTailNode.sibling = null);
  4554. }
  4555. }
  4556. function completeWork(current, workInProgress, renderExpirationTime) {
  4557. var newProps = workInProgress.pendingProps;
  4558. switch (workInProgress.tag) {
  4559. case 2:
  4560. case 16:
  4561. case 15:
  4562. case 0:
  4563. case 11:
  4564. case 7:
  4565. case 8:
  4566. case 12:
  4567. case 9:
  4568. case 14:
  4569. return null;
  4570. case 1:
  4571. return isContextProvider(workInProgress.type) && popContext(), null;
  4572. case 3:
  4573. return (
  4574. popHostContainer(),
  4575. pop(didPerformWorkStackCursor),
  4576. pop(contextStackCursor),
  4577. (current = workInProgress.stateNode),
  4578. current.pendingContext &&
  4579. ((current.context = current.pendingContext),
  4580. (current.pendingContext = null)),
  4581. updateHostContainer(workInProgress),
  4582. null
  4583. );
  4584. case 5:
  4585. popHostContext(workInProgress);
  4586. var rootContainerInstance = requiredContext(
  4587. rootInstanceStackCursor.current
  4588. );
  4589. renderExpirationTime = workInProgress.type;
  4590. if (null !== current && null != workInProgress.stateNode)
  4591. updateHostComponent$1(
  4592. current,
  4593. workInProgress,
  4594. renderExpirationTime,
  4595. newProps,
  4596. rootContainerInstance
  4597. ),
  4598. current.ref !== workInProgress.ref &&
  4599. (workInProgress.effectTag |= 128);
  4600. else {
  4601. if (!newProps) {
  4602. if (null === workInProgress.stateNode)
  4603. throw Error(
  4604. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  4605. );
  4606. return null;
  4607. }
  4608. requiredContext(contextStackCursor$1.current);
  4609. current = allocateTag();
  4610. renderExpirationTime = getViewConfigForType(renderExpirationTime);
  4611. var updatePayload = diffProperties(
  4612. null,
  4613. emptyObject,
  4614. newProps,
  4615. renderExpirationTime.validAttributes
  4616. );
  4617. ReactNativePrivateInterface.UIManager.createView(
  4618. current,
  4619. renderExpirationTime.uiViewClassName,
  4620. rootContainerInstance,
  4621. updatePayload
  4622. );
  4623. rootContainerInstance = new ReactNativeFiberHostComponent(
  4624. current,
  4625. renderExpirationTime,
  4626. workInProgress
  4627. );
  4628. instanceCache.set(current, workInProgress);
  4629. instanceProps.set(current, newProps);
  4630. appendAllChildren(rootContainerInstance, workInProgress, !1, !1);
  4631. workInProgress.stateNode = rootContainerInstance;
  4632. finalizeInitialChildren(rootContainerInstance) &&
  4633. (workInProgress.effectTag |= 4);
  4634. null !== workInProgress.ref && (workInProgress.effectTag |= 128);
  4635. }
  4636. return null;
  4637. case 6:
  4638. if (current && null != workInProgress.stateNode)
  4639. updateHostText$1(
  4640. current,
  4641. workInProgress,
  4642. current.memoizedProps,
  4643. newProps
  4644. );
  4645. else {
  4646. if ("string" !== typeof newProps && null === workInProgress.stateNode)
  4647. throw Error(
  4648. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  4649. );
  4650. current = requiredContext(rootInstanceStackCursor.current);
  4651. if (!requiredContext(contextStackCursor$1.current).isInAParentText)
  4652. throw Error(
  4653. "Text strings must be rendered within a <Text> component."
  4654. );
  4655. rootContainerInstance = allocateTag();
  4656. ReactNativePrivateInterface.UIManager.createView(
  4657. rootContainerInstance,
  4658. "RCTRawText",
  4659. current,
  4660. { text: newProps }
  4661. );
  4662. instanceCache.set(rootContainerInstance, workInProgress);
  4663. workInProgress.stateNode = rootContainerInstance;
  4664. }
  4665. return null;
  4666. case 13:
  4667. pop(suspenseStackCursor);
  4668. newProps = workInProgress.memoizedState;
  4669. if (0 !== (workInProgress.effectTag & 64))
  4670. return (
  4671. (workInProgress.expirationTime = renderExpirationTime), workInProgress
  4672. );
  4673. newProps = null !== newProps;
  4674. rootContainerInstance = !1;
  4675. null !== current &&
  4676. ((renderExpirationTime = current.memoizedState),
  4677. (rootContainerInstance = null !== renderExpirationTime),
  4678. newProps ||
  4679. null === renderExpirationTime ||
  4680. ((renderExpirationTime = current.child.sibling),
  4681. null !== renderExpirationTime &&
  4682. ((updatePayload = workInProgress.firstEffect),
  4683. null !== updatePayload
  4684. ? ((workInProgress.firstEffect = renderExpirationTime),
  4685. (renderExpirationTime.nextEffect = updatePayload))
  4686. : ((workInProgress.firstEffect = workInProgress.lastEffect = renderExpirationTime),
  4687. (renderExpirationTime.nextEffect = null)),
  4688. (renderExpirationTime.effectTag = 8))));
  4689. if (newProps && !rootContainerInstance && 0 !== (workInProgress.mode & 2))
  4690. if (
  4691. (null === current &&
  4692. !0 !== workInProgress.memoizedProps.unstable_avoidThisFallback) ||
  4693. 0 !== (suspenseStackCursor.current & 1)
  4694. )
  4695. workInProgressRootExitStatus === RootIncomplete &&
  4696. (workInProgressRootExitStatus = RootSuspended);
  4697. else {
  4698. if (
  4699. workInProgressRootExitStatus === RootIncomplete ||
  4700. workInProgressRootExitStatus === RootSuspended
  4701. )
  4702. workInProgressRootExitStatus = RootSuspendedWithDelay;
  4703. 0 !== workInProgressRootNextUnprocessedUpdateTime &&
  4704. null !== workInProgressRoot &&
  4705. (markRootSuspendedAtTime(
  4706. workInProgressRoot,
  4707. renderExpirationTime$1
  4708. ),
  4709. markRootUpdatedAtTime(
  4710. workInProgressRoot,
  4711. workInProgressRootNextUnprocessedUpdateTime
  4712. ));
  4713. }
  4714. if (newProps || rootContainerInstance) workInProgress.effectTag |= 4;
  4715. return null;
  4716. case 4:
  4717. return popHostContainer(), updateHostContainer(workInProgress), null;
  4718. case 10:
  4719. return popProvider(workInProgress), null;
  4720. case 17:
  4721. return isContextProvider(workInProgress.type) && popContext(), null;
  4722. case 19:
  4723. pop(suspenseStackCursor);
  4724. newProps = workInProgress.memoizedState;
  4725. if (null === newProps) return null;
  4726. rootContainerInstance = 0 !== (workInProgress.effectTag & 64);
  4727. updatePayload = newProps.rendering;
  4728. if (null === updatePayload)
  4729. if (rootContainerInstance) cutOffTailIfNeeded(newProps, !1);
  4730. else {
  4731. if (
  4732. workInProgressRootExitStatus !== RootIncomplete ||
  4733. (null !== current && 0 !== (current.effectTag & 64))
  4734. )
  4735. for (current = workInProgress.child; null !== current; ) {
  4736. updatePayload = findFirstSuspended(current);
  4737. if (null !== updatePayload) {
  4738. workInProgress.effectTag |= 64;
  4739. cutOffTailIfNeeded(newProps, !1);
  4740. current = updatePayload.updateQueue;
  4741. null !== current &&
  4742. ((workInProgress.updateQueue = current),
  4743. (workInProgress.effectTag |= 4));
  4744. null === newProps.lastEffect &&
  4745. (workInProgress.firstEffect = null);
  4746. workInProgress.lastEffect = newProps.lastEffect;
  4747. current = renderExpirationTime;
  4748. for (newProps = workInProgress.child; null !== newProps; )
  4749. (rootContainerInstance = newProps),
  4750. (updatePayload = current),
  4751. (rootContainerInstance.effectTag &= 2),
  4752. (rootContainerInstance.nextEffect = null),
  4753. (rootContainerInstance.firstEffect = null),
  4754. (rootContainerInstance.lastEffect = null),
  4755. (renderExpirationTime = rootContainerInstance.alternate),
  4756. null === renderExpirationTime
  4757. ? ((rootContainerInstance.childExpirationTime = 0),
  4758. (rootContainerInstance.expirationTime = updatePayload),
  4759. (rootContainerInstance.child = null),
  4760. (rootContainerInstance.memoizedProps = null),
  4761. (rootContainerInstance.memoizedState = null),
  4762. (rootContainerInstance.updateQueue = null),
  4763. (rootContainerInstance.dependencies = null),
  4764. (rootContainerInstance.selfBaseDuration = 0),
  4765. (rootContainerInstance.treeBaseDuration = 0))
  4766. : ((rootContainerInstance.childExpirationTime =
  4767. renderExpirationTime.childExpirationTime),
  4768. (rootContainerInstance.expirationTime =
  4769. renderExpirationTime.expirationTime),
  4770. (rootContainerInstance.child =
  4771. renderExpirationTime.child),
  4772. (rootContainerInstance.memoizedProps =
  4773. renderExpirationTime.memoizedProps),
  4774. (rootContainerInstance.memoizedState =
  4775. renderExpirationTime.memoizedState),
  4776. (rootContainerInstance.updateQueue =
  4777. renderExpirationTime.updateQueue),
  4778. (updatePayload = renderExpirationTime.dependencies),
  4779. (rootContainerInstance.dependencies =
  4780. null === updatePayload
  4781. ? null
  4782. : {
  4783. expirationTime: updatePayload.expirationTime,
  4784. firstContext: updatePayload.firstContext,
  4785. responders: updatePayload.responders
  4786. }),
  4787. (rootContainerInstance.selfBaseDuration =
  4788. renderExpirationTime.selfBaseDuration),
  4789. (rootContainerInstance.treeBaseDuration =
  4790. renderExpirationTime.treeBaseDuration)),
  4791. (newProps = newProps.sibling);
  4792. push(
  4793. suspenseStackCursor,
  4794. (suspenseStackCursor.current & 1) | 2
  4795. );
  4796. return workInProgress.child;
  4797. }
  4798. current = current.sibling;
  4799. }
  4800. }
  4801. else {
  4802. if (!rootContainerInstance)
  4803. if (
  4804. ((current = findFirstSuspended(updatePayload)), null !== current)
  4805. ) {
  4806. if (
  4807. ((workInProgress.effectTag |= 64),
  4808. (rootContainerInstance = !0),
  4809. (current = current.updateQueue),
  4810. null !== current &&
  4811. ((workInProgress.updateQueue = current),
  4812. (workInProgress.effectTag |= 4)),
  4813. cutOffTailIfNeeded(newProps, !0),
  4814. null === newProps.tail &&
  4815. "hidden" === newProps.tailMode &&
  4816. !updatePayload.alternate)
  4817. )
  4818. return (
  4819. (workInProgress = workInProgress.lastEffect =
  4820. newProps.lastEffect),
  4821. null !== workInProgress && (workInProgress.nextEffect = null),
  4822. null
  4823. );
  4824. } else
  4825. 2 * now() - newProps.renderingStartTime > newProps.tailExpiration &&
  4826. 1 < renderExpirationTime &&
  4827. ((workInProgress.effectTag |= 64),
  4828. (rootContainerInstance = !0),
  4829. cutOffTailIfNeeded(newProps, !1),
  4830. (current = renderExpirationTime - 1),
  4831. (workInProgress.expirationTime = workInProgress.childExpirationTime = current),
  4832. null === spawnedWorkDuringRender
  4833. ? (spawnedWorkDuringRender = [current])
  4834. : spawnedWorkDuringRender.push(current));
  4835. newProps.isBackwards
  4836. ? ((updatePayload.sibling = workInProgress.child),
  4837. (workInProgress.child = updatePayload))
  4838. : ((current = newProps.last),
  4839. null !== current
  4840. ? (current.sibling = updatePayload)
  4841. : (workInProgress.child = updatePayload),
  4842. (newProps.last = updatePayload));
  4843. }
  4844. return null !== newProps.tail
  4845. ? (0 === newProps.tailExpiration &&
  4846. (newProps.tailExpiration = now() + 500),
  4847. (current = newProps.tail),
  4848. (newProps.rendering = current),
  4849. (newProps.tail = current.sibling),
  4850. (newProps.lastEffect = workInProgress.lastEffect),
  4851. (newProps.renderingStartTime = now()),
  4852. (current.sibling = null),
  4853. (workInProgress = suspenseStackCursor.current),
  4854. push(
  4855. suspenseStackCursor,
  4856. rootContainerInstance
  4857. ? (workInProgress & 1) | 2
  4858. : workInProgress & 1
  4859. ),
  4860. current)
  4861. : null;
  4862. }
  4863. throw Error(
  4864. "Unknown unit of work tag (" +
  4865. workInProgress.tag +
  4866. "). This error is likely caused by a bug in React. Please file an issue."
  4867. );
  4868. }
  4869. function unwindWork(workInProgress) {
  4870. switch (workInProgress.tag) {
  4871. case 1:
  4872. isContextProvider(workInProgress.type) && popContext();
  4873. var effectTag = workInProgress.effectTag;
  4874. return effectTag & 4096
  4875. ? ((workInProgress.effectTag = (effectTag & -4097) | 64),
  4876. workInProgress)
  4877. : null;
  4878. case 3:
  4879. popHostContainer();
  4880. pop(didPerformWorkStackCursor);
  4881. pop(contextStackCursor);
  4882. effectTag = workInProgress.effectTag;
  4883. if (0 !== (effectTag & 64))
  4884. throw Error(
  4885. "The root failed to unmount after an error. This is likely a bug in React. Please file an issue."
  4886. );
  4887. workInProgress.effectTag = (effectTag & -4097) | 64;
  4888. return workInProgress;
  4889. case 5:
  4890. return popHostContext(workInProgress), null;
  4891. case 13:
  4892. return (
  4893. pop(suspenseStackCursor),
  4894. (effectTag = workInProgress.effectTag),
  4895. effectTag & 4096
  4896. ? ((workInProgress.effectTag = (effectTag & -4097) | 64),
  4897. workInProgress)
  4898. : null
  4899. );
  4900. case 19:
  4901. return pop(suspenseStackCursor), null;
  4902. case 4:
  4903. return popHostContainer(), null;
  4904. case 10:
  4905. return popProvider(workInProgress), null;
  4906. default:
  4907. return null;
  4908. }
  4909. }
  4910. function createCapturedValue(value, source) {
  4911. return {
  4912. value: value,
  4913. source: source,
  4914. stack: getStackByFiberInDevAndProd(source)
  4915. };
  4916. }
  4917. if (
  4918. "function" !==
  4919. typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
  4920. )
  4921. throw Error(
  4922. "Expected ReactFiberErrorDialog.showErrorDialog to be a function."
  4923. );
  4924. function logCapturedError(capturedError) {
  4925. !1 !==
  4926. ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog(
  4927. capturedError
  4928. ) && console.error(capturedError.error);
  4929. }
  4930. var PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set;
  4931. function logError(boundary, errorInfo) {
  4932. var source = errorInfo.source,
  4933. stack = errorInfo.stack;
  4934. null === stack &&
  4935. null !== source &&
  4936. (stack = getStackByFiberInDevAndProd(source));
  4937. errorInfo = {
  4938. componentName: null !== source ? getComponentName(source.type) : null,
  4939. componentStack: null !== stack ? stack : "",
  4940. error: errorInfo.value,
  4941. errorBoundary: null,
  4942. errorBoundaryName: null,
  4943. errorBoundaryFound: !1,
  4944. willRetry: !1
  4945. };
  4946. null !== boundary &&
  4947. 1 === boundary.tag &&
  4948. ((errorInfo.errorBoundary = boundary.stateNode),
  4949. (errorInfo.errorBoundaryName = getComponentName(boundary.type)),
  4950. (errorInfo.errorBoundaryFound = !0),
  4951. (errorInfo.willRetry = !0));
  4952. try {
  4953. logCapturedError(errorInfo);
  4954. } catch (e) {
  4955. setTimeout(function() {
  4956. throw e;
  4957. });
  4958. }
  4959. }
  4960. function safelyCallComponentWillUnmount(current, instance) {
  4961. try {
  4962. (instance.props = current.memoizedProps),
  4963. (instance.state = current.memoizedState),
  4964. instance.componentWillUnmount();
  4965. } catch (unmountError) {
  4966. captureCommitPhaseError(current, unmountError);
  4967. }
  4968. }
  4969. function safelyDetachRef(current) {
  4970. var ref = current.ref;
  4971. if (null !== ref)
  4972. if ("function" === typeof ref)
  4973. try {
  4974. ref(null);
  4975. } catch (refError) {
  4976. captureCommitPhaseError(current, refError);
  4977. }
  4978. else ref.current = null;
  4979. }
  4980. function commitBeforeMutationLifeCycles(current, finishedWork) {
  4981. switch (finishedWork.tag) {
  4982. case 0:
  4983. case 11:
  4984. case 15:
  4985. case 22:
  4986. return;
  4987. case 1:
  4988. if (finishedWork.effectTag & 256 && null !== current) {
  4989. var prevProps = current.memoizedProps,
  4990. prevState = current.memoizedState;
  4991. current = finishedWork.stateNode;
  4992. finishedWork = current.getSnapshotBeforeUpdate(
  4993. finishedWork.elementType === finishedWork.type
  4994. ? prevProps
  4995. : resolveDefaultProps(finishedWork.type, prevProps),
  4996. prevState
  4997. );
  4998. current.__reactInternalSnapshotBeforeUpdate = finishedWork;
  4999. }
  5000. return;
  5001. case 3:
  5002. case 5:
  5003. case 6:
  5004. case 4:
  5005. case 17:
  5006. return;
  5007. }
  5008. throw Error(
  5009. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5010. );
  5011. }
  5012. function commitHookEffectListUnmount(tag, finishedWork) {
  5013. finishedWork = finishedWork.updateQueue;
  5014. finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
  5015. if (null !== finishedWork) {
  5016. var effect = (finishedWork = finishedWork.next);
  5017. do {
  5018. if ((effect.tag & tag) === tag) {
  5019. var destroy = effect.destroy;
  5020. effect.destroy = void 0;
  5021. void 0 !== destroy && destroy();
  5022. }
  5023. effect = effect.next;
  5024. } while (effect !== finishedWork);
  5025. }
  5026. }
  5027. function commitHookEffectListMount(tag, finishedWork) {
  5028. finishedWork = finishedWork.updateQueue;
  5029. finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
  5030. if (null !== finishedWork) {
  5031. var effect = (finishedWork = finishedWork.next);
  5032. do {
  5033. if ((effect.tag & tag) === tag) {
  5034. var create = effect.create;
  5035. effect.destroy = create();
  5036. }
  5037. effect = effect.next;
  5038. } while (effect !== finishedWork);
  5039. }
  5040. }
  5041. function commitLifeCycles(finishedRoot, current, finishedWork) {
  5042. switch (finishedWork.tag) {
  5043. case 0:
  5044. case 11:
  5045. case 15:
  5046. case 22:
  5047. commitHookEffectListMount(3, finishedWork);
  5048. return;
  5049. case 1:
  5050. finishedRoot = finishedWork.stateNode;
  5051. if (finishedWork.effectTag & 4)
  5052. if (null === current) finishedRoot.componentDidMount();
  5053. else {
  5054. var prevProps =
  5055. finishedWork.elementType === finishedWork.type
  5056. ? current.memoizedProps
  5057. : resolveDefaultProps(finishedWork.type, current.memoizedProps);
  5058. finishedRoot.componentDidUpdate(
  5059. prevProps,
  5060. current.memoizedState,
  5061. finishedRoot.__reactInternalSnapshotBeforeUpdate
  5062. );
  5063. }
  5064. current = finishedWork.updateQueue;
  5065. null !== current &&
  5066. commitUpdateQueue(finishedWork, current, finishedRoot);
  5067. return;
  5068. case 3:
  5069. current = finishedWork.updateQueue;
  5070. if (null !== current) {
  5071. finishedRoot = null;
  5072. if (null !== finishedWork.child)
  5073. switch (finishedWork.child.tag) {
  5074. case 5:
  5075. finishedRoot = finishedWork.child.stateNode;
  5076. break;
  5077. case 1:
  5078. finishedRoot = finishedWork.child.stateNode;
  5079. }
  5080. commitUpdateQueue(finishedWork, current, finishedRoot);
  5081. }
  5082. return;
  5083. case 5:
  5084. return;
  5085. case 6:
  5086. return;
  5087. case 4:
  5088. return;
  5089. case 12:
  5090. prevProps = finishedWork.memoizedProps.onRender;
  5091. var commitTime$jscomp$0 = commitTime;
  5092. "function" === typeof prevProps &&
  5093. prevProps(
  5094. finishedWork.memoizedProps.id,
  5095. null === current ? "mount" : "update",
  5096. finishedWork.actualDuration,
  5097. finishedWork.treeBaseDuration,
  5098. finishedWork.actualStartTime,
  5099. commitTime$jscomp$0,
  5100. finishedRoot.memoizedInteractions
  5101. );
  5102. return;
  5103. case 13:
  5104. return;
  5105. case 19:
  5106. case 17:
  5107. case 20:
  5108. case 21:
  5109. return;
  5110. }
  5111. throw Error(
  5112. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5113. );
  5114. }
  5115. function commitUnmount(finishedRoot, current$jscomp$0, renderPriorityLevel) {
  5116. "function" === typeof onCommitFiberUnmount &&
  5117. onCommitFiberUnmount(current$jscomp$0);
  5118. switch (current$jscomp$0.tag) {
  5119. case 0:
  5120. case 11:
  5121. case 14:
  5122. case 15:
  5123. case 22:
  5124. finishedRoot = current$jscomp$0.updateQueue;
  5125. if (
  5126. null !== finishedRoot &&
  5127. ((finishedRoot = finishedRoot.lastEffect), null !== finishedRoot)
  5128. ) {
  5129. var firstEffect = finishedRoot.next;
  5130. runWithPriority(
  5131. 97 < renderPriorityLevel ? 97 : renderPriorityLevel,
  5132. function() {
  5133. var effect = firstEffect;
  5134. do {
  5135. var _destroy = effect.destroy;
  5136. if (void 0 !== _destroy) {
  5137. var current = current$jscomp$0;
  5138. try {
  5139. _destroy();
  5140. } catch (error) {
  5141. captureCommitPhaseError(current, error);
  5142. }
  5143. }
  5144. effect = effect.next;
  5145. } while (effect !== firstEffect);
  5146. }
  5147. );
  5148. }
  5149. break;
  5150. case 1:
  5151. safelyDetachRef(current$jscomp$0);
  5152. renderPriorityLevel = current$jscomp$0.stateNode;
  5153. "function" === typeof renderPriorityLevel.componentWillUnmount &&
  5154. safelyCallComponentWillUnmount(current$jscomp$0, renderPriorityLevel);
  5155. break;
  5156. case 5:
  5157. safelyDetachRef(current$jscomp$0);
  5158. break;
  5159. case 4:
  5160. unmountHostComponents(
  5161. finishedRoot,
  5162. current$jscomp$0,
  5163. renderPriorityLevel
  5164. );
  5165. }
  5166. }
  5167. function detachFiber(current) {
  5168. var alternate = current.alternate;
  5169. current.return = null;
  5170. current.child = null;
  5171. current.memoizedState = null;
  5172. current.updateQueue = null;
  5173. current.dependencies = null;
  5174. current.alternate = null;
  5175. current.firstEffect = null;
  5176. current.lastEffect = null;
  5177. current.pendingProps = null;
  5178. current.memoizedProps = null;
  5179. current.stateNode = null;
  5180. null !== alternate && detachFiber(alternate);
  5181. }
  5182. function isHostParent(fiber) {
  5183. return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
  5184. }
  5185. function commitPlacement(finishedWork) {
  5186. a: {
  5187. for (var parent = finishedWork.return; null !== parent; ) {
  5188. if (isHostParent(parent)) {
  5189. var parentFiber = parent;
  5190. break a;
  5191. }
  5192. parent = parent.return;
  5193. }
  5194. throw Error(
  5195. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  5196. );
  5197. }
  5198. parent = parentFiber.stateNode;
  5199. switch (parentFiber.tag) {
  5200. case 5:
  5201. var isContainer = !1;
  5202. break;
  5203. case 3:
  5204. parent = parent.containerInfo;
  5205. isContainer = !0;
  5206. break;
  5207. case 4:
  5208. parent = parent.containerInfo;
  5209. isContainer = !0;
  5210. break;
  5211. default:
  5212. throw Error(
  5213. "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
  5214. );
  5215. }
  5216. parentFiber.effectTag & 16 && (parentFiber.effectTag &= -17);
  5217. a: b: for (parentFiber = finishedWork; ; ) {
  5218. for (; null === parentFiber.sibling; ) {
  5219. if (null === parentFiber.return || isHostParent(parentFiber.return)) {
  5220. parentFiber = null;
  5221. break a;
  5222. }
  5223. parentFiber = parentFiber.return;
  5224. }
  5225. parentFiber.sibling.return = parentFiber.return;
  5226. for (
  5227. parentFiber = parentFiber.sibling;
  5228. 5 !== parentFiber.tag && 6 !== parentFiber.tag && 18 !== parentFiber.tag;
  5229. ) {
  5230. if (parentFiber.effectTag & 2) continue b;
  5231. if (null === parentFiber.child || 4 === parentFiber.tag) continue b;
  5232. else
  5233. (parentFiber.child.return = parentFiber),
  5234. (parentFiber = parentFiber.child);
  5235. }
  5236. if (!(parentFiber.effectTag & 2)) {
  5237. parentFiber = parentFiber.stateNode;
  5238. break a;
  5239. }
  5240. }
  5241. isContainer
  5242. ? insertOrAppendPlacementNodeIntoContainer(
  5243. finishedWork,
  5244. parentFiber,
  5245. parent
  5246. )
  5247. : insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
  5248. }
  5249. function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  5250. var tag = node.tag,
  5251. isHost = 5 === tag || 6 === tag;
  5252. if (isHost)
  5253. if (((node = isHost ? node.stateNode : node.stateNode.instance), before)) {
  5254. if ("number" === typeof parent)
  5255. throw Error("Container does not support insertBefore operation");
  5256. } else
  5257. ReactNativePrivateInterface.UIManager.setChildren(parent, [
  5258. "number" === typeof node ? node : node._nativeTag
  5259. ]);
  5260. else if (4 !== tag && ((node = node.child), null !== node))
  5261. for (
  5262. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  5263. node = node.sibling;
  5264. null !== node;
  5265. )
  5266. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  5267. (node = node.sibling);
  5268. }
  5269. function insertOrAppendPlacementNode(node, before, parent) {
  5270. var tag = node.tag,
  5271. isHost = 5 === tag || 6 === tag;
  5272. if (isHost)
  5273. (node = isHost ? node.stateNode : node.stateNode.instance),
  5274. before
  5275. ? ((tag = parent._children),
  5276. (isHost = tag.indexOf(node)),
  5277. 0 <= isHost
  5278. ? (tag.splice(isHost, 1),
  5279. (before = tag.indexOf(before)),
  5280. tag.splice(before, 0, node),
  5281. ReactNativePrivateInterface.UIManager.manageChildren(
  5282. parent._nativeTag,
  5283. [isHost],
  5284. [before],
  5285. [],
  5286. [],
  5287. []
  5288. ))
  5289. : ((before = tag.indexOf(before)),
  5290. tag.splice(before, 0, node),
  5291. ReactNativePrivateInterface.UIManager.manageChildren(
  5292. parent._nativeTag,
  5293. [],
  5294. [],
  5295. ["number" === typeof node ? node : node._nativeTag],
  5296. [before],
  5297. []
  5298. )))
  5299. : ((before = "number" === typeof node ? node : node._nativeTag),
  5300. (tag = parent._children),
  5301. (isHost = tag.indexOf(node)),
  5302. 0 <= isHost
  5303. ? (tag.splice(isHost, 1),
  5304. tag.push(node),
  5305. ReactNativePrivateInterface.UIManager.manageChildren(
  5306. parent._nativeTag,
  5307. [isHost],
  5308. [tag.length - 1],
  5309. [],
  5310. [],
  5311. []
  5312. ))
  5313. : (tag.push(node),
  5314. ReactNativePrivateInterface.UIManager.manageChildren(
  5315. parent._nativeTag,
  5316. [],
  5317. [],
  5318. [before],
  5319. [tag.length - 1],
  5320. []
  5321. )));
  5322. else if (4 !== tag && ((node = node.child), null !== node))
  5323. for (
  5324. insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
  5325. null !== node;
  5326. )
  5327. insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);
  5328. }
  5329. function unmountHostComponents(
  5330. finishedRoot$jscomp$0,
  5331. current,
  5332. renderPriorityLevel$jscomp$0
  5333. ) {
  5334. for (
  5335. var node = current,
  5336. currentParentIsValid = !1,
  5337. currentParent,
  5338. currentParentIsContainer;
  5339. ;
  5340. ) {
  5341. if (!currentParentIsValid) {
  5342. currentParentIsValid = node.return;
  5343. a: for (;;) {
  5344. if (null === currentParentIsValid)
  5345. throw Error(
  5346. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  5347. );
  5348. currentParent = currentParentIsValid.stateNode;
  5349. switch (currentParentIsValid.tag) {
  5350. case 5:
  5351. currentParentIsContainer = !1;
  5352. break a;
  5353. case 3:
  5354. currentParent = currentParent.containerInfo;
  5355. currentParentIsContainer = !0;
  5356. break a;
  5357. case 4:
  5358. currentParent = currentParent.containerInfo;
  5359. currentParentIsContainer = !0;
  5360. break a;
  5361. }
  5362. currentParentIsValid = currentParentIsValid.return;
  5363. }
  5364. currentParentIsValid = !0;
  5365. }
  5366. if (5 === node.tag || 6 === node.tag) {
  5367. a: for (
  5368. var finishedRoot = finishedRoot$jscomp$0,
  5369. root = node,
  5370. renderPriorityLevel = renderPriorityLevel$jscomp$0,
  5371. node$jscomp$0 = root;
  5372. ;
  5373. )
  5374. if (
  5375. (commitUnmount(finishedRoot, node$jscomp$0, renderPriorityLevel),
  5376. null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
  5377. )
  5378. (node$jscomp$0.child.return = node$jscomp$0),
  5379. (node$jscomp$0 = node$jscomp$0.child);
  5380. else {
  5381. if (node$jscomp$0 === root) break a;
  5382. for (; null === node$jscomp$0.sibling; ) {
  5383. if (null === node$jscomp$0.return || node$jscomp$0.return === root)
  5384. break a;
  5385. node$jscomp$0 = node$jscomp$0.return;
  5386. }
  5387. node$jscomp$0.sibling.return = node$jscomp$0.return;
  5388. node$jscomp$0 = node$jscomp$0.sibling;
  5389. }
  5390. currentParentIsContainer
  5391. ? ((finishedRoot = currentParent),
  5392. recursivelyUncacheFiberNode(node.stateNode),
  5393. ReactNativePrivateInterface.UIManager.manageChildren(
  5394. finishedRoot,
  5395. [],
  5396. [],
  5397. [],
  5398. [],
  5399. [0]
  5400. ))
  5401. : ((finishedRoot = currentParent),
  5402. (renderPriorityLevel = node.stateNode),
  5403. recursivelyUncacheFiberNode(renderPriorityLevel),
  5404. (root = finishedRoot._children),
  5405. (renderPriorityLevel = root.indexOf(renderPriorityLevel)),
  5406. root.splice(renderPriorityLevel, 1),
  5407. ReactNativePrivateInterface.UIManager.manageChildren(
  5408. finishedRoot._nativeTag,
  5409. [],
  5410. [],
  5411. [],
  5412. [],
  5413. [renderPriorityLevel]
  5414. ));
  5415. } else if (4 === node.tag) {
  5416. if (null !== node.child) {
  5417. currentParent = node.stateNode.containerInfo;
  5418. currentParentIsContainer = !0;
  5419. node.child.return = node;
  5420. node = node.child;
  5421. continue;
  5422. }
  5423. } else if (
  5424. (commitUnmount(finishedRoot$jscomp$0, node, renderPriorityLevel$jscomp$0),
  5425. null !== node.child)
  5426. ) {
  5427. node.child.return = node;
  5428. node = node.child;
  5429. continue;
  5430. }
  5431. if (node === current) break;
  5432. for (; null === node.sibling; ) {
  5433. if (null === node.return || node.return === current) return;
  5434. node = node.return;
  5435. 4 === node.tag && (currentParentIsValid = !1);
  5436. }
  5437. node.sibling.return = node.return;
  5438. node = node.sibling;
  5439. }
  5440. }
  5441. function commitWork(current, finishedWork) {
  5442. switch (finishedWork.tag) {
  5443. case 0:
  5444. case 11:
  5445. case 14:
  5446. case 15:
  5447. case 22:
  5448. commitHookEffectListUnmount(3, finishedWork);
  5449. return;
  5450. case 1:
  5451. return;
  5452. case 5:
  5453. var instance = finishedWork.stateNode;
  5454. if (null != instance) {
  5455. var newProps = finishedWork.memoizedProps;
  5456. current = null !== current ? current.memoizedProps : newProps;
  5457. var updatePayload = finishedWork.updateQueue;
  5458. finishedWork.updateQueue = null;
  5459. null !== updatePayload &&
  5460. ((finishedWork = instance.viewConfig),
  5461. instanceProps.set(instance._nativeTag, newProps),
  5462. (newProps = diffProperties(
  5463. null,
  5464. current,
  5465. newProps,
  5466. finishedWork.validAttributes
  5467. )),
  5468. null != newProps &&
  5469. ReactNativePrivateInterface.UIManager.updateView(
  5470. instance._nativeTag,
  5471. finishedWork.uiViewClassName,
  5472. newProps
  5473. ));
  5474. }
  5475. return;
  5476. case 6:
  5477. if (null === finishedWork.stateNode)
  5478. throw Error(
  5479. "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
  5480. );
  5481. ReactNativePrivateInterface.UIManager.updateView(
  5482. finishedWork.stateNode,
  5483. "RCTRawText",
  5484. { text: finishedWork.memoizedProps }
  5485. );
  5486. return;
  5487. case 3:
  5488. return;
  5489. case 12:
  5490. return;
  5491. case 13:
  5492. instance = finishedWork;
  5493. null === finishedWork.memoizedState
  5494. ? (newProps = !1)
  5495. : ((newProps = !0),
  5496. (instance = finishedWork.child),
  5497. (globalMostRecentFallbackTime = now()));
  5498. if (null !== instance)
  5499. a: for (current = instance; ; ) {
  5500. if (5 === current.tag)
  5501. if (((updatePayload = current.stateNode), newProps)) {
  5502. var viewConfig = updatePayload.viewConfig;
  5503. var updatePayload$jscomp$0 = diffProperties(
  5504. null,
  5505. emptyObject,
  5506. { style: { display: "none" } },
  5507. viewConfig.validAttributes
  5508. );
  5509. ReactNativePrivateInterface.UIManager.updateView(
  5510. updatePayload._nativeTag,
  5511. viewConfig.uiViewClassName,
  5512. updatePayload$jscomp$0
  5513. );
  5514. } else {
  5515. updatePayload = current.stateNode;
  5516. updatePayload$jscomp$0 = current.memoizedProps;
  5517. viewConfig = updatePayload.viewConfig;
  5518. var prevProps = Object.assign({}, updatePayload$jscomp$0, {
  5519. style: [updatePayload$jscomp$0.style, { display: "none" }]
  5520. });
  5521. updatePayload$jscomp$0 = diffProperties(
  5522. null,
  5523. prevProps,
  5524. updatePayload$jscomp$0,
  5525. viewConfig.validAttributes
  5526. );
  5527. ReactNativePrivateInterface.UIManager.updateView(
  5528. updatePayload._nativeTag,
  5529. viewConfig.uiViewClassName,
  5530. updatePayload$jscomp$0
  5531. );
  5532. }
  5533. else {
  5534. if (6 === current.tag) throw Error("Not yet implemented.");
  5535. if (
  5536. 13 === current.tag &&
  5537. null !== current.memoizedState &&
  5538. null === current.memoizedState.dehydrated
  5539. ) {
  5540. updatePayload = current.child.sibling;
  5541. updatePayload.return = current;
  5542. current = updatePayload;
  5543. continue;
  5544. } else if (null !== current.child) {
  5545. current.child.return = current;
  5546. current = current.child;
  5547. continue;
  5548. }
  5549. }
  5550. if (current === instance) break;
  5551. for (; null === current.sibling; ) {
  5552. if (null === current.return || current.return === instance) break a;
  5553. current = current.return;
  5554. }
  5555. current.sibling.return = current.return;
  5556. current = current.sibling;
  5557. }
  5558. attachSuspenseRetryListeners(finishedWork);
  5559. return;
  5560. case 19:
  5561. attachSuspenseRetryListeners(finishedWork);
  5562. return;
  5563. case 17:
  5564. return;
  5565. }
  5566. throw Error(
  5567. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5568. );
  5569. }
  5570. function attachSuspenseRetryListeners(finishedWork) {
  5571. var thenables = finishedWork.updateQueue;
  5572. if (null !== thenables) {
  5573. finishedWork.updateQueue = null;
  5574. var retryCache = finishedWork.stateNode;
  5575. null === retryCache &&
  5576. (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
  5577. thenables.forEach(function(thenable) {
  5578. var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
  5579. retryCache.has(thenable) ||
  5580. (!0 !== thenable.__reactDoNotTraceInteractions &&
  5581. (retry = tracing.unstable_wrap(retry)),
  5582. retryCache.add(thenable),
  5583. thenable.then(retry, retry));
  5584. });
  5585. }
  5586. }
  5587. var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map;
  5588. function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
  5589. expirationTime = createUpdate(expirationTime, null);
  5590. expirationTime.tag = 3;
  5591. expirationTime.payload = { element: null };
  5592. var error = errorInfo.value;
  5593. expirationTime.callback = function() {
  5594. hasUncaughtError || ((hasUncaughtError = !0), (firstUncaughtError = error));
  5595. logError(fiber, errorInfo);
  5596. };
  5597. return expirationTime;
  5598. }
  5599. function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
  5600. expirationTime = createUpdate(expirationTime, null);
  5601. expirationTime.tag = 3;
  5602. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  5603. if ("function" === typeof getDerivedStateFromError) {
  5604. var error = errorInfo.value;
  5605. expirationTime.payload = function() {
  5606. logError(fiber, errorInfo);
  5607. return getDerivedStateFromError(error);
  5608. };
  5609. }
  5610. var inst = fiber.stateNode;
  5611. null !== inst &&
  5612. "function" === typeof inst.componentDidCatch &&
  5613. (expirationTime.callback = function() {
  5614. "function" !== typeof getDerivedStateFromError &&
  5615. (null === legacyErrorBoundariesThatAlreadyFailed
  5616. ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
  5617. : legacyErrorBoundariesThatAlreadyFailed.add(this),
  5618. logError(fiber, errorInfo));
  5619. var stack = errorInfo.stack;
  5620. this.componentDidCatch(errorInfo.value, {
  5621. componentStack: null !== stack ? stack : ""
  5622. });
  5623. });
  5624. return expirationTime;
  5625. }
  5626. var ceil = Math.ceil,
  5627. ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
  5628. ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
  5629. NoContext = 0,
  5630. LegacyUnbatchedContext = 8,
  5631. RenderContext = 16,
  5632. CommitContext = 32,
  5633. RootIncomplete = 0,
  5634. RootFatalErrored = 1,
  5635. RootErrored = 2,
  5636. RootSuspended = 3,
  5637. RootSuspendedWithDelay = 4,
  5638. RootCompleted = 5,
  5639. executionContext = NoContext,
  5640. workInProgressRoot = null,
  5641. workInProgress = null,
  5642. renderExpirationTime$1 = 0,
  5643. workInProgressRootExitStatus = RootIncomplete,
  5644. workInProgressRootFatalError = null,
  5645. workInProgressRootLatestProcessedExpirationTime = 1073741823,
  5646. workInProgressRootLatestSuspenseTimeout = 1073741823,
  5647. workInProgressRootCanSuspendUsingConfig = null,
  5648. workInProgressRootNextUnprocessedUpdateTime = 0,
  5649. workInProgressRootHasPendingPing = !1,
  5650. globalMostRecentFallbackTime = 0,
  5651. FALLBACK_THROTTLE_MS = 500,
  5652. nextEffect = null,
  5653. hasUncaughtError = !1,
  5654. firstUncaughtError = null,
  5655. legacyErrorBoundariesThatAlreadyFailed = null,
  5656. rootDoesHavePassiveEffects = !1,
  5657. rootWithPendingPassiveEffects = null,
  5658. pendingPassiveEffectsRenderPriority = 90,
  5659. pendingPassiveEffectsExpirationTime = 0,
  5660. rootsWithPendingDiscreteUpdates = null,
  5661. nestedUpdateCount = 0,
  5662. rootWithNestedUpdates = null,
  5663. spawnedWorkDuringRender = null,
  5664. currentEventTime = 0;
  5665. function requestCurrentTimeForUpdate() {
  5666. return (executionContext & (RenderContext | CommitContext)) !== NoContext
  5667. ? 1073741821 - ((now() / 10) | 0)
  5668. : 0 !== currentEventTime
  5669. ? currentEventTime
  5670. : (currentEventTime = 1073741821 - ((now() / 10) | 0));
  5671. }
  5672. function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
  5673. fiber = fiber.mode;
  5674. if (0 === (fiber & 2)) return 1073741823;
  5675. var priorityLevel = getCurrentPriorityLevel();
  5676. if (0 === (fiber & 4)) return 99 === priorityLevel ? 1073741823 : 1073741822;
  5677. if ((executionContext & RenderContext) !== NoContext)
  5678. return renderExpirationTime$1;
  5679. if (null !== suspenseConfig)
  5680. currentTime =
  5681. 1073741821 -
  5682. 25 *
  5683. ((((1073741821 -
  5684. currentTime +
  5685. (suspenseConfig.timeoutMs | 0 || 5e3) / 10) /
  5686. 25) |
  5687. 0) +
  5688. 1);
  5689. else
  5690. switch (priorityLevel) {
  5691. case 99:
  5692. currentTime = 1073741823;
  5693. break;
  5694. case 98:
  5695. currentTime =
  5696. 1073741821 - 10 * ((((1073741821 - currentTime + 15) / 10) | 0) + 1);
  5697. break;
  5698. case 97:
  5699. case 96:
  5700. currentTime =
  5701. 1073741821 - 25 * ((((1073741821 - currentTime + 500) / 25) | 0) + 1);
  5702. break;
  5703. case 95:
  5704. currentTime = 2;
  5705. break;
  5706. default:
  5707. throw Error("Expected a valid priority level");
  5708. }
  5709. null !== workInProgressRoot &&
  5710. currentTime === renderExpirationTime$1 &&
  5711. --currentTime;
  5712. return currentTime;
  5713. }
  5714. function scheduleWork(fiber, expirationTime) {
  5715. if (50 < nestedUpdateCount)
  5716. throw ((nestedUpdateCount = 0),
  5717. (rootWithNestedUpdates = null),
  5718. Error(
  5719. "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."
  5720. ));
  5721. fiber = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
  5722. if (null !== fiber) {
  5723. var priorityLevel = getCurrentPriorityLevel();
  5724. 1073741823 === expirationTime
  5725. ? (executionContext & LegacyUnbatchedContext) !== NoContext &&
  5726. (executionContext & (RenderContext | CommitContext)) === NoContext
  5727. ? (schedulePendingInteractions(fiber, expirationTime),
  5728. performSyncWorkOnRoot(fiber))
  5729. : (ensureRootIsScheduled(fiber),
  5730. schedulePendingInteractions(fiber, expirationTime),
  5731. executionContext === NoContext && flushSyncCallbackQueue())
  5732. : (ensureRootIsScheduled(fiber),
  5733. schedulePendingInteractions(fiber, expirationTime));
  5734. (executionContext & 4) === NoContext ||
  5735. (98 !== priorityLevel && 99 !== priorityLevel) ||
  5736. (null === rootsWithPendingDiscreteUpdates
  5737. ? (rootsWithPendingDiscreteUpdates = new Map([[fiber, expirationTime]]))
  5738. : ((priorityLevel = rootsWithPendingDiscreteUpdates.get(fiber)),
  5739. (void 0 === priorityLevel || priorityLevel > expirationTime) &&
  5740. rootsWithPendingDiscreteUpdates.set(fiber, expirationTime)));
  5741. }
  5742. }
  5743. function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
  5744. fiber.expirationTime < expirationTime &&
  5745. (fiber.expirationTime = expirationTime);
  5746. var alternate = fiber.alternate;
  5747. null !== alternate &&
  5748. alternate.expirationTime < expirationTime &&
  5749. (alternate.expirationTime = expirationTime);
  5750. var node = fiber.return,
  5751. root = null;
  5752. if (null === node && 3 === fiber.tag) root = fiber.stateNode;
  5753. else
  5754. for (; null !== node; ) {
  5755. alternate = node.alternate;
  5756. node.childExpirationTime < expirationTime &&
  5757. (node.childExpirationTime = expirationTime);
  5758. null !== alternate &&
  5759. alternate.childExpirationTime < expirationTime &&
  5760. (alternate.childExpirationTime = expirationTime);
  5761. if (null === node.return && 3 === node.tag) {
  5762. root = node.stateNode;
  5763. break;
  5764. }
  5765. node = node.return;
  5766. }
  5767. null !== root &&
  5768. (workInProgressRoot === root &&
  5769. (markUnprocessedUpdateTime(expirationTime),
  5770. workInProgressRootExitStatus === RootSuspendedWithDelay &&
  5771. markRootSuspendedAtTime(root, renderExpirationTime$1)),
  5772. markRootUpdatedAtTime(root, expirationTime));
  5773. return root;
  5774. }
  5775. function getNextRootExpirationTimeToWorkOn(root) {
  5776. var lastExpiredTime = root.lastExpiredTime;
  5777. if (0 !== lastExpiredTime) return lastExpiredTime;
  5778. lastExpiredTime = root.firstPendingTime;
  5779. if (!isRootSuspendedAtTime(root, lastExpiredTime)) return lastExpiredTime;
  5780. var lastPingedTime = root.lastPingedTime;
  5781. root = root.nextKnownPendingLevel;
  5782. root = lastPingedTime > root ? lastPingedTime : root;
  5783. return 2 >= root && lastExpiredTime !== root ? 0 : root;
  5784. }
  5785. function ensureRootIsScheduled(root) {
  5786. if (0 !== root.lastExpiredTime)
  5787. (root.callbackExpirationTime = 1073741823),
  5788. (root.callbackPriority = 99),
  5789. (root.callbackNode = scheduleSyncCallback(
  5790. performSyncWorkOnRoot.bind(null, root)
  5791. ));
  5792. else {
  5793. var expirationTime = getNextRootExpirationTimeToWorkOn(root),
  5794. existingCallbackNode = root.callbackNode;
  5795. if (0 === expirationTime)
  5796. null !== existingCallbackNode &&
  5797. ((root.callbackNode = null),
  5798. (root.callbackExpirationTime = 0),
  5799. (root.callbackPriority = 90));
  5800. else {
  5801. var currentTime = requestCurrentTimeForUpdate();
  5802. currentTime = inferPriorityFromExpirationTime(
  5803. currentTime,
  5804. expirationTime
  5805. );
  5806. if (null !== existingCallbackNode) {
  5807. var existingCallbackPriority = root.callbackPriority;
  5808. if (
  5809. root.callbackExpirationTime === expirationTime &&
  5810. existingCallbackPriority >= currentTime
  5811. )
  5812. return;
  5813. existingCallbackNode !== fakeCallbackNode &&
  5814. Scheduler_cancelCallback(existingCallbackNode);
  5815. }
  5816. root.callbackExpirationTime = expirationTime;
  5817. root.callbackPriority = currentTime;
  5818. expirationTime =
  5819. 1073741823 === expirationTime
  5820. ? scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root))
  5821. : scheduleCallback(
  5822. currentTime,
  5823. performConcurrentWorkOnRoot.bind(null, root),
  5824. { timeout: 10 * (1073741821 - expirationTime) - now() }
  5825. );
  5826. root.callbackNode = expirationTime;
  5827. }
  5828. }
  5829. }
  5830. function performConcurrentWorkOnRoot(root, didTimeout) {
  5831. currentEventTime = 0;
  5832. if (didTimeout) {
  5833. didTimeout = requestCurrentTimeForUpdate();
  5834. var lastExpiredTime = root.lastExpiredTime;
  5835. if (0 === lastExpiredTime || lastExpiredTime > didTimeout)
  5836. root.lastExpiredTime = didTimeout;
  5837. ensureRootIsScheduled(root);
  5838. return null;
  5839. }
  5840. lastExpiredTime = getNextRootExpirationTimeToWorkOn(root);
  5841. if (0 === lastExpiredTime) return null;
  5842. didTimeout = root.callbackNode;
  5843. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  5844. throw Error("Should not already be working.");
  5845. flushPassiveEffects();
  5846. var expirationTime = lastExpiredTime,
  5847. prevExecutionContext = executionContext;
  5848. executionContext |= RenderContext;
  5849. var exitStatus = pushDispatcher();
  5850. if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1)
  5851. prepareFreshStack(root, expirationTime),
  5852. startWorkOnPendingInteractions(root, expirationTime);
  5853. expirationTime = pushInteractions(root);
  5854. do
  5855. try {
  5856. workLoopConcurrent();
  5857. break;
  5858. } catch (thrownValue) {
  5859. handleError(root, thrownValue);
  5860. }
  5861. while (1);
  5862. resetContextDependencies();
  5863. tracing.__interactionsRef.current = expirationTime;
  5864. ReactCurrentDispatcher$1.current = exitStatus;
  5865. executionContext = prevExecutionContext;
  5866. null !== workInProgress
  5867. ? (exitStatus = RootIncomplete)
  5868. : ((workInProgressRoot = null),
  5869. (exitStatus = workInProgressRootExitStatus));
  5870. if (exitStatus !== RootIncomplete) {
  5871. exitStatus === RootErrored &&
  5872. ((lastExpiredTime = 2 < lastExpiredTime ? 2 : lastExpiredTime),
  5873. (exitStatus = renderRootSync(root, lastExpiredTime)));
  5874. if (exitStatus === RootFatalErrored)
  5875. throw ((didTimeout = workInProgressRootFatalError),
  5876. prepareFreshStack(root, lastExpiredTime),
  5877. markRootSuspendedAtTime(root, lastExpiredTime),
  5878. ensureRootIsScheduled(root),
  5879. didTimeout);
  5880. prevExecutionContext = root.finishedWork = root.current.alternate;
  5881. root.finishedExpirationTime = lastExpiredTime;
  5882. switch (exitStatus) {
  5883. case RootIncomplete:
  5884. case RootFatalErrored:
  5885. throw Error("Root did not complete. This is a bug in React.");
  5886. case RootErrored:
  5887. commitRoot(root);
  5888. break;
  5889. case RootSuspended:
  5890. markRootSuspendedAtTime(root, lastExpiredTime);
  5891. exitStatus = root.lastSuspendedTime;
  5892. lastExpiredTime === exitStatus &&
  5893. (root.nextKnownPendingLevel = getRemainingExpirationTime(
  5894. prevExecutionContext
  5895. ));
  5896. if (
  5897. 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
  5898. ((prevExecutionContext =
  5899. globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now()),
  5900. 10 < prevExecutionContext)
  5901. ) {
  5902. if (
  5903. workInProgressRootHasPendingPing &&
  5904. ((expirationTime = root.lastPingedTime),
  5905. 0 === expirationTime || expirationTime >= lastExpiredTime)
  5906. ) {
  5907. root.lastPingedTime = lastExpiredTime;
  5908. prepareFreshStack(root, lastExpiredTime);
  5909. break;
  5910. }
  5911. expirationTime = getNextRootExpirationTimeToWorkOn(root);
  5912. if (0 !== expirationTime && expirationTime !== lastExpiredTime) break;
  5913. if (0 !== exitStatus && exitStatus !== lastExpiredTime) {
  5914. root.lastPingedTime = exitStatus;
  5915. break;
  5916. }
  5917. root.timeoutHandle = scheduleTimeout(
  5918. commitRoot.bind(null, root),
  5919. prevExecutionContext
  5920. );
  5921. break;
  5922. }
  5923. commitRoot(root);
  5924. break;
  5925. case RootSuspendedWithDelay:
  5926. markRootSuspendedAtTime(root, lastExpiredTime);
  5927. exitStatus = root.lastSuspendedTime;
  5928. lastExpiredTime === exitStatus &&
  5929. (root.nextKnownPendingLevel = getRemainingExpirationTime(
  5930. prevExecutionContext
  5931. ));
  5932. if (
  5933. workInProgressRootHasPendingPing &&
  5934. ((prevExecutionContext = root.lastPingedTime),
  5935. 0 === prevExecutionContext || prevExecutionContext >= lastExpiredTime)
  5936. ) {
  5937. root.lastPingedTime = lastExpiredTime;
  5938. prepareFreshStack(root, lastExpiredTime);
  5939. break;
  5940. }
  5941. prevExecutionContext = getNextRootExpirationTimeToWorkOn(root);
  5942. if (
  5943. 0 !== prevExecutionContext &&
  5944. prevExecutionContext !== lastExpiredTime
  5945. )
  5946. break;
  5947. if (0 !== exitStatus && exitStatus !== lastExpiredTime) {
  5948. root.lastPingedTime = exitStatus;
  5949. break;
  5950. }
  5951. 1073741823 !== workInProgressRootLatestSuspenseTimeout
  5952. ? (prevExecutionContext =
  5953. 10 * (1073741821 - workInProgressRootLatestSuspenseTimeout) -
  5954. now())
  5955. : 1073741823 === workInProgressRootLatestProcessedExpirationTime
  5956. ? (prevExecutionContext = 0)
  5957. : ((prevExecutionContext =
  5958. 10 *
  5959. (1073741821 - workInProgressRootLatestProcessedExpirationTime) -
  5960. 5e3),
  5961. (exitStatus = now()),
  5962. (lastExpiredTime =
  5963. 10 * (1073741821 - lastExpiredTime) - exitStatus),
  5964. (prevExecutionContext = exitStatus - prevExecutionContext),
  5965. 0 > prevExecutionContext && (prevExecutionContext = 0),
  5966. (prevExecutionContext =
  5967. (120 > prevExecutionContext
  5968. ? 120
  5969. : 480 > prevExecutionContext
  5970. ? 480
  5971. : 1080 > prevExecutionContext
  5972. ? 1080
  5973. : 1920 > prevExecutionContext
  5974. ? 1920
  5975. : 3e3 > prevExecutionContext
  5976. ? 3e3
  5977. : 4320 > prevExecutionContext
  5978. ? 4320
  5979. : 1960 * ceil(prevExecutionContext / 1960)) -
  5980. prevExecutionContext),
  5981. lastExpiredTime < prevExecutionContext &&
  5982. (prevExecutionContext = lastExpiredTime));
  5983. if (10 < prevExecutionContext) {
  5984. root.timeoutHandle = scheduleTimeout(
  5985. commitRoot.bind(null, root),
  5986. prevExecutionContext
  5987. );
  5988. break;
  5989. }
  5990. commitRoot(root);
  5991. break;
  5992. case RootCompleted:
  5993. if (
  5994. 1073741823 !== workInProgressRootLatestProcessedExpirationTime &&
  5995. null !== workInProgressRootCanSuspendUsingConfig
  5996. ) {
  5997. expirationTime = workInProgressRootLatestProcessedExpirationTime;
  5998. var suspenseConfig = workInProgressRootCanSuspendUsingConfig;
  5999. prevExecutionContext = suspenseConfig.busyMinDurationMs | 0;
  6000. 0 >= prevExecutionContext
  6001. ? (prevExecutionContext = 0)
  6002. : ((exitStatus = suspenseConfig.busyDelayMs | 0),
  6003. (expirationTime =
  6004. now() -
  6005. (10 * (1073741821 - expirationTime) -
  6006. (suspenseConfig.timeoutMs | 0 || 5e3))),
  6007. (prevExecutionContext =
  6008. expirationTime <= exitStatus
  6009. ? 0
  6010. : exitStatus + prevExecutionContext - expirationTime));
  6011. if (10 < prevExecutionContext) {
  6012. markRootSuspendedAtTime(root, lastExpiredTime);
  6013. root.timeoutHandle = scheduleTimeout(
  6014. commitRoot.bind(null, root),
  6015. prevExecutionContext
  6016. );
  6017. break;
  6018. }
  6019. }
  6020. commitRoot(root);
  6021. break;
  6022. default:
  6023. throw Error("Unknown root exit status.");
  6024. }
  6025. }
  6026. ensureRootIsScheduled(root);
  6027. return root.callbackNode === didTimeout
  6028. ? performConcurrentWorkOnRoot.bind(null, root)
  6029. : null;
  6030. }
  6031. function performSyncWorkOnRoot(root) {
  6032. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6033. throw Error("Should not already be working.");
  6034. flushPassiveEffects();
  6035. var lastExpiredTime = root.lastExpiredTime;
  6036. lastExpiredTime =
  6037. 0 !== lastExpiredTime
  6038. ? root === workInProgressRoot && renderExpirationTime$1 >= lastExpiredTime
  6039. ? renderExpirationTime$1
  6040. : lastExpiredTime
  6041. : 1073741823;
  6042. var exitStatus = renderRootSync(root, lastExpiredTime);
  6043. 0 !== root.tag &&
  6044. exitStatus === RootErrored &&
  6045. ((lastExpiredTime = 2 < lastExpiredTime ? 2 : lastExpiredTime),
  6046. (exitStatus = renderRootSync(root, lastExpiredTime)));
  6047. if (exitStatus === RootFatalErrored)
  6048. throw ((exitStatus = workInProgressRootFatalError),
  6049. prepareFreshStack(root, lastExpiredTime),
  6050. markRootSuspendedAtTime(root, lastExpiredTime),
  6051. ensureRootIsScheduled(root),
  6052. exitStatus);
  6053. root.finishedWork = root.current.alternate;
  6054. root.finishedExpirationTime = lastExpiredTime;
  6055. commitRoot(root);
  6056. ensureRootIsScheduled(root);
  6057. return null;
  6058. }
  6059. function prepareFreshStack(root, expirationTime) {
  6060. root.finishedWork = null;
  6061. root.finishedExpirationTime = 0;
  6062. var timeoutHandle = root.timeoutHandle;
  6063. -1 !== timeoutHandle &&
  6064. ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
  6065. if (null !== workInProgress)
  6066. for (timeoutHandle = workInProgress.return; null !== timeoutHandle; ) {
  6067. var interruptedWork = timeoutHandle;
  6068. switch (interruptedWork.tag) {
  6069. case 1:
  6070. interruptedWork = interruptedWork.type.childContextTypes;
  6071. null !== interruptedWork &&
  6072. void 0 !== interruptedWork &&
  6073. popContext();
  6074. break;
  6075. case 3:
  6076. popHostContainer();
  6077. pop(didPerformWorkStackCursor);
  6078. pop(contextStackCursor);
  6079. break;
  6080. case 5:
  6081. popHostContext(interruptedWork);
  6082. break;
  6083. case 4:
  6084. popHostContainer();
  6085. break;
  6086. case 13:
  6087. pop(suspenseStackCursor);
  6088. break;
  6089. case 19:
  6090. pop(suspenseStackCursor);
  6091. break;
  6092. case 10:
  6093. popProvider(interruptedWork);
  6094. }
  6095. timeoutHandle = timeoutHandle.return;
  6096. }
  6097. workInProgressRoot = root;
  6098. workInProgress = createWorkInProgress(root.current, null);
  6099. renderExpirationTime$1 = expirationTime;
  6100. workInProgressRootExitStatus = RootIncomplete;
  6101. workInProgressRootFatalError = null;
  6102. workInProgressRootLatestSuspenseTimeout = workInProgressRootLatestProcessedExpirationTime = 1073741823;
  6103. workInProgressRootCanSuspendUsingConfig = null;
  6104. workInProgressRootNextUnprocessedUpdateTime = 0;
  6105. workInProgressRootHasPendingPing = !1;
  6106. spawnedWorkDuringRender = null;
  6107. }
  6108. function handleError(root$jscomp$0, thrownValue) {
  6109. do {
  6110. try {
  6111. resetContextDependencies();
  6112. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  6113. if (didScheduleRenderPhaseUpdate)
  6114. for (
  6115. var hook = currentlyRenderingFiber$1.memoizedState;
  6116. null !== hook;
  6117. ) {
  6118. var queue = hook.queue;
  6119. null !== queue && (queue.pending = null);
  6120. hook = hook.next;
  6121. }
  6122. renderExpirationTime = 0;
  6123. workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
  6124. didScheduleRenderPhaseUpdate = !1;
  6125. if (null === workInProgress || null === workInProgress.return)
  6126. return (
  6127. (workInProgressRootExitStatus = RootFatalErrored),
  6128. (workInProgressRootFatalError = thrownValue),
  6129. (workInProgress = null)
  6130. );
  6131. workInProgress.mode & 8 &&
  6132. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
  6133. a: {
  6134. var root = root$jscomp$0,
  6135. returnFiber = workInProgress.return,
  6136. sourceFiber = workInProgress,
  6137. value = thrownValue;
  6138. thrownValue = renderExpirationTime$1;
  6139. sourceFiber.effectTag |= 2048;
  6140. sourceFiber.firstEffect = sourceFiber.lastEffect = null;
  6141. if (
  6142. null !== value &&
  6143. "object" === typeof value &&
  6144. "function" === typeof value.then
  6145. ) {
  6146. var thenable = value;
  6147. if (0 === (sourceFiber.mode & 2)) {
  6148. var currentSource = sourceFiber.alternate;
  6149. currentSource
  6150. ? ((sourceFiber.updateQueue = currentSource.updateQueue),
  6151. (sourceFiber.memoizedState = currentSource.memoizedState),
  6152. (sourceFiber.expirationTime = currentSource.expirationTime))
  6153. : ((sourceFiber.updateQueue = null),
  6154. (sourceFiber.memoizedState = null));
  6155. }
  6156. var hasInvisibleParentBoundary =
  6157. 0 !== (suspenseStackCursor.current & 1),
  6158. _workInProgress = returnFiber;
  6159. do {
  6160. var JSCompiler_temp;
  6161. if ((JSCompiler_temp = 13 === _workInProgress.tag)) {
  6162. var nextState = _workInProgress.memoizedState;
  6163. if (null !== nextState)
  6164. JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
  6165. else {
  6166. var props = _workInProgress.memoizedProps;
  6167. JSCompiler_temp =
  6168. void 0 === props.fallback
  6169. ? !1
  6170. : !0 !== props.unstable_avoidThisFallback
  6171. ? !0
  6172. : hasInvisibleParentBoundary
  6173. ? !1
  6174. : !0;
  6175. }
  6176. }
  6177. if (JSCompiler_temp) {
  6178. var thenables = _workInProgress.updateQueue;
  6179. if (null === thenables) {
  6180. var updateQueue = new Set();
  6181. updateQueue.add(thenable);
  6182. _workInProgress.updateQueue = updateQueue;
  6183. } else thenables.add(thenable);
  6184. if (0 === (_workInProgress.mode & 2)) {
  6185. _workInProgress.effectTag |= 64;
  6186. sourceFiber.effectTag &= -2981;
  6187. if (1 === sourceFiber.tag)
  6188. if (null === sourceFiber.alternate) sourceFiber.tag = 17;
  6189. else {
  6190. var update = createUpdate(1073741823, null);
  6191. update.tag = 2;
  6192. enqueueUpdate(sourceFiber, update);
  6193. }
  6194. sourceFiber.expirationTime = 1073741823;
  6195. break a;
  6196. }
  6197. value = void 0;
  6198. sourceFiber = thrownValue;
  6199. var pingCache = root.pingCache;
  6200. null === pingCache
  6201. ? ((pingCache = root.pingCache = new PossiblyWeakMap()),
  6202. (value = new Set()),
  6203. pingCache.set(thenable, value))
  6204. : ((value = pingCache.get(thenable)),
  6205. void 0 === value &&
  6206. ((value = new Set()), pingCache.set(thenable, value)));
  6207. if (!value.has(sourceFiber)) {
  6208. value.add(sourceFiber);
  6209. var ping = pingSuspendedRoot.bind(
  6210. null,
  6211. root,
  6212. thenable,
  6213. sourceFiber
  6214. );
  6215. thenable.then(ping, ping);
  6216. }
  6217. _workInProgress.effectTag |= 4096;
  6218. _workInProgress.expirationTime = thrownValue;
  6219. break a;
  6220. }
  6221. _workInProgress = _workInProgress.return;
  6222. } while (null !== _workInProgress);
  6223. value = Error(
  6224. (getComponentName(sourceFiber.type) || "A React component") +
  6225. " suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." +
  6226. getStackByFiberInDevAndProd(sourceFiber)
  6227. );
  6228. }
  6229. workInProgressRootExitStatus !== RootCompleted &&
  6230. (workInProgressRootExitStatus = RootErrored);
  6231. value = createCapturedValue(value, sourceFiber);
  6232. _workInProgress = returnFiber;
  6233. do {
  6234. switch (_workInProgress.tag) {
  6235. case 3:
  6236. thenable = value;
  6237. _workInProgress.effectTag |= 4096;
  6238. _workInProgress.expirationTime = thrownValue;
  6239. var _update = createRootErrorUpdate(
  6240. _workInProgress,
  6241. thenable,
  6242. thrownValue
  6243. );
  6244. enqueueCapturedUpdate(_workInProgress, _update);
  6245. break a;
  6246. case 1:
  6247. thenable = value;
  6248. var ctor = _workInProgress.type,
  6249. instance = _workInProgress.stateNode;
  6250. if (
  6251. 0 === (_workInProgress.effectTag & 64) &&
  6252. ("function" === typeof ctor.getDerivedStateFromError ||
  6253. (null !== instance &&
  6254. "function" === typeof instance.componentDidCatch &&
  6255. (null === legacyErrorBoundariesThatAlreadyFailed ||
  6256. !legacyErrorBoundariesThatAlreadyFailed.has(instance))))
  6257. ) {
  6258. _workInProgress.effectTag |= 4096;
  6259. _workInProgress.expirationTime = thrownValue;
  6260. var _update2 = createClassErrorUpdate(
  6261. _workInProgress,
  6262. thenable,
  6263. thrownValue
  6264. );
  6265. enqueueCapturedUpdate(_workInProgress, _update2);
  6266. break a;
  6267. }
  6268. }
  6269. _workInProgress = _workInProgress.return;
  6270. } while (null !== _workInProgress);
  6271. }
  6272. workInProgress = completeUnitOfWork(workInProgress);
  6273. } catch (yetAnotherThrownValue) {
  6274. thrownValue = yetAnotherThrownValue;
  6275. continue;
  6276. }
  6277. break;
  6278. } while (1);
  6279. }
  6280. function pushDispatcher() {
  6281. var prevDispatcher = ReactCurrentDispatcher$1.current;
  6282. ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
  6283. return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
  6284. }
  6285. function pushInteractions(root) {
  6286. var prevInteractions = tracing.__interactionsRef.current;
  6287. tracing.__interactionsRef.current = root.memoizedInteractions;
  6288. return prevInteractions;
  6289. }
  6290. function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
  6291. expirationTime < workInProgressRootLatestProcessedExpirationTime &&
  6292. 2 < expirationTime &&
  6293. (workInProgressRootLatestProcessedExpirationTime = expirationTime);
  6294. null !== suspenseConfig &&
  6295. expirationTime < workInProgressRootLatestSuspenseTimeout &&
  6296. 2 < expirationTime &&
  6297. ((workInProgressRootLatestSuspenseTimeout = expirationTime),
  6298. (workInProgressRootCanSuspendUsingConfig = suspenseConfig));
  6299. }
  6300. function markUnprocessedUpdateTime(expirationTime) {
  6301. expirationTime > workInProgressRootNextUnprocessedUpdateTime &&
  6302. (workInProgressRootNextUnprocessedUpdateTime = expirationTime);
  6303. }
  6304. function renderRootSync(root, expirationTime) {
  6305. var prevExecutionContext = executionContext;
  6306. executionContext |= RenderContext;
  6307. var prevDispatcher = pushDispatcher();
  6308. if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1)
  6309. prepareFreshStack(root, expirationTime),
  6310. startWorkOnPendingInteractions(root, expirationTime);
  6311. expirationTime = pushInteractions(root);
  6312. do
  6313. try {
  6314. workLoopSync();
  6315. break;
  6316. } catch (thrownValue) {
  6317. handleError(root, thrownValue);
  6318. }
  6319. while (1);
  6320. resetContextDependencies();
  6321. tracing.__interactionsRef.current = expirationTime;
  6322. executionContext = prevExecutionContext;
  6323. ReactCurrentDispatcher$1.current = prevDispatcher;
  6324. if (null !== workInProgress)
  6325. throw Error(
  6326. "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
  6327. );
  6328. workInProgressRoot = null;
  6329. return workInProgressRootExitStatus;
  6330. }
  6331. function workLoopSync() {
  6332. for (; null !== workInProgress; )
  6333. workInProgress = performUnitOfWork(workInProgress);
  6334. }
  6335. function workLoopConcurrent() {
  6336. for (; null !== workInProgress && !Scheduler_shouldYield(); )
  6337. workInProgress = performUnitOfWork(workInProgress);
  6338. }
  6339. function performUnitOfWork(unitOfWork) {
  6340. var current = unitOfWork.alternate;
  6341. 0 !== (unitOfWork.mode & 8)
  6342. ? ((profilerStartTime = now$1()),
  6343. 0 > unitOfWork.actualStartTime && (unitOfWork.actualStartTime = now$1()),
  6344. (current = beginWork$1(current, unitOfWork, renderExpirationTime$1)),
  6345. stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
  6346. : (current = beginWork$1(current, unitOfWork, renderExpirationTime$1));
  6347. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  6348. null === current && (current = completeUnitOfWork(unitOfWork));
  6349. ReactCurrentOwner$2.current = null;
  6350. return current;
  6351. }
  6352. function completeUnitOfWork(unitOfWork) {
  6353. workInProgress = unitOfWork;
  6354. do {
  6355. var current = workInProgress.alternate;
  6356. unitOfWork = workInProgress.return;
  6357. if (0 === (workInProgress.effectTag & 2048)) {
  6358. if (0 === (workInProgress.mode & 8))
  6359. current = completeWork(current, workInProgress, renderExpirationTime$1);
  6360. else {
  6361. var fiber = workInProgress;
  6362. profilerStartTime = now$1();
  6363. 0 > fiber.actualStartTime && (fiber.actualStartTime = now$1());
  6364. current = completeWork(current, workInProgress, renderExpirationTime$1);
  6365. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
  6366. }
  6367. fiber = workInProgress;
  6368. if (1 === renderExpirationTime$1 || 1 !== fiber.childExpirationTime) {
  6369. var newChildExpirationTime = 0;
  6370. if (0 !== (fiber.mode & 8)) {
  6371. for (
  6372. var actualDuration = fiber.actualDuration,
  6373. treeBaseDuration = fiber.selfBaseDuration,
  6374. shouldBubbleActualDurations =
  6375. null === fiber.alternate ||
  6376. fiber.child !== fiber.alternate.child,
  6377. child = fiber.child;
  6378. null !== child;
  6379. ) {
  6380. var childUpdateExpirationTime = child.expirationTime,
  6381. childChildExpirationTime = child.childExpirationTime;
  6382. childUpdateExpirationTime > newChildExpirationTime &&
  6383. (newChildExpirationTime = childUpdateExpirationTime);
  6384. childChildExpirationTime > newChildExpirationTime &&
  6385. (newChildExpirationTime = childChildExpirationTime);
  6386. shouldBubbleActualDurations &&
  6387. (actualDuration += child.actualDuration);
  6388. treeBaseDuration += child.treeBaseDuration;
  6389. child = child.sibling;
  6390. }
  6391. fiber.actualDuration = actualDuration;
  6392. fiber.treeBaseDuration = treeBaseDuration;
  6393. } else
  6394. for (actualDuration = fiber.child; null !== actualDuration; )
  6395. (treeBaseDuration = actualDuration.expirationTime),
  6396. (shouldBubbleActualDurations =
  6397. actualDuration.childExpirationTime),
  6398. treeBaseDuration > newChildExpirationTime &&
  6399. (newChildExpirationTime = treeBaseDuration),
  6400. shouldBubbleActualDurations > newChildExpirationTime &&
  6401. (newChildExpirationTime = shouldBubbleActualDurations),
  6402. (actualDuration = actualDuration.sibling);
  6403. fiber.childExpirationTime = newChildExpirationTime;
  6404. }
  6405. if (null !== current) return current;
  6406. null !== unitOfWork &&
  6407. 0 === (unitOfWork.effectTag & 2048) &&
  6408. (null === unitOfWork.firstEffect &&
  6409. (unitOfWork.firstEffect = workInProgress.firstEffect),
  6410. null !== workInProgress.lastEffect &&
  6411. (null !== unitOfWork.lastEffect &&
  6412. (unitOfWork.lastEffect.nextEffect = workInProgress.firstEffect),
  6413. (unitOfWork.lastEffect = workInProgress.lastEffect)),
  6414. 1 < workInProgress.effectTag &&
  6415. (null !== unitOfWork.lastEffect
  6416. ? (unitOfWork.lastEffect.nextEffect = workInProgress)
  6417. : (unitOfWork.firstEffect = workInProgress),
  6418. (unitOfWork.lastEffect = workInProgress)));
  6419. } else {
  6420. current = unwindWork(workInProgress);
  6421. if (0 !== (workInProgress.mode & 8)) {
  6422. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
  6423. fiber = workInProgress.actualDuration;
  6424. for (
  6425. newChildExpirationTime = workInProgress.child;
  6426. null !== newChildExpirationTime;
  6427. )
  6428. (fiber += newChildExpirationTime.actualDuration),
  6429. (newChildExpirationTime = newChildExpirationTime.sibling);
  6430. workInProgress.actualDuration = fiber;
  6431. }
  6432. if (null !== current) return (current.effectTag &= 2047), current;
  6433. null !== unitOfWork &&
  6434. ((unitOfWork.firstEffect = unitOfWork.lastEffect = null),
  6435. (unitOfWork.effectTag |= 2048));
  6436. }
  6437. current = workInProgress.sibling;
  6438. if (null !== current) return current;
  6439. workInProgress = unitOfWork;
  6440. } while (null !== workInProgress);
  6441. workInProgressRootExitStatus === RootIncomplete &&
  6442. (workInProgressRootExitStatus = RootCompleted);
  6443. return null;
  6444. }
  6445. function getRemainingExpirationTime(fiber) {
  6446. var updateExpirationTime = fiber.expirationTime;
  6447. fiber = fiber.childExpirationTime;
  6448. return updateExpirationTime > fiber ? updateExpirationTime : fiber;
  6449. }
  6450. function commitRoot(root) {
  6451. var renderPriorityLevel = getCurrentPriorityLevel();
  6452. runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
  6453. return null;
  6454. }
  6455. function commitRootImpl(root$jscomp$0, renderPriorityLevel$jscomp$0) {
  6456. do flushPassiveEffects();
  6457. while (null !== rootWithPendingPassiveEffects);
  6458. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6459. throw Error("Should not already be working.");
  6460. var finishedWork = root$jscomp$0.finishedWork,
  6461. expirationTime = root$jscomp$0.finishedExpirationTime;
  6462. if (null === finishedWork) return null;
  6463. root$jscomp$0.finishedWork = null;
  6464. root$jscomp$0.finishedExpirationTime = 0;
  6465. if (finishedWork === root$jscomp$0.current)
  6466. throw Error(
  6467. "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
  6468. );
  6469. root$jscomp$0.callbackNode = null;
  6470. root$jscomp$0.callbackExpirationTime = 0;
  6471. root$jscomp$0.callbackPriority = 90;
  6472. root$jscomp$0.nextKnownPendingLevel = 0;
  6473. var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(
  6474. finishedWork
  6475. );
  6476. root$jscomp$0.firstPendingTime = remainingExpirationTimeBeforeCommit;
  6477. expirationTime <= root$jscomp$0.lastSuspendedTime
  6478. ? (root$jscomp$0.firstSuspendedTime = root$jscomp$0.lastSuspendedTime = root$jscomp$0.nextKnownPendingLevel = 0)
  6479. : expirationTime <= root$jscomp$0.firstSuspendedTime &&
  6480. (root$jscomp$0.firstSuspendedTime = expirationTime - 1);
  6481. expirationTime <= root$jscomp$0.lastPingedTime &&
  6482. (root$jscomp$0.lastPingedTime = 0);
  6483. expirationTime <= root$jscomp$0.lastExpiredTime &&
  6484. (root$jscomp$0.lastExpiredTime = 0);
  6485. root$jscomp$0 === workInProgressRoot &&
  6486. ((workInProgress = workInProgressRoot = null),
  6487. (renderExpirationTime$1 = 0));
  6488. 1 < finishedWork.effectTag
  6489. ? null !== finishedWork.lastEffect
  6490. ? ((finishedWork.lastEffect.nextEffect = finishedWork),
  6491. (remainingExpirationTimeBeforeCommit = finishedWork.firstEffect))
  6492. : (remainingExpirationTimeBeforeCommit = finishedWork)
  6493. : (remainingExpirationTimeBeforeCommit = finishedWork.firstEffect);
  6494. if (null !== remainingExpirationTimeBeforeCommit) {
  6495. var prevExecutionContext = executionContext;
  6496. executionContext |= CommitContext;
  6497. var prevInteractions = pushInteractions(root$jscomp$0);
  6498. ReactCurrentOwner$2.current = null;
  6499. nextEffect = remainingExpirationTimeBeforeCommit;
  6500. do
  6501. try {
  6502. commitBeforeMutationEffects();
  6503. } catch (error) {
  6504. if (null === nextEffect) throw Error("Should be working on an effect.");
  6505. captureCommitPhaseError(nextEffect, error);
  6506. nextEffect = nextEffect.nextEffect;
  6507. }
  6508. while (null !== nextEffect);
  6509. commitTime = now$1();
  6510. nextEffect = remainingExpirationTimeBeforeCommit;
  6511. do
  6512. try {
  6513. for (
  6514. var root = root$jscomp$0,
  6515. renderPriorityLevel = renderPriorityLevel$jscomp$0;
  6516. null !== nextEffect;
  6517. ) {
  6518. var effectTag = nextEffect.effectTag;
  6519. if (effectTag & 128) {
  6520. var current = nextEffect.alternate;
  6521. if (null !== current) {
  6522. var currentRef = current.ref;
  6523. null !== currentRef &&
  6524. ("function" === typeof currentRef
  6525. ? currentRef(null)
  6526. : (currentRef.current = null));
  6527. }
  6528. }
  6529. switch (effectTag & 1038) {
  6530. case 2:
  6531. commitPlacement(nextEffect);
  6532. nextEffect.effectTag &= -3;
  6533. break;
  6534. case 6:
  6535. commitPlacement(nextEffect);
  6536. nextEffect.effectTag &= -3;
  6537. commitWork(nextEffect.alternate, nextEffect);
  6538. break;
  6539. case 1024:
  6540. nextEffect.effectTag &= -1025;
  6541. break;
  6542. case 1028:
  6543. nextEffect.effectTag &= -1025;
  6544. commitWork(nextEffect.alternate, nextEffect);
  6545. break;
  6546. case 4:
  6547. commitWork(nextEffect.alternate, nextEffect);
  6548. break;
  6549. case 8:
  6550. var current$jscomp$0 = nextEffect;
  6551. unmountHostComponents(
  6552. root,
  6553. current$jscomp$0,
  6554. renderPriorityLevel
  6555. );
  6556. detachFiber(current$jscomp$0);
  6557. }
  6558. nextEffect = nextEffect.nextEffect;
  6559. }
  6560. } catch (error) {
  6561. if (null === nextEffect) throw Error("Should be working on an effect.");
  6562. captureCommitPhaseError(nextEffect, error);
  6563. nextEffect = nextEffect.nextEffect;
  6564. }
  6565. while (null !== nextEffect);
  6566. root$jscomp$0.current = finishedWork;
  6567. nextEffect = remainingExpirationTimeBeforeCommit;
  6568. do
  6569. try {
  6570. for (effectTag = root$jscomp$0; null !== nextEffect; ) {
  6571. var effectTag$jscomp$0 = nextEffect.effectTag;
  6572. effectTag$jscomp$0 & 36 &&
  6573. commitLifeCycles(effectTag, nextEffect.alternate, nextEffect);
  6574. if (effectTag$jscomp$0 & 128) {
  6575. current = void 0;
  6576. var ref = nextEffect.ref;
  6577. if (null !== ref) {
  6578. var instance = nextEffect.stateNode;
  6579. switch (nextEffect.tag) {
  6580. case 5:
  6581. current = instance;
  6582. break;
  6583. default:
  6584. current = instance;
  6585. }
  6586. "function" === typeof ref
  6587. ? ref(current)
  6588. : (ref.current = current);
  6589. }
  6590. }
  6591. nextEffect = nextEffect.nextEffect;
  6592. }
  6593. } catch (error) {
  6594. if (null === nextEffect) throw Error("Should be working on an effect.");
  6595. captureCommitPhaseError(nextEffect, error);
  6596. nextEffect = nextEffect.nextEffect;
  6597. }
  6598. while (null !== nextEffect);
  6599. nextEffect = null;
  6600. requestPaint();
  6601. tracing.__interactionsRef.current = prevInteractions;
  6602. executionContext = prevExecutionContext;
  6603. } else (root$jscomp$0.current = finishedWork), (commitTime = now$1());
  6604. if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
  6605. (rootDoesHavePassiveEffects = !1),
  6606. (rootWithPendingPassiveEffects = root$jscomp$0),
  6607. (pendingPassiveEffectsExpirationTime = expirationTime),
  6608. (pendingPassiveEffectsRenderPriority = renderPriorityLevel$jscomp$0);
  6609. else
  6610. for (
  6611. nextEffect = remainingExpirationTimeBeforeCommit;
  6612. null !== nextEffect;
  6613. )
  6614. (renderPriorityLevel$jscomp$0 = nextEffect.nextEffect),
  6615. (nextEffect.nextEffect = null),
  6616. (nextEffect = renderPriorityLevel$jscomp$0);
  6617. renderPriorityLevel$jscomp$0 = root$jscomp$0.firstPendingTime;
  6618. if (0 !== renderPriorityLevel$jscomp$0) {
  6619. if (null !== spawnedWorkDuringRender)
  6620. for (
  6621. remainingExpirationTimeBeforeCommit = spawnedWorkDuringRender,
  6622. spawnedWorkDuringRender = null,
  6623. ref = 0;
  6624. ref < remainingExpirationTimeBeforeCommit.length;
  6625. ref++
  6626. )
  6627. scheduleInteractions(
  6628. root$jscomp$0,
  6629. remainingExpirationTimeBeforeCommit[ref],
  6630. root$jscomp$0.memoizedInteractions
  6631. );
  6632. schedulePendingInteractions(root$jscomp$0, renderPriorityLevel$jscomp$0);
  6633. } else legacyErrorBoundariesThatAlreadyFailed = null;
  6634. effectTag$jscomp$0 ||
  6635. finishPendingInteractions(root$jscomp$0, expirationTime);
  6636. 1073741823 === renderPriorityLevel$jscomp$0
  6637. ? root$jscomp$0 === rootWithNestedUpdates
  6638. ? nestedUpdateCount++
  6639. : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root$jscomp$0))
  6640. : (nestedUpdateCount = 0);
  6641. "function" === typeof onCommitFiberRoot &&
  6642. onCommitFiberRoot(finishedWork.stateNode, expirationTime);
  6643. ensureRootIsScheduled(root$jscomp$0);
  6644. if (hasUncaughtError)
  6645. throw ((hasUncaughtError = !1),
  6646. (root$jscomp$0 = firstUncaughtError),
  6647. (firstUncaughtError = null),
  6648. root$jscomp$0);
  6649. if ((executionContext & LegacyUnbatchedContext) !== NoContext) return null;
  6650. flushSyncCallbackQueue();
  6651. return null;
  6652. }
  6653. function commitBeforeMutationEffects() {
  6654. for (; null !== nextEffect; ) {
  6655. var effectTag = nextEffect.effectTag;
  6656. 0 !== (effectTag & 256) &&
  6657. commitBeforeMutationLifeCycles(nextEffect.alternate, nextEffect);
  6658. 0 === (effectTag & 512) ||
  6659. rootDoesHavePassiveEffects ||
  6660. ((rootDoesHavePassiveEffects = !0),
  6661. scheduleCallback(97, function() {
  6662. flushPassiveEffects();
  6663. return null;
  6664. }));
  6665. nextEffect = nextEffect.nextEffect;
  6666. }
  6667. }
  6668. function flushPassiveEffects() {
  6669. if (90 !== pendingPassiveEffectsRenderPriority) {
  6670. var priorityLevel =
  6671. 97 < pendingPassiveEffectsRenderPriority
  6672. ? 97
  6673. : pendingPassiveEffectsRenderPriority;
  6674. pendingPassiveEffectsRenderPriority = 90;
  6675. return runWithPriority(priorityLevel, flushPassiveEffectsImpl);
  6676. }
  6677. }
  6678. function flushPassiveEffectsImpl() {
  6679. if (null === rootWithPendingPassiveEffects) return !1;
  6680. var root = rootWithPendingPassiveEffects,
  6681. expirationTime = pendingPassiveEffectsExpirationTime;
  6682. rootWithPendingPassiveEffects = null;
  6683. pendingPassiveEffectsExpirationTime = 0;
  6684. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6685. throw Error("Cannot flush passive effects while already rendering.");
  6686. var prevExecutionContext = executionContext;
  6687. executionContext |= CommitContext;
  6688. for (
  6689. var prevInteractions = pushInteractions(root),
  6690. _effect2 = root.current.firstEffect;
  6691. null !== _effect2;
  6692. ) {
  6693. try {
  6694. var finishedWork = _effect2;
  6695. if (0 !== (finishedWork.effectTag & 512))
  6696. switch (finishedWork.tag) {
  6697. case 0:
  6698. case 11:
  6699. case 15:
  6700. case 22:
  6701. commitHookEffectListUnmount(5, finishedWork),
  6702. commitHookEffectListMount(5, finishedWork);
  6703. }
  6704. } catch (error) {
  6705. if (null === _effect2) throw Error("Should be working on an effect.");
  6706. captureCommitPhaseError(_effect2, error);
  6707. }
  6708. finishedWork = _effect2.nextEffect;
  6709. _effect2.nextEffect = null;
  6710. _effect2 = finishedWork;
  6711. }
  6712. tracing.__interactionsRef.current = prevInteractions;
  6713. finishPendingInteractions(root, expirationTime);
  6714. executionContext = prevExecutionContext;
  6715. flushSyncCallbackQueue();
  6716. return !0;
  6717. }
  6718. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  6719. sourceFiber = createCapturedValue(error, sourceFiber);
  6720. sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 1073741823);
  6721. enqueueUpdate(rootFiber, sourceFiber);
  6722. rootFiber = markUpdateTimeFromFiberToRoot(rootFiber, 1073741823);
  6723. null !== rootFiber &&
  6724. (ensureRootIsScheduled(rootFiber),
  6725. schedulePendingInteractions(rootFiber, 1073741823));
  6726. }
  6727. function captureCommitPhaseError(sourceFiber, error) {
  6728. if (3 === sourceFiber.tag)
  6729. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  6730. else
  6731. for (var fiber = sourceFiber.return; null !== fiber; ) {
  6732. if (3 === fiber.tag) {
  6733. captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
  6734. break;
  6735. } else if (1 === fiber.tag) {
  6736. var instance = fiber.stateNode;
  6737. if (
  6738. "function" === typeof fiber.type.getDerivedStateFromError ||
  6739. ("function" === typeof instance.componentDidCatch &&
  6740. (null === legacyErrorBoundariesThatAlreadyFailed ||
  6741. !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
  6742. ) {
  6743. sourceFiber = createCapturedValue(error, sourceFiber);
  6744. sourceFiber = createClassErrorUpdate(fiber, sourceFiber, 1073741823);
  6745. enqueueUpdate(fiber, sourceFiber);
  6746. fiber = markUpdateTimeFromFiberToRoot(fiber, 1073741823);
  6747. null !== fiber &&
  6748. (ensureRootIsScheduled(fiber),
  6749. schedulePendingInteractions(fiber, 1073741823));
  6750. break;
  6751. }
  6752. }
  6753. fiber = fiber.return;
  6754. }
  6755. }
  6756. function pingSuspendedRoot(root, thenable, suspendedTime) {
  6757. var pingCache = root.pingCache;
  6758. null !== pingCache && pingCache.delete(thenable);
  6759. workInProgressRoot === root && renderExpirationTime$1 === suspendedTime
  6760. ? workInProgressRootExitStatus === RootSuspendedWithDelay ||
  6761. (workInProgressRootExitStatus === RootSuspended &&
  6762. 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
  6763. now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
  6764. ? prepareFreshStack(root, renderExpirationTime$1)
  6765. : (workInProgressRootHasPendingPing = !0)
  6766. : isRootSuspendedAtTime(root, suspendedTime) &&
  6767. ((thenable = root.lastPingedTime),
  6768. (0 !== thenable && thenable < suspendedTime) ||
  6769. ((root.lastPingedTime = suspendedTime),
  6770. ensureRootIsScheduled(root),
  6771. schedulePendingInteractions(root, suspendedTime)));
  6772. }
  6773. function resolveRetryThenable(boundaryFiber, thenable) {
  6774. var retryCache = boundaryFiber.stateNode;
  6775. null !== retryCache && retryCache.delete(thenable);
  6776. thenable = 0;
  6777. 0 === thenable &&
  6778. ((thenable = requestCurrentTimeForUpdate()),
  6779. (thenable = computeExpirationForFiber(thenable, boundaryFiber, null)));
  6780. boundaryFiber = markUpdateTimeFromFiberToRoot(boundaryFiber, thenable);
  6781. null !== boundaryFiber &&
  6782. (ensureRootIsScheduled(boundaryFiber),
  6783. schedulePendingInteractions(boundaryFiber, thenable));
  6784. }
  6785. var beginWork$1;
  6786. beginWork$1 = function(current, workInProgress, renderExpirationTime) {
  6787. var updateExpirationTime = workInProgress.expirationTime;
  6788. if (null !== current)
  6789. if (
  6790. current.memoizedProps !== workInProgress.pendingProps ||
  6791. didPerformWorkStackCursor.current
  6792. )
  6793. didReceiveUpdate = !0;
  6794. else {
  6795. if (updateExpirationTime < renderExpirationTime) {
  6796. didReceiveUpdate = !1;
  6797. switch (workInProgress.tag) {
  6798. case 3:
  6799. pushHostRootContext(workInProgress);
  6800. break;
  6801. case 5:
  6802. pushHostContext(workInProgress);
  6803. break;
  6804. case 1:
  6805. isContextProvider(workInProgress.type) &&
  6806. pushContextProvider(workInProgress);
  6807. break;
  6808. case 4:
  6809. pushHostContainer(
  6810. workInProgress,
  6811. workInProgress.stateNode.containerInfo
  6812. );
  6813. break;
  6814. case 10:
  6815. updateExpirationTime = workInProgress.memoizedProps.value;
  6816. var context = workInProgress.type._context;
  6817. push(valueCursor, context._currentValue);
  6818. context._currentValue = updateExpirationTime;
  6819. break;
  6820. case 12:
  6821. workInProgress.childExpirationTime >= renderExpirationTime &&
  6822. (workInProgress.effectTag |= 4);
  6823. updateExpirationTime = workInProgress.stateNode;
  6824. updateExpirationTime.effectDuration = 0;
  6825. updateExpirationTime.passiveEffectDuration = 0;
  6826. break;
  6827. case 13:
  6828. if (null !== workInProgress.memoizedState) {
  6829. updateExpirationTime = workInProgress.child.childExpirationTime;
  6830. if (
  6831. 0 !== updateExpirationTime &&
  6832. updateExpirationTime >= renderExpirationTime
  6833. )
  6834. return updateSuspenseComponent(
  6835. current,
  6836. workInProgress,
  6837. renderExpirationTime
  6838. );
  6839. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  6840. workInProgress = bailoutOnAlreadyFinishedWork(
  6841. current,
  6842. workInProgress,
  6843. renderExpirationTime
  6844. );
  6845. return null !== workInProgress ? workInProgress.sibling : null;
  6846. }
  6847. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  6848. break;
  6849. case 19:
  6850. updateExpirationTime =
  6851. workInProgress.childExpirationTime >= renderExpirationTime;
  6852. if (0 !== (current.effectTag & 64)) {
  6853. if (updateExpirationTime)
  6854. return updateSuspenseListComponent(
  6855. current,
  6856. workInProgress,
  6857. renderExpirationTime
  6858. );
  6859. workInProgress.effectTag |= 64;
  6860. }
  6861. context = workInProgress.memoizedState;
  6862. null !== context &&
  6863. ((context.rendering = null), (context.tail = null));
  6864. push(suspenseStackCursor, suspenseStackCursor.current);
  6865. if (!updateExpirationTime) return null;
  6866. }
  6867. return bailoutOnAlreadyFinishedWork(
  6868. current,
  6869. workInProgress,
  6870. renderExpirationTime
  6871. );
  6872. }
  6873. didReceiveUpdate = !1;
  6874. }
  6875. else didReceiveUpdate = !1;
  6876. workInProgress.expirationTime = 0;
  6877. switch (workInProgress.tag) {
  6878. case 2:
  6879. updateExpirationTime = workInProgress.type;
  6880. null !== current &&
  6881. ((current.alternate = null),
  6882. (workInProgress.alternate = null),
  6883. (workInProgress.effectTag |= 2));
  6884. current = workInProgress.pendingProps;
  6885. context = getMaskedContext(workInProgress, contextStackCursor.current);
  6886. prepareToReadContext(workInProgress, renderExpirationTime);
  6887. context = renderWithHooks(
  6888. null,
  6889. workInProgress,
  6890. updateExpirationTime,
  6891. current,
  6892. context,
  6893. renderExpirationTime
  6894. );
  6895. workInProgress.effectTag |= 1;
  6896. if (
  6897. "object" === typeof context &&
  6898. null !== context &&
  6899. "function" === typeof context.render &&
  6900. void 0 === context.$$typeof
  6901. ) {
  6902. workInProgress.tag = 1;
  6903. workInProgress.memoizedState = null;
  6904. workInProgress.updateQueue = null;
  6905. if (isContextProvider(updateExpirationTime)) {
  6906. var hasContext = !0;
  6907. pushContextProvider(workInProgress);
  6908. } else hasContext = !1;
  6909. workInProgress.memoizedState =
  6910. null !== context.state && void 0 !== context.state
  6911. ? context.state
  6912. : null;
  6913. initializeUpdateQueue(workInProgress);
  6914. var getDerivedStateFromProps =
  6915. updateExpirationTime.getDerivedStateFromProps;
  6916. "function" === typeof getDerivedStateFromProps &&
  6917. applyDerivedStateFromProps(
  6918. workInProgress,
  6919. updateExpirationTime,
  6920. getDerivedStateFromProps,
  6921. current
  6922. );
  6923. context.updater = classComponentUpdater;
  6924. workInProgress.stateNode = context;
  6925. context._reactInternalFiber = workInProgress;
  6926. mountClassInstance(
  6927. workInProgress,
  6928. updateExpirationTime,
  6929. current,
  6930. renderExpirationTime
  6931. );
  6932. workInProgress = finishClassComponent(
  6933. null,
  6934. workInProgress,
  6935. updateExpirationTime,
  6936. !0,
  6937. hasContext,
  6938. renderExpirationTime
  6939. );
  6940. } else
  6941. (workInProgress.tag = 0),
  6942. reconcileChildren(
  6943. null,
  6944. workInProgress,
  6945. context,
  6946. renderExpirationTime
  6947. ),
  6948. (workInProgress = workInProgress.child);
  6949. return workInProgress;
  6950. case 16:
  6951. a: {
  6952. context = workInProgress.elementType;
  6953. null !== current &&
  6954. ((current.alternate = null),
  6955. (workInProgress.alternate = null),
  6956. (workInProgress.effectTag |= 2));
  6957. current = workInProgress.pendingProps;
  6958. initializeLazyComponentType(context);
  6959. if (1 !== context._status) throw context._result;
  6960. context = context._result;
  6961. workInProgress.type = context;
  6962. hasContext = workInProgress.tag = resolveLazyComponentTag(context);
  6963. current = resolveDefaultProps(context, current);
  6964. switch (hasContext) {
  6965. case 0:
  6966. workInProgress = updateFunctionComponent(
  6967. null,
  6968. workInProgress,
  6969. context,
  6970. current,
  6971. renderExpirationTime
  6972. );
  6973. break a;
  6974. case 1:
  6975. workInProgress = updateClassComponent(
  6976. null,
  6977. workInProgress,
  6978. context,
  6979. current,
  6980. renderExpirationTime
  6981. );
  6982. break a;
  6983. case 11:
  6984. workInProgress = updateForwardRef(
  6985. null,
  6986. workInProgress,
  6987. context,
  6988. current,
  6989. renderExpirationTime
  6990. );
  6991. break a;
  6992. case 14:
  6993. workInProgress = updateMemoComponent(
  6994. null,
  6995. workInProgress,
  6996. context,
  6997. resolveDefaultProps(context.type, current),
  6998. updateExpirationTime,
  6999. renderExpirationTime
  7000. );
  7001. break a;
  7002. }
  7003. throw Error(
  7004. "Element type is invalid. Received a promise that resolves to: " +
  7005. context +
  7006. ". Lazy element type must resolve to a class or function."
  7007. );
  7008. }
  7009. return workInProgress;
  7010. case 0:
  7011. return (
  7012. (updateExpirationTime = workInProgress.type),
  7013. (context = workInProgress.pendingProps),
  7014. (context =
  7015. workInProgress.elementType === updateExpirationTime
  7016. ? context
  7017. : resolveDefaultProps(updateExpirationTime, context)),
  7018. updateFunctionComponent(
  7019. current,
  7020. workInProgress,
  7021. updateExpirationTime,
  7022. context,
  7023. renderExpirationTime
  7024. )
  7025. );
  7026. case 1:
  7027. return (
  7028. (updateExpirationTime = workInProgress.type),
  7029. (context = workInProgress.pendingProps),
  7030. (context =
  7031. workInProgress.elementType === updateExpirationTime
  7032. ? context
  7033. : resolveDefaultProps(updateExpirationTime, context)),
  7034. updateClassComponent(
  7035. current,
  7036. workInProgress,
  7037. updateExpirationTime,
  7038. context,
  7039. renderExpirationTime
  7040. )
  7041. );
  7042. case 3:
  7043. pushHostRootContext(workInProgress);
  7044. updateExpirationTime = workInProgress.updateQueue;
  7045. if (null === current || null === updateExpirationTime)
  7046. throw Error(
  7047. "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."
  7048. );
  7049. updateExpirationTime = workInProgress.pendingProps;
  7050. context = workInProgress.memoizedState;
  7051. context = null !== context ? context.element : null;
  7052. cloneUpdateQueue(current, workInProgress);
  7053. processUpdateQueue(
  7054. workInProgress,
  7055. updateExpirationTime,
  7056. null,
  7057. renderExpirationTime
  7058. );
  7059. updateExpirationTime = workInProgress.memoizedState.element;
  7060. updateExpirationTime === context
  7061. ? (workInProgress = bailoutOnAlreadyFinishedWork(
  7062. current,
  7063. workInProgress,
  7064. renderExpirationTime
  7065. ))
  7066. : (reconcileChildren(
  7067. current,
  7068. workInProgress,
  7069. updateExpirationTime,
  7070. renderExpirationTime
  7071. ),
  7072. (workInProgress = workInProgress.child));
  7073. return workInProgress;
  7074. case 5:
  7075. return (
  7076. pushHostContext(workInProgress),
  7077. (updateExpirationTime = workInProgress.pendingProps.children),
  7078. markRef(current, workInProgress),
  7079. reconcileChildren(
  7080. current,
  7081. workInProgress,
  7082. updateExpirationTime,
  7083. renderExpirationTime
  7084. ),
  7085. (workInProgress = workInProgress.child),
  7086. workInProgress
  7087. );
  7088. case 6:
  7089. return null;
  7090. case 13:
  7091. return updateSuspenseComponent(
  7092. current,
  7093. workInProgress,
  7094. renderExpirationTime
  7095. );
  7096. case 4:
  7097. return (
  7098. pushHostContainer(
  7099. workInProgress,
  7100. workInProgress.stateNode.containerInfo
  7101. ),
  7102. (updateExpirationTime = workInProgress.pendingProps),
  7103. null === current
  7104. ? (workInProgress.child = reconcileChildFibers(
  7105. workInProgress,
  7106. null,
  7107. updateExpirationTime,
  7108. renderExpirationTime
  7109. ))
  7110. : reconcileChildren(
  7111. current,
  7112. workInProgress,
  7113. updateExpirationTime,
  7114. renderExpirationTime
  7115. ),
  7116. workInProgress.child
  7117. );
  7118. case 11:
  7119. return (
  7120. (updateExpirationTime = workInProgress.type),
  7121. (context = workInProgress.pendingProps),
  7122. (context =
  7123. workInProgress.elementType === updateExpirationTime
  7124. ? context
  7125. : resolveDefaultProps(updateExpirationTime, context)),
  7126. updateForwardRef(
  7127. current,
  7128. workInProgress,
  7129. updateExpirationTime,
  7130. context,
  7131. renderExpirationTime
  7132. )
  7133. );
  7134. case 7:
  7135. return (
  7136. reconcileChildren(
  7137. current,
  7138. workInProgress,
  7139. workInProgress.pendingProps,
  7140. renderExpirationTime
  7141. ),
  7142. workInProgress.child
  7143. );
  7144. case 8:
  7145. return (
  7146. reconcileChildren(
  7147. current,
  7148. workInProgress,
  7149. workInProgress.pendingProps.children,
  7150. renderExpirationTime
  7151. ),
  7152. workInProgress.child
  7153. );
  7154. case 12:
  7155. return (
  7156. (workInProgress.effectTag |= 4),
  7157. (updateExpirationTime = workInProgress.stateNode),
  7158. (updateExpirationTime.effectDuration = 0),
  7159. (updateExpirationTime.passiveEffectDuration = 0),
  7160. reconcileChildren(
  7161. current,
  7162. workInProgress,
  7163. workInProgress.pendingProps.children,
  7164. renderExpirationTime
  7165. ),
  7166. workInProgress.child
  7167. );
  7168. case 10:
  7169. a: {
  7170. updateExpirationTime = workInProgress.type._context;
  7171. context = workInProgress.pendingProps;
  7172. getDerivedStateFromProps = workInProgress.memoizedProps;
  7173. hasContext = context.value;
  7174. var context$jscomp$0 = workInProgress.type._context;
  7175. push(valueCursor, context$jscomp$0._currentValue);
  7176. context$jscomp$0._currentValue = hasContext;
  7177. if (null !== getDerivedStateFromProps)
  7178. if (
  7179. ((context$jscomp$0 = getDerivedStateFromProps.value),
  7180. (hasContext = objectIs(context$jscomp$0, hasContext)
  7181. ? 0
  7182. : ("function" ===
  7183. typeof updateExpirationTime._calculateChangedBits
  7184. ? updateExpirationTime._calculateChangedBits(
  7185. context$jscomp$0,
  7186. hasContext
  7187. )
  7188. : 1073741823) | 0),
  7189. 0 === hasContext)
  7190. ) {
  7191. if (
  7192. getDerivedStateFromProps.children === context.children &&
  7193. !didPerformWorkStackCursor.current
  7194. ) {
  7195. workInProgress = bailoutOnAlreadyFinishedWork(
  7196. current,
  7197. workInProgress,
  7198. renderExpirationTime
  7199. );
  7200. break a;
  7201. }
  7202. } else
  7203. for (
  7204. context$jscomp$0 = workInProgress.child,
  7205. null !== context$jscomp$0 &&
  7206. (context$jscomp$0.return = workInProgress);
  7207. null !== context$jscomp$0;
  7208. ) {
  7209. var list = context$jscomp$0.dependencies;
  7210. if (null !== list) {
  7211. getDerivedStateFromProps = context$jscomp$0.child;
  7212. for (
  7213. var dependency = list.firstContext;
  7214. null !== dependency;
  7215. ) {
  7216. if (
  7217. dependency.context === updateExpirationTime &&
  7218. 0 !== (dependency.observedBits & hasContext)
  7219. ) {
  7220. 1 === context$jscomp$0.tag &&
  7221. ((dependency = createUpdate(renderExpirationTime, null)),
  7222. (dependency.tag = 2),
  7223. enqueueUpdate(context$jscomp$0, dependency));
  7224. context$jscomp$0.expirationTime < renderExpirationTime &&
  7225. (context$jscomp$0.expirationTime = renderExpirationTime);
  7226. dependency = context$jscomp$0.alternate;
  7227. null !== dependency &&
  7228. dependency.expirationTime < renderExpirationTime &&
  7229. (dependency.expirationTime = renderExpirationTime);
  7230. scheduleWorkOnParentPath(
  7231. context$jscomp$0.return,
  7232. renderExpirationTime
  7233. );
  7234. list.expirationTime < renderExpirationTime &&
  7235. (list.expirationTime = renderExpirationTime);
  7236. break;
  7237. }
  7238. dependency = dependency.next;
  7239. }
  7240. } else
  7241. getDerivedStateFromProps =
  7242. 10 === context$jscomp$0.tag
  7243. ? context$jscomp$0.type === workInProgress.type
  7244. ? null
  7245. : context$jscomp$0.child
  7246. : context$jscomp$0.child;
  7247. if (null !== getDerivedStateFromProps)
  7248. getDerivedStateFromProps.return = context$jscomp$0;
  7249. else
  7250. for (
  7251. getDerivedStateFromProps = context$jscomp$0;
  7252. null !== getDerivedStateFromProps;
  7253. ) {
  7254. if (getDerivedStateFromProps === workInProgress) {
  7255. getDerivedStateFromProps = null;
  7256. break;
  7257. }
  7258. context$jscomp$0 = getDerivedStateFromProps.sibling;
  7259. if (null !== context$jscomp$0) {
  7260. context$jscomp$0.return = getDerivedStateFromProps.return;
  7261. getDerivedStateFromProps = context$jscomp$0;
  7262. break;
  7263. }
  7264. getDerivedStateFromProps = getDerivedStateFromProps.return;
  7265. }
  7266. context$jscomp$0 = getDerivedStateFromProps;
  7267. }
  7268. reconcileChildren(
  7269. current,
  7270. workInProgress,
  7271. context.children,
  7272. renderExpirationTime
  7273. );
  7274. workInProgress = workInProgress.child;
  7275. }
  7276. return workInProgress;
  7277. case 9:
  7278. return (
  7279. (context = workInProgress.type),
  7280. (hasContext = workInProgress.pendingProps),
  7281. (updateExpirationTime = hasContext.children),
  7282. prepareToReadContext(workInProgress, renderExpirationTime),
  7283. (context = readContext(context, hasContext.unstable_observedBits)),
  7284. (updateExpirationTime = updateExpirationTime(context)),
  7285. (workInProgress.effectTag |= 1),
  7286. reconcileChildren(
  7287. current,
  7288. workInProgress,
  7289. updateExpirationTime,
  7290. renderExpirationTime
  7291. ),
  7292. workInProgress.child
  7293. );
  7294. case 14:
  7295. return (
  7296. (context = workInProgress.type),
  7297. (hasContext = resolveDefaultProps(
  7298. context,
  7299. workInProgress.pendingProps
  7300. )),
  7301. (hasContext = resolveDefaultProps(context.type, hasContext)),
  7302. updateMemoComponent(
  7303. current,
  7304. workInProgress,
  7305. context,
  7306. hasContext,
  7307. updateExpirationTime,
  7308. renderExpirationTime
  7309. )
  7310. );
  7311. case 15:
  7312. return updateSimpleMemoComponent(
  7313. current,
  7314. workInProgress,
  7315. workInProgress.type,
  7316. workInProgress.pendingProps,
  7317. updateExpirationTime,
  7318. renderExpirationTime
  7319. );
  7320. case 17:
  7321. return (
  7322. (updateExpirationTime = workInProgress.type),
  7323. (context = workInProgress.pendingProps),
  7324. (context =
  7325. workInProgress.elementType === updateExpirationTime
  7326. ? context
  7327. : resolveDefaultProps(updateExpirationTime, context)),
  7328. null !== current &&
  7329. ((current.alternate = null),
  7330. (workInProgress.alternate = null),
  7331. (workInProgress.effectTag |= 2)),
  7332. (workInProgress.tag = 1),
  7333. isContextProvider(updateExpirationTime)
  7334. ? ((current = !0), pushContextProvider(workInProgress))
  7335. : (current = !1),
  7336. prepareToReadContext(workInProgress, renderExpirationTime),
  7337. constructClassInstance(workInProgress, updateExpirationTime, context),
  7338. mountClassInstance(
  7339. workInProgress,
  7340. updateExpirationTime,
  7341. context,
  7342. renderExpirationTime
  7343. ),
  7344. finishClassComponent(
  7345. null,
  7346. workInProgress,
  7347. updateExpirationTime,
  7348. !0,
  7349. current,
  7350. renderExpirationTime
  7351. )
  7352. );
  7353. case 19:
  7354. return updateSuspenseListComponent(
  7355. current,
  7356. workInProgress,
  7357. renderExpirationTime
  7358. );
  7359. }
  7360. throw Error(
  7361. "Unknown unit of work tag (" +
  7362. workInProgress.tag +
  7363. "). This error is likely caused by a bug in React. Please file an issue."
  7364. );
  7365. };
  7366. function scheduleInteractions(root, expirationTime, interactions) {
  7367. if (0 < interactions.size) {
  7368. var pendingInteractionMap = root.pendingInteractionMap,
  7369. pendingInteractions = pendingInteractionMap.get(expirationTime);
  7370. null != pendingInteractions
  7371. ? interactions.forEach(function(interaction) {
  7372. pendingInteractions.has(interaction) || interaction.__count++;
  7373. pendingInteractions.add(interaction);
  7374. })
  7375. : (pendingInteractionMap.set(expirationTime, new Set(interactions)),
  7376. interactions.forEach(function(interaction) {
  7377. interaction.__count++;
  7378. }));
  7379. pendingInteractionMap = tracing.__subscriberRef.current;
  7380. if (null !== pendingInteractionMap)
  7381. pendingInteractionMap.onWorkScheduled(
  7382. interactions,
  7383. 1e3 * expirationTime + root.interactionThreadID
  7384. );
  7385. }
  7386. }
  7387. function schedulePendingInteractions(root, expirationTime) {
  7388. scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
  7389. }
  7390. function startWorkOnPendingInteractions(root, expirationTime) {
  7391. var interactions = new Set();
  7392. root.pendingInteractionMap.forEach(function(
  7393. scheduledInteractions,
  7394. scheduledExpirationTime
  7395. ) {
  7396. scheduledExpirationTime >= expirationTime &&
  7397. scheduledInteractions.forEach(function(interaction) {
  7398. return interactions.add(interaction);
  7399. });
  7400. });
  7401. root.memoizedInteractions = interactions;
  7402. if (0 < interactions.size) {
  7403. var subscriber = tracing.__subscriberRef.current;
  7404. if (null !== subscriber) {
  7405. root = 1e3 * expirationTime + root.interactionThreadID;
  7406. try {
  7407. subscriber.onWorkStarted(interactions, root);
  7408. } catch (error) {
  7409. scheduleCallback(99, function() {
  7410. throw error;
  7411. });
  7412. }
  7413. }
  7414. }
  7415. }
  7416. function finishPendingInteractions(root, committedExpirationTime) {
  7417. var earliestRemainingTimeAfterCommit = root.firstPendingTime;
  7418. try {
  7419. var subscriber = tracing.__subscriberRef.current;
  7420. if (null !== subscriber && 0 < root.memoizedInteractions.size)
  7421. subscriber.onWorkStopped(
  7422. root.memoizedInteractions,
  7423. 1e3 * committedExpirationTime + root.interactionThreadID
  7424. );
  7425. } catch (error) {
  7426. scheduleCallback(99, function() {
  7427. throw error;
  7428. });
  7429. } finally {
  7430. var pendingInteractionMap = root.pendingInteractionMap;
  7431. pendingInteractionMap.forEach(function(
  7432. scheduledInteractions,
  7433. scheduledExpirationTime
  7434. ) {
  7435. scheduledExpirationTime > earliestRemainingTimeAfterCommit &&
  7436. (pendingInteractionMap.delete(scheduledExpirationTime),
  7437. scheduledInteractions.forEach(function(interaction) {
  7438. interaction.__count--;
  7439. if (null !== subscriber && 0 === interaction.__count)
  7440. try {
  7441. subscriber.onInteractionScheduledWorkCompleted(interaction);
  7442. } catch (error) {
  7443. scheduleCallback(99, function() {
  7444. throw error;
  7445. });
  7446. }
  7447. }));
  7448. });
  7449. }
  7450. }
  7451. var onCommitFiberRoot = null,
  7452. onCommitFiberUnmount = null,
  7453. isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
  7454. function injectInternals(internals) {
  7455. if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
  7456. var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  7457. if (hook.isDisabled || !hook.supportsFiber) return !0;
  7458. try {
  7459. var rendererID = hook.inject(internals);
  7460. onCommitFiberRoot = function(root, expirationTime) {
  7461. try {
  7462. var didError = 64 === (root.current.effectTag & 64),
  7463. currentTime = 1073741821 - ((now() / 10) | 0),
  7464. priorityLevel = inferPriorityFromExpirationTime(
  7465. currentTime,
  7466. expirationTime
  7467. );
  7468. hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
  7469. } catch (err) {}
  7470. };
  7471. onCommitFiberUnmount = function(fiber) {
  7472. try {
  7473. hook.onCommitFiberUnmount(rendererID, fiber);
  7474. } catch (err) {}
  7475. };
  7476. } catch (err) {}
  7477. return !0;
  7478. }
  7479. function FiberNode(tag, pendingProps, key, mode) {
  7480. this.tag = tag;
  7481. this.key = key;
  7482. this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
  7483. this.index = 0;
  7484. this.ref = null;
  7485. this.pendingProps = pendingProps;
  7486. this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
  7487. this.mode = mode;
  7488. this.effectTag = 0;
  7489. this.lastEffect = this.firstEffect = this.nextEffect = null;
  7490. this.childExpirationTime = this.expirationTime = 0;
  7491. this.alternate = null;
  7492. this.actualDuration = 0;
  7493. this.actualStartTime = -1;
  7494. this.treeBaseDuration = this.selfBaseDuration = 0;
  7495. }
  7496. function shouldConstruct(Component) {
  7497. Component = Component.prototype;
  7498. return !(!Component || !Component.isReactComponent);
  7499. }
  7500. function resolveLazyComponentTag(Component) {
  7501. if ("function" === typeof Component)
  7502. return shouldConstruct(Component) ? 1 : 0;
  7503. if (void 0 !== Component && null !== Component) {
  7504. Component = Component.$$typeof;
  7505. if (Component === REACT_FORWARD_REF_TYPE) return 11;
  7506. if (Component === REACT_MEMO_TYPE) return 14;
  7507. }
  7508. return 2;
  7509. }
  7510. function createWorkInProgress(current, pendingProps) {
  7511. var workInProgress = current.alternate;
  7512. null === workInProgress
  7513. ? ((workInProgress = new FiberNode(
  7514. current.tag,
  7515. pendingProps,
  7516. current.key,
  7517. current.mode
  7518. )),
  7519. (workInProgress.elementType = current.elementType),
  7520. (workInProgress.type = current.type),
  7521. (workInProgress.stateNode = current.stateNode),
  7522. (workInProgress.alternate = current),
  7523. (current.alternate = workInProgress))
  7524. : ((workInProgress.pendingProps = pendingProps),
  7525. (workInProgress.effectTag = 0),
  7526. (workInProgress.nextEffect = null),
  7527. (workInProgress.firstEffect = null),
  7528. (workInProgress.lastEffect = null),
  7529. (workInProgress.actualDuration = 0),
  7530. (workInProgress.actualStartTime = -1));
  7531. workInProgress.childExpirationTime = current.childExpirationTime;
  7532. workInProgress.expirationTime = current.expirationTime;
  7533. workInProgress.child = current.child;
  7534. workInProgress.memoizedProps = current.memoizedProps;
  7535. workInProgress.memoizedState = current.memoizedState;
  7536. workInProgress.updateQueue = current.updateQueue;
  7537. pendingProps = current.dependencies;
  7538. workInProgress.dependencies =
  7539. null === pendingProps
  7540. ? null
  7541. : {
  7542. expirationTime: pendingProps.expirationTime,
  7543. firstContext: pendingProps.firstContext,
  7544. responders: pendingProps.responders
  7545. };
  7546. workInProgress.sibling = current.sibling;
  7547. workInProgress.index = current.index;
  7548. workInProgress.ref = current.ref;
  7549. workInProgress.selfBaseDuration = current.selfBaseDuration;
  7550. workInProgress.treeBaseDuration = current.treeBaseDuration;
  7551. return workInProgress;
  7552. }
  7553. function createFiberFromTypeAndProps(
  7554. type,
  7555. key,
  7556. pendingProps,
  7557. owner,
  7558. mode,
  7559. expirationTime
  7560. ) {
  7561. var fiberTag = 2;
  7562. owner = type;
  7563. if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
  7564. else if ("string" === typeof type) fiberTag = 5;
  7565. else
  7566. a: switch (type) {
  7567. case REACT_FRAGMENT_TYPE:
  7568. return createFiberFromFragment(
  7569. pendingProps.children,
  7570. mode,
  7571. expirationTime,
  7572. key
  7573. );
  7574. case REACT_CONCURRENT_MODE_TYPE:
  7575. fiberTag = 8;
  7576. mode |= 7;
  7577. break;
  7578. case REACT_STRICT_MODE_TYPE:
  7579. fiberTag = 8;
  7580. mode |= 1;
  7581. break;
  7582. case REACT_PROFILER_TYPE:
  7583. return (
  7584. (type = new FiberNode(12, pendingProps, key, mode | 8)),
  7585. (type.elementType = REACT_PROFILER_TYPE),
  7586. (type.type = REACT_PROFILER_TYPE),
  7587. (type.expirationTime = expirationTime),
  7588. (type.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }),
  7589. type
  7590. );
  7591. case REACT_SUSPENSE_TYPE:
  7592. return (
  7593. (type = new FiberNode(13, pendingProps, key, mode)),
  7594. (type.type = REACT_SUSPENSE_TYPE),
  7595. (type.elementType = REACT_SUSPENSE_TYPE),
  7596. (type.expirationTime = expirationTime),
  7597. type
  7598. );
  7599. case REACT_SUSPENSE_LIST_TYPE:
  7600. return (
  7601. (type = new FiberNode(19, pendingProps, key, mode)),
  7602. (type.elementType = REACT_SUSPENSE_LIST_TYPE),
  7603. (type.expirationTime = expirationTime),
  7604. type
  7605. );
  7606. default:
  7607. if ("object" === typeof type && null !== type)
  7608. switch (type.$$typeof) {
  7609. case REACT_PROVIDER_TYPE:
  7610. fiberTag = 10;
  7611. break a;
  7612. case REACT_CONTEXT_TYPE:
  7613. fiberTag = 9;
  7614. break a;
  7615. case REACT_FORWARD_REF_TYPE:
  7616. fiberTag = 11;
  7617. break a;
  7618. case REACT_MEMO_TYPE:
  7619. fiberTag = 14;
  7620. break a;
  7621. case REACT_LAZY_TYPE:
  7622. fiberTag = 16;
  7623. owner = null;
  7624. break a;
  7625. case REACT_BLOCK_TYPE:
  7626. fiberTag = 22;
  7627. break a;
  7628. }
  7629. throw Error(
  7630. "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
  7631. (null == type ? type : typeof type) +
  7632. "."
  7633. );
  7634. }
  7635. key = new FiberNode(fiberTag, pendingProps, key, mode);
  7636. key.elementType = type;
  7637. key.type = owner;
  7638. key.expirationTime = expirationTime;
  7639. return key;
  7640. }
  7641. function createFiberFromFragment(elements, mode, expirationTime, key) {
  7642. elements = new FiberNode(7, elements, key, mode);
  7643. elements.expirationTime = expirationTime;
  7644. return elements;
  7645. }
  7646. function createFiberFromText(content, mode, expirationTime) {
  7647. content = new FiberNode(6, content, null, mode);
  7648. content.expirationTime = expirationTime;
  7649. return content;
  7650. }
  7651. function createFiberFromPortal(portal, mode, expirationTime) {
  7652. mode = new FiberNode(
  7653. 4,
  7654. null !== portal.children ? portal.children : [],
  7655. portal.key,
  7656. mode
  7657. );
  7658. mode.expirationTime = expirationTime;
  7659. mode.stateNode = {
  7660. containerInfo: portal.containerInfo,
  7661. pendingChildren: null,
  7662. implementation: portal.implementation
  7663. };
  7664. return mode;
  7665. }
  7666. function FiberRootNode(containerInfo, tag, hydrate) {
  7667. this.tag = tag;
  7668. this.current = null;
  7669. this.containerInfo = containerInfo;
  7670. this.pingCache = this.pendingChildren = null;
  7671. this.finishedExpirationTime = 0;
  7672. this.finishedWork = null;
  7673. this.timeoutHandle = -1;
  7674. this.pendingContext = this.context = null;
  7675. this.hydrate = hydrate;
  7676. this.callbackNode = null;
  7677. this.callbackPriority = 90;
  7678. this.lastExpiredTime = this.lastPingedTime = this.nextKnownPendingLevel = this.lastSuspendedTime = this.firstSuspendedTime = this.firstPendingTime = 0;
  7679. this.interactionThreadID = tracing.unstable_getThreadID();
  7680. this.memoizedInteractions = new Set();
  7681. this.pendingInteractionMap = new Map();
  7682. }
  7683. function isRootSuspendedAtTime(root, expirationTime) {
  7684. var firstSuspendedTime = root.firstSuspendedTime;
  7685. root = root.lastSuspendedTime;
  7686. return (
  7687. 0 !== firstSuspendedTime &&
  7688. firstSuspendedTime >= expirationTime &&
  7689. root <= expirationTime
  7690. );
  7691. }
  7692. function markRootSuspendedAtTime(root, expirationTime) {
  7693. var firstSuspendedTime = root.firstSuspendedTime,
  7694. lastSuspendedTime = root.lastSuspendedTime;
  7695. firstSuspendedTime < expirationTime &&
  7696. (root.firstSuspendedTime = expirationTime);
  7697. if (lastSuspendedTime > expirationTime || 0 === firstSuspendedTime)
  7698. root.lastSuspendedTime = expirationTime;
  7699. expirationTime <= root.lastPingedTime && (root.lastPingedTime = 0);
  7700. expirationTime <= root.lastExpiredTime && (root.lastExpiredTime = 0);
  7701. }
  7702. function markRootUpdatedAtTime(root, expirationTime) {
  7703. expirationTime > root.firstPendingTime &&
  7704. (root.firstPendingTime = expirationTime);
  7705. var firstSuspendedTime = root.firstSuspendedTime;
  7706. 0 !== firstSuspendedTime &&
  7707. (expirationTime >= firstSuspendedTime
  7708. ? (root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = 0)
  7709. : expirationTime >= root.lastSuspendedTime &&
  7710. (root.lastSuspendedTime = expirationTime + 1),
  7711. expirationTime > root.nextKnownPendingLevel &&
  7712. (root.nextKnownPendingLevel = expirationTime));
  7713. }
  7714. function findHostInstance(component) {
  7715. var fiber = component._reactInternalFiber;
  7716. if (void 0 === fiber) {
  7717. if ("function" === typeof component.render)
  7718. throw Error("Unable to find node on an unmounted component.");
  7719. throw Error(
  7720. "Argument appears to not be a ReactComponent. Keys: " +
  7721. Object.keys(component)
  7722. );
  7723. }
  7724. component = findCurrentHostFiber(fiber);
  7725. return null === component ? null : component.stateNode;
  7726. }
  7727. function updateContainer(element, container, parentComponent, callback) {
  7728. var current = container.current,
  7729. currentTime = requestCurrentTimeForUpdate(),
  7730. suspenseConfig = ReactCurrentBatchConfig.suspense;
  7731. currentTime = computeExpirationForFiber(currentTime, current, suspenseConfig);
  7732. a: if (parentComponent) {
  7733. parentComponent = parentComponent._reactInternalFiber;
  7734. b: {
  7735. if (
  7736. getNearestMountedFiber(parentComponent) !== parentComponent ||
  7737. 1 !== parentComponent.tag
  7738. )
  7739. throw Error(
  7740. "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue."
  7741. );
  7742. var parentContext = parentComponent;
  7743. do {
  7744. switch (parentContext.tag) {
  7745. case 3:
  7746. parentContext = parentContext.stateNode.context;
  7747. break b;
  7748. case 1:
  7749. if (isContextProvider(parentContext.type)) {
  7750. parentContext =
  7751. parentContext.stateNode
  7752. .__reactInternalMemoizedMergedChildContext;
  7753. break b;
  7754. }
  7755. }
  7756. parentContext = parentContext.return;
  7757. } while (null !== parentContext);
  7758. throw Error(
  7759. "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue."
  7760. );
  7761. }
  7762. if (1 === parentComponent.tag) {
  7763. var Component = parentComponent.type;
  7764. if (isContextProvider(Component)) {
  7765. parentComponent = processChildContext(
  7766. parentComponent,
  7767. Component,
  7768. parentContext
  7769. );
  7770. break a;
  7771. }
  7772. }
  7773. parentComponent = parentContext;
  7774. } else parentComponent = emptyContextObject;
  7775. null === container.context
  7776. ? (container.context = parentComponent)
  7777. : (container.pendingContext = parentComponent);
  7778. container = createUpdate(currentTime, suspenseConfig);
  7779. container.payload = { element: element };
  7780. callback = void 0 === callback ? null : callback;
  7781. null !== callback && (container.callback = callback);
  7782. enqueueUpdate(current, container);
  7783. scheduleWork(current, currentTime);
  7784. return currentTime;
  7785. }
  7786. function createPortal(children, containerInfo, implementation) {
  7787. var key =
  7788. 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
  7789. return {
  7790. $$typeof: REACT_PORTAL_TYPE,
  7791. key: null == key ? null : "" + key,
  7792. children: children,
  7793. containerInfo: containerInfo,
  7794. implementation: implementation
  7795. };
  7796. }
  7797. function findNodeHandle(componentOrHandle) {
  7798. if (null == componentOrHandle) return null;
  7799. if ("number" === typeof componentOrHandle) return componentOrHandle;
  7800. if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;
  7801. if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
  7802. return componentOrHandle.canonical._nativeTag;
  7803. componentOrHandle = findHostInstance(componentOrHandle);
  7804. return null == componentOrHandle
  7805. ? componentOrHandle
  7806. : componentOrHandle.canonical
  7807. ? componentOrHandle.canonical._nativeTag
  7808. : componentOrHandle._nativeTag;
  7809. }
  7810. function unmountComponentAtNode(containerTag) {
  7811. var root = roots.get(containerTag);
  7812. root &&
  7813. updateContainer(null, root, null, function() {
  7814. roots.delete(containerTag);
  7815. });
  7816. }
  7817. batchedUpdatesImpl = function(fn, a) {
  7818. var prevExecutionContext = executionContext;
  7819. executionContext |= 1;
  7820. try {
  7821. return fn(a);
  7822. } finally {
  7823. (executionContext = prevExecutionContext),
  7824. executionContext === NoContext && flushSyncCallbackQueue();
  7825. }
  7826. };
  7827. var roots = new Map();
  7828. (function(devToolsConfig) {
  7829. var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
  7830. return injectInternals({
  7831. bundleType: devToolsConfig.bundleType,
  7832. version: devToolsConfig.version,
  7833. rendererPackageName: devToolsConfig.rendererPackageName,
  7834. rendererConfig: devToolsConfig.rendererConfig,
  7835. overrideHookState: null,
  7836. overrideProps: null,
  7837. setSuspenseHandler: null,
  7838. scheduleUpdate: null,
  7839. currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
  7840. findHostInstanceByFiber: function(fiber) {
  7841. fiber = findCurrentHostFiber(fiber);
  7842. return null === fiber ? null : fiber.stateNode;
  7843. },
  7844. findFiberByHostInstance: function(instance) {
  7845. return findFiberByHostInstance ? findFiberByHostInstance(instance) : null;
  7846. },
  7847. findHostInstancesForRefresh: null,
  7848. scheduleRefresh: null,
  7849. scheduleRoot: null,
  7850. setRefreshHandler: null,
  7851. getCurrentFiber: null
  7852. });
  7853. })({
  7854. findFiberByHostInstance: getInstanceFromTag,
  7855. bundleType: 0,
  7856. version: "16.13.0",
  7857. rendererPackageName: "react-native-renderer",
  7858. rendererConfig: {
  7859. getInspectorDataForViewTag: function() {
  7860. throw Error(
  7861. "getInspectorDataForViewTag() is not available in production"
  7862. );
  7863. },
  7864. getInspectorDataForViewAtPoint: function() {
  7865. throw Error(
  7866. "getInspectorDataForViewAtPoint() is not available in production."
  7867. );
  7868. }.bind(null, findNodeHandle)
  7869. }
  7870. });
  7871. exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
  7872. computeComponentStackForErrorReporting: function(reactTag) {
  7873. return (reactTag = getInstanceFromTag(reactTag))
  7874. ? getStackByFiberInDevAndProd(reactTag)
  7875. : "";
  7876. }
  7877. };
  7878. exports.createPortal = function(children, containerTag) {
  7879. return createPortal(
  7880. children,
  7881. containerTag,
  7882. null,
  7883. 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
  7884. );
  7885. };
  7886. exports.dispatchCommand = function(handle, command, args) {
  7887. null != handle._nativeTag &&
  7888. (handle._internalInstanceHandle
  7889. ? nativeFabricUIManager.dispatchCommand(
  7890. handle._internalInstanceHandle.stateNode.node,
  7891. command,
  7892. args
  7893. )
  7894. : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(
  7895. handle._nativeTag,
  7896. command,
  7897. args
  7898. ));
  7899. };
  7900. exports.findHostInstance_DEPRECATED = function(componentOrHandle) {
  7901. if (null == componentOrHandle) return null;
  7902. if (componentOrHandle._nativeTag) return componentOrHandle;
  7903. if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
  7904. return componentOrHandle.canonical;
  7905. componentOrHandle = findHostInstance(componentOrHandle);
  7906. return null == componentOrHandle
  7907. ? componentOrHandle
  7908. : componentOrHandle.canonical
  7909. ? componentOrHandle.canonical
  7910. : componentOrHandle;
  7911. };
  7912. exports.findNodeHandle = findNodeHandle;
  7913. exports.render = function(element, containerTag, callback) {
  7914. var root = roots.get(containerTag);
  7915. if (!root) {
  7916. root = new FiberRootNode(containerTag, 0, !1);
  7917. var uninitializedFiber = 0;
  7918. isDevToolsPresent && (uninitializedFiber |= 8);
  7919. uninitializedFiber = new FiberNode(3, null, null, uninitializedFiber);
  7920. root.current = uninitializedFiber;
  7921. uninitializedFiber.stateNode = root;
  7922. initializeUpdateQueue(uninitializedFiber);
  7923. roots.set(containerTag, root);
  7924. }
  7925. updateContainer(element, root, null, callback);
  7926. a: if (((element = root.current), element.child))
  7927. switch (element.child.tag) {
  7928. case 5:
  7929. element = element.child.stateNode;
  7930. break a;
  7931. default:
  7932. element = element.child.stateNode;
  7933. }
  7934. else element = null;
  7935. return element;
  7936. };
  7937. exports.unmountComponentAtNode = unmountComponentAtNode;
  7938. exports.unmountComponentAtNodeAndRemoveContainer = function(containerTag) {
  7939. unmountComponentAtNode(containerTag);
  7940. ReactNativePrivateInterface.UIManager.removeRootView(containerTag);
  7941. };
  7942. exports.unstable_batchedUpdates = batchedUpdates;