react-dom-profiling.profiling.js 593 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068
  1. /**
  2. * @license React
  3. * react-dom-profiling.profiling.js
  4. *
  5. * Copyright (c) Meta Platforms, Inc. and affiliates.
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE file in the root directory of this source tree.
  9. */
  10. /*
  11. Modernizr 3.0.0pre (Custom Build) | MIT
  12. */
  13. "use strict";
  14. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  15. "function" ===
  16. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
  17. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  18. var Scheduler = require("scheduler"),
  19. React = require("react"),
  20. ReactDOM = require("react-dom");
  21. function formatProdErrorMessage(code) {
  22. var url = "https://react.dev/errors/" + code;
  23. if (1 < arguments.length) {
  24. url += "?args[]=" + encodeURIComponent(arguments[1]);
  25. for (var i = 2; i < arguments.length; i++)
  26. url += "&args[]=" + encodeURIComponent(arguments[i]);
  27. }
  28. return (
  29. "Minified React error #" +
  30. code +
  31. "; visit " +
  32. url +
  33. " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
  34. );
  35. }
  36. function isValidContainer(node) {
  37. return !(
  38. !node ||
  39. (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)
  40. );
  41. }
  42. function getNearestMountedFiber(fiber) {
  43. var node = fiber,
  44. nearestMounted = fiber;
  45. if (fiber.alternate) for (; node.return; ) node = node.return;
  46. else {
  47. fiber = node;
  48. do
  49. (node = fiber),
  50. 0 !== (node.flags & 4098) && (nearestMounted = node.return),
  51. (fiber = node.return);
  52. while (fiber);
  53. }
  54. return 3 === node.tag ? nearestMounted : null;
  55. }
  56. function getSuspenseInstanceFromFiber(fiber) {
  57. if (13 === fiber.tag) {
  58. var suspenseState = fiber.memoizedState;
  59. null === suspenseState &&
  60. ((fiber = fiber.alternate),
  61. null !== fiber && (suspenseState = fiber.memoizedState));
  62. if (null !== suspenseState) return suspenseState.dehydrated;
  63. }
  64. return null;
  65. }
  66. function getActivityInstanceFromFiber(fiber) {
  67. if (31 === fiber.tag) {
  68. var activityState = fiber.memoizedState;
  69. null === activityState &&
  70. ((fiber = fiber.alternate),
  71. null !== fiber && (activityState = fiber.memoizedState));
  72. if (null !== activityState) return activityState.dehydrated;
  73. }
  74. return null;
  75. }
  76. function assertIsMounted(fiber) {
  77. if (getNearestMountedFiber(fiber) !== fiber)
  78. throw Error(formatProdErrorMessage(188));
  79. }
  80. function findCurrentFiberUsingSlowPath(fiber) {
  81. var alternate = fiber.alternate;
  82. if (!alternate) {
  83. alternate = getNearestMountedFiber(fiber);
  84. if (null === alternate) throw Error(formatProdErrorMessage(188));
  85. return alternate !== fiber ? null : fiber;
  86. }
  87. for (var a = fiber, b = alternate; ; ) {
  88. var parentA = a.return;
  89. if (null === parentA) break;
  90. var parentB = parentA.alternate;
  91. if (null === parentB) {
  92. b = parentA.return;
  93. if (null !== b) {
  94. a = b;
  95. continue;
  96. }
  97. break;
  98. }
  99. if (parentA.child === parentB.child) {
  100. for (parentB = parentA.child; parentB; ) {
  101. if (parentB === a) return assertIsMounted(parentA), fiber;
  102. if (parentB === b) return assertIsMounted(parentA), alternate;
  103. parentB = parentB.sibling;
  104. }
  105. throw Error(formatProdErrorMessage(188));
  106. }
  107. if (a.return !== b.return) (a = parentA), (b = parentB);
  108. else {
  109. for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {
  110. if (child$0 === a) {
  111. didFindChild = !0;
  112. a = parentA;
  113. b = parentB;
  114. break;
  115. }
  116. if (child$0 === b) {
  117. didFindChild = !0;
  118. b = parentA;
  119. a = parentB;
  120. break;
  121. }
  122. child$0 = child$0.sibling;
  123. }
  124. if (!didFindChild) {
  125. for (child$0 = parentB.child; child$0; ) {
  126. if (child$0 === a) {
  127. didFindChild = !0;
  128. a = parentB;
  129. b = parentA;
  130. break;
  131. }
  132. if (child$0 === b) {
  133. didFindChild = !0;
  134. b = parentB;
  135. a = parentA;
  136. break;
  137. }
  138. child$0 = child$0.sibling;
  139. }
  140. if (!didFindChild) throw Error(formatProdErrorMessage(189));
  141. }
  142. }
  143. if (a.alternate !== b) throw Error(formatProdErrorMessage(190));
  144. }
  145. if (3 !== a.tag) throw Error(formatProdErrorMessage(188));
  146. return a.stateNode.current === a ? fiber : alternate;
  147. }
  148. function findCurrentHostFiberImpl(node) {
  149. var tag = node.tag;
  150. if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
  151. for (node = node.child; null !== node; ) {
  152. tag = findCurrentHostFiberImpl(node);
  153. if (null !== tag) return tag;
  154. node = node.sibling;
  155. }
  156. return null;
  157. }
  158. var assign = Object.assign,
  159. REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
  160. REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  161. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  162. REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
  163. REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
  164. REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
  165. REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
  166. REACT_CONTEXT_TYPE = Symbol.for("react.context"),
  167. REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
  168. REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
  169. REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
  170. REACT_MEMO_TYPE = Symbol.for("react.memo"),
  171. REACT_LAZY_TYPE = Symbol.for("react.lazy");
  172. Symbol.for("react.scope");
  173. var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
  174. Symbol.for("react.legacy_hidden");
  175. Symbol.for("react.tracing_marker");
  176. var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
  177. Symbol.for("react.view_transition");
  178. var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
  179. function getIteratorFn(maybeIterable) {
  180. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  181. maybeIterable =
  182. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  183. maybeIterable["@@iterator"];
  184. return "function" === typeof maybeIterable ? maybeIterable : null;
  185. }
  186. var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
  187. function getComponentNameFromType(type) {
  188. if (null == type) return null;
  189. if ("function" === typeof type)
  190. return type.$$typeof === REACT_CLIENT_REFERENCE
  191. ? null
  192. : type.displayName || type.name || null;
  193. if ("string" === typeof type) return type;
  194. switch (type) {
  195. case REACT_FRAGMENT_TYPE:
  196. return "Fragment";
  197. case REACT_PROFILER_TYPE:
  198. return "Profiler";
  199. case REACT_STRICT_MODE_TYPE:
  200. return "StrictMode";
  201. case REACT_SUSPENSE_TYPE:
  202. return "Suspense";
  203. case REACT_SUSPENSE_LIST_TYPE:
  204. return "SuspenseList";
  205. case REACT_ACTIVITY_TYPE:
  206. return "Activity";
  207. }
  208. if ("object" === typeof type)
  209. switch (type.$$typeof) {
  210. case REACT_PORTAL_TYPE:
  211. return "Portal";
  212. case REACT_CONTEXT_TYPE:
  213. return type.displayName || "Context";
  214. case REACT_CONSUMER_TYPE:
  215. return (type._context.displayName || "Context") + ".Consumer";
  216. case REACT_FORWARD_REF_TYPE:
  217. var innerType = type.render;
  218. type = type.displayName;
  219. type ||
  220. ((type = innerType.displayName || innerType.name || ""),
  221. (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
  222. return type;
  223. case REACT_MEMO_TYPE:
  224. return (
  225. (innerType = type.displayName || null),
  226. null !== innerType
  227. ? innerType
  228. : getComponentNameFromType(type.type) || "Memo"
  229. );
  230. case REACT_LAZY_TYPE:
  231. innerType = type._payload;
  232. type = type._init;
  233. try {
  234. return getComponentNameFromType(type(innerType));
  235. } catch (x) {}
  236. }
  237. return null;
  238. }
  239. function getComponentNameFromFiber(fiber) {
  240. var type = fiber.type;
  241. switch (fiber.tag) {
  242. case 31:
  243. return "Activity";
  244. case 24:
  245. return "Cache";
  246. case 9:
  247. return (type._context.displayName || "Context") + ".Consumer";
  248. case 10:
  249. return type.displayName || "Context";
  250. case 18:
  251. return "DehydratedFragment";
  252. case 11:
  253. return (
  254. (fiber = type.render),
  255. (fiber = fiber.displayName || fiber.name || ""),
  256. type.displayName ||
  257. ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef")
  258. );
  259. case 7:
  260. return "Fragment";
  261. case 26:
  262. case 27:
  263. case 5:
  264. return type;
  265. case 4:
  266. return "Portal";
  267. case 3:
  268. return "Root";
  269. case 6:
  270. return "Text";
  271. case 16:
  272. return getComponentNameFromType(type);
  273. case 8:
  274. return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
  275. case 22:
  276. return "Offscreen";
  277. case 12:
  278. return "Profiler";
  279. case 21:
  280. return "Scope";
  281. case 13:
  282. return "Suspense";
  283. case 19:
  284. return "SuspenseList";
  285. case 25:
  286. return "TracingMarker";
  287. case 1:
  288. case 0:
  289. case 14:
  290. case 15:
  291. if ("function" === typeof type)
  292. return type.displayName || type.name || null;
  293. if ("string" === typeof type) return type;
  294. }
  295. return null;
  296. }
  297. var isArrayImpl = Array.isArray,
  298. ReactSharedInternals =
  299. React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  300. ReactDOMSharedInternals =
  301. ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  302. sharedNotPendingObject = {
  303. pending: !1,
  304. data: null,
  305. method: null,
  306. action: null
  307. },
  308. valueStack = [],
  309. index = -1;
  310. function createCursor(defaultValue) {
  311. return { current: defaultValue };
  312. }
  313. function pop(cursor) {
  314. 0 > index ||
  315. ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
  316. }
  317. function push(cursor, value) {
  318. index++;
  319. valueStack[index] = cursor.current;
  320. cursor.current = value;
  321. }
  322. var contextStackCursor = createCursor(null),
  323. contextFiberStackCursor = createCursor(null),
  324. rootInstanceStackCursor = createCursor(null),
  325. hostTransitionProviderCursor = createCursor(null);
  326. function pushHostContainer(fiber, nextRootInstance) {
  327. push(rootInstanceStackCursor, nextRootInstance);
  328. push(contextFiberStackCursor, fiber);
  329. push(contextStackCursor, null);
  330. switch (nextRootInstance.nodeType) {
  331. case 9:
  332. case 11:
  333. fiber = (fiber = nextRootInstance.documentElement)
  334. ? (fiber = fiber.namespaceURI)
  335. ? getOwnHostContext(fiber)
  336. : 0
  337. : 0;
  338. break;
  339. default:
  340. if (
  341. ((fiber = nextRootInstance.tagName),
  342. (nextRootInstance = nextRootInstance.namespaceURI))
  343. )
  344. (nextRootInstance = getOwnHostContext(nextRootInstance)),
  345. (fiber = getChildHostContextProd(nextRootInstance, fiber));
  346. else
  347. switch (fiber) {
  348. case "svg":
  349. fiber = 1;
  350. break;
  351. case "math":
  352. fiber = 2;
  353. break;
  354. default:
  355. fiber = 0;
  356. }
  357. }
  358. pop(contextStackCursor);
  359. push(contextStackCursor, fiber);
  360. }
  361. function popHostContainer() {
  362. pop(contextStackCursor);
  363. pop(contextFiberStackCursor);
  364. pop(rootInstanceStackCursor);
  365. }
  366. function pushHostContext(fiber) {
  367. null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);
  368. var context = contextStackCursor.current;
  369. var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);
  370. context !== JSCompiler_inline_result &&
  371. (push(contextFiberStackCursor, fiber),
  372. push(contextStackCursor, JSCompiler_inline_result));
  373. }
  374. function popHostContext(fiber) {
  375. contextFiberStackCursor.current === fiber &&
  376. (pop(contextStackCursor), pop(contextFiberStackCursor));
  377. hostTransitionProviderCursor.current === fiber &&
  378. (pop(hostTransitionProviderCursor),
  379. (HostTransitionContext._currentValue = sharedNotPendingObject));
  380. }
  381. var prefix, suffix;
  382. function describeBuiltInComponentFrame(name) {
  383. if (void 0 === prefix)
  384. try {
  385. throw Error();
  386. } catch (x) {
  387. var match = x.stack.trim().match(/\n( *(at )?)/);
  388. prefix = (match && match[1]) || "";
  389. suffix =
  390. -1 < x.stack.indexOf("\n at")
  391. ? " (<anonymous>)"
  392. : -1 < x.stack.indexOf("@")
  393. ? "@unknown:0:0"
  394. : "";
  395. }
  396. return "\n" + prefix + name + suffix;
  397. }
  398. var reentry = !1;
  399. function describeNativeComponentFrame(fn, construct) {
  400. if (!fn || reentry) return "";
  401. reentry = !0;
  402. var previousPrepareStackTrace = Error.prepareStackTrace;
  403. Error.prepareStackTrace = void 0;
  404. try {
  405. var RunInRootFrame = {
  406. DetermineComponentFrameRoot: function () {
  407. try {
  408. if (construct) {
  409. var Fake = function () {
  410. throw Error();
  411. };
  412. Object.defineProperty(Fake.prototype, "props", {
  413. set: function () {
  414. throw Error();
  415. }
  416. });
  417. if ("object" === typeof Reflect && Reflect.construct) {
  418. try {
  419. Reflect.construct(Fake, []);
  420. } catch (x) {
  421. var control = x;
  422. }
  423. Reflect.construct(fn, [], Fake);
  424. } else {
  425. try {
  426. Fake.call();
  427. } catch (x$1) {
  428. control = x$1;
  429. }
  430. fn.call(Fake.prototype);
  431. }
  432. } else {
  433. try {
  434. throw Error();
  435. } catch (x$2) {
  436. control = x$2;
  437. }
  438. (Fake = fn()) &&
  439. "function" === typeof Fake.catch &&
  440. Fake.catch(function () {});
  441. }
  442. } catch (sample) {
  443. if (sample && control && "string" === typeof sample.stack)
  444. return [sample.stack, control.stack];
  445. }
  446. return [null, null];
  447. }
  448. };
  449. RunInRootFrame.DetermineComponentFrameRoot.displayName =
  450. "DetermineComponentFrameRoot";
  451. var namePropDescriptor = Object.getOwnPropertyDescriptor(
  452. RunInRootFrame.DetermineComponentFrameRoot,
  453. "name"
  454. );
  455. namePropDescriptor &&
  456. namePropDescriptor.configurable &&
  457. Object.defineProperty(
  458. RunInRootFrame.DetermineComponentFrameRoot,
  459. "name",
  460. { value: "DetermineComponentFrameRoot" }
  461. );
  462. var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
  463. sampleStack = _RunInRootFrame$Deter[0],
  464. controlStack = _RunInRootFrame$Deter[1];
  465. if (sampleStack && controlStack) {
  466. var sampleLines = sampleStack.split("\n"),
  467. controlLines = controlStack.split("\n");
  468. for (
  469. namePropDescriptor = RunInRootFrame = 0;
  470. RunInRootFrame < sampleLines.length &&
  471. !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
  472. )
  473. RunInRootFrame++;
  474. for (
  475. ;
  476. namePropDescriptor < controlLines.length &&
  477. !controlLines[namePropDescriptor].includes(
  478. "DetermineComponentFrameRoot"
  479. );
  480. )
  481. namePropDescriptor++;
  482. if (
  483. RunInRootFrame === sampleLines.length ||
  484. namePropDescriptor === controlLines.length
  485. )
  486. for (
  487. RunInRootFrame = sampleLines.length - 1,
  488. namePropDescriptor = controlLines.length - 1;
  489. 1 <= RunInRootFrame &&
  490. 0 <= namePropDescriptor &&
  491. sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
  492. )
  493. namePropDescriptor--;
  494. for (
  495. ;
  496. 1 <= RunInRootFrame && 0 <= namePropDescriptor;
  497. RunInRootFrame--, namePropDescriptor--
  498. )
  499. if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
  500. if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
  501. do
  502. if (
  503. (RunInRootFrame--,
  504. namePropDescriptor--,
  505. 0 > namePropDescriptor ||
  506. sampleLines[RunInRootFrame] !==
  507. controlLines[namePropDescriptor])
  508. ) {
  509. var frame =
  510. "\n" +
  511. sampleLines[RunInRootFrame].replace(" at new ", " at ");
  512. fn.displayName &&
  513. frame.includes("<anonymous>") &&
  514. (frame = frame.replace("<anonymous>", fn.displayName));
  515. return frame;
  516. }
  517. while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
  518. }
  519. break;
  520. }
  521. }
  522. } finally {
  523. (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
  524. }
  525. return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
  526. ? describeBuiltInComponentFrame(previousPrepareStackTrace)
  527. : "";
  528. }
  529. function describeFiber(fiber, childFiber) {
  530. switch (fiber.tag) {
  531. case 26:
  532. case 27:
  533. case 5:
  534. return describeBuiltInComponentFrame(fiber.type);
  535. case 16:
  536. return describeBuiltInComponentFrame("Lazy");
  537. case 13:
  538. return fiber.child !== childFiber && null !== childFiber
  539. ? describeBuiltInComponentFrame("Suspense Fallback")
  540. : describeBuiltInComponentFrame("Suspense");
  541. case 19:
  542. return describeBuiltInComponentFrame("SuspenseList");
  543. case 0:
  544. case 15:
  545. return describeNativeComponentFrame(fiber.type, !1);
  546. case 11:
  547. return describeNativeComponentFrame(fiber.type.render, !1);
  548. case 1:
  549. return describeNativeComponentFrame(fiber.type, !0);
  550. case 31:
  551. return describeBuiltInComponentFrame("Activity");
  552. default:
  553. return "";
  554. }
  555. }
  556. function getStackByFiberInDevAndProd(workInProgress) {
  557. try {
  558. var info = "",
  559. previous = null;
  560. do
  561. (info += describeFiber(workInProgress, previous)),
  562. (previous = workInProgress),
  563. (workInProgress = workInProgress.return);
  564. while (workInProgress);
  565. return info;
  566. } catch (x) {
  567. return "\nError generating stack: " + x.message + "\n" + x.stack;
  568. }
  569. }
  570. var hasOwnProperty = Object.prototype.hasOwnProperty,
  571. scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
  572. cancelCallback$1 = Scheduler.unstable_cancelCallback,
  573. shouldYield = Scheduler.unstable_shouldYield,
  574. requestPaint = Scheduler.unstable_requestPaint,
  575. now$1 = Scheduler.unstable_now,
  576. getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
  577. ImmediatePriority = Scheduler.unstable_ImmediatePriority,
  578. UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  579. NormalPriority$1 = Scheduler.unstable_NormalPriority,
  580. LowPriority = Scheduler.unstable_LowPriority,
  581. IdlePriority = Scheduler.unstable_IdlePriority,
  582. log$1 = Scheduler.log,
  583. unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
  584. rendererID = null,
  585. injectedHook = null,
  586. isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
  587. function setIsStrictModeForDevtools(newIsStrictMode) {
  588. "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
  589. if (injectedHook && "function" === typeof injectedHook.setStrictMode)
  590. try {
  591. injectedHook.setStrictMode(rendererID, newIsStrictMode);
  592. } catch (err) {}
  593. }
  594. var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
  595. log = Math.log,
  596. LN2 = Math.LN2;
  597. function clz32Fallback(x) {
  598. x >>>= 0;
  599. return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
  600. }
  601. var nextTransitionUpdateLane = 256,
  602. nextTransitionDeferredLane = 262144,
  603. nextRetryLane = 4194304;
  604. function getHighestPriorityLanes(lanes) {
  605. var pendingSyncLanes = lanes & 42;
  606. if (0 !== pendingSyncLanes) return pendingSyncLanes;
  607. switch (lanes & -lanes) {
  608. case 1:
  609. return 1;
  610. case 2:
  611. return 2;
  612. case 4:
  613. return 4;
  614. case 8:
  615. return 8;
  616. case 16:
  617. return 16;
  618. case 32:
  619. return 32;
  620. case 64:
  621. return 64;
  622. case 128:
  623. return 128;
  624. case 256:
  625. case 512:
  626. case 1024:
  627. case 2048:
  628. case 4096:
  629. case 8192:
  630. case 16384:
  631. case 32768:
  632. case 65536:
  633. case 131072:
  634. return lanes & 261888;
  635. case 262144:
  636. case 524288:
  637. case 1048576:
  638. case 2097152:
  639. return lanes & 3932160;
  640. case 4194304:
  641. case 8388608:
  642. case 16777216:
  643. case 33554432:
  644. return lanes & 62914560;
  645. case 67108864:
  646. return 67108864;
  647. case 134217728:
  648. return 134217728;
  649. case 268435456:
  650. return 268435456;
  651. case 536870912:
  652. return 536870912;
  653. case 1073741824:
  654. return 0;
  655. default:
  656. return lanes;
  657. }
  658. }
  659. function getNextLanes(root, wipLanes, rootHasPendingCommit) {
  660. var pendingLanes = root.pendingLanes;
  661. if (0 === pendingLanes) return 0;
  662. var nextLanes = 0,
  663. suspendedLanes = root.suspendedLanes,
  664. pingedLanes = root.pingedLanes;
  665. root = root.warmLanes;
  666. var nonIdlePendingLanes = pendingLanes & 134217727;
  667. 0 !== nonIdlePendingLanes
  668. ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
  669. 0 !== pendingLanes
  670. ? (nextLanes = getHighestPriorityLanes(pendingLanes))
  671. : ((pingedLanes &= nonIdlePendingLanes),
  672. 0 !== pingedLanes
  673. ? (nextLanes = getHighestPriorityLanes(pingedLanes))
  674. : rootHasPendingCommit ||
  675. ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
  676. 0 !== rootHasPendingCommit &&
  677. (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
  678. : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
  679. 0 !== nonIdlePendingLanes
  680. ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
  681. : 0 !== pingedLanes
  682. ? (nextLanes = getHighestPriorityLanes(pingedLanes))
  683. : rootHasPendingCommit ||
  684. ((rootHasPendingCommit = pendingLanes & ~root),
  685. 0 !== rootHasPendingCommit &&
  686. (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
  687. return 0 === nextLanes
  688. ? 0
  689. : 0 !== wipLanes &&
  690. wipLanes !== nextLanes &&
  691. 0 === (wipLanes & suspendedLanes) &&
  692. ((suspendedLanes = nextLanes & -nextLanes),
  693. (rootHasPendingCommit = wipLanes & -wipLanes),
  694. suspendedLanes >= rootHasPendingCommit ||
  695. (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
  696. ? wipLanes
  697. : nextLanes;
  698. }
  699. function checkIfRootIsPrerendering(root, renderLanes) {
  700. return (
  701. 0 ===
  702. (root.pendingLanes &
  703. ~(root.suspendedLanes & ~root.pingedLanes) &
  704. renderLanes)
  705. );
  706. }
  707. function computeExpirationTime(lane, currentTime) {
  708. switch (lane) {
  709. case 1:
  710. case 2:
  711. case 4:
  712. case 8:
  713. case 64:
  714. return currentTime + 250;
  715. case 16:
  716. case 32:
  717. case 128:
  718. case 256:
  719. case 512:
  720. case 1024:
  721. case 2048:
  722. case 4096:
  723. case 8192:
  724. case 16384:
  725. case 32768:
  726. case 65536:
  727. case 131072:
  728. case 262144:
  729. case 524288:
  730. case 1048576:
  731. case 2097152:
  732. return currentTime + 5e3;
  733. case 4194304:
  734. case 8388608:
  735. case 16777216:
  736. case 33554432:
  737. return -1;
  738. case 67108864:
  739. case 134217728:
  740. case 268435456:
  741. case 536870912:
  742. case 1073741824:
  743. return -1;
  744. default:
  745. return -1;
  746. }
  747. }
  748. function claimNextRetryLane() {
  749. var lane = nextRetryLane;
  750. nextRetryLane <<= 1;
  751. 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
  752. return lane;
  753. }
  754. function createLaneMap(initial) {
  755. for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
  756. return laneMap;
  757. }
  758. function markRootUpdated$1(root, updateLane) {
  759. root.pendingLanes |= updateLane;
  760. 268435456 !== updateLane &&
  761. ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));
  762. }
  763. function markRootFinished(
  764. root,
  765. finishedLanes,
  766. remainingLanes,
  767. spawnedLane,
  768. updatedLanes,
  769. suspendedRetryLanes
  770. ) {
  771. var previouslyPendingLanes = root.pendingLanes;
  772. root.pendingLanes = remainingLanes;
  773. root.suspendedLanes = 0;
  774. root.pingedLanes = 0;
  775. root.warmLanes = 0;
  776. root.expiredLanes &= remainingLanes;
  777. root.entangledLanes &= remainingLanes;
  778. root.errorRecoveryDisabledLanes &= remainingLanes;
  779. root.shellSuspendCounter = 0;
  780. var entanglements = root.entanglements,
  781. expirationTimes = root.expirationTimes,
  782. hiddenUpdates = root.hiddenUpdates;
  783. for (
  784. remainingLanes = previouslyPendingLanes & ~remainingLanes;
  785. 0 < remainingLanes;
  786. ) {
  787. var index$7 = 31 - clz32(remainingLanes),
  788. lane = 1 << index$7;
  789. entanglements[index$7] = 0;
  790. expirationTimes[index$7] = -1;
  791. var hiddenUpdatesForLane = hiddenUpdates[index$7];
  792. if (null !== hiddenUpdatesForLane)
  793. for (
  794. hiddenUpdates[index$7] = null, index$7 = 0;
  795. index$7 < hiddenUpdatesForLane.length;
  796. index$7++
  797. ) {
  798. var update = hiddenUpdatesForLane[index$7];
  799. null !== update && (update.lane &= -536870913);
  800. }
  801. remainingLanes &= ~lane;
  802. }
  803. 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
  804. 0 !== suspendedRetryLanes &&
  805. 0 === updatedLanes &&
  806. 0 !== root.tag &&
  807. (root.suspendedLanes |=
  808. suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
  809. }
  810. function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
  811. root.pendingLanes |= spawnedLane;
  812. root.suspendedLanes &= ~spawnedLane;
  813. var spawnedLaneIndex = 31 - clz32(spawnedLane);
  814. root.entangledLanes |= spawnedLane;
  815. root.entanglements[spawnedLaneIndex] =
  816. root.entanglements[spawnedLaneIndex] |
  817. 1073741824 |
  818. (entangledLanes & 261930);
  819. }
  820. function markRootEntangled(root, entangledLanes) {
  821. var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
  822. for (root = root.entanglements; rootEntangledLanes; ) {
  823. var index$8 = 31 - clz32(rootEntangledLanes),
  824. lane = 1 << index$8;
  825. (lane & entangledLanes) | (root[index$8] & entangledLanes) &&
  826. (root[index$8] |= entangledLanes);
  827. rootEntangledLanes &= ~lane;
  828. }
  829. }
  830. function getBumpedLaneForHydration(root, renderLanes) {
  831. var renderLane = renderLanes & -renderLanes;
  832. renderLane =
  833. 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
  834. return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
  835. ? 0
  836. : renderLane;
  837. }
  838. function getBumpedLaneForHydrationByLane(lane) {
  839. switch (lane) {
  840. case 2:
  841. lane = 1;
  842. break;
  843. case 8:
  844. lane = 4;
  845. break;
  846. case 32:
  847. lane = 16;
  848. break;
  849. case 256:
  850. case 512:
  851. case 1024:
  852. case 2048:
  853. case 4096:
  854. case 8192:
  855. case 16384:
  856. case 32768:
  857. case 65536:
  858. case 131072:
  859. case 262144:
  860. case 524288:
  861. case 1048576:
  862. case 2097152:
  863. case 4194304:
  864. case 8388608:
  865. case 16777216:
  866. case 33554432:
  867. lane = 128;
  868. break;
  869. case 268435456:
  870. lane = 134217728;
  871. break;
  872. default:
  873. lane = 0;
  874. }
  875. return lane;
  876. }
  877. function addFiberToLanesMap(root, fiber, lanes) {
  878. if (isDevToolsPresent)
  879. for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
  880. var index$10 = 31 - clz32(lanes),
  881. lane = 1 << index$10;
  882. root[index$10].add(fiber);
  883. lanes &= ~lane;
  884. }
  885. }
  886. function movePendingFibersToMemoized(root, lanes) {
  887. if (isDevToolsPresent)
  888. for (
  889. var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
  890. memoizedUpdaters = root.memoizedUpdaters;
  891. 0 < lanes;
  892. ) {
  893. var index$11 = 31 - clz32(lanes);
  894. root = 1 << index$11;
  895. index$11 = pendingUpdatersLaneMap[index$11];
  896. 0 < index$11.size &&
  897. (index$11.forEach(function (fiber) {
  898. var alternate = fiber.alternate;
  899. (null !== alternate && memoizedUpdaters.has(alternate)) ||
  900. memoizedUpdaters.add(fiber);
  901. }),
  902. index$11.clear());
  903. lanes &= ~root;
  904. }
  905. }
  906. function lanesToEventPriority(lanes) {
  907. lanes &= -lanes;
  908. return 2 < lanes
  909. ? 8 < lanes
  910. ? 0 !== (lanes & 134217727)
  911. ? 32
  912. : 268435456
  913. : 8
  914. : 2;
  915. }
  916. function resolveUpdatePriority() {
  917. var updatePriority = ReactDOMSharedInternals.p;
  918. if (0 !== updatePriority) return updatePriority;
  919. updatePriority = window.event;
  920. return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);
  921. }
  922. function runWithPriority(priority, fn) {
  923. var previousPriority = ReactDOMSharedInternals.p;
  924. try {
  925. return (ReactDOMSharedInternals.p = priority), fn();
  926. } finally {
  927. ReactDOMSharedInternals.p = previousPriority;
  928. }
  929. }
  930. var randomKey = Math.random().toString(36).slice(2),
  931. internalInstanceKey = "__reactFiber$" + randomKey,
  932. internalPropsKey = "__reactProps$" + randomKey,
  933. internalContainerInstanceKey = "__reactContainer$" + randomKey,
  934. internalEventHandlersKey = "__reactEvents$" + randomKey,
  935. internalEventHandlerListenersKey = "__reactListeners$" + randomKey,
  936. internalEventHandlesSetKey = "__reactHandles$" + randomKey,
  937. internalRootNodeResourcesKey = "__reactResources$" + randomKey,
  938. internalHoistableMarker = "__reactMarker$" + randomKey;
  939. function detachDeletedInstance(node) {
  940. delete node[internalInstanceKey];
  941. delete node[internalPropsKey];
  942. delete node[internalEventHandlersKey];
  943. delete node[internalEventHandlerListenersKey];
  944. delete node[internalEventHandlesSetKey];
  945. }
  946. function getClosestInstanceFromNode(targetNode) {
  947. var targetInst = targetNode[internalInstanceKey];
  948. if (targetInst) return targetInst;
  949. for (var parentNode = targetNode.parentNode; parentNode; ) {
  950. if (
  951. (targetInst =
  952. parentNode[internalContainerInstanceKey] ||
  953. parentNode[internalInstanceKey])
  954. ) {
  955. parentNode = targetInst.alternate;
  956. if (
  957. null !== targetInst.child ||
  958. (null !== parentNode && null !== parentNode.child)
  959. )
  960. for (
  961. targetNode = getParentHydrationBoundary(targetNode);
  962. null !== targetNode;
  963. ) {
  964. if ((parentNode = targetNode[internalInstanceKey])) return parentNode;
  965. targetNode = getParentHydrationBoundary(targetNode);
  966. }
  967. return targetInst;
  968. }
  969. targetNode = parentNode;
  970. parentNode = targetNode.parentNode;
  971. }
  972. return null;
  973. }
  974. function getInstanceFromNode(node) {
  975. if (
  976. (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
  977. ) {
  978. var tag = node.tag;
  979. if (
  980. 5 === tag ||
  981. 6 === tag ||
  982. 13 === tag ||
  983. 31 === tag ||
  984. 26 === tag ||
  985. 27 === tag ||
  986. 3 === tag
  987. )
  988. return node;
  989. }
  990. return null;
  991. }
  992. function getNodeFromInstance(inst) {
  993. var tag = inst.tag;
  994. if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;
  995. throw Error(formatProdErrorMessage(33));
  996. }
  997. function getResourcesFromRoot(root) {
  998. var resources = root[internalRootNodeResourcesKey];
  999. resources ||
  1000. (resources = root[internalRootNodeResourcesKey] =
  1001. { hoistableStyles: new Map(), hoistableScripts: new Map() });
  1002. return resources;
  1003. }
  1004. function markNodeAsHoistable(node) {
  1005. node[internalHoistableMarker] = !0;
  1006. }
  1007. var allNativeEvents = new Set(),
  1008. registrationNameDependencies = {};
  1009. function registerTwoPhaseEvent(registrationName, dependencies) {
  1010. registerDirectEvent(registrationName, dependencies);
  1011. registerDirectEvent(registrationName + "Capture", dependencies);
  1012. }
  1013. function registerDirectEvent(registrationName, dependencies) {
  1014. registrationNameDependencies[registrationName] = dependencies;
  1015. for (
  1016. registrationName = 0;
  1017. registrationName < dependencies.length;
  1018. registrationName++
  1019. )
  1020. allNativeEvents.add(dependencies[registrationName]);
  1021. }
  1022. var VALID_ATTRIBUTE_NAME_REGEX = RegExp(
  1023. "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
  1024. ),
  1025. illegalAttributeNameCache = {},
  1026. validatedAttributeNameCache = {};
  1027. function isAttributeNameSafe(attributeName) {
  1028. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
  1029. return !0;
  1030. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
  1031. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
  1032. return (validatedAttributeNameCache[attributeName] = !0);
  1033. illegalAttributeNameCache[attributeName] = !0;
  1034. return !1;
  1035. }
  1036. function setValueForAttribute(node, name, value) {
  1037. if (isAttributeNameSafe(name))
  1038. if (null === value) node.removeAttribute(name);
  1039. else {
  1040. switch (typeof value) {
  1041. case "undefined":
  1042. case "function":
  1043. case "symbol":
  1044. node.removeAttribute(name);
  1045. return;
  1046. case "boolean":
  1047. var prefix$12 = name.toLowerCase().slice(0, 5);
  1048. if ("data-" !== prefix$12 && "aria-" !== prefix$12) {
  1049. node.removeAttribute(name);
  1050. return;
  1051. }
  1052. }
  1053. node.setAttribute(name, "" + value);
  1054. }
  1055. }
  1056. function setValueForKnownAttribute(node, name, value) {
  1057. if (null === value) node.removeAttribute(name);
  1058. else {
  1059. switch (typeof value) {
  1060. case "undefined":
  1061. case "function":
  1062. case "symbol":
  1063. case "boolean":
  1064. node.removeAttribute(name);
  1065. return;
  1066. }
  1067. node.setAttribute(name, "" + value);
  1068. }
  1069. }
  1070. function setValueForNamespacedAttribute(node, namespace, name, value) {
  1071. if (null === value) node.removeAttribute(name);
  1072. else {
  1073. switch (typeof value) {
  1074. case "undefined":
  1075. case "function":
  1076. case "symbol":
  1077. case "boolean":
  1078. node.removeAttribute(name);
  1079. return;
  1080. }
  1081. node.setAttributeNS(namespace, name, "" + value);
  1082. }
  1083. }
  1084. function getToStringValue(value) {
  1085. switch (typeof value) {
  1086. case "bigint":
  1087. case "boolean":
  1088. case "number":
  1089. case "string":
  1090. case "undefined":
  1091. return value;
  1092. case "object":
  1093. return value;
  1094. default:
  1095. return "";
  1096. }
  1097. }
  1098. function isCheckable(elem) {
  1099. var type = elem.type;
  1100. return (
  1101. (elem = elem.nodeName) &&
  1102. "input" === elem.toLowerCase() &&
  1103. ("checkbox" === type || "radio" === type)
  1104. );
  1105. }
  1106. function trackValueOnNode(node, valueField, currentValue) {
  1107. var descriptor = Object.getOwnPropertyDescriptor(
  1108. node.constructor.prototype,
  1109. valueField
  1110. );
  1111. if (
  1112. !node.hasOwnProperty(valueField) &&
  1113. "undefined" !== typeof descriptor &&
  1114. "function" === typeof descriptor.get &&
  1115. "function" === typeof descriptor.set
  1116. ) {
  1117. var get = descriptor.get,
  1118. set = descriptor.set;
  1119. Object.defineProperty(node, valueField, {
  1120. configurable: !0,
  1121. get: function () {
  1122. return get.call(this);
  1123. },
  1124. set: function (value) {
  1125. currentValue = "" + value;
  1126. set.call(this, value);
  1127. }
  1128. });
  1129. Object.defineProperty(node, valueField, {
  1130. enumerable: descriptor.enumerable
  1131. });
  1132. return {
  1133. getValue: function () {
  1134. return currentValue;
  1135. },
  1136. setValue: function (value) {
  1137. currentValue = "" + value;
  1138. },
  1139. stopTracking: function () {
  1140. node._valueTracker = null;
  1141. delete node[valueField];
  1142. }
  1143. };
  1144. }
  1145. }
  1146. function track(node) {
  1147. if (!node._valueTracker) {
  1148. var valueField = isCheckable(node) ? "checked" : "value";
  1149. node._valueTracker = trackValueOnNode(
  1150. node,
  1151. valueField,
  1152. "" + node[valueField]
  1153. );
  1154. }
  1155. }
  1156. function updateValueIfChanged(node) {
  1157. if (!node) return !1;
  1158. var tracker = node._valueTracker;
  1159. if (!tracker) return !0;
  1160. var lastValue = tracker.getValue();
  1161. var value = "";
  1162. node &&
  1163. (value = isCheckable(node)
  1164. ? node.checked
  1165. ? "true"
  1166. : "false"
  1167. : node.value);
  1168. node = value;
  1169. return node !== lastValue ? (tracker.setValue(node), !0) : !1;
  1170. }
  1171. function getActiveElement(doc) {
  1172. doc = doc || ("undefined" !== typeof document ? document : void 0);
  1173. if ("undefined" === typeof doc) return null;
  1174. try {
  1175. return doc.activeElement || doc.body;
  1176. } catch (e) {
  1177. return doc.body;
  1178. }
  1179. }
  1180. var escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g;
  1181. function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
  1182. return value.replace(
  1183. escapeSelectorAttributeValueInsideDoubleQuotesRegex,
  1184. function (ch) {
  1185. return "\\" + ch.charCodeAt(0).toString(16) + " ";
  1186. }
  1187. );
  1188. }
  1189. function updateInput(
  1190. element,
  1191. value,
  1192. defaultValue,
  1193. lastDefaultValue,
  1194. checked,
  1195. defaultChecked,
  1196. type,
  1197. name
  1198. ) {
  1199. element.name = "";
  1200. null != type &&
  1201. "function" !== typeof type &&
  1202. "symbol" !== typeof type &&
  1203. "boolean" !== typeof type
  1204. ? (element.type = type)
  1205. : element.removeAttribute("type");
  1206. if (null != value)
  1207. if ("number" === type) {
  1208. if ((0 === value && "" === element.value) || element.value != value)
  1209. element.value = "" + getToStringValue(value);
  1210. } else
  1211. element.value !== "" + getToStringValue(value) &&
  1212. (element.value = "" + getToStringValue(value));
  1213. else
  1214. ("submit" !== type && "reset" !== type) || element.removeAttribute("value");
  1215. null != value
  1216. ? setDefaultValue(element, type, getToStringValue(value))
  1217. : null != defaultValue
  1218. ? setDefaultValue(element, type, getToStringValue(defaultValue))
  1219. : null != lastDefaultValue && element.removeAttribute("value");
  1220. null == checked &&
  1221. null != defaultChecked &&
  1222. (element.defaultChecked = !!defaultChecked);
  1223. null != checked &&
  1224. (element.checked =
  1225. checked && "function" !== typeof checked && "symbol" !== typeof checked);
  1226. null != name &&
  1227. "function" !== typeof name &&
  1228. "symbol" !== typeof name &&
  1229. "boolean" !== typeof name
  1230. ? (element.name = "" + getToStringValue(name))
  1231. : element.removeAttribute("name");
  1232. }
  1233. function initInput(
  1234. element,
  1235. value,
  1236. defaultValue,
  1237. checked,
  1238. defaultChecked,
  1239. type,
  1240. name,
  1241. isHydrating
  1242. ) {
  1243. null != type &&
  1244. "function" !== typeof type &&
  1245. "symbol" !== typeof type &&
  1246. "boolean" !== typeof type &&
  1247. (element.type = type);
  1248. if (null != value || null != defaultValue) {
  1249. if (
  1250. !(
  1251. ("submit" !== type && "reset" !== type) ||
  1252. (void 0 !== value && null !== value)
  1253. )
  1254. ) {
  1255. track(element);
  1256. return;
  1257. }
  1258. defaultValue =
  1259. null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  1260. value = null != value ? "" + getToStringValue(value) : defaultValue;
  1261. isHydrating || value === element.value || (element.value = value);
  1262. element.defaultValue = value;
  1263. }
  1264. checked = null != checked ? checked : defaultChecked;
  1265. checked =
  1266. "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
  1267. element.checked = isHydrating ? element.checked : !!checked;
  1268. element.defaultChecked = !!checked;
  1269. null != name &&
  1270. "function" !== typeof name &&
  1271. "symbol" !== typeof name &&
  1272. "boolean" !== typeof name &&
  1273. (element.name = name);
  1274. track(element);
  1275. }
  1276. function setDefaultValue(node, type, value) {
  1277. ("number" === type && getActiveElement(node.ownerDocument) === node) ||
  1278. node.defaultValue === "" + value ||
  1279. (node.defaultValue = "" + value);
  1280. }
  1281. function updateOptions(node, multiple, propValue, setDefaultSelected) {
  1282. node = node.options;
  1283. if (multiple) {
  1284. multiple = {};
  1285. for (var i = 0; i < propValue.length; i++)
  1286. multiple["$" + propValue[i]] = !0;
  1287. for (propValue = 0; propValue < node.length; propValue++)
  1288. (i = multiple.hasOwnProperty("$" + node[propValue].value)),
  1289. node[propValue].selected !== i && (node[propValue].selected = i),
  1290. i && setDefaultSelected && (node[propValue].defaultSelected = !0);
  1291. } else {
  1292. propValue = "" + getToStringValue(propValue);
  1293. multiple = null;
  1294. for (i = 0; i < node.length; i++) {
  1295. if (node[i].value === propValue) {
  1296. node[i].selected = !0;
  1297. setDefaultSelected && (node[i].defaultSelected = !0);
  1298. return;
  1299. }
  1300. null !== multiple || node[i].disabled || (multiple = node[i]);
  1301. }
  1302. null !== multiple && (multiple.selected = !0);
  1303. }
  1304. }
  1305. function updateTextarea(element, value, defaultValue) {
  1306. if (
  1307. null != value &&
  1308. ((value = "" + getToStringValue(value)),
  1309. value !== element.value && (element.value = value),
  1310. null == defaultValue)
  1311. ) {
  1312. element.defaultValue !== value && (element.defaultValue = value);
  1313. return;
  1314. }
  1315. element.defaultValue =
  1316. null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  1317. }
  1318. function initTextarea(element, value, defaultValue, children) {
  1319. if (null == value) {
  1320. if (null != children) {
  1321. if (null != defaultValue) throw Error(formatProdErrorMessage(92));
  1322. if (isArrayImpl(children)) {
  1323. if (1 < children.length) throw Error(formatProdErrorMessage(93));
  1324. children = children[0];
  1325. }
  1326. defaultValue = children;
  1327. }
  1328. null == defaultValue && (defaultValue = "");
  1329. value = defaultValue;
  1330. }
  1331. defaultValue = getToStringValue(value);
  1332. element.defaultValue = defaultValue;
  1333. children = element.textContent;
  1334. children === defaultValue &&
  1335. "" !== children &&
  1336. null !== children &&
  1337. (element.value = children);
  1338. track(element);
  1339. }
  1340. function setTextContent(node, text) {
  1341. if (text) {
  1342. var firstChild = node.firstChild;
  1343. if (
  1344. firstChild &&
  1345. firstChild === node.lastChild &&
  1346. 3 === firstChild.nodeType
  1347. ) {
  1348. firstChild.nodeValue = text;
  1349. return;
  1350. }
  1351. }
  1352. node.textContent = text;
  1353. }
  1354. var unitlessNumbers = new Set(
  1355. "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
  1356. " "
  1357. )
  1358. );
  1359. function setValueForStyle(style, styleName, value) {
  1360. var isCustomProperty = 0 === styleName.indexOf("--");
  1361. null == value || "boolean" === typeof value || "" === value
  1362. ? isCustomProperty
  1363. ? style.setProperty(styleName, "")
  1364. : "float" === styleName
  1365. ? (style.cssFloat = "")
  1366. : (style[styleName] = "")
  1367. : isCustomProperty
  1368. ? style.setProperty(styleName, value)
  1369. : "number" !== typeof value ||
  1370. 0 === value ||
  1371. unitlessNumbers.has(styleName)
  1372. ? "float" === styleName
  1373. ? (style.cssFloat = value)
  1374. : (style[styleName] = ("" + value).trim())
  1375. : (style[styleName] = value + "px");
  1376. }
  1377. function setValueForStyles(node, styles, prevStyles) {
  1378. if (null != styles && "object" !== typeof styles)
  1379. throw Error(formatProdErrorMessage(62));
  1380. node = node.style;
  1381. if (null != prevStyles) {
  1382. for (var styleName in prevStyles)
  1383. !prevStyles.hasOwnProperty(styleName) ||
  1384. (null != styles && styles.hasOwnProperty(styleName)) ||
  1385. (0 === styleName.indexOf("--")
  1386. ? node.setProperty(styleName, "")
  1387. : "float" === styleName
  1388. ? (node.cssFloat = "")
  1389. : (node[styleName] = ""));
  1390. for (var styleName$18 in styles)
  1391. (styleName = styles[styleName$18]),
  1392. styles.hasOwnProperty(styleName$18) &&
  1393. prevStyles[styleName$18] !== styleName &&
  1394. setValueForStyle(node, styleName$18, styleName);
  1395. } else
  1396. for (var styleName$19 in styles)
  1397. styles.hasOwnProperty(styleName$19) &&
  1398. setValueForStyle(node, styleName$19, styles[styleName$19]);
  1399. }
  1400. function isCustomElement(tagName) {
  1401. if (-1 === tagName.indexOf("-")) return !1;
  1402. switch (tagName) {
  1403. case "annotation-xml":
  1404. case "color-profile":
  1405. case "font-face":
  1406. case "font-face-src":
  1407. case "font-face-uri":
  1408. case "font-face-format":
  1409. case "font-face-name":
  1410. case "missing-glyph":
  1411. return !1;
  1412. default:
  1413. return !0;
  1414. }
  1415. }
  1416. var aliases = new Map([
  1417. ["acceptCharset", "accept-charset"],
  1418. ["htmlFor", "for"],
  1419. ["httpEquiv", "http-equiv"],
  1420. ["crossOrigin", "crossorigin"],
  1421. ["accentHeight", "accent-height"],
  1422. ["alignmentBaseline", "alignment-baseline"],
  1423. ["arabicForm", "arabic-form"],
  1424. ["baselineShift", "baseline-shift"],
  1425. ["capHeight", "cap-height"],
  1426. ["clipPath", "clip-path"],
  1427. ["clipRule", "clip-rule"],
  1428. ["colorInterpolation", "color-interpolation"],
  1429. ["colorInterpolationFilters", "color-interpolation-filters"],
  1430. ["colorProfile", "color-profile"],
  1431. ["colorRendering", "color-rendering"],
  1432. ["dominantBaseline", "dominant-baseline"],
  1433. ["enableBackground", "enable-background"],
  1434. ["fillOpacity", "fill-opacity"],
  1435. ["fillRule", "fill-rule"],
  1436. ["floodColor", "flood-color"],
  1437. ["floodOpacity", "flood-opacity"],
  1438. ["fontFamily", "font-family"],
  1439. ["fontSize", "font-size"],
  1440. ["fontSizeAdjust", "font-size-adjust"],
  1441. ["fontStretch", "font-stretch"],
  1442. ["fontStyle", "font-style"],
  1443. ["fontVariant", "font-variant"],
  1444. ["fontWeight", "font-weight"],
  1445. ["glyphName", "glyph-name"],
  1446. ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
  1447. ["glyphOrientationVertical", "glyph-orientation-vertical"],
  1448. ["horizAdvX", "horiz-adv-x"],
  1449. ["horizOriginX", "horiz-origin-x"],
  1450. ["imageRendering", "image-rendering"],
  1451. ["letterSpacing", "letter-spacing"],
  1452. ["lightingColor", "lighting-color"],
  1453. ["markerEnd", "marker-end"],
  1454. ["markerMid", "marker-mid"],
  1455. ["markerStart", "marker-start"],
  1456. ["overlinePosition", "overline-position"],
  1457. ["overlineThickness", "overline-thickness"],
  1458. ["paintOrder", "paint-order"],
  1459. ["panose-1", "panose-1"],
  1460. ["pointerEvents", "pointer-events"],
  1461. ["renderingIntent", "rendering-intent"],
  1462. ["shapeRendering", "shape-rendering"],
  1463. ["stopColor", "stop-color"],
  1464. ["stopOpacity", "stop-opacity"],
  1465. ["strikethroughPosition", "strikethrough-position"],
  1466. ["strikethroughThickness", "strikethrough-thickness"],
  1467. ["strokeDasharray", "stroke-dasharray"],
  1468. ["strokeDashoffset", "stroke-dashoffset"],
  1469. ["strokeLinecap", "stroke-linecap"],
  1470. ["strokeLinejoin", "stroke-linejoin"],
  1471. ["strokeMiterlimit", "stroke-miterlimit"],
  1472. ["strokeOpacity", "stroke-opacity"],
  1473. ["strokeWidth", "stroke-width"],
  1474. ["textAnchor", "text-anchor"],
  1475. ["textDecoration", "text-decoration"],
  1476. ["textRendering", "text-rendering"],
  1477. ["transformOrigin", "transform-origin"],
  1478. ["underlinePosition", "underline-position"],
  1479. ["underlineThickness", "underline-thickness"],
  1480. ["unicodeBidi", "unicode-bidi"],
  1481. ["unicodeRange", "unicode-range"],
  1482. ["unitsPerEm", "units-per-em"],
  1483. ["vAlphabetic", "v-alphabetic"],
  1484. ["vHanging", "v-hanging"],
  1485. ["vIdeographic", "v-ideographic"],
  1486. ["vMathematical", "v-mathematical"],
  1487. ["vectorEffect", "vector-effect"],
  1488. ["vertAdvY", "vert-adv-y"],
  1489. ["vertOriginX", "vert-origin-x"],
  1490. ["vertOriginY", "vert-origin-y"],
  1491. ["wordSpacing", "word-spacing"],
  1492. ["writingMode", "writing-mode"],
  1493. ["xmlnsXlink", "xmlns:xlink"],
  1494. ["xHeight", "x-height"]
  1495. ]),
  1496. isJavaScriptProtocol =
  1497. /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
  1498. function sanitizeURL(url) {
  1499. return isJavaScriptProtocol.test("" + url)
  1500. ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
  1501. : url;
  1502. }
  1503. function noop$1() {}
  1504. var currentReplayingEvent = null;
  1505. function getEventTarget(nativeEvent) {
  1506. nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
  1507. nativeEvent.correspondingUseElement &&
  1508. (nativeEvent = nativeEvent.correspondingUseElement);
  1509. return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
  1510. }
  1511. var restoreTarget = null,
  1512. restoreQueue = null;
  1513. function restoreStateOfTarget(target) {
  1514. var internalInstance = getInstanceFromNode(target);
  1515. if (internalInstance && (target = internalInstance.stateNode)) {
  1516. var props = target[internalPropsKey] || null;
  1517. a: switch (((target = internalInstance.stateNode), internalInstance.type)) {
  1518. case "input":
  1519. updateInput(
  1520. target,
  1521. props.value,
  1522. props.defaultValue,
  1523. props.defaultValue,
  1524. props.checked,
  1525. props.defaultChecked,
  1526. props.type,
  1527. props.name
  1528. );
  1529. internalInstance = props.name;
  1530. if ("radio" === props.type && null != internalInstance) {
  1531. for (props = target; props.parentNode; ) props = props.parentNode;
  1532. props = props.querySelectorAll(
  1533. 'input[name="' +
  1534. escapeSelectorAttributeValueInsideDoubleQuotes(
  1535. "" + internalInstance
  1536. ) +
  1537. '"][type="radio"]'
  1538. );
  1539. for (
  1540. internalInstance = 0;
  1541. internalInstance < props.length;
  1542. internalInstance++
  1543. ) {
  1544. var otherNode = props[internalInstance];
  1545. if (otherNode !== target && otherNode.form === target.form) {
  1546. var otherProps = otherNode[internalPropsKey] || null;
  1547. if (!otherProps) throw Error(formatProdErrorMessage(90));
  1548. updateInput(
  1549. otherNode,
  1550. otherProps.value,
  1551. otherProps.defaultValue,
  1552. otherProps.defaultValue,
  1553. otherProps.checked,
  1554. otherProps.defaultChecked,
  1555. otherProps.type,
  1556. otherProps.name
  1557. );
  1558. }
  1559. }
  1560. for (
  1561. internalInstance = 0;
  1562. internalInstance < props.length;
  1563. internalInstance++
  1564. )
  1565. (otherNode = props[internalInstance]),
  1566. otherNode.form === target.form && updateValueIfChanged(otherNode);
  1567. }
  1568. break a;
  1569. case "textarea":
  1570. updateTextarea(target, props.value, props.defaultValue);
  1571. break a;
  1572. case "select":
  1573. (internalInstance = props.value),
  1574. null != internalInstance &&
  1575. updateOptions(target, !!props.multiple, internalInstance, !1);
  1576. }
  1577. }
  1578. }
  1579. var isInsideEventHandler = !1;
  1580. function batchedUpdates$2(fn, a, b) {
  1581. if (isInsideEventHandler) return fn(a, b);
  1582. isInsideEventHandler = !0;
  1583. try {
  1584. var JSCompiler_inline_result = fn(a);
  1585. return JSCompiler_inline_result;
  1586. } finally {
  1587. if (
  1588. ((isInsideEventHandler = !1),
  1589. null !== restoreTarget || null !== restoreQueue)
  1590. )
  1591. if (
  1592. (flushSyncWork$1(),
  1593. restoreTarget &&
  1594. ((a = restoreTarget),
  1595. (fn = restoreQueue),
  1596. (restoreQueue = restoreTarget = null),
  1597. restoreStateOfTarget(a),
  1598. fn))
  1599. )
  1600. for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
  1601. }
  1602. }
  1603. function getListener(inst, registrationName) {
  1604. var stateNode = inst.stateNode;
  1605. if (null === stateNode) return null;
  1606. var props = stateNode[internalPropsKey] || null;
  1607. if (null === props) return null;
  1608. stateNode = props[registrationName];
  1609. a: switch (registrationName) {
  1610. case "onClick":
  1611. case "onClickCapture":
  1612. case "onDoubleClick":
  1613. case "onDoubleClickCapture":
  1614. case "onMouseDown":
  1615. case "onMouseDownCapture":
  1616. case "onMouseMove":
  1617. case "onMouseMoveCapture":
  1618. case "onMouseUp":
  1619. case "onMouseUpCapture":
  1620. case "onMouseEnter":
  1621. (props = !props.disabled) ||
  1622. ((inst = inst.type),
  1623. (props = !(
  1624. "button" === inst ||
  1625. "input" === inst ||
  1626. "select" === inst ||
  1627. "textarea" === inst
  1628. )));
  1629. inst = !props;
  1630. break a;
  1631. default:
  1632. inst = !1;
  1633. }
  1634. if (inst) return null;
  1635. if (stateNode && "function" !== typeof stateNode)
  1636. throw Error(
  1637. formatProdErrorMessage(231, registrationName, typeof stateNode)
  1638. );
  1639. return stateNode;
  1640. }
  1641. var canUseDOM = !(
  1642. "undefined" === typeof window ||
  1643. "undefined" === typeof window.document ||
  1644. "undefined" === typeof window.document.createElement
  1645. ),
  1646. passiveBrowserEventsSupported = !1;
  1647. if (canUseDOM)
  1648. try {
  1649. var options = {};
  1650. Object.defineProperty(options, "passive", {
  1651. get: function () {
  1652. passiveBrowserEventsSupported = !0;
  1653. }
  1654. });
  1655. window.addEventListener("test", options, options);
  1656. window.removeEventListener("test", options, options);
  1657. } catch (e) {
  1658. passiveBrowserEventsSupported = !1;
  1659. }
  1660. var root = null,
  1661. startText = null,
  1662. fallbackText = null;
  1663. function getData() {
  1664. if (fallbackText) return fallbackText;
  1665. var start,
  1666. startValue = startText,
  1667. startLength = startValue.length,
  1668. end,
  1669. endValue = "value" in root ? root.value : root.textContent,
  1670. endLength = endValue.length;
  1671. for (
  1672. start = 0;
  1673. start < startLength && startValue[start] === endValue[start];
  1674. start++
  1675. );
  1676. var minEnd = startLength - start;
  1677. for (
  1678. end = 1;
  1679. end <= minEnd &&
  1680. startValue[startLength - end] === endValue[endLength - end];
  1681. end++
  1682. );
  1683. return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));
  1684. }
  1685. function getEventCharCode(nativeEvent) {
  1686. var keyCode = nativeEvent.keyCode;
  1687. "charCode" in nativeEvent
  1688. ? ((nativeEvent = nativeEvent.charCode),
  1689. 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))
  1690. : (nativeEvent = keyCode);
  1691. 10 === nativeEvent && (nativeEvent = 13);
  1692. return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
  1693. }
  1694. function functionThatReturnsTrue() {
  1695. return !0;
  1696. }
  1697. function functionThatReturnsFalse() {
  1698. return !1;
  1699. }
  1700. function createSyntheticEvent(Interface) {
  1701. function SyntheticBaseEvent(
  1702. reactName,
  1703. reactEventType,
  1704. targetInst,
  1705. nativeEvent,
  1706. nativeEventTarget
  1707. ) {
  1708. this._reactName = reactName;
  1709. this._targetInst = targetInst;
  1710. this.type = reactEventType;
  1711. this.nativeEvent = nativeEvent;
  1712. this.target = nativeEventTarget;
  1713. this.currentTarget = null;
  1714. for (var propName in Interface)
  1715. Interface.hasOwnProperty(propName) &&
  1716. ((reactName = Interface[propName]),
  1717. (this[propName] = reactName
  1718. ? reactName(nativeEvent)
  1719. : nativeEvent[propName]));
  1720. this.isDefaultPrevented = (
  1721. null != nativeEvent.defaultPrevented
  1722. ? nativeEvent.defaultPrevented
  1723. : !1 === nativeEvent.returnValue
  1724. )
  1725. ? functionThatReturnsTrue
  1726. : functionThatReturnsFalse;
  1727. this.isPropagationStopped = functionThatReturnsFalse;
  1728. return this;
  1729. }
  1730. assign(SyntheticBaseEvent.prototype, {
  1731. preventDefault: function () {
  1732. this.defaultPrevented = !0;
  1733. var event = this.nativeEvent;
  1734. event &&
  1735. (event.preventDefault
  1736. ? event.preventDefault()
  1737. : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
  1738. (this.isDefaultPrevented = functionThatReturnsTrue));
  1739. },
  1740. stopPropagation: function () {
  1741. var event = this.nativeEvent;
  1742. event &&
  1743. (event.stopPropagation
  1744. ? event.stopPropagation()
  1745. : "unknown" !== typeof event.cancelBubble &&
  1746. (event.cancelBubble = !0),
  1747. (this.isPropagationStopped = functionThatReturnsTrue));
  1748. },
  1749. persist: function () {},
  1750. isPersistent: functionThatReturnsTrue
  1751. });
  1752. return SyntheticBaseEvent;
  1753. }
  1754. var EventInterface = {
  1755. eventPhase: 0,
  1756. bubbles: 0,
  1757. cancelable: 0,
  1758. timeStamp: function (event) {
  1759. return event.timeStamp || Date.now();
  1760. },
  1761. defaultPrevented: 0,
  1762. isTrusted: 0
  1763. },
  1764. SyntheticEvent = createSyntheticEvent(EventInterface),
  1765. UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),
  1766. SyntheticUIEvent = createSyntheticEvent(UIEventInterface),
  1767. lastMovementX,
  1768. lastMovementY,
  1769. lastMouseEvent,
  1770. MouseEventInterface = assign({}, UIEventInterface, {
  1771. screenX: 0,
  1772. screenY: 0,
  1773. clientX: 0,
  1774. clientY: 0,
  1775. pageX: 0,
  1776. pageY: 0,
  1777. ctrlKey: 0,
  1778. shiftKey: 0,
  1779. altKey: 0,
  1780. metaKey: 0,
  1781. getModifierState: getEventModifierState,
  1782. button: 0,
  1783. buttons: 0,
  1784. relatedTarget: function (event) {
  1785. return void 0 === event.relatedTarget
  1786. ? event.fromElement === event.srcElement
  1787. ? event.toElement
  1788. : event.fromElement
  1789. : event.relatedTarget;
  1790. },
  1791. movementX: function (event) {
  1792. if ("movementX" in event) return event.movementX;
  1793. event !== lastMouseEvent &&
  1794. (lastMouseEvent && "mousemove" === event.type
  1795. ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),
  1796. (lastMovementY = event.screenY - lastMouseEvent.screenY))
  1797. : (lastMovementY = lastMovementX = 0),
  1798. (lastMouseEvent = event));
  1799. return lastMovementX;
  1800. },
  1801. movementY: function (event) {
  1802. return "movementY" in event ? event.movementY : lastMovementY;
  1803. }
  1804. }),
  1805. SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),
  1806. DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),
  1807. SyntheticDragEvent = createSyntheticEvent(DragEventInterface),
  1808. FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),
  1809. SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),
  1810. AnimationEventInterface = assign({}, EventInterface, {
  1811. animationName: 0,
  1812. elapsedTime: 0,
  1813. pseudoElement: 0
  1814. }),
  1815. SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),
  1816. ClipboardEventInterface = assign({}, EventInterface, {
  1817. clipboardData: function (event) {
  1818. return "clipboardData" in event
  1819. ? event.clipboardData
  1820. : window.clipboardData;
  1821. }
  1822. }),
  1823. SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),
  1824. CompositionEventInterface = assign({}, EventInterface, { data: 0 }),
  1825. SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),
  1826. normalizeKey = {
  1827. Esc: "Escape",
  1828. Spacebar: " ",
  1829. Left: "ArrowLeft",
  1830. Up: "ArrowUp",
  1831. Right: "ArrowRight",
  1832. Down: "ArrowDown",
  1833. Del: "Delete",
  1834. Win: "OS",
  1835. Menu: "ContextMenu",
  1836. Apps: "ContextMenu",
  1837. Scroll: "ScrollLock",
  1838. MozPrintableKey: "Unidentified"
  1839. },
  1840. translateToKey = {
  1841. 8: "Backspace",
  1842. 9: "Tab",
  1843. 12: "Clear",
  1844. 13: "Enter",
  1845. 16: "Shift",
  1846. 17: "Control",
  1847. 18: "Alt",
  1848. 19: "Pause",
  1849. 20: "CapsLock",
  1850. 27: "Escape",
  1851. 32: " ",
  1852. 33: "PageUp",
  1853. 34: "PageDown",
  1854. 35: "End",
  1855. 36: "Home",
  1856. 37: "ArrowLeft",
  1857. 38: "ArrowUp",
  1858. 39: "ArrowRight",
  1859. 40: "ArrowDown",
  1860. 45: "Insert",
  1861. 46: "Delete",
  1862. 112: "F1",
  1863. 113: "F2",
  1864. 114: "F3",
  1865. 115: "F4",
  1866. 116: "F5",
  1867. 117: "F6",
  1868. 118: "F7",
  1869. 119: "F8",
  1870. 120: "F9",
  1871. 121: "F10",
  1872. 122: "F11",
  1873. 123: "F12",
  1874. 144: "NumLock",
  1875. 145: "ScrollLock",
  1876. 224: "Meta"
  1877. },
  1878. modifierKeyToProp = {
  1879. Alt: "altKey",
  1880. Control: "ctrlKey",
  1881. Meta: "metaKey",
  1882. Shift: "shiftKey"
  1883. };
  1884. function modifierStateGetter(keyArg) {
  1885. var nativeEvent = this.nativeEvent;
  1886. return nativeEvent.getModifierState
  1887. ? nativeEvent.getModifierState(keyArg)
  1888. : (keyArg = modifierKeyToProp[keyArg])
  1889. ? !!nativeEvent[keyArg]
  1890. : !1;
  1891. }
  1892. function getEventModifierState() {
  1893. return modifierStateGetter;
  1894. }
  1895. var KeyboardEventInterface = assign({}, UIEventInterface, {
  1896. key: function (nativeEvent) {
  1897. if (nativeEvent.key) {
  1898. var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
  1899. if ("Unidentified" !== key) return key;
  1900. }
  1901. return "keypress" === nativeEvent.type
  1902. ? ((nativeEvent = getEventCharCode(nativeEvent)),
  1903. 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent))
  1904. : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type
  1905. ? translateToKey[nativeEvent.keyCode] || "Unidentified"
  1906. : "";
  1907. },
  1908. code: 0,
  1909. location: 0,
  1910. ctrlKey: 0,
  1911. shiftKey: 0,
  1912. altKey: 0,
  1913. metaKey: 0,
  1914. repeat: 0,
  1915. locale: 0,
  1916. getModifierState: getEventModifierState,
  1917. charCode: function (event) {
  1918. return "keypress" === event.type ? getEventCharCode(event) : 0;
  1919. },
  1920. keyCode: function (event) {
  1921. return "keydown" === event.type || "keyup" === event.type
  1922. ? event.keyCode
  1923. : 0;
  1924. },
  1925. which: function (event) {
  1926. return "keypress" === event.type
  1927. ? getEventCharCode(event)
  1928. : "keydown" === event.type || "keyup" === event.type
  1929. ? event.keyCode
  1930. : 0;
  1931. }
  1932. }),
  1933. SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),
  1934. PointerEventInterface = assign({}, MouseEventInterface, {
  1935. pointerId: 0,
  1936. width: 0,
  1937. height: 0,
  1938. pressure: 0,
  1939. tangentialPressure: 0,
  1940. tiltX: 0,
  1941. tiltY: 0,
  1942. twist: 0,
  1943. pointerType: 0,
  1944. isPrimary: 0
  1945. }),
  1946. SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),
  1947. TouchEventInterface = assign({}, UIEventInterface, {
  1948. touches: 0,
  1949. targetTouches: 0,
  1950. changedTouches: 0,
  1951. altKey: 0,
  1952. metaKey: 0,
  1953. ctrlKey: 0,
  1954. shiftKey: 0,
  1955. getModifierState: getEventModifierState
  1956. }),
  1957. SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),
  1958. TransitionEventInterface = assign({}, EventInterface, {
  1959. propertyName: 0,
  1960. elapsedTime: 0,
  1961. pseudoElement: 0
  1962. }),
  1963. SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),
  1964. WheelEventInterface = assign({}, MouseEventInterface, {
  1965. deltaX: function (event) {
  1966. return "deltaX" in event
  1967. ? event.deltaX
  1968. : "wheelDeltaX" in event
  1969. ? -event.wheelDeltaX
  1970. : 0;
  1971. },
  1972. deltaY: function (event) {
  1973. return "deltaY" in event
  1974. ? event.deltaY
  1975. : "wheelDeltaY" in event
  1976. ? -event.wheelDeltaY
  1977. : "wheelDelta" in event
  1978. ? -event.wheelDelta
  1979. : 0;
  1980. },
  1981. deltaZ: 0,
  1982. deltaMode: 0
  1983. }),
  1984. SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),
  1985. ToggleEventInterface = assign({}, EventInterface, {
  1986. newState: 0,
  1987. oldState: 0
  1988. }),
  1989. SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),
  1990. END_KEYCODES = [9, 13, 27, 32],
  1991. canUseCompositionEvent = canUseDOM && "CompositionEvent" in window,
  1992. documentMode = null;
  1993. canUseDOM &&
  1994. "documentMode" in document &&
  1995. (documentMode = document.documentMode);
  1996. var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode,
  1997. useFallbackCompositionData =
  1998. canUseDOM &&
  1999. (!canUseCompositionEvent ||
  2000. (documentMode && 8 < documentMode && 11 >= documentMode)),
  2001. SPACEBAR_CHAR = String.fromCharCode(32),
  2002. hasSpaceKeypress = !1;
  2003. function isFallbackCompositionEnd(domEventName, nativeEvent) {
  2004. switch (domEventName) {
  2005. case "keyup":
  2006. return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
  2007. case "keydown":
  2008. return 229 !== nativeEvent.keyCode;
  2009. case "keypress":
  2010. case "mousedown":
  2011. case "focusout":
  2012. return !0;
  2013. default:
  2014. return !1;
  2015. }
  2016. }
  2017. function getDataFromCustomEvent(nativeEvent) {
  2018. nativeEvent = nativeEvent.detail;
  2019. return "object" === typeof nativeEvent && "data" in nativeEvent
  2020. ? nativeEvent.data
  2021. : null;
  2022. }
  2023. var isComposing = !1;
  2024. function getNativeBeforeInputChars(domEventName, nativeEvent) {
  2025. switch (domEventName) {
  2026. case "compositionend":
  2027. return getDataFromCustomEvent(nativeEvent);
  2028. case "keypress":
  2029. if (32 !== nativeEvent.which) return null;
  2030. hasSpaceKeypress = !0;
  2031. return SPACEBAR_CHAR;
  2032. case "textInput":
  2033. return (
  2034. (domEventName = nativeEvent.data),
  2035. domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName
  2036. );
  2037. default:
  2038. return null;
  2039. }
  2040. }
  2041. function getFallbackBeforeInputChars(domEventName, nativeEvent) {
  2042. if (isComposing)
  2043. return "compositionend" === domEventName ||
  2044. (!canUseCompositionEvent &&
  2045. isFallbackCompositionEnd(domEventName, nativeEvent))
  2046. ? ((domEventName = getData()),
  2047. (fallbackText = startText = root = null),
  2048. (isComposing = !1),
  2049. domEventName)
  2050. : null;
  2051. switch (domEventName) {
  2052. case "paste":
  2053. return null;
  2054. case "keypress":
  2055. if (
  2056. !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||
  2057. (nativeEvent.ctrlKey && nativeEvent.altKey)
  2058. ) {
  2059. if (nativeEvent.char && 1 < nativeEvent.char.length)
  2060. return nativeEvent.char;
  2061. if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);
  2062. }
  2063. return null;
  2064. case "compositionend":
  2065. return useFallbackCompositionData && "ko" !== nativeEvent.locale
  2066. ? null
  2067. : nativeEvent.data;
  2068. default:
  2069. return null;
  2070. }
  2071. }
  2072. var supportedInputTypes = {
  2073. color: !0,
  2074. date: !0,
  2075. datetime: !0,
  2076. "datetime-local": !0,
  2077. email: !0,
  2078. month: !0,
  2079. number: !0,
  2080. password: !0,
  2081. range: !0,
  2082. search: !0,
  2083. tel: !0,
  2084. text: !0,
  2085. time: !0,
  2086. url: !0,
  2087. week: !0
  2088. };
  2089. function isTextInputElement(elem) {
  2090. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  2091. return "input" === nodeName
  2092. ? !!supportedInputTypes[elem.type]
  2093. : "textarea" === nodeName
  2094. ? !0
  2095. : !1;
  2096. }
  2097. function createAndAccumulateChangeEvent(
  2098. dispatchQueue,
  2099. inst,
  2100. nativeEvent,
  2101. target
  2102. ) {
  2103. restoreTarget
  2104. ? restoreQueue
  2105. ? restoreQueue.push(target)
  2106. : (restoreQueue = [target])
  2107. : (restoreTarget = target);
  2108. inst = accumulateTwoPhaseListeners(inst, "onChange");
  2109. 0 < inst.length &&
  2110. ((nativeEvent = new SyntheticEvent(
  2111. "onChange",
  2112. "change",
  2113. null,
  2114. nativeEvent,
  2115. target
  2116. )),
  2117. dispatchQueue.push({ event: nativeEvent, listeners: inst }));
  2118. }
  2119. var activeElement$1 = null,
  2120. activeElementInst$1 = null;
  2121. function runEventInBatch(dispatchQueue) {
  2122. processDispatchQueue(dispatchQueue, 0);
  2123. }
  2124. function getInstIfValueChanged(targetInst) {
  2125. var targetNode = getNodeFromInstance(targetInst);
  2126. if (updateValueIfChanged(targetNode)) return targetInst;
  2127. }
  2128. function getTargetInstForChangeEvent(domEventName, targetInst) {
  2129. if ("change" === domEventName) return targetInst;
  2130. }
  2131. var isInputEventSupported = !1;
  2132. if (canUseDOM) {
  2133. var JSCompiler_inline_result$jscomp$330;
  2134. if (canUseDOM) {
  2135. var isSupported$jscomp$inline_473 = "oninput" in document;
  2136. if (!isSupported$jscomp$inline_473) {
  2137. var element$jscomp$inline_474 = document.createElement("div");
  2138. element$jscomp$inline_474.setAttribute("oninput", "return;");
  2139. isSupported$jscomp$inline_473 =
  2140. "function" === typeof element$jscomp$inline_474.oninput;
  2141. }
  2142. JSCompiler_inline_result$jscomp$330 = isSupported$jscomp$inline_473;
  2143. } else JSCompiler_inline_result$jscomp$330 = !1;
  2144. isInputEventSupported =
  2145. JSCompiler_inline_result$jscomp$330 &&
  2146. (!document.documentMode || 9 < document.documentMode);
  2147. }
  2148. function stopWatchingForValueChange() {
  2149. activeElement$1 &&
  2150. (activeElement$1.detachEvent("onpropertychange", handlePropertyChange),
  2151. (activeElementInst$1 = activeElement$1 = null));
  2152. }
  2153. function handlePropertyChange(nativeEvent) {
  2154. if (
  2155. "value" === nativeEvent.propertyName &&
  2156. getInstIfValueChanged(activeElementInst$1)
  2157. ) {
  2158. var dispatchQueue = [];
  2159. createAndAccumulateChangeEvent(
  2160. dispatchQueue,
  2161. activeElementInst$1,
  2162. nativeEvent,
  2163. getEventTarget(nativeEvent)
  2164. );
  2165. batchedUpdates$2(runEventInBatch, dispatchQueue);
  2166. }
  2167. }
  2168. function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
  2169. "focusin" === domEventName
  2170. ? (stopWatchingForValueChange(),
  2171. (activeElement$1 = target),
  2172. (activeElementInst$1 = targetInst),
  2173. activeElement$1.attachEvent("onpropertychange", handlePropertyChange))
  2174. : "focusout" === domEventName && stopWatchingForValueChange();
  2175. }
  2176. function getTargetInstForInputEventPolyfill(domEventName) {
  2177. if (
  2178. "selectionchange" === domEventName ||
  2179. "keyup" === domEventName ||
  2180. "keydown" === domEventName
  2181. )
  2182. return getInstIfValueChanged(activeElementInst$1);
  2183. }
  2184. function getTargetInstForClickEvent(domEventName, targetInst) {
  2185. if ("click" === domEventName) return getInstIfValueChanged(targetInst);
  2186. }
  2187. function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
  2188. if ("input" === domEventName || "change" === domEventName)
  2189. return getInstIfValueChanged(targetInst);
  2190. }
  2191. function is(x, y) {
  2192. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  2193. }
  2194. var objectIs = "function" === typeof Object.is ? Object.is : is;
  2195. function shallowEqual(objA, objB) {
  2196. if (objectIs(objA, objB)) return !0;
  2197. if (
  2198. "object" !== typeof objA ||
  2199. null === objA ||
  2200. "object" !== typeof objB ||
  2201. null === objB
  2202. )
  2203. return !1;
  2204. var keysA = Object.keys(objA),
  2205. keysB = Object.keys(objB);
  2206. if (keysA.length !== keysB.length) return !1;
  2207. for (keysB = 0; keysB < keysA.length; keysB++) {
  2208. var currentKey = keysA[keysB];
  2209. if (
  2210. !hasOwnProperty.call(objB, currentKey) ||
  2211. !objectIs(objA[currentKey], objB[currentKey])
  2212. )
  2213. return !1;
  2214. }
  2215. return !0;
  2216. }
  2217. function getLeafNode(node) {
  2218. for (; node && node.firstChild; ) node = node.firstChild;
  2219. return node;
  2220. }
  2221. function getNodeForCharacterOffset(root, offset) {
  2222. var node = getLeafNode(root);
  2223. root = 0;
  2224. for (var nodeEnd; node; ) {
  2225. if (3 === node.nodeType) {
  2226. nodeEnd = root + node.textContent.length;
  2227. if (root <= offset && nodeEnd >= offset)
  2228. return { node: node, offset: offset - root };
  2229. root = nodeEnd;
  2230. }
  2231. a: {
  2232. for (; node; ) {
  2233. if (node.nextSibling) {
  2234. node = node.nextSibling;
  2235. break a;
  2236. }
  2237. node = node.parentNode;
  2238. }
  2239. node = void 0;
  2240. }
  2241. node = getLeafNode(node);
  2242. }
  2243. }
  2244. function containsNode(outerNode, innerNode) {
  2245. return outerNode && innerNode
  2246. ? outerNode === innerNode
  2247. ? !0
  2248. : outerNode && 3 === outerNode.nodeType
  2249. ? !1
  2250. : innerNode && 3 === innerNode.nodeType
  2251. ? containsNode(outerNode, innerNode.parentNode)
  2252. : "contains" in outerNode
  2253. ? outerNode.contains(innerNode)
  2254. : outerNode.compareDocumentPosition
  2255. ? !!(outerNode.compareDocumentPosition(innerNode) & 16)
  2256. : !1
  2257. : !1;
  2258. }
  2259. function getActiveElementDeep(containerInfo) {
  2260. containerInfo =
  2261. null != containerInfo &&
  2262. null != containerInfo.ownerDocument &&
  2263. null != containerInfo.ownerDocument.defaultView
  2264. ? containerInfo.ownerDocument.defaultView
  2265. : window;
  2266. for (
  2267. var element = getActiveElement(containerInfo.document);
  2268. element instanceof containerInfo.HTMLIFrameElement;
  2269. ) {
  2270. try {
  2271. var JSCompiler_inline_result =
  2272. "string" === typeof element.contentWindow.location.href;
  2273. } catch (err) {
  2274. JSCompiler_inline_result = !1;
  2275. }
  2276. if (JSCompiler_inline_result) containerInfo = element.contentWindow;
  2277. else break;
  2278. element = getActiveElement(containerInfo.document);
  2279. }
  2280. return element;
  2281. }
  2282. function hasSelectionCapabilities(elem) {
  2283. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  2284. return (
  2285. nodeName &&
  2286. (("input" === nodeName &&
  2287. ("text" === elem.type ||
  2288. "search" === elem.type ||
  2289. "tel" === elem.type ||
  2290. "url" === elem.type ||
  2291. "password" === elem.type)) ||
  2292. "textarea" === nodeName ||
  2293. "true" === elem.contentEditable)
  2294. );
  2295. }
  2296. var skipSelectionChangeEvent =
  2297. canUseDOM && "documentMode" in document && 11 >= document.documentMode,
  2298. activeElement = null,
  2299. activeElementInst = null,
  2300. lastSelection = null,
  2301. mouseDown = !1;
  2302. function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
  2303. var doc =
  2304. nativeEventTarget.window === nativeEventTarget
  2305. ? nativeEventTarget.document
  2306. : 9 === nativeEventTarget.nodeType
  2307. ? nativeEventTarget
  2308. : nativeEventTarget.ownerDocument;
  2309. mouseDown ||
  2310. null == activeElement ||
  2311. activeElement !== getActiveElement(doc) ||
  2312. ((doc = activeElement),
  2313. "selectionStart" in doc && hasSelectionCapabilities(doc)
  2314. ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })
  2315. : ((doc = (
  2316. (doc.ownerDocument && doc.ownerDocument.defaultView) ||
  2317. window
  2318. ).getSelection()),
  2319. (doc = {
  2320. anchorNode: doc.anchorNode,
  2321. anchorOffset: doc.anchorOffset,
  2322. focusNode: doc.focusNode,
  2323. focusOffset: doc.focusOffset
  2324. })),
  2325. (lastSelection && shallowEqual(lastSelection, doc)) ||
  2326. ((lastSelection = doc),
  2327. (doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect")),
  2328. 0 < doc.length &&
  2329. ((nativeEvent = new SyntheticEvent(
  2330. "onSelect",
  2331. "select",
  2332. null,
  2333. nativeEvent,
  2334. nativeEventTarget
  2335. )),
  2336. dispatchQueue.push({ event: nativeEvent, listeners: doc }),
  2337. (nativeEvent.target = activeElement))));
  2338. }
  2339. function makePrefixMap(styleProp, eventName) {
  2340. var prefixes = {};
  2341. prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  2342. prefixes["Webkit" + styleProp] = "webkit" + eventName;
  2343. prefixes["Moz" + styleProp] = "moz" + eventName;
  2344. return prefixes;
  2345. }
  2346. var vendorPrefixes = {
  2347. animationend: makePrefixMap("Animation", "AnimationEnd"),
  2348. animationiteration: makePrefixMap("Animation", "AnimationIteration"),
  2349. animationstart: makePrefixMap("Animation", "AnimationStart"),
  2350. transitionrun: makePrefixMap("Transition", "TransitionRun"),
  2351. transitionstart: makePrefixMap("Transition", "TransitionStart"),
  2352. transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
  2353. transitionend: makePrefixMap("Transition", "TransitionEnd")
  2354. },
  2355. prefixedEventNames = {},
  2356. style = {};
  2357. canUseDOM &&
  2358. ((style = document.createElement("div").style),
  2359. "AnimationEvent" in window ||
  2360. (delete vendorPrefixes.animationend.animation,
  2361. delete vendorPrefixes.animationiteration.animation,
  2362. delete vendorPrefixes.animationstart.animation),
  2363. "TransitionEvent" in window ||
  2364. delete vendorPrefixes.transitionend.transition);
  2365. function getVendorPrefixedEventName(eventName) {
  2366. if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
  2367. if (!vendorPrefixes[eventName]) return eventName;
  2368. var prefixMap = vendorPrefixes[eventName],
  2369. styleProp;
  2370. for (styleProp in prefixMap)
  2371. if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
  2372. return (prefixedEventNames[eventName] = prefixMap[styleProp]);
  2373. return eventName;
  2374. }
  2375. var ANIMATION_END = getVendorPrefixedEventName("animationend"),
  2376. ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"),
  2377. ANIMATION_START = getVendorPrefixedEventName("animationstart"),
  2378. TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"),
  2379. TRANSITION_START = getVendorPrefixedEventName("transitionstart"),
  2380. TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"),
  2381. TRANSITION_END = getVendorPrefixedEventName("transitionend"),
  2382. topLevelEventsToReactNames = new Map(),
  2383. simpleEventPluginEvents =
  2384. "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
  2385. " "
  2386. );
  2387. simpleEventPluginEvents.push("scrollEnd");
  2388. function registerSimpleEvent(domEventName, reactName) {
  2389. topLevelEventsToReactNames.set(domEventName, reactName);
  2390. registerTwoPhaseEvent(reactName, [domEventName]);
  2391. }
  2392. var reportGlobalError =
  2393. "function" === typeof reportError
  2394. ? reportError
  2395. : function (error) {
  2396. if (
  2397. "object" === typeof window &&
  2398. "function" === typeof window.ErrorEvent
  2399. ) {
  2400. var event = new window.ErrorEvent("error", {
  2401. bubbles: !0,
  2402. cancelable: !0,
  2403. message:
  2404. "object" === typeof error &&
  2405. null !== error &&
  2406. "string" === typeof error.message
  2407. ? String(error.message)
  2408. : String(error),
  2409. error: error
  2410. });
  2411. if (!window.dispatchEvent(event)) return;
  2412. } else if (
  2413. "object" === typeof process &&
  2414. "function" === typeof process.emit
  2415. ) {
  2416. process.emit("uncaughtException", error);
  2417. return;
  2418. }
  2419. console.error(error);
  2420. },
  2421. supportsUserTiming =
  2422. "undefined" !== typeof console &&
  2423. "function" === typeof console.timeStamp &&
  2424. !0,
  2425. currentTrack = "Blocking";
  2426. function setCurrentTrackFromLanes(lanes) {
  2427. currentTrack =
  2428. lanes & 63
  2429. ? "Blocking"
  2430. : lanes & 64
  2431. ? "Gesture"
  2432. : lanes & 4194176
  2433. ? "Transition"
  2434. : lanes & 62914560
  2435. ? "Suspense"
  2436. : lanes & 2080374784
  2437. ? "Idle"
  2438. : "Other";
  2439. }
  2440. function logComponentTrigger(fiber, startTime, endTime, trigger) {
  2441. supportsUserTiming &&
  2442. ((reusableComponentOptions.start = startTime),
  2443. (reusableComponentOptions.end = endTime),
  2444. (reusableComponentDevToolDetails.color = "warning"),
  2445. (reusableComponentDevToolDetails.tooltipText = trigger),
  2446. (reusableComponentDevToolDetails.properties = null),
  2447. performance.measure(trigger, reusableComponentOptions));
  2448. }
  2449. function logComponentReappeared(fiber, startTime, endTime) {
  2450. logComponentTrigger(fiber, startTime, endTime, "Reconnect");
  2451. }
  2452. var reusableComponentDevToolDetails = {
  2453. color: "primary",
  2454. properties: null,
  2455. tooltipText: "",
  2456. track: "Components \u269b"
  2457. },
  2458. reusableComponentOptions = {
  2459. start: -0,
  2460. end: -0,
  2461. detail: { devtools: reusableComponentDevToolDetails }
  2462. };
  2463. function logComponentRender(fiber, startTime, endTime, wasHydrated) {
  2464. var name = getComponentNameFromFiber(fiber);
  2465. if (null !== name && supportsUserTiming) {
  2466. var alternate = fiber.alternate,
  2467. selfTime = fiber.actualDuration;
  2468. if (null === alternate || alternate.child !== fiber.child)
  2469. for (fiber = fiber.child; null !== fiber; fiber = fiber.sibling)
  2470. selfTime -= fiber.actualDuration;
  2471. console.timeStamp(
  2472. name,
  2473. startTime,
  2474. endTime,
  2475. "Components \u269b",
  2476. void 0,
  2477. 0.5 > selfTime
  2478. ? wasHydrated
  2479. ? "tertiary-light"
  2480. : "primary-light"
  2481. : 10 > selfTime
  2482. ? wasHydrated
  2483. ? "tertiary"
  2484. : "primary"
  2485. : 100 > selfTime
  2486. ? wasHydrated
  2487. ? "tertiary-dark"
  2488. : "primary-dark"
  2489. : "error"
  2490. );
  2491. }
  2492. }
  2493. function logComponentErrored(fiber, startTime, endTime) {
  2494. supportsUserTiming &&
  2495. ((fiber = getComponentNameFromFiber(fiber)),
  2496. null !== fiber &&
  2497. console.timeStamp(
  2498. fiber,
  2499. startTime,
  2500. endTime,
  2501. "Components \u269b",
  2502. void 0,
  2503. "error"
  2504. ));
  2505. }
  2506. function logComponentEffect(fiber, startTime, endTime, selfTime, errors) {
  2507. null !== errors
  2508. ? supportsUserTiming &&
  2509. ((selfTime = getComponentNameFromFiber(fiber)),
  2510. null !== selfTime &&
  2511. console.timeStamp(
  2512. selfTime,
  2513. startTime,
  2514. endTime,
  2515. "Components \u269b",
  2516. void 0,
  2517. "error"
  2518. ))
  2519. : ((fiber = getComponentNameFromFiber(fiber)),
  2520. null !== fiber &&
  2521. supportsUserTiming &&
  2522. console.timeStamp(
  2523. fiber,
  2524. startTime,
  2525. endTime,
  2526. "Components \u269b",
  2527. void 0,
  2528. 1 > selfTime
  2529. ? "secondary-light"
  2530. : 100 > selfTime
  2531. ? "secondary"
  2532. : 500 > selfTime
  2533. ? "secondary-dark"
  2534. : "error"
  2535. ));
  2536. }
  2537. function logSuspendedRenderPhase(startTime, endTime, lanes) {
  2538. !supportsUserTiming ||
  2539. endTime <= startTime ||
  2540. console.timeStamp(
  2541. "Prewarm",
  2542. startTime,
  2543. endTime,
  2544. currentTrack,
  2545. "Scheduler \u269b",
  2546. (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"
  2547. );
  2548. }
  2549. function logSuspendedWithDelayPhase(startTime, endTime, lanes) {
  2550. !supportsUserTiming ||
  2551. endTime <= startTime ||
  2552. console.timeStamp(
  2553. "Suspended",
  2554. startTime,
  2555. endTime,
  2556. currentTrack,
  2557. "Scheduler \u269b",
  2558. (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"
  2559. );
  2560. }
  2561. function logErroredRenderPhase(startTime, endTime) {
  2562. !supportsUserTiming ||
  2563. endTime <= startTime ||
  2564. console.timeStamp(
  2565. "Errored",
  2566. startTime,
  2567. endTime,
  2568. currentTrack,
  2569. "Scheduler \u269b",
  2570. "error"
  2571. );
  2572. }
  2573. function logCommitErrored(startTime, endTime) {
  2574. !supportsUserTiming ||
  2575. endTime <= startTime ||
  2576. console.timeStamp(
  2577. "Errored",
  2578. startTime,
  2579. endTime,
  2580. currentTrack,
  2581. "Scheduler \u269b",
  2582. "error"
  2583. );
  2584. }
  2585. var concurrentQueues = [],
  2586. concurrentQueuesIndex = 0,
  2587. concurrentlyUpdatedLanes = 0;
  2588. function finishQueueingConcurrentUpdates() {
  2589. for (
  2590. var endIndex = concurrentQueuesIndex,
  2591. i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);
  2592. i < endIndex;
  2593. ) {
  2594. var fiber = concurrentQueues[i];
  2595. concurrentQueues[i++] = null;
  2596. var queue = concurrentQueues[i];
  2597. concurrentQueues[i++] = null;
  2598. var update = concurrentQueues[i];
  2599. concurrentQueues[i++] = null;
  2600. var lane = concurrentQueues[i];
  2601. concurrentQueues[i++] = null;
  2602. if (null !== queue && null !== update) {
  2603. var pending = queue.pending;
  2604. null === pending
  2605. ? (update.next = update)
  2606. : ((update.next = pending.next), (pending.next = update));
  2607. queue.pending = update;
  2608. }
  2609. 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
  2610. }
  2611. }
  2612. function enqueueUpdate$1(fiber, queue, update, lane) {
  2613. concurrentQueues[concurrentQueuesIndex++] = fiber;
  2614. concurrentQueues[concurrentQueuesIndex++] = queue;
  2615. concurrentQueues[concurrentQueuesIndex++] = update;
  2616. concurrentQueues[concurrentQueuesIndex++] = lane;
  2617. concurrentlyUpdatedLanes |= lane;
  2618. fiber.lanes |= lane;
  2619. fiber = fiber.alternate;
  2620. null !== fiber && (fiber.lanes |= lane);
  2621. }
  2622. function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
  2623. enqueueUpdate$1(fiber, queue, update, lane);
  2624. return getRootForUpdatedFiber(fiber);
  2625. }
  2626. function enqueueConcurrentRenderForLane(fiber, lane) {
  2627. enqueueUpdate$1(fiber, null, null, lane);
  2628. return getRootForUpdatedFiber(fiber);
  2629. }
  2630. function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
  2631. sourceFiber.lanes |= lane;
  2632. var alternate = sourceFiber.alternate;
  2633. null !== alternate && (alternate.lanes |= lane);
  2634. for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )
  2635. (parent.childLanes |= lane),
  2636. (alternate = parent.alternate),
  2637. null !== alternate && (alternate.childLanes |= lane),
  2638. 22 === parent.tag &&
  2639. ((sourceFiber = parent.stateNode),
  2640. null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),
  2641. (sourceFiber = parent),
  2642. (parent = parent.return);
  2643. return 3 === sourceFiber.tag
  2644. ? ((parent = sourceFiber.stateNode),
  2645. isHidden &&
  2646. null !== update &&
  2647. ((isHidden = 31 - clz32(lane)),
  2648. (sourceFiber = parent.hiddenUpdates),
  2649. (alternate = sourceFiber[isHidden]),
  2650. null === alternate
  2651. ? (sourceFiber[isHidden] = [update])
  2652. : alternate.push(update),
  2653. (update.lane = lane | 536870912)),
  2654. parent)
  2655. : null;
  2656. }
  2657. function getRootForUpdatedFiber(sourceFiber) {
  2658. if (50 < nestedUpdateCount)
  2659. throw (
  2660. ((nestedUpdateCount = 0),
  2661. (rootWithNestedUpdates = null),
  2662. Error(formatProdErrorMessage(185)))
  2663. );
  2664. for (var parent = sourceFiber.return; null !== parent; )
  2665. (sourceFiber = parent), (parent = sourceFiber.return);
  2666. return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;
  2667. }
  2668. var emptyContextObject = {};
  2669. function FiberNode(tag, pendingProps, key, mode) {
  2670. this.tag = tag;
  2671. this.key = key;
  2672. this.sibling =
  2673. this.child =
  2674. this.return =
  2675. this.stateNode =
  2676. this.type =
  2677. this.elementType =
  2678. null;
  2679. this.index = 0;
  2680. this.refCleanup = this.ref = null;
  2681. this.pendingProps = pendingProps;
  2682. this.dependencies =
  2683. this.memoizedState =
  2684. this.updateQueue =
  2685. this.memoizedProps =
  2686. null;
  2687. this.mode = mode;
  2688. this.subtreeFlags = this.flags = 0;
  2689. this.deletions = null;
  2690. this.childLanes = this.lanes = 0;
  2691. this.alternate = null;
  2692. this.actualDuration = -0;
  2693. this.actualStartTime = -1.1;
  2694. this.treeBaseDuration = this.selfBaseDuration = -0;
  2695. }
  2696. function createFiberImplClass(tag, pendingProps, key, mode) {
  2697. return new FiberNode(tag, pendingProps, key, mode);
  2698. }
  2699. function shouldConstruct(Component) {
  2700. Component = Component.prototype;
  2701. return !(!Component || !Component.isReactComponent);
  2702. }
  2703. function createWorkInProgress(current, pendingProps) {
  2704. var workInProgress = current.alternate;
  2705. null === workInProgress
  2706. ? ((workInProgress = createFiberImplClass(
  2707. current.tag,
  2708. pendingProps,
  2709. current.key,
  2710. current.mode
  2711. )),
  2712. (workInProgress.elementType = current.elementType),
  2713. (workInProgress.type = current.type),
  2714. (workInProgress.stateNode = current.stateNode),
  2715. (workInProgress.alternate = current),
  2716. (current.alternate = workInProgress))
  2717. : ((workInProgress.pendingProps = pendingProps),
  2718. (workInProgress.type = current.type),
  2719. (workInProgress.flags = 0),
  2720. (workInProgress.subtreeFlags = 0),
  2721. (workInProgress.deletions = null),
  2722. (workInProgress.actualDuration = -0),
  2723. (workInProgress.actualStartTime = -1.1));
  2724. workInProgress.flags = current.flags & 65011712;
  2725. workInProgress.childLanes = current.childLanes;
  2726. workInProgress.lanes = current.lanes;
  2727. workInProgress.child = current.child;
  2728. workInProgress.memoizedProps = current.memoizedProps;
  2729. workInProgress.memoizedState = current.memoizedState;
  2730. workInProgress.updateQueue = current.updateQueue;
  2731. pendingProps = current.dependencies;
  2732. workInProgress.dependencies =
  2733. null === pendingProps
  2734. ? null
  2735. : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };
  2736. workInProgress.sibling = current.sibling;
  2737. workInProgress.index = current.index;
  2738. workInProgress.ref = current.ref;
  2739. workInProgress.refCleanup = current.refCleanup;
  2740. workInProgress.selfBaseDuration = current.selfBaseDuration;
  2741. workInProgress.treeBaseDuration = current.treeBaseDuration;
  2742. return workInProgress;
  2743. }
  2744. function resetWorkInProgress(workInProgress, renderLanes) {
  2745. workInProgress.flags &= 65011714;
  2746. var current = workInProgress.alternate;
  2747. null === current
  2748. ? ((workInProgress.childLanes = 0),
  2749. (workInProgress.lanes = renderLanes),
  2750. (workInProgress.child = null),
  2751. (workInProgress.subtreeFlags = 0),
  2752. (workInProgress.memoizedProps = null),
  2753. (workInProgress.memoizedState = null),
  2754. (workInProgress.updateQueue = null),
  2755. (workInProgress.dependencies = null),
  2756. (workInProgress.stateNode = null),
  2757. (workInProgress.selfBaseDuration = 0),
  2758. (workInProgress.treeBaseDuration = 0))
  2759. : ((workInProgress.childLanes = current.childLanes),
  2760. (workInProgress.lanes = current.lanes),
  2761. (workInProgress.child = current.child),
  2762. (workInProgress.subtreeFlags = 0),
  2763. (workInProgress.deletions = null),
  2764. (workInProgress.memoizedProps = current.memoizedProps),
  2765. (workInProgress.memoizedState = current.memoizedState),
  2766. (workInProgress.updateQueue = current.updateQueue),
  2767. (workInProgress.type = current.type),
  2768. (renderLanes = current.dependencies),
  2769. (workInProgress.dependencies =
  2770. null === renderLanes
  2771. ? null
  2772. : {
  2773. lanes: renderLanes.lanes,
  2774. firstContext: renderLanes.firstContext
  2775. }),
  2776. (workInProgress.selfBaseDuration = current.selfBaseDuration),
  2777. (workInProgress.treeBaseDuration = current.treeBaseDuration));
  2778. return workInProgress;
  2779. }
  2780. function createFiberFromTypeAndProps(
  2781. type,
  2782. key,
  2783. pendingProps,
  2784. owner,
  2785. mode,
  2786. lanes
  2787. ) {
  2788. var fiberTag = 0;
  2789. owner = type;
  2790. if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
  2791. else if ("string" === typeof type)
  2792. fiberTag = isHostHoistableType(
  2793. type,
  2794. pendingProps,
  2795. contextStackCursor.current
  2796. )
  2797. ? 26
  2798. : "html" === type || "head" === type || "body" === type
  2799. ? 27
  2800. : 5;
  2801. else
  2802. a: switch (type) {
  2803. case REACT_ACTIVITY_TYPE:
  2804. return (
  2805. (type = createFiberImplClass(31, pendingProps, key, mode)),
  2806. (type.elementType = REACT_ACTIVITY_TYPE),
  2807. (type.lanes = lanes),
  2808. type
  2809. );
  2810. case REACT_FRAGMENT_TYPE:
  2811. return createFiberFromFragment(pendingProps.children, mode, lanes, key);
  2812. case REACT_STRICT_MODE_TYPE:
  2813. fiberTag = 8;
  2814. mode |= 24;
  2815. break;
  2816. case REACT_PROFILER_TYPE:
  2817. return (
  2818. (type = createFiberImplClass(12, pendingProps, key, mode | 2)),
  2819. (type.elementType = REACT_PROFILER_TYPE),
  2820. (type.lanes = lanes),
  2821. (type.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }),
  2822. type
  2823. );
  2824. case REACT_SUSPENSE_TYPE:
  2825. return (
  2826. (type = createFiberImplClass(13, pendingProps, key, mode)),
  2827. (type.elementType = REACT_SUSPENSE_TYPE),
  2828. (type.lanes = lanes),
  2829. type
  2830. );
  2831. case REACT_SUSPENSE_LIST_TYPE:
  2832. return (
  2833. (type = createFiberImplClass(19, pendingProps, key, mode)),
  2834. (type.elementType = REACT_SUSPENSE_LIST_TYPE),
  2835. (type.lanes = lanes),
  2836. type
  2837. );
  2838. default:
  2839. if ("object" === typeof type && null !== type)
  2840. switch (type.$$typeof) {
  2841. case REACT_CONTEXT_TYPE:
  2842. fiberTag = 10;
  2843. break a;
  2844. case REACT_CONSUMER_TYPE:
  2845. fiberTag = 9;
  2846. break a;
  2847. case REACT_FORWARD_REF_TYPE:
  2848. fiberTag = 11;
  2849. break a;
  2850. case REACT_MEMO_TYPE:
  2851. fiberTag = 14;
  2852. break a;
  2853. case REACT_LAZY_TYPE:
  2854. fiberTag = 16;
  2855. owner = null;
  2856. break a;
  2857. }
  2858. fiberTag = 29;
  2859. pendingProps = Error(
  2860. formatProdErrorMessage(130, null === type ? "null" : typeof type, "")
  2861. );
  2862. owner = null;
  2863. }
  2864. key = createFiberImplClass(fiberTag, pendingProps, key, mode);
  2865. key.elementType = type;
  2866. key.type = owner;
  2867. key.lanes = lanes;
  2868. return key;
  2869. }
  2870. function createFiberFromFragment(elements, mode, lanes, key) {
  2871. elements = createFiberImplClass(7, elements, key, mode);
  2872. elements.lanes = lanes;
  2873. return elements;
  2874. }
  2875. function createFiberFromText(content, mode, lanes) {
  2876. content = createFiberImplClass(6, content, null, mode);
  2877. content.lanes = lanes;
  2878. return content;
  2879. }
  2880. function createFiberFromDehydratedFragment(dehydratedNode) {
  2881. var fiber = createFiberImplClass(18, null, null, 0);
  2882. fiber.stateNode = dehydratedNode;
  2883. return fiber;
  2884. }
  2885. function createFiberFromPortal(portal, mode, lanes) {
  2886. mode = createFiberImplClass(
  2887. 4,
  2888. null !== portal.children ? portal.children : [],
  2889. portal.key,
  2890. mode
  2891. );
  2892. mode.lanes = lanes;
  2893. mode.stateNode = {
  2894. containerInfo: portal.containerInfo,
  2895. pendingChildren: null,
  2896. implementation: portal.implementation
  2897. };
  2898. return mode;
  2899. }
  2900. var CapturedStacks = new WeakMap();
  2901. function createCapturedValueAtFiber(value, source) {
  2902. if ("object" === typeof value && null !== value) {
  2903. var existing = CapturedStacks.get(value);
  2904. if (void 0 !== existing) return existing;
  2905. source = {
  2906. value: value,
  2907. source: source,
  2908. stack: getStackByFiberInDevAndProd(source)
  2909. };
  2910. CapturedStacks.set(value, source);
  2911. return source;
  2912. }
  2913. return {
  2914. value: value,
  2915. source: source,
  2916. stack: getStackByFiberInDevAndProd(source)
  2917. };
  2918. }
  2919. var forkStack = [],
  2920. forkStackIndex = 0,
  2921. treeForkProvider = null,
  2922. treeForkCount = 0,
  2923. idStack = [],
  2924. idStackIndex = 0,
  2925. treeContextProvider = null,
  2926. treeContextId = 1,
  2927. treeContextOverflow = "";
  2928. function pushTreeFork(workInProgress, totalChildren) {
  2929. forkStack[forkStackIndex++] = treeForkCount;
  2930. forkStack[forkStackIndex++] = treeForkProvider;
  2931. treeForkProvider = workInProgress;
  2932. treeForkCount = totalChildren;
  2933. }
  2934. function pushTreeId(workInProgress, totalChildren, index) {
  2935. idStack[idStackIndex++] = treeContextId;
  2936. idStack[idStackIndex++] = treeContextOverflow;
  2937. idStack[idStackIndex++] = treeContextProvider;
  2938. treeContextProvider = workInProgress;
  2939. var baseIdWithLeadingBit = treeContextId;
  2940. workInProgress = treeContextOverflow;
  2941. var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
  2942. baseIdWithLeadingBit &= ~(1 << baseLength);
  2943. index += 1;
  2944. var length = 32 - clz32(totalChildren) + baseLength;
  2945. if (30 < length) {
  2946. var numberOfOverflowBits = baseLength - (baseLength % 5);
  2947. length = (
  2948. baseIdWithLeadingBit &
  2949. ((1 << numberOfOverflowBits) - 1)
  2950. ).toString(32);
  2951. baseIdWithLeadingBit >>= numberOfOverflowBits;
  2952. baseLength -= numberOfOverflowBits;
  2953. treeContextId =
  2954. (1 << (32 - clz32(totalChildren) + baseLength)) |
  2955. (index << baseLength) |
  2956. baseIdWithLeadingBit;
  2957. treeContextOverflow = length + workInProgress;
  2958. } else
  2959. (treeContextId =
  2960. (1 << length) | (index << baseLength) | baseIdWithLeadingBit),
  2961. (treeContextOverflow = workInProgress);
  2962. }
  2963. function pushMaterializedTreeId(workInProgress) {
  2964. null !== workInProgress.return &&
  2965. (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));
  2966. }
  2967. function popTreeContext(workInProgress) {
  2968. for (; workInProgress === treeForkProvider; )
  2969. (treeForkProvider = forkStack[--forkStackIndex]),
  2970. (forkStack[forkStackIndex] = null),
  2971. (treeForkCount = forkStack[--forkStackIndex]),
  2972. (forkStack[forkStackIndex] = null);
  2973. for (; workInProgress === treeContextProvider; )
  2974. (treeContextProvider = idStack[--idStackIndex]),
  2975. (idStack[idStackIndex] = null),
  2976. (treeContextOverflow = idStack[--idStackIndex]),
  2977. (idStack[idStackIndex] = null),
  2978. (treeContextId = idStack[--idStackIndex]),
  2979. (idStack[idStackIndex] = null);
  2980. }
  2981. function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
  2982. idStack[idStackIndex++] = treeContextId;
  2983. idStack[idStackIndex++] = treeContextOverflow;
  2984. idStack[idStackIndex++] = treeContextProvider;
  2985. treeContextId = suspendedContext.id;
  2986. treeContextOverflow = suspendedContext.overflow;
  2987. treeContextProvider = workInProgress;
  2988. }
  2989. var hydrationParentFiber = null,
  2990. nextHydratableInstance = null,
  2991. isHydrating = !1,
  2992. hydrationErrors = null,
  2993. rootOrSingletonContext = !1,
  2994. HydrationMismatchException = Error(formatProdErrorMessage(519));
  2995. function throwOnHydrationMismatch(fiber) {
  2996. var error = Error(
  2997. formatProdErrorMessage(
  2998. 418,
  2999. 1 < arguments.length && void 0 !== arguments[1] && arguments[1]
  3000. ? "text"
  3001. : "HTML",
  3002. ""
  3003. )
  3004. );
  3005. queueHydrationError(createCapturedValueAtFiber(error, fiber));
  3006. throw HydrationMismatchException;
  3007. }
  3008. function prepareToHydrateHostInstance(fiber) {
  3009. var instance = fiber.stateNode,
  3010. type = fiber.type,
  3011. props = fiber.memoizedProps;
  3012. instance[internalInstanceKey] = fiber;
  3013. instance[internalPropsKey] = props;
  3014. switch (type) {
  3015. case "dialog":
  3016. listenToNonDelegatedEvent("cancel", instance);
  3017. listenToNonDelegatedEvent("close", instance);
  3018. break;
  3019. case "iframe":
  3020. case "object":
  3021. case "embed":
  3022. listenToNonDelegatedEvent("load", instance);
  3023. break;
  3024. case "video":
  3025. case "audio":
  3026. for (type = 0; type < mediaEventTypes.length; type++)
  3027. listenToNonDelegatedEvent(mediaEventTypes[type], instance);
  3028. break;
  3029. case "source":
  3030. listenToNonDelegatedEvent("error", instance);
  3031. break;
  3032. case "img":
  3033. case "image":
  3034. case "link":
  3035. listenToNonDelegatedEvent("error", instance);
  3036. listenToNonDelegatedEvent("load", instance);
  3037. break;
  3038. case "details":
  3039. listenToNonDelegatedEvent("toggle", instance);
  3040. break;
  3041. case "input":
  3042. listenToNonDelegatedEvent("invalid", instance);
  3043. initInput(
  3044. instance,
  3045. props.value,
  3046. props.defaultValue,
  3047. props.checked,
  3048. props.defaultChecked,
  3049. props.type,
  3050. props.name,
  3051. !0
  3052. );
  3053. break;
  3054. case "select":
  3055. listenToNonDelegatedEvent("invalid", instance);
  3056. break;
  3057. case "textarea":
  3058. listenToNonDelegatedEvent("invalid", instance),
  3059. initTextarea(instance, props.value, props.defaultValue, props.children);
  3060. }
  3061. type = props.children;
  3062. ("string" !== typeof type &&
  3063. "number" !== typeof type &&
  3064. "bigint" !== typeof type) ||
  3065. instance.textContent === "" + type ||
  3066. !0 === props.suppressHydrationWarning ||
  3067. checkForUnmatchedText(instance.textContent, type)
  3068. ? (null != props.popover &&
  3069. (listenToNonDelegatedEvent("beforetoggle", instance),
  3070. listenToNonDelegatedEvent("toggle", instance)),
  3071. null != props.onScroll && listenToNonDelegatedEvent("scroll", instance),
  3072. null != props.onScrollEnd &&
  3073. listenToNonDelegatedEvent("scrollend", instance),
  3074. null != props.onClick && (instance.onclick = noop$1),
  3075. (instance = !0))
  3076. : (instance = !1);
  3077. instance || throwOnHydrationMismatch(fiber, !0);
  3078. }
  3079. function popToNextHostParent(fiber) {
  3080. for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
  3081. switch (hydrationParentFiber.tag) {
  3082. case 5:
  3083. case 31:
  3084. case 13:
  3085. rootOrSingletonContext = !1;
  3086. return;
  3087. case 27:
  3088. case 3:
  3089. rootOrSingletonContext = !0;
  3090. return;
  3091. default:
  3092. hydrationParentFiber = hydrationParentFiber.return;
  3093. }
  3094. }
  3095. function popHydrationState(fiber) {
  3096. if (fiber !== hydrationParentFiber) return !1;
  3097. if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;
  3098. var tag = fiber.tag,
  3099. JSCompiler_temp;
  3100. if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {
  3101. if ((JSCompiler_temp = 5 === tag))
  3102. (JSCompiler_temp = fiber.type),
  3103. (JSCompiler_temp =
  3104. !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) ||
  3105. shouldSetTextContent(fiber.type, fiber.memoizedProps));
  3106. JSCompiler_temp = !JSCompiler_temp;
  3107. }
  3108. JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber);
  3109. popToNextHostParent(fiber);
  3110. if (13 === tag) {
  3111. fiber = fiber.memoizedState;
  3112. fiber = null !== fiber ? fiber.dehydrated : null;
  3113. if (!fiber) throw Error(formatProdErrorMessage(317));
  3114. nextHydratableInstance =
  3115. getNextHydratableInstanceAfterHydrationBoundary(fiber);
  3116. } else if (31 === tag) {
  3117. fiber = fiber.memoizedState;
  3118. fiber = null !== fiber ? fiber.dehydrated : null;
  3119. if (!fiber) throw Error(formatProdErrorMessage(317));
  3120. nextHydratableInstance =
  3121. getNextHydratableInstanceAfterHydrationBoundary(fiber);
  3122. } else
  3123. 27 === tag
  3124. ? ((tag = nextHydratableInstance),
  3125. isSingletonScope(fiber.type)
  3126. ? ((fiber = previousHydratableOnEnteringScopedSingleton),
  3127. (previousHydratableOnEnteringScopedSingleton = null),
  3128. (nextHydratableInstance = fiber))
  3129. : (nextHydratableInstance = tag))
  3130. : (nextHydratableInstance = hydrationParentFiber
  3131. ? getNextHydratable(fiber.stateNode.nextSibling)
  3132. : null);
  3133. return !0;
  3134. }
  3135. function resetHydrationState() {
  3136. nextHydratableInstance = hydrationParentFiber = null;
  3137. isHydrating = !1;
  3138. }
  3139. function upgradeHydrationErrorsToRecoverable() {
  3140. var queuedErrors = hydrationErrors;
  3141. null !== queuedErrors &&
  3142. (null === workInProgressRootRecoverableErrors
  3143. ? (workInProgressRootRecoverableErrors = queuedErrors)
  3144. : workInProgressRootRecoverableErrors.push.apply(
  3145. workInProgressRootRecoverableErrors,
  3146. queuedErrors
  3147. ),
  3148. (hydrationErrors = null));
  3149. return queuedErrors;
  3150. }
  3151. function queueHydrationError(error) {
  3152. null === hydrationErrors
  3153. ? (hydrationErrors = [error])
  3154. : hydrationErrors.push(error);
  3155. }
  3156. var valueCursor = createCursor(null),
  3157. currentlyRenderingFiber$1 = null,
  3158. lastContextDependency = null;
  3159. function pushProvider(providerFiber, context, nextValue) {
  3160. push(valueCursor, context._currentValue);
  3161. context._currentValue = nextValue;
  3162. }
  3163. function popProvider(context) {
  3164. context._currentValue = valueCursor.current;
  3165. pop(valueCursor);
  3166. }
  3167. function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
  3168. for (; null !== parent; ) {
  3169. var alternate = parent.alternate;
  3170. (parent.childLanes & renderLanes) !== renderLanes
  3171. ? ((parent.childLanes |= renderLanes),
  3172. null !== alternate && (alternate.childLanes |= renderLanes))
  3173. : null !== alternate &&
  3174. (alternate.childLanes & renderLanes) !== renderLanes &&
  3175. (alternate.childLanes |= renderLanes);
  3176. if (parent === propagationRoot) break;
  3177. parent = parent.return;
  3178. }
  3179. }
  3180. function propagateContextChanges(
  3181. workInProgress,
  3182. contexts,
  3183. renderLanes,
  3184. forcePropagateEntireTree
  3185. ) {
  3186. var fiber = workInProgress.child;
  3187. null !== fiber && (fiber.return = workInProgress);
  3188. for (; null !== fiber; ) {
  3189. var list = fiber.dependencies;
  3190. if (null !== list) {
  3191. var nextFiber = fiber.child;
  3192. list = list.firstContext;
  3193. a: for (; null !== list; ) {
  3194. var dependency = list;
  3195. list = fiber;
  3196. for (var i = 0; i < contexts.length; i++)
  3197. if (dependency.context === contexts[i]) {
  3198. list.lanes |= renderLanes;
  3199. dependency = list.alternate;
  3200. null !== dependency && (dependency.lanes |= renderLanes);
  3201. scheduleContextWorkOnParentPath(
  3202. list.return,
  3203. renderLanes,
  3204. workInProgress
  3205. );
  3206. forcePropagateEntireTree || (nextFiber = null);
  3207. break a;
  3208. }
  3209. list = dependency.next;
  3210. }
  3211. } else if (18 === fiber.tag) {
  3212. nextFiber = fiber.return;
  3213. if (null === nextFiber) throw Error(formatProdErrorMessage(341));
  3214. nextFiber.lanes |= renderLanes;
  3215. list = nextFiber.alternate;
  3216. null !== list && (list.lanes |= renderLanes);
  3217. scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);
  3218. nextFiber = null;
  3219. } else nextFiber = fiber.child;
  3220. if (null !== nextFiber) nextFiber.return = fiber;
  3221. else
  3222. for (nextFiber = fiber; null !== nextFiber; ) {
  3223. if (nextFiber === workInProgress) {
  3224. nextFiber = null;
  3225. break;
  3226. }
  3227. fiber = nextFiber.sibling;
  3228. if (null !== fiber) {
  3229. fiber.return = nextFiber.return;
  3230. nextFiber = fiber;
  3231. break;
  3232. }
  3233. nextFiber = nextFiber.return;
  3234. }
  3235. fiber = nextFiber;
  3236. }
  3237. }
  3238. function propagateParentContextChanges(
  3239. current,
  3240. workInProgress,
  3241. renderLanes,
  3242. forcePropagateEntireTree
  3243. ) {
  3244. current = null;
  3245. for (
  3246. var parent = workInProgress, isInsidePropagationBailout = !1;
  3247. null !== parent;
  3248. ) {
  3249. if (!isInsidePropagationBailout)
  3250. if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;
  3251. else if (0 !== (parent.flags & 262144)) break;
  3252. if (10 === parent.tag) {
  3253. var currentParent = parent.alternate;
  3254. if (null === currentParent) throw Error(formatProdErrorMessage(387));
  3255. currentParent = currentParent.memoizedProps;
  3256. if (null !== currentParent) {
  3257. var context = parent.type;
  3258. objectIs(parent.pendingProps.value, currentParent.value) ||
  3259. (null !== current ? current.push(context) : (current = [context]));
  3260. }
  3261. } else if (parent === hostTransitionProviderCursor.current) {
  3262. currentParent = parent.alternate;
  3263. if (null === currentParent) throw Error(formatProdErrorMessage(387));
  3264. currentParent.memoizedState.memoizedState !==
  3265. parent.memoizedState.memoizedState &&
  3266. (null !== current
  3267. ? current.push(HostTransitionContext)
  3268. : (current = [HostTransitionContext]));
  3269. }
  3270. parent = parent.return;
  3271. }
  3272. null !== current &&
  3273. propagateContextChanges(
  3274. workInProgress,
  3275. current,
  3276. renderLanes,
  3277. forcePropagateEntireTree
  3278. );
  3279. workInProgress.flags |= 262144;
  3280. }
  3281. function checkIfContextChanged(currentDependencies) {
  3282. for (
  3283. currentDependencies = currentDependencies.firstContext;
  3284. null !== currentDependencies;
  3285. ) {
  3286. if (
  3287. !objectIs(
  3288. currentDependencies.context._currentValue,
  3289. currentDependencies.memoizedValue
  3290. )
  3291. )
  3292. return !0;
  3293. currentDependencies = currentDependencies.next;
  3294. }
  3295. return !1;
  3296. }
  3297. function prepareToReadContext(workInProgress) {
  3298. currentlyRenderingFiber$1 = workInProgress;
  3299. lastContextDependency = null;
  3300. workInProgress = workInProgress.dependencies;
  3301. null !== workInProgress && (workInProgress.firstContext = null);
  3302. }
  3303. function readContext(context) {
  3304. return readContextForConsumer(currentlyRenderingFiber$1, context);
  3305. }
  3306. function readContextDuringReconciliation(consumer, context) {
  3307. null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
  3308. return readContextForConsumer(consumer, context);
  3309. }
  3310. function readContextForConsumer(consumer, context) {
  3311. var value = context._currentValue;
  3312. context = { context: context, memoizedValue: value, next: null };
  3313. if (null === lastContextDependency) {
  3314. if (null === consumer) throw Error(formatProdErrorMessage(308));
  3315. lastContextDependency = context;
  3316. consumer.dependencies = { lanes: 0, firstContext: context };
  3317. consumer.flags |= 524288;
  3318. } else lastContextDependency = lastContextDependency.next = context;
  3319. return value;
  3320. }
  3321. var AbortControllerLocal =
  3322. "undefined" !== typeof AbortController
  3323. ? AbortController
  3324. : function () {
  3325. var listeners = [],
  3326. signal = (this.signal = {
  3327. aborted: !1,
  3328. addEventListener: function (type, listener) {
  3329. listeners.push(listener);
  3330. }
  3331. });
  3332. this.abort = function () {
  3333. signal.aborted = !0;
  3334. listeners.forEach(function (listener) {
  3335. return listener();
  3336. });
  3337. };
  3338. },
  3339. scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
  3340. NormalPriority = Scheduler.unstable_NormalPriority,
  3341. CacheContext = {
  3342. $$typeof: REACT_CONTEXT_TYPE,
  3343. Consumer: null,
  3344. Provider: null,
  3345. _currentValue: null,
  3346. _currentValue2: null,
  3347. _threadCount: 0
  3348. };
  3349. function createCache() {
  3350. return {
  3351. controller: new AbortControllerLocal(),
  3352. data: new Map(),
  3353. refCount: 0
  3354. };
  3355. }
  3356. function releaseCache(cache) {
  3357. cache.refCount--;
  3358. 0 === cache.refCount &&
  3359. scheduleCallback$2(NormalPriority, function () {
  3360. cache.controller.abort();
  3361. });
  3362. }
  3363. var now = Scheduler.unstable_now,
  3364. renderStartTime = -0,
  3365. commitStartTime = -0,
  3366. commitEndTime = -0,
  3367. commitErrors = null,
  3368. profilerStartTime = -1.1,
  3369. profilerEffectDuration = -0,
  3370. componentEffectDuration = -0,
  3371. componentEffectStartTime = -1.1,
  3372. componentEffectEndTime = -1.1,
  3373. componentEffectErrors = null,
  3374. componentEffectSpawnedUpdate = !1,
  3375. blockingClampTime = -0,
  3376. blockingUpdateTime = -1.1,
  3377. blockingUpdateType = 0,
  3378. blockingEventTime = -1.1,
  3379. blockingEventType = null,
  3380. blockingEventRepeatTime = -1.1,
  3381. blockingSuspendedTime = -1.1,
  3382. transitionClampTime = -0,
  3383. transitionStartTime = -1.1,
  3384. transitionUpdateTime = -1.1,
  3385. transitionUpdateType = 0,
  3386. transitionEventTime = -1.1,
  3387. transitionEventType = null,
  3388. transitionEventRepeatTime = -1.1,
  3389. transitionSuspendedTime = -1.1,
  3390. yieldReason = 0,
  3391. yieldStartTime = -1.1;
  3392. function startUpdateTimerByLane(lane) {
  3393. if (0 !== (lane & 127)) {
  3394. if (0 > blockingUpdateTime) {
  3395. blockingUpdateTime = now();
  3396. 0 !== (executionContext & 6) &&
  3397. ((componentEffectSpawnedUpdate = !0), (blockingUpdateType = 1));
  3398. lane = resolveEventTimeStamp();
  3399. var newEventType$30 = resolveEventType();
  3400. lane !== blockingEventRepeatTime || newEventType$30 !== blockingEventType
  3401. ? (blockingEventRepeatTime = -1.1)
  3402. : null !== newEventType$30 && (blockingUpdateType = 1);
  3403. blockingEventTime = lane;
  3404. blockingEventType = newEventType$30;
  3405. }
  3406. } else if (
  3407. 0 !== (lane & 4194048) &&
  3408. 0 > transitionUpdateTime &&
  3409. ((transitionUpdateTime = now()), 0 > transitionStartTime)
  3410. ) {
  3411. lane = resolveEventTimeStamp();
  3412. newEventType$30 = resolveEventType();
  3413. if (
  3414. lane !== transitionEventRepeatTime ||
  3415. newEventType$30 !== transitionEventType
  3416. )
  3417. transitionEventRepeatTime = -1.1;
  3418. transitionEventTime = lane;
  3419. transitionEventType = newEventType$30;
  3420. }
  3421. }
  3422. function startHostActionTimer() {
  3423. if (0 > blockingUpdateTime) {
  3424. blockingUpdateTime = now();
  3425. 0 !== (executionContext & 6) && (blockingUpdateType = 1);
  3426. var newEventTime = resolveEventTimeStamp(),
  3427. newEventType = resolveEventType();
  3428. newEventTime !== blockingEventRepeatTime ||
  3429. newEventType !== blockingEventType
  3430. ? (blockingEventRepeatTime = -1.1)
  3431. : null !== newEventType && (blockingUpdateType = 1);
  3432. blockingEventTime = newEventTime;
  3433. blockingEventType = newEventType;
  3434. }
  3435. if (
  3436. 0 > transitionUpdateTime &&
  3437. ((transitionUpdateTime = now()), 0 > transitionStartTime)
  3438. ) {
  3439. newEventTime = resolveEventTimeStamp();
  3440. newEventType = resolveEventType();
  3441. if (
  3442. newEventTime !== transitionEventRepeatTime ||
  3443. newEventType !== transitionEventType
  3444. )
  3445. transitionEventRepeatTime = -1.1;
  3446. transitionEventTime = newEventTime;
  3447. transitionEventType = newEventType;
  3448. }
  3449. }
  3450. function pushNestedEffectDurations() {
  3451. var prevEffectDuration = profilerEffectDuration;
  3452. profilerEffectDuration = 0;
  3453. return prevEffectDuration;
  3454. }
  3455. function popNestedEffectDurations(prevEffectDuration) {
  3456. var elapsedTime = profilerEffectDuration;
  3457. profilerEffectDuration = prevEffectDuration;
  3458. return elapsedTime;
  3459. }
  3460. function bubbleNestedEffectDurations(prevEffectDuration) {
  3461. var elapsedTime = profilerEffectDuration;
  3462. profilerEffectDuration += prevEffectDuration;
  3463. return elapsedTime;
  3464. }
  3465. function resetComponentEffectTimers() {
  3466. componentEffectEndTime = componentEffectStartTime = -1.1;
  3467. }
  3468. function pushComponentEffectStart() {
  3469. var prevEffectStart = componentEffectStartTime;
  3470. componentEffectStartTime = -1.1;
  3471. return prevEffectStart;
  3472. }
  3473. function popComponentEffectStart(prevEffectStart) {
  3474. 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart);
  3475. }
  3476. function pushComponentEffectDuration() {
  3477. var prevEffectDuration = componentEffectDuration;
  3478. componentEffectDuration = -0;
  3479. return prevEffectDuration;
  3480. }
  3481. function popComponentEffectDuration(prevEffectDuration) {
  3482. 0 <= prevEffectDuration && (componentEffectDuration = prevEffectDuration);
  3483. }
  3484. function pushComponentEffectErrors() {
  3485. var prevErrors = componentEffectErrors;
  3486. componentEffectErrors = null;
  3487. return prevErrors;
  3488. }
  3489. function pushComponentEffectDidSpawnUpdate() {
  3490. var prev = componentEffectSpawnedUpdate;
  3491. componentEffectSpawnedUpdate = !1;
  3492. return prev;
  3493. }
  3494. var currentUpdateIsNested = !1,
  3495. nestedUpdateScheduled = !1;
  3496. function startProfilerTimer(fiber) {
  3497. profilerStartTime = now();
  3498. 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
  3499. }
  3500. function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
  3501. if (0 <= profilerStartTime) {
  3502. var elapsedTime = now() - profilerStartTime;
  3503. fiber.actualDuration += elapsedTime;
  3504. fiber.selfBaseDuration = elapsedTime;
  3505. profilerStartTime = -1;
  3506. }
  3507. }
  3508. function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
  3509. if (0 <= profilerStartTime) {
  3510. var elapsedTime = now() - profilerStartTime;
  3511. fiber.actualDuration += elapsedTime;
  3512. profilerStartTime = -1;
  3513. }
  3514. }
  3515. function recordEffectDuration() {
  3516. if (0 <= profilerStartTime) {
  3517. var endTime = now(),
  3518. elapsedTime = endTime - profilerStartTime;
  3519. profilerStartTime = -1;
  3520. profilerEffectDuration += elapsedTime;
  3521. componentEffectDuration += elapsedTime;
  3522. componentEffectEndTime = endTime;
  3523. }
  3524. }
  3525. function recordEffectError(errorInfo) {
  3526. null === componentEffectErrors && (componentEffectErrors = []);
  3527. componentEffectErrors.push(errorInfo);
  3528. null === commitErrors && (commitErrors = []);
  3529. commitErrors.push(errorInfo);
  3530. }
  3531. function startEffectTimer() {
  3532. profilerStartTime = now();
  3533. 0 > componentEffectStartTime &&
  3534. (componentEffectStartTime = profilerStartTime);
  3535. }
  3536. function transferActualDuration(fiber) {
  3537. for (var child = fiber.child; child; )
  3538. (fiber.actualDuration += child.actualDuration), (child = child.sibling);
  3539. }
  3540. var currentEntangledListeners = null,
  3541. currentEntangledPendingCount = 0,
  3542. currentEntangledLane = 0,
  3543. currentEntangledActionThenable = null;
  3544. function entangleAsyncAction(transition, thenable) {
  3545. if (null === currentEntangledListeners) {
  3546. var entangledListeners = (currentEntangledListeners = []);
  3547. currentEntangledPendingCount = 0;
  3548. currentEntangledLane = requestTransitionLane();
  3549. currentEntangledActionThenable = {
  3550. status: "pending",
  3551. value: void 0,
  3552. then: function (resolve) {
  3553. entangledListeners.push(resolve);
  3554. }
  3555. };
  3556. }
  3557. currentEntangledPendingCount++;
  3558. thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
  3559. return thenable;
  3560. }
  3561. function pingEngtangledActionScope() {
  3562. if (
  3563. 0 === --currentEntangledPendingCount &&
  3564. (-1 < transitionUpdateTime || (transitionStartTime = -1.1),
  3565. null !== currentEntangledListeners)
  3566. ) {
  3567. null !== currentEntangledActionThenable &&
  3568. (currentEntangledActionThenable.status = "fulfilled");
  3569. var listeners = currentEntangledListeners;
  3570. currentEntangledListeners = null;
  3571. currentEntangledLane = 0;
  3572. currentEntangledActionThenable = null;
  3573. for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
  3574. }
  3575. }
  3576. function chainThenableValue(thenable, result) {
  3577. var listeners = [],
  3578. thenableWithOverride = {
  3579. status: "pending",
  3580. value: null,
  3581. reason: null,
  3582. then: function (resolve) {
  3583. listeners.push(resolve);
  3584. }
  3585. };
  3586. thenable.then(
  3587. function () {
  3588. thenableWithOverride.status = "fulfilled";
  3589. thenableWithOverride.value = result;
  3590. for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
  3591. },
  3592. function (error) {
  3593. thenableWithOverride.status = "rejected";
  3594. thenableWithOverride.reason = error;
  3595. for (error = 0; error < listeners.length; error++)
  3596. (0, listeners[error])(void 0);
  3597. }
  3598. );
  3599. return thenableWithOverride;
  3600. }
  3601. var prevOnStartTransitionFinish = ReactSharedInternals.S;
  3602. ReactSharedInternals.S = function (transition, returnValue) {
  3603. globalMostRecentTransitionTime = now$1();
  3604. if (
  3605. "object" === typeof returnValue &&
  3606. null !== returnValue &&
  3607. "function" === typeof returnValue.then
  3608. ) {
  3609. if (0 > transitionStartTime && 0 > transitionUpdateTime) {
  3610. transitionStartTime = now();
  3611. var newEventTime = resolveEventTimeStamp(),
  3612. newEventType = resolveEventType();
  3613. if (
  3614. newEventTime !== transitionEventRepeatTime ||
  3615. newEventType !== transitionEventType
  3616. )
  3617. transitionEventRepeatTime = -1.1;
  3618. transitionEventTime = newEventTime;
  3619. transitionEventType = newEventType;
  3620. }
  3621. entangleAsyncAction(transition, returnValue);
  3622. }
  3623. null !== prevOnStartTransitionFinish &&
  3624. prevOnStartTransitionFinish(transition, returnValue);
  3625. };
  3626. var resumedCache = createCursor(null);
  3627. function peekCacheFromPool() {
  3628. var cacheResumedFromPreviousRender = resumedCache.current;
  3629. return null !== cacheResumedFromPreviousRender
  3630. ? cacheResumedFromPreviousRender
  3631. : workInProgressRoot.pooledCache;
  3632. }
  3633. function pushTransition(offscreenWorkInProgress, prevCachePool) {
  3634. null === prevCachePool
  3635. ? push(resumedCache, resumedCache.current)
  3636. : push(resumedCache, prevCachePool.pool);
  3637. }
  3638. function getSuspendedCache() {
  3639. var cacheFromPool = peekCacheFromPool();
  3640. return null === cacheFromPool
  3641. ? null
  3642. : { parent: CacheContext._currentValue, pool: cacheFromPool };
  3643. }
  3644. var SuspenseException = Error(formatProdErrorMessage(460)),
  3645. SuspenseyCommitException = Error(formatProdErrorMessage(474)),
  3646. SuspenseActionException = Error(formatProdErrorMessage(542)),
  3647. noopSuspenseyCommitThenable = { then: function () {} };
  3648. function isThenableResolved(thenable) {
  3649. thenable = thenable.status;
  3650. return "fulfilled" === thenable || "rejected" === thenable;
  3651. }
  3652. function trackUsedThenable(thenableState, thenable, index) {
  3653. index = thenableState[index];
  3654. void 0 === index
  3655. ? thenableState.push(thenable)
  3656. : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));
  3657. switch (thenable.status) {
  3658. case "fulfilled":
  3659. return thenable.value;
  3660. case "rejected":
  3661. throw (
  3662. ((thenableState = thenable.reason),
  3663. checkIfUseWrappedInAsyncCatch(thenableState),
  3664. thenableState)
  3665. );
  3666. default:
  3667. if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1);
  3668. else {
  3669. thenableState = workInProgressRoot;
  3670. if (null !== thenableState && 100 < thenableState.shellSuspendCounter)
  3671. throw Error(formatProdErrorMessage(482));
  3672. thenableState = thenable;
  3673. thenableState.status = "pending";
  3674. thenableState.then(
  3675. function (fulfilledValue) {
  3676. if ("pending" === thenable.status) {
  3677. var fulfilledThenable = thenable;
  3678. fulfilledThenable.status = "fulfilled";
  3679. fulfilledThenable.value = fulfilledValue;
  3680. }
  3681. },
  3682. function (error) {
  3683. if ("pending" === thenable.status) {
  3684. var rejectedThenable = thenable;
  3685. rejectedThenable.status = "rejected";
  3686. rejectedThenable.reason = error;
  3687. }
  3688. }
  3689. );
  3690. }
  3691. switch (thenable.status) {
  3692. case "fulfilled":
  3693. return thenable.value;
  3694. case "rejected":
  3695. throw (
  3696. ((thenableState = thenable.reason),
  3697. checkIfUseWrappedInAsyncCatch(thenableState),
  3698. thenableState)
  3699. );
  3700. }
  3701. suspendedThenable = thenable;
  3702. throw SuspenseException;
  3703. }
  3704. }
  3705. function resolveLazy(lazyType) {
  3706. try {
  3707. var init = lazyType._init;
  3708. return init(lazyType._payload);
  3709. } catch (x) {
  3710. if (null !== x && "object" === typeof x && "function" === typeof x.then)
  3711. throw ((suspendedThenable = x), SuspenseException);
  3712. throw x;
  3713. }
  3714. }
  3715. var suspendedThenable = null;
  3716. function getSuspendedThenable() {
  3717. if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));
  3718. var thenable = suspendedThenable;
  3719. suspendedThenable = null;
  3720. return thenable;
  3721. }
  3722. function checkIfUseWrappedInAsyncCatch(rejectedReason) {
  3723. if (
  3724. rejectedReason === SuspenseException ||
  3725. rejectedReason === SuspenseActionException
  3726. )
  3727. throw Error(formatProdErrorMessage(483));
  3728. }
  3729. var thenableState$1 = null,
  3730. thenableIndexCounter$1 = 0;
  3731. function unwrapThenable(thenable) {
  3732. var index = thenableIndexCounter$1;
  3733. thenableIndexCounter$1 += 1;
  3734. null === thenableState$1 && (thenableState$1 = []);
  3735. return trackUsedThenable(thenableState$1, thenable, index);
  3736. }
  3737. function coerceRef(workInProgress, element) {
  3738. element = element.props.ref;
  3739. workInProgress.ref = void 0 !== element ? element : null;
  3740. }
  3741. function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
  3742. if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
  3743. throw Error(formatProdErrorMessage(525));
  3744. returnFiber = Object.prototype.toString.call(newChild);
  3745. throw Error(
  3746. formatProdErrorMessage(
  3747. 31,
  3748. "[object Object]" === returnFiber
  3749. ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
  3750. : returnFiber
  3751. )
  3752. );
  3753. }
  3754. function createChildReconciler(shouldTrackSideEffects) {
  3755. function deleteChild(returnFiber, childToDelete) {
  3756. if (shouldTrackSideEffects) {
  3757. var deletions = returnFiber.deletions;
  3758. null === deletions
  3759. ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))
  3760. : deletions.push(childToDelete);
  3761. }
  3762. }
  3763. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  3764. if (!shouldTrackSideEffects) return null;
  3765. for (; null !== currentFirstChild; )
  3766. deleteChild(returnFiber, currentFirstChild),
  3767. (currentFirstChild = currentFirstChild.sibling);
  3768. return null;
  3769. }
  3770. function mapRemainingChildren(currentFirstChild) {
  3771. for (var existingChildren = new Map(); null !== currentFirstChild; )
  3772. null !== currentFirstChild.key
  3773. ? existingChildren.set(currentFirstChild.key, currentFirstChild)
  3774. : existingChildren.set(currentFirstChild.index, currentFirstChild),
  3775. (currentFirstChild = currentFirstChild.sibling);
  3776. return existingChildren;
  3777. }
  3778. function useFiber(fiber, pendingProps) {
  3779. fiber = createWorkInProgress(fiber, pendingProps);
  3780. fiber.index = 0;
  3781. fiber.sibling = null;
  3782. return fiber;
  3783. }
  3784. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  3785. newFiber.index = newIndex;
  3786. if (!shouldTrackSideEffects)
  3787. return (newFiber.flags |= 1048576), lastPlacedIndex;
  3788. newIndex = newFiber.alternate;
  3789. if (null !== newIndex)
  3790. return (
  3791. (newIndex = newIndex.index),
  3792. newIndex < lastPlacedIndex
  3793. ? ((newFiber.flags |= 67108866), lastPlacedIndex)
  3794. : newIndex
  3795. );
  3796. newFiber.flags |= 67108866;
  3797. return lastPlacedIndex;
  3798. }
  3799. function placeSingleChild(newFiber) {
  3800. shouldTrackSideEffects &&
  3801. null === newFiber.alternate &&
  3802. (newFiber.flags |= 67108866);
  3803. return newFiber;
  3804. }
  3805. function updateTextNode(returnFiber, current, textContent, lanes) {
  3806. if (null === current || 6 !== current.tag)
  3807. return (
  3808. (current = createFiberFromText(textContent, returnFiber.mode, lanes)),
  3809. (current.return = returnFiber),
  3810. current
  3811. );
  3812. current = useFiber(current, textContent);
  3813. current.return = returnFiber;
  3814. return current;
  3815. }
  3816. function updateElement(returnFiber, current, element, lanes) {
  3817. var elementType = element.type;
  3818. if (elementType === REACT_FRAGMENT_TYPE)
  3819. return updateFragment(
  3820. returnFiber,
  3821. current,
  3822. element.props.children,
  3823. lanes,
  3824. element.key
  3825. );
  3826. if (
  3827. null !== current &&
  3828. (current.elementType === elementType ||
  3829. ("object" === typeof elementType &&
  3830. null !== elementType &&
  3831. elementType.$$typeof === REACT_LAZY_TYPE &&
  3832. resolveLazy(elementType) === current.type))
  3833. )
  3834. return (
  3835. (current = useFiber(current, element.props)),
  3836. coerceRef(current, element),
  3837. (current.return = returnFiber),
  3838. current
  3839. );
  3840. current = createFiberFromTypeAndProps(
  3841. element.type,
  3842. element.key,
  3843. element.props,
  3844. null,
  3845. returnFiber.mode,
  3846. lanes
  3847. );
  3848. coerceRef(current, element);
  3849. current.return = returnFiber;
  3850. return current;
  3851. }
  3852. function updatePortal(returnFiber, current, portal, lanes) {
  3853. if (
  3854. null === current ||
  3855. 4 !== current.tag ||
  3856. current.stateNode.containerInfo !== portal.containerInfo ||
  3857. current.stateNode.implementation !== portal.implementation
  3858. )
  3859. return (
  3860. (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),
  3861. (current.return = returnFiber),
  3862. current
  3863. );
  3864. current = useFiber(current, portal.children || []);
  3865. current.return = returnFiber;
  3866. return current;
  3867. }
  3868. function updateFragment(returnFiber, current, fragment, lanes, key) {
  3869. if (null === current || 7 !== current.tag)
  3870. return (
  3871. (current = createFiberFromFragment(
  3872. fragment,
  3873. returnFiber.mode,
  3874. lanes,
  3875. key
  3876. )),
  3877. (current.return = returnFiber),
  3878. current
  3879. );
  3880. current = useFiber(current, fragment);
  3881. current.return = returnFiber;
  3882. return current;
  3883. }
  3884. function createChild(returnFiber, newChild, lanes) {
  3885. if (
  3886. ("string" === typeof newChild && "" !== newChild) ||
  3887. "number" === typeof newChild ||
  3888. "bigint" === typeof newChild
  3889. )
  3890. return (
  3891. (newChild = createFiberFromText(
  3892. "" + newChild,
  3893. returnFiber.mode,
  3894. lanes
  3895. )),
  3896. (newChild.return = returnFiber),
  3897. newChild
  3898. );
  3899. if ("object" === typeof newChild && null !== newChild) {
  3900. switch (newChild.$$typeof) {
  3901. case REACT_ELEMENT_TYPE:
  3902. return (
  3903. (lanes = createFiberFromTypeAndProps(
  3904. newChild.type,
  3905. newChild.key,
  3906. newChild.props,
  3907. null,
  3908. returnFiber.mode,
  3909. lanes
  3910. )),
  3911. coerceRef(lanes, newChild),
  3912. (lanes.return = returnFiber),
  3913. lanes
  3914. );
  3915. case REACT_PORTAL_TYPE:
  3916. return (
  3917. (newChild = createFiberFromPortal(
  3918. newChild,
  3919. returnFiber.mode,
  3920. lanes
  3921. )),
  3922. (newChild.return = returnFiber),
  3923. newChild
  3924. );
  3925. case REACT_LAZY_TYPE:
  3926. return (
  3927. (newChild = resolveLazy(newChild)),
  3928. createChild(returnFiber, newChild, lanes)
  3929. );
  3930. }
  3931. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  3932. return (
  3933. (newChild = createFiberFromFragment(
  3934. newChild,
  3935. returnFiber.mode,
  3936. lanes,
  3937. null
  3938. )),
  3939. (newChild.return = returnFiber),
  3940. newChild
  3941. );
  3942. if ("function" === typeof newChild.then)
  3943. return createChild(returnFiber, unwrapThenable(newChild), lanes);
  3944. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  3945. return createChild(
  3946. returnFiber,
  3947. readContextDuringReconciliation(returnFiber, newChild),
  3948. lanes
  3949. );
  3950. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  3951. }
  3952. return null;
  3953. }
  3954. function updateSlot(returnFiber, oldFiber, newChild, lanes) {
  3955. var key = null !== oldFiber ? oldFiber.key : null;
  3956. if (
  3957. ("string" === typeof newChild && "" !== newChild) ||
  3958. "number" === typeof newChild ||
  3959. "bigint" === typeof newChild
  3960. )
  3961. return null !== key
  3962. ? null
  3963. : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
  3964. if ("object" === typeof newChild && null !== newChild) {
  3965. switch (newChild.$$typeof) {
  3966. case REACT_ELEMENT_TYPE:
  3967. return newChild.key === key
  3968. ? updateElement(returnFiber, oldFiber, newChild, lanes)
  3969. : null;
  3970. case REACT_PORTAL_TYPE:
  3971. return newChild.key === key
  3972. ? updatePortal(returnFiber, oldFiber, newChild, lanes)
  3973. : null;
  3974. case REACT_LAZY_TYPE:
  3975. return (
  3976. (newChild = resolveLazy(newChild)),
  3977. updateSlot(returnFiber, oldFiber, newChild, lanes)
  3978. );
  3979. }
  3980. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  3981. return null !== key
  3982. ? null
  3983. : updateFragment(returnFiber, oldFiber, newChild, lanes, null);
  3984. if ("function" === typeof newChild.then)
  3985. return updateSlot(
  3986. returnFiber,
  3987. oldFiber,
  3988. unwrapThenable(newChild),
  3989. lanes
  3990. );
  3991. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  3992. return updateSlot(
  3993. returnFiber,
  3994. oldFiber,
  3995. readContextDuringReconciliation(returnFiber, newChild),
  3996. lanes
  3997. );
  3998. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  3999. }
  4000. return null;
  4001. }
  4002. function updateFromMap(
  4003. existingChildren,
  4004. returnFiber,
  4005. newIdx,
  4006. newChild,
  4007. lanes
  4008. ) {
  4009. if (
  4010. ("string" === typeof newChild && "" !== newChild) ||
  4011. "number" === typeof newChild ||
  4012. "bigint" === typeof newChild
  4013. )
  4014. return (
  4015. (existingChildren = existingChildren.get(newIdx) || null),
  4016. updateTextNode(returnFiber, existingChildren, "" + newChild, lanes)
  4017. );
  4018. if ("object" === typeof newChild && null !== newChild) {
  4019. switch (newChild.$$typeof) {
  4020. case REACT_ELEMENT_TYPE:
  4021. return (
  4022. (existingChildren =
  4023. existingChildren.get(
  4024. null === newChild.key ? newIdx : newChild.key
  4025. ) || null),
  4026. updateElement(returnFiber, existingChildren, newChild, lanes)
  4027. );
  4028. case REACT_PORTAL_TYPE:
  4029. return (
  4030. (existingChildren =
  4031. existingChildren.get(
  4032. null === newChild.key ? newIdx : newChild.key
  4033. ) || null),
  4034. updatePortal(returnFiber, existingChildren, newChild, lanes)
  4035. );
  4036. case REACT_LAZY_TYPE:
  4037. return (
  4038. (newChild = resolveLazy(newChild)),
  4039. updateFromMap(
  4040. existingChildren,
  4041. returnFiber,
  4042. newIdx,
  4043. newChild,
  4044. lanes
  4045. )
  4046. );
  4047. }
  4048. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  4049. return (
  4050. (existingChildren = existingChildren.get(newIdx) || null),
  4051. updateFragment(returnFiber, existingChildren, newChild, lanes, null)
  4052. );
  4053. if ("function" === typeof newChild.then)
  4054. return updateFromMap(
  4055. existingChildren,
  4056. returnFiber,
  4057. newIdx,
  4058. unwrapThenable(newChild),
  4059. lanes
  4060. );
  4061. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  4062. return updateFromMap(
  4063. existingChildren,
  4064. returnFiber,
  4065. newIdx,
  4066. readContextDuringReconciliation(returnFiber, newChild),
  4067. lanes
  4068. );
  4069. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  4070. }
  4071. return null;
  4072. }
  4073. function reconcileChildrenArray(
  4074. returnFiber,
  4075. currentFirstChild,
  4076. newChildren,
  4077. lanes
  4078. ) {
  4079. for (
  4080. var resultingFirstChild = null,
  4081. previousNewFiber = null,
  4082. oldFiber = currentFirstChild,
  4083. newIdx = (currentFirstChild = 0),
  4084. nextOldFiber = null;
  4085. null !== oldFiber && newIdx < newChildren.length;
  4086. newIdx++
  4087. ) {
  4088. oldFiber.index > newIdx
  4089. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  4090. : (nextOldFiber = oldFiber.sibling);
  4091. var newFiber = updateSlot(
  4092. returnFiber,
  4093. oldFiber,
  4094. newChildren[newIdx],
  4095. lanes
  4096. );
  4097. if (null === newFiber) {
  4098. null === oldFiber && (oldFiber = nextOldFiber);
  4099. break;
  4100. }
  4101. shouldTrackSideEffects &&
  4102. oldFiber &&
  4103. null === newFiber.alternate &&
  4104. deleteChild(returnFiber, oldFiber);
  4105. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  4106. null === previousNewFiber
  4107. ? (resultingFirstChild = newFiber)
  4108. : (previousNewFiber.sibling = newFiber);
  4109. previousNewFiber = newFiber;
  4110. oldFiber = nextOldFiber;
  4111. }
  4112. if (newIdx === newChildren.length)
  4113. return (
  4114. deleteRemainingChildren(returnFiber, oldFiber),
  4115. isHydrating && pushTreeFork(returnFiber, newIdx),
  4116. resultingFirstChild
  4117. );
  4118. if (null === oldFiber) {
  4119. for (; newIdx < newChildren.length; newIdx++)
  4120. (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),
  4121. null !== oldFiber &&
  4122. ((currentFirstChild = placeChild(
  4123. oldFiber,
  4124. currentFirstChild,
  4125. newIdx
  4126. )),
  4127. null === previousNewFiber
  4128. ? (resultingFirstChild = oldFiber)
  4129. : (previousNewFiber.sibling = oldFiber),
  4130. (previousNewFiber = oldFiber));
  4131. isHydrating && pushTreeFork(returnFiber, newIdx);
  4132. return resultingFirstChild;
  4133. }
  4134. for (
  4135. oldFiber = mapRemainingChildren(oldFiber);
  4136. newIdx < newChildren.length;
  4137. newIdx++
  4138. )
  4139. (nextOldFiber = updateFromMap(
  4140. oldFiber,
  4141. returnFiber,
  4142. newIdx,
  4143. newChildren[newIdx],
  4144. lanes
  4145. )),
  4146. null !== nextOldFiber &&
  4147. (shouldTrackSideEffects &&
  4148. null !== nextOldFiber.alternate &&
  4149. oldFiber.delete(
  4150. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  4151. ),
  4152. (currentFirstChild = placeChild(
  4153. nextOldFiber,
  4154. currentFirstChild,
  4155. newIdx
  4156. )),
  4157. null === previousNewFiber
  4158. ? (resultingFirstChild = nextOldFiber)
  4159. : (previousNewFiber.sibling = nextOldFiber),
  4160. (previousNewFiber = nextOldFiber));
  4161. shouldTrackSideEffects &&
  4162. oldFiber.forEach(function (child) {
  4163. return deleteChild(returnFiber, child);
  4164. });
  4165. isHydrating && pushTreeFork(returnFiber, newIdx);
  4166. return resultingFirstChild;
  4167. }
  4168. function reconcileChildrenIterator(
  4169. returnFiber,
  4170. currentFirstChild,
  4171. newChildren,
  4172. lanes
  4173. ) {
  4174. if (null == newChildren) throw Error(formatProdErrorMessage(151));
  4175. for (
  4176. var resultingFirstChild = null,
  4177. previousNewFiber = null,
  4178. oldFiber = currentFirstChild,
  4179. newIdx = (currentFirstChild = 0),
  4180. nextOldFiber = null,
  4181. step = newChildren.next();
  4182. null !== oldFiber && !step.done;
  4183. newIdx++, step = newChildren.next()
  4184. ) {
  4185. oldFiber.index > newIdx
  4186. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  4187. : (nextOldFiber = oldFiber.sibling);
  4188. var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
  4189. if (null === newFiber) {
  4190. null === oldFiber && (oldFiber = nextOldFiber);
  4191. break;
  4192. }
  4193. shouldTrackSideEffects &&
  4194. oldFiber &&
  4195. null === newFiber.alternate &&
  4196. deleteChild(returnFiber, oldFiber);
  4197. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  4198. null === previousNewFiber
  4199. ? (resultingFirstChild = newFiber)
  4200. : (previousNewFiber.sibling = newFiber);
  4201. previousNewFiber = newFiber;
  4202. oldFiber = nextOldFiber;
  4203. }
  4204. if (step.done)
  4205. return (
  4206. deleteRemainingChildren(returnFiber, oldFiber),
  4207. isHydrating && pushTreeFork(returnFiber, newIdx),
  4208. resultingFirstChild
  4209. );
  4210. if (null === oldFiber) {
  4211. for (; !step.done; newIdx++, step = newChildren.next())
  4212. (step = createChild(returnFiber, step.value, lanes)),
  4213. null !== step &&
  4214. ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  4215. null === previousNewFiber
  4216. ? (resultingFirstChild = step)
  4217. : (previousNewFiber.sibling = step),
  4218. (previousNewFiber = step));
  4219. isHydrating && pushTreeFork(returnFiber, newIdx);
  4220. return resultingFirstChild;
  4221. }
  4222. for (
  4223. oldFiber = mapRemainingChildren(oldFiber);
  4224. !step.done;
  4225. newIdx++, step = newChildren.next()
  4226. )
  4227. (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),
  4228. null !== step &&
  4229. (shouldTrackSideEffects &&
  4230. null !== step.alternate &&
  4231. oldFiber.delete(null === step.key ? newIdx : step.key),
  4232. (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  4233. null === previousNewFiber
  4234. ? (resultingFirstChild = step)
  4235. : (previousNewFiber.sibling = step),
  4236. (previousNewFiber = step));
  4237. shouldTrackSideEffects &&
  4238. oldFiber.forEach(function (child) {
  4239. return deleteChild(returnFiber, child);
  4240. });
  4241. isHydrating && pushTreeFork(returnFiber, newIdx);
  4242. return resultingFirstChild;
  4243. }
  4244. function reconcileChildFibersImpl(
  4245. returnFiber,
  4246. currentFirstChild,
  4247. newChild,
  4248. lanes
  4249. ) {
  4250. "object" === typeof newChild &&
  4251. null !== newChild &&
  4252. newChild.type === REACT_FRAGMENT_TYPE &&
  4253. null === newChild.key &&
  4254. (newChild = newChild.props.children);
  4255. if ("object" === typeof newChild && null !== newChild) {
  4256. switch (newChild.$$typeof) {
  4257. case REACT_ELEMENT_TYPE:
  4258. a: {
  4259. for (var key = newChild.key; null !== currentFirstChild; ) {
  4260. if (currentFirstChild.key === key) {
  4261. key = newChild.type;
  4262. if (key === REACT_FRAGMENT_TYPE) {
  4263. if (7 === currentFirstChild.tag) {
  4264. deleteRemainingChildren(
  4265. returnFiber,
  4266. currentFirstChild.sibling
  4267. );
  4268. lanes = useFiber(
  4269. currentFirstChild,
  4270. newChild.props.children
  4271. );
  4272. lanes.return = returnFiber;
  4273. returnFiber = lanes;
  4274. break a;
  4275. }
  4276. } else if (
  4277. currentFirstChild.elementType === key ||
  4278. ("object" === typeof key &&
  4279. null !== key &&
  4280. key.$$typeof === REACT_LAZY_TYPE &&
  4281. resolveLazy(key) === currentFirstChild.type)
  4282. ) {
  4283. deleteRemainingChildren(
  4284. returnFiber,
  4285. currentFirstChild.sibling
  4286. );
  4287. lanes = useFiber(currentFirstChild, newChild.props);
  4288. coerceRef(lanes, newChild);
  4289. lanes.return = returnFiber;
  4290. returnFiber = lanes;
  4291. break a;
  4292. }
  4293. deleteRemainingChildren(returnFiber, currentFirstChild);
  4294. break;
  4295. } else deleteChild(returnFiber, currentFirstChild);
  4296. currentFirstChild = currentFirstChild.sibling;
  4297. }
  4298. newChild.type === REACT_FRAGMENT_TYPE
  4299. ? ((lanes = createFiberFromFragment(
  4300. newChild.props.children,
  4301. returnFiber.mode,
  4302. lanes,
  4303. newChild.key
  4304. )),
  4305. (lanes.return = returnFiber),
  4306. (returnFiber = lanes))
  4307. : ((lanes = createFiberFromTypeAndProps(
  4308. newChild.type,
  4309. newChild.key,
  4310. newChild.props,
  4311. null,
  4312. returnFiber.mode,
  4313. lanes
  4314. )),
  4315. coerceRef(lanes, newChild),
  4316. (lanes.return = returnFiber),
  4317. (returnFiber = lanes));
  4318. }
  4319. return placeSingleChild(returnFiber);
  4320. case REACT_PORTAL_TYPE:
  4321. a: {
  4322. for (key = newChild.key; null !== currentFirstChild; ) {
  4323. if (currentFirstChild.key === key)
  4324. if (
  4325. 4 === currentFirstChild.tag &&
  4326. currentFirstChild.stateNode.containerInfo ===
  4327. newChild.containerInfo &&
  4328. currentFirstChild.stateNode.implementation ===
  4329. newChild.implementation
  4330. ) {
  4331. deleteRemainingChildren(
  4332. returnFiber,
  4333. currentFirstChild.sibling
  4334. );
  4335. lanes = useFiber(currentFirstChild, newChild.children || []);
  4336. lanes.return = returnFiber;
  4337. returnFiber = lanes;
  4338. break a;
  4339. } else {
  4340. deleteRemainingChildren(returnFiber, currentFirstChild);
  4341. break;
  4342. }
  4343. else deleteChild(returnFiber, currentFirstChild);
  4344. currentFirstChild = currentFirstChild.sibling;
  4345. }
  4346. lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
  4347. lanes.return = returnFiber;
  4348. returnFiber = lanes;
  4349. }
  4350. return placeSingleChild(returnFiber);
  4351. case REACT_LAZY_TYPE:
  4352. return (
  4353. (newChild = resolveLazy(newChild)),
  4354. reconcileChildFibersImpl(
  4355. returnFiber,
  4356. currentFirstChild,
  4357. newChild,
  4358. lanes
  4359. )
  4360. );
  4361. }
  4362. if (isArrayImpl(newChild))
  4363. return reconcileChildrenArray(
  4364. returnFiber,
  4365. currentFirstChild,
  4366. newChild,
  4367. lanes
  4368. );
  4369. if (getIteratorFn(newChild)) {
  4370. key = getIteratorFn(newChild);
  4371. if ("function" !== typeof key) throw Error(formatProdErrorMessage(150));
  4372. newChild = key.call(newChild);
  4373. return reconcileChildrenIterator(
  4374. returnFiber,
  4375. currentFirstChild,
  4376. newChild,
  4377. lanes
  4378. );
  4379. }
  4380. if ("function" === typeof newChild.then)
  4381. return reconcileChildFibersImpl(
  4382. returnFiber,
  4383. currentFirstChild,
  4384. unwrapThenable(newChild),
  4385. lanes
  4386. );
  4387. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  4388. return reconcileChildFibersImpl(
  4389. returnFiber,
  4390. currentFirstChild,
  4391. readContextDuringReconciliation(returnFiber, newChild),
  4392. lanes
  4393. );
  4394. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  4395. }
  4396. return ("string" === typeof newChild && "" !== newChild) ||
  4397. "number" === typeof newChild ||
  4398. "bigint" === typeof newChild
  4399. ? ((newChild = "" + newChild),
  4400. null !== currentFirstChild && 6 === currentFirstChild.tag
  4401. ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
  4402. (lanes = useFiber(currentFirstChild, newChild)),
  4403. (lanes.return = returnFiber),
  4404. (returnFiber = lanes))
  4405. : (deleteRemainingChildren(returnFiber, currentFirstChild),
  4406. (lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
  4407. (lanes.return = returnFiber),
  4408. (returnFiber = lanes)),
  4409. placeSingleChild(returnFiber))
  4410. : deleteRemainingChildren(returnFiber, currentFirstChild);
  4411. }
  4412. return function (returnFiber, currentFirstChild, newChild, lanes) {
  4413. try {
  4414. thenableIndexCounter$1 = 0;
  4415. var firstChildFiber = reconcileChildFibersImpl(
  4416. returnFiber,
  4417. currentFirstChild,
  4418. newChild,
  4419. lanes
  4420. );
  4421. thenableState$1 = null;
  4422. return firstChildFiber;
  4423. } catch (x) {
  4424. if (x === SuspenseException || x === SuspenseActionException) throw x;
  4425. var fiber = createFiberImplClass(29, x, null, returnFiber.mode);
  4426. fiber.lanes = lanes;
  4427. fiber.return = returnFiber;
  4428. return fiber;
  4429. } finally {
  4430. }
  4431. };
  4432. }
  4433. var reconcileChildFibers = createChildReconciler(!0),
  4434. mountChildFibers = createChildReconciler(!1),
  4435. hasForceUpdate = !1;
  4436. function initializeUpdateQueue(fiber) {
  4437. fiber.updateQueue = {
  4438. baseState: fiber.memoizedState,
  4439. firstBaseUpdate: null,
  4440. lastBaseUpdate: null,
  4441. shared: { pending: null, lanes: 0, hiddenCallbacks: null },
  4442. callbacks: null
  4443. };
  4444. }
  4445. function cloneUpdateQueue(current, workInProgress) {
  4446. current = current.updateQueue;
  4447. workInProgress.updateQueue === current &&
  4448. (workInProgress.updateQueue = {
  4449. baseState: current.baseState,
  4450. firstBaseUpdate: current.firstBaseUpdate,
  4451. lastBaseUpdate: current.lastBaseUpdate,
  4452. shared: current.shared,
  4453. callbacks: null
  4454. });
  4455. }
  4456. function createUpdate(lane) {
  4457. return { lane: lane, tag: 0, payload: null, callback: null, next: null };
  4458. }
  4459. function enqueueUpdate(fiber, update, lane) {
  4460. var updateQueue = fiber.updateQueue;
  4461. if (null === updateQueue) return null;
  4462. updateQueue = updateQueue.shared;
  4463. if (0 !== (executionContext & 2)) {
  4464. var pending = updateQueue.pending;
  4465. null === pending
  4466. ? (update.next = update)
  4467. : ((update.next = pending.next), (pending.next = update));
  4468. updateQueue.pending = update;
  4469. update = getRootForUpdatedFiber(fiber);
  4470. markUpdateLaneFromFiberToRoot(fiber, null, lane);
  4471. return update;
  4472. }
  4473. enqueueUpdate$1(fiber, updateQueue, update, lane);
  4474. return getRootForUpdatedFiber(fiber);
  4475. }
  4476. function entangleTransitions(root, fiber, lane) {
  4477. fiber = fiber.updateQueue;
  4478. if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {
  4479. var queueLanes = fiber.lanes;
  4480. queueLanes &= root.pendingLanes;
  4481. lane |= queueLanes;
  4482. fiber.lanes = lane;
  4483. markRootEntangled(root, lane);
  4484. }
  4485. }
  4486. function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
  4487. var queue = workInProgress.updateQueue,
  4488. current = workInProgress.alternate;
  4489. if (
  4490. null !== current &&
  4491. ((current = current.updateQueue), queue === current)
  4492. ) {
  4493. var newFirst = null,
  4494. newLast = null;
  4495. queue = queue.firstBaseUpdate;
  4496. if (null !== queue) {
  4497. do {
  4498. var clone = {
  4499. lane: queue.lane,
  4500. tag: queue.tag,
  4501. payload: queue.payload,
  4502. callback: null,
  4503. next: null
  4504. };
  4505. null === newLast
  4506. ? (newFirst = newLast = clone)
  4507. : (newLast = newLast.next = clone);
  4508. queue = queue.next;
  4509. } while (null !== queue);
  4510. null === newLast
  4511. ? (newFirst = newLast = capturedUpdate)
  4512. : (newLast = newLast.next = capturedUpdate);
  4513. } else newFirst = newLast = capturedUpdate;
  4514. queue = {
  4515. baseState: current.baseState,
  4516. firstBaseUpdate: newFirst,
  4517. lastBaseUpdate: newLast,
  4518. shared: current.shared,
  4519. callbacks: current.callbacks
  4520. };
  4521. workInProgress.updateQueue = queue;
  4522. return;
  4523. }
  4524. workInProgress = queue.lastBaseUpdate;
  4525. null === workInProgress
  4526. ? (queue.firstBaseUpdate = capturedUpdate)
  4527. : (workInProgress.next = capturedUpdate);
  4528. queue.lastBaseUpdate = capturedUpdate;
  4529. }
  4530. var didReadFromEntangledAsyncAction = !1;
  4531. function suspendIfUpdateReadFromEntangledAsyncAction() {
  4532. if (didReadFromEntangledAsyncAction) {
  4533. var entangledActionThenable = currentEntangledActionThenable;
  4534. if (null !== entangledActionThenable) throw entangledActionThenable;
  4535. }
  4536. }
  4537. function processUpdateQueue(
  4538. workInProgress$jscomp$0,
  4539. props,
  4540. instance$jscomp$0,
  4541. renderLanes
  4542. ) {
  4543. didReadFromEntangledAsyncAction = !1;
  4544. var queue = workInProgress$jscomp$0.updateQueue;
  4545. hasForceUpdate = !1;
  4546. var firstBaseUpdate = queue.firstBaseUpdate,
  4547. lastBaseUpdate = queue.lastBaseUpdate,
  4548. pendingQueue = queue.shared.pending;
  4549. if (null !== pendingQueue) {
  4550. queue.shared.pending = null;
  4551. var lastPendingUpdate = pendingQueue,
  4552. firstPendingUpdate = lastPendingUpdate.next;
  4553. lastPendingUpdate.next = null;
  4554. null === lastBaseUpdate
  4555. ? (firstBaseUpdate = firstPendingUpdate)
  4556. : (lastBaseUpdate.next = firstPendingUpdate);
  4557. lastBaseUpdate = lastPendingUpdate;
  4558. var current = workInProgress$jscomp$0.alternate;
  4559. null !== current &&
  4560. ((current = current.updateQueue),
  4561. (pendingQueue = current.lastBaseUpdate),
  4562. pendingQueue !== lastBaseUpdate &&
  4563. (null === pendingQueue
  4564. ? (current.firstBaseUpdate = firstPendingUpdate)
  4565. : (pendingQueue.next = firstPendingUpdate),
  4566. (current.lastBaseUpdate = lastPendingUpdate)));
  4567. }
  4568. if (null !== firstBaseUpdate) {
  4569. var newState = queue.baseState;
  4570. lastBaseUpdate = 0;
  4571. current = firstPendingUpdate = lastPendingUpdate = null;
  4572. pendingQueue = firstBaseUpdate;
  4573. do {
  4574. var updateLane = pendingQueue.lane & -536870913,
  4575. isHiddenUpdate = updateLane !== pendingQueue.lane;
  4576. if (
  4577. isHiddenUpdate
  4578. ? (workInProgressRootRenderLanes & updateLane) === updateLane
  4579. : (renderLanes & updateLane) === updateLane
  4580. ) {
  4581. 0 !== updateLane &&
  4582. updateLane === currentEntangledLane &&
  4583. (didReadFromEntangledAsyncAction = !0);
  4584. null !== current &&
  4585. (current = current.next =
  4586. {
  4587. lane: 0,
  4588. tag: pendingQueue.tag,
  4589. payload: pendingQueue.payload,
  4590. callback: null,
  4591. next: null
  4592. });
  4593. a: {
  4594. var workInProgress = workInProgress$jscomp$0,
  4595. update = pendingQueue;
  4596. updateLane = props;
  4597. var instance = instance$jscomp$0;
  4598. switch (update.tag) {
  4599. case 1:
  4600. workInProgress = update.payload;
  4601. if ("function" === typeof workInProgress) {
  4602. newState = workInProgress.call(instance, newState, updateLane);
  4603. break a;
  4604. }
  4605. newState = workInProgress;
  4606. break a;
  4607. case 3:
  4608. workInProgress.flags = (workInProgress.flags & -65537) | 128;
  4609. case 0:
  4610. workInProgress = update.payload;
  4611. updateLane =
  4612. "function" === typeof workInProgress
  4613. ? workInProgress.call(instance, newState, updateLane)
  4614. : workInProgress;
  4615. if (null === updateLane || void 0 === updateLane) break a;
  4616. newState = assign({}, newState, updateLane);
  4617. break a;
  4618. case 2:
  4619. hasForceUpdate = !0;
  4620. }
  4621. }
  4622. updateLane = pendingQueue.callback;
  4623. null !== updateLane &&
  4624. ((workInProgress$jscomp$0.flags |= 64),
  4625. isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),
  4626. (isHiddenUpdate = queue.callbacks),
  4627. null === isHiddenUpdate
  4628. ? (queue.callbacks = [updateLane])
  4629. : isHiddenUpdate.push(updateLane));
  4630. } else
  4631. (isHiddenUpdate = {
  4632. lane: updateLane,
  4633. tag: pendingQueue.tag,
  4634. payload: pendingQueue.payload,
  4635. callback: pendingQueue.callback,
  4636. next: null
  4637. }),
  4638. null === current
  4639. ? ((firstPendingUpdate = current = isHiddenUpdate),
  4640. (lastPendingUpdate = newState))
  4641. : (current = current.next = isHiddenUpdate),
  4642. (lastBaseUpdate |= updateLane);
  4643. pendingQueue = pendingQueue.next;
  4644. if (null === pendingQueue)
  4645. if (((pendingQueue = queue.shared.pending), null === pendingQueue))
  4646. break;
  4647. else
  4648. (isHiddenUpdate = pendingQueue),
  4649. (pendingQueue = isHiddenUpdate.next),
  4650. (isHiddenUpdate.next = null),
  4651. (queue.lastBaseUpdate = isHiddenUpdate),
  4652. (queue.shared.pending = null);
  4653. } while (1);
  4654. null === current && (lastPendingUpdate = newState);
  4655. queue.baseState = lastPendingUpdate;
  4656. queue.firstBaseUpdate = firstPendingUpdate;
  4657. queue.lastBaseUpdate = current;
  4658. null === firstBaseUpdate && (queue.shared.lanes = 0);
  4659. workInProgressRootSkippedLanes |= lastBaseUpdate;
  4660. workInProgress$jscomp$0.lanes = lastBaseUpdate;
  4661. workInProgress$jscomp$0.memoizedState = newState;
  4662. }
  4663. }
  4664. function callCallback(callback, context) {
  4665. if ("function" !== typeof callback)
  4666. throw Error(formatProdErrorMessage(191, callback));
  4667. callback.call(context);
  4668. }
  4669. function commitCallbacks(updateQueue, context) {
  4670. var callbacks = updateQueue.callbacks;
  4671. if (null !== callbacks)
  4672. for (
  4673. updateQueue.callbacks = null, updateQueue = 0;
  4674. updateQueue < callbacks.length;
  4675. updateQueue++
  4676. )
  4677. callCallback(callbacks[updateQueue], context);
  4678. }
  4679. var currentTreeHiddenStackCursor = createCursor(null),
  4680. prevEntangledRenderLanesCursor = createCursor(0);
  4681. function pushHiddenContext(fiber, context) {
  4682. fiber = entangledRenderLanes;
  4683. push(prevEntangledRenderLanesCursor, fiber);
  4684. push(currentTreeHiddenStackCursor, context);
  4685. entangledRenderLanes = fiber | context.baseLanes;
  4686. }
  4687. function reuseHiddenContextOnStack() {
  4688. push(prevEntangledRenderLanesCursor, entangledRenderLanes);
  4689. push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);
  4690. }
  4691. function popHiddenContext() {
  4692. entangledRenderLanes = prevEntangledRenderLanesCursor.current;
  4693. pop(currentTreeHiddenStackCursor);
  4694. pop(prevEntangledRenderLanesCursor);
  4695. }
  4696. var suspenseHandlerStackCursor = createCursor(null),
  4697. shellBoundary = null;
  4698. function pushPrimaryTreeSuspenseHandler(handler) {
  4699. var current = handler.alternate;
  4700. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  4701. push(suspenseHandlerStackCursor, handler);
  4702. null === shellBoundary &&
  4703. (null === current || null !== currentTreeHiddenStackCursor.current
  4704. ? (shellBoundary = handler)
  4705. : null !== current.memoizedState && (shellBoundary = handler));
  4706. }
  4707. function pushDehydratedActivitySuspenseHandler(fiber) {
  4708. push(suspenseStackCursor, suspenseStackCursor.current);
  4709. push(suspenseHandlerStackCursor, fiber);
  4710. null === shellBoundary && (shellBoundary = fiber);
  4711. }
  4712. function pushOffscreenSuspenseHandler(fiber) {
  4713. 22 === fiber.tag
  4714. ? (push(suspenseStackCursor, suspenseStackCursor.current),
  4715. push(suspenseHandlerStackCursor, fiber),
  4716. null === shellBoundary && (shellBoundary = fiber))
  4717. : reuseSuspenseHandlerOnStack(fiber);
  4718. }
  4719. function reuseSuspenseHandlerOnStack() {
  4720. push(suspenseStackCursor, suspenseStackCursor.current);
  4721. push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
  4722. }
  4723. function popSuspenseHandler(fiber) {
  4724. pop(suspenseHandlerStackCursor);
  4725. shellBoundary === fiber && (shellBoundary = null);
  4726. pop(suspenseStackCursor);
  4727. }
  4728. var suspenseStackCursor = createCursor(0);
  4729. function findFirstSuspended(row) {
  4730. for (var node = row; null !== node; ) {
  4731. if (13 === node.tag) {
  4732. var state = node.memoizedState;
  4733. if (
  4734. null !== state &&
  4735. ((state = state.dehydrated),
  4736. null === state ||
  4737. isSuspenseInstancePending(state) ||
  4738. isSuspenseInstanceFallback(state))
  4739. )
  4740. return node;
  4741. } else if (
  4742. 19 === node.tag &&
  4743. ("forwards" === node.memoizedProps.revealOrder ||
  4744. "backwards" === node.memoizedProps.revealOrder ||
  4745. "unstable_legacy-backwards" === node.memoizedProps.revealOrder ||
  4746. "together" === node.memoizedProps.revealOrder)
  4747. ) {
  4748. if (0 !== (node.flags & 128)) return node;
  4749. } else if (null !== node.child) {
  4750. node.child.return = node;
  4751. node = node.child;
  4752. continue;
  4753. }
  4754. if (node === row) break;
  4755. for (; null === node.sibling; ) {
  4756. if (null === node.return || node.return === row) return null;
  4757. node = node.return;
  4758. }
  4759. node.sibling.return = node.return;
  4760. node = node.sibling;
  4761. }
  4762. return null;
  4763. }
  4764. var renderLanes = 0,
  4765. currentlyRenderingFiber = null,
  4766. currentHook = null,
  4767. workInProgressHook = null,
  4768. didScheduleRenderPhaseUpdate = !1,
  4769. didScheduleRenderPhaseUpdateDuringThisPass = !1,
  4770. shouldDoubleInvokeUserFnsInHooksDEV = !1,
  4771. localIdCounter = 0,
  4772. thenableIndexCounter = 0,
  4773. thenableState = null,
  4774. globalClientIdCounter = 0;
  4775. function throwInvalidHookError() {
  4776. throw Error(formatProdErrorMessage(321));
  4777. }
  4778. function areHookInputsEqual(nextDeps, prevDeps) {
  4779. if (null === prevDeps) return !1;
  4780. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
  4781. if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
  4782. return !0;
  4783. }
  4784. function renderWithHooks(
  4785. current,
  4786. workInProgress,
  4787. Component,
  4788. props,
  4789. secondArg,
  4790. nextRenderLanes
  4791. ) {
  4792. renderLanes = nextRenderLanes;
  4793. currentlyRenderingFiber = workInProgress;
  4794. workInProgress.memoizedState = null;
  4795. workInProgress.updateQueue = null;
  4796. workInProgress.lanes = 0;
  4797. ReactSharedInternals.H =
  4798. null === current || null === current.memoizedState
  4799. ? HooksDispatcherOnMount
  4800. : HooksDispatcherOnUpdate;
  4801. shouldDoubleInvokeUserFnsInHooksDEV = !1;
  4802. nextRenderLanes = Component(props, secondArg);
  4803. shouldDoubleInvokeUserFnsInHooksDEV = !1;
  4804. didScheduleRenderPhaseUpdateDuringThisPass &&
  4805. (nextRenderLanes = renderWithHooksAgain(
  4806. workInProgress,
  4807. Component,
  4808. props,
  4809. secondArg
  4810. ));
  4811. finishRenderingHooks(current);
  4812. return nextRenderLanes;
  4813. }
  4814. function finishRenderingHooks(current) {
  4815. ReactSharedInternals.H = ContextOnlyDispatcher;
  4816. var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
  4817. renderLanes = 0;
  4818. workInProgressHook = currentHook = currentlyRenderingFiber = null;
  4819. didScheduleRenderPhaseUpdate = !1;
  4820. thenableIndexCounter = 0;
  4821. thenableState = null;
  4822. if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));
  4823. null === current ||
  4824. didReceiveUpdate ||
  4825. ((current = current.dependencies),
  4826. null !== current &&
  4827. checkIfContextChanged(current) &&
  4828. (didReceiveUpdate = !0));
  4829. }
  4830. function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
  4831. currentlyRenderingFiber = workInProgress;
  4832. var numberOfReRenders = 0;
  4833. do {
  4834. didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
  4835. thenableIndexCounter = 0;
  4836. didScheduleRenderPhaseUpdateDuringThisPass = !1;
  4837. if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));
  4838. numberOfReRenders += 1;
  4839. workInProgressHook = currentHook = null;
  4840. if (null != workInProgress.updateQueue) {
  4841. var children = workInProgress.updateQueue;
  4842. children.lastEffect = null;
  4843. children.events = null;
  4844. children.stores = null;
  4845. null != children.memoCache && (children.memoCache.index = 0);
  4846. }
  4847. ReactSharedInternals.H = HooksDispatcherOnRerender;
  4848. children = Component(props, secondArg);
  4849. } while (didScheduleRenderPhaseUpdateDuringThisPass);
  4850. return children;
  4851. }
  4852. function TransitionAwareHostComponent() {
  4853. var dispatcher = ReactSharedInternals.H,
  4854. maybeThenable = dispatcher.useState()[0];
  4855. maybeThenable =
  4856. "function" === typeof maybeThenable.then
  4857. ? useThenable(maybeThenable)
  4858. : maybeThenable;
  4859. dispatcher = dispatcher.useState()[0];
  4860. (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
  4861. (currentlyRenderingFiber.flags |= 1024);
  4862. return maybeThenable;
  4863. }
  4864. function checkDidRenderIdHook() {
  4865. var didRenderIdHook = 0 !== localIdCounter;
  4866. localIdCounter = 0;
  4867. return didRenderIdHook;
  4868. }
  4869. function bailoutHooks(current, workInProgress, lanes) {
  4870. workInProgress.updateQueue = current.updateQueue;
  4871. workInProgress.flags &= -2053;
  4872. current.lanes &= ~lanes;
  4873. }
  4874. function resetHooksOnUnwind(workInProgress) {
  4875. if (didScheduleRenderPhaseUpdate) {
  4876. for (
  4877. workInProgress = workInProgress.memoizedState;
  4878. null !== workInProgress;
  4879. ) {
  4880. var queue = workInProgress.queue;
  4881. null !== queue && (queue.pending = null);
  4882. workInProgress = workInProgress.next;
  4883. }
  4884. didScheduleRenderPhaseUpdate = !1;
  4885. }
  4886. renderLanes = 0;
  4887. workInProgressHook = currentHook = currentlyRenderingFiber = null;
  4888. didScheduleRenderPhaseUpdateDuringThisPass = !1;
  4889. thenableIndexCounter = localIdCounter = 0;
  4890. thenableState = null;
  4891. }
  4892. function mountWorkInProgressHook() {
  4893. var hook = {
  4894. memoizedState: null,
  4895. baseState: null,
  4896. baseQueue: null,
  4897. queue: null,
  4898. next: null
  4899. };
  4900. null === workInProgressHook
  4901. ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)
  4902. : (workInProgressHook = workInProgressHook.next = hook);
  4903. return workInProgressHook;
  4904. }
  4905. function updateWorkInProgressHook() {
  4906. if (null === currentHook) {
  4907. var nextCurrentHook = currentlyRenderingFiber.alternate;
  4908. nextCurrentHook =
  4909. null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
  4910. } else nextCurrentHook = currentHook.next;
  4911. var nextWorkInProgressHook =
  4912. null === workInProgressHook
  4913. ? currentlyRenderingFiber.memoizedState
  4914. : workInProgressHook.next;
  4915. if (null !== nextWorkInProgressHook)
  4916. (workInProgressHook = nextWorkInProgressHook),
  4917. (currentHook = nextCurrentHook);
  4918. else {
  4919. if (null === nextCurrentHook) {
  4920. if (null === currentlyRenderingFiber.alternate)
  4921. throw Error(formatProdErrorMessage(467));
  4922. throw Error(formatProdErrorMessage(310));
  4923. }
  4924. currentHook = nextCurrentHook;
  4925. nextCurrentHook = {
  4926. memoizedState: currentHook.memoizedState,
  4927. baseState: currentHook.baseState,
  4928. baseQueue: currentHook.baseQueue,
  4929. queue: currentHook.queue,
  4930. next: null
  4931. };
  4932. null === workInProgressHook
  4933. ? (currentlyRenderingFiber.memoizedState = workInProgressHook =
  4934. nextCurrentHook)
  4935. : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
  4936. }
  4937. return workInProgressHook;
  4938. }
  4939. function createFunctionComponentUpdateQueue() {
  4940. return { lastEffect: null, events: null, stores: null, memoCache: null };
  4941. }
  4942. function useThenable(thenable) {
  4943. var index = thenableIndexCounter;
  4944. thenableIndexCounter += 1;
  4945. null === thenableState && (thenableState = []);
  4946. thenable = trackUsedThenable(thenableState, thenable, index);
  4947. index = currentlyRenderingFiber;
  4948. null ===
  4949. (null === workInProgressHook
  4950. ? index.memoizedState
  4951. : workInProgressHook.next) &&
  4952. ((index = index.alternate),
  4953. (ReactSharedInternals.H =
  4954. null === index || null === index.memoizedState
  4955. ? HooksDispatcherOnMount
  4956. : HooksDispatcherOnUpdate));
  4957. return thenable;
  4958. }
  4959. function use(usable) {
  4960. if (null !== usable && "object" === typeof usable) {
  4961. if ("function" === typeof usable.then) return useThenable(usable);
  4962. if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
  4963. }
  4964. throw Error(formatProdErrorMessage(438, String(usable)));
  4965. }
  4966. function useMemoCache(size) {
  4967. var memoCache = null,
  4968. updateQueue = currentlyRenderingFiber.updateQueue;
  4969. null !== updateQueue && (memoCache = updateQueue.memoCache);
  4970. if (null == memoCache) {
  4971. var current = currentlyRenderingFiber.alternate;
  4972. null !== current &&
  4973. ((current = current.updateQueue),
  4974. null !== current &&
  4975. ((current = current.memoCache),
  4976. null != current &&
  4977. (memoCache = {
  4978. data: current.data.map(function (array) {
  4979. return array.slice();
  4980. }),
  4981. index: 0
  4982. })));
  4983. }
  4984. null == memoCache && (memoCache = { data: [], index: 0 });
  4985. null === updateQueue &&
  4986. ((updateQueue = createFunctionComponentUpdateQueue()),
  4987. (currentlyRenderingFiber.updateQueue = updateQueue));
  4988. updateQueue.memoCache = memoCache;
  4989. updateQueue = memoCache.data[memoCache.index];
  4990. if (void 0 === updateQueue)
  4991. for (
  4992. updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0;
  4993. current < size;
  4994. current++
  4995. )
  4996. updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;
  4997. memoCache.index++;
  4998. return updateQueue;
  4999. }
  5000. function basicStateReducer(state, action) {
  5001. return "function" === typeof action ? action(state) : action;
  5002. }
  5003. function updateReducer(reducer) {
  5004. var hook = updateWorkInProgressHook();
  5005. return updateReducerImpl(hook, currentHook, reducer);
  5006. }
  5007. function updateReducerImpl(hook, current, reducer) {
  5008. var queue = hook.queue;
  5009. if (null === queue) throw Error(formatProdErrorMessage(311));
  5010. queue.lastRenderedReducer = reducer;
  5011. var baseQueue = hook.baseQueue,
  5012. pendingQueue = queue.pending;
  5013. if (null !== pendingQueue) {
  5014. if (null !== baseQueue) {
  5015. var baseFirst = baseQueue.next;
  5016. baseQueue.next = pendingQueue.next;
  5017. pendingQueue.next = baseFirst;
  5018. }
  5019. current.baseQueue = baseQueue = pendingQueue;
  5020. queue.pending = null;
  5021. }
  5022. pendingQueue = hook.baseState;
  5023. if (null === baseQueue) hook.memoizedState = pendingQueue;
  5024. else {
  5025. current = baseQueue.next;
  5026. var newBaseQueueFirst = (baseFirst = null),
  5027. newBaseQueueLast = null,
  5028. update = current,
  5029. didReadFromEntangledAsyncAction$69 = !1;
  5030. do {
  5031. var updateLane = update.lane & -536870913;
  5032. if (
  5033. updateLane !== update.lane
  5034. ? (workInProgressRootRenderLanes & updateLane) === updateLane
  5035. : (renderLanes & updateLane) === updateLane
  5036. ) {
  5037. var revertLane = update.revertLane;
  5038. if (0 === revertLane)
  5039. null !== newBaseQueueLast &&
  5040. (newBaseQueueLast = newBaseQueueLast.next =
  5041. {
  5042. lane: 0,
  5043. revertLane: 0,
  5044. gesture: null,
  5045. action: update.action,
  5046. hasEagerState: update.hasEagerState,
  5047. eagerState: update.eagerState,
  5048. next: null
  5049. }),
  5050. updateLane === currentEntangledLane &&
  5051. (didReadFromEntangledAsyncAction$69 = !0);
  5052. else if ((renderLanes & revertLane) === revertLane) {
  5053. update = update.next;
  5054. revertLane === currentEntangledLane &&
  5055. (didReadFromEntangledAsyncAction$69 = !0);
  5056. continue;
  5057. } else
  5058. (updateLane = {
  5059. lane: 0,
  5060. revertLane: update.revertLane,
  5061. gesture: null,
  5062. action: update.action,
  5063. hasEagerState: update.hasEagerState,
  5064. eagerState: update.eagerState,
  5065. next: null
  5066. }),
  5067. null === newBaseQueueLast
  5068. ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),
  5069. (baseFirst = pendingQueue))
  5070. : (newBaseQueueLast = newBaseQueueLast.next = updateLane),
  5071. (currentlyRenderingFiber.lanes |= revertLane),
  5072. (workInProgressRootSkippedLanes |= revertLane);
  5073. updateLane = update.action;
  5074. shouldDoubleInvokeUserFnsInHooksDEV &&
  5075. reducer(pendingQueue, updateLane);
  5076. pendingQueue = update.hasEagerState
  5077. ? update.eagerState
  5078. : reducer(pendingQueue, updateLane);
  5079. } else
  5080. (revertLane = {
  5081. lane: updateLane,
  5082. revertLane: update.revertLane,
  5083. gesture: update.gesture,
  5084. action: update.action,
  5085. hasEagerState: update.hasEagerState,
  5086. eagerState: update.eagerState,
  5087. next: null
  5088. }),
  5089. null === newBaseQueueLast
  5090. ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),
  5091. (baseFirst = pendingQueue))
  5092. : (newBaseQueueLast = newBaseQueueLast.next = revertLane),
  5093. (currentlyRenderingFiber.lanes |= updateLane),
  5094. (workInProgressRootSkippedLanes |= updateLane);
  5095. update = update.next;
  5096. } while (null !== update && update !== current);
  5097. null === newBaseQueueLast
  5098. ? (baseFirst = pendingQueue)
  5099. : (newBaseQueueLast.next = newBaseQueueFirst);
  5100. if (
  5101. !objectIs(pendingQueue, hook.memoizedState) &&
  5102. ((didReceiveUpdate = !0),
  5103. didReadFromEntangledAsyncAction$69 &&
  5104. ((reducer = currentEntangledActionThenable), null !== reducer))
  5105. )
  5106. throw reducer;
  5107. hook.memoizedState = pendingQueue;
  5108. hook.baseState = baseFirst;
  5109. hook.baseQueue = newBaseQueueLast;
  5110. queue.lastRenderedState = pendingQueue;
  5111. }
  5112. null === baseQueue && (queue.lanes = 0);
  5113. return [hook.memoizedState, queue.dispatch];
  5114. }
  5115. function rerenderReducer(reducer) {
  5116. var hook = updateWorkInProgressHook(),
  5117. queue = hook.queue;
  5118. if (null === queue) throw Error(formatProdErrorMessage(311));
  5119. queue.lastRenderedReducer = reducer;
  5120. var dispatch = queue.dispatch,
  5121. lastRenderPhaseUpdate = queue.pending,
  5122. newState = hook.memoizedState;
  5123. if (null !== lastRenderPhaseUpdate) {
  5124. queue.pending = null;
  5125. var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
  5126. do (newState = reducer(newState, update.action)), (update = update.next);
  5127. while (update !== lastRenderPhaseUpdate);
  5128. objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);
  5129. hook.memoizedState = newState;
  5130. null === hook.baseQueue && (hook.baseState = newState);
  5131. queue.lastRenderedState = newState;
  5132. }
  5133. return [newState, dispatch];
  5134. }
  5135. function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
  5136. var fiber = currentlyRenderingFiber,
  5137. hook = updateWorkInProgressHook(),
  5138. isHydrating$jscomp$0 = isHydrating;
  5139. if (isHydrating$jscomp$0) {
  5140. if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));
  5141. getServerSnapshot = getServerSnapshot();
  5142. } else getServerSnapshot = getSnapshot();
  5143. var snapshotChanged = !objectIs(
  5144. (currentHook || hook).memoizedState,
  5145. getServerSnapshot
  5146. );
  5147. snapshotChanged &&
  5148. ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));
  5149. hook = hook.queue;
  5150. updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
  5151. subscribe
  5152. ]);
  5153. if (
  5154. hook.getSnapshot !== getSnapshot ||
  5155. snapshotChanged ||
  5156. (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)
  5157. ) {
  5158. fiber.flags |= 2048;
  5159. pushSimpleEffect(
  5160. 9,
  5161. { destroy: void 0 },
  5162. updateStoreInstance.bind(
  5163. null,
  5164. fiber,
  5165. hook,
  5166. getServerSnapshot,
  5167. getSnapshot
  5168. ),
  5169. null
  5170. );
  5171. if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
  5172. isHydrating$jscomp$0 ||
  5173. 0 !== (renderLanes & 127) ||
  5174. pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
  5175. }
  5176. return getServerSnapshot;
  5177. }
  5178. function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
  5179. fiber.flags |= 16384;
  5180. fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };
  5181. getSnapshot = currentlyRenderingFiber.updateQueue;
  5182. null === getSnapshot
  5183. ? ((getSnapshot = createFunctionComponentUpdateQueue()),
  5184. (currentlyRenderingFiber.updateQueue = getSnapshot),
  5185. (getSnapshot.stores = [fiber]))
  5186. : ((renderedSnapshot = getSnapshot.stores),
  5187. null === renderedSnapshot
  5188. ? (getSnapshot.stores = [fiber])
  5189. : renderedSnapshot.push(fiber));
  5190. }
  5191. function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
  5192. inst.value = nextSnapshot;
  5193. inst.getSnapshot = getSnapshot;
  5194. checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
  5195. }
  5196. function subscribeToStore(fiber, inst, subscribe) {
  5197. return subscribe(function () {
  5198. checkIfSnapshotChanged(inst) &&
  5199. (startUpdateTimerByLane(2), forceStoreRerender(fiber));
  5200. });
  5201. }
  5202. function checkIfSnapshotChanged(inst) {
  5203. var latestGetSnapshot = inst.getSnapshot;
  5204. inst = inst.value;
  5205. try {
  5206. var nextValue = latestGetSnapshot();
  5207. return !objectIs(inst, nextValue);
  5208. } catch (error) {
  5209. return !0;
  5210. }
  5211. }
  5212. function forceStoreRerender(fiber) {
  5213. var root = enqueueConcurrentRenderForLane(fiber, 2);
  5214. null !== root && scheduleUpdateOnFiber(root, fiber, 2);
  5215. }
  5216. function mountStateImpl(initialState) {
  5217. var hook = mountWorkInProgressHook();
  5218. if ("function" === typeof initialState) {
  5219. var initialStateInitializer = initialState;
  5220. initialState = initialStateInitializer();
  5221. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5222. setIsStrictModeForDevtools(!0);
  5223. try {
  5224. initialStateInitializer();
  5225. } finally {
  5226. setIsStrictModeForDevtools(!1);
  5227. }
  5228. }
  5229. }
  5230. hook.memoizedState = hook.baseState = initialState;
  5231. hook.queue = {
  5232. pending: null,
  5233. lanes: 0,
  5234. dispatch: null,
  5235. lastRenderedReducer: basicStateReducer,
  5236. lastRenderedState: initialState
  5237. };
  5238. return hook;
  5239. }
  5240. function updateOptimisticImpl(hook, current, passthrough, reducer) {
  5241. hook.baseState = passthrough;
  5242. return updateReducerImpl(
  5243. hook,
  5244. currentHook,
  5245. "function" === typeof reducer ? reducer : basicStateReducer
  5246. );
  5247. }
  5248. function dispatchActionState(
  5249. fiber,
  5250. actionQueue,
  5251. setPendingState,
  5252. setState,
  5253. payload
  5254. ) {
  5255. if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));
  5256. fiber = actionQueue.action;
  5257. if (null !== fiber) {
  5258. var actionNode = {
  5259. payload: payload,
  5260. action: fiber,
  5261. next: null,
  5262. isTransition: !0,
  5263. status: "pending",
  5264. value: null,
  5265. reason: null,
  5266. listeners: [],
  5267. then: function (listener) {
  5268. actionNode.listeners.push(listener);
  5269. }
  5270. };
  5271. null !== ReactSharedInternals.T
  5272. ? setPendingState(!0)
  5273. : (actionNode.isTransition = !1);
  5274. setState(actionNode);
  5275. setPendingState = actionQueue.pending;
  5276. null === setPendingState
  5277. ? ((actionNode.next = actionQueue.pending = actionNode),
  5278. runActionStateAction(actionQueue, actionNode))
  5279. : ((actionNode.next = setPendingState.next),
  5280. (actionQueue.pending = setPendingState.next = actionNode));
  5281. }
  5282. }
  5283. function runActionStateAction(actionQueue, node) {
  5284. var action = node.action,
  5285. payload = node.payload,
  5286. prevState = actionQueue.state;
  5287. if (node.isTransition) {
  5288. var prevTransition = ReactSharedInternals.T,
  5289. currentTransition = {};
  5290. ReactSharedInternals.T = currentTransition;
  5291. try {
  5292. var returnValue = action(prevState, payload),
  5293. onStartTransitionFinish = ReactSharedInternals.S;
  5294. null !== onStartTransitionFinish &&
  5295. onStartTransitionFinish(currentTransition, returnValue);
  5296. handleActionReturnValue(actionQueue, node, returnValue);
  5297. } catch (error) {
  5298. onActionError(actionQueue, node, error);
  5299. } finally {
  5300. null !== prevTransition &&
  5301. null !== currentTransition.types &&
  5302. (prevTransition.types = currentTransition.types),
  5303. (ReactSharedInternals.T = prevTransition);
  5304. }
  5305. } else
  5306. try {
  5307. (prevTransition = action(prevState, payload)),
  5308. handleActionReturnValue(actionQueue, node, prevTransition);
  5309. } catch (error$75) {
  5310. onActionError(actionQueue, node, error$75);
  5311. }
  5312. }
  5313. function handleActionReturnValue(actionQueue, node, returnValue) {
  5314. null !== returnValue &&
  5315. "object" === typeof returnValue &&
  5316. "function" === typeof returnValue.then
  5317. ? returnValue.then(
  5318. function (nextState) {
  5319. onActionSuccess(actionQueue, node, nextState);
  5320. },
  5321. function (error) {
  5322. return onActionError(actionQueue, node, error);
  5323. }
  5324. )
  5325. : onActionSuccess(actionQueue, node, returnValue);
  5326. }
  5327. function onActionSuccess(actionQueue, actionNode, nextState) {
  5328. actionNode.status = "fulfilled";
  5329. actionNode.value = nextState;
  5330. notifyActionListeners(actionNode);
  5331. actionQueue.state = nextState;
  5332. actionNode = actionQueue.pending;
  5333. null !== actionNode &&
  5334. ((nextState = actionNode.next),
  5335. nextState === actionNode
  5336. ? (actionQueue.pending = null)
  5337. : ((nextState = nextState.next),
  5338. (actionNode.next = nextState),
  5339. runActionStateAction(actionQueue, nextState)));
  5340. }
  5341. function onActionError(actionQueue, actionNode, error) {
  5342. var last = actionQueue.pending;
  5343. actionQueue.pending = null;
  5344. if (null !== last) {
  5345. last = last.next;
  5346. do
  5347. (actionNode.status = "rejected"),
  5348. (actionNode.reason = error),
  5349. notifyActionListeners(actionNode),
  5350. (actionNode = actionNode.next);
  5351. while (actionNode !== last);
  5352. }
  5353. actionQueue.action = null;
  5354. }
  5355. function notifyActionListeners(actionNode) {
  5356. actionNode = actionNode.listeners;
  5357. for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
  5358. }
  5359. function actionStateReducer(oldState, newState) {
  5360. return newState;
  5361. }
  5362. function mountActionState(action, initialStateProp) {
  5363. if (isHydrating) {
  5364. var ssrFormState = workInProgressRoot.formState;
  5365. if (null !== ssrFormState) {
  5366. a: {
  5367. var JSCompiler_inline_result = currentlyRenderingFiber;
  5368. if (isHydrating) {
  5369. if (nextHydratableInstance) {
  5370. b: {
  5371. var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;
  5372. for (
  5373. var inRootOrSingleton = rootOrSingletonContext;
  5374. 8 !== JSCompiler_inline_result$jscomp$0.nodeType;
  5375. ) {
  5376. if (!inRootOrSingleton) {
  5377. JSCompiler_inline_result$jscomp$0 = null;
  5378. break b;
  5379. }
  5380. JSCompiler_inline_result$jscomp$0 = getNextHydratable(
  5381. JSCompiler_inline_result$jscomp$0.nextSibling
  5382. );
  5383. if (null === JSCompiler_inline_result$jscomp$0) {
  5384. JSCompiler_inline_result$jscomp$0 = null;
  5385. break b;
  5386. }
  5387. }
  5388. inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;
  5389. JSCompiler_inline_result$jscomp$0 =
  5390. "F!" === inRootOrSingleton || "F" === inRootOrSingleton
  5391. ? JSCompiler_inline_result$jscomp$0
  5392. : null;
  5393. }
  5394. if (JSCompiler_inline_result$jscomp$0) {
  5395. nextHydratableInstance = getNextHydratable(
  5396. JSCompiler_inline_result$jscomp$0.nextSibling
  5397. );
  5398. JSCompiler_inline_result =
  5399. "F!" === JSCompiler_inline_result$jscomp$0.data;
  5400. break a;
  5401. }
  5402. }
  5403. throwOnHydrationMismatch(JSCompiler_inline_result);
  5404. }
  5405. JSCompiler_inline_result = !1;
  5406. }
  5407. JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);
  5408. }
  5409. }
  5410. ssrFormState = mountWorkInProgressHook();
  5411. ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
  5412. JSCompiler_inline_result = {
  5413. pending: null,
  5414. lanes: 0,
  5415. dispatch: null,
  5416. lastRenderedReducer: actionStateReducer,
  5417. lastRenderedState: initialStateProp
  5418. };
  5419. ssrFormState.queue = JSCompiler_inline_result;
  5420. ssrFormState = dispatchSetState.bind(
  5421. null,
  5422. currentlyRenderingFiber,
  5423. JSCompiler_inline_result
  5424. );
  5425. JSCompiler_inline_result.dispatch = ssrFormState;
  5426. JSCompiler_inline_result = mountStateImpl(!1);
  5427. inRootOrSingleton = dispatchOptimisticSetState.bind(
  5428. null,
  5429. currentlyRenderingFiber,
  5430. !1,
  5431. JSCompiler_inline_result.queue
  5432. );
  5433. JSCompiler_inline_result = mountWorkInProgressHook();
  5434. JSCompiler_inline_result$jscomp$0 = {
  5435. state: initialStateProp,
  5436. dispatch: null,
  5437. action: action,
  5438. pending: null
  5439. };
  5440. JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;
  5441. ssrFormState = dispatchActionState.bind(
  5442. null,
  5443. currentlyRenderingFiber,
  5444. JSCompiler_inline_result$jscomp$0,
  5445. inRootOrSingleton,
  5446. ssrFormState
  5447. );
  5448. JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;
  5449. JSCompiler_inline_result.memoizedState = action;
  5450. return [initialStateProp, ssrFormState, !1];
  5451. }
  5452. function updateActionState(action) {
  5453. var stateHook = updateWorkInProgressHook();
  5454. return updateActionStateImpl(stateHook, currentHook, action);
  5455. }
  5456. function updateActionStateImpl(stateHook, currentStateHook, action) {
  5457. currentStateHook = updateReducerImpl(
  5458. stateHook,
  5459. currentStateHook,
  5460. actionStateReducer
  5461. )[0];
  5462. stateHook = updateReducer(basicStateReducer)[0];
  5463. if (
  5464. "object" === typeof currentStateHook &&
  5465. null !== currentStateHook &&
  5466. "function" === typeof currentStateHook.then
  5467. )
  5468. try {
  5469. var state = useThenable(currentStateHook);
  5470. } catch (x) {
  5471. if (x === SuspenseException) throw SuspenseActionException;
  5472. throw x;
  5473. }
  5474. else state = currentStateHook;
  5475. currentStateHook = updateWorkInProgressHook();
  5476. var actionQueue = currentStateHook.queue,
  5477. dispatch = actionQueue.dispatch;
  5478. action !== currentStateHook.memoizedState &&
  5479. ((currentlyRenderingFiber.flags |= 2048),
  5480. pushSimpleEffect(
  5481. 9,
  5482. { destroy: void 0 },
  5483. actionStateActionEffect.bind(null, actionQueue, action),
  5484. null
  5485. ));
  5486. return [state, dispatch, stateHook];
  5487. }
  5488. function actionStateActionEffect(actionQueue, action) {
  5489. actionQueue.action = action;
  5490. }
  5491. function rerenderActionState(action) {
  5492. var stateHook = updateWorkInProgressHook(),
  5493. currentStateHook = currentHook;
  5494. if (null !== currentStateHook)
  5495. return updateActionStateImpl(stateHook, currentStateHook, action);
  5496. updateWorkInProgressHook();
  5497. stateHook = stateHook.memoizedState;
  5498. currentStateHook = updateWorkInProgressHook();
  5499. var dispatch = currentStateHook.queue.dispatch;
  5500. currentStateHook.memoizedState = action;
  5501. return [stateHook, dispatch, !1];
  5502. }
  5503. function pushSimpleEffect(tag, inst, create, deps) {
  5504. tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };
  5505. inst = currentlyRenderingFiber.updateQueue;
  5506. null === inst &&
  5507. ((inst = createFunctionComponentUpdateQueue()),
  5508. (currentlyRenderingFiber.updateQueue = inst));
  5509. create = inst.lastEffect;
  5510. null === create
  5511. ? (inst.lastEffect = tag.next = tag)
  5512. : ((deps = create.next),
  5513. (create.next = tag),
  5514. (tag.next = deps),
  5515. (inst.lastEffect = tag));
  5516. return tag;
  5517. }
  5518. function updateRef() {
  5519. return updateWorkInProgressHook().memoizedState;
  5520. }
  5521. function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
  5522. var hook = mountWorkInProgressHook();
  5523. currentlyRenderingFiber.flags |= fiberFlags;
  5524. hook.memoizedState = pushSimpleEffect(
  5525. 1 | hookFlags,
  5526. { destroy: void 0 },
  5527. create,
  5528. void 0 === deps ? null : deps
  5529. );
  5530. }
  5531. function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
  5532. var hook = updateWorkInProgressHook();
  5533. deps = void 0 === deps ? null : deps;
  5534. var inst = hook.memoizedState.inst;
  5535. null !== currentHook &&
  5536. null !== deps &&
  5537. areHookInputsEqual(deps, currentHook.memoizedState.deps)
  5538. ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))
  5539. : ((currentlyRenderingFiber.flags |= fiberFlags),
  5540. (hook.memoizedState = pushSimpleEffect(
  5541. 1 | hookFlags,
  5542. inst,
  5543. create,
  5544. deps
  5545. )));
  5546. }
  5547. function mountEffect(create, deps) {
  5548. mountEffectImpl(8390656, 8, create, deps);
  5549. }
  5550. function updateEffect(create, deps) {
  5551. updateEffectImpl(2048, 8, create, deps);
  5552. }
  5553. function useEffectEventImpl(payload) {
  5554. currentlyRenderingFiber.flags |= 4;
  5555. var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
  5556. if (null === componentUpdateQueue)
  5557. (componentUpdateQueue = createFunctionComponentUpdateQueue()),
  5558. (currentlyRenderingFiber.updateQueue = componentUpdateQueue),
  5559. (componentUpdateQueue.events = [payload]);
  5560. else {
  5561. var events = componentUpdateQueue.events;
  5562. null === events
  5563. ? (componentUpdateQueue.events = [payload])
  5564. : events.push(payload);
  5565. }
  5566. }
  5567. function updateEvent(callback) {
  5568. var ref = updateWorkInProgressHook().memoizedState;
  5569. useEffectEventImpl({ ref: ref, nextImpl: callback });
  5570. return function () {
  5571. if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));
  5572. return ref.impl.apply(void 0, arguments);
  5573. };
  5574. }
  5575. function updateInsertionEffect(create, deps) {
  5576. return updateEffectImpl(4, 2, create, deps);
  5577. }
  5578. function updateLayoutEffect(create, deps) {
  5579. return updateEffectImpl(4, 4, create, deps);
  5580. }
  5581. function imperativeHandleEffect(create, ref) {
  5582. if ("function" === typeof ref) {
  5583. create = create();
  5584. var refCleanup = ref(create);
  5585. return function () {
  5586. "function" === typeof refCleanup ? refCleanup() : ref(null);
  5587. };
  5588. }
  5589. if (null !== ref && void 0 !== ref)
  5590. return (
  5591. (create = create()),
  5592. (ref.current = create),
  5593. function () {
  5594. ref.current = null;
  5595. }
  5596. );
  5597. }
  5598. function updateImperativeHandle(ref, create, deps) {
  5599. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  5600. updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);
  5601. }
  5602. function mountDebugValue() {}
  5603. function updateCallback(callback, deps) {
  5604. var hook = updateWorkInProgressHook();
  5605. deps = void 0 === deps ? null : deps;
  5606. var prevState = hook.memoizedState;
  5607. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  5608. return prevState[0];
  5609. hook.memoizedState = [callback, deps];
  5610. return callback;
  5611. }
  5612. function updateMemo(nextCreate, deps) {
  5613. var hook = updateWorkInProgressHook();
  5614. deps = void 0 === deps ? null : deps;
  5615. var prevState = hook.memoizedState;
  5616. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  5617. return prevState[0];
  5618. prevState = nextCreate();
  5619. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5620. setIsStrictModeForDevtools(!0);
  5621. try {
  5622. nextCreate();
  5623. } finally {
  5624. setIsStrictModeForDevtools(!1);
  5625. }
  5626. }
  5627. hook.memoizedState = [prevState, deps];
  5628. return prevState;
  5629. }
  5630. function mountDeferredValueImpl(hook, value, initialValue) {
  5631. if (
  5632. void 0 === initialValue ||
  5633. (0 !== (renderLanes & 1073741824) &&
  5634. 0 === (workInProgressRootRenderLanes & 261930))
  5635. )
  5636. return (hook.memoizedState = value);
  5637. hook.memoizedState = initialValue;
  5638. hook = requestDeferredLane();
  5639. currentlyRenderingFiber.lanes |= hook;
  5640. workInProgressRootSkippedLanes |= hook;
  5641. return initialValue;
  5642. }
  5643. function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
  5644. if (objectIs(value, prevValue)) return value;
  5645. if (null !== currentTreeHiddenStackCursor.current)
  5646. return (
  5647. (hook = mountDeferredValueImpl(hook, value, initialValue)),
  5648. objectIs(hook, prevValue) || (didReceiveUpdate = !0),
  5649. hook
  5650. );
  5651. if (
  5652. 0 === (renderLanes & 42) ||
  5653. (0 !== (renderLanes & 1073741824) &&
  5654. 0 === (workInProgressRootRenderLanes & 261930))
  5655. )
  5656. return (didReceiveUpdate = !0), (hook.memoizedState = value);
  5657. hook = requestDeferredLane();
  5658. currentlyRenderingFiber.lanes |= hook;
  5659. workInProgressRootSkippedLanes |= hook;
  5660. return prevValue;
  5661. }
  5662. function startTransition(fiber, queue, pendingState, finishedState, callback) {
  5663. var previousPriority = ReactDOMSharedInternals.p;
  5664. ReactDOMSharedInternals.p =
  5665. 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
  5666. var prevTransition = ReactSharedInternals.T,
  5667. currentTransition = {};
  5668. ReactSharedInternals.T = currentTransition;
  5669. dispatchOptimisticSetState(fiber, !1, queue, pendingState);
  5670. try {
  5671. var returnValue = callback(),
  5672. onStartTransitionFinish = ReactSharedInternals.S;
  5673. null !== onStartTransitionFinish &&
  5674. onStartTransitionFinish(currentTransition, returnValue);
  5675. if (
  5676. null !== returnValue &&
  5677. "object" === typeof returnValue &&
  5678. "function" === typeof returnValue.then
  5679. ) {
  5680. var thenableForFinishedState = chainThenableValue(
  5681. returnValue,
  5682. finishedState
  5683. );
  5684. dispatchSetStateInternal(
  5685. fiber,
  5686. queue,
  5687. thenableForFinishedState,
  5688. requestUpdateLane(fiber)
  5689. );
  5690. } else
  5691. dispatchSetStateInternal(
  5692. fiber,
  5693. queue,
  5694. finishedState,
  5695. requestUpdateLane(fiber)
  5696. );
  5697. } catch (error) {
  5698. dispatchSetStateInternal(
  5699. fiber,
  5700. queue,
  5701. { then: function () {}, status: "rejected", reason: error },
  5702. requestUpdateLane()
  5703. );
  5704. } finally {
  5705. (ReactDOMSharedInternals.p = previousPriority),
  5706. null !== prevTransition &&
  5707. null !== currentTransition.types &&
  5708. (prevTransition.types = currentTransition.types),
  5709. (ReactSharedInternals.T = prevTransition);
  5710. }
  5711. }
  5712. function noop() {}
  5713. function startHostTransition(formFiber, pendingState, action, formData) {
  5714. if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));
  5715. var queue = ensureFormComponentIsStateful(formFiber).queue;
  5716. startHostActionTimer();
  5717. startTransition(
  5718. formFiber,
  5719. queue,
  5720. pendingState,
  5721. sharedNotPendingObject,
  5722. null === action
  5723. ? noop
  5724. : function () {
  5725. requestFormReset$2(formFiber);
  5726. return action(formData);
  5727. }
  5728. );
  5729. }
  5730. function ensureFormComponentIsStateful(formFiber) {
  5731. var existingStateHook = formFiber.memoizedState;
  5732. if (null !== existingStateHook) return existingStateHook;
  5733. existingStateHook = {
  5734. memoizedState: sharedNotPendingObject,
  5735. baseState: sharedNotPendingObject,
  5736. baseQueue: null,
  5737. queue: {
  5738. pending: null,
  5739. lanes: 0,
  5740. dispatch: null,
  5741. lastRenderedReducer: basicStateReducer,
  5742. lastRenderedState: sharedNotPendingObject
  5743. },
  5744. next: null
  5745. };
  5746. var initialResetState = {};
  5747. existingStateHook.next = {
  5748. memoizedState: initialResetState,
  5749. baseState: initialResetState,
  5750. baseQueue: null,
  5751. queue: {
  5752. pending: null,
  5753. lanes: 0,
  5754. dispatch: null,
  5755. lastRenderedReducer: basicStateReducer,
  5756. lastRenderedState: initialResetState
  5757. },
  5758. next: null
  5759. };
  5760. formFiber.memoizedState = existingStateHook;
  5761. formFiber = formFiber.alternate;
  5762. null !== formFiber && (formFiber.memoizedState = existingStateHook);
  5763. return existingStateHook;
  5764. }
  5765. function requestFormReset$2(formFiber) {
  5766. var stateHook = ensureFormComponentIsStateful(formFiber);
  5767. null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);
  5768. dispatchSetStateInternal(
  5769. formFiber,
  5770. stateHook.next.queue,
  5771. {},
  5772. requestUpdateLane()
  5773. );
  5774. }
  5775. function useHostTransitionStatus() {
  5776. return readContext(HostTransitionContext);
  5777. }
  5778. function updateId() {
  5779. return updateWorkInProgressHook().memoizedState;
  5780. }
  5781. function updateRefresh() {
  5782. return updateWorkInProgressHook().memoizedState;
  5783. }
  5784. function refreshCache(fiber) {
  5785. for (var provider = fiber.return; null !== provider; ) {
  5786. switch (provider.tag) {
  5787. case 24:
  5788. case 3:
  5789. var lane = requestUpdateLane();
  5790. fiber = createUpdate(lane);
  5791. var root$78 = enqueueUpdate(provider, fiber, lane);
  5792. null !== root$78 &&
  5793. (startUpdateTimerByLane(lane),
  5794. scheduleUpdateOnFiber(root$78, provider, lane),
  5795. entangleTransitions(root$78, provider, lane));
  5796. provider = { cache: createCache() };
  5797. fiber.payload = provider;
  5798. return;
  5799. }
  5800. provider = provider.return;
  5801. }
  5802. }
  5803. function dispatchReducerAction(fiber, queue, action) {
  5804. var lane = requestUpdateLane();
  5805. action = {
  5806. lane: lane,
  5807. revertLane: 0,
  5808. gesture: null,
  5809. action: action,
  5810. hasEagerState: !1,
  5811. eagerState: null,
  5812. next: null
  5813. };
  5814. isRenderPhaseUpdate(fiber)
  5815. ? enqueueRenderPhaseUpdate(queue, action)
  5816. : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),
  5817. null !== action &&
  5818. (startUpdateTimerByLane(lane),
  5819. scheduleUpdateOnFiber(action, fiber, lane),
  5820. entangleTransitionUpdate(action, queue, lane)));
  5821. }
  5822. function dispatchSetState(fiber, queue, action) {
  5823. var lane = requestUpdateLane();
  5824. dispatchSetStateInternal(fiber, queue, action, lane) &&
  5825. startUpdateTimerByLane(lane);
  5826. }
  5827. function dispatchSetStateInternal(fiber, queue, action, lane) {
  5828. var update = {
  5829. lane: lane,
  5830. revertLane: 0,
  5831. gesture: null,
  5832. action: action,
  5833. hasEagerState: !1,
  5834. eagerState: null,
  5835. next: null
  5836. };
  5837. if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
  5838. else {
  5839. var alternate = fiber.alternate;
  5840. if (
  5841. 0 === fiber.lanes &&
  5842. (null === alternate || 0 === alternate.lanes) &&
  5843. ((alternate = queue.lastRenderedReducer), null !== alternate)
  5844. )
  5845. try {
  5846. var currentState = queue.lastRenderedState,
  5847. eagerState = alternate(currentState, action);
  5848. update.hasEagerState = !0;
  5849. update.eagerState = eagerState;
  5850. if (objectIs(eagerState, currentState))
  5851. return (
  5852. enqueueUpdate$1(fiber, queue, update, 0),
  5853. null === workInProgressRoot && finishQueueingConcurrentUpdates(),
  5854. !1
  5855. );
  5856. } catch (error) {
  5857. } finally {
  5858. }
  5859. action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
  5860. if (null !== action)
  5861. return (
  5862. scheduleUpdateOnFiber(action, fiber, lane),
  5863. entangleTransitionUpdate(action, queue, lane),
  5864. !0
  5865. );
  5866. }
  5867. return !1;
  5868. }
  5869. function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
  5870. action = {
  5871. lane: 2,
  5872. revertLane: requestTransitionLane(),
  5873. gesture: null,
  5874. action: action,
  5875. hasEagerState: !1,
  5876. eagerState: null,
  5877. next: null
  5878. };
  5879. if (isRenderPhaseUpdate(fiber)) {
  5880. if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));
  5881. } else
  5882. (throwIfDuringRender = enqueueConcurrentHookUpdate(
  5883. fiber,
  5884. queue,
  5885. action,
  5886. 2
  5887. )),
  5888. null !== throwIfDuringRender &&
  5889. (startUpdateTimerByLane(2),
  5890. scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2));
  5891. }
  5892. function isRenderPhaseUpdate(fiber) {
  5893. var alternate = fiber.alternate;
  5894. return (
  5895. fiber === currentlyRenderingFiber ||
  5896. (null !== alternate && alternate === currentlyRenderingFiber)
  5897. );
  5898. }
  5899. function enqueueRenderPhaseUpdate(queue, update) {
  5900. didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =
  5901. !0;
  5902. var pending = queue.pending;
  5903. null === pending
  5904. ? (update.next = update)
  5905. : ((update.next = pending.next), (pending.next = update));
  5906. queue.pending = update;
  5907. }
  5908. function entangleTransitionUpdate(root, queue, lane) {
  5909. if (0 !== (lane & 4194048)) {
  5910. var queueLanes = queue.lanes;
  5911. queueLanes &= root.pendingLanes;
  5912. lane |= queueLanes;
  5913. queue.lanes = lane;
  5914. markRootEntangled(root, lane);
  5915. }
  5916. }
  5917. var ContextOnlyDispatcher = {
  5918. readContext: readContext,
  5919. use: use,
  5920. useCallback: throwInvalidHookError,
  5921. useContext: throwInvalidHookError,
  5922. useEffect: throwInvalidHookError,
  5923. useImperativeHandle: throwInvalidHookError,
  5924. useLayoutEffect: throwInvalidHookError,
  5925. useInsertionEffect: throwInvalidHookError,
  5926. useMemo: throwInvalidHookError,
  5927. useReducer: throwInvalidHookError,
  5928. useRef: throwInvalidHookError,
  5929. useState: throwInvalidHookError,
  5930. useDebugValue: throwInvalidHookError,
  5931. useDeferredValue: throwInvalidHookError,
  5932. useTransition: throwInvalidHookError,
  5933. useSyncExternalStore: throwInvalidHookError,
  5934. useId: throwInvalidHookError,
  5935. useHostTransitionStatus: throwInvalidHookError,
  5936. useFormState: throwInvalidHookError,
  5937. useActionState: throwInvalidHookError,
  5938. useOptimistic: throwInvalidHookError,
  5939. useMemoCache: throwInvalidHookError,
  5940. useCacheRefresh: throwInvalidHookError
  5941. };
  5942. ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
  5943. var HooksDispatcherOnMount = {
  5944. readContext: readContext,
  5945. use: use,
  5946. useCallback: function (callback, deps) {
  5947. mountWorkInProgressHook().memoizedState = [
  5948. callback,
  5949. void 0 === deps ? null : deps
  5950. ];
  5951. return callback;
  5952. },
  5953. useContext: readContext,
  5954. useEffect: mountEffect,
  5955. useImperativeHandle: function (ref, create, deps) {
  5956. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  5957. mountEffectImpl(
  5958. 4194308,
  5959. 4,
  5960. imperativeHandleEffect.bind(null, create, ref),
  5961. deps
  5962. );
  5963. },
  5964. useLayoutEffect: function (create, deps) {
  5965. return mountEffectImpl(4194308, 4, create, deps);
  5966. },
  5967. useInsertionEffect: function (create, deps) {
  5968. mountEffectImpl(4, 2, create, deps);
  5969. },
  5970. useMemo: function (nextCreate, deps) {
  5971. var hook = mountWorkInProgressHook();
  5972. deps = void 0 === deps ? null : deps;
  5973. var nextValue = nextCreate();
  5974. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5975. setIsStrictModeForDevtools(!0);
  5976. try {
  5977. nextCreate();
  5978. } finally {
  5979. setIsStrictModeForDevtools(!1);
  5980. }
  5981. }
  5982. hook.memoizedState = [nextValue, deps];
  5983. return nextValue;
  5984. },
  5985. useReducer: function (reducer, initialArg, init) {
  5986. var hook = mountWorkInProgressHook();
  5987. if (void 0 !== init) {
  5988. var initialState = init(initialArg);
  5989. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5990. setIsStrictModeForDevtools(!0);
  5991. try {
  5992. init(initialArg);
  5993. } finally {
  5994. setIsStrictModeForDevtools(!1);
  5995. }
  5996. }
  5997. } else initialState = initialArg;
  5998. hook.memoizedState = hook.baseState = initialState;
  5999. reducer = {
  6000. pending: null,
  6001. lanes: 0,
  6002. dispatch: null,
  6003. lastRenderedReducer: reducer,
  6004. lastRenderedState: initialState
  6005. };
  6006. hook.queue = reducer;
  6007. reducer = reducer.dispatch = dispatchReducerAction.bind(
  6008. null,
  6009. currentlyRenderingFiber,
  6010. reducer
  6011. );
  6012. return [hook.memoizedState, reducer];
  6013. },
  6014. useRef: function (initialValue) {
  6015. var hook = mountWorkInProgressHook();
  6016. initialValue = { current: initialValue };
  6017. return (hook.memoizedState = initialValue);
  6018. },
  6019. useState: function (initialState) {
  6020. initialState = mountStateImpl(initialState);
  6021. var queue = initialState.queue,
  6022. dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
  6023. queue.dispatch = dispatch;
  6024. return [initialState.memoizedState, dispatch];
  6025. },
  6026. useDebugValue: mountDebugValue,
  6027. useDeferredValue: function (value, initialValue) {
  6028. var hook = mountWorkInProgressHook();
  6029. return mountDeferredValueImpl(hook, value, initialValue);
  6030. },
  6031. useTransition: function () {
  6032. var stateHook = mountStateImpl(!1);
  6033. stateHook = startTransition.bind(
  6034. null,
  6035. currentlyRenderingFiber,
  6036. stateHook.queue,
  6037. !0,
  6038. !1
  6039. );
  6040. mountWorkInProgressHook().memoizedState = stateHook;
  6041. return [!1, stateHook];
  6042. },
  6043. useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
  6044. var fiber = currentlyRenderingFiber,
  6045. hook = mountWorkInProgressHook();
  6046. if (isHydrating) {
  6047. if (void 0 === getServerSnapshot)
  6048. throw Error(formatProdErrorMessage(407));
  6049. getServerSnapshot = getServerSnapshot();
  6050. } else {
  6051. getServerSnapshot = getSnapshot();
  6052. if (null === workInProgressRoot)
  6053. throw Error(formatProdErrorMessage(349));
  6054. 0 !== (workInProgressRootRenderLanes & 127) ||
  6055. pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
  6056. }
  6057. hook.memoizedState = getServerSnapshot;
  6058. var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
  6059. hook.queue = inst;
  6060. mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
  6061. subscribe
  6062. ]);
  6063. fiber.flags |= 2048;
  6064. pushSimpleEffect(
  6065. 9,
  6066. { destroy: void 0 },
  6067. updateStoreInstance.bind(
  6068. null,
  6069. fiber,
  6070. inst,
  6071. getServerSnapshot,
  6072. getSnapshot
  6073. ),
  6074. null
  6075. );
  6076. return getServerSnapshot;
  6077. },
  6078. useId: function () {
  6079. var hook = mountWorkInProgressHook(),
  6080. identifierPrefix = workInProgressRoot.identifierPrefix;
  6081. if (isHydrating) {
  6082. var JSCompiler_inline_result = treeContextOverflow;
  6083. var idWithLeadingBit = treeContextId;
  6084. JSCompiler_inline_result =
  6085. (
  6086. idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))
  6087. ).toString(32) + JSCompiler_inline_result;
  6088. identifierPrefix =
  6089. "_" + identifierPrefix + "R_" + JSCompiler_inline_result;
  6090. JSCompiler_inline_result = localIdCounter++;
  6091. 0 < JSCompiler_inline_result &&
  6092. (identifierPrefix += "H" + JSCompiler_inline_result.toString(32));
  6093. identifierPrefix += "_";
  6094. } else
  6095. (JSCompiler_inline_result = globalClientIdCounter++),
  6096. (identifierPrefix =
  6097. "_" +
  6098. identifierPrefix +
  6099. "r_" +
  6100. JSCompiler_inline_result.toString(32) +
  6101. "_");
  6102. return (hook.memoizedState = identifierPrefix);
  6103. },
  6104. useHostTransitionStatus: useHostTransitionStatus,
  6105. useFormState: mountActionState,
  6106. useActionState: mountActionState,
  6107. useOptimistic: function (passthrough) {
  6108. var hook = mountWorkInProgressHook();
  6109. hook.memoizedState = hook.baseState = passthrough;
  6110. var queue = {
  6111. pending: null,
  6112. lanes: 0,
  6113. dispatch: null,
  6114. lastRenderedReducer: null,
  6115. lastRenderedState: null
  6116. };
  6117. hook.queue = queue;
  6118. hook = dispatchOptimisticSetState.bind(
  6119. null,
  6120. currentlyRenderingFiber,
  6121. !0,
  6122. queue
  6123. );
  6124. queue.dispatch = hook;
  6125. return [passthrough, hook];
  6126. },
  6127. useMemoCache: useMemoCache,
  6128. useCacheRefresh: function () {
  6129. return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
  6130. null,
  6131. currentlyRenderingFiber
  6132. ));
  6133. },
  6134. useEffectEvent: function (callback) {
  6135. var hook = mountWorkInProgressHook(),
  6136. ref = { impl: callback };
  6137. hook.memoizedState = ref;
  6138. return function () {
  6139. if (0 !== (executionContext & 2))
  6140. throw Error(formatProdErrorMessage(440));
  6141. return ref.impl.apply(void 0, arguments);
  6142. };
  6143. }
  6144. },
  6145. HooksDispatcherOnUpdate = {
  6146. readContext: readContext,
  6147. use: use,
  6148. useCallback: updateCallback,
  6149. useContext: readContext,
  6150. useEffect: updateEffect,
  6151. useImperativeHandle: updateImperativeHandle,
  6152. useInsertionEffect: updateInsertionEffect,
  6153. useLayoutEffect: updateLayoutEffect,
  6154. useMemo: updateMemo,
  6155. useReducer: updateReducer,
  6156. useRef: updateRef,
  6157. useState: function () {
  6158. return updateReducer(basicStateReducer);
  6159. },
  6160. useDebugValue: mountDebugValue,
  6161. useDeferredValue: function (value, initialValue) {
  6162. var hook = updateWorkInProgressHook();
  6163. return updateDeferredValueImpl(
  6164. hook,
  6165. currentHook.memoizedState,
  6166. value,
  6167. initialValue
  6168. );
  6169. },
  6170. useTransition: function () {
  6171. var booleanOrThenable = updateReducer(basicStateReducer)[0],
  6172. start = updateWorkInProgressHook().memoizedState;
  6173. return [
  6174. "boolean" === typeof booleanOrThenable
  6175. ? booleanOrThenable
  6176. : useThenable(booleanOrThenable),
  6177. start
  6178. ];
  6179. },
  6180. useSyncExternalStore: updateSyncExternalStore,
  6181. useId: updateId,
  6182. useHostTransitionStatus: useHostTransitionStatus,
  6183. useFormState: updateActionState,
  6184. useActionState: updateActionState,
  6185. useOptimistic: function (passthrough, reducer) {
  6186. var hook = updateWorkInProgressHook();
  6187. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  6188. },
  6189. useMemoCache: useMemoCache,
  6190. useCacheRefresh: updateRefresh
  6191. };
  6192. HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
  6193. var HooksDispatcherOnRerender = {
  6194. readContext: readContext,
  6195. use: use,
  6196. useCallback: updateCallback,
  6197. useContext: readContext,
  6198. useEffect: updateEffect,
  6199. useImperativeHandle: updateImperativeHandle,
  6200. useInsertionEffect: updateInsertionEffect,
  6201. useLayoutEffect: updateLayoutEffect,
  6202. useMemo: updateMemo,
  6203. useReducer: rerenderReducer,
  6204. useRef: updateRef,
  6205. useState: function () {
  6206. return rerenderReducer(basicStateReducer);
  6207. },
  6208. useDebugValue: mountDebugValue,
  6209. useDeferredValue: function (value, initialValue) {
  6210. var hook = updateWorkInProgressHook();
  6211. return null === currentHook
  6212. ? mountDeferredValueImpl(hook, value, initialValue)
  6213. : updateDeferredValueImpl(
  6214. hook,
  6215. currentHook.memoizedState,
  6216. value,
  6217. initialValue
  6218. );
  6219. },
  6220. useTransition: function () {
  6221. var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
  6222. start = updateWorkInProgressHook().memoizedState;
  6223. return [
  6224. "boolean" === typeof booleanOrThenable
  6225. ? booleanOrThenable
  6226. : useThenable(booleanOrThenable),
  6227. start
  6228. ];
  6229. },
  6230. useSyncExternalStore: updateSyncExternalStore,
  6231. useId: updateId,
  6232. useHostTransitionStatus: useHostTransitionStatus,
  6233. useFormState: rerenderActionState,
  6234. useActionState: rerenderActionState,
  6235. useOptimistic: function (passthrough, reducer) {
  6236. var hook = updateWorkInProgressHook();
  6237. if (null !== currentHook)
  6238. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  6239. hook.baseState = passthrough;
  6240. return [passthrough, hook.queue.dispatch];
  6241. },
  6242. useMemoCache: useMemoCache,
  6243. useCacheRefresh: updateRefresh
  6244. };
  6245. HooksDispatcherOnRerender.useEffectEvent = updateEvent;
  6246. function applyDerivedStateFromProps(
  6247. workInProgress,
  6248. ctor,
  6249. getDerivedStateFromProps,
  6250. nextProps
  6251. ) {
  6252. ctor = workInProgress.memoizedState;
  6253. getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
  6254. getDerivedStateFromProps =
  6255. null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
  6256. ? ctor
  6257. : assign({}, ctor, getDerivedStateFromProps);
  6258. workInProgress.memoizedState = getDerivedStateFromProps;
  6259. 0 === workInProgress.lanes &&
  6260. (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
  6261. }
  6262. var classComponentUpdater = {
  6263. enqueueSetState: function (inst, payload, callback) {
  6264. inst = inst._reactInternals;
  6265. var lane = requestUpdateLane(),
  6266. update = createUpdate(lane);
  6267. update.payload = payload;
  6268. void 0 !== callback && null !== callback && (update.callback = callback);
  6269. payload = enqueueUpdate(inst, update, lane);
  6270. null !== payload &&
  6271. (startUpdateTimerByLane(lane),
  6272. scheduleUpdateOnFiber(payload, inst, lane),
  6273. entangleTransitions(payload, inst, lane));
  6274. },
  6275. enqueueReplaceState: function (inst, payload, callback) {
  6276. inst = inst._reactInternals;
  6277. var lane = requestUpdateLane(),
  6278. update = createUpdate(lane);
  6279. update.tag = 1;
  6280. update.payload = payload;
  6281. void 0 !== callback && null !== callback && (update.callback = callback);
  6282. payload = enqueueUpdate(inst, update, lane);
  6283. null !== payload &&
  6284. (startUpdateTimerByLane(lane),
  6285. scheduleUpdateOnFiber(payload, inst, lane),
  6286. entangleTransitions(payload, inst, lane));
  6287. },
  6288. enqueueForceUpdate: function (inst, callback) {
  6289. inst = inst._reactInternals;
  6290. var lane = requestUpdateLane(),
  6291. update = createUpdate(lane);
  6292. update.tag = 2;
  6293. void 0 !== callback && null !== callback && (update.callback = callback);
  6294. callback = enqueueUpdate(inst, update, lane);
  6295. null !== callback &&
  6296. (startUpdateTimerByLane(lane),
  6297. scheduleUpdateOnFiber(callback, inst, lane),
  6298. entangleTransitions(callback, inst, lane));
  6299. }
  6300. };
  6301. function checkShouldComponentUpdate(
  6302. workInProgress,
  6303. ctor,
  6304. oldProps,
  6305. newProps,
  6306. oldState,
  6307. newState,
  6308. nextContext
  6309. ) {
  6310. workInProgress = workInProgress.stateNode;
  6311. return "function" === typeof workInProgress.shouldComponentUpdate
  6312. ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
  6313. : ctor.prototype && ctor.prototype.isPureReactComponent
  6314. ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
  6315. : !0;
  6316. }
  6317. function callComponentWillReceiveProps(
  6318. workInProgress,
  6319. instance,
  6320. newProps,
  6321. nextContext
  6322. ) {
  6323. workInProgress = instance.state;
  6324. "function" === typeof instance.componentWillReceiveProps &&
  6325. instance.componentWillReceiveProps(newProps, nextContext);
  6326. "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  6327. instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  6328. instance.state !== workInProgress &&
  6329. classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  6330. }
  6331. function resolveClassComponentProps(Component, baseProps) {
  6332. var newProps = baseProps;
  6333. if ("ref" in baseProps) {
  6334. newProps = {};
  6335. for (var propName in baseProps)
  6336. "ref" !== propName && (newProps[propName] = baseProps[propName]);
  6337. }
  6338. if ((Component = Component.defaultProps)) {
  6339. newProps === baseProps && (newProps = assign({}, newProps));
  6340. for (var propName$82 in Component)
  6341. void 0 === newProps[propName$82] &&
  6342. (newProps[propName$82] = Component[propName$82]);
  6343. }
  6344. return newProps;
  6345. }
  6346. function defaultOnUncaughtError(error) {
  6347. reportGlobalError(error);
  6348. }
  6349. function defaultOnCaughtError(error) {
  6350. console.error(error);
  6351. }
  6352. function defaultOnRecoverableError(error) {
  6353. reportGlobalError(error);
  6354. }
  6355. function logUncaughtError(root, errorInfo) {
  6356. try {
  6357. var onUncaughtError = root.onUncaughtError;
  6358. onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });
  6359. } catch (e$83) {
  6360. setTimeout(function () {
  6361. throw e$83;
  6362. });
  6363. }
  6364. }
  6365. function logCaughtError(root, boundary, errorInfo) {
  6366. try {
  6367. var onCaughtError = root.onCaughtError;
  6368. onCaughtError(errorInfo.value, {
  6369. componentStack: errorInfo.stack,
  6370. errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
  6371. });
  6372. } catch (e$84) {
  6373. setTimeout(function () {
  6374. throw e$84;
  6375. });
  6376. }
  6377. }
  6378. function createRootErrorUpdate(root, errorInfo, lane) {
  6379. lane = createUpdate(lane);
  6380. lane.tag = 3;
  6381. lane.payload = { element: null };
  6382. lane.callback = function () {
  6383. logUncaughtError(root, errorInfo);
  6384. };
  6385. return lane;
  6386. }
  6387. function createClassErrorUpdate(lane) {
  6388. lane = createUpdate(lane);
  6389. lane.tag = 3;
  6390. return lane;
  6391. }
  6392. function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
  6393. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  6394. if ("function" === typeof getDerivedStateFromError) {
  6395. var error = errorInfo.value;
  6396. update.payload = function () {
  6397. return getDerivedStateFromError(error);
  6398. };
  6399. update.callback = function () {
  6400. logCaughtError(root, fiber, errorInfo);
  6401. };
  6402. }
  6403. var inst = fiber.stateNode;
  6404. null !== inst &&
  6405. "function" === typeof inst.componentDidCatch &&
  6406. (update.callback = function () {
  6407. logCaughtError(root, fiber, errorInfo);
  6408. "function" !== typeof getDerivedStateFromError &&
  6409. (null === legacyErrorBoundariesThatAlreadyFailed
  6410. ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
  6411. : legacyErrorBoundariesThatAlreadyFailed.add(this));
  6412. var stack = errorInfo.stack;
  6413. this.componentDidCatch(errorInfo.value, {
  6414. componentStack: null !== stack ? stack : ""
  6415. });
  6416. });
  6417. }
  6418. function throwException(
  6419. root,
  6420. returnFiber,
  6421. sourceFiber,
  6422. value,
  6423. rootRenderLanes
  6424. ) {
  6425. sourceFiber.flags |= 32768;
  6426. isDevToolsPresent && restorePendingUpdaters(root, rootRenderLanes);
  6427. if (
  6428. null !== value &&
  6429. "object" === typeof value &&
  6430. "function" === typeof value.then
  6431. ) {
  6432. returnFiber = sourceFiber.alternate;
  6433. null !== returnFiber &&
  6434. propagateParentContextChanges(
  6435. returnFiber,
  6436. sourceFiber,
  6437. rootRenderLanes,
  6438. !0
  6439. );
  6440. sourceFiber = suspenseHandlerStackCursor.current;
  6441. if (null !== sourceFiber) {
  6442. switch (sourceFiber.tag) {
  6443. case 31:
  6444. case 13:
  6445. return (
  6446. null === shellBoundary
  6447. ? renderDidSuspendDelayIfPossible()
  6448. : null === sourceFiber.alternate &&
  6449. 0 === workInProgressRootExitStatus &&
  6450. (workInProgressRootExitStatus = 3),
  6451. (sourceFiber.flags &= -257),
  6452. (sourceFiber.flags |= 65536),
  6453. (sourceFiber.lanes = rootRenderLanes),
  6454. value === noopSuspenseyCommitThenable
  6455. ? (sourceFiber.flags |= 16384)
  6456. : ((returnFiber = sourceFiber.updateQueue),
  6457. null === returnFiber
  6458. ? (sourceFiber.updateQueue = new Set([value]))
  6459. : returnFiber.add(value),
  6460. attachPingListener(root, value, rootRenderLanes)),
  6461. !1
  6462. );
  6463. case 22:
  6464. return (
  6465. (sourceFiber.flags |= 65536),
  6466. value === noopSuspenseyCommitThenable
  6467. ? (sourceFiber.flags |= 16384)
  6468. : ((returnFiber = sourceFiber.updateQueue),
  6469. null === returnFiber
  6470. ? ((returnFiber = {
  6471. transitions: null,
  6472. markerInstances: null,
  6473. retryQueue: new Set([value])
  6474. }),
  6475. (sourceFiber.updateQueue = returnFiber))
  6476. : ((sourceFiber = returnFiber.retryQueue),
  6477. null === sourceFiber
  6478. ? (returnFiber.retryQueue = new Set([value]))
  6479. : sourceFiber.add(value)),
  6480. attachPingListener(root, value, rootRenderLanes)),
  6481. !1
  6482. );
  6483. }
  6484. throw Error(formatProdErrorMessage(435, sourceFiber.tag));
  6485. }
  6486. attachPingListener(root, value, rootRenderLanes);
  6487. renderDidSuspendDelayIfPossible();
  6488. return !1;
  6489. }
  6490. if (isHydrating)
  6491. return (
  6492. (returnFiber = suspenseHandlerStackCursor.current),
  6493. null !== returnFiber
  6494. ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),
  6495. (returnFiber.flags |= 65536),
  6496. (returnFiber.lanes = rootRenderLanes),
  6497. value !== HydrationMismatchException &&
  6498. ((root = Error(formatProdErrorMessage(422), { cause: value })),
  6499. queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))
  6500. : (value !== HydrationMismatchException &&
  6501. ((returnFiber = Error(formatProdErrorMessage(423), {
  6502. cause: value
  6503. })),
  6504. queueHydrationError(
  6505. createCapturedValueAtFiber(returnFiber, sourceFiber)
  6506. )),
  6507. (root = root.current.alternate),
  6508. (root.flags |= 65536),
  6509. (rootRenderLanes &= -rootRenderLanes),
  6510. (root.lanes |= rootRenderLanes),
  6511. (value = createCapturedValueAtFiber(value, sourceFiber)),
  6512. (rootRenderLanes = createRootErrorUpdate(
  6513. root.stateNode,
  6514. value,
  6515. rootRenderLanes
  6516. )),
  6517. enqueueCapturedUpdate(root, rootRenderLanes),
  6518. 4 !== workInProgressRootExitStatus &&
  6519. (workInProgressRootExitStatus = 2)),
  6520. !1
  6521. );
  6522. var wrapperError = Error(formatProdErrorMessage(520), { cause: value });
  6523. wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);
  6524. null === workInProgressRootConcurrentErrors
  6525. ? (workInProgressRootConcurrentErrors = [wrapperError])
  6526. : workInProgressRootConcurrentErrors.push(wrapperError);
  6527. 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);
  6528. if (null === returnFiber) return !0;
  6529. value = createCapturedValueAtFiber(value, sourceFiber);
  6530. sourceFiber = returnFiber;
  6531. do {
  6532. switch (sourceFiber.tag) {
  6533. case 3:
  6534. return (
  6535. (sourceFiber.flags |= 65536),
  6536. (root = rootRenderLanes & -rootRenderLanes),
  6537. (sourceFiber.lanes |= root),
  6538. (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),
  6539. enqueueCapturedUpdate(sourceFiber, root),
  6540. !1
  6541. );
  6542. case 1:
  6543. if (
  6544. ((returnFiber = sourceFiber.type),
  6545. (wrapperError = sourceFiber.stateNode),
  6546. 0 === (sourceFiber.flags & 128) &&
  6547. ("function" === typeof returnFiber.getDerivedStateFromError ||
  6548. (null !== wrapperError &&
  6549. "function" === typeof wrapperError.componentDidCatch &&
  6550. (null === legacyErrorBoundariesThatAlreadyFailed ||
  6551. !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))))
  6552. )
  6553. return (
  6554. (sourceFiber.flags |= 65536),
  6555. (rootRenderLanes &= -rootRenderLanes),
  6556. (sourceFiber.lanes |= rootRenderLanes),
  6557. (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),
  6558. initializeClassErrorUpdate(
  6559. rootRenderLanes,
  6560. root,
  6561. sourceFiber,
  6562. value
  6563. ),
  6564. enqueueCapturedUpdate(sourceFiber, rootRenderLanes),
  6565. !1
  6566. );
  6567. }
  6568. sourceFiber = sourceFiber.return;
  6569. } while (null !== sourceFiber);
  6570. return !1;
  6571. }
  6572. var SelectiveHydrationException = Error(formatProdErrorMessage(461)),
  6573. didReceiveUpdate = !1;
  6574. function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
  6575. workInProgress.child =
  6576. null === current
  6577. ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
  6578. : reconcileChildFibers(
  6579. workInProgress,
  6580. current.child,
  6581. nextChildren,
  6582. renderLanes
  6583. );
  6584. }
  6585. function updateForwardRef(
  6586. current,
  6587. workInProgress,
  6588. Component,
  6589. nextProps,
  6590. renderLanes
  6591. ) {
  6592. Component = Component.render;
  6593. var ref = workInProgress.ref;
  6594. if ("ref" in nextProps) {
  6595. var propsWithoutRef = {};
  6596. for (var key in nextProps)
  6597. "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
  6598. } else propsWithoutRef = nextProps;
  6599. prepareToReadContext(workInProgress);
  6600. nextProps = renderWithHooks(
  6601. current,
  6602. workInProgress,
  6603. Component,
  6604. propsWithoutRef,
  6605. ref,
  6606. renderLanes
  6607. );
  6608. key = checkDidRenderIdHook();
  6609. if (null !== current && !didReceiveUpdate)
  6610. return (
  6611. bailoutHooks(current, workInProgress, renderLanes),
  6612. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6613. );
  6614. isHydrating && key && pushMaterializedTreeId(workInProgress);
  6615. workInProgress.flags |= 1;
  6616. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  6617. return workInProgress.child;
  6618. }
  6619. function updateMemoComponent(
  6620. current,
  6621. workInProgress,
  6622. Component,
  6623. nextProps,
  6624. renderLanes
  6625. ) {
  6626. if (null === current) {
  6627. var type = Component.type;
  6628. if (
  6629. "function" === typeof type &&
  6630. !shouldConstruct(type) &&
  6631. void 0 === type.defaultProps &&
  6632. null === Component.compare
  6633. )
  6634. return (
  6635. (workInProgress.tag = 15),
  6636. (workInProgress.type = type),
  6637. updateSimpleMemoComponent(
  6638. current,
  6639. workInProgress,
  6640. type,
  6641. nextProps,
  6642. renderLanes
  6643. )
  6644. );
  6645. current = createFiberFromTypeAndProps(
  6646. Component.type,
  6647. null,
  6648. nextProps,
  6649. workInProgress,
  6650. workInProgress.mode,
  6651. renderLanes
  6652. );
  6653. current.ref = workInProgress.ref;
  6654. current.return = workInProgress;
  6655. return (workInProgress.child = current);
  6656. }
  6657. type = current.child;
  6658. if (!checkScheduledUpdateOrContext(current, renderLanes)) {
  6659. var prevProps = type.memoizedProps;
  6660. Component = Component.compare;
  6661. Component = null !== Component ? Component : shallowEqual;
  6662. if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)
  6663. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  6664. }
  6665. workInProgress.flags |= 1;
  6666. current = createWorkInProgress(type, nextProps);
  6667. current.ref = workInProgress.ref;
  6668. current.return = workInProgress;
  6669. return (workInProgress.child = current);
  6670. }
  6671. function updateSimpleMemoComponent(
  6672. current,
  6673. workInProgress,
  6674. Component,
  6675. nextProps,
  6676. renderLanes
  6677. ) {
  6678. if (null !== current) {
  6679. var prevProps = current.memoizedProps;
  6680. if (
  6681. shallowEqual(prevProps, nextProps) &&
  6682. current.ref === workInProgress.ref
  6683. )
  6684. if (
  6685. ((didReceiveUpdate = !1),
  6686. (workInProgress.pendingProps = nextProps = prevProps),
  6687. checkScheduledUpdateOrContext(current, renderLanes))
  6688. )
  6689. 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
  6690. else
  6691. return (
  6692. (workInProgress.lanes = current.lanes),
  6693. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6694. );
  6695. }
  6696. return updateFunctionComponent(
  6697. current,
  6698. workInProgress,
  6699. Component,
  6700. nextProps,
  6701. renderLanes
  6702. );
  6703. }
  6704. function updateOffscreenComponent(
  6705. current,
  6706. workInProgress,
  6707. renderLanes,
  6708. nextProps
  6709. ) {
  6710. var nextChildren = nextProps.children,
  6711. prevState = null !== current ? current.memoizedState : null;
  6712. null === current &&
  6713. null === workInProgress.stateNode &&
  6714. (workInProgress.stateNode = {
  6715. _visibility: 1,
  6716. _pendingMarkers: null,
  6717. _retryCache: null,
  6718. _transitions: null
  6719. });
  6720. if ("hidden" === nextProps.mode) {
  6721. if (0 !== (workInProgress.flags & 128)) {
  6722. prevState =
  6723. null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;
  6724. if (null !== current) {
  6725. nextProps = workInProgress.child = current.child;
  6726. for (nextChildren = 0; null !== nextProps; )
  6727. (nextChildren =
  6728. nextChildren | nextProps.lanes | nextProps.childLanes),
  6729. (nextProps = nextProps.sibling);
  6730. nextProps = nextChildren & ~prevState;
  6731. } else (nextProps = 0), (workInProgress.child = null);
  6732. return deferHiddenOffscreenComponent(
  6733. current,
  6734. workInProgress,
  6735. prevState,
  6736. renderLanes,
  6737. nextProps
  6738. );
  6739. }
  6740. if (0 !== (renderLanes & 536870912))
  6741. (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
  6742. null !== current &&
  6743. pushTransition(
  6744. workInProgress,
  6745. null !== prevState ? prevState.cachePool : null
  6746. ),
  6747. null !== prevState
  6748. ? pushHiddenContext(workInProgress, prevState)
  6749. : reuseHiddenContextOnStack(),
  6750. pushOffscreenSuspenseHandler(workInProgress);
  6751. else
  6752. return (
  6753. (nextProps = workInProgress.lanes = 536870912),
  6754. deferHiddenOffscreenComponent(
  6755. current,
  6756. workInProgress,
  6757. null !== prevState ? prevState.baseLanes | renderLanes : renderLanes,
  6758. renderLanes,
  6759. nextProps
  6760. )
  6761. );
  6762. } else
  6763. null !== prevState
  6764. ? (pushTransition(workInProgress, prevState.cachePool),
  6765. pushHiddenContext(workInProgress, prevState),
  6766. reuseSuspenseHandlerOnStack(workInProgress),
  6767. (workInProgress.memoizedState = null))
  6768. : (null !== current && pushTransition(workInProgress, null),
  6769. reuseHiddenContextOnStack(),
  6770. reuseSuspenseHandlerOnStack(workInProgress));
  6771. reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  6772. return workInProgress.child;
  6773. }
  6774. function bailoutOffscreenComponent(current, workInProgress) {
  6775. (null !== current && 22 === current.tag) ||
  6776. null !== workInProgress.stateNode ||
  6777. (workInProgress.stateNode = {
  6778. _visibility: 1,
  6779. _pendingMarkers: null,
  6780. _retryCache: null,
  6781. _transitions: null
  6782. });
  6783. return workInProgress.sibling;
  6784. }
  6785. function deferHiddenOffscreenComponent(
  6786. current,
  6787. workInProgress,
  6788. nextBaseLanes,
  6789. renderLanes,
  6790. remainingChildLanes
  6791. ) {
  6792. var JSCompiler_inline_result = peekCacheFromPool();
  6793. JSCompiler_inline_result =
  6794. null === JSCompiler_inline_result
  6795. ? null
  6796. : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };
  6797. workInProgress.memoizedState = {
  6798. baseLanes: nextBaseLanes,
  6799. cachePool: JSCompiler_inline_result
  6800. };
  6801. null !== current && pushTransition(workInProgress, null);
  6802. reuseHiddenContextOnStack();
  6803. pushOffscreenSuspenseHandler(workInProgress);
  6804. null !== current &&
  6805. propagateParentContextChanges(current, workInProgress, renderLanes, !0);
  6806. workInProgress.childLanes = remainingChildLanes;
  6807. return null;
  6808. }
  6809. function mountActivityChildren(workInProgress, nextProps) {
  6810. nextProps = mountWorkInProgressOffscreenFiber(
  6811. { mode: nextProps.mode, children: nextProps.children },
  6812. workInProgress.mode
  6813. );
  6814. nextProps.ref = workInProgress.ref;
  6815. workInProgress.child = nextProps;
  6816. nextProps.return = workInProgress;
  6817. return nextProps;
  6818. }
  6819. function retryActivityComponentWithoutHydrating(
  6820. current,
  6821. workInProgress,
  6822. renderLanes
  6823. ) {
  6824. reconcileChildFibers(workInProgress, current.child, null, renderLanes);
  6825. current = mountActivityChildren(workInProgress, workInProgress.pendingProps);
  6826. current.flags |= 2;
  6827. popSuspenseHandler(workInProgress);
  6828. workInProgress.memoizedState = null;
  6829. return current;
  6830. }
  6831. function updateActivityComponent(current, workInProgress, renderLanes) {
  6832. var nextProps = workInProgress.pendingProps,
  6833. didSuspend = 0 !== (workInProgress.flags & 128);
  6834. workInProgress.flags &= -129;
  6835. if (null === current) {
  6836. if (isHydrating) {
  6837. if ("hidden" === nextProps.mode)
  6838. return (
  6839. (current = mountActivityChildren(workInProgress, nextProps)),
  6840. (workInProgress.lanes = 536870912),
  6841. bailoutOffscreenComponent(null, current)
  6842. );
  6843. pushDehydratedActivitySuspenseHandler(workInProgress);
  6844. (current = nextHydratableInstance)
  6845. ? ((current = canHydrateHydrationBoundary(
  6846. current,
  6847. rootOrSingletonContext
  6848. )),
  6849. (current = null !== current && "&" === current.data ? current : null),
  6850. null !== current &&
  6851. ((workInProgress.memoizedState = {
  6852. dehydrated: current,
  6853. treeContext:
  6854. null !== treeContextProvider
  6855. ? { id: treeContextId, overflow: treeContextOverflow }
  6856. : null,
  6857. retryLane: 536870912,
  6858. hydrationErrors: null
  6859. }),
  6860. (renderLanes = createFiberFromDehydratedFragment(current)),
  6861. (renderLanes.return = workInProgress),
  6862. (workInProgress.child = renderLanes),
  6863. (hydrationParentFiber = workInProgress),
  6864. (nextHydratableInstance = null)))
  6865. : (current = null);
  6866. if (null === current) throw throwOnHydrationMismatch(workInProgress);
  6867. workInProgress.lanes = 536870912;
  6868. return null;
  6869. }
  6870. return mountActivityChildren(workInProgress, nextProps);
  6871. }
  6872. var prevState = current.memoizedState;
  6873. if (null !== prevState) {
  6874. var dehydrated = prevState.dehydrated;
  6875. pushDehydratedActivitySuspenseHandler(workInProgress);
  6876. if (didSuspend)
  6877. if (workInProgress.flags & 256)
  6878. (workInProgress.flags &= -257),
  6879. (workInProgress = retryActivityComponentWithoutHydrating(
  6880. current,
  6881. workInProgress,
  6882. renderLanes
  6883. ));
  6884. else if (null !== workInProgress.memoizedState)
  6885. (workInProgress.child = current.child),
  6886. (workInProgress.flags |= 128),
  6887. (workInProgress = null);
  6888. else throw Error(formatProdErrorMessage(558));
  6889. else if (
  6890. (didReceiveUpdate ||
  6891. propagateParentContextChanges(current, workInProgress, renderLanes, !1),
  6892. (didSuspend = 0 !== (renderLanes & current.childLanes)),
  6893. didReceiveUpdate || didSuspend)
  6894. ) {
  6895. nextProps = workInProgressRoot;
  6896. if (
  6897. null !== nextProps &&
  6898. ((dehydrated = getBumpedLaneForHydration(nextProps, renderLanes)),
  6899. 0 !== dehydrated && dehydrated !== prevState.retryLane)
  6900. )
  6901. throw (
  6902. ((prevState.retryLane = dehydrated),
  6903. enqueueConcurrentRenderForLane(current, dehydrated),
  6904. scheduleUpdateOnFiber(nextProps, current, dehydrated),
  6905. SelectiveHydrationException)
  6906. );
  6907. renderDidSuspendDelayIfPossible();
  6908. workInProgress = retryActivityComponentWithoutHydrating(
  6909. current,
  6910. workInProgress,
  6911. renderLanes
  6912. );
  6913. } else
  6914. (current = prevState.treeContext),
  6915. (nextHydratableInstance = getNextHydratable(dehydrated.nextSibling)),
  6916. (hydrationParentFiber = workInProgress),
  6917. (isHydrating = !0),
  6918. (hydrationErrors = null),
  6919. (rootOrSingletonContext = !1),
  6920. null !== current &&
  6921. restoreSuspendedTreeContext(workInProgress, current),
  6922. (workInProgress = mountActivityChildren(workInProgress, nextProps)),
  6923. (workInProgress.flags |= 4096);
  6924. return workInProgress;
  6925. }
  6926. current = createWorkInProgress(current.child, {
  6927. mode: nextProps.mode,
  6928. children: nextProps.children
  6929. });
  6930. current.ref = workInProgress.ref;
  6931. workInProgress.child = current;
  6932. current.return = workInProgress;
  6933. return current;
  6934. }
  6935. function markRef(current, workInProgress) {
  6936. var ref = workInProgress.ref;
  6937. if (null === ref)
  6938. null !== current &&
  6939. null !== current.ref &&
  6940. (workInProgress.flags |= 4194816);
  6941. else {
  6942. if ("function" !== typeof ref && "object" !== typeof ref)
  6943. throw Error(formatProdErrorMessage(284));
  6944. if (null === current || current.ref !== ref)
  6945. workInProgress.flags |= 4194816;
  6946. }
  6947. }
  6948. function updateFunctionComponent(
  6949. current,
  6950. workInProgress,
  6951. Component,
  6952. nextProps,
  6953. renderLanes
  6954. ) {
  6955. prepareToReadContext(workInProgress);
  6956. Component = renderWithHooks(
  6957. current,
  6958. workInProgress,
  6959. Component,
  6960. nextProps,
  6961. void 0,
  6962. renderLanes
  6963. );
  6964. nextProps = checkDidRenderIdHook();
  6965. if (null !== current && !didReceiveUpdate)
  6966. return (
  6967. bailoutHooks(current, workInProgress, renderLanes),
  6968. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6969. );
  6970. isHydrating && nextProps && pushMaterializedTreeId(workInProgress);
  6971. workInProgress.flags |= 1;
  6972. reconcileChildren(current, workInProgress, Component, renderLanes);
  6973. return workInProgress.child;
  6974. }
  6975. function replayFunctionComponent(
  6976. current,
  6977. workInProgress,
  6978. nextProps,
  6979. Component,
  6980. secondArg,
  6981. renderLanes
  6982. ) {
  6983. prepareToReadContext(workInProgress);
  6984. workInProgress.updateQueue = null;
  6985. nextProps = renderWithHooksAgain(
  6986. workInProgress,
  6987. Component,
  6988. nextProps,
  6989. secondArg
  6990. );
  6991. finishRenderingHooks(current);
  6992. Component = checkDidRenderIdHook();
  6993. if (null !== current && !didReceiveUpdate)
  6994. return (
  6995. bailoutHooks(current, workInProgress, renderLanes),
  6996. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6997. );
  6998. isHydrating && Component && pushMaterializedTreeId(workInProgress);
  6999. workInProgress.flags |= 1;
  7000. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  7001. return workInProgress.child;
  7002. }
  7003. function updateClassComponent(
  7004. current,
  7005. workInProgress,
  7006. Component,
  7007. nextProps,
  7008. renderLanes
  7009. ) {
  7010. prepareToReadContext(workInProgress);
  7011. if (null === workInProgress.stateNode) {
  7012. var context = emptyContextObject,
  7013. contextType = Component.contextType;
  7014. "object" === typeof contextType &&
  7015. null !== contextType &&
  7016. (context = readContext(contextType));
  7017. context = new Component(nextProps, context);
  7018. workInProgress.memoizedState =
  7019. null !== context.state && void 0 !== context.state ? context.state : null;
  7020. context.updater = classComponentUpdater;
  7021. workInProgress.stateNode = context;
  7022. context._reactInternals = workInProgress;
  7023. context = workInProgress.stateNode;
  7024. context.props = nextProps;
  7025. context.state = workInProgress.memoizedState;
  7026. context.refs = {};
  7027. initializeUpdateQueue(workInProgress);
  7028. contextType = Component.contextType;
  7029. context.context =
  7030. "object" === typeof contextType && null !== contextType
  7031. ? readContext(contextType)
  7032. : emptyContextObject;
  7033. context.state = workInProgress.memoizedState;
  7034. contextType = Component.getDerivedStateFromProps;
  7035. "function" === typeof contextType &&
  7036. (applyDerivedStateFromProps(
  7037. workInProgress,
  7038. Component,
  7039. contextType,
  7040. nextProps
  7041. ),
  7042. (context.state = workInProgress.memoizedState));
  7043. "function" === typeof Component.getDerivedStateFromProps ||
  7044. "function" === typeof context.getSnapshotBeforeUpdate ||
  7045. ("function" !== typeof context.UNSAFE_componentWillMount &&
  7046. "function" !== typeof context.componentWillMount) ||
  7047. ((contextType = context.state),
  7048. "function" === typeof context.componentWillMount &&
  7049. context.componentWillMount(),
  7050. "function" === typeof context.UNSAFE_componentWillMount &&
  7051. context.UNSAFE_componentWillMount(),
  7052. contextType !== context.state &&
  7053. classComponentUpdater.enqueueReplaceState(context, context.state, null),
  7054. processUpdateQueue(workInProgress, nextProps, context, renderLanes),
  7055. suspendIfUpdateReadFromEntangledAsyncAction(),
  7056. (context.state = workInProgress.memoizedState));
  7057. "function" === typeof context.componentDidMount &&
  7058. (workInProgress.flags |= 4194308);
  7059. nextProps = !0;
  7060. } else if (null === current) {
  7061. context = workInProgress.stateNode;
  7062. var unresolvedOldProps = workInProgress.memoizedProps,
  7063. oldProps = resolveClassComponentProps(Component, unresolvedOldProps);
  7064. context.props = oldProps;
  7065. var oldContext = context.context,
  7066. contextType$jscomp$0 = Component.contextType;
  7067. contextType = emptyContextObject;
  7068. "object" === typeof contextType$jscomp$0 &&
  7069. null !== contextType$jscomp$0 &&
  7070. (contextType = readContext(contextType$jscomp$0));
  7071. var getDerivedStateFromProps = Component.getDerivedStateFromProps;
  7072. contextType$jscomp$0 =
  7073. "function" === typeof getDerivedStateFromProps ||
  7074. "function" === typeof context.getSnapshotBeforeUpdate;
  7075. unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;
  7076. contextType$jscomp$0 ||
  7077. ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
  7078. "function" !== typeof context.componentWillReceiveProps) ||
  7079. ((unresolvedOldProps || oldContext !== contextType) &&
  7080. callComponentWillReceiveProps(
  7081. workInProgress,
  7082. context,
  7083. nextProps,
  7084. contextType
  7085. ));
  7086. hasForceUpdate = !1;
  7087. var oldState = workInProgress.memoizedState;
  7088. context.state = oldState;
  7089. processUpdateQueue(workInProgress, nextProps, context, renderLanes);
  7090. suspendIfUpdateReadFromEntangledAsyncAction();
  7091. oldContext = workInProgress.memoizedState;
  7092. unresolvedOldProps || oldState !== oldContext || hasForceUpdate
  7093. ? ("function" === typeof getDerivedStateFromProps &&
  7094. (applyDerivedStateFromProps(
  7095. workInProgress,
  7096. Component,
  7097. getDerivedStateFromProps,
  7098. nextProps
  7099. ),
  7100. (oldContext = workInProgress.memoizedState)),
  7101. (oldProps =
  7102. hasForceUpdate ||
  7103. checkShouldComponentUpdate(
  7104. workInProgress,
  7105. Component,
  7106. oldProps,
  7107. nextProps,
  7108. oldState,
  7109. oldContext,
  7110. contextType
  7111. ))
  7112. ? (contextType$jscomp$0 ||
  7113. ("function" !== typeof context.UNSAFE_componentWillMount &&
  7114. "function" !== typeof context.componentWillMount) ||
  7115. ("function" === typeof context.componentWillMount &&
  7116. context.componentWillMount(),
  7117. "function" === typeof context.UNSAFE_componentWillMount &&
  7118. context.UNSAFE_componentWillMount()),
  7119. "function" === typeof context.componentDidMount &&
  7120. (workInProgress.flags |= 4194308))
  7121. : ("function" === typeof context.componentDidMount &&
  7122. (workInProgress.flags |= 4194308),
  7123. (workInProgress.memoizedProps = nextProps),
  7124. (workInProgress.memoizedState = oldContext)),
  7125. (context.props = nextProps),
  7126. (context.state = oldContext),
  7127. (context.context = contextType),
  7128. (nextProps = oldProps))
  7129. : ("function" === typeof context.componentDidMount &&
  7130. (workInProgress.flags |= 4194308),
  7131. (nextProps = !1));
  7132. } else {
  7133. context = workInProgress.stateNode;
  7134. cloneUpdateQueue(current, workInProgress);
  7135. contextType = workInProgress.memoizedProps;
  7136. contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);
  7137. context.props = contextType$jscomp$0;
  7138. getDerivedStateFromProps = workInProgress.pendingProps;
  7139. oldState = context.context;
  7140. oldContext = Component.contextType;
  7141. oldProps = emptyContextObject;
  7142. "object" === typeof oldContext &&
  7143. null !== oldContext &&
  7144. (oldProps = readContext(oldContext));
  7145. unresolvedOldProps = Component.getDerivedStateFromProps;
  7146. (oldContext =
  7147. "function" === typeof unresolvedOldProps ||
  7148. "function" === typeof context.getSnapshotBeforeUpdate) ||
  7149. ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
  7150. "function" !== typeof context.componentWillReceiveProps) ||
  7151. ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&
  7152. callComponentWillReceiveProps(
  7153. workInProgress,
  7154. context,
  7155. nextProps,
  7156. oldProps
  7157. ));
  7158. hasForceUpdate = !1;
  7159. oldState = workInProgress.memoizedState;
  7160. context.state = oldState;
  7161. processUpdateQueue(workInProgress, nextProps, context, renderLanes);
  7162. suspendIfUpdateReadFromEntangledAsyncAction();
  7163. var newState = workInProgress.memoizedState;
  7164. contextType !== getDerivedStateFromProps ||
  7165. oldState !== newState ||
  7166. hasForceUpdate ||
  7167. (null !== current &&
  7168. null !== current.dependencies &&
  7169. checkIfContextChanged(current.dependencies))
  7170. ? ("function" === typeof unresolvedOldProps &&
  7171. (applyDerivedStateFromProps(
  7172. workInProgress,
  7173. Component,
  7174. unresolvedOldProps,
  7175. nextProps
  7176. ),
  7177. (newState = workInProgress.memoizedState)),
  7178. (contextType$jscomp$0 =
  7179. hasForceUpdate ||
  7180. checkShouldComponentUpdate(
  7181. workInProgress,
  7182. Component,
  7183. contextType$jscomp$0,
  7184. nextProps,
  7185. oldState,
  7186. newState,
  7187. oldProps
  7188. ) ||
  7189. (null !== current &&
  7190. null !== current.dependencies &&
  7191. checkIfContextChanged(current.dependencies)))
  7192. ? (oldContext ||
  7193. ("function" !== typeof context.UNSAFE_componentWillUpdate &&
  7194. "function" !== typeof context.componentWillUpdate) ||
  7195. ("function" === typeof context.componentWillUpdate &&
  7196. context.componentWillUpdate(nextProps, newState, oldProps),
  7197. "function" === typeof context.UNSAFE_componentWillUpdate &&
  7198. context.UNSAFE_componentWillUpdate(
  7199. nextProps,
  7200. newState,
  7201. oldProps
  7202. )),
  7203. "function" === typeof context.componentDidUpdate &&
  7204. (workInProgress.flags |= 4),
  7205. "function" === typeof context.getSnapshotBeforeUpdate &&
  7206. (workInProgress.flags |= 1024))
  7207. : ("function" !== typeof context.componentDidUpdate ||
  7208. (contextType === current.memoizedProps &&
  7209. oldState === current.memoizedState) ||
  7210. (workInProgress.flags |= 4),
  7211. "function" !== typeof context.getSnapshotBeforeUpdate ||
  7212. (contextType === current.memoizedProps &&
  7213. oldState === current.memoizedState) ||
  7214. (workInProgress.flags |= 1024),
  7215. (workInProgress.memoizedProps = nextProps),
  7216. (workInProgress.memoizedState = newState)),
  7217. (context.props = nextProps),
  7218. (context.state = newState),
  7219. (context.context = oldProps),
  7220. (nextProps = contextType$jscomp$0))
  7221. : ("function" !== typeof context.componentDidUpdate ||
  7222. (contextType === current.memoizedProps &&
  7223. oldState === current.memoizedState) ||
  7224. (workInProgress.flags |= 4),
  7225. "function" !== typeof context.getSnapshotBeforeUpdate ||
  7226. (contextType === current.memoizedProps &&
  7227. oldState === current.memoizedState) ||
  7228. (workInProgress.flags |= 1024),
  7229. (nextProps = !1));
  7230. }
  7231. context = nextProps;
  7232. markRef(current, workInProgress);
  7233. nextProps = 0 !== (workInProgress.flags & 128);
  7234. context || nextProps
  7235. ? ((context = workInProgress.stateNode),
  7236. nextProps && "function" !== typeof Component.getDerivedStateFromError
  7237. ? ((Component = null), (profilerStartTime = -1))
  7238. : (Component = context.render()),
  7239. (workInProgress.flags |= 1),
  7240. null !== current && nextProps
  7241. ? ((workInProgress.child = reconcileChildFibers(
  7242. workInProgress,
  7243. current.child,
  7244. null,
  7245. renderLanes
  7246. )),
  7247. (workInProgress.child = reconcileChildFibers(
  7248. workInProgress,
  7249. null,
  7250. Component,
  7251. renderLanes
  7252. )))
  7253. : reconcileChildren(current, workInProgress, Component, renderLanes),
  7254. (workInProgress.memoizedState = context.state),
  7255. (current = workInProgress.child))
  7256. : (current = bailoutOnAlreadyFinishedWork(
  7257. current,
  7258. workInProgress,
  7259. renderLanes
  7260. ));
  7261. return current;
  7262. }
  7263. function mountHostRootWithoutHydrating(
  7264. current,
  7265. workInProgress,
  7266. nextChildren,
  7267. renderLanes
  7268. ) {
  7269. resetHydrationState();
  7270. workInProgress.flags |= 256;
  7271. reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  7272. return workInProgress.child;
  7273. }
  7274. var SUSPENDED_MARKER = {
  7275. dehydrated: null,
  7276. treeContext: null,
  7277. retryLane: 0,
  7278. hydrationErrors: null
  7279. };
  7280. function mountSuspenseOffscreenState(renderLanes) {
  7281. return { baseLanes: renderLanes, cachePool: getSuspendedCache() };
  7282. }
  7283. function getRemainingWorkInPrimaryTree(
  7284. current,
  7285. primaryTreeDidDefer,
  7286. renderLanes
  7287. ) {
  7288. current = null !== current ? current.childLanes & ~renderLanes : 0;
  7289. primaryTreeDidDefer && (current |= workInProgressDeferredLane);
  7290. return current;
  7291. }
  7292. function updateSuspenseComponent(current, workInProgress, renderLanes) {
  7293. var nextProps = workInProgress.pendingProps,
  7294. showFallback = !1,
  7295. didSuspend = 0 !== (workInProgress.flags & 128),
  7296. JSCompiler_temp;
  7297. (JSCompiler_temp = didSuspend) ||
  7298. (JSCompiler_temp =
  7299. null !== current && null === current.memoizedState
  7300. ? !1
  7301. : 0 !== (suspenseStackCursor.current & 2));
  7302. JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));
  7303. JSCompiler_temp = 0 !== (workInProgress.flags & 32);
  7304. workInProgress.flags &= -33;
  7305. if (null === current) {
  7306. if (isHydrating) {
  7307. showFallback
  7308. ? pushPrimaryTreeSuspenseHandler(workInProgress)
  7309. : reuseSuspenseHandlerOnStack(workInProgress);
  7310. (current = nextHydratableInstance)
  7311. ? ((current = canHydrateHydrationBoundary(
  7312. current,
  7313. rootOrSingletonContext
  7314. )),
  7315. (current = null !== current && "&" !== current.data ? current : null),
  7316. null !== current &&
  7317. ((workInProgress.memoizedState = {
  7318. dehydrated: current,
  7319. treeContext:
  7320. null !== treeContextProvider
  7321. ? { id: treeContextId, overflow: treeContextOverflow }
  7322. : null,
  7323. retryLane: 536870912,
  7324. hydrationErrors: null
  7325. }),
  7326. (renderLanes = createFiberFromDehydratedFragment(current)),
  7327. (renderLanes.return = workInProgress),
  7328. (workInProgress.child = renderLanes),
  7329. (hydrationParentFiber = workInProgress),
  7330. (nextHydratableInstance = null)))
  7331. : (current = null);
  7332. if (null === current) throw throwOnHydrationMismatch(workInProgress);
  7333. isSuspenseInstanceFallback(current)
  7334. ? (workInProgress.lanes = 32)
  7335. : (workInProgress.lanes = 536870912);
  7336. return null;
  7337. }
  7338. var nextPrimaryChildren = nextProps.children;
  7339. nextProps = nextProps.fallback;
  7340. if (showFallback)
  7341. return (
  7342. reuseSuspenseHandlerOnStack(workInProgress),
  7343. (showFallback = workInProgress.mode),
  7344. (nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
  7345. { mode: "hidden", children: nextPrimaryChildren },
  7346. showFallback
  7347. )),
  7348. (nextProps = createFiberFromFragment(
  7349. nextProps,
  7350. showFallback,
  7351. renderLanes,
  7352. null
  7353. )),
  7354. (nextPrimaryChildren.return = workInProgress),
  7355. (nextProps.return = workInProgress),
  7356. (nextPrimaryChildren.sibling = nextProps),
  7357. (workInProgress.child = nextPrimaryChildren),
  7358. (nextProps = workInProgress.child),
  7359. (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),
  7360. (nextProps.childLanes = getRemainingWorkInPrimaryTree(
  7361. current,
  7362. JSCompiler_temp,
  7363. renderLanes
  7364. )),
  7365. (workInProgress.memoizedState = SUSPENDED_MARKER),
  7366. bailoutOffscreenComponent(null, nextProps)
  7367. );
  7368. pushPrimaryTreeSuspenseHandler(workInProgress);
  7369. return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);
  7370. }
  7371. var prevState = current.memoizedState;
  7372. if (
  7373. null !== prevState &&
  7374. ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren)
  7375. ) {
  7376. if (didSuspend)
  7377. workInProgress.flags & 256
  7378. ? (pushPrimaryTreeSuspenseHandler(workInProgress),
  7379. (workInProgress.flags &= -257),
  7380. (workInProgress = retrySuspenseComponentWithoutHydrating(
  7381. current,
  7382. workInProgress,
  7383. renderLanes
  7384. )))
  7385. : null !== workInProgress.memoizedState
  7386. ? (reuseSuspenseHandlerOnStack(workInProgress),
  7387. (workInProgress.child = current.child),
  7388. (workInProgress.flags |= 128),
  7389. (workInProgress = null))
  7390. : (reuseSuspenseHandlerOnStack(workInProgress),
  7391. (nextPrimaryChildren = nextProps.fallback),
  7392. (showFallback = workInProgress.mode),
  7393. (nextProps = mountWorkInProgressOffscreenFiber(
  7394. { mode: "visible", children: nextProps.children },
  7395. showFallback
  7396. )),
  7397. (nextPrimaryChildren = createFiberFromFragment(
  7398. nextPrimaryChildren,
  7399. showFallback,
  7400. renderLanes,
  7401. null
  7402. )),
  7403. (nextPrimaryChildren.flags |= 2),
  7404. (nextProps.return = workInProgress),
  7405. (nextPrimaryChildren.return = workInProgress),
  7406. (nextProps.sibling = nextPrimaryChildren),
  7407. (workInProgress.child = nextProps),
  7408. reconcileChildFibers(
  7409. workInProgress,
  7410. current.child,
  7411. null,
  7412. renderLanes
  7413. ),
  7414. (nextProps = workInProgress.child),
  7415. (nextProps.memoizedState =
  7416. mountSuspenseOffscreenState(renderLanes)),
  7417. (nextProps.childLanes = getRemainingWorkInPrimaryTree(
  7418. current,
  7419. JSCompiler_temp,
  7420. renderLanes
  7421. )),
  7422. (workInProgress.memoizedState = SUSPENDED_MARKER),
  7423. (workInProgress = bailoutOffscreenComponent(null, nextProps)));
  7424. else if (
  7425. (pushPrimaryTreeSuspenseHandler(workInProgress),
  7426. isSuspenseInstanceFallback(nextPrimaryChildren))
  7427. ) {
  7428. JSCompiler_temp =
  7429. nextPrimaryChildren.nextSibling &&
  7430. nextPrimaryChildren.nextSibling.dataset;
  7431. if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;
  7432. JSCompiler_temp = digest;
  7433. nextProps = Error(formatProdErrorMessage(419));
  7434. nextProps.stack = "";
  7435. nextProps.digest = JSCompiler_temp;
  7436. queueHydrationError({ value: nextProps, source: null, stack: null });
  7437. workInProgress = retrySuspenseComponentWithoutHydrating(
  7438. current,
  7439. workInProgress,
  7440. renderLanes
  7441. );
  7442. } else if (
  7443. (didReceiveUpdate ||
  7444. propagateParentContextChanges(current, workInProgress, renderLanes, !1),
  7445. (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),
  7446. didReceiveUpdate || JSCompiler_temp)
  7447. ) {
  7448. JSCompiler_temp = workInProgressRoot;
  7449. if (
  7450. null !== JSCompiler_temp &&
  7451. ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),
  7452. 0 !== nextProps && nextProps !== prevState.retryLane)
  7453. )
  7454. throw (
  7455. ((prevState.retryLane = nextProps),
  7456. enqueueConcurrentRenderForLane(current, nextProps),
  7457. scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
  7458. SelectiveHydrationException)
  7459. );
  7460. isSuspenseInstancePending(nextPrimaryChildren) ||
  7461. renderDidSuspendDelayIfPossible();
  7462. workInProgress = retrySuspenseComponentWithoutHydrating(
  7463. current,
  7464. workInProgress,
  7465. renderLanes
  7466. );
  7467. } else
  7468. isSuspenseInstancePending(nextPrimaryChildren)
  7469. ? ((workInProgress.flags |= 192),
  7470. (workInProgress.child = current.child),
  7471. (workInProgress = null))
  7472. : ((current = prevState.treeContext),
  7473. (nextHydratableInstance = getNextHydratable(
  7474. nextPrimaryChildren.nextSibling
  7475. )),
  7476. (hydrationParentFiber = workInProgress),
  7477. (isHydrating = !0),
  7478. (hydrationErrors = null),
  7479. (rootOrSingletonContext = !1),
  7480. null !== current &&
  7481. restoreSuspendedTreeContext(workInProgress, current),
  7482. (workInProgress = mountSuspensePrimaryChildren(
  7483. workInProgress,
  7484. nextProps.children
  7485. )),
  7486. (workInProgress.flags |= 4096));
  7487. return workInProgress;
  7488. }
  7489. if (showFallback)
  7490. return (
  7491. reuseSuspenseHandlerOnStack(workInProgress),
  7492. (nextPrimaryChildren = nextProps.fallback),
  7493. (showFallback = workInProgress.mode),
  7494. (prevState = current.child),
  7495. (digest = prevState.sibling),
  7496. (nextProps = createWorkInProgress(prevState, {
  7497. mode: "hidden",
  7498. children: nextProps.children
  7499. })),
  7500. (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712),
  7501. null !== digest
  7502. ? (nextPrimaryChildren = createWorkInProgress(
  7503. digest,
  7504. nextPrimaryChildren
  7505. ))
  7506. : ((nextPrimaryChildren = createFiberFromFragment(
  7507. nextPrimaryChildren,
  7508. showFallback,
  7509. renderLanes,
  7510. null
  7511. )),
  7512. (nextPrimaryChildren.flags |= 2)),
  7513. (nextPrimaryChildren.return = workInProgress),
  7514. (nextProps.return = workInProgress),
  7515. (nextProps.sibling = nextPrimaryChildren),
  7516. (workInProgress.child = nextProps),
  7517. bailoutOffscreenComponent(null, nextProps),
  7518. (nextProps = workInProgress.child),
  7519. (nextPrimaryChildren = current.child.memoizedState),
  7520. null === nextPrimaryChildren
  7521. ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
  7522. : ((showFallback = nextPrimaryChildren.cachePool),
  7523. null !== showFallback
  7524. ? ((prevState = CacheContext._currentValue),
  7525. (showFallback =
  7526. showFallback.parent !== prevState
  7527. ? { parent: prevState, pool: prevState }
  7528. : showFallback))
  7529. : (showFallback = getSuspendedCache()),
  7530. (nextPrimaryChildren = {
  7531. baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
  7532. cachePool: showFallback
  7533. })),
  7534. (nextProps.memoizedState = nextPrimaryChildren),
  7535. (nextProps.childLanes = getRemainingWorkInPrimaryTree(
  7536. current,
  7537. JSCompiler_temp,
  7538. renderLanes
  7539. )),
  7540. (workInProgress.memoizedState = SUSPENDED_MARKER),
  7541. bailoutOffscreenComponent(current.child, nextProps)
  7542. );
  7543. pushPrimaryTreeSuspenseHandler(workInProgress);
  7544. renderLanes = current.child;
  7545. current = renderLanes.sibling;
  7546. renderLanes = createWorkInProgress(renderLanes, {
  7547. mode: "visible",
  7548. children: nextProps.children
  7549. });
  7550. renderLanes.return = workInProgress;
  7551. renderLanes.sibling = null;
  7552. null !== current &&
  7553. ((JSCompiler_temp = workInProgress.deletions),
  7554. null === JSCompiler_temp
  7555. ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))
  7556. : JSCompiler_temp.push(current));
  7557. workInProgress.child = renderLanes;
  7558. workInProgress.memoizedState = null;
  7559. return renderLanes;
  7560. }
  7561. function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
  7562. primaryChildren = mountWorkInProgressOffscreenFiber(
  7563. { mode: "visible", children: primaryChildren },
  7564. workInProgress.mode
  7565. );
  7566. primaryChildren.return = workInProgress;
  7567. return (workInProgress.child = primaryChildren);
  7568. }
  7569. function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
  7570. offscreenProps = createFiberImplClass(22, offscreenProps, null, mode);
  7571. offscreenProps.lanes = 0;
  7572. return offscreenProps;
  7573. }
  7574. function retrySuspenseComponentWithoutHydrating(
  7575. current,
  7576. workInProgress,
  7577. renderLanes
  7578. ) {
  7579. reconcileChildFibers(workInProgress, current.child, null, renderLanes);
  7580. current = mountSuspensePrimaryChildren(
  7581. workInProgress,
  7582. workInProgress.pendingProps.children
  7583. );
  7584. current.flags |= 2;
  7585. workInProgress.memoizedState = null;
  7586. return current;
  7587. }
  7588. function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
  7589. fiber.lanes |= renderLanes;
  7590. var alternate = fiber.alternate;
  7591. null !== alternate && (alternate.lanes |= renderLanes);
  7592. scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
  7593. }
  7594. function initSuspenseListRenderState(
  7595. workInProgress,
  7596. isBackwards,
  7597. tail,
  7598. lastContentRow,
  7599. tailMode,
  7600. treeForkCount
  7601. ) {
  7602. var renderState = workInProgress.memoizedState;
  7603. null === renderState
  7604. ? (workInProgress.memoizedState = {
  7605. isBackwards: isBackwards,
  7606. rendering: null,
  7607. renderingStartTime: 0,
  7608. last: lastContentRow,
  7609. tail: tail,
  7610. tailMode: tailMode,
  7611. treeForkCount: treeForkCount
  7612. })
  7613. : ((renderState.isBackwards = isBackwards),
  7614. (renderState.rendering = null),
  7615. (renderState.renderingStartTime = 0),
  7616. (renderState.last = lastContentRow),
  7617. (renderState.tail = tail),
  7618. (renderState.tailMode = tailMode),
  7619. (renderState.treeForkCount = treeForkCount));
  7620. }
  7621. function updateSuspenseListComponent(current, workInProgress, renderLanes) {
  7622. var nextProps = workInProgress.pendingProps,
  7623. revealOrder = nextProps.revealOrder,
  7624. tailMode = nextProps.tail;
  7625. nextProps = nextProps.children;
  7626. var suspenseContext = suspenseStackCursor.current,
  7627. shouldForceFallback = 0 !== (suspenseContext & 2);
  7628. shouldForceFallback
  7629. ? ((suspenseContext = (suspenseContext & 1) | 2),
  7630. (workInProgress.flags |= 128))
  7631. : (suspenseContext &= 1);
  7632. push(suspenseStackCursor, suspenseContext);
  7633. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  7634. nextProps = isHydrating ? treeForkCount : 0;
  7635. if (!shouldForceFallback && null !== current && 0 !== (current.flags & 128))
  7636. a: for (current = workInProgress.child; null !== current; ) {
  7637. if (13 === current.tag)
  7638. null !== current.memoizedState &&
  7639. scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
  7640. else if (19 === current.tag)
  7641. scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
  7642. else if (null !== current.child) {
  7643. current.child.return = current;
  7644. current = current.child;
  7645. continue;
  7646. }
  7647. if (current === workInProgress) break a;
  7648. for (; null === current.sibling; ) {
  7649. if (null === current.return || current.return === workInProgress)
  7650. break a;
  7651. current = current.return;
  7652. }
  7653. current.sibling.return = current.return;
  7654. current = current.sibling;
  7655. }
  7656. switch (revealOrder) {
  7657. case "forwards":
  7658. renderLanes = workInProgress.child;
  7659. for (revealOrder = null; null !== renderLanes; )
  7660. (current = renderLanes.alternate),
  7661. null !== current &&
  7662. null === findFirstSuspended(current) &&
  7663. (revealOrder = renderLanes),
  7664. (renderLanes = renderLanes.sibling);
  7665. renderLanes = revealOrder;
  7666. null === renderLanes
  7667. ? ((revealOrder = workInProgress.child), (workInProgress.child = null))
  7668. : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));
  7669. initSuspenseListRenderState(
  7670. workInProgress,
  7671. !1,
  7672. revealOrder,
  7673. renderLanes,
  7674. tailMode,
  7675. nextProps
  7676. );
  7677. break;
  7678. case "backwards":
  7679. case "unstable_legacy-backwards":
  7680. renderLanes = null;
  7681. revealOrder = workInProgress.child;
  7682. for (workInProgress.child = null; null !== revealOrder; ) {
  7683. current = revealOrder.alternate;
  7684. if (null !== current && null === findFirstSuspended(current)) {
  7685. workInProgress.child = revealOrder;
  7686. break;
  7687. }
  7688. current = revealOrder.sibling;
  7689. revealOrder.sibling = renderLanes;
  7690. renderLanes = revealOrder;
  7691. revealOrder = current;
  7692. }
  7693. initSuspenseListRenderState(
  7694. workInProgress,
  7695. !0,
  7696. renderLanes,
  7697. null,
  7698. tailMode,
  7699. nextProps
  7700. );
  7701. break;
  7702. case "together":
  7703. initSuspenseListRenderState(
  7704. workInProgress,
  7705. !1,
  7706. null,
  7707. null,
  7708. void 0,
  7709. nextProps
  7710. );
  7711. break;
  7712. default:
  7713. workInProgress.memoizedState = null;
  7714. }
  7715. return workInProgress.child;
  7716. }
  7717. function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
  7718. null !== current && (workInProgress.dependencies = current.dependencies);
  7719. profilerStartTime = -1;
  7720. workInProgressRootSkippedLanes |= workInProgress.lanes;
  7721. if (0 === (renderLanes & workInProgress.childLanes))
  7722. if (null !== current) {
  7723. if (
  7724. (propagateParentContextChanges(
  7725. current,
  7726. workInProgress,
  7727. renderLanes,
  7728. !1
  7729. ),
  7730. 0 === (renderLanes & workInProgress.childLanes))
  7731. )
  7732. return null;
  7733. } else return null;
  7734. if (null !== current && workInProgress.child !== current.child)
  7735. throw Error(formatProdErrorMessage(153));
  7736. if (null !== workInProgress.child) {
  7737. current = workInProgress.child;
  7738. renderLanes = createWorkInProgress(current, current.pendingProps);
  7739. workInProgress.child = renderLanes;
  7740. for (renderLanes.return = workInProgress; null !== current.sibling; )
  7741. (current = current.sibling),
  7742. (renderLanes = renderLanes.sibling =
  7743. createWorkInProgress(current, current.pendingProps)),
  7744. (renderLanes.return = workInProgress);
  7745. renderLanes.sibling = null;
  7746. }
  7747. return workInProgress.child;
  7748. }
  7749. function checkScheduledUpdateOrContext(current, renderLanes) {
  7750. if (0 !== (current.lanes & renderLanes)) return !0;
  7751. current = current.dependencies;
  7752. return null !== current && checkIfContextChanged(current) ? !0 : !1;
  7753. }
  7754. function attemptEarlyBailoutIfNoScheduledUpdate(
  7755. current,
  7756. workInProgress,
  7757. renderLanes
  7758. ) {
  7759. switch (workInProgress.tag) {
  7760. case 3:
  7761. pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  7762. pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
  7763. resetHydrationState();
  7764. break;
  7765. case 27:
  7766. case 5:
  7767. pushHostContext(workInProgress);
  7768. break;
  7769. case 4:
  7770. pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  7771. break;
  7772. case 10:
  7773. pushProvider(
  7774. workInProgress,
  7775. workInProgress.type,
  7776. workInProgress.memoizedProps.value
  7777. );
  7778. break;
  7779. case 12:
  7780. 0 !== (renderLanes & workInProgress.childLanes) &&
  7781. (workInProgress.flags |= 4);
  7782. workInProgress.flags |= 2048;
  7783. var stateNode = workInProgress.stateNode;
  7784. stateNode.effectDuration = -0;
  7785. stateNode.passiveEffectDuration = -0;
  7786. break;
  7787. case 31:
  7788. if (null !== workInProgress.memoizedState)
  7789. return (
  7790. (workInProgress.flags |= 128),
  7791. pushDehydratedActivitySuspenseHandler(workInProgress),
  7792. null
  7793. );
  7794. break;
  7795. case 13:
  7796. stateNode = workInProgress.memoizedState;
  7797. if (null !== stateNode) {
  7798. if (null !== stateNode.dehydrated)
  7799. return (
  7800. pushPrimaryTreeSuspenseHandler(workInProgress),
  7801. (workInProgress.flags |= 128),
  7802. null
  7803. );
  7804. if (0 !== (renderLanes & workInProgress.child.childLanes))
  7805. return updateSuspenseComponent(current, workInProgress, renderLanes);
  7806. pushPrimaryTreeSuspenseHandler(workInProgress);
  7807. current = bailoutOnAlreadyFinishedWork(
  7808. current,
  7809. workInProgress,
  7810. renderLanes
  7811. );
  7812. return null !== current ? current.sibling : null;
  7813. }
  7814. pushPrimaryTreeSuspenseHandler(workInProgress);
  7815. break;
  7816. case 19:
  7817. var didSuspendBefore = 0 !== (current.flags & 128);
  7818. stateNode = 0 !== (renderLanes & workInProgress.childLanes);
  7819. stateNode ||
  7820. (propagateParentContextChanges(
  7821. current,
  7822. workInProgress,
  7823. renderLanes,
  7824. !1
  7825. ),
  7826. (stateNode = 0 !== (renderLanes & workInProgress.childLanes)));
  7827. if (didSuspendBefore) {
  7828. if (stateNode)
  7829. return updateSuspenseListComponent(
  7830. current,
  7831. workInProgress,
  7832. renderLanes
  7833. );
  7834. workInProgress.flags |= 128;
  7835. }
  7836. didSuspendBefore = workInProgress.memoizedState;
  7837. null !== didSuspendBefore &&
  7838. ((didSuspendBefore.rendering = null),
  7839. (didSuspendBefore.tail = null),
  7840. (didSuspendBefore.lastEffect = null));
  7841. push(suspenseStackCursor, suspenseStackCursor.current);
  7842. if (stateNode) break;
  7843. else return null;
  7844. case 22:
  7845. return (
  7846. (workInProgress.lanes = 0),
  7847. updateOffscreenComponent(
  7848. current,
  7849. workInProgress,
  7850. renderLanes,
  7851. workInProgress.pendingProps
  7852. )
  7853. );
  7854. case 24:
  7855. pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
  7856. }
  7857. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  7858. }
  7859. function beginWork(current, workInProgress, renderLanes) {
  7860. if (null !== current)
  7861. if (current.memoizedProps !== workInProgress.pendingProps)
  7862. didReceiveUpdate = !0;
  7863. else {
  7864. if (
  7865. !checkScheduledUpdateOrContext(current, renderLanes) &&
  7866. 0 === (workInProgress.flags & 128)
  7867. )
  7868. return (
  7869. (didReceiveUpdate = !1),
  7870. attemptEarlyBailoutIfNoScheduledUpdate(
  7871. current,
  7872. workInProgress,
  7873. renderLanes
  7874. )
  7875. );
  7876. didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;
  7877. }
  7878. else
  7879. (didReceiveUpdate = !1),
  7880. isHydrating &&
  7881. 0 !== (workInProgress.flags & 1048576) &&
  7882. pushTreeId(workInProgress, treeForkCount, workInProgress.index);
  7883. workInProgress.lanes = 0;
  7884. switch (workInProgress.tag) {
  7885. case 16:
  7886. a: {
  7887. var props = workInProgress.pendingProps;
  7888. current = resolveLazy(workInProgress.elementType);
  7889. workInProgress.type = current;
  7890. if ("function" === typeof current)
  7891. shouldConstruct(current)
  7892. ? ((props = resolveClassComponentProps(current, props)),
  7893. (workInProgress.tag = 1),
  7894. (workInProgress = updateClassComponent(
  7895. null,
  7896. workInProgress,
  7897. current,
  7898. props,
  7899. renderLanes
  7900. )))
  7901. : ((workInProgress.tag = 0),
  7902. (workInProgress = updateFunctionComponent(
  7903. null,
  7904. workInProgress,
  7905. current,
  7906. props,
  7907. renderLanes
  7908. )));
  7909. else {
  7910. if (void 0 !== current && null !== current) {
  7911. var $$typeof = current.$$typeof;
  7912. if ($$typeof === REACT_FORWARD_REF_TYPE) {
  7913. workInProgress.tag = 11;
  7914. workInProgress = updateForwardRef(
  7915. null,
  7916. workInProgress,
  7917. current,
  7918. props,
  7919. renderLanes
  7920. );
  7921. break a;
  7922. } else if ($$typeof === REACT_MEMO_TYPE) {
  7923. workInProgress.tag = 14;
  7924. workInProgress = updateMemoComponent(
  7925. null,
  7926. workInProgress,
  7927. current,
  7928. props,
  7929. renderLanes
  7930. );
  7931. break a;
  7932. }
  7933. }
  7934. workInProgress = getComponentNameFromType(current) || current;
  7935. throw Error(formatProdErrorMessage(306, workInProgress, ""));
  7936. }
  7937. }
  7938. return workInProgress;
  7939. case 0:
  7940. return updateFunctionComponent(
  7941. current,
  7942. workInProgress,
  7943. workInProgress.type,
  7944. workInProgress.pendingProps,
  7945. renderLanes
  7946. );
  7947. case 1:
  7948. return (
  7949. (props = workInProgress.type),
  7950. ($$typeof = resolveClassComponentProps(
  7951. props,
  7952. workInProgress.pendingProps
  7953. )),
  7954. updateClassComponent(
  7955. current,
  7956. workInProgress,
  7957. props,
  7958. $$typeof,
  7959. renderLanes
  7960. )
  7961. );
  7962. case 3:
  7963. a: {
  7964. pushHostContainer(
  7965. workInProgress,
  7966. workInProgress.stateNode.containerInfo
  7967. );
  7968. if (null === current) throw Error(formatProdErrorMessage(387));
  7969. props = workInProgress.pendingProps;
  7970. var prevState = workInProgress.memoizedState;
  7971. $$typeof = prevState.element;
  7972. cloneUpdateQueue(current, workInProgress);
  7973. processUpdateQueue(workInProgress, props, null, renderLanes);
  7974. var nextState = workInProgress.memoizedState;
  7975. props = nextState.cache;
  7976. pushProvider(workInProgress, CacheContext, props);
  7977. props !== prevState.cache &&
  7978. propagateContextChanges(
  7979. workInProgress,
  7980. [CacheContext],
  7981. renderLanes,
  7982. !0
  7983. );
  7984. suspendIfUpdateReadFromEntangledAsyncAction();
  7985. props = nextState.element;
  7986. if (prevState.isDehydrated)
  7987. if (
  7988. ((prevState = {
  7989. element: props,
  7990. isDehydrated: !1,
  7991. cache: nextState.cache
  7992. }),
  7993. (workInProgress.updateQueue.baseState = prevState),
  7994. (workInProgress.memoizedState = prevState),
  7995. workInProgress.flags & 256)
  7996. ) {
  7997. workInProgress = mountHostRootWithoutHydrating(
  7998. current,
  7999. workInProgress,
  8000. props,
  8001. renderLanes
  8002. );
  8003. break a;
  8004. } else if (props !== $$typeof) {
  8005. $$typeof = createCapturedValueAtFiber(
  8006. Error(formatProdErrorMessage(424)),
  8007. workInProgress
  8008. );
  8009. queueHydrationError($$typeof);
  8010. workInProgress = mountHostRootWithoutHydrating(
  8011. current,
  8012. workInProgress,
  8013. props,
  8014. renderLanes
  8015. );
  8016. break a;
  8017. } else {
  8018. current = workInProgress.stateNode.containerInfo;
  8019. switch (current.nodeType) {
  8020. case 9:
  8021. current = current.body;
  8022. break;
  8023. default:
  8024. current =
  8025. "HTML" === current.nodeName
  8026. ? current.ownerDocument.body
  8027. : current;
  8028. }
  8029. nextHydratableInstance = getNextHydratable(current.firstChild);
  8030. hydrationParentFiber = workInProgress;
  8031. isHydrating = !0;
  8032. hydrationErrors = null;
  8033. rootOrSingletonContext = !0;
  8034. renderLanes = mountChildFibers(
  8035. workInProgress,
  8036. null,
  8037. props,
  8038. renderLanes
  8039. );
  8040. for (workInProgress.child = renderLanes; renderLanes; )
  8041. (renderLanes.flags = (renderLanes.flags & -3) | 4096),
  8042. (renderLanes = renderLanes.sibling);
  8043. }
  8044. else {
  8045. resetHydrationState();
  8046. if (props === $$typeof) {
  8047. workInProgress = bailoutOnAlreadyFinishedWork(
  8048. current,
  8049. workInProgress,
  8050. renderLanes
  8051. );
  8052. break a;
  8053. }
  8054. reconcileChildren(current, workInProgress, props, renderLanes);
  8055. }
  8056. workInProgress = workInProgress.child;
  8057. }
  8058. return workInProgress;
  8059. case 26:
  8060. return (
  8061. markRef(current, workInProgress),
  8062. null === current
  8063. ? (renderLanes = getResource(
  8064. workInProgress.type,
  8065. null,
  8066. workInProgress.pendingProps,
  8067. null
  8068. ))
  8069. ? (workInProgress.memoizedState = renderLanes)
  8070. : isHydrating ||
  8071. ((renderLanes = workInProgress.type),
  8072. (current = workInProgress.pendingProps),
  8073. (props = getOwnerDocumentFromRootContainer(
  8074. rootInstanceStackCursor.current
  8075. ).createElement(renderLanes)),
  8076. (props[internalInstanceKey] = workInProgress),
  8077. (props[internalPropsKey] = current),
  8078. setInitialProperties(props, renderLanes, current),
  8079. markNodeAsHoistable(props),
  8080. (workInProgress.stateNode = props))
  8081. : (workInProgress.memoizedState = getResource(
  8082. workInProgress.type,
  8083. current.memoizedProps,
  8084. workInProgress.pendingProps,
  8085. current.memoizedState
  8086. )),
  8087. null
  8088. );
  8089. case 27:
  8090. return (
  8091. pushHostContext(workInProgress),
  8092. null === current &&
  8093. isHydrating &&
  8094. ((props = workInProgress.stateNode =
  8095. resolveSingletonInstance(
  8096. workInProgress.type,
  8097. workInProgress.pendingProps,
  8098. rootInstanceStackCursor.current
  8099. )),
  8100. (hydrationParentFiber = workInProgress),
  8101. (rootOrSingletonContext = !0),
  8102. ($$typeof = nextHydratableInstance),
  8103. isSingletonScope(workInProgress.type)
  8104. ? ((previousHydratableOnEnteringScopedSingleton = $$typeof),
  8105. (nextHydratableInstance = getNextHydratable(props.firstChild)))
  8106. : (nextHydratableInstance = $$typeof)),
  8107. reconcileChildren(
  8108. current,
  8109. workInProgress,
  8110. workInProgress.pendingProps.children,
  8111. renderLanes
  8112. ),
  8113. markRef(current, workInProgress),
  8114. null === current && (workInProgress.flags |= 4194304),
  8115. workInProgress.child
  8116. );
  8117. case 5:
  8118. if (null === current && isHydrating) {
  8119. if (($$typeof = props = nextHydratableInstance))
  8120. (props = canHydrateInstance(
  8121. props,
  8122. workInProgress.type,
  8123. workInProgress.pendingProps,
  8124. rootOrSingletonContext
  8125. )),
  8126. null !== props
  8127. ? ((workInProgress.stateNode = props),
  8128. (hydrationParentFiber = workInProgress),
  8129. (nextHydratableInstance = getNextHydratable(props.firstChild)),
  8130. (rootOrSingletonContext = !1),
  8131. ($$typeof = !0))
  8132. : ($$typeof = !1);
  8133. $$typeof || throwOnHydrationMismatch(workInProgress);
  8134. }
  8135. pushHostContext(workInProgress);
  8136. $$typeof = workInProgress.type;
  8137. prevState = workInProgress.pendingProps;
  8138. nextState = null !== current ? current.memoizedProps : null;
  8139. props = prevState.children;
  8140. shouldSetTextContent($$typeof, prevState)
  8141. ? (props = null)
  8142. : null !== nextState &&
  8143. shouldSetTextContent($$typeof, nextState) &&
  8144. (workInProgress.flags |= 32);
  8145. null !== workInProgress.memoizedState &&
  8146. (($$typeof = renderWithHooks(
  8147. current,
  8148. workInProgress,
  8149. TransitionAwareHostComponent,
  8150. null,
  8151. null,
  8152. renderLanes
  8153. )),
  8154. (HostTransitionContext._currentValue = $$typeof));
  8155. markRef(current, workInProgress);
  8156. reconcileChildren(current, workInProgress, props, renderLanes);
  8157. return workInProgress.child;
  8158. case 6:
  8159. if (null === current && isHydrating) {
  8160. if ((current = renderLanes = nextHydratableInstance))
  8161. (renderLanes = canHydrateTextInstance(
  8162. renderLanes,
  8163. workInProgress.pendingProps,
  8164. rootOrSingletonContext
  8165. )),
  8166. null !== renderLanes
  8167. ? ((workInProgress.stateNode = renderLanes),
  8168. (hydrationParentFiber = workInProgress),
  8169. (nextHydratableInstance = null),
  8170. (current = !0))
  8171. : (current = !1);
  8172. current || throwOnHydrationMismatch(workInProgress);
  8173. }
  8174. return null;
  8175. case 13:
  8176. return updateSuspenseComponent(current, workInProgress, renderLanes);
  8177. case 4:
  8178. return (
  8179. pushHostContainer(
  8180. workInProgress,
  8181. workInProgress.stateNode.containerInfo
  8182. ),
  8183. (props = workInProgress.pendingProps),
  8184. null === current
  8185. ? (workInProgress.child = reconcileChildFibers(
  8186. workInProgress,
  8187. null,
  8188. props,
  8189. renderLanes
  8190. ))
  8191. : reconcileChildren(current, workInProgress, props, renderLanes),
  8192. workInProgress.child
  8193. );
  8194. case 11:
  8195. return updateForwardRef(
  8196. current,
  8197. workInProgress,
  8198. workInProgress.type,
  8199. workInProgress.pendingProps,
  8200. renderLanes
  8201. );
  8202. case 7:
  8203. return (
  8204. reconcileChildren(
  8205. current,
  8206. workInProgress,
  8207. workInProgress.pendingProps,
  8208. renderLanes
  8209. ),
  8210. workInProgress.child
  8211. );
  8212. case 8:
  8213. return (
  8214. reconcileChildren(
  8215. current,
  8216. workInProgress,
  8217. workInProgress.pendingProps.children,
  8218. renderLanes
  8219. ),
  8220. workInProgress.child
  8221. );
  8222. case 12:
  8223. return (
  8224. (workInProgress.flags |= 4),
  8225. (workInProgress.flags |= 2048),
  8226. (props = workInProgress.stateNode),
  8227. (props.effectDuration = -0),
  8228. (props.passiveEffectDuration = -0),
  8229. reconcileChildren(
  8230. current,
  8231. workInProgress,
  8232. workInProgress.pendingProps.children,
  8233. renderLanes
  8234. ),
  8235. workInProgress.child
  8236. );
  8237. case 10:
  8238. return (
  8239. (props = workInProgress.pendingProps),
  8240. pushProvider(workInProgress, workInProgress.type, props.value),
  8241. reconcileChildren(current, workInProgress, props.children, renderLanes),
  8242. workInProgress.child
  8243. );
  8244. case 9:
  8245. return (
  8246. ($$typeof = workInProgress.type._context),
  8247. (props = workInProgress.pendingProps.children),
  8248. prepareToReadContext(workInProgress),
  8249. ($$typeof = readContext($$typeof)),
  8250. (props = props($$typeof)),
  8251. (workInProgress.flags |= 1),
  8252. reconcileChildren(current, workInProgress, props, renderLanes),
  8253. workInProgress.child
  8254. );
  8255. case 14:
  8256. return updateMemoComponent(
  8257. current,
  8258. workInProgress,
  8259. workInProgress.type,
  8260. workInProgress.pendingProps,
  8261. renderLanes
  8262. );
  8263. case 15:
  8264. return updateSimpleMemoComponent(
  8265. current,
  8266. workInProgress,
  8267. workInProgress.type,
  8268. workInProgress.pendingProps,
  8269. renderLanes
  8270. );
  8271. case 19:
  8272. return updateSuspenseListComponent(current, workInProgress, renderLanes);
  8273. case 31:
  8274. return updateActivityComponent(current, workInProgress, renderLanes);
  8275. case 22:
  8276. return updateOffscreenComponent(
  8277. current,
  8278. workInProgress,
  8279. renderLanes,
  8280. workInProgress.pendingProps
  8281. );
  8282. case 24:
  8283. return (
  8284. prepareToReadContext(workInProgress),
  8285. (props = readContext(CacheContext)),
  8286. null === current
  8287. ? (($$typeof = peekCacheFromPool()),
  8288. null === $$typeof &&
  8289. (($$typeof = workInProgressRoot),
  8290. (prevState = createCache()),
  8291. ($$typeof.pooledCache = prevState),
  8292. prevState.refCount++,
  8293. null !== prevState && ($$typeof.pooledCacheLanes |= renderLanes),
  8294. ($$typeof = prevState)),
  8295. (workInProgress.memoizedState = { parent: props, cache: $$typeof }),
  8296. initializeUpdateQueue(workInProgress),
  8297. pushProvider(workInProgress, CacheContext, $$typeof))
  8298. : (0 !== (current.lanes & renderLanes) &&
  8299. (cloneUpdateQueue(current, workInProgress),
  8300. processUpdateQueue(workInProgress, null, null, renderLanes),
  8301. suspendIfUpdateReadFromEntangledAsyncAction()),
  8302. ($$typeof = current.memoizedState),
  8303. (prevState = workInProgress.memoizedState),
  8304. $$typeof.parent !== props
  8305. ? (($$typeof = { parent: props, cache: props }),
  8306. (workInProgress.memoizedState = $$typeof),
  8307. 0 === workInProgress.lanes &&
  8308. (workInProgress.memoizedState =
  8309. workInProgress.updateQueue.baseState =
  8310. $$typeof),
  8311. pushProvider(workInProgress, CacheContext, props))
  8312. : ((props = prevState.cache),
  8313. pushProvider(workInProgress, CacheContext, props),
  8314. props !== $$typeof.cache &&
  8315. propagateContextChanges(
  8316. workInProgress,
  8317. [CacheContext],
  8318. renderLanes,
  8319. !0
  8320. ))),
  8321. reconcileChildren(
  8322. current,
  8323. workInProgress,
  8324. workInProgress.pendingProps.children,
  8325. renderLanes
  8326. ),
  8327. workInProgress.child
  8328. );
  8329. case 29:
  8330. throw workInProgress.pendingProps;
  8331. }
  8332. throw Error(formatProdErrorMessage(156, workInProgress.tag));
  8333. }
  8334. function markUpdate(workInProgress) {
  8335. workInProgress.flags |= 4;
  8336. }
  8337. function preloadInstanceAndSuspendIfNeeded(
  8338. workInProgress,
  8339. type,
  8340. oldProps,
  8341. newProps,
  8342. renderLanes
  8343. ) {
  8344. if ((type = 0 !== (workInProgress.mode & 32))) type = !1;
  8345. if (type) {
  8346. if (
  8347. ((workInProgress.flags |= 16777216),
  8348. (renderLanes & 335544128) === renderLanes)
  8349. )
  8350. if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;
  8351. else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
  8352. else
  8353. throw (
  8354. ((suspendedThenable = noopSuspenseyCommitThenable),
  8355. SuspenseyCommitException)
  8356. );
  8357. } else workInProgress.flags &= -16777217;
  8358. }
  8359. function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
  8360. if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
  8361. workInProgress.flags &= -16777217;
  8362. else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))
  8363. if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
  8364. else
  8365. throw (
  8366. ((suspendedThenable = noopSuspenseyCommitThenable),
  8367. SuspenseyCommitException)
  8368. );
  8369. }
  8370. function scheduleRetryEffect(workInProgress, retryQueue) {
  8371. null !== retryQueue && (workInProgress.flags |= 4);
  8372. workInProgress.flags & 16384 &&
  8373. ((retryQueue =
  8374. 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),
  8375. (workInProgress.lanes |= retryQueue),
  8376. (workInProgressSuspendedRetryLanes |= retryQueue));
  8377. }
  8378. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  8379. if (!isHydrating)
  8380. switch (renderState.tailMode) {
  8381. case "hidden":
  8382. hasRenderedATailFallback = renderState.tail;
  8383. for (var lastTailNode = null; null !== hasRenderedATailFallback; )
  8384. null !== hasRenderedATailFallback.alternate &&
  8385. (lastTailNode = hasRenderedATailFallback),
  8386. (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
  8387. null === lastTailNode
  8388. ? (renderState.tail = null)
  8389. : (lastTailNode.sibling = null);
  8390. break;
  8391. case "collapsed":
  8392. lastTailNode = renderState.tail;
  8393. for (var lastTailNode$116 = null; null !== lastTailNode; )
  8394. null !== lastTailNode.alternate && (lastTailNode$116 = lastTailNode),
  8395. (lastTailNode = lastTailNode.sibling);
  8396. null === lastTailNode$116
  8397. ? hasRenderedATailFallback || null === renderState.tail
  8398. ? (renderState.tail = null)
  8399. : (renderState.tail.sibling = null)
  8400. : (lastTailNode$116.sibling = null);
  8401. }
  8402. }
  8403. function bubbleProperties(completedWork) {
  8404. var didBailout =
  8405. null !== completedWork.alternate &&
  8406. completedWork.alternate.child === completedWork.child,
  8407. newChildLanes = 0,
  8408. subtreeFlags = 0;
  8409. if (didBailout)
  8410. if (0 !== (completedWork.mode & 2)) {
  8411. for (
  8412. var treeBaseDuration$118 = completedWork.selfBaseDuration,
  8413. child$119 = completedWork.child;
  8414. null !== child$119;
  8415. )
  8416. (newChildLanes |= child$119.lanes | child$119.childLanes),
  8417. (subtreeFlags |= child$119.subtreeFlags & 65011712),
  8418. (subtreeFlags |= child$119.flags & 65011712),
  8419. (treeBaseDuration$118 += child$119.treeBaseDuration),
  8420. (child$119 = child$119.sibling);
  8421. completedWork.treeBaseDuration = treeBaseDuration$118;
  8422. } else
  8423. for (
  8424. treeBaseDuration$118 = completedWork.child;
  8425. null !== treeBaseDuration$118;
  8426. )
  8427. (newChildLanes |=
  8428. treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes),
  8429. (subtreeFlags |= treeBaseDuration$118.subtreeFlags & 65011712),
  8430. (subtreeFlags |= treeBaseDuration$118.flags & 65011712),
  8431. (treeBaseDuration$118.return = completedWork),
  8432. (treeBaseDuration$118 = treeBaseDuration$118.sibling);
  8433. else if (0 !== (completedWork.mode & 2)) {
  8434. treeBaseDuration$118 = completedWork.actualDuration;
  8435. child$119 = completedWork.selfBaseDuration;
  8436. for (var child = completedWork.child; null !== child; )
  8437. (newChildLanes |= child.lanes | child.childLanes),
  8438. (subtreeFlags |= child.subtreeFlags),
  8439. (subtreeFlags |= child.flags),
  8440. (treeBaseDuration$118 += child.actualDuration),
  8441. (child$119 += child.treeBaseDuration),
  8442. (child = child.sibling);
  8443. completedWork.actualDuration = treeBaseDuration$118;
  8444. completedWork.treeBaseDuration = child$119;
  8445. } else
  8446. for (
  8447. treeBaseDuration$118 = completedWork.child;
  8448. null !== treeBaseDuration$118;
  8449. )
  8450. (newChildLanes |=
  8451. treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes),
  8452. (subtreeFlags |= treeBaseDuration$118.subtreeFlags),
  8453. (subtreeFlags |= treeBaseDuration$118.flags),
  8454. (treeBaseDuration$118.return = completedWork),
  8455. (treeBaseDuration$118 = treeBaseDuration$118.sibling);
  8456. completedWork.subtreeFlags |= subtreeFlags;
  8457. completedWork.childLanes = newChildLanes;
  8458. return didBailout;
  8459. }
  8460. function completeWork(current, workInProgress, renderLanes) {
  8461. var newProps = workInProgress.pendingProps;
  8462. popTreeContext(workInProgress);
  8463. switch (workInProgress.tag) {
  8464. case 16:
  8465. case 15:
  8466. case 0:
  8467. case 11:
  8468. case 7:
  8469. case 8:
  8470. case 12:
  8471. case 9:
  8472. case 14:
  8473. return bubbleProperties(workInProgress), null;
  8474. case 1:
  8475. return bubbleProperties(workInProgress), null;
  8476. case 3:
  8477. renderLanes = workInProgress.stateNode;
  8478. newProps = null;
  8479. null !== current && (newProps = current.memoizedState.cache);
  8480. workInProgress.memoizedState.cache !== newProps &&
  8481. (workInProgress.flags |= 2048);
  8482. popProvider(CacheContext);
  8483. popHostContainer();
  8484. renderLanes.pendingContext &&
  8485. ((renderLanes.context = renderLanes.pendingContext),
  8486. (renderLanes.pendingContext = null));
  8487. if (null === current || null === current.child)
  8488. popHydrationState(workInProgress)
  8489. ? markUpdate(workInProgress)
  8490. : null === current ||
  8491. (current.memoizedState.isDehydrated &&
  8492. 0 === (workInProgress.flags & 256)) ||
  8493. ((workInProgress.flags |= 1024),
  8494. upgradeHydrationErrorsToRecoverable());
  8495. bubbleProperties(workInProgress);
  8496. return null;
  8497. case 26:
  8498. var type = workInProgress.type,
  8499. nextResource = workInProgress.memoizedState;
  8500. null === current
  8501. ? (markUpdate(workInProgress),
  8502. null !== nextResource
  8503. ? (bubbleProperties(workInProgress),
  8504. preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))
  8505. : (bubbleProperties(workInProgress),
  8506. preloadInstanceAndSuspendIfNeeded(
  8507. workInProgress,
  8508. type,
  8509. null,
  8510. newProps,
  8511. renderLanes
  8512. )))
  8513. : nextResource
  8514. ? nextResource !== current.memoizedState
  8515. ? (markUpdate(workInProgress),
  8516. bubbleProperties(workInProgress),
  8517. preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))
  8518. : (bubbleProperties(workInProgress),
  8519. (workInProgress.flags &= -16777217))
  8520. : ((current = current.memoizedProps),
  8521. current !== newProps && markUpdate(workInProgress),
  8522. bubbleProperties(workInProgress),
  8523. preloadInstanceAndSuspendIfNeeded(
  8524. workInProgress,
  8525. type,
  8526. current,
  8527. newProps,
  8528. renderLanes
  8529. ));
  8530. return null;
  8531. case 27:
  8532. popHostContext(workInProgress);
  8533. renderLanes = rootInstanceStackCursor.current;
  8534. type = workInProgress.type;
  8535. if (null !== current && null != workInProgress.stateNode)
  8536. current.memoizedProps !== newProps && markUpdate(workInProgress);
  8537. else {
  8538. if (!newProps) {
  8539. if (null === workInProgress.stateNode)
  8540. throw Error(formatProdErrorMessage(166));
  8541. bubbleProperties(workInProgress);
  8542. return null;
  8543. }
  8544. current = contextStackCursor.current;
  8545. popHydrationState(workInProgress)
  8546. ? prepareToHydrateHostInstance(workInProgress, current)
  8547. : ((current = resolveSingletonInstance(type, newProps, renderLanes)),
  8548. (workInProgress.stateNode = current),
  8549. markUpdate(workInProgress));
  8550. }
  8551. bubbleProperties(workInProgress);
  8552. return null;
  8553. case 5:
  8554. popHostContext(workInProgress);
  8555. type = workInProgress.type;
  8556. if (null !== current && null != workInProgress.stateNode)
  8557. current.memoizedProps !== newProps && markUpdate(workInProgress);
  8558. else {
  8559. if (!newProps) {
  8560. if (null === workInProgress.stateNode)
  8561. throw Error(formatProdErrorMessage(166));
  8562. bubbleProperties(workInProgress);
  8563. return null;
  8564. }
  8565. nextResource = contextStackCursor.current;
  8566. if (popHydrationState(workInProgress))
  8567. prepareToHydrateHostInstance(workInProgress, nextResource);
  8568. else {
  8569. var ownerDocument = getOwnerDocumentFromRootContainer(
  8570. rootInstanceStackCursor.current
  8571. );
  8572. switch (nextResource) {
  8573. case 1:
  8574. nextResource = ownerDocument.createElementNS(
  8575. "http://www.w3.org/2000/svg",
  8576. type
  8577. );
  8578. break;
  8579. case 2:
  8580. nextResource = ownerDocument.createElementNS(
  8581. "http://www.w3.org/1998/Math/MathML",
  8582. type
  8583. );
  8584. break;
  8585. default:
  8586. switch (type) {
  8587. case "svg":
  8588. nextResource = ownerDocument.createElementNS(
  8589. "http://www.w3.org/2000/svg",
  8590. type
  8591. );
  8592. break;
  8593. case "math":
  8594. nextResource = ownerDocument.createElementNS(
  8595. "http://www.w3.org/1998/Math/MathML",
  8596. type
  8597. );
  8598. break;
  8599. case "script":
  8600. nextResource = ownerDocument.createElement("div");
  8601. nextResource.innerHTML = "<script>\x3c/script>";
  8602. nextResource = nextResource.removeChild(
  8603. nextResource.firstChild
  8604. );
  8605. break;
  8606. case "select":
  8607. nextResource =
  8608. "string" === typeof newProps.is
  8609. ? ownerDocument.createElement("select", {
  8610. is: newProps.is
  8611. })
  8612. : ownerDocument.createElement("select");
  8613. newProps.multiple
  8614. ? (nextResource.multiple = !0)
  8615. : newProps.size && (nextResource.size = newProps.size);
  8616. break;
  8617. default:
  8618. nextResource =
  8619. "string" === typeof newProps.is
  8620. ? ownerDocument.createElement(type, { is: newProps.is })
  8621. : ownerDocument.createElement(type);
  8622. }
  8623. }
  8624. nextResource[internalInstanceKey] = workInProgress;
  8625. nextResource[internalPropsKey] = newProps;
  8626. a: for (
  8627. ownerDocument = workInProgress.child;
  8628. null !== ownerDocument;
  8629. ) {
  8630. if (5 === ownerDocument.tag || 6 === ownerDocument.tag)
  8631. nextResource.appendChild(ownerDocument.stateNode);
  8632. else if (
  8633. 4 !== ownerDocument.tag &&
  8634. 27 !== ownerDocument.tag &&
  8635. null !== ownerDocument.child
  8636. ) {
  8637. ownerDocument.child.return = ownerDocument;
  8638. ownerDocument = ownerDocument.child;
  8639. continue;
  8640. }
  8641. if (ownerDocument === workInProgress) break a;
  8642. for (; null === ownerDocument.sibling; ) {
  8643. if (
  8644. null === ownerDocument.return ||
  8645. ownerDocument.return === workInProgress
  8646. )
  8647. break a;
  8648. ownerDocument = ownerDocument.return;
  8649. }
  8650. ownerDocument.sibling.return = ownerDocument.return;
  8651. ownerDocument = ownerDocument.sibling;
  8652. }
  8653. workInProgress.stateNode = nextResource;
  8654. a: switch (
  8655. (setInitialProperties(nextResource, type, newProps), type)
  8656. ) {
  8657. case "button":
  8658. case "input":
  8659. case "select":
  8660. case "textarea":
  8661. newProps = !!newProps.autoFocus;
  8662. break a;
  8663. case "img":
  8664. newProps = !0;
  8665. break a;
  8666. default:
  8667. newProps = !1;
  8668. }
  8669. newProps && markUpdate(workInProgress);
  8670. }
  8671. }
  8672. bubbleProperties(workInProgress);
  8673. preloadInstanceAndSuspendIfNeeded(
  8674. workInProgress,
  8675. workInProgress.type,
  8676. null === current ? null : current.memoizedProps,
  8677. workInProgress.pendingProps,
  8678. renderLanes
  8679. );
  8680. return null;
  8681. case 6:
  8682. if (current && null != workInProgress.stateNode)
  8683. current.memoizedProps !== newProps && markUpdate(workInProgress);
  8684. else {
  8685. if ("string" !== typeof newProps && null === workInProgress.stateNode)
  8686. throw Error(formatProdErrorMessage(166));
  8687. current = rootInstanceStackCursor.current;
  8688. if (popHydrationState(workInProgress)) {
  8689. current = workInProgress.stateNode;
  8690. renderLanes = workInProgress.memoizedProps;
  8691. newProps = null;
  8692. type = hydrationParentFiber;
  8693. if (null !== type)
  8694. switch (type.tag) {
  8695. case 27:
  8696. case 5:
  8697. newProps = type.memoizedProps;
  8698. }
  8699. current[internalInstanceKey] = workInProgress;
  8700. current =
  8701. current.nodeValue === renderLanes ||
  8702. (null !== newProps && !0 === newProps.suppressHydrationWarning) ||
  8703. checkForUnmatchedText(current.nodeValue, renderLanes)
  8704. ? !0
  8705. : !1;
  8706. current || throwOnHydrationMismatch(workInProgress, !0);
  8707. } else
  8708. (current =
  8709. getOwnerDocumentFromRootContainer(current).createTextNode(
  8710. newProps
  8711. )),
  8712. (current[internalInstanceKey] = workInProgress),
  8713. (workInProgress.stateNode = current);
  8714. }
  8715. bubbleProperties(workInProgress);
  8716. return null;
  8717. case 31:
  8718. renderLanes = workInProgress.memoizedState;
  8719. if (null === current || null !== current.memoizedState) {
  8720. newProps = popHydrationState(workInProgress);
  8721. if (null !== renderLanes) {
  8722. if (null === current) {
  8723. if (!newProps) throw Error(formatProdErrorMessage(318));
  8724. current = workInProgress.memoizedState;
  8725. current = null !== current ? current.dehydrated : null;
  8726. if (!current) throw Error(formatProdErrorMessage(557));
  8727. current[internalInstanceKey] = workInProgress;
  8728. bubbleProperties(workInProgress);
  8729. 0 !== (workInProgress.mode & 2) &&
  8730. null !== renderLanes &&
  8731. ((current = workInProgress.child),
  8732. null !== current &&
  8733. (workInProgress.treeBaseDuration -= current.treeBaseDuration));
  8734. } else
  8735. resetHydrationState(),
  8736. 0 === (workInProgress.flags & 128) &&
  8737. (renderLanes = workInProgress.memoizedState = null),
  8738. (workInProgress.flags |= 4),
  8739. bubbleProperties(workInProgress),
  8740. 0 !== (workInProgress.mode & 2) &&
  8741. null !== renderLanes &&
  8742. ((current = workInProgress.child),
  8743. null !== current &&
  8744. (workInProgress.treeBaseDuration -=
  8745. current.treeBaseDuration));
  8746. current = !1;
  8747. } else
  8748. (renderLanes = upgradeHydrationErrorsToRecoverable()),
  8749. null !== current &&
  8750. null !== current.memoizedState &&
  8751. (current.memoizedState.hydrationErrors = renderLanes),
  8752. (current = !0);
  8753. if (!current) {
  8754. if (workInProgress.flags & 256)
  8755. return popSuspenseHandler(workInProgress), workInProgress;
  8756. popSuspenseHandler(workInProgress);
  8757. return null;
  8758. }
  8759. if (0 !== (workInProgress.flags & 128))
  8760. throw Error(formatProdErrorMessage(558));
  8761. }
  8762. bubbleProperties(workInProgress);
  8763. return null;
  8764. case 13:
  8765. newProps = workInProgress.memoizedState;
  8766. if (
  8767. null === current ||
  8768. (null !== current.memoizedState &&
  8769. null !== current.memoizedState.dehydrated)
  8770. ) {
  8771. type = newProps;
  8772. nextResource = popHydrationState(workInProgress);
  8773. if (null !== type && null !== type.dehydrated) {
  8774. if (null === current) {
  8775. if (!nextResource) throw Error(formatProdErrorMessage(318));
  8776. nextResource = workInProgress.memoizedState;
  8777. nextResource =
  8778. null !== nextResource ? nextResource.dehydrated : null;
  8779. if (!nextResource) throw Error(formatProdErrorMessage(317));
  8780. nextResource[internalInstanceKey] = workInProgress;
  8781. bubbleProperties(workInProgress);
  8782. 0 !== (workInProgress.mode & 2) &&
  8783. null !== type &&
  8784. ((type = workInProgress.child),
  8785. null !== type &&
  8786. (workInProgress.treeBaseDuration -= type.treeBaseDuration));
  8787. } else
  8788. resetHydrationState(),
  8789. 0 === (workInProgress.flags & 128) &&
  8790. (type = workInProgress.memoizedState = null),
  8791. (workInProgress.flags |= 4),
  8792. bubbleProperties(workInProgress),
  8793. 0 !== (workInProgress.mode & 2) &&
  8794. null !== type &&
  8795. ((type = workInProgress.child),
  8796. null !== type &&
  8797. (workInProgress.treeBaseDuration -= type.treeBaseDuration));
  8798. type = !1;
  8799. } else
  8800. (type = upgradeHydrationErrorsToRecoverable()),
  8801. null !== current &&
  8802. null !== current.memoizedState &&
  8803. (current.memoizedState.hydrationErrors = type),
  8804. (type = !0);
  8805. if (!type) {
  8806. if (workInProgress.flags & 256)
  8807. return popSuspenseHandler(workInProgress), workInProgress;
  8808. popSuspenseHandler(workInProgress);
  8809. return null;
  8810. }
  8811. }
  8812. popSuspenseHandler(workInProgress);
  8813. if (0 !== (workInProgress.flags & 128))
  8814. return (
  8815. (workInProgress.lanes = renderLanes),
  8816. 0 !== (workInProgress.mode & 2) &&
  8817. transferActualDuration(workInProgress),
  8818. workInProgress
  8819. );
  8820. renderLanes = null !== newProps;
  8821. current = null !== current && null !== current.memoizedState;
  8822. renderLanes &&
  8823. ((newProps = workInProgress.child),
  8824. (type = null),
  8825. null !== newProps.alternate &&
  8826. null !== newProps.alternate.memoizedState &&
  8827. null !== newProps.alternate.memoizedState.cachePool &&
  8828. (type = newProps.alternate.memoizedState.cachePool.pool),
  8829. (nextResource = null),
  8830. null !== newProps.memoizedState &&
  8831. null !== newProps.memoizedState.cachePool &&
  8832. (nextResource = newProps.memoizedState.cachePool.pool),
  8833. nextResource !== type && (newProps.flags |= 2048));
  8834. renderLanes !== current &&
  8835. renderLanes &&
  8836. (workInProgress.child.flags |= 8192);
  8837. scheduleRetryEffect(workInProgress, workInProgress.updateQueue);
  8838. bubbleProperties(workInProgress);
  8839. 0 !== (workInProgress.mode & 2) &&
  8840. renderLanes &&
  8841. ((current = workInProgress.child),
  8842. null !== current &&
  8843. (workInProgress.treeBaseDuration -= current.treeBaseDuration));
  8844. return null;
  8845. case 4:
  8846. return (
  8847. popHostContainer(),
  8848. null === current &&
  8849. listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
  8850. bubbleProperties(workInProgress),
  8851. null
  8852. );
  8853. case 10:
  8854. return (
  8855. popProvider(workInProgress.type), bubbleProperties(workInProgress), null
  8856. );
  8857. case 19:
  8858. pop(suspenseStackCursor);
  8859. newProps = workInProgress.memoizedState;
  8860. if (null === newProps) return bubbleProperties(workInProgress), null;
  8861. type = 0 !== (workInProgress.flags & 128);
  8862. nextResource = newProps.rendering;
  8863. if (null === nextResource)
  8864. if (type) cutOffTailIfNeeded(newProps, !1);
  8865. else {
  8866. if (
  8867. 0 !== workInProgressRootExitStatus ||
  8868. (null !== current && 0 !== (current.flags & 128))
  8869. )
  8870. for (current = workInProgress.child; null !== current; ) {
  8871. nextResource = findFirstSuspended(current);
  8872. if (null !== nextResource) {
  8873. workInProgress.flags |= 128;
  8874. cutOffTailIfNeeded(newProps, !1);
  8875. current = nextResource.updateQueue;
  8876. workInProgress.updateQueue = current;
  8877. scheduleRetryEffect(workInProgress, current);
  8878. workInProgress.subtreeFlags = 0;
  8879. current = renderLanes;
  8880. for (renderLanes = workInProgress.child; null !== renderLanes; )
  8881. resetWorkInProgress(renderLanes, current),
  8882. (renderLanes = renderLanes.sibling);
  8883. push(
  8884. suspenseStackCursor,
  8885. (suspenseStackCursor.current & 1) | 2
  8886. );
  8887. isHydrating &&
  8888. pushTreeFork(workInProgress, newProps.treeForkCount);
  8889. return workInProgress.child;
  8890. }
  8891. current = current.sibling;
  8892. }
  8893. null !== newProps.tail &&
  8894. now$1() > workInProgressRootRenderTargetTime &&
  8895. ((workInProgress.flags |= 128),
  8896. (type = !0),
  8897. cutOffTailIfNeeded(newProps, !1),
  8898. (workInProgress.lanes = 4194304));
  8899. }
  8900. else {
  8901. if (!type)
  8902. if (
  8903. ((current = findFirstSuspended(nextResource)), null !== current)
  8904. ) {
  8905. if (
  8906. ((workInProgress.flags |= 128),
  8907. (type = !0),
  8908. (current = current.updateQueue),
  8909. (workInProgress.updateQueue = current),
  8910. scheduleRetryEffect(workInProgress, current),
  8911. cutOffTailIfNeeded(newProps, !0),
  8912. null === newProps.tail &&
  8913. "hidden" === newProps.tailMode &&
  8914. !nextResource.alternate &&
  8915. !isHydrating)
  8916. )
  8917. return bubbleProperties(workInProgress), null;
  8918. } else
  8919. 2 * now$1() - newProps.renderingStartTime >
  8920. workInProgressRootRenderTargetTime &&
  8921. 536870912 !== renderLanes &&
  8922. ((workInProgress.flags |= 128),
  8923. (type = !0),
  8924. cutOffTailIfNeeded(newProps, !1),
  8925. (workInProgress.lanes = 4194304));
  8926. newProps.isBackwards
  8927. ? ((nextResource.sibling = workInProgress.child),
  8928. (workInProgress.child = nextResource))
  8929. : ((current = newProps.last),
  8930. null !== current
  8931. ? (current.sibling = nextResource)
  8932. : (workInProgress.child = nextResource),
  8933. (newProps.last = nextResource));
  8934. }
  8935. if (null !== newProps.tail)
  8936. return (
  8937. (current = newProps.tail),
  8938. (newProps.rendering = current),
  8939. (newProps.tail = current.sibling),
  8940. (newProps.renderingStartTime = now$1()),
  8941. (current.sibling = null),
  8942. (renderLanes = suspenseStackCursor.current),
  8943. push(
  8944. suspenseStackCursor,
  8945. type ? (renderLanes & 1) | 2 : renderLanes & 1
  8946. ),
  8947. isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount),
  8948. current
  8949. );
  8950. bubbleProperties(workInProgress);
  8951. return null;
  8952. case 22:
  8953. case 23:
  8954. return (
  8955. popSuspenseHandler(workInProgress),
  8956. popHiddenContext(),
  8957. (newProps = null !== workInProgress.memoizedState),
  8958. null !== current
  8959. ? (null !== current.memoizedState) !== newProps &&
  8960. (workInProgress.flags |= 8192)
  8961. : newProps && (workInProgress.flags |= 8192),
  8962. newProps
  8963. ? 0 !== (renderLanes & 536870912) &&
  8964. 0 === (workInProgress.flags & 128) &&
  8965. (bubbleProperties(workInProgress),
  8966. workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))
  8967. : bubbleProperties(workInProgress),
  8968. (renderLanes = workInProgress.updateQueue),
  8969. null !== renderLanes &&
  8970. scheduleRetryEffect(workInProgress, renderLanes.retryQueue),
  8971. (renderLanes = null),
  8972. null !== current &&
  8973. null !== current.memoizedState &&
  8974. null !== current.memoizedState.cachePool &&
  8975. (renderLanes = current.memoizedState.cachePool.pool),
  8976. (newProps = null),
  8977. null !== workInProgress.memoizedState &&
  8978. null !== workInProgress.memoizedState.cachePool &&
  8979. (newProps = workInProgress.memoizedState.cachePool.pool),
  8980. newProps !== renderLanes && (workInProgress.flags |= 2048),
  8981. null !== current && pop(resumedCache),
  8982. null
  8983. );
  8984. case 24:
  8985. return (
  8986. (renderLanes = null),
  8987. null !== current && (renderLanes = current.memoizedState.cache),
  8988. workInProgress.memoizedState.cache !== renderLanes &&
  8989. (workInProgress.flags |= 2048),
  8990. popProvider(CacheContext),
  8991. bubbleProperties(workInProgress),
  8992. null
  8993. );
  8994. case 25:
  8995. return null;
  8996. case 30:
  8997. return null;
  8998. }
  8999. throw Error(formatProdErrorMessage(156, workInProgress.tag));
  9000. }
  9001. function unwindWork(current, workInProgress) {
  9002. popTreeContext(workInProgress);
  9003. switch (workInProgress.tag) {
  9004. case 1:
  9005. return (
  9006. (current = workInProgress.flags),
  9007. current & 65536
  9008. ? ((workInProgress.flags = (current & -65537) | 128),
  9009. 0 !== (workInProgress.mode & 2) &&
  9010. transferActualDuration(workInProgress),
  9011. workInProgress)
  9012. : null
  9013. );
  9014. case 3:
  9015. return (
  9016. popProvider(CacheContext),
  9017. popHostContainer(),
  9018. (current = workInProgress.flags),
  9019. 0 !== (current & 65536) && 0 === (current & 128)
  9020. ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
  9021. : null
  9022. );
  9023. case 26:
  9024. case 27:
  9025. case 5:
  9026. return popHostContext(workInProgress), null;
  9027. case 31:
  9028. if (null !== workInProgress.memoizedState) {
  9029. popSuspenseHandler(workInProgress);
  9030. if (null === workInProgress.alternate)
  9031. throw Error(formatProdErrorMessage(340));
  9032. resetHydrationState();
  9033. }
  9034. current = workInProgress.flags;
  9035. return current & 65536
  9036. ? ((workInProgress.flags = (current & -65537) | 128),
  9037. 0 !== (workInProgress.mode & 2) &&
  9038. transferActualDuration(workInProgress),
  9039. workInProgress)
  9040. : null;
  9041. case 13:
  9042. popSuspenseHandler(workInProgress);
  9043. current = workInProgress.memoizedState;
  9044. if (null !== current && null !== current.dehydrated) {
  9045. if (null === workInProgress.alternate)
  9046. throw Error(formatProdErrorMessage(340));
  9047. resetHydrationState();
  9048. }
  9049. current = workInProgress.flags;
  9050. return current & 65536
  9051. ? ((workInProgress.flags = (current & -65537) | 128),
  9052. 0 !== (workInProgress.mode & 2) &&
  9053. transferActualDuration(workInProgress),
  9054. workInProgress)
  9055. : null;
  9056. case 19:
  9057. return pop(suspenseStackCursor), null;
  9058. case 4:
  9059. return popHostContainer(), null;
  9060. case 10:
  9061. return popProvider(workInProgress.type), null;
  9062. case 22:
  9063. case 23:
  9064. return (
  9065. popSuspenseHandler(workInProgress),
  9066. popHiddenContext(),
  9067. null !== current && pop(resumedCache),
  9068. (current = workInProgress.flags),
  9069. current & 65536
  9070. ? ((workInProgress.flags = (current & -65537) | 128),
  9071. 0 !== (workInProgress.mode & 2) &&
  9072. transferActualDuration(workInProgress),
  9073. workInProgress)
  9074. : null
  9075. );
  9076. case 24:
  9077. return popProvider(CacheContext), null;
  9078. case 25:
  9079. return null;
  9080. default:
  9081. return null;
  9082. }
  9083. }
  9084. function unwindInterruptedWork(current, interruptedWork) {
  9085. popTreeContext(interruptedWork);
  9086. switch (interruptedWork.tag) {
  9087. case 3:
  9088. popProvider(CacheContext);
  9089. popHostContainer();
  9090. break;
  9091. case 26:
  9092. case 27:
  9093. case 5:
  9094. popHostContext(interruptedWork);
  9095. break;
  9096. case 4:
  9097. popHostContainer();
  9098. break;
  9099. case 31:
  9100. null !== interruptedWork.memoizedState &&
  9101. popSuspenseHandler(interruptedWork);
  9102. break;
  9103. case 13:
  9104. popSuspenseHandler(interruptedWork);
  9105. break;
  9106. case 19:
  9107. pop(suspenseStackCursor);
  9108. break;
  9109. case 10:
  9110. popProvider(interruptedWork.type);
  9111. break;
  9112. case 22:
  9113. case 23:
  9114. popSuspenseHandler(interruptedWork);
  9115. popHiddenContext();
  9116. null !== current && pop(resumedCache);
  9117. break;
  9118. case 24:
  9119. popProvider(CacheContext);
  9120. }
  9121. }
  9122. function shouldProfile(current) {
  9123. return 0 !== (current.mode & 2);
  9124. }
  9125. function commitHookLayoutEffects(finishedWork, hookFlags) {
  9126. shouldProfile(finishedWork)
  9127. ? (startEffectTimer(),
  9128. commitHookEffectListMount(hookFlags, finishedWork),
  9129. recordEffectDuration())
  9130. : commitHookEffectListMount(hookFlags, finishedWork);
  9131. }
  9132. function commitHookLayoutUnmountEffects(
  9133. finishedWork,
  9134. nearestMountedAncestor,
  9135. hookFlags
  9136. ) {
  9137. shouldProfile(finishedWork)
  9138. ? (startEffectTimer(),
  9139. commitHookEffectListUnmount(
  9140. hookFlags,
  9141. finishedWork,
  9142. nearestMountedAncestor
  9143. ),
  9144. recordEffectDuration())
  9145. : commitHookEffectListUnmount(
  9146. hookFlags,
  9147. finishedWork,
  9148. nearestMountedAncestor
  9149. );
  9150. }
  9151. function commitHookEffectListMount(flags, finishedWork) {
  9152. try {
  9153. var updateQueue = finishedWork.updateQueue,
  9154. lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  9155. if (null !== lastEffect) {
  9156. var firstEffect = lastEffect.next;
  9157. updateQueue = firstEffect;
  9158. do {
  9159. if ((updateQueue.tag & flags) === flags) {
  9160. lastEffect = void 0;
  9161. var create = updateQueue.create,
  9162. inst = updateQueue.inst;
  9163. lastEffect = create();
  9164. inst.destroy = lastEffect;
  9165. }
  9166. updateQueue = updateQueue.next;
  9167. } while (updateQueue !== firstEffect);
  9168. }
  9169. } catch (error) {
  9170. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9171. }
  9172. }
  9173. function commitHookEffectListUnmount(
  9174. flags,
  9175. finishedWork,
  9176. nearestMountedAncestor$jscomp$0
  9177. ) {
  9178. try {
  9179. var updateQueue = finishedWork.updateQueue,
  9180. lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  9181. if (null !== lastEffect) {
  9182. var firstEffect = lastEffect.next;
  9183. updateQueue = firstEffect;
  9184. do {
  9185. if ((updateQueue.tag & flags) === flags) {
  9186. var inst = updateQueue.inst,
  9187. destroy = inst.destroy;
  9188. if (void 0 !== destroy) {
  9189. inst.destroy = void 0;
  9190. lastEffect = finishedWork;
  9191. var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
  9192. destroy_ = destroy;
  9193. try {
  9194. destroy_();
  9195. } catch (error) {
  9196. captureCommitPhaseError(
  9197. lastEffect,
  9198. nearestMountedAncestor,
  9199. error
  9200. );
  9201. }
  9202. }
  9203. }
  9204. updateQueue = updateQueue.next;
  9205. } while (updateQueue !== firstEffect);
  9206. }
  9207. } catch (error) {
  9208. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9209. }
  9210. }
  9211. function commitHookPassiveMountEffects(finishedWork, hookFlags) {
  9212. shouldProfile(finishedWork)
  9213. ? (startEffectTimer(),
  9214. commitHookEffectListMount(hookFlags, finishedWork),
  9215. recordEffectDuration())
  9216. : commitHookEffectListMount(hookFlags, finishedWork);
  9217. }
  9218. function commitHookPassiveUnmountEffects(
  9219. finishedWork,
  9220. nearestMountedAncestor,
  9221. hookFlags
  9222. ) {
  9223. shouldProfile(finishedWork)
  9224. ? (startEffectTimer(),
  9225. commitHookEffectListUnmount(
  9226. hookFlags,
  9227. finishedWork,
  9228. nearestMountedAncestor
  9229. ),
  9230. recordEffectDuration())
  9231. : commitHookEffectListUnmount(
  9232. hookFlags,
  9233. finishedWork,
  9234. nearestMountedAncestor
  9235. );
  9236. }
  9237. function commitClassCallbacks(finishedWork) {
  9238. var updateQueue = finishedWork.updateQueue;
  9239. if (null !== updateQueue) {
  9240. var instance = finishedWork.stateNode;
  9241. try {
  9242. commitCallbacks(updateQueue, instance);
  9243. } catch (error) {
  9244. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9245. }
  9246. }
  9247. }
  9248. function safelyCallComponentWillUnmount(
  9249. current,
  9250. nearestMountedAncestor,
  9251. instance
  9252. ) {
  9253. instance.props = resolveClassComponentProps(
  9254. current.type,
  9255. current.memoizedProps
  9256. );
  9257. instance.state = current.memoizedState;
  9258. if (shouldProfile(current)) {
  9259. startEffectTimer();
  9260. try {
  9261. instance.componentWillUnmount();
  9262. } catch (error) {
  9263. captureCommitPhaseError(current, nearestMountedAncestor, error);
  9264. }
  9265. recordEffectDuration();
  9266. } else
  9267. try {
  9268. instance.componentWillUnmount();
  9269. } catch (error$159) {
  9270. captureCommitPhaseError(current, nearestMountedAncestor, error$159);
  9271. }
  9272. }
  9273. function safelyAttachRef(current, nearestMountedAncestor) {
  9274. try {
  9275. var ref = current.ref;
  9276. if (null !== ref) {
  9277. switch (current.tag) {
  9278. case 26:
  9279. case 27:
  9280. case 5:
  9281. var instanceToUse = current.stateNode;
  9282. break;
  9283. case 30:
  9284. instanceToUse = current.stateNode;
  9285. break;
  9286. default:
  9287. instanceToUse = current.stateNode;
  9288. }
  9289. if ("function" === typeof ref)
  9290. if (shouldProfile(current))
  9291. try {
  9292. startEffectTimer(), (current.refCleanup = ref(instanceToUse));
  9293. } finally {
  9294. recordEffectDuration();
  9295. }
  9296. else current.refCleanup = ref(instanceToUse);
  9297. else ref.current = instanceToUse;
  9298. }
  9299. } catch (error) {
  9300. captureCommitPhaseError(current, nearestMountedAncestor, error);
  9301. }
  9302. }
  9303. function safelyDetachRef(current, nearestMountedAncestor) {
  9304. var ref = current.ref,
  9305. refCleanup = current.refCleanup;
  9306. if (null !== ref)
  9307. if ("function" === typeof refCleanup)
  9308. try {
  9309. if (shouldProfile(current))
  9310. try {
  9311. startEffectTimer(), refCleanup();
  9312. } finally {
  9313. recordEffectDuration(current);
  9314. }
  9315. else refCleanup();
  9316. } catch (error) {
  9317. captureCommitPhaseError(current, nearestMountedAncestor, error);
  9318. } finally {
  9319. (current.refCleanup = null),
  9320. (current = current.alternate),
  9321. null != current && (current.refCleanup = null);
  9322. }
  9323. else if ("function" === typeof ref)
  9324. try {
  9325. if (shouldProfile(current))
  9326. try {
  9327. startEffectTimer(), ref(null);
  9328. } finally {
  9329. recordEffectDuration(current);
  9330. }
  9331. else ref(null);
  9332. } catch (error$160) {
  9333. captureCommitPhaseError(current, nearestMountedAncestor, error$160);
  9334. }
  9335. else ref.current = null;
  9336. }
  9337. function commitProfilerUpdate(
  9338. finishedWork,
  9339. current,
  9340. commitStartTime,
  9341. effectDuration
  9342. ) {
  9343. try {
  9344. var _finishedWork$memoize = finishedWork.memoizedProps,
  9345. id = _finishedWork$memoize.id,
  9346. onCommit = _finishedWork$memoize.onCommit,
  9347. onRender = _finishedWork$memoize.onRender;
  9348. current = null === current ? "mount" : "update";
  9349. currentUpdateIsNested && (current = "nested-update");
  9350. "function" === typeof onRender &&
  9351. onRender(
  9352. id,
  9353. current,
  9354. finishedWork.actualDuration,
  9355. finishedWork.treeBaseDuration,
  9356. finishedWork.actualStartTime,
  9357. commitStartTime
  9358. );
  9359. "function" === typeof onCommit &&
  9360. onCommit(id, current, effectDuration, commitStartTime);
  9361. } catch (error) {
  9362. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9363. }
  9364. }
  9365. function commitHostMount(finishedWork) {
  9366. var type = finishedWork.type,
  9367. props = finishedWork.memoizedProps,
  9368. instance = finishedWork.stateNode;
  9369. try {
  9370. a: switch (type) {
  9371. case "button":
  9372. case "input":
  9373. case "select":
  9374. case "textarea":
  9375. props.autoFocus && instance.focus();
  9376. break a;
  9377. case "img":
  9378. props.src
  9379. ? (instance.src = props.src)
  9380. : props.srcSet && (instance.srcset = props.srcSet);
  9381. }
  9382. } catch (error) {
  9383. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9384. }
  9385. }
  9386. function commitHostUpdate(finishedWork, newProps, oldProps) {
  9387. try {
  9388. var domElement = finishedWork.stateNode;
  9389. updateProperties(domElement, finishedWork.type, oldProps, newProps);
  9390. domElement[internalPropsKey] = newProps;
  9391. } catch (error) {
  9392. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9393. }
  9394. }
  9395. function isHostParent(fiber) {
  9396. return (
  9397. 5 === fiber.tag ||
  9398. 3 === fiber.tag ||
  9399. 26 === fiber.tag ||
  9400. (27 === fiber.tag && isSingletonScope(fiber.type)) ||
  9401. 4 === fiber.tag
  9402. );
  9403. }
  9404. function getHostSibling(fiber) {
  9405. a: for (;;) {
  9406. for (; null === fiber.sibling; ) {
  9407. if (null === fiber.return || isHostParent(fiber.return)) return null;
  9408. fiber = fiber.return;
  9409. }
  9410. fiber.sibling.return = fiber.return;
  9411. for (
  9412. fiber = fiber.sibling;
  9413. 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;
  9414. ) {
  9415. if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
  9416. if (fiber.flags & 2) continue a;
  9417. if (null === fiber.child || 4 === fiber.tag) continue a;
  9418. else (fiber.child.return = fiber), (fiber = fiber.child);
  9419. }
  9420. if (!(fiber.flags & 2)) return fiber.stateNode;
  9421. }
  9422. }
  9423. function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  9424. var tag = node.tag;
  9425. if (5 === tag || 6 === tag)
  9426. (node = node.stateNode),
  9427. before
  9428. ? (9 === parent.nodeType
  9429. ? parent.body
  9430. : "HTML" === parent.nodeName
  9431. ? parent.ownerDocument.body
  9432. : parent
  9433. ).insertBefore(node, before)
  9434. : ((before =
  9435. 9 === parent.nodeType
  9436. ? parent.body
  9437. : "HTML" === parent.nodeName
  9438. ? parent.ownerDocument.body
  9439. : parent),
  9440. before.appendChild(node),
  9441. (parent = parent._reactRootContainer),
  9442. (null !== parent && void 0 !== parent) ||
  9443. null !== before.onclick ||
  9444. (before.onclick = noop$1));
  9445. else if (
  9446. 4 !== tag &&
  9447. (27 === tag &&
  9448. isSingletonScope(node.type) &&
  9449. ((parent = node.stateNode), (before = null)),
  9450. (node = node.child),
  9451. null !== node)
  9452. )
  9453. for (
  9454. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  9455. node = node.sibling;
  9456. null !== node;
  9457. )
  9458. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  9459. (node = node.sibling);
  9460. }
  9461. function insertOrAppendPlacementNode(node, before, parent) {
  9462. var tag = node.tag;
  9463. if (5 === tag || 6 === tag)
  9464. (node = node.stateNode),
  9465. before ? parent.insertBefore(node, before) : parent.appendChild(node);
  9466. else if (
  9467. 4 !== tag &&
  9468. (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),
  9469. (node = node.child),
  9470. null !== node)
  9471. )
  9472. for (
  9473. insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
  9474. null !== node;
  9475. )
  9476. insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);
  9477. }
  9478. function commitHostSingletonAcquisition(finishedWork) {
  9479. var singleton = finishedWork.stateNode,
  9480. props = finishedWork.memoizedProps;
  9481. try {
  9482. for (
  9483. var type = finishedWork.type, attributes = singleton.attributes;
  9484. attributes.length;
  9485. )
  9486. singleton.removeAttributeNode(attributes[0]);
  9487. setInitialProperties(singleton, type, props);
  9488. singleton[internalInstanceKey] = finishedWork;
  9489. singleton[internalPropsKey] = props;
  9490. } catch (error) {
  9491. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9492. }
  9493. }
  9494. var offscreenSubtreeIsHidden = !1,
  9495. offscreenSubtreeWasHidden = !1,
  9496. needsFormReset = !1,
  9497. PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
  9498. nextEffect = null,
  9499. inProgressLanes = null,
  9500. inProgressRoot = null;
  9501. function isHydratingParent(current, finishedWork) {
  9502. return 31 === finishedWork.tag
  9503. ? ((finishedWork = finishedWork.memoizedState),
  9504. null !== current.memoizedState && null === finishedWork)
  9505. : 13 === finishedWork.tag
  9506. ? ((current = current.memoizedState),
  9507. (finishedWork = finishedWork.memoizedState),
  9508. null !== current &&
  9509. null !== current.dehydrated &&
  9510. (null === finishedWork || null === finishedWork.dehydrated))
  9511. : 3 === finishedWork.tag
  9512. ? current.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256)
  9513. : !1;
  9514. }
  9515. function commitBeforeMutationEffects(root, firstChild) {
  9516. root = root.containerInfo;
  9517. eventsEnabled = _enabled;
  9518. root = getActiveElementDeep(root);
  9519. if (hasSelectionCapabilities(root)) {
  9520. if ("selectionStart" in root)
  9521. var JSCompiler_temp = {
  9522. start: root.selectionStart,
  9523. end: root.selectionEnd
  9524. };
  9525. else
  9526. a: {
  9527. JSCompiler_temp =
  9528. ((JSCompiler_temp = root.ownerDocument) &&
  9529. JSCompiler_temp.defaultView) ||
  9530. window;
  9531. var selection =
  9532. JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
  9533. if (selection && 0 !== selection.rangeCount) {
  9534. JSCompiler_temp = selection.anchorNode;
  9535. var anchorOffset = selection.anchorOffset,
  9536. focusNode = selection.focusNode;
  9537. selection = selection.focusOffset;
  9538. try {
  9539. JSCompiler_temp.nodeType, focusNode.nodeType;
  9540. } catch (e$22) {
  9541. JSCompiler_temp = null;
  9542. break a;
  9543. }
  9544. var length = 0,
  9545. start = -1,
  9546. end = -1,
  9547. indexWithinAnchor = 0,
  9548. indexWithinFocus = 0,
  9549. node = root,
  9550. parentNode = null;
  9551. b: for (;;) {
  9552. for (var next; ; ) {
  9553. node !== JSCompiler_temp ||
  9554. (0 !== anchorOffset && 3 !== node.nodeType) ||
  9555. (start = length + anchorOffset);
  9556. node !== focusNode ||
  9557. (0 !== selection && 3 !== node.nodeType) ||
  9558. (end = length + selection);
  9559. 3 === node.nodeType && (length += node.nodeValue.length);
  9560. if (null === (next = node.firstChild)) break;
  9561. parentNode = node;
  9562. node = next;
  9563. }
  9564. for (;;) {
  9565. if (node === root) break b;
  9566. parentNode === JSCompiler_temp &&
  9567. ++indexWithinAnchor === anchorOffset &&
  9568. (start = length);
  9569. parentNode === focusNode &&
  9570. ++indexWithinFocus === selection &&
  9571. (end = length);
  9572. if (null !== (next = node.nextSibling)) break;
  9573. node = parentNode;
  9574. parentNode = node.parentNode;
  9575. }
  9576. node = next;
  9577. }
  9578. JSCompiler_temp =
  9579. -1 === start || -1 === end ? null : { start: start, end: end };
  9580. } else JSCompiler_temp = null;
  9581. }
  9582. JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
  9583. } else JSCompiler_temp = null;
  9584. selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };
  9585. _enabled = !1;
  9586. for (nextEffect = firstChild; null !== nextEffect; )
  9587. if (
  9588. ((firstChild = nextEffect),
  9589. (root = firstChild.child),
  9590. 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
  9591. )
  9592. (root.return = firstChild), (nextEffect = root);
  9593. else
  9594. for (; null !== nextEffect; ) {
  9595. firstChild = nextEffect;
  9596. focusNode = firstChild.alternate;
  9597. root = firstChild.flags;
  9598. switch (firstChild.tag) {
  9599. case 0:
  9600. if (
  9601. 0 !== (root & 4) &&
  9602. ((root = firstChild.updateQueue),
  9603. (root = null !== root ? root.events : null),
  9604. null !== root)
  9605. )
  9606. for (
  9607. JSCompiler_temp = 0;
  9608. JSCompiler_temp < root.length;
  9609. JSCompiler_temp++
  9610. )
  9611. (anchorOffset = root[JSCompiler_temp]),
  9612. (anchorOffset.ref.impl = anchorOffset.nextImpl);
  9613. break;
  9614. case 11:
  9615. case 15:
  9616. break;
  9617. case 1:
  9618. if (0 !== (root & 1024) && null !== focusNode) {
  9619. root = void 0;
  9620. JSCompiler_temp = firstChild;
  9621. anchorOffset = focusNode.memoizedProps;
  9622. focusNode = focusNode.memoizedState;
  9623. selection = JSCompiler_temp.stateNode;
  9624. try {
  9625. var resolvedPrevProps = resolveClassComponentProps(
  9626. JSCompiler_temp.type,
  9627. anchorOffset
  9628. );
  9629. root = selection.getSnapshotBeforeUpdate(
  9630. resolvedPrevProps,
  9631. focusNode
  9632. );
  9633. selection.__reactInternalSnapshotBeforeUpdate = root;
  9634. } catch (error) {
  9635. captureCommitPhaseError(
  9636. JSCompiler_temp,
  9637. JSCompiler_temp.return,
  9638. error
  9639. );
  9640. }
  9641. }
  9642. break;
  9643. case 3:
  9644. if (0 !== (root & 1024))
  9645. if (
  9646. ((root = firstChild.stateNode.containerInfo),
  9647. (JSCompiler_temp = root.nodeType),
  9648. 9 === JSCompiler_temp)
  9649. )
  9650. clearContainerSparingly(root);
  9651. else if (1 === JSCompiler_temp)
  9652. switch (root.nodeName) {
  9653. case "HEAD":
  9654. case "HTML":
  9655. case "BODY":
  9656. clearContainerSparingly(root);
  9657. break;
  9658. default:
  9659. root.textContent = "";
  9660. }
  9661. break;
  9662. case 5:
  9663. case 26:
  9664. case 27:
  9665. case 6:
  9666. case 4:
  9667. case 17:
  9668. break;
  9669. default:
  9670. if (0 !== (root & 1024)) throw Error(formatProdErrorMessage(163));
  9671. }
  9672. root = firstChild.sibling;
  9673. if (null !== root) {
  9674. root.return = firstChild.return;
  9675. nextEffect = root;
  9676. break;
  9677. }
  9678. nextEffect = firstChild.return;
  9679. }
  9680. }
  9681. function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
  9682. var prevEffectStart = pushComponentEffectStart(),
  9683. prevEffectDuration = pushComponentEffectDuration(),
  9684. prevEffectErrors = pushComponentEffectErrors(),
  9685. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  9686. flags = finishedWork.flags;
  9687. switch (finishedWork.tag) {
  9688. case 0:
  9689. case 11:
  9690. case 15:
  9691. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9692. flags & 4 && commitHookLayoutEffects(finishedWork, 5);
  9693. break;
  9694. case 1:
  9695. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9696. if (flags & 4)
  9697. if (((finishedRoot = finishedWork.stateNode), null === current))
  9698. if (shouldProfile(finishedWork)) {
  9699. startEffectTimer();
  9700. try {
  9701. finishedRoot.componentDidMount();
  9702. } catch (error) {
  9703. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9704. }
  9705. recordEffectDuration();
  9706. } else
  9707. try {
  9708. finishedRoot.componentDidMount();
  9709. } catch (error$156) {
  9710. captureCommitPhaseError(
  9711. finishedWork,
  9712. finishedWork.return,
  9713. error$156
  9714. );
  9715. }
  9716. else {
  9717. var prevProps = resolveClassComponentProps(
  9718. finishedWork.type,
  9719. current.memoizedProps
  9720. );
  9721. current = current.memoizedState;
  9722. if (shouldProfile(finishedWork)) {
  9723. startEffectTimer();
  9724. try {
  9725. finishedRoot.componentDidUpdate(
  9726. prevProps,
  9727. current,
  9728. finishedRoot.__reactInternalSnapshotBeforeUpdate
  9729. );
  9730. } catch (error$157) {
  9731. captureCommitPhaseError(
  9732. finishedWork,
  9733. finishedWork.return,
  9734. error$157
  9735. );
  9736. }
  9737. recordEffectDuration();
  9738. } else
  9739. try {
  9740. finishedRoot.componentDidUpdate(
  9741. prevProps,
  9742. current,
  9743. finishedRoot.__reactInternalSnapshotBeforeUpdate
  9744. );
  9745. } catch (error$158) {
  9746. captureCommitPhaseError(
  9747. finishedWork,
  9748. finishedWork.return,
  9749. error$158
  9750. );
  9751. }
  9752. }
  9753. flags & 64 && commitClassCallbacks(finishedWork);
  9754. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  9755. break;
  9756. case 3:
  9757. current = pushNestedEffectDurations();
  9758. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9759. if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) {
  9760. prevProps = null;
  9761. if (null !== finishedWork.child)
  9762. switch (finishedWork.child.tag) {
  9763. case 27:
  9764. case 5:
  9765. prevProps = finishedWork.child.stateNode;
  9766. break;
  9767. case 1:
  9768. prevProps = finishedWork.child.stateNode;
  9769. }
  9770. try {
  9771. commitCallbacks(flags, prevProps);
  9772. } catch (error) {
  9773. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9774. }
  9775. }
  9776. finishedRoot.effectDuration += popNestedEffectDurations(current);
  9777. break;
  9778. case 27:
  9779. null === current &&
  9780. flags & 4 &&
  9781. commitHostSingletonAcquisition(finishedWork);
  9782. case 26:
  9783. case 5:
  9784. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9785. null === current && flags & 4 && commitHostMount(finishedWork);
  9786. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  9787. break;
  9788. case 12:
  9789. flags & 4
  9790. ? ((flags = pushNestedEffectDurations()),
  9791. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork),
  9792. (finishedRoot = finishedWork.stateNode),
  9793. (finishedRoot.effectDuration += bubbleNestedEffectDurations(flags)),
  9794. commitProfilerUpdate(
  9795. finishedWork,
  9796. current,
  9797. commitStartTime,
  9798. finishedRoot.effectDuration
  9799. ))
  9800. : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9801. break;
  9802. case 31:
  9803. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9804. flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  9805. break;
  9806. case 13:
  9807. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9808. flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  9809. flags & 64 &&
  9810. ((finishedRoot = finishedWork.memoizedState),
  9811. null !== finishedRoot &&
  9812. ((finishedRoot = finishedRoot.dehydrated),
  9813. null !== finishedRoot &&
  9814. ((current = retryDehydratedSuspenseBoundary.bind(
  9815. null,
  9816. finishedWork
  9817. )),
  9818. registerSuspenseInstanceRetry(finishedRoot, current))));
  9819. break;
  9820. case 22:
  9821. flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
  9822. if (!flags) {
  9823. current =
  9824. (null !== current && null !== current.memoizedState) ||
  9825. offscreenSubtreeWasHidden;
  9826. prevProps = offscreenSubtreeIsHidden;
  9827. var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  9828. offscreenSubtreeIsHidden = flags;
  9829. (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden
  9830. ? (recursivelyTraverseReappearLayoutEffects(
  9831. finishedRoot,
  9832. finishedWork,
  9833. 0 !== (finishedWork.subtreeFlags & 8772)
  9834. ),
  9835. 0 !== (finishedWork.mode & 2) &&
  9836. 0 <= componentEffectStartTime &&
  9837. 0 <= componentEffectEndTime &&
  9838. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  9839. logComponentReappeared(
  9840. finishedWork,
  9841. componentEffectStartTime,
  9842. componentEffectEndTime
  9843. ))
  9844. : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9845. offscreenSubtreeIsHidden = prevProps;
  9846. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  9847. }
  9848. break;
  9849. case 30:
  9850. break;
  9851. default:
  9852. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9853. }
  9854. 0 !== (finishedWork.mode & 2) &&
  9855. 0 <= componentEffectStartTime &&
  9856. 0 <= componentEffectEndTime &&
  9857. ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  9858. logComponentEffect(
  9859. finishedWork,
  9860. componentEffectStartTime,
  9861. componentEffectEndTime,
  9862. componentEffectDuration,
  9863. componentEffectErrors
  9864. ),
  9865. null === finishedWork.alternate &&
  9866. null !== finishedWork.return &&
  9867. null !== finishedWork.return.alternate &&
  9868. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  9869. (isHydratingParent(finishedWork.return.alternate, finishedWork.return) ||
  9870. logComponentTrigger(
  9871. finishedWork,
  9872. componentEffectStartTime,
  9873. componentEffectEndTime,
  9874. "Mount"
  9875. )));
  9876. popComponentEffectStart(prevEffectStart);
  9877. popComponentEffectDuration(prevEffectDuration);
  9878. componentEffectErrors = prevEffectErrors;
  9879. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  9880. }
  9881. function detachFiberAfterEffects(fiber) {
  9882. var alternate = fiber.alternate;
  9883. null !== alternate &&
  9884. ((fiber.alternate = null), detachFiberAfterEffects(alternate));
  9885. fiber.child = null;
  9886. fiber.deletions = null;
  9887. fiber.sibling = null;
  9888. 5 === fiber.tag &&
  9889. ((alternate = fiber.stateNode),
  9890. null !== alternate && detachDeletedInstance(alternate));
  9891. fiber.stateNode = null;
  9892. fiber.return = null;
  9893. fiber.dependencies = null;
  9894. fiber.memoizedProps = null;
  9895. fiber.memoizedState = null;
  9896. fiber.pendingProps = null;
  9897. fiber.stateNode = null;
  9898. fiber.updateQueue = null;
  9899. }
  9900. var hostParent = null,
  9901. hostParentIsContainer = !1;
  9902. function recursivelyTraverseDeletionEffects(
  9903. finishedRoot,
  9904. nearestMountedAncestor,
  9905. parent
  9906. ) {
  9907. for (parent = parent.child; null !== parent; )
  9908. commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),
  9909. (parent = parent.sibling);
  9910. }
  9911. function commitDeletionEffectsOnFiber(
  9912. finishedRoot,
  9913. nearestMountedAncestor,
  9914. deletedFiber
  9915. ) {
  9916. if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
  9917. try {
  9918. injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
  9919. } catch (err) {}
  9920. var prevEffectStart = pushComponentEffectStart(),
  9921. prevEffectDuration = pushComponentEffectDuration(),
  9922. prevEffectErrors = pushComponentEffectErrors(),
  9923. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  9924. switch (deletedFiber.tag) {
  9925. case 26:
  9926. offscreenSubtreeWasHidden ||
  9927. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  9928. recursivelyTraverseDeletionEffects(
  9929. finishedRoot,
  9930. nearestMountedAncestor,
  9931. deletedFiber
  9932. );
  9933. deletedFiber.memoizedState
  9934. ? deletedFiber.memoizedState.count--
  9935. : deletedFiber.stateNode &&
  9936. ((finishedRoot = deletedFiber.stateNode),
  9937. finishedRoot.parentNode.removeChild(finishedRoot));
  9938. break;
  9939. case 27:
  9940. offscreenSubtreeWasHidden ||
  9941. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  9942. var prevHostParent = hostParent,
  9943. prevHostParentIsContainer = hostParentIsContainer;
  9944. isSingletonScope(deletedFiber.type) &&
  9945. ((hostParent = deletedFiber.stateNode), (hostParentIsContainer = !1));
  9946. recursivelyTraverseDeletionEffects(
  9947. finishedRoot,
  9948. nearestMountedAncestor,
  9949. deletedFiber
  9950. );
  9951. releaseSingletonInstance(deletedFiber.stateNode);
  9952. hostParent = prevHostParent;
  9953. hostParentIsContainer = prevHostParentIsContainer;
  9954. break;
  9955. case 5:
  9956. offscreenSubtreeWasHidden ||
  9957. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  9958. case 6:
  9959. prevHostParent = hostParent;
  9960. prevHostParentIsContainer = hostParentIsContainer;
  9961. hostParent = null;
  9962. recursivelyTraverseDeletionEffects(
  9963. finishedRoot,
  9964. nearestMountedAncestor,
  9965. deletedFiber
  9966. );
  9967. hostParent = prevHostParent;
  9968. hostParentIsContainer = prevHostParentIsContainer;
  9969. if (null !== hostParent)
  9970. if (hostParentIsContainer)
  9971. try {
  9972. (9 === hostParent.nodeType
  9973. ? hostParent.body
  9974. : "HTML" === hostParent.nodeName
  9975. ? hostParent.ownerDocument.body
  9976. : hostParent
  9977. ).removeChild(deletedFiber.stateNode);
  9978. } catch (error) {
  9979. captureCommitPhaseError(
  9980. deletedFiber,
  9981. nearestMountedAncestor,
  9982. error
  9983. );
  9984. }
  9985. else
  9986. try {
  9987. hostParent.removeChild(deletedFiber.stateNode);
  9988. } catch (error) {
  9989. captureCommitPhaseError(
  9990. deletedFiber,
  9991. nearestMountedAncestor,
  9992. error
  9993. );
  9994. }
  9995. break;
  9996. case 18:
  9997. null !== hostParent &&
  9998. (hostParentIsContainer
  9999. ? ((finishedRoot = hostParent),
  10000. clearHydrationBoundary(
  10001. 9 === finishedRoot.nodeType
  10002. ? finishedRoot.body
  10003. : "HTML" === finishedRoot.nodeName
  10004. ? finishedRoot.ownerDocument.body
  10005. : finishedRoot,
  10006. deletedFiber.stateNode
  10007. ),
  10008. retryIfBlockedOn(finishedRoot))
  10009. : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
  10010. break;
  10011. case 4:
  10012. prevHostParent = hostParent;
  10013. prevHostParentIsContainer = hostParentIsContainer;
  10014. hostParent = deletedFiber.stateNode.containerInfo;
  10015. hostParentIsContainer = !0;
  10016. recursivelyTraverseDeletionEffects(
  10017. finishedRoot,
  10018. nearestMountedAncestor,
  10019. deletedFiber
  10020. );
  10021. hostParent = prevHostParent;
  10022. hostParentIsContainer = prevHostParentIsContainer;
  10023. break;
  10024. case 0:
  10025. case 11:
  10026. case 14:
  10027. case 15:
  10028. commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor);
  10029. offscreenSubtreeWasHidden ||
  10030. commitHookLayoutUnmountEffects(deletedFiber, nearestMountedAncestor, 4);
  10031. recursivelyTraverseDeletionEffects(
  10032. finishedRoot,
  10033. nearestMountedAncestor,
  10034. deletedFiber
  10035. );
  10036. break;
  10037. case 1:
  10038. offscreenSubtreeWasHidden ||
  10039. (safelyDetachRef(deletedFiber, nearestMountedAncestor),
  10040. (prevHostParent = deletedFiber.stateNode),
  10041. "function" === typeof prevHostParent.componentWillUnmount &&
  10042. safelyCallComponentWillUnmount(
  10043. deletedFiber,
  10044. nearestMountedAncestor,
  10045. prevHostParent
  10046. ));
  10047. recursivelyTraverseDeletionEffects(
  10048. finishedRoot,
  10049. nearestMountedAncestor,
  10050. deletedFiber
  10051. );
  10052. break;
  10053. case 21:
  10054. recursivelyTraverseDeletionEffects(
  10055. finishedRoot,
  10056. nearestMountedAncestor,
  10057. deletedFiber
  10058. );
  10059. break;
  10060. case 22:
  10061. offscreenSubtreeWasHidden =
  10062. (prevHostParent = offscreenSubtreeWasHidden) ||
  10063. null !== deletedFiber.memoizedState;
  10064. recursivelyTraverseDeletionEffects(
  10065. finishedRoot,
  10066. nearestMountedAncestor,
  10067. deletedFiber
  10068. );
  10069. offscreenSubtreeWasHidden = prevHostParent;
  10070. break;
  10071. default:
  10072. recursivelyTraverseDeletionEffects(
  10073. finishedRoot,
  10074. nearestMountedAncestor,
  10075. deletedFiber
  10076. );
  10077. }
  10078. 0 !== (deletedFiber.mode & 2) &&
  10079. 0 <= componentEffectStartTime &&
  10080. 0 <= componentEffectEndTime &&
  10081. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  10082. logComponentEffect(
  10083. deletedFiber,
  10084. componentEffectStartTime,
  10085. componentEffectEndTime,
  10086. componentEffectDuration,
  10087. componentEffectErrors
  10088. );
  10089. popComponentEffectStart(prevEffectStart);
  10090. popComponentEffectDuration(prevEffectDuration);
  10091. componentEffectErrors = prevEffectErrors;
  10092. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10093. }
  10094. function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
  10095. if (
  10096. null === finishedWork.memoizedState &&
  10097. ((finishedRoot = finishedWork.alternate),
  10098. null !== finishedRoot &&
  10099. ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))
  10100. ) {
  10101. finishedRoot = finishedRoot.dehydrated;
  10102. try {
  10103. retryIfBlockedOn(finishedRoot);
  10104. } catch (error) {
  10105. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10106. }
  10107. }
  10108. }
  10109. function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
  10110. if (
  10111. null === finishedWork.memoizedState &&
  10112. ((finishedRoot = finishedWork.alternate),
  10113. null !== finishedRoot &&
  10114. ((finishedRoot = finishedRoot.memoizedState),
  10115. null !== finishedRoot &&
  10116. ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))
  10117. )
  10118. try {
  10119. retryIfBlockedOn(finishedRoot);
  10120. } catch (error) {
  10121. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10122. }
  10123. }
  10124. function getRetryCache(finishedWork) {
  10125. switch (finishedWork.tag) {
  10126. case 31:
  10127. case 13:
  10128. case 19:
  10129. var retryCache = finishedWork.stateNode;
  10130. null === retryCache &&
  10131. (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
  10132. return retryCache;
  10133. case 22:
  10134. return (
  10135. (finishedWork = finishedWork.stateNode),
  10136. (retryCache = finishedWork._retryCache),
  10137. null === retryCache &&
  10138. (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),
  10139. retryCache
  10140. );
  10141. default:
  10142. throw Error(formatProdErrorMessage(435, finishedWork.tag));
  10143. }
  10144. }
  10145. function attachSuspenseRetryListeners(finishedWork, wakeables) {
  10146. var retryCache = getRetryCache(finishedWork);
  10147. wakeables.forEach(function (wakeable) {
  10148. if (!retryCache.has(wakeable)) {
  10149. retryCache.add(wakeable);
  10150. if (isDevToolsPresent)
  10151. if (null !== inProgressLanes && null !== inProgressRoot)
  10152. restorePendingUpdaters(inProgressRoot, inProgressLanes);
  10153. else throw Error(formatProdErrorMessage(413));
  10154. var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
  10155. wakeable.then(retry, retry);
  10156. }
  10157. });
  10158. }
  10159. function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
  10160. var deletions = parentFiber.deletions;
  10161. if (null !== deletions)
  10162. for (var i = 0; i < deletions.length; i++) {
  10163. var childToDelete = deletions[i],
  10164. root = root$jscomp$0,
  10165. returnFiber = parentFiber,
  10166. prevEffectStart = pushComponentEffectStart(),
  10167. parent = returnFiber;
  10168. a: for (; null !== parent; ) {
  10169. switch (parent.tag) {
  10170. case 27:
  10171. if (isSingletonScope(parent.type)) {
  10172. hostParent = parent.stateNode;
  10173. hostParentIsContainer = !1;
  10174. break a;
  10175. }
  10176. break;
  10177. case 5:
  10178. hostParent = parent.stateNode;
  10179. hostParentIsContainer = !1;
  10180. break a;
  10181. case 3:
  10182. case 4:
  10183. hostParent = parent.stateNode.containerInfo;
  10184. hostParentIsContainer = !0;
  10185. break a;
  10186. }
  10187. parent = parent.return;
  10188. }
  10189. if (null === hostParent) throw Error(formatProdErrorMessage(160));
  10190. commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);
  10191. hostParent = null;
  10192. hostParentIsContainer = !1;
  10193. 0 !== (childToDelete.mode & 2) &&
  10194. 0 <= componentEffectStartTime &&
  10195. 0 <= componentEffectEndTime &&
  10196. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  10197. logComponentTrigger(
  10198. childToDelete,
  10199. componentEffectStartTime,
  10200. componentEffectEndTime,
  10201. "Unmount"
  10202. );
  10203. popComponentEffectStart(prevEffectStart);
  10204. root = childToDelete.alternate;
  10205. null !== root && (root.return = null);
  10206. childToDelete.return = null;
  10207. }
  10208. if (parentFiber.subtreeFlags & 13886)
  10209. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10210. commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
  10211. (parentFiber = parentFiber.sibling);
  10212. }
  10213. var currentHoistableRoot = null;
  10214. function commitMutationEffectsOnFiber(finishedWork, root) {
  10215. var prevEffectStart = pushComponentEffectStart(),
  10216. prevEffectDuration = pushComponentEffectDuration(),
  10217. prevEffectErrors = pushComponentEffectErrors(),
  10218. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  10219. current = finishedWork.alternate,
  10220. flags = finishedWork.flags;
  10221. switch (finishedWork.tag) {
  10222. case 0:
  10223. case 11:
  10224. case 14:
  10225. case 15:
  10226. recursivelyTraverseMutationEffects(root, finishedWork);
  10227. commitReconciliationEffects(finishedWork);
  10228. flags & 4 &&
  10229. (commitHookEffectListUnmount(3, finishedWork, finishedWork.return),
  10230. commitHookEffectListMount(3, finishedWork),
  10231. commitHookLayoutUnmountEffects(finishedWork, finishedWork.return, 5));
  10232. break;
  10233. case 1:
  10234. recursivelyTraverseMutationEffects(root, finishedWork);
  10235. commitReconciliationEffects(finishedWork);
  10236. flags & 512 &&
  10237. (offscreenSubtreeWasHidden ||
  10238. null === current ||
  10239. safelyDetachRef(current, current.return));
  10240. if (
  10241. flags & 64 &&
  10242. offscreenSubtreeIsHidden &&
  10243. ((flags = finishedWork.updateQueue),
  10244. null !== flags && ((current = flags.callbacks), null !== current))
  10245. ) {
  10246. var existingHiddenCallbacks = flags.shared.hiddenCallbacks;
  10247. flags.shared.hiddenCallbacks =
  10248. null === existingHiddenCallbacks
  10249. ? current
  10250. : existingHiddenCallbacks.concat(current);
  10251. }
  10252. break;
  10253. case 26:
  10254. existingHiddenCallbacks = currentHoistableRoot;
  10255. recursivelyTraverseMutationEffects(root, finishedWork);
  10256. commitReconciliationEffects(finishedWork);
  10257. flags & 512 &&
  10258. (offscreenSubtreeWasHidden ||
  10259. null === current ||
  10260. safelyDetachRef(current, current.return));
  10261. if (flags & 4) {
  10262. var currentResource = null !== current ? current.memoizedState : null;
  10263. flags = finishedWork.memoizedState;
  10264. if (null === current)
  10265. if (null === flags)
  10266. if (null === finishedWork.stateNode) {
  10267. a: {
  10268. flags = finishedWork.type;
  10269. current = finishedWork.memoizedProps;
  10270. existingHiddenCallbacks =
  10271. existingHiddenCallbacks.ownerDocument ||
  10272. existingHiddenCallbacks;
  10273. b: switch (flags) {
  10274. case "title":
  10275. currentResource =
  10276. existingHiddenCallbacks.getElementsByTagName("title")[0];
  10277. if (
  10278. !currentResource ||
  10279. currentResource[internalHoistableMarker] ||
  10280. currentResource[internalInstanceKey] ||
  10281. "http://www.w3.org/2000/svg" ===
  10282. currentResource.namespaceURI ||
  10283. currentResource.hasAttribute("itemprop")
  10284. )
  10285. (currentResource =
  10286. existingHiddenCallbacks.createElement(flags)),
  10287. existingHiddenCallbacks.head.insertBefore(
  10288. currentResource,
  10289. existingHiddenCallbacks.querySelector("head > title")
  10290. );
  10291. setInitialProperties(currentResource, flags, current);
  10292. currentResource[internalInstanceKey] = finishedWork;
  10293. markNodeAsHoistable(currentResource);
  10294. flags = currentResource;
  10295. break a;
  10296. case "link":
  10297. var maybeNodes = getHydratableHoistableCache(
  10298. "link",
  10299. "href",
  10300. existingHiddenCallbacks
  10301. ).get(flags + (current.href || ""));
  10302. if (maybeNodes)
  10303. for (var i = 0; i < maybeNodes.length; i++)
  10304. if (
  10305. ((currentResource = maybeNodes[i]),
  10306. currentResource.getAttribute("href") ===
  10307. (null == current.href || "" === current.href
  10308. ? null
  10309. : current.href) &&
  10310. currentResource.getAttribute("rel") ===
  10311. (null == current.rel ? null : current.rel) &&
  10312. currentResource.getAttribute("title") ===
  10313. (null == current.title ? null : current.title) &&
  10314. currentResource.getAttribute("crossorigin") ===
  10315. (null == current.crossOrigin
  10316. ? null
  10317. : current.crossOrigin))
  10318. ) {
  10319. maybeNodes.splice(i, 1);
  10320. break b;
  10321. }
  10322. currentResource =
  10323. existingHiddenCallbacks.createElement(flags);
  10324. setInitialProperties(currentResource, flags, current);
  10325. existingHiddenCallbacks.head.appendChild(currentResource);
  10326. break;
  10327. case "meta":
  10328. if (
  10329. (maybeNodes = getHydratableHoistableCache(
  10330. "meta",
  10331. "content",
  10332. existingHiddenCallbacks
  10333. ).get(flags + (current.content || "")))
  10334. )
  10335. for (i = 0; i < maybeNodes.length; i++)
  10336. if (
  10337. ((currentResource = maybeNodes[i]),
  10338. currentResource.getAttribute("content") ===
  10339. (null == current.content
  10340. ? null
  10341. : "" + current.content) &&
  10342. currentResource.getAttribute("name") ===
  10343. (null == current.name ? null : current.name) &&
  10344. currentResource.getAttribute("property") ===
  10345. (null == current.property
  10346. ? null
  10347. : current.property) &&
  10348. currentResource.getAttribute("http-equiv") ===
  10349. (null == current.httpEquiv
  10350. ? null
  10351. : current.httpEquiv) &&
  10352. currentResource.getAttribute("charset") ===
  10353. (null == current.charSet
  10354. ? null
  10355. : current.charSet))
  10356. ) {
  10357. maybeNodes.splice(i, 1);
  10358. break b;
  10359. }
  10360. currentResource =
  10361. existingHiddenCallbacks.createElement(flags);
  10362. setInitialProperties(currentResource, flags, current);
  10363. existingHiddenCallbacks.head.appendChild(currentResource);
  10364. break;
  10365. default:
  10366. throw Error(formatProdErrorMessage(468, flags));
  10367. }
  10368. currentResource[internalInstanceKey] = finishedWork;
  10369. markNodeAsHoistable(currentResource);
  10370. flags = currentResource;
  10371. }
  10372. finishedWork.stateNode = flags;
  10373. } else
  10374. mountHoistable(
  10375. existingHiddenCallbacks,
  10376. finishedWork.type,
  10377. finishedWork.stateNode
  10378. );
  10379. else
  10380. finishedWork.stateNode = acquireResource(
  10381. existingHiddenCallbacks,
  10382. flags,
  10383. finishedWork.memoizedProps
  10384. );
  10385. else
  10386. currentResource !== flags
  10387. ? (null === currentResource
  10388. ? null !== current.stateNode &&
  10389. ((current = current.stateNode),
  10390. current.parentNode.removeChild(current))
  10391. : currentResource.count--,
  10392. null === flags
  10393. ? mountHoistable(
  10394. existingHiddenCallbacks,
  10395. finishedWork.type,
  10396. finishedWork.stateNode
  10397. )
  10398. : acquireResource(
  10399. existingHiddenCallbacks,
  10400. flags,
  10401. finishedWork.memoizedProps
  10402. ))
  10403. : null === flags &&
  10404. null !== finishedWork.stateNode &&
  10405. commitHostUpdate(
  10406. finishedWork,
  10407. finishedWork.memoizedProps,
  10408. current.memoizedProps
  10409. );
  10410. }
  10411. break;
  10412. case 27:
  10413. recursivelyTraverseMutationEffects(root, finishedWork);
  10414. commitReconciliationEffects(finishedWork);
  10415. flags & 512 &&
  10416. (offscreenSubtreeWasHidden ||
  10417. null === current ||
  10418. safelyDetachRef(current, current.return));
  10419. null !== current &&
  10420. flags & 4 &&
  10421. commitHostUpdate(
  10422. finishedWork,
  10423. finishedWork.memoizedProps,
  10424. current.memoizedProps
  10425. );
  10426. break;
  10427. case 5:
  10428. recursivelyTraverseMutationEffects(root, finishedWork);
  10429. commitReconciliationEffects(finishedWork);
  10430. flags & 512 &&
  10431. (offscreenSubtreeWasHidden ||
  10432. null === current ||
  10433. safelyDetachRef(current, current.return));
  10434. if (finishedWork.flags & 32) {
  10435. existingHiddenCallbacks = finishedWork.stateNode;
  10436. try {
  10437. setTextContent(existingHiddenCallbacks, "");
  10438. } catch (error) {
  10439. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10440. }
  10441. }
  10442. flags & 4 &&
  10443. null != finishedWork.stateNode &&
  10444. ((existingHiddenCallbacks = finishedWork.memoizedProps),
  10445. commitHostUpdate(
  10446. finishedWork,
  10447. existingHiddenCallbacks,
  10448. null !== current ? current.memoizedProps : existingHiddenCallbacks
  10449. ));
  10450. flags & 1024 && (needsFormReset = !0);
  10451. break;
  10452. case 6:
  10453. recursivelyTraverseMutationEffects(root, finishedWork);
  10454. commitReconciliationEffects(finishedWork);
  10455. if (flags & 4) {
  10456. if (null === finishedWork.stateNode)
  10457. throw Error(formatProdErrorMessage(162));
  10458. flags = finishedWork.memoizedProps;
  10459. current = finishedWork.stateNode;
  10460. try {
  10461. current.nodeValue = flags;
  10462. } catch (error) {
  10463. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10464. }
  10465. }
  10466. break;
  10467. case 3:
  10468. existingHiddenCallbacks = pushNestedEffectDurations();
  10469. tagCaches = null;
  10470. currentResource = currentHoistableRoot;
  10471. currentHoistableRoot = getHoistableRoot(root.containerInfo);
  10472. recursivelyTraverseMutationEffects(root, finishedWork);
  10473. currentHoistableRoot = currentResource;
  10474. commitReconciliationEffects(finishedWork);
  10475. if (flags & 4 && null !== current && current.memoizedState.isDehydrated)
  10476. try {
  10477. retryIfBlockedOn(root.containerInfo);
  10478. } catch (error) {
  10479. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10480. }
  10481. needsFormReset &&
  10482. ((needsFormReset = !1), recursivelyResetForms(finishedWork));
  10483. root.effectDuration += popNestedEffectDurations(existingHiddenCallbacks);
  10484. break;
  10485. case 4:
  10486. flags = currentHoistableRoot;
  10487. currentHoistableRoot = getHoistableRoot(
  10488. finishedWork.stateNode.containerInfo
  10489. );
  10490. recursivelyTraverseMutationEffects(root, finishedWork);
  10491. commitReconciliationEffects(finishedWork);
  10492. currentHoistableRoot = flags;
  10493. break;
  10494. case 12:
  10495. flags = pushNestedEffectDurations();
  10496. recursivelyTraverseMutationEffects(root, finishedWork);
  10497. commitReconciliationEffects(finishedWork);
  10498. finishedWork.stateNode.effectDuration +=
  10499. bubbleNestedEffectDurations(flags);
  10500. break;
  10501. case 31:
  10502. recursivelyTraverseMutationEffects(root, finishedWork);
  10503. commitReconciliationEffects(finishedWork);
  10504. flags & 4 &&
  10505. ((flags = finishedWork.updateQueue),
  10506. null !== flags &&
  10507. ((finishedWork.updateQueue = null),
  10508. attachSuspenseRetryListeners(finishedWork, flags)));
  10509. break;
  10510. case 13:
  10511. recursivelyTraverseMutationEffects(root, finishedWork);
  10512. commitReconciliationEffects(finishedWork);
  10513. finishedWork.child.flags & 8192 &&
  10514. (null !== finishedWork.memoizedState) !==
  10515. (null !== current && null !== current.memoizedState) &&
  10516. (globalMostRecentFallbackTime = now$1());
  10517. flags & 4 &&
  10518. ((flags = finishedWork.updateQueue),
  10519. null !== flags &&
  10520. ((finishedWork.updateQueue = null),
  10521. attachSuspenseRetryListeners(finishedWork, flags)));
  10522. break;
  10523. case 22:
  10524. existingHiddenCallbacks = null !== finishedWork.memoizedState;
  10525. var wasHidden = null !== current && null !== current.memoizedState,
  10526. prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,
  10527. prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  10528. offscreenSubtreeIsHidden =
  10529. prevOffscreenSubtreeIsHidden || existingHiddenCallbacks;
  10530. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
  10531. recursivelyTraverseMutationEffects(root, finishedWork);
  10532. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  10533. offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
  10534. wasHidden &&
  10535. !existingHiddenCallbacks &&
  10536. !prevOffscreenSubtreeIsHidden &&
  10537. !prevOffscreenSubtreeWasHidden &&
  10538. 0 !== (finishedWork.mode & 2) &&
  10539. 0 <= componentEffectStartTime &&
  10540. 0 <= componentEffectEndTime &&
  10541. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  10542. logComponentReappeared(
  10543. finishedWork,
  10544. componentEffectStartTime,
  10545. componentEffectEndTime
  10546. );
  10547. commitReconciliationEffects(finishedWork);
  10548. if (flags & 8192)
  10549. a: for (
  10550. root = finishedWork.stateNode,
  10551. root._visibility = existingHiddenCallbacks
  10552. ? root._visibility & -2
  10553. : root._visibility | 1,
  10554. !existingHiddenCallbacks ||
  10555. null === current ||
  10556. wasHidden ||
  10557. offscreenSubtreeIsHidden ||
  10558. offscreenSubtreeWasHidden ||
  10559. (recursivelyTraverseDisappearLayoutEffects(finishedWork),
  10560. 0 !== (finishedWork.mode & 2) &&
  10561. 0 <= componentEffectStartTime &&
  10562. 0 <= componentEffectEndTime &&
  10563. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  10564. logComponentTrigger(
  10565. finishedWork,
  10566. componentEffectStartTime,
  10567. componentEffectEndTime,
  10568. "Disconnect"
  10569. )),
  10570. current = null,
  10571. root = finishedWork;
  10572. ;
  10573. ) {
  10574. if (5 === root.tag || 26 === root.tag) {
  10575. if (null === current) {
  10576. wasHidden = current = root;
  10577. try {
  10578. if (
  10579. ((currentResource = wasHidden.stateNode),
  10580. existingHiddenCallbacks)
  10581. )
  10582. (maybeNodes = currentResource.style),
  10583. "function" === typeof maybeNodes.setProperty
  10584. ? maybeNodes.setProperty("display", "none", "important")
  10585. : (maybeNodes.display = "none");
  10586. else {
  10587. i = wasHidden.stateNode;
  10588. var styleProp = wasHidden.memoizedProps.style,
  10589. display =
  10590. void 0 !== styleProp &&
  10591. null !== styleProp &&
  10592. styleProp.hasOwnProperty("display")
  10593. ? styleProp.display
  10594. : null;
  10595. i.style.display =
  10596. null == display || "boolean" === typeof display
  10597. ? ""
  10598. : ("" + display).trim();
  10599. }
  10600. } catch (error) {
  10601. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  10602. }
  10603. }
  10604. } else if (6 === root.tag) {
  10605. if (null === current) {
  10606. wasHidden = root;
  10607. try {
  10608. wasHidden.stateNode.nodeValue = existingHiddenCallbacks
  10609. ? ""
  10610. : wasHidden.memoizedProps;
  10611. } catch (error) {
  10612. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  10613. }
  10614. }
  10615. } else if (18 === root.tag) {
  10616. if (null === current) {
  10617. wasHidden = root;
  10618. try {
  10619. var instance = wasHidden.stateNode;
  10620. existingHiddenCallbacks
  10621. ? hideOrUnhideDehydratedBoundary(instance, !0)
  10622. : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1);
  10623. } catch (error) {
  10624. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  10625. }
  10626. }
  10627. } else if (
  10628. ((22 !== root.tag && 23 !== root.tag) ||
  10629. null === root.memoizedState ||
  10630. root === finishedWork) &&
  10631. null !== root.child
  10632. ) {
  10633. root.child.return = root;
  10634. root = root.child;
  10635. continue;
  10636. }
  10637. if (root === finishedWork) break a;
  10638. for (; null === root.sibling; ) {
  10639. if (null === root.return || root.return === finishedWork) break a;
  10640. current === root && (current = null);
  10641. root = root.return;
  10642. }
  10643. current === root && (current = null);
  10644. root.sibling.return = root.return;
  10645. root = root.sibling;
  10646. }
  10647. flags & 4 &&
  10648. ((flags = finishedWork.updateQueue),
  10649. null !== flags &&
  10650. ((current = flags.retryQueue),
  10651. null !== current &&
  10652. ((flags.retryQueue = null),
  10653. attachSuspenseRetryListeners(finishedWork, current))));
  10654. break;
  10655. case 19:
  10656. recursivelyTraverseMutationEffects(root, finishedWork);
  10657. commitReconciliationEffects(finishedWork);
  10658. flags & 4 &&
  10659. ((flags = finishedWork.updateQueue),
  10660. null !== flags &&
  10661. ((finishedWork.updateQueue = null),
  10662. attachSuspenseRetryListeners(finishedWork, flags)));
  10663. break;
  10664. case 30:
  10665. break;
  10666. case 21:
  10667. break;
  10668. default:
  10669. recursivelyTraverseMutationEffects(root, finishedWork),
  10670. commitReconciliationEffects(finishedWork);
  10671. }
  10672. 0 !== (finishedWork.mode & 2) &&
  10673. 0 <= componentEffectStartTime &&
  10674. 0 <= componentEffectEndTime &&
  10675. ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  10676. logComponentEffect(
  10677. finishedWork,
  10678. componentEffectStartTime,
  10679. componentEffectEndTime,
  10680. componentEffectDuration,
  10681. componentEffectErrors
  10682. ),
  10683. null === finishedWork.alternate &&
  10684. null !== finishedWork.return &&
  10685. null !== finishedWork.return.alternate &&
  10686. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  10687. (isHydratingParent(finishedWork.return.alternate, finishedWork.return) ||
  10688. logComponentTrigger(
  10689. finishedWork,
  10690. componentEffectStartTime,
  10691. componentEffectEndTime,
  10692. "Mount"
  10693. )));
  10694. popComponentEffectStart(prevEffectStart);
  10695. popComponentEffectDuration(prevEffectDuration);
  10696. componentEffectErrors = prevEffectErrors;
  10697. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10698. }
  10699. function commitReconciliationEffects(finishedWork) {
  10700. var flags = finishedWork.flags;
  10701. if (flags & 2) {
  10702. try {
  10703. for (
  10704. var hostParentFiber, parentFiber = finishedWork.return;
  10705. null !== parentFiber;
  10706. ) {
  10707. if (isHostParent(parentFiber)) {
  10708. hostParentFiber = parentFiber;
  10709. break;
  10710. }
  10711. parentFiber = parentFiber.return;
  10712. }
  10713. if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));
  10714. switch (hostParentFiber.tag) {
  10715. case 27:
  10716. var parent = hostParentFiber.stateNode,
  10717. before = getHostSibling(finishedWork);
  10718. insertOrAppendPlacementNode(finishedWork, before, parent);
  10719. break;
  10720. case 5:
  10721. var parent$161 = hostParentFiber.stateNode;
  10722. hostParentFiber.flags & 32 &&
  10723. (setTextContent(parent$161, ""), (hostParentFiber.flags &= -33));
  10724. var before$162 = getHostSibling(finishedWork);
  10725. insertOrAppendPlacementNode(finishedWork, before$162, parent$161);
  10726. break;
  10727. case 3:
  10728. case 4:
  10729. var parent$163 = hostParentFiber.stateNode.containerInfo,
  10730. before$164 = getHostSibling(finishedWork);
  10731. insertOrAppendPlacementNodeIntoContainer(
  10732. finishedWork,
  10733. before$164,
  10734. parent$163
  10735. );
  10736. break;
  10737. default:
  10738. throw Error(formatProdErrorMessage(161));
  10739. }
  10740. } catch (error) {
  10741. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10742. }
  10743. finishedWork.flags &= -3;
  10744. }
  10745. flags & 4096 && (finishedWork.flags &= -4097);
  10746. }
  10747. function recursivelyResetForms(parentFiber) {
  10748. if (parentFiber.subtreeFlags & 1024)
  10749. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  10750. var fiber = parentFiber;
  10751. recursivelyResetForms(fiber);
  10752. 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
  10753. parentFiber = parentFiber.sibling;
  10754. }
  10755. }
  10756. function recursivelyTraverseLayoutEffects(root, parentFiber) {
  10757. if (parentFiber.subtreeFlags & 8772)
  10758. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10759. commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),
  10760. (parentFiber = parentFiber.sibling);
  10761. }
  10762. function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
  10763. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  10764. var finishedWork = parentFiber,
  10765. prevEffectStart = pushComponentEffectStart(),
  10766. prevEffectDuration = pushComponentEffectDuration(),
  10767. prevEffectErrors = pushComponentEffectErrors(),
  10768. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  10769. switch (finishedWork.tag) {
  10770. case 0:
  10771. case 11:
  10772. case 14:
  10773. case 15:
  10774. commitHookLayoutUnmountEffects(finishedWork, finishedWork.return, 4);
  10775. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10776. break;
  10777. case 1:
  10778. safelyDetachRef(finishedWork, finishedWork.return);
  10779. var instance = finishedWork.stateNode;
  10780. "function" === typeof instance.componentWillUnmount &&
  10781. safelyCallComponentWillUnmount(
  10782. finishedWork,
  10783. finishedWork.return,
  10784. instance
  10785. );
  10786. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10787. break;
  10788. case 27:
  10789. releaseSingletonInstance(finishedWork.stateNode);
  10790. case 26:
  10791. case 5:
  10792. safelyDetachRef(finishedWork, finishedWork.return);
  10793. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10794. break;
  10795. case 22:
  10796. null === finishedWork.memoizedState &&
  10797. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10798. break;
  10799. case 30:
  10800. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10801. break;
  10802. default:
  10803. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10804. }
  10805. 0 !== (finishedWork.mode & 2) &&
  10806. 0 <= componentEffectStartTime &&
  10807. 0 <= componentEffectEndTime &&
  10808. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  10809. logComponentEffect(
  10810. finishedWork,
  10811. componentEffectStartTime,
  10812. componentEffectEndTime,
  10813. componentEffectDuration,
  10814. componentEffectErrors
  10815. );
  10816. popComponentEffectStart(prevEffectStart);
  10817. popComponentEffectDuration(prevEffectDuration);
  10818. componentEffectErrors = prevEffectErrors;
  10819. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10820. parentFiber = parentFiber.sibling;
  10821. }
  10822. }
  10823. function recursivelyTraverseReappearLayoutEffects(
  10824. finishedRoot$jscomp$0,
  10825. parentFiber,
  10826. includeWorkInProgressEffects
  10827. ) {
  10828. includeWorkInProgressEffects =
  10829. includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
  10830. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  10831. var current = parentFiber.alternate,
  10832. finishedRoot = finishedRoot$jscomp$0,
  10833. finishedWork = parentFiber,
  10834. prevEffectStart = pushComponentEffectStart(),
  10835. prevEffectDuration = pushComponentEffectDuration(),
  10836. prevEffectErrors = pushComponentEffectErrors(),
  10837. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  10838. flags = finishedWork.flags;
  10839. switch (finishedWork.tag) {
  10840. case 0:
  10841. case 11:
  10842. case 15:
  10843. recursivelyTraverseReappearLayoutEffects(
  10844. finishedRoot,
  10845. finishedWork,
  10846. includeWorkInProgressEffects
  10847. );
  10848. commitHookLayoutEffects(finishedWork, 4);
  10849. break;
  10850. case 1:
  10851. recursivelyTraverseReappearLayoutEffects(
  10852. finishedRoot,
  10853. finishedWork,
  10854. includeWorkInProgressEffects
  10855. );
  10856. current = finishedWork;
  10857. finishedRoot = current.stateNode;
  10858. if ("function" === typeof finishedRoot.componentDidMount)
  10859. try {
  10860. finishedRoot.componentDidMount();
  10861. } catch (error) {
  10862. captureCommitPhaseError(current, current.return, error);
  10863. }
  10864. current = finishedWork;
  10865. finishedRoot = current.updateQueue;
  10866. if (null !== finishedRoot) {
  10867. var instance = current.stateNode;
  10868. try {
  10869. var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;
  10870. if (null !== hiddenCallbacks)
  10871. for (
  10872. finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0;
  10873. finishedRoot < hiddenCallbacks.length;
  10874. finishedRoot++
  10875. )
  10876. callCallback(hiddenCallbacks[finishedRoot], instance);
  10877. } catch (error) {
  10878. captureCommitPhaseError(current, current.return, error);
  10879. }
  10880. }
  10881. includeWorkInProgressEffects &&
  10882. flags & 64 &&
  10883. commitClassCallbacks(finishedWork);
  10884. safelyAttachRef(finishedWork, finishedWork.return);
  10885. break;
  10886. case 27:
  10887. commitHostSingletonAcquisition(finishedWork);
  10888. case 26:
  10889. case 5:
  10890. recursivelyTraverseReappearLayoutEffects(
  10891. finishedRoot,
  10892. finishedWork,
  10893. includeWorkInProgressEffects
  10894. );
  10895. includeWorkInProgressEffects &&
  10896. null === current &&
  10897. flags & 4 &&
  10898. commitHostMount(finishedWork);
  10899. safelyAttachRef(finishedWork, finishedWork.return);
  10900. break;
  10901. case 12:
  10902. includeWorkInProgressEffects && flags & 4
  10903. ? ((flags = pushNestedEffectDurations()),
  10904. recursivelyTraverseReappearLayoutEffects(
  10905. finishedRoot,
  10906. finishedWork,
  10907. includeWorkInProgressEffects
  10908. ),
  10909. (finishedRoot = finishedWork.stateNode),
  10910. (finishedRoot.effectDuration += bubbleNestedEffectDurations(flags)),
  10911. commitProfilerUpdate(
  10912. finishedWork,
  10913. current,
  10914. commitStartTime,
  10915. finishedRoot.effectDuration
  10916. ))
  10917. : recursivelyTraverseReappearLayoutEffects(
  10918. finishedRoot,
  10919. finishedWork,
  10920. includeWorkInProgressEffects
  10921. );
  10922. break;
  10923. case 31:
  10924. recursivelyTraverseReappearLayoutEffects(
  10925. finishedRoot,
  10926. finishedWork,
  10927. includeWorkInProgressEffects
  10928. );
  10929. includeWorkInProgressEffects &&
  10930. flags & 4 &&
  10931. commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  10932. break;
  10933. case 13:
  10934. recursivelyTraverseReappearLayoutEffects(
  10935. finishedRoot,
  10936. finishedWork,
  10937. includeWorkInProgressEffects
  10938. );
  10939. includeWorkInProgressEffects &&
  10940. flags & 4 &&
  10941. commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  10942. break;
  10943. case 22:
  10944. null === finishedWork.memoizedState &&
  10945. recursivelyTraverseReappearLayoutEffects(
  10946. finishedRoot,
  10947. finishedWork,
  10948. includeWorkInProgressEffects
  10949. );
  10950. safelyAttachRef(finishedWork, finishedWork.return);
  10951. break;
  10952. case 30:
  10953. break;
  10954. default:
  10955. recursivelyTraverseReappearLayoutEffects(
  10956. finishedRoot,
  10957. finishedWork,
  10958. includeWorkInProgressEffects
  10959. );
  10960. }
  10961. 0 !== (finishedWork.mode & 2) &&
  10962. 0 <= componentEffectStartTime &&
  10963. 0 <= componentEffectEndTime &&
  10964. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  10965. logComponentEffect(
  10966. finishedWork,
  10967. componentEffectStartTime,
  10968. componentEffectEndTime,
  10969. componentEffectDuration,
  10970. componentEffectErrors
  10971. );
  10972. popComponentEffectStart(prevEffectStart);
  10973. popComponentEffectDuration(prevEffectDuration);
  10974. componentEffectErrors = prevEffectErrors;
  10975. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10976. parentFiber = parentFiber.sibling;
  10977. }
  10978. }
  10979. function commitOffscreenPassiveMountEffects(current, finishedWork) {
  10980. var previousCache = null;
  10981. null !== current &&
  10982. null !== current.memoizedState &&
  10983. null !== current.memoizedState.cachePool &&
  10984. (previousCache = current.memoizedState.cachePool.pool);
  10985. current = null;
  10986. null !== finishedWork.memoizedState &&
  10987. null !== finishedWork.memoizedState.cachePool &&
  10988. (current = finishedWork.memoizedState.cachePool.pool);
  10989. current !== previousCache &&
  10990. (null != current && current.refCount++,
  10991. null != previousCache && releaseCache(previousCache));
  10992. }
  10993. function commitCachePassiveMountEffect(current, finishedWork) {
  10994. current = null;
  10995. null !== finishedWork.alternate &&
  10996. (current = finishedWork.alternate.memoizedState.cache);
  10997. finishedWork = finishedWork.memoizedState.cache;
  10998. finishedWork !== current &&
  10999. (finishedWork.refCount++, null != current && releaseCache(current));
  11000. }
  11001. function recursivelyTraversePassiveMountEffects(
  11002. root,
  11003. parentFiber,
  11004. committedLanes,
  11005. committedTransitions,
  11006. endTime
  11007. ) {
  11008. if (
  11009. parentFiber.subtreeFlags & 10256 ||
  11010. (0 !== parentFiber.actualDuration &&
  11011. (null === parentFiber.alternate ||
  11012. parentFiber.alternate.child !== parentFiber.child))
  11013. )
  11014. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  11015. var nextSibling = parentFiber.sibling;
  11016. commitPassiveMountOnFiber(
  11017. root,
  11018. parentFiber,
  11019. committedLanes,
  11020. committedTransitions,
  11021. null !== nextSibling ? nextSibling.actualStartTime : endTime
  11022. );
  11023. parentFiber = nextSibling;
  11024. }
  11025. }
  11026. var inHydratedSubtree = !1;
  11027. function commitPassiveMountOnFiber(
  11028. finishedRoot,
  11029. finishedWork,
  11030. committedLanes,
  11031. committedTransitions,
  11032. endTime
  11033. ) {
  11034. var prevEffectStart = pushComponentEffectStart(),
  11035. prevEffectDuration = pushComponentEffectDuration(),
  11036. prevEffectErrors = pushComponentEffectErrors(),
  11037. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  11038. flags = finishedWork.flags;
  11039. switch (finishedWork.tag) {
  11040. case 0:
  11041. case 11:
  11042. case 15:
  11043. 0 !== (finishedWork.mode & 2) &&
  11044. 0 < finishedWork.actualStartTime &&
  11045. 0 !== (finishedWork.flags & 1) &&
  11046. logComponentRender(
  11047. finishedWork,
  11048. finishedWork.actualStartTime,
  11049. endTime,
  11050. inHydratedSubtree
  11051. );
  11052. recursivelyTraversePassiveMountEffects(
  11053. finishedRoot,
  11054. finishedWork,
  11055. committedLanes,
  11056. committedTransitions,
  11057. endTime
  11058. );
  11059. flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
  11060. break;
  11061. case 1:
  11062. 0 !== (finishedWork.mode & 2) &&
  11063. 0 < finishedWork.actualStartTime &&
  11064. (0 !== (finishedWork.flags & 128)
  11065. ? logComponentErrored(
  11066. finishedWork,
  11067. finishedWork.actualStartTime,
  11068. endTime
  11069. )
  11070. : 0 !== (finishedWork.flags & 1) &&
  11071. logComponentRender(
  11072. finishedWork,
  11073. finishedWork.actualStartTime,
  11074. endTime,
  11075. inHydratedSubtree
  11076. ));
  11077. recursivelyTraversePassiveMountEffects(
  11078. finishedRoot,
  11079. finishedWork,
  11080. committedLanes,
  11081. committedTransitions,
  11082. endTime
  11083. );
  11084. break;
  11085. case 3:
  11086. var prevProfilerEffectDuration = pushNestedEffectDurations(),
  11087. wasInHydratedSubtree = inHydratedSubtree;
  11088. inHydratedSubtree =
  11089. null !== finishedWork.alternate &&
  11090. finishedWork.alternate.memoizedState.isDehydrated &&
  11091. 0 === (finishedWork.flags & 256);
  11092. recursivelyTraversePassiveMountEffects(
  11093. finishedRoot,
  11094. finishedWork,
  11095. committedLanes,
  11096. committedTransitions,
  11097. endTime
  11098. );
  11099. inHydratedSubtree = wasInHydratedSubtree;
  11100. flags & 2048 &&
  11101. ((committedLanes = null),
  11102. null !== finishedWork.alternate &&
  11103. (committedLanes = finishedWork.alternate.memoizedState.cache),
  11104. (committedTransitions = finishedWork.memoizedState.cache),
  11105. committedTransitions !== committedLanes &&
  11106. (committedTransitions.refCount++,
  11107. null != committedLanes && releaseCache(committedLanes)));
  11108. finishedRoot.passiveEffectDuration += popNestedEffectDurations(
  11109. prevProfilerEffectDuration
  11110. );
  11111. break;
  11112. case 12:
  11113. if (flags & 2048) {
  11114. flags = pushNestedEffectDurations();
  11115. recursivelyTraversePassiveMountEffects(
  11116. finishedRoot,
  11117. finishedWork,
  11118. committedLanes,
  11119. committedTransitions,
  11120. endTime
  11121. );
  11122. finishedRoot = finishedWork.stateNode;
  11123. finishedRoot.passiveEffectDuration +=
  11124. bubbleNestedEffectDurations(flags);
  11125. try {
  11126. prevProfilerEffectDuration = finishedWork.memoizedProps;
  11127. wasInHydratedSubtree = prevProfilerEffectDuration.id;
  11128. var onPostCommit = prevProfilerEffectDuration.onPostCommit,
  11129. phase = null === finishedWork.alternate ? "mount" : "update";
  11130. currentUpdateIsNested && (phase = "nested-update");
  11131. "function" === typeof onPostCommit &&
  11132. onPostCommit(
  11133. wasInHydratedSubtree,
  11134. phase,
  11135. finishedRoot.passiveEffectDuration,
  11136. commitStartTime
  11137. );
  11138. } catch (error) {
  11139. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  11140. }
  11141. } else
  11142. recursivelyTraversePassiveMountEffects(
  11143. finishedRoot,
  11144. finishedWork,
  11145. committedLanes,
  11146. committedTransitions,
  11147. endTime
  11148. );
  11149. break;
  11150. case 31:
  11151. flags = inHydratedSubtree;
  11152. prevProfilerEffectDuration =
  11153. null !== finishedWork.alternate
  11154. ? finishedWork.alternate.memoizedState
  11155. : null;
  11156. wasInHydratedSubtree = finishedWork.memoizedState;
  11157. null !== prevProfilerEffectDuration && null === wasInHydratedSubtree
  11158. ? ((wasInHydratedSubtree = finishedWork.deletions),
  11159. null !== wasInHydratedSubtree &&
  11160. 0 < wasInHydratedSubtree.length &&
  11161. 18 === wasInHydratedSubtree[0].tag
  11162. ? ((inHydratedSubtree = !1),
  11163. null !== prevProfilerEffectDuration.hydrationErrors &&
  11164. logComponentErrored(
  11165. finishedWork,
  11166. finishedWork.actualStartTime,
  11167. endTime
  11168. ))
  11169. : (inHydratedSubtree = !0))
  11170. : (inHydratedSubtree = !1);
  11171. recursivelyTraversePassiveMountEffects(
  11172. finishedRoot,
  11173. finishedWork,
  11174. committedLanes,
  11175. committedTransitions,
  11176. endTime
  11177. );
  11178. inHydratedSubtree = flags;
  11179. break;
  11180. case 13:
  11181. flags = inHydratedSubtree;
  11182. prevProfilerEffectDuration =
  11183. null !== finishedWork.alternate
  11184. ? finishedWork.alternate.memoizedState
  11185. : null;
  11186. wasInHydratedSubtree = finishedWork.memoizedState;
  11187. null === prevProfilerEffectDuration ||
  11188. null === prevProfilerEffectDuration.dehydrated ||
  11189. (null !== wasInHydratedSubtree &&
  11190. null !== wasInHydratedSubtree.dehydrated)
  11191. ? (inHydratedSubtree = !1)
  11192. : ((wasInHydratedSubtree = finishedWork.deletions),
  11193. null !== wasInHydratedSubtree &&
  11194. 0 < wasInHydratedSubtree.length &&
  11195. 18 === wasInHydratedSubtree[0].tag
  11196. ? ((inHydratedSubtree = !1),
  11197. null !== prevProfilerEffectDuration.hydrationErrors &&
  11198. logComponentErrored(
  11199. finishedWork,
  11200. finishedWork.actualStartTime,
  11201. endTime
  11202. ))
  11203. : (inHydratedSubtree = !0));
  11204. recursivelyTraversePassiveMountEffects(
  11205. finishedRoot,
  11206. finishedWork,
  11207. committedLanes,
  11208. committedTransitions,
  11209. endTime
  11210. );
  11211. inHydratedSubtree = flags;
  11212. break;
  11213. case 23:
  11214. break;
  11215. case 22:
  11216. wasInHydratedSubtree = finishedWork.stateNode;
  11217. prevProfilerEffectDuration = finishedWork.alternate;
  11218. null !== finishedWork.memoizedState
  11219. ? wasInHydratedSubtree._visibility & 2
  11220. ? recursivelyTraversePassiveMountEffects(
  11221. finishedRoot,
  11222. finishedWork,
  11223. committedLanes,
  11224. committedTransitions,
  11225. endTime
  11226. )
  11227. : recursivelyTraverseAtomicPassiveEffects(
  11228. finishedRoot,
  11229. finishedWork,
  11230. committedLanes,
  11231. committedTransitions,
  11232. endTime
  11233. )
  11234. : wasInHydratedSubtree._visibility & 2
  11235. ? recursivelyTraversePassiveMountEffects(
  11236. finishedRoot,
  11237. finishedWork,
  11238. committedLanes,
  11239. committedTransitions,
  11240. endTime
  11241. )
  11242. : ((wasInHydratedSubtree._visibility |= 2),
  11243. recursivelyTraverseReconnectPassiveEffects(
  11244. finishedRoot,
  11245. finishedWork,
  11246. committedLanes,
  11247. committedTransitions,
  11248. 0 !== (finishedWork.subtreeFlags & 10256) ||
  11249. (0 !== finishedWork.actualDuration &&
  11250. (null === finishedWork.alternate ||
  11251. finishedWork.alternate.child !== finishedWork.child)),
  11252. endTime
  11253. ),
  11254. 0 === (finishedWork.mode & 2) ||
  11255. inHydratedSubtree ||
  11256. ((finishedRoot = finishedWork.actualStartTime),
  11257. 0 <= finishedRoot &&
  11258. 0.05 < endTime - finishedRoot &&
  11259. logComponentReappeared(finishedWork, finishedRoot, endTime),
  11260. 0 <= componentEffectStartTime &&
  11261. 0 <= componentEffectEndTime &&
  11262. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  11263. logComponentReappeared(
  11264. finishedWork,
  11265. componentEffectStartTime,
  11266. componentEffectEndTime
  11267. )));
  11268. flags & 2048 &&
  11269. commitOffscreenPassiveMountEffects(
  11270. prevProfilerEffectDuration,
  11271. finishedWork
  11272. );
  11273. break;
  11274. case 24:
  11275. recursivelyTraversePassiveMountEffects(
  11276. finishedRoot,
  11277. finishedWork,
  11278. committedLanes,
  11279. committedTransitions,
  11280. endTime
  11281. );
  11282. flags & 2048 &&
  11283. commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  11284. break;
  11285. default:
  11286. recursivelyTraversePassiveMountEffects(
  11287. finishedRoot,
  11288. finishedWork,
  11289. committedLanes,
  11290. committedTransitions,
  11291. endTime
  11292. );
  11293. }
  11294. if (0 !== (finishedWork.mode & 2)) {
  11295. if (
  11296. (finishedRoot =
  11297. !inHydratedSubtree &&
  11298. null === finishedWork.alternate &&
  11299. null !== finishedWork.return &&
  11300. null !== finishedWork.return.alternate)
  11301. )
  11302. (committedLanes = finishedWork.actualStartTime),
  11303. 0 <= committedLanes &&
  11304. 0.05 < endTime - committedLanes &&
  11305. logComponentTrigger(finishedWork, committedLanes, endTime, "Mount");
  11306. 0 <= componentEffectStartTime &&
  11307. 0 <= componentEffectEndTime &&
  11308. ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  11309. logComponentEffect(
  11310. finishedWork,
  11311. componentEffectStartTime,
  11312. componentEffectEndTime,
  11313. componentEffectDuration,
  11314. componentEffectErrors
  11315. ),
  11316. finishedRoot &&
  11317. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  11318. logComponentTrigger(
  11319. finishedWork,
  11320. componentEffectStartTime,
  11321. componentEffectEndTime,
  11322. "Mount"
  11323. ));
  11324. }
  11325. popComponentEffectStart(prevEffectStart);
  11326. popComponentEffectDuration(prevEffectDuration);
  11327. componentEffectErrors = prevEffectErrors;
  11328. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11329. }
  11330. function recursivelyTraverseReconnectPassiveEffects(
  11331. finishedRoot$jscomp$0,
  11332. parentFiber,
  11333. committedLanes$jscomp$0,
  11334. committedTransitions$jscomp$0,
  11335. includeWorkInProgressEffects,
  11336. endTime$jscomp$0
  11337. ) {
  11338. includeWorkInProgressEffects =
  11339. includeWorkInProgressEffects &&
  11340. (0 !== (parentFiber.subtreeFlags & 10256) ||
  11341. (0 !== parentFiber.actualDuration &&
  11342. (null === parentFiber.alternate ||
  11343. parentFiber.alternate.child !== parentFiber.child)));
  11344. for (var child = parentFiber.child; null !== child; ) {
  11345. parentFiber = child.sibling;
  11346. var finishedRoot = finishedRoot$jscomp$0,
  11347. committedLanes = committedLanes$jscomp$0,
  11348. committedTransitions = committedTransitions$jscomp$0,
  11349. endTime =
  11350. null !== parentFiber ? parentFiber.actualStartTime : endTime$jscomp$0,
  11351. prevEffectStart = pushComponentEffectStart(),
  11352. prevEffectDuration = pushComponentEffectDuration(),
  11353. prevEffectErrors = pushComponentEffectErrors(),
  11354. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  11355. includeWorkInProgressEffects &&
  11356. 0 !== (child.mode & 2) &&
  11357. 0 < child.actualStartTime &&
  11358. 0 !== (child.flags & 1) &&
  11359. logComponentRender(
  11360. child,
  11361. child.actualStartTime,
  11362. endTime,
  11363. inHydratedSubtree
  11364. );
  11365. var flags = child.flags;
  11366. switch (child.tag) {
  11367. case 0:
  11368. case 11:
  11369. case 15:
  11370. recursivelyTraverseReconnectPassiveEffects(
  11371. finishedRoot,
  11372. child,
  11373. committedLanes,
  11374. committedTransitions,
  11375. includeWorkInProgressEffects,
  11376. endTime
  11377. );
  11378. commitHookPassiveMountEffects(child, 8);
  11379. break;
  11380. case 23:
  11381. break;
  11382. case 22:
  11383. var instance = child.stateNode;
  11384. null !== child.memoizedState
  11385. ? instance._visibility & 2
  11386. ? recursivelyTraverseReconnectPassiveEffects(
  11387. finishedRoot,
  11388. child,
  11389. committedLanes,
  11390. committedTransitions,
  11391. includeWorkInProgressEffects,
  11392. endTime
  11393. )
  11394. : recursivelyTraverseAtomicPassiveEffects(
  11395. finishedRoot,
  11396. child,
  11397. committedLanes,
  11398. committedTransitions,
  11399. endTime
  11400. )
  11401. : ((instance._visibility |= 2),
  11402. recursivelyTraverseReconnectPassiveEffects(
  11403. finishedRoot,
  11404. child,
  11405. committedLanes,
  11406. committedTransitions,
  11407. includeWorkInProgressEffects,
  11408. endTime
  11409. ));
  11410. includeWorkInProgressEffects &&
  11411. flags & 2048 &&
  11412. commitOffscreenPassiveMountEffects(child.alternate, child);
  11413. break;
  11414. case 24:
  11415. recursivelyTraverseReconnectPassiveEffects(
  11416. finishedRoot,
  11417. child,
  11418. committedLanes,
  11419. committedTransitions,
  11420. includeWorkInProgressEffects,
  11421. endTime
  11422. );
  11423. includeWorkInProgressEffects &&
  11424. flags & 2048 &&
  11425. commitCachePassiveMountEffect(child.alternate, child);
  11426. break;
  11427. default:
  11428. recursivelyTraverseReconnectPassiveEffects(
  11429. finishedRoot,
  11430. child,
  11431. committedLanes,
  11432. committedTransitions,
  11433. includeWorkInProgressEffects,
  11434. endTime
  11435. );
  11436. }
  11437. 0 !== (child.mode & 2) &&
  11438. 0 <= componentEffectStartTime &&
  11439. 0 <= componentEffectEndTime &&
  11440. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  11441. logComponentEffect(
  11442. child,
  11443. componentEffectStartTime,
  11444. componentEffectEndTime,
  11445. componentEffectDuration,
  11446. componentEffectErrors
  11447. );
  11448. popComponentEffectStart(prevEffectStart);
  11449. popComponentEffectDuration(prevEffectDuration);
  11450. componentEffectErrors = prevEffectErrors;
  11451. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11452. child = parentFiber;
  11453. }
  11454. }
  11455. function recursivelyTraverseAtomicPassiveEffects(
  11456. finishedRoot$jscomp$0,
  11457. parentFiber,
  11458. committedLanes$jscomp$0,
  11459. committedTransitions$jscomp$0,
  11460. endTime$jscomp$0
  11461. ) {
  11462. if (
  11463. parentFiber.subtreeFlags & 10256 ||
  11464. (0 !== parentFiber.actualDuration &&
  11465. (null === parentFiber.alternate ||
  11466. parentFiber.alternate.child !== parentFiber.child))
  11467. )
  11468. for (var child = parentFiber.child; null !== child; ) {
  11469. parentFiber = child.sibling;
  11470. var finishedRoot = finishedRoot$jscomp$0,
  11471. committedLanes = committedLanes$jscomp$0,
  11472. committedTransitions = committedTransitions$jscomp$0,
  11473. endTime =
  11474. null !== parentFiber ? parentFiber.actualStartTime : endTime$jscomp$0;
  11475. 0 !== (child.mode & 2) &&
  11476. 0 < child.actualStartTime &&
  11477. 0 !== (child.flags & 1) &&
  11478. logComponentRender(
  11479. child,
  11480. child.actualStartTime,
  11481. endTime,
  11482. inHydratedSubtree
  11483. );
  11484. var flags = child.flags;
  11485. switch (child.tag) {
  11486. case 22:
  11487. recursivelyTraverseAtomicPassiveEffects(
  11488. finishedRoot,
  11489. child,
  11490. committedLanes,
  11491. committedTransitions,
  11492. endTime
  11493. );
  11494. flags & 2048 &&
  11495. commitOffscreenPassiveMountEffects(child.alternate, child);
  11496. break;
  11497. case 24:
  11498. recursivelyTraverseAtomicPassiveEffects(
  11499. finishedRoot,
  11500. child,
  11501. committedLanes,
  11502. committedTransitions,
  11503. endTime
  11504. );
  11505. flags & 2048 && commitCachePassiveMountEffect(child.alternate, child);
  11506. break;
  11507. default:
  11508. recursivelyTraverseAtomicPassiveEffects(
  11509. finishedRoot,
  11510. child,
  11511. committedLanes,
  11512. committedTransitions,
  11513. endTime
  11514. );
  11515. }
  11516. child = parentFiber;
  11517. }
  11518. }
  11519. var suspenseyCommitFlag = 8192;
  11520. function recursivelyAccumulateSuspenseyCommit(
  11521. parentFiber,
  11522. committedLanes,
  11523. suspendedState
  11524. ) {
  11525. if (parentFiber.subtreeFlags & suspenseyCommitFlag)
  11526. for (parentFiber = parentFiber.child; null !== parentFiber; )
  11527. accumulateSuspenseyCommitOnFiber(
  11528. parentFiber,
  11529. committedLanes,
  11530. suspendedState
  11531. ),
  11532. (parentFiber = parentFiber.sibling);
  11533. }
  11534. function accumulateSuspenseyCommitOnFiber(
  11535. fiber,
  11536. committedLanes,
  11537. suspendedState
  11538. ) {
  11539. switch (fiber.tag) {
  11540. case 26:
  11541. recursivelyAccumulateSuspenseyCommit(
  11542. fiber,
  11543. committedLanes,
  11544. suspendedState
  11545. );
  11546. fiber.flags & suspenseyCommitFlag &&
  11547. null !== fiber.memoizedState &&
  11548. suspendResource(
  11549. suspendedState,
  11550. currentHoistableRoot,
  11551. fiber.memoizedState,
  11552. fiber.memoizedProps
  11553. );
  11554. break;
  11555. case 5:
  11556. recursivelyAccumulateSuspenseyCommit(
  11557. fiber,
  11558. committedLanes,
  11559. suspendedState
  11560. );
  11561. break;
  11562. case 3:
  11563. case 4:
  11564. var previousHoistableRoot = currentHoistableRoot;
  11565. currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);
  11566. recursivelyAccumulateSuspenseyCommit(
  11567. fiber,
  11568. committedLanes,
  11569. suspendedState
  11570. );
  11571. currentHoistableRoot = previousHoistableRoot;
  11572. break;
  11573. case 22:
  11574. null === fiber.memoizedState &&
  11575. ((previousHoistableRoot = fiber.alternate),
  11576. null !== previousHoistableRoot &&
  11577. null !== previousHoistableRoot.memoizedState
  11578. ? ((previousHoistableRoot = suspenseyCommitFlag),
  11579. (suspenseyCommitFlag = 16777216),
  11580. recursivelyAccumulateSuspenseyCommit(
  11581. fiber,
  11582. committedLanes,
  11583. suspendedState
  11584. ),
  11585. (suspenseyCommitFlag = previousHoistableRoot))
  11586. : recursivelyAccumulateSuspenseyCommit(
  11587. fiber,
  11588. committedLanes,
  11589. suspendedState
  11590. ));
  11591. break;
  11592. default:
  11593. recursivelyAccumulateSuspenseyCommit(
  11594. fiber,
  11595. committedLanes,
  11596. suspendedState
  11597. );
  11598. }
  11599. }
  11600. function detachAlternateSiblings(parentFiber) {
  11601. var previousFiber = parentFiber.alternate;
  11602. if (
  11603. null !== previousFiber &&
  11604. ((parentFiber = previousFiber.child), null !== parentFiber)
  11605. ) {
  11606. previousFiber.child = null;
  11607. do
  11608. (previousFiber = parentFiber.sibling),
  11609. (parentFiber.sibling = null),
  11610. (parentFiber = previousFiber);
  11611. while (null !== parentFiber);
  11612. }
  11613. }
  11614. function recursivelyTraversePassiveUnmountEffects(parentFiber) {
  11615. var deletions = parentFiber.deletions;
  11616. if (0 !== (parentFiber.flags & 16)) {
  11617. if (null !== deletions)
  11618. for (var i = 0; i < deletions.length; i++) {
  11619. var childToDelete = deletions[i],
  11620. prevEffectStart = pushComponentEffectStart();
  11621. nextEffect = childToDelete;
  11622. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  11623. childToDelete,
  11624. parentFiber
  11625. );
  11626. 0 !== (childToDelete.mode & 2) &&
  11627. 0 <= componentEffectStartTime &&
  11628. 0 <= componentEffectEndTime &&
  11629. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  11630. logComponentTrigger(
  11631. childToDelete,
  11632. componentEffectStartTime,
  11633. componentEffectEndTime,
  11634. "Unmount"
  11635. );
  11636. popComponentEffectStart(prevEffectStart);
  11637. }
  11638. detachAlternateSiblings(parentFiber);
  11639. }
  11640. if (parentFiber.subtreeFlags & 10256)
  11641. for (parentFiber = parentFiber.child; null !== parentFiber; )
  11642. commitPassiveUnmountOnFiber(parentFiber),
  11643. (parentFiber = parentFiber.sibling);
  11644. }
  11645. function commitPassiveUnmountOnFiber(finishedWork) {
  11646. var prevEffectStart = pushComponentEffectStart(),
  11647. prevEffectDuration = pushComponentEffectDuration(),
  11648. prevEffectErrors = pushComponentEffectErrors(),
  11649. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  11650. switch (finishedWork.tag) {
  11651. case 0:
  11652. case 11:
  11653. case 15:
  11654. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11655. finishedWork.flags & 2048 &&
  11656. commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, 9);
  11657. break;
  11658. case 3:
  11659. var prevProfilerEffectDuration = pushNestedEffectDurations();
  11660. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11661. finishedWork.stateNode.passiveEffectDuration += popNestedEffectDurations(
  11662. prevProfilerEffectDuration
  11663. );
  11664. break;
  11665. case 12:
  11666. prevProfilerEffectDuration = pushNestedEffectDurations();
  11667. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11668. finishedWork.stateNode.passiveEffectDuration +=
  11669. bubbleNestedEffectDurations(prevProfilerEffectDuration);
  11670. break;
  11671. case 22:
  11672. prevProfilerEffectDuration = finishedWork.stateNode;
  11673. null !== finishedWork.memoizedState &&
  11674. prevProfilerEffectDuration._visibility & 2 &&
  11675. (null === finishedWork.return || 13 !== finishedWork.return.tag)
  11676. ? ((prevProfilerEffectDuration._visibility &= -3),
  11677. recursivelyTraverseDisconnectPassiveEffects(finishedWork),
  11678. 0 !== (finishedWork.mode & 2) &&
  11679. 0 <= componentEffectStartTime &&
  11680. 0 <= componentEffectEndTime &&
  11681. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  11682. logComponentTrigger(
  11683. finishedWork,
  11684. componentEffectStartTime,
  11685. componentEffectEndTime,
  11686. "Disconnect"
  11687. ))
  11688. : recursivelyTraversePassiveUnmountEffects(finishedWork);
  11689. break;
  11690. default:
  11691. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11692. }
  11693. 0 !== (finishedWork.mode & 2) &&
  11694. 0 <= componentEffectStartTime &&
  11695. 0 <= componentEffectEndTime &&
  11696. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  11697. logComponentEffect(
  11698. finishedWork,
  11699. componentEffectStartTime,
  11700. componentEffectEndTime,
  11701. componentEffectDuration,
  11702. componentEffectErrors
  11703. );
  11704. popComponentEffectStart(prevEffectStart);
  11705. popComponentEffectDuration(prevEffectDuration);
  11706. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11707. componentEffectErrors = prevEffectErrors;
  11708. }
  11709. function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
  11710. var deletions = parentFiber.deletions;
  11711. if (0 !== (parentFiber.flags & 16)) {
  11712. if (null !== deletions)
  11713. for (var i = 0; i < deletions.length; i++) {
  11714. var childToDelete = deletions[i],
  11715. prevEffectStart = pushComponentEffectStart();
  11716. nextEffect = childToDelete;
  11717. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  11718. childToDelete,
  11719. parentFiber
  11720. );
  11721. 0 !== (childToDelete.mode & 2) &&
  11722. 0 <= componentEffectStartTime &&
  11723. 0 <= componentEffectEndTime &&
  11724. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  11725. logComponentTrigger(
  11726. childToDelete,
  11727. componentEffectStartTime,
  11728. componentEffectEndTime,
  11729. "Unmount"
  11730. );
  11731. popComponentEffectStart(prevEffectStart);
  11732. }
  11733. detachAlternateSiblings(parentFiber);
  11734. }
  11735. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  11736. deletions = parentFiber;
  11737. i = pushComponentEffectStart();
  11738. childToDelete = pushComponentEffectDuration();
  11739. prevEffectStart = pushComponentEffectErrors();
  11740. var prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  11741. switch (deletions.tag) {
  11742. case 0:
  11743. case 11:
  11744. case 15:
  11745. commitHookPassiveUnmountEffects(deletions, deletions.return, 8);
  11746. recursivelyTraverseDisconnectPassiveEffects(deletions);
  11747. break;
  11748. case 22:
  11749. var instance = deletions.stateNode;
  11750. instance._visibility & 2 &&
  11751. ((instance._visibility &= -3),
  11752. recursivelyTraverseDisconnectPassiveEffects(deletions));
  11753. break;
  11754. default:
  11755. recursivelyTraverseDisconnectPassiveEffects(deletions);
  11756. }
  11757. 0 !== (deletions.mode & 2) &&
  11758. 0 <= componentEffectStartTime &&
  11759. 0 <= componentEffectEndTime &&
  11760. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  11761. logComponentEffect(
  11762. deletions,
  11763. componentEffectStartTime,
  11764. componentEffectEndTime,
  11765. componentEffectDuration,
  11766. componentEffectErrors
  11767. );
  11768. popComponentEffectStart(i);
  11769. popComponentEffectDuration(childToDelete);
  11770. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11771. componentEffectErrors = prevEffectStart;
  11772. parentFiber = parentFiber.sibling;
  11773. }
  11774. }
  11775. function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  11776. deletedSubtreeRoot,
  11777. nearestMountedAncestor$jscomp$0
  11778. ) {
  11779. for (; null !== nextEffect; ) {
  11780. var fiber = nextEffect,
  11781. nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
  11782. prevEffectStart = pushComponentEffectStart(),
  11783. prevEffectDuration = pushComponentEffectDuration(),
  11784. prevEffectErrors = pushComponentEffectErrors(),
  11785. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  11786. switch (fiber.tag) {
  11787. case 0:
  11788. case 11:
  11789. case 15:
  11790. commitHookPassiveUnmountEffects(fiber, nearestMountedAncestor, 8);
  11791. break;
  11792. case 23:
  11793. case 22:
  11794. null !== fiber.memoizedState &&
  11795. null !== fiber.memoizedState.cachePool &&
  11796. ((nearestMountedAncestor = fiber.memoizedState.cachePool.pool),
  11797. null != nearestMountedAncestor && nearestMountedAncestor.refCount++);
  11798. break;
  11799. case 24:
  11800. releaseCache(fiber.memoizedState.cache);
  11801. }
  11802. 0 !== (fiber.mode & 2) &&
  11803. 0 <= componentEffectStartTime &&
  11804. 0 <= componentEffectEndTime &&
  11805. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  11806. logComponentEffect(
  11807. fiber,
  11808. componentEffectStartTime,
  11809. componentEffectEndTime,
  11810. componentEffectDuration,
  11811. componentEffectErrors
  11812. );
  11813. popComponentEffectStart(prevEffectStart);
  11814. popComponentEffectDuration(prevEffectDuration);
  11815. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11816. componentEffectErrors = prevEffectErrors;
  11817. prevEffectStart = fiber.child;
  11818. if (null !== prevEffectStart)
  11819. (prevEffectStart.return = fiber), (nextEffect = prevEffectStart);
  11820. else
  11821. a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
  11822. prevEffectStart = nextEffect;
  11823. prevEffectDuration = prevEffectStart.sibling;
  11824. prevEffectErrors = prevEffectStart.return;
  11825. detachFiberAfterEffects(prevEffectStart);
  11826. if (prevEffectStart === fiber) {
  11827. nextEffect = null;
  11828. break a;
  11829. }
  11830. if (null !== prevEffectDuration) {
  11831. prevEffectDuration.return = prevEffectErrors;
  11832. nextEffect = prevEffectDuration;
  11833. break a;
  11834. }
  11835. nextEffect = prevEffectErrors;
  11836. }
  11837. }
  11838. }
  11839. var DefaultAsyncDispatcher = {
  11840. getCacheForType: function (resourceType) {
  11841. var cache = readContext(CacheContext),
  11842. cacheForType = cache.data.get(resourceType);
  11843. void 0 === cacheForType &&
  11844. ((cacheForType = resourceType()),
  11845. cache.data.set(resourceType, cacheForType));
  11846. return cacheForType;
  11847. },
  11848. cacheSignal: function () {
  11849. return readContext(CacheContext).controller.signal;
  11850. }
  11851. },
  11852. PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
  11853. executionContext = 0,
  11854. workInProgressRoot = null,
  11855. workInProgress = null,
  11856. workInProgressRootRenderLanes = 0,
  11857. workInProgressSuspendedReason = 0,
  11858. workInProgressThrownValue = null,
  11859. workInProgressRootDidSkipSuspendedSiblings = !1,
  11860. workInProgressRootIsPrerendering = !1,
  11861. workInProgressRootDidAttachPingListener = !1,
  11862. entangledRenderLanes = 0,
  11863. workInProgressRootExitStatus = 0,
  11864. workInProgressRootSkippedLanes = 0,
  11865. workInProgressRootInterleavedUpdatedLanes = 0,
  11866. workInProgressRootPingedLanes = 0,
  11867. workInProgressDeferredLane = 0,
  11868. workInProgressSuspendedRetryLanes = 0,
  11869. workInProgressRootConcurrentErrors = null,
  11870. workInProgressRootRecoverableErrors = null,
  11871. workInProgressRootDidIncludeRecursiveRenderUpdate = !1,
  11872. globalMostRecentFallbackTime = 0,
  11873. globalMostRecentTransitionTime = 0,
  11874. workInProgressRootRenderTargetTime = Infinity,
  11875. workInProgressTransitions = null,
  11876. legacyErrorBoundariesThatAlreadyFailed = null,
  11877. pendingEffectsStatus = 0,
  11878. pendingEffectsRoot = null,
  11879. pendingFinishedWork = null,
  11880. pendingEffectsLanes = 0,
  11881. pendingEffectsRemainingLanes = 0,
  11882. pendingEffectsRenderEndTime = -0,
  11883. pendingPassiveTransitions = null,
  11884. pendingRecoverableErrors = null,
  11885. pendingSuspendedCommitReason = null,
  11886. pendingDelayedCommitReason = 0,
  11887. pendingSuspendedViewTransitionReason = null,
  11888. nestedUpdateCount = 0,
  11889. rootWithNestedUpdates = null;
  11890. function requestUpdateLane() {
  11891. return 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes
  11892. ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes
  11893. : null !== ReactSharedInternals.T
  11894. ? requestTransitionLane()
  11895. : resolveUpdatePriority();
  11896. }
  11897. function requestDeferredLane() {
  11898. if (0 === workInProgressDeferredLane)
  11899. if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {
  11900. var lane = nextTransitionDeferredLane;
  11901. nextTransitionDeferredLane <<= 1;
  11902. 0 === (nextTransitionDeferredLane & 3932160) &&
  11903. (nextTransitionDeferredLane = 262144);
  11904. workInProgressDeferredLane = lane;
  11905. } else workInProgressDeferredLane = 536870912;
  11906. lane = suspenseHandlerStackCursor.current;
  11907. null !== lane && (lane.flags |= 32);
  11908. return workInProgressDeferredLane;
  11909. }
  11910. function scheduleUpdateOnFiber(root, fiber, lane) {
  11911. if (
  11912. (root === workInProgressRoot &&
  11913. (2 === workInProgressSuspendedReason ||
  11914. 9 === workInProgressSuspendedReason)) ||
  11915. null !== root.cancelPendingCommit
  11916. )
  11917. prepareFreshStack(root, 0),
  11918. markRootSuspended(
  11919. root,
  11920. workInProgressRootRenderLanes,
  11921. workInProgressDeferredLane,
  11922. !1
  11923. );
  11924. markRootUpdated$1(root, lane);
  11925. if (0 === (executionContext & 2) || root !== workInProgressRoot)
  11926. isDevToolsPresent && addFiberToLanesMap(root, fiber, lane),
  11927. root === workInProgressRoot &&
  11928. (0 === (executionContext & 2) &&
  11929. (workInProgressRootInterleavedUpdatedLanes |= lane),
  11930. 4 === workInProgressRootExitStatus &&
  11931. markRootSuspended(
  11932. root,
  11933. workInProgressRootRenderLanes,
  11934. workInProgressDeferredLane,
  11935. !1
  11936. )),
  11937. ensureRootIsScheduled(root);
  11938. }
  11939. function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
  11940. if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
  11941. if (0 !== workInProgressRootRenderLanes && null !== workInProgress) {
  11942. var yieldEndTime = now$1();
  11943. switch (yieldReason) {
  11944. case 3:
  11945. case 2:
  11946. supportsUserTiming &&
  11947. console.timeStamp(
  11948. "Suspended",
  11949. yieldStartTime,
  11950. yieldEndTime,
  11951. "Components \u269b",
  11952. void 0,
  11953. "primary-light"
  11954. );
  11955. break;
  11956. case 9:
  11957. supportsUserTiming &&
  11958. console.timeStamp(
  11959. "Action",
  11960. yieldStartTime,
  11961. yieldEndTime,
  11962. "Components \u269b",
  11963. void 0,
  11964. "primary-light"
  11965. );
  11966. break;
  11967. default:
  11968. if (supportsUserTiming) {
  11969. var yieldDuration = yieldEndTime - yieldStartTime;
  11970. 3 > yieldDuration ||
  11971. console.timeStamp(
  11972. "Blocked",
  11973. yieldStartTime,
  11974. yieldEndTime,
  11975. "Components \u269b",
  11976. void 0,
  11977. 5 > yieldDuration
  11978. ? "primary-light"
  11979. : 10 > yieldDuration
  11980. ? "primary"
  11981. : 100 > yieldDuration
  11982. ? "primary-dark"
  11983. : "error"
  11984. );
  11985. }
  11986. }
  11987. }
  11988. var exitStatus = (yieldEndTime =
  11989. (!forceSync &&
  11990. 0 === (lanes & 127) &&
  11991. 0 === (lanes & root$jscomp$0.expiredLanes)) ||
  11992. checkIfRootIsPrerendering(root$jscomp$0, lanes))
  11993. ? renderRootConcurrent(root$jscomp$0, lanes)
  11994. : renderRootSync(root$jscomp$0, lanes, !0),
  11995. renderWasConcurrent = yieldEndTime;
  11996. do {
  11997. if (0 === exitStatus) {
  11998. workInProgressRootIsPrerendering &&
  11999. !yieldEndTime &&
  12000. markRootSuspended(root$jscomp$0, lanes, 0, !1);
  12001. lanes = workInProgressSuspendedReason;
  12002. yieldStartTime = now();
  12003. yieldReason = lanes;
  12004. break;
  12005. } else {
  12006. yieldDuration = now$1();
  12007. forceSync = root$jscomp$0.current.alternate;
  12008. if (
  12009. renderWasConcurrent &&
  12010. !isRenderConsistentWithExternalStores(forceSync)
  12011. ) {
  12012. setCurrentTrackFromLanes(lanes);
  12013. !supportsUserTiming ||
  12014. yieldDuration <= renderStartTime ||
  12015. console.timeStamp(
  12016. "Teared Render",
  12017. renderStartTime,
  12018. yieldDuration,
  12019. currentTrack,
  12020. "Scheduler \u269b",
  12021. "error"
  12022. );
  12023. finalizeRender(lanes, yieldDuration);
  12024. exitStatus = renderRootSync(root$jscomp$0, lanes, !1);
  12025. renderWasConcurrent = !1;
  12026. continue;
  12027. }
  12028. if (2 === exitStatus) {
  12029. renderWasConcurrent = lanes;
  12030. if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)
  12031. var JSCompiler_inline_result = 0;
  12032. else
  12033. (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913),
  12034. (JSCompiler_inline_result =
  12035. 0 !== JSCompiler_inline_result
  12036. ? JSCompiler_inline_result
  12037. : JSCompiler_inline_result & 536870912
  12038. ? 536870912
  12039. : 0);
  12040. if (0 !== JSCompiler_inline_result) {
  12041. setCurrentTrackFromLanes(lanes);
  12042. logErroredRenderPhase(renderStartTime, yieldDuration);
  12043. finalizeRender(lanes, yieldDuration);
  12044. lanes = JSCompiler_inline_result;
  12045. var root = root$jscomp$0;
  12046. yieldDuration = workInProgressRootConcurrentErrors;
  12047. var wasRootDehydrated = root.current.memoizedState.isDehydrated;
  12048. wasRootDehydrated &&
  12049. (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256);
  12050. exitStatus = renderRootSync(root, JSCompiler_inline_result, !1);
  12051. 2 !== exitStatus &&
  12052. (workInProgressRootDidAttachPingListener && !wasRootDehydrated
  12053. ? ((root.errorRecoveryDisabledLanes |= renderWasConcurrent),
  12054. (workInProgressRootInterleavedUpdatedLanes |=
  12055. renderWasConcurrent),
  12056. (exitStatus = 4))
  12057. : ((renderWasConcurrent = workInProgressRootRecoverableErrors),
  12058. (workInProgressRootRecoverableErrors = yieldDuration),
  12059. null !== renderWasConcurrent &&
  12060. ((yieldDuration = renderWasConcurrent),
  12061. null === workInProgressRootRecoverableErrors
  12062. ? (workInProgressRootRecoverableErrors = yieldDuration)
  12063. : workInProgressRootRecoverableErrors.push.apply(
  12064. workInProgressRootRecoverableErrors,
  12065. yieldDuration
  12066. ))));
  12067. renderWasConcurrent = !1;
  12068. if (2 !== exitStatus) continue;
  12069. else yieldDuration = now$1();
  12070. }
  12071. }
  12072. if (1 === exitStatus) {
  12073. setCurrentTrackFromLanes(lanes);
  12074. logErroredRenderPhase(renderStartTime, yieldDuration);
  12075. finalizeRender(lanes, yieldDuration);
  12076. prepareFreshStack(root$jscomp$0, 0);
  12077. markRootSuspended(root$jscomp$0, lanes, 0, !0);
  12078. break;
  12079. }
  12080. a: {
  12081. yieldEndTime = root$jscomp$0;
  12082. renderWasConcurrent = exitStatus;
  12083. switch (renderWasConcurrent) {
  12084. case 0:
  12085. case 1:
  12086. throw Error(formatProdErrorMessage(345));
  12087. case 4:
  12088. if ((lanes & 4194048) !== lanes) break;
  12089. case 6:
  12090. setCurrentTrackFromLanes(lanes);
  12091. logSuspendedRenderPhase(renderStartTime, yieldDuration, lanes);
  12092. finalizeRender(lanes, yieldDuration);
  12093. forceSync = lanes;
  12094. 0 !== (forceSync & 127)
  12095. ? (blockingSuspendedTime = yieldDuration)
  12096. : 0 !== (forceSync & 4194048) &&
  12097. (transitionSuspendedTime = yieldDuration);
  12098. markRootSuspended(
  12099. yieldEndTime,
  12100. lanes,
  12101. workInProgressDeferredLane,
  12102. !workInProgressRootDidSkipSuspendedSiblings
  12103. );
  12104. break a;
  12105. case 2:
  12106. workInProgressRootRecoverableErrors = null;
  12107. break;
  12108. case 3:
  12109. case 5:
  12110. break;
  12111. default:
  12112. throw Error(formatProdErrorMessage(329));
  12113. }
  12114. if (
  12115. (lanes & 62914560) === lanes &&
  12116. ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()),
  12117. 10 < exitStatus)
  12118. ) {
  12119. markRootSuspended(
  12120. yieldEndTime,
  12121. lanes,
  12122. workInProgressDeferredLane,
  12123. !workInProgressRootDidSkipSuspendedSiblings
  12124. );
  12125. if (0 !== getNextLanes(yieldEndTime, 0, !0)) break a;
  12126. pendingEffectsLanes = lanes;
  12127. yieldEndTime.timeoutHandle = scheduleTimeout(
  12128. commitRootWhenReady.bind(
  12129. null,
  12130. yieldEndTime,
  12131. forceSync,
  12132. workInProgressRootRecoverableErrors,
  12133. workInProgressTransitions,
  12134. workInProgressRootDidIncludeRecursiveRenderUpdate,
  12135. lanes,
  12136. workInProgressDeferredLane,
  12137. workInProgressRootInterleavedUpdatedLanes,
  12138. workInProgressSuspendedRetryLanes,
  12139. workInProgressRootDidSkipSuspendedSiblings,
  12140. renderWasConcurrent,
  12141. "Throttled",
  12142. renderStartTime,
  12143. yieldDuration
  12144. ),
  12145. exitStatus
  12146. );
  12147. break a;
  12148. }
  12149. commitRootWhenReady(
  12150. yieldEndTime,
  12151. forceSync,
  12152. workInProgressRootRecoverableErrors,
  12153. workInProgressTransitions,
  12154. workInProgressRootDidIncludeRecursiveRenderUpdate,
  12155. lanes,
  12156. workInProgressDeferredLane,
  12157. workInProgressRootInterleavedUpdatedLanes,
  12158. workInProgressSuspendedRetryLanes,
  12159. workInProgressRootDidSkipSuspendedSiblings,
  12160. renderWasConcurrent,
  12161. null,
  12162. renderStartTime,
  12163. yieldDuration
  12164. );
  12165. }
  12166. }
  12167. break;
  12168. } while (1);
  12169. ensureRootIsScheduled(root$jscomp$0);
  12170. }
  12171. function commitRootWhenReady(
  12172. root,
  12173. finishedWork,
  12174. recoverableErrors,
  12175. transitions,
  12176. didIncludeRenderPhaseUpdate,
  12177. lanes,
  12178. spawnedLane,
  12179. updatedLanes,
  12180. suspendedRetryLanes,
  12181. didSkipSuspendedSiblings,
  12182. exitStatus,
  12183. suspendedCommitReason,
  12184. completedRenderStartTime,
  12185. completedRenderEndTime
  12186. ) {
  12187. root.timeoutHandle = -1;
  12188. var subtreeFlags = finishedWork.subtreeFlags,
  12189. suspendedState = null;
  12190. if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
  12191. if (
  12192. ((suspendedState = {
  12193. stylesheets: null,
  12194. count: 0,
  12195. imgCount: 0,
  12196. imgBytes: 0,
  12197. suspenseyImages: [],
  12198. waitingForImages: !0,
  12199. waitingForViewTransition: !1,
  12200. unsuspend: noop$1
  12201. }),
  12202. accumulateSuspenseyCommitOnFiber(finishedWork, lanes, suspendedState),
  12203. (subtreeFlags =
  12204. (lanes & 62914560) === lanes
  12205. ? globalMostRecentFallbackTime - now$1()
  12206. : (lanes & 4194048) === lanes
  12207. ? globalMostRecentTransitionTime - now$1()
  12208. : 0),
  12209. (subtreeFlags = waitForCommitToBeReady(suspendedState, subtreeFlags)),
  12210. null !== subtreeFlags)
  12211. ) {
  12212. pendingEffectsLanes = lanes;
  12213. root.cancelPendingCommit = subtreeFlags(
  12214. commitRoot.bind(
  12215. null,
  12216. root,
  12217. finishedWork,
  12218. lanes,
  12219. recoverableErrors,
  12220. transitions,
  12221. didIncludeRenderPhaseUpdate,
  12222. spawnedLane,
  12223. updatedLanes,
  12224. suspendedRetryLanes,
  12225. exitStatus,
  12226. suspendedState,
  12227. suspendedState.waitingForViewTransition
  12228. ? "Waiting for the previous Animation"
  12229. : 0 < suspendedState.count
  12230. ? 0 < suspendedState.imgCount
  12231. ? "Suspended on CSS and Images"
  12232. : "Suspended on CSS"
  12233. : 1 === suspendedState.imgCount
  12234. ? "Suspended on an Image"
  12235. : 0 < suspendedState.imgCount
  12236. ? "Suspended on Images"
  12237. : null,
  12238. completedRenderStartTime,
  12239. completedRenderEndTime
  12240. )
  12241. );
  12242. markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);
  12243. return;
  12244. }
  12245. commitRoot(
  12246. root,
  12247. finishedWork,
  12248. lanes,
  12249. recoverableErrors,
  12250. transitions,
  12251. didIncludeRenderPhaseUpdate,
  12252. spawnedLane,
  12253. updatedLanes,
  12254. suspendedRetryLanes,
  12255. exitStatus,
  12256. suspendedState,
  12257. suspendedCommitReason,
  12258. completedRenderStartTime,
  12259. completedRenderEndTime
  12260. );
  12261. }
  12262. function isRenderConsistentWithExternalStores(finishedWork) {
  12263. for (var node = finishedWork; ; ) {
  12264. var tag = node.tag;
  12265. if (
  12266. (0 === tag || 11 === tag || 15 === tag) &&
  12267. node.flags & 16384 &&
  12268. ((tag = node.updateQueue),
  12269. null !== tag && ((tag = tag.stores), null !== tag))
  12270. )
  12271. for (var i = 0; i < tag.length; i++) {
  12272. var check = tag[i],
  12273. getSnapshot = check.getSnapshot;
  12274. check = check.value;
  12275. try {
  12276. if (!objectIs(getSnapshot(), check)) return !1;
  12277. } catch (error) {
  12278. return !1;
  12279. }
  12280. }
  12281. tag = node.child;
  12282. if (node.subtreeFlags & 16384 && null !== tag)
  12283. (tag.return = node), (node = tag);
  12284. else {
  12285. if (node === finishedWork) break;
  12286. for (; null === node.sibling; ) {
  12287. if (null === node.return || node.return === finishedWork) return !0;
  12288. node = node.return;
  12289. }
  12290. node.sibling.return = node.return;
  12291. node = node.sibling;
  12292. }
  12293. }
  12294. return !0;
  12295. }
  12296. function markRootSuspended(
  12297. root,
  12298. suspendedLanes,
  12299. spawnedLane,
  12300. didAttemptEntireTree
  12301. ) {
  12302. suspendedLanes &= ~workInProgressRootPingedLanes;
  12303. suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
  12304. root.suspendedLanes |= suspendedLanes;
  12305. root.pingedLanes &= ~suspendedLanes;
  12306. didAttemptEntireTree && (root.warmLanes |= suspendedLanes);
  12307. didAttemptEntireTree = root.expirationTimes;
  12308. for (var lanes = suspendedLanes; 0 < lanes; ) {
  12309. var index$6 = 31 - clz32(lanes),
  12310. lane = 1 << index$6;
  12311. didAttemptEntireTree[index$6] = -1;
  12312. lanes &= ~lane;
  12313. }
  12314. 0 !== spawnedLane &&
  12315. markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
  12316. }
  12317. function flushSyncWork$1() {
  12318. return 0 === (executionContext & 6)
  12319. ? (flushSyncWorkAcrossRoots_impl(0, !1), !1)
  12320. : !0;
  12321. }
  12322. function resetWorkInProgressStack() {
  12323. if (null !== workInProgress) {
  12324. if (0 === workInProgressSuspendedReason)
  12325. var interruptedWork = workInProgress.return;
  12326. else
  12327. (interruptedWork = workInProgress),
  12328. (lastContextDependency = currentlyRenderingFiber$1 = null),
  12329. resetHooksOnUnwind(interruptedWork),
  12330. (thenableState$1 = null),
  12331. (thenableIndexCounter$1 = 0),
  12332. (interruptedWork = workInProgress);
  12333. for (; null !== interruptedWork; )
  12334. unwindInterruptedWork(interruptedWork.alternate, interruptedWork),
  12335. (interruptedWork = interruptedWork.return);
  12336. workInProgress = null;
  12337. }
  12338. }
  12339. function finalizeRender(lanes, finalizationTime) {
  12340. 0 !== (lanes & 127) && (blockingClampTime = finalizationTime);
  12341. 0 !== (lanes & 4194048) && (transitionClampTime = finalizationTime);
  12342. }
  12343. function prepareFreshStack(root, lanes) {
  12344. supportsUserTiming &&
  12345. (console.timeStamp(
  12346. "Blocking Track",
  12347. 0.003,
  12348. 0.003,
  12349. "Blocking",
  12350. "Scheduler \u269b",
  12351. "primary-light"
  12352. ),
  12353. console.timeStamp(
  12354. "Transition Track",
  12355. 0.003,
  12356. 0.003,
  12357. "Transition",
  12358. "Scheduler \u269b",
  12359. "primary-light"
  12360. ),
  12361. console.timeStamp(
  12362. "Suspense Track",
  12363. 0.003,
  12364. 0.003,
  12365. "Suspense",
  12366. "Scheduler \u269b",
  12367. "primary-light"
  12368. ),
  12369. console.timeStamp(
  12370. "Idle Track",
  12371. 0.003,
  12372. 0.003,
  12373. "Idle",
  12374. "Scheduler \u269b",
  12375. "primary-light"
  12376. ));
  12377. var previousRenderStartTime = renderStartTime;
  12378. renderStartTime = now();
  12379. if (0 !== workInProgressRootRenderLanes && 0 < previousRenderStartTime) {
  12380. setCurrentTrackFromLanes(workInProgressRootRenderLanes);
  12381. if (
  12382. 3 === workInProgressRootExitStatus ||
  12383. 4 === workInProgressRootExitStatus
  12384. )
  12385. logSuspendedRenderPhase(previousRenderStartTime, renderStartTime, lanes);
  12386. else {
  12387. var endTime = renderStartTime;
  12388. !supportsUserTiming ||
  12389. endTime <= previousRenderStartTime ||
  12390. console.timeStamp(
  12391. (lanes & 536870912) === lanes
  12392. ? "Prewarm"
  12393. : (lanes & 201326741) === lanes
  12394. ? "Interrupted Hydration"
  12395. : "Interrupted Render",
  12396. previousRenderStartTime,
  12397. endTime,
  12398. currentTrack,
  12399. "Scheduler \u269b",
  12400. (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"
  12401. );
  12402. }
  12403. finalizeRender(workInProgressRootRenderLanes, renderStartTime);
  12404. }
  12405. if (0 !== (lanes & 127)) {
  12406. previousRenderStartTime =
  12407. 0 <= blockingUpdateTime && blockingUpdateTime < blockingClampTime
  12408. ? blockingClampTime
  12409. : blockingUpdateTime;
  12410. endTime =
  12411. 0 <= blockingEventTime && blockingEventTime < blockingClampTime
  12412. ? blockingClampTime
  12413. : blockingEventTime;
  12414. var clampedRenderStartTime$203 =
  12415. 0 <= endTime
  12416. ? endTime
  12417. : 0 <= previousRenderStartTime
  12418. ? previousRenderStartTime
  12419. : renderStartTime;
  12420. 0 <= blockingSuspendedTime &&
  12421. (setCurrentTrackFromLanes(2),
  12422. logSuspendedWithDelayPhase(
  12423. blockingSuspendedTime,
  12424. clampedRenderStartTime$203,
  12425. lanes
  12426. ));
  12427. clampedRenderStartTime$203 = blockingEventType;
  12428. var eventIsRepeat = 0 < blockingEventRepeatTime,
  12429. isSpawnedUpdate = 1 === blockingUpdateType,
  12430. isPingedUpdate = 2 === blockingUpdateType,
  12431. renderStartTime$jscomp$0 = renderStartTime;
  12432. supportsUserTiming &&
  12433. ((currentTrack = "Blocking"),
  12434. 0 < previousRenderStartTime
  12435. ? previousRenderStartTime > renderStartTime$jscomp$0 &&
  12436. (previousRenderStartTime = renderStartTime$jscomp$0)
  12437. : (previousRenderStartTime = renderStartTime$jscomp$0),
  12438. 0 < endTime
  12439. ? endTime > previousRenderStartTime &&
  12440. (endTime = previousRenderStartTime)
  12441. : (endTime = previousRenderStartTime),
  12442. null !== clampedRenderStartTime$203 &&
  12443. previousRenderStartTime > endTime &&
  12444. console.timeStamp(
  12445. eventIsRepeat
  12446. ? "Consecutive"
  12447. : "Event: " + clampedRenderStartTime$203,
  12448. endTime,
  12449. previousRenderStartTime,
  12450. currentTrack,
  12451. "Scheduler \u269b",
  12452. eventIsRepeat ? "secondary-light" : "warning"
  12453. ),
  12454. renderStartTime$jscomp$0 > previousRenderStartTime &&
  12455. console.timeStamp(
  12456. isPingedUpdate
  12457. ? "Promise Resolved"
  12458. : isSpawnedUpdate
  12459. ? "Cascading Update"
  12460. : 5 < renderStartTime$jscomp$0 - previousRenderStartTime
  12461. ? "Update Blocked"
  12462. : "Update",
  12463. previousRenderStartTime,
  12464. renderStartTime$jscomp$0,
  12465. currentTrack,
  12466. "Scheduler \u269b",
  12467. isSpawnedUpdate
  12468. ? "error"
  12469. : (lanes & 738197653) === lanes
  12470. ? "tertiary-light"
  12471. : "primary-light"
  12472. ));
  12473. blockingUpdateTime = -1.1;
  12474. blockingUpdateType = 0;
  12475. blockingSuspendedTime = -1.1;
  12476. blockingEventRepeatTime = blockingEventTime;
  12477. blockingEventTime = -1.1;
  12478. blockingClampTime = now();
  12479. }
  12480. 0 !== (lanes & 4194048) &&
  12481. ((previousRenderStartTime =
  12482. 0 <= transitionStartTime && transitionStartTime < transitionClampTime
  12483. ? transitionClampTime
  12484. : transitionStartTime),
  12485. (endTime =
  12486. 0 <= transitionUpdateTime && transitionUpdateTime < transitionClampTime
  12487. ? transitionClampTime
  12488. : transitionUpdateTime),
  12489. (clampedRenderStartTime$203 =
  12490. 0 <= transitionEventTime && transitionEventTime < transitionClampTime
  12491. ? transitionClampTime
  12492. : transitionEventTime),
  12493. (eventIsRepeat =
  12494. 0 <= clampedRenderStartTime$203
  12495. ? clampedRenderStartTime$203
  12496. : 0 <= endTime
  12497. ? endTime
  12498. : renderStartTime),
  12499. 0 <= transitionSuspendedTime &&
  12500. (setCurrentTrackFromLanes(256),
  12501. logSuspendedWithDelayPhase(
  12502. transitionSuspendedTime,
  12503. eventIsRepeat,
  12504. lanes
  12505. )),
  12506. (eventIsRepeat = transitionEventType),
  12507. (isSpawnedUpdate = 0 < transitionEventRepeatTime),
  12508. (isPingedUpdate = 2 === transitionUpdateType),
  12509. (renderStartTime$jscomp$0 = renderStartTime),
  12510. supportsUserTiming &&
  12511. ((currentTrack = "Transition"),
  12512. 0 < endTime
  12513. ? endTime > renderStartTime$jscomp$0 &&
  12514. (endTime = renderStartTime$jscomp$0)
  12515. : (endTime = renderStartTime$jscomp$0),
  12516. 0 < previousRenderStartTime
  12517. ? previousRenderStartTime > endTime &&
  12518. (previousRenderStartTime = endTime)
  12519. : (previousRenderStartTime = endTime),
  12520. 0 < clampedRenderStartTime$203
  12521. ? clampedRenderStartTime$203 > previousRenderStartTime &&
  12522. (clampedRenderStartTime$203 = previousRenderStartTime)
  12523. : (clampedRenderStartTime$203 = previousRenderStartTime),
  12524. previousRenderStartTime > clampedRenderStartTime$203 &&
  12525. null !== eventIsRepeat &&
  12526. console.timeStamp(
  12527. isSpawnedUpdate ? "Consecutive" : "Event: " + eventIsRepeat,
  12528. clampedRenderStartTime$203,
  12529. previousRenderStartTime,
  12530. currentTrack,
  12531. "Scheduler \u269b",
  12532. isSpawnedUpdate ? "secondary-light" : "warning"
  12533. ),
  12534. endTime > previousRenderStartTime &&
  12535. console.timeStamp(
  12536. "Action",
  12537. previousRenderStartTime,
  12538. endTime,
  12539. currentTrack,
  12540. "Scheduler \u269b",
  12541. "primary-dark"
  12542. ),
  12543. renderStartTime$jscomp$0 > endTime &&
  12544. console.timeStamp(
  12545. isPingedUpdate
  12546. ? "Promise Resolved"
  12547. : 5 < renderStartTime$jscomp$0 - endTime
  12548. ? "Update Blocked"
  12549. : "Update",
  12550. endTime,
  12551. renderStartTime$jscomp$0,
  12552. currentTrack,
  12553. "Scheduler \u269b",
  12554. "primary-light"
  12555. )),
  12556. (transitionUpdateTime = transitionStartTime = -1.1),
  12557. (transitionUpdateType = 0),
  12558. (transitionSuspendedTime = -1.1),
  12559. (transitionEventRepeatTime = transitionEventTime),
  12560. (transitionEventTime = -1.1),
  12561. (transitionClampTime = now()));
  12562. previousRenderStartTime = root.timeoutHandle;
  12563. -1 !== previousRenderStartTime &&
  12564. ((root.timeoutHandle = -1), cancelTimeout(previousRenderStartTime));
  12565. previousRenderStartTime = root.cancelPendingCommit;
  12566. null !== previousRenderStartTime &&
  12567. ((root.cancelPendingCommit = null), previousRenderStartTime());
  12568. pendingEffectsLanes = 0;
  12569. resetWorkInProgressStack();
  12570. workInProgressRoot = root;
  12571. workInProgress = previousRenderStartTime = createWorkInProgress(
  12572. root.current,
  12573. null
  12574. );
  12575. workInProgressRootRenderLanes = lanes;
  12576. workInProgressSuspendedReason = 0;
  12577. workInProgressThrownValue = null;
  12578. workInProgressRootDidSkipSuspendedSiblings = !1;
  12579. workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);
  12580. workInProgressRootDidAttachPingListener = !1;
  12581. workInProgressSuspendedRetryLanes =
  12582. workInProgressDeferredLane =
  12583. workInProgressRootPingedLanes =
  12584. workInProgressRootInterleavedUpdatedLanes =
  12585. workInProgressRootSkippedLanes =
  12586. workInProgressRootExitStatus =
  12587. 0;
  12588. workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =
  12589. null;
  12590. workInProgressRootDidIncludeRecursiveRenderUpdate = !1;
  12591. 0 !== (lanes & 8) && (lanes |= lanes & 32);
  12592. endTime = root.entangledLanes;
  12593. if (0 !== endTime)
  12594. for (root = root.entanglements, endTime &= lanes; 0 < endTime; )
  12595. (clampedRenderStartTime$203 = 31 - clz32(endTime)),
  12596. (eventIsRepeat = 1 << clampedRenderStartTime$203),
  12597. (lanes |= root[clampedRenderStartTime$203]),
  12598. (endTime &= ~eventIsRepeat);
  12599. entangledRenderLanes = lanes;
  12600. finishQueueingConcurrentUpdates();
  12601. return previousRenderStartTime;
  12602. }
  12603. function handleThrow(root, thrownValue) {
  12604. currentlyRenderingFiber = null;
  12605. ReactSharedInternals.H = ContextOnlyDispatcher;
  12606. thrownValue === SuspenseException || thrownValue === SuspenseActionException
  12607. ? ((thrownValue = getSuspendedThenable()),
  12608. (workInProgressSuspendedReason = 3))
  12609. : thrownValue === SuspenseyCommitException
  12610. ? ((thrownValue = getSuspendedThenable()),
  12611. (workInProgressSuspendedReason = 4))
  12612. : (workInProgressSuspendedReason =
  12613. thrownValue === SelectiveHydrationException
  12614. ? 8
  12615. : null !== thrownValue &&
  12616. "object" === typeof thrownValue &&
  12617. "function" === typeof thrownValue.then
  12618. ? 6
  12619. : 1);
  12620. workInProgressThrownValue = thrownValue;
  12621. var erroredWork = workInProgress;
  12622. null === erroredWork
  12623. ? ((workInProgressRootExitStatus = 1),
  12624. logUncaughtError(
  12625. root,
  12626. createCapturedValueAtFiber(thrownValue, root.current)
  12627. ))
  12628. : erroredWork.mode & 2 &&
  12629. stopProfilerTimerIfRunningAndRecordDuration(erroredWork);
  12630. }
  12631. function shouldRemainOnPreviousScreen() {
  12632. var handler = suspenseHandlerStackCursor.current;
  12633. return null === handler
  12634. ? !0
  12635. : (workInProgressRootRenderLanes & 4194048) ===
  12636. workInProgressRootRenderLanes
  12637. ? null === shellBoundary
  12638. ? !0
  12639. : !1
  12640. : (workInProgressRootRenderLanes & 62914560) ===
  12641. workInProgressRootRenderLanes ||
  12642. 0 !== (workInProgressRootRenderLanes & 536870912)
  12643. ? handler === shellBoundary
  12644. : !1;
  12645. }
  12646. function pushDispatcher() {
  12647. var prevDispatcher = ReactSharedInternals.H;
  12648. ReactSharedInternals.H = ContextOnlyDispatcher;
  12649. return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
  12650. }
  12651. function pushAsyncDispatcher() {
  12652. var prevAsyncDispatcher = ReactSharedInternals.A;
  12653. ReactSharedInternals.A = DefaultAsyncDispatcher;
  12654. return prevAsyncDispatcher;
  12655. }
  12656. function renderDidSuspendDelayIfPossible() {
  12657. workInProgressRootExitStatus = 4;
  12658. workInProgressRootDidSkipSuspendedSiblings ||
  12659. ((workInProgressRootRenderLanes & 4194048) !==
  12660. workInProgressRootRenderLanes &&
  12661. null !== suspenseHandlerStackCursor.current) ||
  12662. (workInProgressRootIsPrerendering = !0);
  12663. (0 === (workInProgressRootSkippedLanes & 134217727) &&
  12664. 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||
  12665. null === workInProgressRoot ||
  12666. markRootSuspended(
  12667. workInProgressRoot,
  12668. workInProgressRootRenderLanes,
  12669. workInProgressDeferredLane,
  12670. !1
  12671. );
  12672. }
  12673. function renderRootSync(root, lanes, shouldYieldForPrerendering) {
  12674. var prevExecutionContext = executionContext;
  12675. executionContext |= 2;
  12676. var prevDispatcher = pushDispatcher(),
  12677. prevAsyncDispatcher = pushAsyncDispatcher();
  12678. if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
  12679. if (isDevToolsPresent) {
  12680. var memoizedUpdaters = root.memoizedUpdaters;
  12681. 0 < memoizedUpdaters.size &&
  12682. (restorePendingUpdaters(root, workInProgressRootRenderLanes),
  12683. memoizedUpdaters.clear());
  12684. movePendingFibersToMemoized(root, lanes);
  12685. }
  12686. workInProgressTransitions = null;
  12687. prepareFreshStack(root, lanes);
  12688. }
  12689. lanes = !1;
  12690. memoizedUpdaters = workInProgressRootExitStatus;
  12691. a: do
  12692. try {
  12693. if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
  12694. var unitOfWork = workInProgress,
  12695. thrownValue = workInProgressThrownValue;
  12696. switch (workInProgressSuspendedReason) {
  12697. case 8:
  12698. resetWorkInProgressStack();
  12699. memoizedUpdaters = 6;
  12700. break a;
  12701. case 3:
  12702. case 2:
  12703. case 9:
  12704. case 6:
  12705. null === suspenseHandlerStackCursor.current && (lanes = !0);
  12706. var reason = workInProgressSuspendedReason;
  12707. workInProgressSuspendedReason = 0;
  12708. workInProgressThrownValue = null;
  12709. throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
  12710. if (
  12711. shouldYieldForPrerendering &&
  12712. workInProgressRootIsPrerendering
  12713. ) {
  12714. memoizedUpdaters = 0;
  12715. break a;
  12716. }
  12717. break;
  12718. default:
  12719. (reason = workInProgressSuspendedReason),
  12720. (workInProgressSuspendedReason = 0),
  12721. (workInProgressThrownValue = null),
  12722. throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
  12723. }
  12724. }
  12725. workLoopSync();
  12726. memoizedUpdaters = workInProgressRootExitStatus;
  12727. break;
  12728. } catch (thrownValue$208) {
  12729. handleThrow(root, thrownValue$208);
  12730. }
  12731. while (1);
  12732. lanes && root.shellSuspendCounter++;
  12733. lastContextDependency = currentlyRenderingFiber$1 = null;
  12734. executionContext = prevExecutionContext;
  12735. ReactSharedInternals.H = prevDispatcher;
  12736. ReactSharedInternals.A = prevAsyncDispatcher;
  12737. null === workInProgress &&
  12738. ((workInProgressRoot = null),
  12739. (workInProgressRootRenderLanes = 0),
  12740. finishQueueingConcurrentUpdates());
  12741. return memoizedUpdaters;
  12742. }
  12743. function workLoopSync() {
  12744. for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
  12745. }
  12746. function renderRootConcurrent(root, lanes) {
  12747. var prevExecutionContext = executionContext;
  12748. executionContext |= 2;
  12749. var prevDispatcher = pushDispatcher(),
  12750. prevAsyncDispatcher = pushAsyncDispatcher();
  12751. if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
  12752. if (isDevToolsPresent) {
  12753. var memoizedUpdaters = root.memoizedUpdaters;
  12754. 0 < memoizedUpdaters.size &&
  12755. (restorePendingUpdaters(root, workInProgressRootRenderLanes),
  12756. memoizedUpdaters.clear());
  12757. movePendingFibersToMemoized(root, lanes);
  12758. }
  12759. workInProgressTransitions = null;
  12760. workInProgressRootRenderTargetTime = now$1() + 500;
  12761. prepareFreshStack(root, lanes);
  12762. } else
  12763. workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);
  12764. a: do
  12765. try {
  12766. if (0 !== workInProgressSuspendedReason && null !== workInProgress)
  12767. b: switch (
  12768. ((lanes = workInProgress),
  12769. (memoizedUpdaters = workInProgressThrownValue),
  12770. workInProgressSuspendedReason)
  12771. ) {
  12772. case 1:
  12773. workInProgressSuspendedReason = 0;
  12774. workInProgressThrownValue = null;
  12775. throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 1);
  12776. break;
  12777. case 2:
  12778. case 9:
  12779. if (isThenableResolved(memoizedUpdaters)) {
  12780. workInProgressSuspendedReason = 0;
  12781. workInProgressThrownValue = null;
  12782. replaySuspendedUnitOfWork(lanes);
  12783. break;
  12784. }
  12785. lanes = function () {
  12786. (2 !== workInProgressSuspendedReason &&
  12787. 9 !== workInProgressSuspendedReason) ||
  12788. workInProgressRoot !== root ||
  12789. (workInProgressSuspendedReason = 7);
  12790. ensureRootIsScheduled(root);
  12791. };
  12792. memoizedUpdaters.then(lanes, lanes);
  12793. break a;
  12794. case 3:
  12795. workInProgressSuspendedReason = 7;
  12796. break a;
  12797. case 4:
  12798. workInProgressSuspendedReason = 5;
  12799. break a;
  12800. case 7:
  12801. isThenableResolved(memoizedUpdaters)
  12802. ? ((workInProgressSuspendedReason = 0),
  12803. (workInProgressThrownValue = null),
  12804. replaySuspendedUnitOfWork(lanes))
  12805. : ((workInProgressSuspendedReason = 0),
  12806. (workInProgressThrownValue = null),
  12807. throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 7));
  12808. break;
  12809. case 5:
  12810. var resource = null;
  12811. switch (workInProgress.tag) {
  12812. case 26:
  12813. resource = workInProgress.memoizedState;
  12814. case 5:
  12815. case 27:
  12816. var hostFiber = workInProgress;
  12817. if (
  12818. resource
  12819. ? preloadResource(resource)
  12820. : hostFiber.stateNode.complete
  12821. ) {
  12822. workInProgressSuspendedReason = 0;
  12823. workInProgressThrownValue = null;
  12824. var sibling = hostFiber.sibling;
  12825. if (null !== sibling) workInProgress = sibling;
  12826. else {
  12827. var returnFiber = hostFiber.return;
  12828. null !== returnFiber
  12829. ? ((workInProgress = returnFiber),
  12830. completeUnitOfWork(returnFiber))
  12831. : (workInProgress = null);
  12832. }
  12833. break b;
  12834. }
  12835. }
  12836. workInProgressSuspendedReason = 0;
  12837. workInProgressThrownValue = null;
  12838. throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 5);
  12839. break;
  12840. case 6:
  12841. workInProgressSuspendedReason = 0;
  12842. workInProgressThrownValue = null;
  12843. throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters, 6);
  12844. break;
  12845. case 8:
  12846. resetWorkInProgressStack();
  12847. workInProgressRootExitStatus = 6;
  12848. break a;
  12849. default:
  12850. throw Error(formatProdErrorMessage(462));
  12851. }
  12852. workLoopConcurrentByScheduler();
  12853. break;
  12854. } catch (thrownValue$210) {
  12855. handleThrow(root, thrownValue$210);
  12856. }
  12857. while (1);
  12858. lastContextDependency = currentlyRenderingFiber$1 = null;
  12859. ReactSharedInternals.H = prevDispatcher;
  12860. ReactSharedInternals.A = prevAsyncDispatcher;
  12861. executionContext = prevExecutionContext;
  12862. if (null !== workInProgress) return 0;
  12863. workInProgressRoot = null;
  12864. workInProgressRootRenderLanes = 0;
  12865. finishQueueingConcurrentUpdates();
  12866. return workInProgressRootExitStatus;
  12867. }
  12868. function workLoopConcurrentByScheduler() {
  12869. for (; null !== workInProgress && !shouldYield(); )
  12870. performUnitOfWork(workInProgress);
  12871. }
  12872. function performUnitOfWork(unitOfWork) {
  12873. var current = unitOfWork.alternate;
  12874. 0 !== (unitOfWork.mode & 2)
  12875. ? (startProfilerTimer(unitOfWork),
  12876. (current = beginWork(current, unitOfWork, entangledRenderLanes)),
  12877. stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
  12878. : (current = beginWork(current, unitOfWork, entangledRenderLanes));
  12879. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  12880. null === current
  12881. ? completeUnitOfWork(unitOfWork)
  12882. : (workInProgress = current);
  12883. }
  12884. function replaySuspendedUnitOfWork(unitOfWork) {
  12885. var next = unitOfWork;
  12886. var current = next.alternate,
  12887. isProfilingMode = 0 !== (next.mode & 2);
  12888. isProfilingMode && startProfilerTimer(next);
  12889. switch (next.tag) {
  12890. case 15:
  12891. case 0:
  12892. current = replayFunctionComponent(
  12893. current,
  12894. next,
  12895. next.pendingProps,
  12896. next.type,
  12897. void 0,
  12898. workInProgressRootRenderLanes
  12899. );
  12900. break;
  12901. case 11:
  12902. current = replayFunctionComponent(
  12903. current,
  12904. next,
  12905. next.pendingProps,
  12906. next.type.render,
  12907. next.ref,
  12908. workInProgressRootRenderLanes
  12909. );
  12910. break;
  12911. case 5:
  12912. resetHooksOnUnwind(next);
  12913. default:
  12914. unwindInterruptedWork(current, next),
  12915. (next = workInProgress =
  12916. resetWorkInProgress(next, entangledRenderLanes)),
  12917. (current = beginWork(current, next, entangledRenderLanes));
  12918. }
  12919. isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(next);
  12920. next = current;
  12921. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  12922. null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
  12923. }
  12924. function throwAndUnwindWorkLoop(
  12925. root,
  12926. unitOfWork,
  12927. thrownValue,
  12928. suspendedReason
  12929. ) {
  12930. lastContextDependency = currentlyRenderingFiber$1 = null;
  12931. resetHooksOnUnwind(unitOfWork);
  12932. thenableState$1 = null;
  12933. thenableIndexCounter$1 = 0;
  12934. var returnFiber = unitOfWork.return;
  12935. try {
  12936. if (
  12937. throwException(
  12938. root,
  12939. returnFiber,
  12940. unitOfWork,
  12941. thrownValue,
  12942. workInProgressRootRenderLanes
  12943. )
  12944. ) {
  12945. workInProgressRootExitStatus = 1;
  12946. logUncaughtError(
  12947. root,
  12948. createCapturedValueAtFiber(thrownValue, root.current)
  12949. );
  12950. workInProgress = null;
  12951. return;
  12952. }
  12953. } catch (error) {
  12954. if (null !== returnFiber) throw ((workInProgress = returnFiber), error);
  12955. workInProgressRootExitStatus = 1;
  12956. logUncaughtError(
  12957. root,
  12958. createCapturedValueAtFiber(thrownValue, root.current)
  12959. );
  12960. workInProgress = null;
  12961. return;
  12962. }
  12963. if (unitOfWork.flags & 32768) {
  12964. if (isHydrating || 1 === suspendedReason) root = !0;
  12965. else if (
  12966. workInProgressRootIsPrerendering ||
  12967. 0 !== (workInProgressRootRenderLanes & 536870912)
  12968. )
  12969. root = !1;
  12970. else if (
  12971. ((workInProgressRootDidSkipSuspendedSiblings = root = !0),
  12972. 2 === suspendedReason ||
  12973. 9 === suspendedReason ||
  12974. 3 === suspendedReason ||
  12975. 6 === suspendedReason)
  12976. )
  12977. (suspendedReason = suspenseHandlerStackCursor.current),
  12978. null !== suspendedReason &&
  12979. 13 === suspendedReason.tag &&
  12980. (suspendedReason.flags |= 16384);
  12981. unwindUnitOfWork(unitOfWork, root);
  12982. } else completeUnitOfWork(unitOfWork);
  12983. }
  12984. function completeUnitOfWork(unitOfWork) {
  12985. var completedWork = unitOfWork;
  12986. do {
  12987. if (0 !== (completedWork.flags & 32768)) {
  12988. unwindUnitOfWork(
  12989. completedWork,
  12990. workInProgressRootDidSkipSuspendedSiblings
  12991. );
  12992. return;
  12993. }
  12994. var current = completedWork.alternate;
  12995. unitOfWork = completedWork.return;
  12996. startProfilerTimer(completedWork);
  12997. current = completeWork(current, completedWork, entangledRenderLanes);
  12998. 0 !== (completedWork.mode & 2) &&
  12999. stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);
  13000. if (null !== current) {
  13001. workInProgress = current;
  13002. return;
  13003. }
  13004. completedWork = completedWork.sibling;
  13005. if (null !== completedWork) {
  13006. workInProgress = completedWork;
  13007. return;
  13008. }
  13009. workInProgress = completedWork = unitOfWork;
  13010. } while (null !== completedWork);
  13011. 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
  13012. }
  13013. function unwindUnitOfWork(unitOfWork, skipSiblings) {
  13014. do {
  13015. var next = unwindWork(unitOfWork.alternate, unitOfWork);
  13016. if (null !== next) {
  13017. next.flags &= 32767;
  13018. workInProgress = next;
  13019. return;
  13020. }
  13021. if (0 !== (unitOfWork.mode & 2)) {
  13022. stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
  13023. next = unitOfWork.actualDuration;
  13024. for (var child = unitOfWork.child; null !== child; )
  13025. (next += child.actualDuration), (child = child.sibling);
  13026. unitOfWork.actualDuration = next;
  13027. }
  13028. next = unitOfWork.return;
  13029. null !== next &&
  13030. ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null));
  13031. if (
  13032. !skipSiblings &&
  13033. ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)
  13034. ) {
  13035. workInProgress = unitOfWork;
  13036. return;
  13037. }
  13038. workInProgress = unitOfWork = next;
  13039. } while (null !== unitOfWork);
  13040. workInProgressRootExitStatus = 6;
  13041. workInProgress = null;
  13042. }
  13043. function commitRoot(
  13044. root,
  13045. finishedWork,
  13046. lanes,
  13047. recoverableErrors,
  13048. transitions,
  13049. didIncludeRenderPhaseUpdate,
  13050. spawnedLane,
  13051. updatedLanes,
  13052. suspendedRetryLanes,
  13053. exitStatus,
  13054. suspendedState,
  13055. suspendedCommitReason,
  13056. completedRenderStartTime,
  13057. completedRenderEndTime
  13058. ) {
  13059. root.cancelPendingCommit = null;
  13060. do flushPendingEffects();
  13061. while (0 !== pendingEffectsStatus);
  13062. if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
  13063. setCurrentTrackFromLanes(lanes);
  13064. 2 === exitStatus
  13065. ? logErroredRenderPhase(completedRenderStartTime, completedRenderEndTime)
  13066. : null !== recoverableErrors
  13067. ? !supportsUserTiming ||
  13068. completedRenderEndTime <= completedRenderStartTime ||
  13069. console.timeStamp(
  13070. "Recovered",
  13071. completedRenderStartTime,
  13072. completedRenderEndTime,
  13073. currentTrack,
  13074. "Scheduler \u269b",
  13075. "error"
  13076. )
  13077. : !supportsUserTiming ||
  13078. completedRenderEndTime <= completedRenderStartTime ||
  13079. console.timeStamp(
  13080. (lanes & 536870912) === lanes
  13081. ? "Prepared"
  13082. : (lanes & 201326741) === lanes
  13083. ? "Hydrated"
  13084. : "Render",
  13085. completedRenderStartTime,
  13086. completedRenderEndTime,
  13087. currentTrack,
  13088. "Scheduler \u269b",
  13089. (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"
  13090. );
  13091. if (null !== finishedWork) {
  13092. if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
  13093. didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
  13094. didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
  13095. markRootFinished(
  13096. root,
  13097. lanes,
  13098. didIncludeRenderPhaseUpdate,
  13099. spawnedLane,
  13100. updatedLanes,
  13101. suspendedRetryLanes
  13102. );
  13103. root === workInProgressRoot &&
  13104. ((workInProgress = workInProgressRoot = null),
  13105. (workInProgressRootRenderLanes = 0));
  13106. pendingFinishedWork = finishedWork;
  13107. pendingEffectsRoot = root;
  13108. pendingEffectsLanes = lanes;
  13109. pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
  13110. pendingPassiveTransitions = transitions;
  13111. pendingRecoverableErrors = recoverableErrors;
  13112. pendingEffectsRenderEndTime = completedRenderEndTime;
  13113. pendingSuspendedCommitReason = suspendedCommitReason;
  13114. pendingDelayedCommitReason = 0;
  13115. pendingSuspendedViewTransitionReason = null;
  13116. 0 !== finishedWork.actualDuration ||
  13117. 0 !== (finishedWork.subtreeFlags & 10256) ||
  13118. 0 !== (finishedWork.flags & 10256)
  13119. ? ((root.callbackNode = null),
  13120. (root.callbackPriority = 0),
  13121. scheduleCallback$1(NormalPriority$1, function () {
  13122. schedulerEvent = window.event;
  13123. 0 === pendingDelayedCommitReason && (pendingDelayedCommitReason = 2);
  13124. flushPassiveEffects();
  13125. return null;
  13126. }))
  13127. : ((root.callbackNode = null), (root.callbackPriority = 0));
  13128. commitErrors = null;
  13129. commitStartTime = now();
  13130. null !== suspendedCommitReason &&
  13131. (!supportsUserTiming ||
  13132. commitStartTime <= completedRenderEndTime ||
  13133. console.timeStamp(
  13134. suspendedCommitReason,
  13135. completedRenderEndTime,
  13136. commitStartTime,
  13137. currentTrack,
  13138. "Scheduler \u269b",
  13139. "secondary-light"
  13140. ));
  13141. recoverableErrors = 0 !== (finishedWork.flags & 13878);
  13142. if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
  13143. recoverableErrors = ReactSharedInternals.T;
  13144. ReactSharedInternals.T = null;
  13145. transitions = ReactDOMSharedInternals.p;
  13146. ReactDOMSharedInternals.p = 2;
  13147. spawnedLane = executionContext;
  13148. executionContext |= 4;
  13149. try {
  13150. commitBeforeMutationEffects(root, finishedWork, lanes);
  13151. } finally {
  13152. (executionContext = spawnedLane),
  13153. (ReactDOMSharedInternals.p = transitions),
  13154. (ReactSharedInternals.T = recoverableErrors);
  13155. }
  13156. }
  13157. pendingEffectsStatus = 1;
  13158. flushMutationEffects();
  13159. flushLayoutEffects();
  13160. flushSpawnedWork();
  13161. }
  13162. }
  13163. function flushMutationEffects() {
  13164. if (1 === pendingEffectsStatus) {
  13165. pendingEffectsStatus = 0;
  13166. var root = pendingEffectsRoot,
  13167. finishedWork = pendingFinishedWork,
  13168. lanes = pendingEffectsLanes,
  13169. rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
  13170. if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
  13171. rootMutationHasEffect = ReactSharedInternals.T;
  13172. ReactSharedInternals.T = null;
  13173. var previousPriority = ReactDOMSharedInternals.p;
  13174. ReactDOMSharedInternals.p = 2;
  13175. var prevExecutionContext = executionContext;
  13176. executionContext |= 4;
  13177. try {
  13178. inProgressLanes = lanes;
  13179. inProgressRoot = root;
  13180. resetComponentEffectTimers();
  13181. commitMutationEffectsOnFiber(finishedWork, root);
  13182. inProgressRoot = inProgressLanes = null;
  13183. lanes = selectionInformation;
  13184. var curFocusedElem = getActiveElementDeep(root.containerInfo),
  13185. priorFocusedElem = lanes.focusedElem,
  13186. priorSelectionRange = lanes.selectionRange;
  13187. if (
  13188. curFocusedElem !== priorFocusedElem &&
  13189. priorFocusedElem &&
  13190. priorFocusedElem.ownerDocument &&
  13191. containsNode(
  13192. priorFocusedElem.ownerDocument.documentElement,
  13193. priorFocusedElem
  13194. )
  13195. ) {
  13196. if (
  13197. null !== priorSelectionRange &&
  13198. hasSelectionCapabilities(priorFocusedElem)
  13199. ) {
  13200. var start = priorSelectionRange.start,
  13201. end = priorSelectionRange.end;
  13202. void 0 === end && (end = start);
  13203. if ("selectionStart" in priorFocusedElem)
  13204. (priorFocusedElem.selectionStart = start),
  13205. (priorFocusedElem.selectionEnd = Math.min(
  13206. end,
  13207. priorFocusedElem.value.length
  13208. ));
  13209. else {
  13210. var doc = priorFocusedElem.ownerDocument || document,
  13211. win = (doc && doc.defaultView) || window;
  13212. if (win.getSelection) {
  13213. var selection = win.getSelection(),
  13214. length = priorFocusedElem.textContent.length,
  13215. start$jscomp$0 = Math.min(priorSelectionRange.start, length),
  13216. end$jscomp$0 =
  13217. void 0 === priorSelectionRange.end
  13218. ? start$jscomp$0
  13219. : Math.min(priorSelectionRange.end, length);
  13220. !selection.extend &&
  13221. start$jscomp$0 > end$jscomp$0 &&
  13222. ((curFocusedElem = end$jscomp$0),
  13223. (end$jscomp$0 = start$jscomp$0),
  13224. (start$jscomp$0 = curFocusedElem));
  13225. var startMarker = getNodeForCharacterOffset(
  13226. priorFocusedElem,
  13227. start$jscomp$0
  13228. ),
  13229. endMarker = getNodeForCharacterOffset(
  13230. priorFocusedElem,
  13231. end$jscomp$0
  13232. );
  13233. if (
  13234. startMarker &&
  13235. endMarker &&
  13236. (1 !== selection.rangeCount ||
  13237. selection.anchorNode !== startMarker.node ||
  13238. selection.anchorOffset !== startMarker.offset ||
  13239. selection.focusNode !== endMarker.node ||
  13240. selection.focusOffset !== endMarker.offset)
  13241. ) {
  13242. var range = doc.createRange();
  13243. range.setStart(startMarker.node, startMarker.offset);
  13244. selection.removeAllRanges();
  13245. start$jscomp$0 > end$jscomp$0
  13246. ? (selection.addRange(range),
  13247. selection.extend(endMarker.node, endMarker.offset))
  13248. : (range.setEnd(endMarker.node, endMarker.offset),
  13249. selection.addRange(range));
  13250. }
  13251. }
  13252. }
  13253. }
  13254. doc = [];
  13255. for (
  13256. selection = priorFocusedElem;
  13257. (selection = selection.parentNode);
  13258. )
  13259. 1 === selection.nodeType &&
  13260. doc.push({
  13261. element: selection,
  13262. left: selection.scrollLeft,
  13263. top: selection.scrollTop
  13264. });
  13265. "function" === typeof priorFocusedElem.focus &&
  13266. priorFocusedElem.focus();
  13267. for (
  13268. priorFocusedElem = 0;
  13269. priorFocusedElem < doc.length;
  13270. priorFocusedElem++
  13271. ) {
  13272. var info = doc[priorFocusedElem];
  13273. info.element.scrollLeft = info.left;
  13274. info.element.scrollTop = info.top;
  13275. }
  13276. }
  13277. _enabled = !!eventsEnabled;
  13278. selectionInformation = eventsEnabled = null;
  13279. } finally {
  13280. (executionContext = prevExecutionContext),
  13281. (ReactDOMSharedInternals.p = previousPriority),
  13282. (ReactSharedInternals.T = rootMutationHasEffect);
  13283. }
  13284. }
  13285. root.current = finishedWork;
  13286. pendingEffectsStatus = 2;
  13287. }
  13288. }
  13289. function flushLayoutEffects() {
  13290. if (2 === pendingEffectsStatus) {
  13291. pendingEffectsStatus = 0;
  13292. var suspendedViewTransitionReason = pendingSuspendedViewTransitionReason;
  13293. null !== suspendedViewTransitionReason &&
  13294. ((commitStartTime = now()),
  13295. !supportsUserTiming ||
  13296. commitStartTime <= commitEndTime ||
  13297. console.timeStamp(
  13298. suspendedViewTransitionReason,
  13299. commitEndTime,
  13300. commitStartTime,
  13301. currentTrack,
  13302. "Scheduler \u269b",
  13303. "secondary-light"
  13304. ));
  13305. suspendedViewTransitionReason = pendingEffectsRoot;
  13306. var finishedWork = pendingFinishedWork,
  13307. lanes = pendingEffectsLanes,
  13308. rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
  13309. if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
  13310. rootHasLayoutEffect = ReactSharedInternals.T;
  13311. ReactSharedInternals.T = null;
  13312. var previousPriority = ReactDOMSharedInternals.p;
  13313. ReactDOMSharedInternals.p = 2;
  13314. var prevExecutionContext = executionContext;
  13315. executionContext |= 4;
  13316. try {
  13317. (inProgressLanes = lanes),
  13318. (inProgressRoot = suspendedViewTransitionReason),
  13319. resetComponentEffectTimers(),
  13320. commitLayoutEffectOnFiber(
  13321. suspendedViewTransitionReason,
  13322. finishedWork.alternate,
  13323. finishedWork
  13324. ),
  13325. (inProgressRoot = inProgressLanes = null);
  13326. } finally {
  13327. (executionContext = prevExecutionContext),
  13328. (ReactDOMSharedInternals.p = previousPriority),
  13329. (ReactSharedInternals.T = rootHasLayoutEffect);
  13330. }
  13331. }
  13332. suspendedViewTransitionReason = pendingEffectsRenderEndTime;
  13333. finishedWork = pendingSuspendedCommitReason;
  13334. commitEndTime = now();
  13335. suspendedViewTransitionReason =
  13336. null === finishedWork ? suspendedViewTransitionReason : commitStartTime;
  13337. finishedWork = commitEndTime;
  13338. lanes = 1 === pendingDelayedCommitReason;
  13339. null !== commitErrors
  13340. ? logCommitErrored(suspendedViewTransitionReason, finishedWork)
  13341. : !supportsUserTiming ||
  13342. finishedWork <= suspendedViewTransitionReason ||
  13343. console.timeStamp(
  13344. lanes ? "Commit Interrupted View Transition" : "Commit",
  13345. suspendedViewTransitionReason,
  13346. finishedWork,
  13347. currentTrack,
  13348. "Scheduler \u269b",
  13349. lanes ? "error" : "secondary-dark"
  13350. );
  13351. pendingEffectsStatus = 3;
  13352. }
  13353. }
  13354. function flushSpawnedWork() {
  13355. if (4 === pendingEffectsStatus || 3 === pendingEffectsStatus) {
  13356. if (4 === pendingEffectsStatus) {
  13357. var startViewTransitionStartTime = commitEndTime;
  13358. commitEndTime = now();
  13359. var abortedViewTransition = 1 === pendingDelayedCommitReason;
  13360. !supportsUserTiming ||
  13361. commitEndTime <= startViewTransitionStartTime ||
  13362. console.timeStamp(
  13363. abortedViewTransition
  13364. ? "Interrupted View Transition"
  13365. : "Starting Animation",
  13366. startViewTransitionStartTime,
  13367. commitEndTime,
  13368. currentTrack,
  13369. "Scheduler \u269b",
  13370. abortedViewTransition ? " error" : "secondary-light"
  13371. );
  13372. 1 !== pendingDelayedCommitReason && (pendingDelayedCommitReason = 3);
  13373. }
  13374. pendingEffectsStatus = 0;
  13375. requestPaint();
  13376. startViewTransitionStartTime = pendingEffectsRoot;
  13377. var finishedWork = pendingFinishedWork;
  13378. abortedViewTransition = pendingEffectsLanes;
  13379. var recoverableErrors = pendingRecoverableErrors,
  13380. rootDidHavePassiveEffects =
  13381. 0 !== finishedWork.actualDuration ||
  13382. 0 !== (finishedWork.subtreeFlags & 10256) ||
  13383. 0 !== (finishedWork.flags & 10256);
  13384. rootDidHavePassiveEffects
  13385. ? (pendingEffectsStatus = 5)
  13386. : ((pendingEffectsStatus = 0),
  13387. (pendingFinishedWork = pendingEffectsRoot = null),
  13388. releaseRootPooledCache(
  13389. startViewTransitionStartTime,
  13390. startViewTransitionStartTime.pendingLanes
  13391. ));
  13392. var remainingLanes = startViewTransitionStartTime.pendingLanes;
  13393. 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
  13394. remainingLanes = lanesToEventPriority(abortedViewTransition);
  13395. finishedWork = finishedWork.stateNode;
  13396. if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
  13397. try {
  13398. var didError = 128 === (finishedWork.current.flags & 128);
  13399. switch (remainingLanes) {
  13400. case 2:
  13401. var schedulerPriority = ImmediatePriority;
  13402. break;
  13403. case 8:
  13404. schedulerPriority = UserBlockingPriority;
  13405. break;
  13406. case 32:
  13407. schedulerPriority = NormalPriority$1;
  13408. break;
  13409. case 268435456:
  13410. schedulerPriority = IdlePriority;
  13411. break;
  13412. default:
  13413. schedulerPriority = NormalPriority$1;
  13414. }
  13415. injectedHook.onCommitFiberRoot(
  13416. rendererID,
  13417. finishedWork,
  13418. schedulerPriority,
  13419. didError
  13420. );
  13421. } catch (err) {}
  13422. isDevToolsPresent && startViewTransitionStartTime.memoizedUpdaters.clear();
  13423. if (null !== recoverableErrors) {
  13424. didError = ReactSharedInternals.T;
  13425. schedulerPriority = ReactDOMSharedInternals.p;
  13426. ReactDOMSharedInternals.p = 2;
  13427. ReactSharedInternals.T = null;
  13428. try {
  13429. var onRecoverableError =
  13430. startViewTransitionStartTime.onRecoverableError;
  13431. for (
  13432. finishedWork = 0;
  13433. finishedWork < recoverableErrors.length;
  13434. finishedWork++
  13435. ) {
  13436. var recoverableError = recoverableErrors[finishedWork];
  13437. onRecoverableError(recoverableError.value, {
  13438. componentStack: recoverableError.stack
  13439. });
  13440. }
  13441. } finally {
  13442. (ReactSharedInternals.T = didError),
  13443. (ReactDOMSharedInternals.p = schedulerPriority);
  13444. }
  13445. }
  13446. 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
  13447. ensureRootIsScheduled(startViewTransitionStartTime);
  13448. remainingLanes = startViewTransitionStartTime.pendingLanes;
  13449. 0 !== (abortedViewTransition & 261930) && 0 !== (remainingLanes & 42)
  13450. ? ((nestedUpdateScheduled = !0),
  13451. startViewTransitionStartTime === rootWithNestedUpdates
  13452. ? nestedUpdateCount++
  13453. : ((nestedUpdateCount = 0),
  13454. (rootWithNestedUpdates = startViewTransitionStartTime)))
  13455. : (nestedUpdateCount = 0);
  13456. rootDidHavePassiveEffects ||
  13457. finalizeRender(abortedViewTransition, commitEndTime);
  13458. flushSyncWorkAcrossRoots_impl(0, !1);
  13459. }
  13460. }
  13461. function releaseRootPooledCache(root, remainingLanes) {
  13462. 0 === (root.pooledCacheLanes &= remainingLanes) &&
  13463. ((remainingLanes = root.pooledCache),
  13464. null != remainingLanes &&
  13465. ((root.pooledCache = null), releaseCache(remainingLanes)));
  13466. }
  13467. function flushPendingEffects() {
  13468. flushMutationEffects();
  13469. flushLayoutEffects();
  13470. flushSpawnedWork();
  13471. return flushPassiveEffects();
  13472. }
  13473. function flushPassiveEffects() {
  13474. if (5 !== pendingEffectsStatus) return !1;
  13475. var root = pendingEffectsRoot,
  13476. remainingLanes = pendingEffectsRemainingLanes;
  13477. pendingEffectsRemainingLanes = 0;
  13478. var renderPriority = lanesToEventPriority(pendingEffectsLanes),
  13479. prevTransition = ReactSharedInternals.T,
  13480. previousPriority = ReactDOMSharedInternals.p;
  13481. try {
  13482. ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
  13483. ReactSharedInternals.T = null;
  13484. var transitions = pendingPassiveTransitions;
  13485. pendingPassiveTransitions = null;
  13486. renderPriority = pendingEffectsRoot;
  13487. var lanes = pendingEffectsLanes;
  13488. pendingEffectsStatus = 0;
  13489. pendingFinishedWork = pendingEffectsRoot = null;
  13490. pendingEffectsLanes = 0;
  13491. if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));
  13492. setCurrentTrackFromLanes(lanes);
  13493. var passiveEffectStartTime = 0;
  13494. commitErrors = null;
  13495. passiveEffectStartTime = now$1();
  13496. 3 === pendingDelayedCommitReason
  13497. ? !supportsUserTiming ||
  13498. passiveEffectStartTime <= commitEndTime ||
  13499. console.timeStamp(
  13500. "Animating",
  13501. commitEndTime,
  13502. passiveEffectStartTime,
  13503. currentTrack,
  13504. "Scheduler \u269b",
  13505. "secondary-dark"
  13506. )
  13507. : !supportsUserTiming ||
  13508. passiveEffectStartTime <= commitEndTime ||
  13509. console.timeStamp(
  13510. 2 === pendingDelayedCommitReason ? "Waiting for Paint" : "Waiting",
  13511. commitEndTime,
  13512. passiveEffectStartTime,
  13513. currentTrack,
  13514. "Scheduler \u269b",
  13515. "secondary-light"
  13516. );
  13517. var prevExecutionContext = executionContext;
  13518. executionContext |= 4;
  13519. var finishedWork = renderPriority.current;
  13520. resetComponentEffectTimers();
  13521. commitPassiveUnmountOnFiber(finishedWork);
  13522. var finishedWork$jscomp$0 = renderPriority.current;
  13523. finishedWork = pendingEffectsRenderEndTime;
  13524. resetComponentEffectTimers();
  13525. commitPassiveMountOnFiber(
  13526. renderPriority,
  13527. finishedWork$jscomp$0,
  13528. lanes,
  13529. transitions,
  13530. finishedWork
  13531. );
  13532. executionContext = prevExecutionContext;
  13533. var passiveEffectsEndTime = now$1();
  13534. finishedWork$jscomp$0 = passiveEffectStartTime;
  13535. null !== commitErrors
  13536. ? logCommitErrored(finishedWork$jscomp$0, passiveEffectsEndTime)
  13537. : !supportsUserTiming ||
  13538. passiveEffectsEndTime <= finishedWork$jscomp$0 ||
  13539. console.timeStamp(
  13540. "Remaining Effects",
  13541. finishedWork$jscomp$0,
  13542. passiveEffectsEndTime,
  13543. currentTrack,
  13544. "Scheduler \u269b",
  13545. "secondary-dark"
  13546. );
  13547. finalizeRender(lanes, passiveEffectsEndTime);
  13548. flushSyncWorkAcrossRoots_impl(0, !1);
  13549. if (
  13550. injectedHook &&
  13551. "function" === typeof injectedHook.onPostCommitFiberRoot
  13552. )
  13553. try {
  13554. injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
  13555. } catch (err) {}
  13556. var stateNode = renderPriority.current.stateNode;
  13557. stateNode.effectDuration = 0;
  13558. stateNode.passiveEffectDuration = 0;
  13559. return !0;
  13560. } finally {
  13561. (ReactDOMSharedInternals.p = previousPriority),
  13562. (ReactSharedInternals.T = prevTransition),
  13563. releaseRootPooledCache(root, remainingLanes);
  13564. }
  13565. }
  13566. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  13567. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  13568. recordEffectError(sourceFiber);
  13569. sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
  13570. rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
  13571. null !== rootFiber &&
  13572. (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
  13573. }
  13574. function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
  13575. if (3 === sourceFiber.tag)
  13576. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  13577. else
  13578. for (; null !== nearestMountedAncestor; ) {
  13579. if (3 === nearestMountedAncestor.tag) {
  13580. captureCommitPhaseErrorOnRoot(
  13581. nearestMountedAncestor,
  13582. sourceFiber,
  13583. error
  13584. );
  13585. break;
  13586. } else if (1 === nearestMountedAncestor.tag) {
  13587. var instance = nearestMountedAncestor.stateNode;
  13588. if (
  13589. "function" ===
  13590. typeof nearestMountedAncestor.type.getDerivedStateFromError ||
  13591. ("function" === typeof instance.componentDidCatch &&
  13592. (null === legacyErrorBoundariesThatAlreadyFailed ||
  13593. !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
  13594. ) {
  13595. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  13596. recordEffectError(sourceFiber);
  13597. error = createClassErrorUpdate(2);
  13598. instance = enqueueUpdate(nearestMountedAncestor, error, 2);
  13599. null !== instance &&
  13600. (initializeClassErrorUpdate(
  13601. error,
  13602. instance,
  13603. nearestMountedAncestor,
  13604. sourceFiber
  13605. ),
  13606. markRootUpdated$1(instance, 2),
  13607. ensureRootIsScheduled(instance));
  13608. break;
  13609. }
  13610. }
  13611. nearestMountedAncestor = nearestMountedAncestor.return;
  13612. }
  13613. }
  13614. function attachPingListener(root, wakeable, lanes) {
  13615. var pingCache = root.pingCache;
  13616. if (null === pingCache) {
  13617. pingCache = root.pingCache = new PossiblyWeakMap();
  13618. var threadIDs = new Set();
  13619. pingCache.set(wakeable, threadIDs);
  13620. } else
  13621. (threadIDs = pingCache.get(wakeable)),
  13622. void 0 === threadIDs &&
  13623. ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));
  13624. threadIDs.has(lanes) ||
  13625. ((workInProgressRootDidAttachPingListener = !0),
  13626. threadIDs.add(lanes),
  13627. (pingCache = pingSuspendedRoot.bind(null, root, wakeable, lanes)),
  13628. isDevToolsPresent && restorePendingUpdaters(root, lanes),
  13629. wakeable.then(pingCache, pingCache));
  13630. }
  13631. function pingSuspendedRoot(root, wakeable, pingedLanes) {
  13632. var pingCache = root.pingCache;
  13633. null !== pingCache && pingCache.delete(wakeable);
  13634. root.pingedLanes |= root.suspendedLanes & pingedLanes;
  13635. root.warmLanes &= ~pingedLanes;
  13636. 0 !== (pingedLanes & 127)
  13637. ? 0 > blockingUpdateTime &&
  13638. ((blockingClampTime = blockingUpdateTime = now()),
  13639. (blockingUpdateType = 2))
  13640. : 0 !== (pingedLanes & 4194048) &&
  13641. 0 > transitionUpdateTime &&
  13642. ((transitionClampTime = transitionUpdateTime = now()),
  13643. (transitionUpdateType = 2));
  13644. workInProgressRoot === root &&
  13645. (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&
  13646. (4 === workInProgressRootExitStatus ||
  13647. (3 === workInProgressRootExitStatus &&
  13648. (workInProgressRootRenderLanes & 62914560) ===
  13649. workInProgressRootRenderLanes &&
  13650. 300 > now$1() - globalMostRecentFallbackTime)
  13651. ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
  13652. : (workInProgressRootPingedLanes |= pingedLanes),
  13653. workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
  13654. (workInProgressSuspendedRetryLanes = 0));
  13655. ensureRootIsScheduled(root);
  13656. }
  13657. function retryTimedOutBoundary(boundaryFiber, retryLane) {
  13658. 0 === retryLane && (retryLane = claimNextRetryLane());
  13659. boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
  13660. null !== boundaryFiber &&
  13661. (markRootUpdated$1(boundaryFiber, retryLane),
  13662. ensureRootIsScheduled(boundaryFiber));
  13663. }
  13664. function retryDehydratedSuspenseBoundary(boundaryFiber) {
  13665. var suspenseState = boundaryFiber.memoizedState,
  13666. retryLane = 0;
  13667. null !== suspenseState && (retryLane = suspenseState.retryLane);
  13668. retryTimedOutBoundary(boundaryFiber, retryLane);
  13669. }
  13670. function resolveRetryWakeable(boundaryFiber, wakeable) {
  13671. var retryLane = 0;
  13672. switch (boundaryFiber.tag) {
  13673. case 31:
  13674. case 13:
  13675. var retryCache = boundaryFiber.stateNode;
  13676. var suspenseState = boundaryFiber.memoizedState;
  13677. null !== suspenseState && (retryLane = suspenseState.retryLane);
  13678. break;
  13679. case 19:
  13680. retryCache = boundaryFiber.stateNode;
  13681. break;
  13682. case 22:
  13683. retryCache = boundaryFiber.stateNode._retryCache;
  13684. break;
  13685. default:
  13686. throw Error(formatProdErrorMessage(314));
  13687. }
  13688. null !== retryCache && retryCache.delete(wakeable);
  13689. retryTimedOutBoundary(boundaryFiber, retryLane);
  13690. }
  13691. function restorePendingUpdaters(root, lanes) {
  13692. isDevToolsPresent &&
  13693. root.memoizedUpdaters.forEach(function (schedulingFiber) {
  13694. addFiberToLanesMap(root, schedulingFiber, lanes);
  13695. });
  13696. }
  13697. function scheduleCallback$1(priorityLevel, callback) {
  13698. return scheduleCallback$3(priorityLevel, callback);
  13699. }
  13700. var firstScheduledRoot = null,
  13701. lastScheduledRoot = null,
  13702. didScheduleMicrotask = !1,
  13703. mightHavePendingSyncWork = !1,
  13704. isFlushingWork = !1,
  13705. currentEventTransitionLane = 0;
  13706. function ensureRootIsScheduled(root) {
  13707. root !== lastScheduledRoot &&
  13708. null === root.next &&
  13709. (null === lastScheduledRoot
  13710. ? (firstScheduledRoot = lastScheduledRoot = root)
  13711. : (lastScheduledRoot = lastScheduledRoot.next = root));
  13712. mightHavePendingSyncWork = !0;
  13713. didScheduleMicrotask ||
  13714. ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
  13715. }
  13716. function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
  13717. if (!isFlushingWork && mightHavePendingSyncWork) {
  13718. isFlushingWork = !0;
  13719. do {
  13720. var didPerformSomeWork = !1;
  13721. for (var root$213 = firstScheduledRoot; null !== root$213; ) {
  13722. if (!onlyLegacy)
  13723. if (0 !== syncTransitionLanes) {
  13724. var pendingLanes = root$213.pendingLanes;
  13725. if (0 === pendingLanes) var JSCompiler_inline_result = 0;
  13726. else {
  13727. var suspendedLanes = root$213.suspendedLanes,
  13728. pingedLanes = root$213.pingedLanes;
  13729. JSCompiler_inline_result =
  13730. (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;
  13731. JSCompiler_inline_result &=
  13732. pendingLanes & ~(suspendedLanes & ~pingedLanes);
  13733. JSCompiler_inline_result =
  13734. JSCompiler_inline_result & 201326741
  13735. ? (JSCompiler_inline_result & 201326741) | 1
  13736. : JSCompiler_inline_result
  13737. ? JSCompiler_inline_result | 2
  13738. : 0;
  13739. }
  13740. 0 !== JSCompiler_inline_result &&
  13741. ((didPerformSomeWork = !0),
  13742. performSyncWorkOnRoot(root$213, JSCompiler_inline_result));
  13743. } else
  13744. (JSCompiler_inline_result = workInProgressRootRenderLanes),
  13745. (JSCompiler_inline_result = getNextLanes(
  13746. root$213,
  13747. root$213 === workInProgressRoot ? JSCompiler_inline_result : 0,
  13748. null !== root$213.cancelPendingCommit ||
  13749. -1 !== root$213.timeoutHandle
  13750. )),
  13751. 0 === (JSCompiler_inline_result & 3) ||
  13752. checkIfRootIsPrerendering(root$213, JSCompiler_inline_result) ||
  13753. ((didPerformSomeWork = !0),
  13754. performSyncWorkOnRoot(root$213, JSCompiler_inline_result));
  13755. root$213 = root$213.next;
  13756. }
  13757. } while (didPerformSomeWork);
  13758. isFlushingWork = !1;
  13759. }
  13760. }
  13761. function processRootScheduleInImmediateTask() {
  13762. schedulerEvent = window.event;
  13763. processRootScheduleInMicrotask();
  13764. }
  13765. function processRootScheduleInMicrotask() {
  13766. mightHavePendingSyncWork = didScheduleMicrotask = !1;
  13767. var syncTransitionLanes = 0;
  13768. 0 !== currentEventTransitionLane &&
  13769. shouldAttemptEagerTransition() &&
  13770. (syncTransitionLanes = currentEventTransitionLane);
  13771. for (
  13772. var currentTime = now$1(), prev = null, root = firstScheduledRoot;
  13773. null !== root;
  13774. ) {
  13775. var next = root.next,
  13776. nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);
  13777. if (0 === nextLanes)
  13778. (root.next = null),
  13779. null === prev ? (firstScheduledRoot = next) : (prev.next = next),
  13780. null === next && (lastScheduledRoot = prev);
  13781. else if (
  13782. ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
  13783. )
  13784. mightHavePendingSyncWork = !0;
  13785. root = next;
  13786. }
  13787. (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus) ||
  13788. flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1);
  13789. 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
  13790. }
  13791. function scheduleTaskForRootDuringMicrotask(root, currentTime) {
  13792. for (
  13793. var suspendedLanes = root.suspendedLanes,
  13794. pingedLanes = root.pingedLanes,
  13795. expirationTimes = root.expirationTimes,
  13796. lanes = root.pendingLanes & -62914561;
  13797. 0 < lanes;
  13798. ) {
  13799. var index$5 = 31 - clz32(lanes),
  13800. lane = 1 << index$5,
  13801. expirationTime = expirationTimes[index$5];
  13802. if (-1 === expirationTime) {
  13803. if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
  13804. expirationTimes[index$5] = computeExpirationTime(lane, currentTime);
  13805. } else expirationTime <= currentTime && (root.expiredLanes |= lane);
  13806. lanes &= ~lane;
  13807. }
  13808. currentTime = workInProgressRoot;
  13809. suspendedLanes = workInProgressRootRenderLanes;
  13810. suspendedLanes = getNextLanes(
  13811. root,
  13812. root === currentTime ? suspendedLanes : 0,
  13813. null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
  13814. );
  13815. pingedLanes = root.callbackNode;
  13816. if (
  13817. 0 === suspendedLanes ||
  13818. (root === currentTime &&
  13819. (2 === workInProgressSuspendedReason ||
  13820. 9 === workInProgressSuspendedReason)) ||
  13821. null !== root.cancelPendingCommit
  13822. )
  13823. return (
  13824. null !== pingedLanes &&
  13825. null !== pingedLanes &&
  13826. cancelCallback$1(pingedLanes),
  13827. (root.callbackNode = null),
  13828. (root.callbackPriority = 0)
  13829. );
  13830. if (
  13831. 0 === (suspendedLanes & 3) ||
  13832. checkIfRootIsPrerendering(root, suspendedLanes)
  13833. ) {
  13834. currentTime = suspendedLanes & -suspendedLanes;
  13835. if (currentTime === root.callbackPriority) return currentTime;
  13836. null !== pingedLanes && cancelCallback$1(pingedLanes);
  13837. switch (lanesToEventPriority(suspendedLanes)) {
  13838. case 2:
  13839. case 8:
  13840. suspendedLanes = UserBlockingPriority;
  13841. break;
  13842. case 32:
  13843. suspendedLanes = NormalPriority$1;
  13844. break;
  13845. case 268435456:
  13846. suspendedLanes = IdlePriority;
  13847. break;
  13848. default:
  13849. suspendedLanes = NormalPriority$1;
  13850. }
  13851. pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
  13852. suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
  13853. root.callbackPriority = currentTime;
  13854. root.callbackNode = suspendedLanes;
  13855. return currentTime;
  13856. }
  13857. null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);
  13858. root.callbackPriority = 2;
  13859. root.callbackNode = null;
  13860. return 2;
  13861. }
  13862. function performWorkOnRootViaSchedulerTask(root, didTimeout) {
  13863. nestedUpdateScheduled = currentUpdateIsNested = !1;
  13864. schedulerEvent = window.event;
  13865. if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)
  13866. return (root.callbackNode = null), (root.callbackPriority = 0), null;
  13867. var originalCallbackNode = root.callbackNode;
  13868. 0 === pendingDelayedCommitReason && (pendingDelayedCommitReason = 2);
  13869. if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)
  13870. return null;
  13871. var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
  13872. workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
  13873. root,
  13874. root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
  13875. null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
  13876. );
  13877. if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
  13878. performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
  13879. scheduleTaskForRootDuringMicrotask(root, now$1());
  13880. return null != root.callbackNode && root.callbackNode === originalCallbackNode
  13881. ? performWorkOnRootViaSchedulerTask.bind(null, root)
  13882. : null;
  13883. }
  13884. function performSyncWorkOnRoot(root, lanes) {
  13885. if (flushPendingEffects()) return null;
  13886. currentUpdateIsNested = nestedUpdateScheduled;
  13887. nestedUpdateScheduled = !1;
  13888. performWorkOnRoot(root, lanes, !0);
  13889. }
  13890. function scheduleImmediateRootScheduleTask() {
  13891. scheduleMicrotask(function () {
  13892. 0 !== (executionContext & 6)
  13893. ? scheduleCallback$3(
  13894. ImmediatePriority,
  13895. processRootScheduleInImmediateTask
  13896. )
  13897. : processRootScheduleInMicrotask();
  13898. });
  13899. }
  13900. function requestTransitionLane() {
  13901. if (0 === currentEventTransitionLane) {
  13902. var actionScopeLane = currentEntangledLane;
  13903. 0 === actionScopeLane &&
  13904. ((actionScopeLane = nextTransitionUpdateLane),
  13905. (nextTransitionUpdateLane <<= 1),
  13906. 0 === (nextTransitionUpdateLane & 261888) &&
  13907. (nextTransitionUpdateLane = 256));
  13908. currentEventTransitionLane = actionScopeLane;
  13909. }
  13910. return currentEventTransitionLane;
  13911. }
  13912. function coerceFormActionProp(actionProp) {
  13913. return null == actionProp ||
  13914. "symbol" === typeof actionProp ||
  13915. "boolean" === typeof actionProp
  13916. ? null
  13917. : "function" === typeof actionProp
  13918. ? actionProp
  13919. : sanitizeURL("" + actionProp);
  13920. }
  13921. function createFormDataWithSubmitter(form, submitter) {
  13922. var temp = submitter.ownerDocument.createElement("input");
  13923. temp.name = submitter.name;
  13924. temp.value = submitter.value;
  13925. form.id && temp.setAttribute("form", form.id);
  13926. submitter.parentNode.insertBefore(temp, submitter);
  13927. form = new FormData(form);
  13928. temp.parentNode.removeChild(temp);
  13929. return form;
  13930. }
  13931. function extractEvents$1(
  13932. dispatchQueue,
  13933. domEventName,
  13934. maybeTargetInst,
  13935. nativeEvent,
  13936. nativeEventTarget
  13937. ) {
  13938. if (
  13939. "submit" === domEventName &&
  13940. maybeTargetInst &&
  13941. maybeTargetInst.stateNode === nativeEventTarget
  13942. ) {
  13943. var action = coerceFormActionProp(
  13944. (nativeEventTarget[internalPropsKey] || null).action
  13945. ),
  13946. submitter = nativeEvent.submitter;
  13947. submitter &&
  13948. ((domEventName = (domEventName = submitter[internalPropsKey] || null)
  13949. ? coerceFormActionProp(domEventName.formAction)
  13950. : submitter.getAttribute("formAction")),
  13951. null !== domEventName && ((action = domEventName), (submitter = null)));
  13952. var event = new SyntheticEvent(
  13953. "action",
  13954. "action",
  13955. null,
  13956. nativeEvent,
  13957. nativeEventTarget
  13958. );
  13959. dispatchQueue.push({
  13960. event: event,
  13961. listeners: [
  13962. {
  13963. instance: null,
  13964. listener: function () {
  13965. if (nativeEvent.defaultPrevented) {
  13966. if (0 !== currentEventTransitionLane) {
  13967. var formData = submitter
  13968. ? createFormDataWithSubmitter(nativeEventTarget, submitter)
  13969. : new FormData(nativeEventTarget);
  13970. startHostTransition(
  13971. maybeTargetInst,
  13972. {
  13973. pending: !0,
  13974. data: formData,
  13975. method: nativeEventTarget.method,
  13976. action: action
  13977. },
  13978. null,
  13979. formData
  13980. );
  13981. }
  13982. } else
  13983. "function" === typeof action &&
  13984. (event.preventDefault(),
  13985. (formData = submitter
  13986. ? createFormDataWithSubmitter(nativeEventTarget, submitter)
  13987. : new FormData(nativeEventTarget)),
  13988. startHostTransition(
  13989. maybeTargetInst,
  13990. {
  13991. pending: !0,
  13992. data: formData,
  13993. method: nativeEventTarget.method,
  13994. action: action
  13995. },
  13996. action,
  13997. formData
  13998. ));
  13999. },
  14000. currentTarget: nativeEventTarget
  14001. }
  14002. ]
  14003. });
  14004. }
  14005. }
  14006. for (
  14007. var i$jscomp$inline_1875 = 0;
  14008. i$jscomp$inline_1875 < simpleEventPluginEvents.length;
  14009. i$jscomp$inline_1875++
  14010. ) {
  14011. var eventName$jscomp$inline_1876 =
  14012. simpleEventPluginEvents[i$jscomp$inline_1875],
  14013. domEventName$jscomp$inline_1877 =
  14014. eventName$jscomp$inline_1876.toLowerCase(),
  14015. capitalizedEvent$jscomp$inline_1878 =
  14016. eventName$jscomp$inline_1876[0].toUpperCase() +
  14017. eventName$jscomp$inline_1876.slice(1);
  14018. registerSimpleEvent(
  14019. domEventName$jscomp$inline_1877,
  14020. "on" + capitalizedEvent$jscomp$inline_1878
  14021. );
  14022. }
  14023. registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
  14024. registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
  14025. registerSimpleEvent(ANIMATION_START, "onAnimationStart");
  14026. registerSimpleEvent("dblclick", "onDoubleClick");
  14027. registerSimpleEvent("focusin", "onFocus");
  14028. registerSimpleEvent("focusout", "onBlur");
  14029. registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
  14030. registerSimpleEvent(TRANSITION_START, "onTransitionStart");
  14031. registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
  14032. registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
  14033. registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
  14034. registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
  14035. registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
  14036. registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
  14037. registerTwoPhaseEvent(
  14038. "onChange",
  14039. "change click focusin focusout input keydown keyup selectionchange".split(" ")
  14040. );
  14041. registerTwoPhaseEvent(
  14042. "onSelect",
  14043. "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
  14044. " "
  14045. )
  14046. );
  14047. registerTwoPhaseEvent("onBeforeInput", [
  14048. "compositionend",
  14049. "keypress",
  14050. "textInput",
  14051. "paste"
  14052. ]);
  14053. registerTwoPhaseEvent(
  14054. "onCompositionEnd",
  14055. "compositionend focusout keydown keypress keyup mousedown".split(" ")
  14056. );
  14057. registerTwoPhaseEvent(
  14058. "onCompositionStart",
  14059. "compositionstart focusout keydown keypress keyup mousedown".split(" ")
  14060. );
  14061. registerTwoPhaseEvent(
  14062. "onCompositionUpdate",
  14063. "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
  14064. );
  14065. var mediaEventTypes =
  14066. "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
  14067. " "
  14068. ),
  14069. nonDelegatedEvents = new Set(
  14070. "beforetoggle cancel close invalid load scroll scrollend toggle"
  14071. .split(" ")
  14072. .concat(mediaEventTypes)
  14073. );
  14074. function processDispatchQueue(dispatchQueue, eventSystemFlags) {
  14075. eventSystemFlags = 0 !== (eventSystemFlags & 4);
  14076. for (var i = 0; i < dispatchQueue.length; i++) {
  14077. var _dispatchQueue$i = dispatchQueue[i],
  14078. event = _dispatchQueue$i.event;
  14079. _dispatchQueue$i = _dispatchQueue$i.listeners;
  14080. a: {
  14081. var previousInstance = void 0;
  14082. if (eventSystemFlags)
  14083. for (
  14084. var i$jscomp$0 = _dispatchQueue$i.length - 1;
  14085. 0 <= i$jscomp$0;
  14086. i$jscomp$0--
  14087. ) {
  14088. var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],
  14089. instance = _dispatchListeners$i.instance,
  14090. currentTarget = _dispatchListeners$i.currentTarget;
  14091. _dispatchListeners$i = _dispatchListeners$i.listener;
  14092. if (instance !== previousInstance && event.isPropagationStopped())
  14093. break a;
  14094. previousInstance = _dispatchListeners$i;
  14095. event.currentTarget = currentTarget;
  14096. try {
  14097. previousInstance(event);
  14098. } catch (error) {
  14099. reportGlobalError(error);
  14100. }
  14101. event.currentTarget = null;
  14102. previousInstance = instance;
  14103. }
  14104. else
  14105. for (
  14106. i$jscomp$0 = 0;
  14107. i$jscomp$0 < _dispatchQueue$i.length;
  14108. i$jscomp$0++
  14109. ) {
  14110. _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
  14111. instance = _dispatchListeners$i.instance;
  14112. currentTarget = _dispatchListeners$i.currentTarget;
  14113. _dispatchListeners$i = _dispatchListeners$i.listener;
  14114. if (instance !== previousInstance && event.isPropagationStopped())
  14115. break a;
  14116. previousInstance = _dispatchListeners$i;
  14117. event.currentTarget = currentTarget;
  14118. try {
  14119. previousInstance(event);
  14120. } catch (error) {
  14121. reportGlobalError(error);
  14122. }
  14123. event.currentTarget = null;
  14124. previousInstance = instance;
  14125. }
  14126. }
  14127. }
  14128. }
  14129. function listenToNonDelegatedEvent(domEventName, targetElement) {
  14130. var JSCompiler_inline_result = targetElement[internalEventHandlersKey];
  14131. void 0 === JSCompiler_inline_result &&
  14132. (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =
  14133. new Set());
  14134. var listenerSetKey = domEventName + "__bubble";
  14135. JSCompiler_inline_result.has(listenerSetKey) ||
  14136. (addTrappedEventListener(targetElement, domEventName, 2, !1),
  14137. JSCompiler_inline_result.add(listenerSetKey));
  14138. }
  14139. function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
  14140. var eventSystemFlags = 0;
  14141. isCapturePhaseListener && (eventSystemFlags |= 4);
  14142. addTrappedEventListener(
  14143. target,
  14144. domEventName,
  14145. eventSystemFlags,
  14146. isCapturePhaseListener
  14147. );
  14148. }
  14149. var listeningMarker = "_reactListening" + Math.random().toString(36).slice(2);
  14150. function listenToAllSupportedEvents(rootContainerElement) {
  14151. if (!rootContainerElement[listeningMarker]) {
  14152. rootContainerElement[listeningMarker] = !0;
  14153. allNativeEvents.forEach(function (domEventName) {
  14154. "selectionchange" !== domEventName &&
  14155. (nonDelegatedEvents.has(domEventName) ||
  14156. listenToNativeEvent(domEventName, !1, rootContainerElement),
  14157. listenToNativeEvent(domEventName, !0, rootContainerElement));
  14158. });
  14159. var ownerDocument =
  14160. 9 === rootContainerElement.nodeType
  14161. ? rootContainerElement
  14162. : rootContainerElement.ownerDocument;
  14163. null === ownerDocument ||
  14164. ownerDocument[listeningMarker] ||
  14165. ((ownerDocument[listeningMarker] = !0),
  14166. listenToNativeEvent("selectionchange", !1, ownerDocument));
  14167. }
  14168. }
  14169. function addTrappedEventListener(
  14170. targetContainer,
  14171. domEventName,
  14172. eventSystemFlags,
  14173. isCapturePhaseListener
  14174. ) {
  14175. switch (getEventPriority(domEventName)) {
  14176. case 2:
  14177. var listenerWrapper = dispatchDiscreteEvent;
  14178. break;
  14179. case 8:
  14180. listenerWrapper = dispatchContinuousEvent;
  14181. break;
  14182. default:
  14183. listenerWrapper = dispatchEvent;
  14184. }
  14185. eventSystemFlags = listenerWrapper.bind(
  14186. null,
  14187. domEventName,
  14188. eventSystemFlags,
  14189. targetContainer
  14190. );
  14191. listenerWrapper = void 0;
  14192. !passiveBrowserEventsSupported ||
  14193. ("touchstart" !== domEventName &&
  14194. "touchmove" !== domEventName &&
  14195. "wheel" !== domEventName) ||
  14196. (listenerWrapper = !0);
  14197. isCapturePhaseListener
  14198. ? void 0 !== listenerWrapper
  14199. ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  14200. capture: !0,
  14201. passive: listenerWrapper
  14202. })
  14203. : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)
  14204. : void 0 !== listenerWrapper
  14205. ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  14206. passive: listenerWrapper
  14207. })
  14208. : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);
  14209. }
  14210. function dispatchEventForPluginEventSystem(
  14211. domEventName,
  14212. eventSystemFlags,
  14213. nativeEvent,
  14214. targetInst$jscomp$0,
  14215. targetContainer
  14216. ) {
  14217. var ancestorInst = targetInst$jscomp$0;
  14218. if (
  14219. 0 === (eventSystemFlags & 1) &&
  14220. 0 === (eventSystemFlags & 2) &&
  14221. null !== targetInst$jscomp$0
  14222. )
  14223. a: for (;;) {
  14224. if (null === targetInst$jscomp$0) return;
  14225. var nodeTag = targetInst$jscomp$0.tag;
  14226. if (3 === nodeTag || 4 === nodeTag) {
  14227. var container = targetInst$jscomp$0.stateNode.containerInfo;
  14228. if (container === targetContainer) break;
  14229. if (4 === nodeTag)
  14230. for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
  14231. var grandTag = nodeTag.tag;
  14232. if (
  14233. (3 === grandTag || 4 === grandTag) &&
  14234. nodeTag.stateNode.containerInfo === targetContainer
  14235. )
  14236. return;
  14237. nodeTag = nodeTag.return;
  14238. }
  14239. for (; null !== container; ) {
  14240. nodeTag = getClosestInstanceFromNode(container);
  14241. if (null === nodeTag) return;
  14242. grandTag = nodeTag.tag;
  14243. if (
  14244. 5 === grandTag ||
  14245. 6 === grandTag ||
  14246. 26 === grandTag ||
  14247. 27 === grandTag
  14248. ) {
  14249. targetInst$jscomp$0 = ancestorInst = nodeTag;
  14250. continue a;
  14251. }
  14252. container = container.parentNode;
  14253. }
  14254. }
  14255. targetInst$jscomp$0 = targetInst$jscomp$0.return;
  14256. }
  14257. batchedUpdates$2(function () {
  14258. var targetInst = ancestorInst,
  14259. nativeEventTarget = getEventTarget(nativeEvent),
  14260. dispatchQueue = [];
  14261. a: {
  14262. var reactName = topLevelEventsToReactNames.get(domEventName);
  14263. if (void 0 !== reactName) {
  14264. var SyntheticEventCtor = SyntheticEvent,
  14265. reactEventType = domEventName;
  14266. switch (domEventName) {
  14267. case "keypress":
  14268. if (0 === getEventCharCode(nativeEvent)) break a;
  14269. case "keydown":
  14270. case "keyup":
  14271. SyntheticEventCtor = SyntheticKeyboardEvent;
  14272. break;
  14273. case "focusin":
  14274. reactEventType = "focus";
  14275. SyntheticEventCtor = SyntheticFocusEvent;
  14276. break;
  14277. case "focusout":
  14278. reactEventType = "blur";
  14279. SyntheticEventCtor = SyntheticFocusEvent;
  14280. break;
  14281. case "beforeblur":
  14282. case "afterblur":
  14283. SyntheticEventCtor = SyntheticFocusEvent;
  14284. break;
  14285. case "click":
  14286. if (2 === nativeEvent.button) break a;
  14287. case "auxclick":
  14288. case "dblclick":
  14289. case "mousedown":
  14290. case "mousemove":
  14291. case "mouseup":
  14292. case "mouseout":
  14293. case "mouseover":
  14294. case "contextmenu":
  14295. SyntheticEventCtor = SyntheticMouseEvent;
  14296. break;
  14297. case "drag":
  14298. case "dragend":
  14299. case "dragenter":
  14300. case "dragexit":
  14301. case "dragleave":
  14302. case "dragover":
  14303. case "dragstart":
  14304. case "drop":
  14305. SyntheticEventCtor = SyntheticDragEvent;
  14306. break;
  14307. case "touchcancel":
  14308. case "touchend":
  14309. case "touchmove":
  14310. case "touchstart":
  14311. SyntheticEventCtor = SyntheticTouchEvent;
  14312. break;
  14313. case ANIMATION_END:
  14314. case ANIMATION_ITERATION:
  14315. case ANIMATION_START:
  14316. SyntheticEventCtor = SyntheticAnimationEvent;
  14317. break;
  14318. case TRANSITION_END:
  14319. SyntheticEventCtor = SyntheticTransitionEvent;
  14320. break;
  14321. case "scroll":
  14322. case "scrollend":
  14323. SyntheticEventCtor = SyntheticUIEvent;
  14324. break;
  14325. case "wheel":
  14326. SyntheticEventCtor = SyntheticWheelEvent;
  14327. break;
  14328. case "copy":
  14329. case "cut":
  14330. case "paste":
  14331. SyntheticEventCtor = SyntheticClipboardEvent;
  14332. break;
  14333. case "gotpointercapture":
  14334. case "lostpointercapture":
  14335. case "pointercancel":
  14336. case "pointerdown":
  14337. case "pointermove":
  14338. case "pointerout":
  14339. case "pointerover":
  14340. case "pointerup":
  14341. SyntheticEventCtor = SyntheticPointerEvent;
  14342. break;
  14343. case "toggle":
  14344. case "beforetoggle":
  14345. SyntheticEventCtor = SyntheticToggleEvent;
  14346. }
  14347. var inCapturePhase = 0 !== (eventSystemFlags & 4),
  14348. accumulateTargetOnly =
  14349. !inCapturePhase &&
  14350. ("scroll" === domEventName || "scrollend" === domEventName),
  14351. reactEventName = inCapturePhase
  14352. ? null !== reactName
  14353. ? reactName + "Capture"
  14354. : null
  14355. : reactName;
  14356. inCapturePhase = [];
  14357. for (
  14358. var instance = targetInst, lastHostComponent;
  14359. null !== instance;
  14360. ) {
  14361. var _instance = instance;
  14362. lastHostComponent = _instance.stateNode;
  14363. _instance = _instance.tag;
  14364. (5 !== _instance && 26 !== _instance && 27 !== _instance) ||
  14365. null === lastHostComponent ||
  14366. null === reactEventName ||
  14367. ((_instance = getListener(instance, reactEventName)),
  14368. null != _instance &&
  14369. inCapturePhase.push(
  14370. createDispatchListener(instance, _instance, lastHostComponent)
  14371. ));
  14372. if (accumulateTargetOnly) break;
  14373. instance = instance.return;
  14374. }
  14375. 0 < inCapturePhase.length &&
  14376. ((reactName = new SyntheticEventCtor(
  14377. reactName,
  14378. reactEventType,
  14379. null,
  14380. nativeEvent,
  14381. nativeEventTarget
  14382. )),
  14383. dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));
  14384. }
  14385. }
  14386. if (0 === (eventSystemFlags & 7)) {
  14387. a: {
  14388. reactName =
  14389. "mouseover" === domEventName || "pointerover" === domEventName;
  14390. SyntheticEventCtor =
  14391. "mouseout" === domEventName || "pointerout" === domEventName;
  14392. if (
  14393. reactName &&
  14394. nativeEvent !== currentReplayingEvent &&
  14395. (reactEventType =
  14396. nativeEvent.relatedTarget || nativeEvent.fromElement) &&
  14397. (getClosestInstanceFromNode(reactEventType) ||
  14398. reactEventType[internalContainerInstanceKey])
  14399. )
  14400. break a;
  14401. if (SyntheticEventCtor || reactName) {
  14402. reactName =
  14403. nativeEventTarget.window === nativeEventTarget
  14404. ? nativeEventTarget
  14405. : (reactName = nativeEventTarget.ownerDocument)
  14406. ? reactName.defaultView || reactName.parentWindow
  14407. : window;
  14408. if (SyntheticEventCtor) {
  14409. if (
  14410. ((reactEventType =
  14411. nativeEvent.relatedTarget || nativeEvent.toElement),
  14412. (SyntheticEventCtor = targetInst),
  14413. (reactEventType = reactEventType
  14414. ? getClosestInstanceFromNode(reactEventType)
  14415. : null),
  14416. null !== reactEventType &&
  14417. ((accumulateTargetOnly =
  14418. getNearestMountedFiber(reactEventType)),
  14419. (inCapturePhase = reactEventType.tag),
  14420. reactEventType !== accumulateTargetOnly ||
  14421. (5 !== inCapturePhase &&
  14422. 27 !== inCapturePhase &&
  14423. 6 !== inCapturePhase)))
  14424. )
  14425. reactEventType = null;
  14426. } else (SyntheticEventCtor = null), (reactEventType = targetInst);
  14427. if (SyntheticEventCtor !== reactEventType) {
  14428. inCapturePhase = SyntheticMouseEvent;
  14429. _instance = "onMouseLeave";
  14430. reactEventName = "onMouseEnter";
  14431. instance = "mouse";
  14432. if ("pointerout" === domEventName || "pointerover" === domEventName)
  14433. (inCapturePhase = SyntheticPointerEvent),
  14434. (_instance = "onPointerLeave"),
  14435. (reactEventName = "onPointerEnter"),
  14436. (instance = "pointer");
  14437. accumulateTargetOnly =
  14438. null == SyntheticEventCtor
  14439. ? reactName
  14440. : getNodeFromInstance(SyntheticEventCtor);
  14441. lastHostComponent =
  14442. null == reactEventType
  14443. ? reactName
  14444. : getNodeFromInstance(reactEventType);
  14445. reactName = new inCapturePhase(
  14446. _instance,
  14447. instance + "leave",
  14448. SyntheticEventCtor,
  14449. nativeEvent,
  14450. nativeEventTarget
  14451. );
  14452. reactName.target = accumulateTargetOnly;
  14453. reactName.relatedTarget = lastHostComponent;
  14454. _instance = null;
  14455. getClosestInstanceFromNode(nativeEventTarget) === targetInst &&
  14456. ((inCapturePhase = new inCapturePhase(
  14457. reactEventName,
  14458. instance + "enter",
  14459. reactEventType,
  14460. nativeEvent,
  14461. nativeEventTarget
  14462. )),
  14463. (inCapturePhase.target = lastHostComponent),
  14464. (inCapturePhase.relatedTarget = accumulateTargetOnly),
  14465. (_instance = inCapturePhase));
  14466. accumulateTargetOnly = _instance;
  14467. if (SyntheticEventCtor && reactEventType)
  14468. b: {
  14469. inCapturePhase = getParent;
  14470. reactEventName = SyntheticEventCtor;
  14471. instance = reactEventType;
  14472. lastHostComponent = 0;
  14473. for (
  14474. _instance = reactEventName;
  14475. _instance;
  14476. _instance = inCapturePhase(_instance)
  14477. )
  14478. lastHostComponent++;
  14479. _instance = 0;
  14480. for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
  14481. _instance++;
  14482. for (; 0 < lastHostComponent - _instance; )
  14483. (reactEventName = inCapturePhase(reactEventName)),
  14484. lastHostComponent--;
  14485. for (; 0 < _instance - lastHostComponent; )
  14486. (instance = inCapturePhase(instance)), _instance--;
  14487. for (; lastHostComponent--; ) {
  14488. if (
  14489. reactEventName === instance ||
  14490. (null !== instance && reactEventName === instance.alternate)
  14491. ) {
  14492. inCapturePhase = reactEventName;
  14493. break b;
  14494. }
  14495. reactEventName = inCapturePhase(reactEventName);
  14496. instance = inCapturePhase(instance);
  14497. }
  14498. inCapturePhase = null;
  14499. }
  14500. else inCapturePhase = null;
  14501. null !== SyntheticEventCtor &&
  14502. accumulateEnterLeaveListenersForEvent(
  14503. dispatchQueue,
  14504. reactName,
  14505. SyntheticEventCtor,
  14506. inCapturePhase,
  14507. !1
  14508. );
  14509. null !== reactEventType &&
  14510. null !== accumulateTargetOnly &&
  14511. accumulateEnterLeaveListenersForEvent(
  14512. dispatchQueue,
  14513. accumulateTargetOnly,
  14514. reactEventType,
  14515. inCapturePhase,
  14516. !0
  14517. );
  14518. }
  14519. }
  14520. }
  14521. a: {
  14522. reactName = targetInst ? getNodeFromInstance(targetInst) : window;
  14523. SyntheticEventCtor =
  14524. reactName.nodeName && reactName.nodeName.toLowerCase();
  14525. if (
  14526. "select" === SyntheticEventCtor ||
  14527. ("input" === SyntheticEventCtor && "file" === reactName.type)
  14528. )
  14529. var getTargetInstFunc = getTargetInstForChangeEvent;
  14530. else if (isTextInputElement(reactName))
  14531. if (isInputEventSupported)
  14532. getTargetInstFunc = getTargetInstForInputOrChangeEvent;
  14533. else {
  14534. getTargetInstFunc = getTargetInstForInputEventPolyfill;
  14535. var handleEventFunc = handleEventsForInputEventPolyfill;
  14536. }
  14537. else
  14538. (SyntheticEventCtor = reactName.nodeName),
  14539. !SyntheticEventCtor ||
  14540. "input" !== SyntheticEventCtor.toLowerCase() ||
  14541. ("checkbox" !== reactName.type && "radio" !== reactName.type)
  14542. ? targetInst &&
  14543. isCustomElement(targetInst.elementType) &&
  14544. (getTargetInstFunc = getTargetInstForChangeEvent)
  14545. : (getTargetInstFunc = getTargetInstForClickEvent);
  14546. if (
  14547. getTargetInstFunc &&
  14548. (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))
  14549. ) {
  14550. createAndAccumulateChangeEvent(
  14551. dispatchQueue,
  14552. getTargetInstFunc,
  14553. nativeEvent,
  14554. nativeEventTarget
  14555. );
  14556. break a;
  14557. }
  14558. handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
  14559. "focusout" === domEventName &&
  14560. targetInst &&
  14561. "number" === reactName.type &&
  14562. null != targetInst.memoizedProps.value &&
  14563. setDefaultValue(reactName, "number", reactName.value);
  14564. }
  14565. handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
  14566. switch (domEventName) {
  14567. case "focusin":
  14568. if (
  14569. isTextInputElement(handleEventFunc) ||
  14570. "true" === handleEventFunc.contentEditable
  14571. )
  14572. (activeElement = handleEventFunc),
  14573. (activeElementInst = targetInst),
  14574. (lastSelection = null);
  14575. break;
  14576. case "focusout":
  14577. lastSelection = activeElementInst = activeElement = null;
  14578. break;
  14579. case "mousedown":
  14580. mouseDown = !0;
  14581. break;
  14582. case "contextmenu":
  14583. case "mouseup":
  14584. case "dragend":
  14585. mouseDown = !1;
  14586. constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
  14587. break;
  14588. case "selectionchange":
  14589. if (skipSelectionChangeEvent) break;
  14590. case "keydown":
  14591. case "keyup":
  14592. constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
  14593. }
  14594. var fallbackData;
  14595. if (canUseCompositionEvent)
  14596. b: {
  14597. switch (domEventName) {
  14598. case "compositionstart":
  14599. var eventType = "onCompositionStart";
  14600. break b;
  14601. case "compositionend":
  14602. eventType = "onCompositionEnd";
  14603. break b;
  14604. case "compositionupdate":
  14605. eventType = "onCompositionUpdate";
  14606. break b;
  14607. }
  14608. eventType = void 0;
  14609. }
  14610. else
  14611. isComposing
  14612. ? isFallbackCompositionEnd(domEventName, nativeEvent) &&
  14613. (eventType = "onCompositionEnd")
  14614. : "keydown" === domEventName &&
  14615. 229 === nativeEvent.keyCode &&
  14616. (eventType = "onCompositionStart");
  14617. eventType &&
  14618. (useFallbackCompositionData &&
  14619. "ko" !== nativeEvent.locale &&
  14620. (isComposing || "onCompositionStart" !== eventType
  14621. ? "onCompositionEnd" === eventType &&
  14622. isComposing &&
  14623. (fallbackData = getData())
  14624. : ((root = nativeEventTarget),
  14625. (startText = "value" in root ? root.value : root.textContent),
  14626. (isComposing = !0))),
  14627. (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),
  14628. 0 < handleEventFunc.length &&
  14629. ((eventType = new SyntheticCompositionEvent(
  14630. eventType,
  14631. domEventName,
  14632. null,
  14633. nativeEvent,
  14634. nativeEventTarget
  14635. )),
  14636. dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),
  14637. fallbackData
  14638. ? (eventType.data = fallbackData)
  14639. : ((fallbackData = getDataFromCustomEvent(nativeEvent)),
  14640. null !== fallbackData && (eventType.data = fallbackData))));
  14641. if (
  14642. (fallbackData = canUseTextInputEvent
  14643. ? getNativeBeforeInputChars(domEventName, nativeEvent)
  14644. : getFallbackBeforeInputChars(domEventName, nativeEvent))
  14645. )
  14646. (eventType = accumulateTwoPhaseListeners(targetInst, "onBeforeInput")),
  14647. 0 < eventType.length &&
  14648. ((handleEventFunc = new SyntheticCompositionEvent(
  14649. "onBeforeInput",
  14650. "beforeinput",
  14651. null,
  14652. nativeEvent,
  14653. nativeEventTarget
  14654. )),
  14655. dispatchQueue.push({
  14656. event: handleEventFunc,
  14657. listeners: eventType
  14658. }),
  14659. (handleEventFunc.data = fallbackData));
  14660. extractEvents$1(
  14661. dispatchQueue,
  14662. domEventName,
  14663. targetInst,
  14664. nativeEvent,
  14665. nativeEventTarget
  14666. );
  14667. }
  14668. processDispatchQueue(dispatchQueue, eventSystemFlags);
  14669. });
  14670. }
  14671. function createDispatchListener(instance, listener, currentTarget) {
  14672. return {
  14673. instance: instance,
  14674. listener: listener,
  14675. currentTarget: currentTarget
  14676. };
  14677. }
  14678. function accumulateTwoPhaseListeners(targetFiber, reactName) {
  14679. for (
  14680. var captureName = reactName + "Capture", listeners = [];
  14681. null !== targetFiber;
  14682. ) {
  14683. var _instance2 = targetFiber,
  14684. stateNode = _instance2.stateNode;
  14685. _instance2 = _instance2.tag;
  14686. (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||
  14687. null === stateNode ||
  14688. ((_instance2 = getListener(targetFiber, captureName)),
  14689. null != _instance2 &&
  14690. listeners.unshift(
  14691. createDispatchListener(targetFiber, _instance2, stateNode)
  14692. ),
  14693. (_instance2 = getListener(targetFiber, reactName)),
  14694. null != _instance2 &&
  14695. listeners.push(
  14696. createDispatchListener(targetFiber, _instance2, stateNode)
  14697. ));
  14698. if (3 === targetFiber.tag) return listeners;
  14699. targetFiber = targetFiber.return;
  14700. }
  14701. return [];
  14702. }
  14703. function getParent(inst) {
  14704. if (null === inst) return null;
  14705. do inst = inst.return;
  14706. while (inst && 5 !== inst.tag && 27 !== inst.tag);
  14707. return inst ? inst : null;
  14708. }
  14709. function accumulateEnterLeaveListenersForEvent(
  14710. dispatchQueue,
  14711. event,
  14712. target,
  14713. common,
  14714. inCapturePhase
  14715. ) {
  14716. for (
  14717. var registrationName = event._reactName, listeners = [];
  14718. null !== target && target !== common;
  14719. ) {
  14720. var _instance3 = target,
  14721. alternate = _instance3.alternate,
  14722. stateNode = _instance3.stateNode;
  14723. _instance3 = _instance3.tag;
  14724. if (null !== alternate && alternate === common) break;
  14725. (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||
  14726. null === stateNode ||
  14727. ((alternate = stateNode),
  14728. inCapturePhase
  14729. ? ((stateNode = getListener(target, registrationName)),
  14730. null != stateNode &&
  14731. listeners.unshift(
  14732. createDispatchListener(target, stateNode, alternate)
  14733. ))
  14734. : inCapturePhase ||
  14735. ((stateNode = getListener(target, registrationName)),
  14736. null != stateNode &&
  14737. listeners.push(
  14738. createDispatchListener(target, stateNode, alternate)
  14739. )));
  14740. target = target.return;
  14741. }
  14742. 0 !== listeners.length &&
  14743. dispatchQueue.push({ event: event, listeners: listeners });
  14744. }
  14745. var NORMALIZE_NEWLINES_REGEX = /\r\n?/g,
  14746. NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
  14747. function normalizeMarkupForTextOrAttribute(markup) {
  14748. return ("string" === typeof markup ? markup : "" + markup)
  14749. .replace(NORMALIZE_NEWLINES_REGEX, "\n")
  14750. .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
  14751. }
  14752. function checkForUnmatchedText(serverText, clientText) {
  14753. clientText = normalizeMarkupForTextOrAttribute(clientText);
  14754. return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;
  14755. }
  14756. function setProp(domElement, tag, key, value, props, prevValue) {
  14757. switch (key) {
  14758. case "children":
  14759. "string" === typeof value
  14760. ? "body" === tag ||
  14761. ("textarea" === tag && "" === value) ||
  14762. setTextContent(domElement, value)
  14763. : ("number" === typeof value || "bigint" === typeof value) &&
  14764. "body" !== tag &&
  14765. setTextContent(domElement, "" + value);
  14766. break;
  14767. case "className":
  14768. setValueForKnownAttribute(domElement, "class", value);
  14769. break;
  14770. case "tabIndex":
  14771. setValueForKnownAttribute(domElement, "tabindex", value);
  14772. break;
  14773. case "dir":
  14774. case "role":
  14775. case "viewBox":
  14776. case "width":
  14777. case "height":
  14778. setValueForKnownAttribute(domElement, key, value);
  14779. break;
  14780. case "style":
  14781. setValueForStyles(domElement, value, prevValue);
  14782. break;
  14783. case "data":
  14784. if ("object" !== tag) {
  14785. setValueForKnownAttribute(domElement, "data", value);
  14786. break;
  14787. }
  14788. case "src":
  14789. case "href":
  14790. if ("" === value && ("a" !== tag || "href" !== key)) {
  14791. domElement.removeAttribute(key);
  14792. break;
  14793. }
  14794. if (
  14795. null == value ||
  14796. "function" === typeof value ||
  14797. "symbol" === typeof value ||
  14798. "boolean" === typeof value
  14799. ) {
  14800. domElement.removeAttribute(key);
  14801. break;
  14802. }
  14803. value = sanitizeURL("" + value);
  14804. domElement.setAttribute(key, value);
  14805. break;
  14806. case "action":
  14807. case "formAction":
  14808. if ("function" === typeof value) {
  14809. domElement.setAttribute(
  14810. key,
  14811. "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
  14812. );
  14813. break;
  14814. } else
  14815. "function" === typeof prevValue &&
  14816. ("formAction" === key
  14817. ? ("input" !== tag &&
  14818. setProp(domElement, tag, "name", props.name, props, null),
  14819. setProp(
  14820. domElement,
  14821. tag,
  14822. "formEncType",
  14823. props.formEncType,
  14824. props,
  14825. null
  14826. ),
  14827. setProp(
  14828. domElement,
  14829. tag,
  14830. "formMethod",
  14831. props.formMethod,
  14832. props,
  14833. null
  14834. ),
  14835. setProp(
  14836. domElement,
  14837. tag,
  14838. "formTarget",
  14839. props.formTarget,
  14840. props,
  14841. null
  14842. ))
  14843. : (setProp(domElement, tag, "encType", props.encType, props, null),
  14844. setProp(domElement, tag, "method", props.method, props, null),
  14845. setProp(domElement, tag, "target", props.target, props, null)));
  14846. if (
  14847. null == value ||
  14848. "symbol" === typeof value ||
  14849. "boolean" === typeof value
  14850. ) {
  14851. domElement.removeAttribute(key);
  14852. break;
  14853. }
  14854. value = sanitizeURL("" + value);
  14855. domElement.setAttribute(key, value);
  14856. break;
  14857. case "onClick":
  14858. null != value && (domElement.onclick = noop$1);
  14859. break;
  14860. case "onScroll":
  14861. null != value && listenToNonDelegatedEvent("scroll", domElement);
  14862. break;
  14863. case "onScrollEnd":
  14864. null != value && listenToNonDelegatedEvent("scrollend", domElement);
  14865. break;
  14866. case "dangerouslySetInnerHTML":
  14867. if (null != value) {
  14868. if ("object" !== typeof value || !("__html" in value))
  14869. throw Error(formatProdErrorMessage(61));
  14870. key = value.__html;
  14871. if (null != key) {
  14872. if (null != props.children) throw Error(formatProdErrorMessage(60));
  14873. domElement.innerHTML = key;
  14874. }
  14875. }
  14876. break;
  14877. case "multiple":
  14878. domElement.multiple =
  14879. value && "function" !== typeof value && "symbol" !== typeof value;
  14880. break;
  14881. case "muted":
  14882. domElement.muted =
  14883. value && "function" !== typeof value && "symbol" !== typeof value;
  14884. break;
  14885. case "suppressContentEditableWarning":
  14886. case "suppressHydrationWarning":
  14887. case "defaultValue":
  14888. case "defaultChecked":
  14889. case "innerHTML":
  14890. case "ref":
  14891. break;
  14892. case "autoFocus":
  14893. break;
  14894. case "xlinkHref":
  14895. if (
  14896. null == value ||
  14897. "function" === typeof value ||
  14898. "boolean" === typeof value ||
  14899. "symbol" === typeof value
  14900. ) {
  14901. domElement.removeAttribute("xlink:href");
  14902. break;
  14903. }
  14904. key = sanitizeURL("" + value);
  14905. domElement.setAttributeNS(
  14906. "http://www.w3.org/1999/xlink",
  14907. "xlink:href",
  14908. key
  14909. );
  14910. break;
  14911. case "contentEditable":
  14912. case "spellCheck":
  14913. case "draggable":
  14914. case "value":
  14915. case "autoReverse":
  14916. case "externalResourcesRequired":
  14917. case "focusable":
  14918. case "preserveAlpha":
  14919. null != value && "function" !== typeof value && "symbol" !== typeof value
  14920. ? domElement.setAttribute(key, "" + value)
  14921. : domElement.removeAttribute(key);
  14922. break;
  14923. case "inert":
  14924. case "allowFullScreen":
  14925. case "async":
  14926. case "autoPlay":
  14927. case "controls":
  14928. case "default":
  14929. case "defer":
  14930. case "disabled":
  14931. case "disablePictureInPicture":
  14932. case "disableRemotePlayback":
  14933. case "formNoValidate":
  14934. case "hidden":
  14935. case "loop":
  14936. case "noModule":
  14937. case "noValidate":
  14938. case "open":
  14939. case "playsInline":
  14940. case "readOnly":
  14941. case "required":
  14942. case "reversed":
  14943. case "scoped":
  14944. case "seamless":
  14945. case "itemScope":
  14946. value && "function" !== typeof value && "symbol" !== typeof value
  14947. ? domElement.setAttribute(key, "")
  14948. : domElement.removeAttribute(key);
  14949. break;
  14950. case "capture":
  14951. case "download":
  14952. !0 === value
  14953. ? domElement.setAttribute(key, "")
  14954. : !1 !== value &&
  14955. null != value &&
  14956. "function" !== typeof value &&
  14957. "symbol" !== typeof value
  14958. ? domElement.setAttribute(key, value)
  14959. : domElement.removeAttribute(key);
  14960. break;
  14961. case "cols":
  14962. case "rows":
  14963. case "size":
  14964. case "span":
  14965. null != value &&
  14966. "function" !== typeof value &&
  14967. "symbol" !== typeof value &&
  14968. !isNaN(value) &&
  14969. 1 <= value
  14970. ? domElement.setAttribute(key, value)
  14971. : domElement.removeAttribute(key);
  14972. break;
  14973. case "rowSpan":
  14974. case "start":
  14975. null == value ||
  14976. "function" === typeof value ||
  14977. "symbol" === typeof value ||
  14978. isNaN(value)
  14979. ? domElement.removeAttribute(key)
  14980. : domElement.setAttribute(key, value);
  14981. break;
  14982. case "popover":
  14983. listenToNonDelegatedEvent("beforetoggle", domElement);
  14984. listenToNonDelegatedEvent("toggle", domElement);
  14985. setValueForAttribute(domElement, "popover", value);
  14986. break;
  14987. case "xlinkActuate":
  14988. setValueForNamespacedAttribute(
  14989. domElement,
  14990. "http://www.w3.org/1999/xlink",
  14991. "xlink:actuate",
  14992. value
  14993. );
  14994. break;
  14995. case "xlinkArcrole":
  14996. setValueForNamespacedAttribute(
  14997. domElement,
  14998. "http://www.w3.org/1999/xlink",
  14999. "xlink:arcrole",
  15000. value
  15001. );
  15002. break;
  15003. case "xlinkRole":
  15004. setValueForNamespacedAttribute(
  15005. domElement,
  15006. "http://www.w3.org/1999/xlink",
  15007. "xlink:role",
  15008. value
  15009. );
  15010. break;
  15011. case "xlinkShow":
  15012. setValueForNamespacedAttribute(
  15013. domElement,
  15014. "http://www.w3.org/1999/xlink",
  15015. "xlink:show",
  15016. value
  15017. );
  15018. break;
  15019. case "xlinkTitle":
  15020. setValueForNamespacedAttribute(
  15021. domElement,
  15022. "http://www.w3.org/1999/xlink",
  15023. "xlink:title",
  15024. value
  15025. );
  15026. break;
  15027. case "xlinkType":
  15028. setValueForNamespacedAttribute(
  15029. domElement,
  15030. "http://www.w3.org/1999/xlink",
  15031. "xlink:type",
  15032. value
  15033. );
  15034. break;
  15035. case "xmlBase":
  15036. setValueForNamespacedAttribute(
  15037. domElement,
  15038. "http://www.w3.org/XML/1998/namespace",
  15039. "xml:base",
  15040. value
  15041. );
  15042. break;
  15043. case "xmlLang":
  15044. setValueForNamespacedAttribute(
  15045. domElement,
  15046. "http://www.w3.org/XML/1998/namespace",
  15047. "xml:lang",
  15048. value
  15049. );
  15050. break;
  15051. case "xmlSpace":
  15052. setValueForNamespacedAttribute(
  15053. domElement,
  15054. "http://www.w3.org/XML/1998/namespace",
  15055. "xml:space",
  15056. value
  15057. );
  15058. break;
  15059. case "is":
  15060. setValueForAttribute(domElement, "is", value);
  15061. break;
  15062. case "innerText":
  15063. case "textContent":
  15064. break;
  15065. default:
  15066. if (
  15067. !(2 < key.length) ||
  15068. ("o" !== key[0] && "O" !== key[0]) ||
  15069. ("n" !== key[1] && "N" !== key[1])
  15070. )
  15071. (key = aliases.get(key) || key),
  15072. setValueForAttribute(domElement, key, value);
  15073. }
  15074. }
  15075. function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
  15076. switch (key) {
  15077. case "style":
  15078. setValueForStyles(domElement, value, prevValue);
  15079. break;
  15080. case "dangerouslySetInnerHTML":
  15081. if (null != value) {
  15082. if ("object" !== typeof value || !("__html" in value))
  15083. throw Error(formatProdErrorMessage(61));
  15084. key = value.__html;
  15085. if (null != key) {
  15086. if (null != props.children) throw Error(formatProdErrorMessage(60));
  15087. domElement.innerHTML = key;
  15088. }
  15089. }
  15090. break;
  15091. case "children":
  15092. "string" === typeof value
  15093. ? setTextContent(domElement, value)
  15094. : ("number" === typeof value || "bigint" === typeof value) &&
  15095. setTextContent(domElement, "" + value);
  15096. break;
  15097. case "onScroll":
  15098. null != value && listenToNonDelegatedEvent("scroll", domElement);
  15099. break;
  15100. case "onScrollEnd":
  15101. null != value && listenToNonDelegatedEvent("scrollend", domElement);
  15102. break;
  15103. case "onClick":
  15104. null != value && (domElement.onclick = noop$1);
  15105. break;
  15106. case "suppressContentEditableWarning":
  15107. case "suppressHydrationWarning":
  15108. case "innerHTML":
  15109. case "ref":
  15110. break;
  15111. case "innerText":
  15112. case "textContent":
  15113. break;
  15114. default:
  15115. if (!registrationNameDependencies.hasOwnProperty(key))
  15116. a: {
  15117. if (
  15118. "o" === key[0] &&
  15119. "n" === key[1] &&
  15120. ((props = key.endsWith("Capture")),
  15121. (tag = key.slice(2, props ? key.length - 7 : void 0)),
  15122. (prevValue = domElement[internalPropsKey] || null),
  15123. (prevValue = null != prevValue ? prevValue[key] : null),
  15124. "function" === typeof prevValue &&
  15125. domElement.removeEventListener(tag, prevValue, props),
  15126. "function" === typeof value)
  15127. ) {
  15128. "function" !== typeof prevValue &&
  15129. null !== prevValue &&
  15130. (key in domElement
  15131. ? (domElement[key] = null)
  15132. : domElement.hasAttribute(key) &&
  15133. domElement.removeAttribute(key));
  15134. domElement.addEventListener(tag, value, props);
  15135. break a;
  15136. }
  15137. key in domElement
  15138. ? (domElement[key] = value)
  15139. : !0 === value
  15140. ? domElement.setAttribute(key, "")
  15141. : setValueForAttribute(domElement, key, value);
  15142. }
  15143. }
  15144. }
  15145. function setInitialProperties(domElement, tag, props) {
  15146. switch (tag) {
  15147. case "div":
  15148. case "span":
  15149. case "svg":
  15150. case "path":
  15151. case "a":
  15152. case "g":
  15153. case "p":
  15154. case "li":
  15155. break;
  15156. case "img":
  15157. listenToNonDelegatedEvent("error", domElement);
  15158. listenToNonDelegatedEvent("load", domElement);
  15159. var hasSrc = !1,
  15160. hasSrcSet = !1,
  15161. propKey;
  15162. for (propKey in props)
  15163. if (props.hasOwnProperty(propKey)) {
  15164. var propValue = props[propKey];
  15165. if (null != propValue)
  15166. switch (propKey) {
  15167. case "src":
  15168. hasSrc = !0;
  15169. break;
  15170. case "srcSet":
  15171. hasSrcSet = !0;
  15172. break;
  15173. case "children":
  15174. case "dangerouslySetInnerHTML":
  15175. throw Error(formatProdErrorMessage(137, tag));
  15176. default:
  15177. setProp(domElement, tag, propKey, propValue, props, null);
  15178. }
  15179. }
  15180. hasSrcSet &&
  15181. setProp(domElement, tag, "srcSet", props.srcSet, props, null);
  15182. hasSrc && setProp(domElement, tag, "src", props.src, props, null);
  15183. return;
  15184. case "input":
  15185. listenToNonDelegatedEvent("invalid", domElement);
  15186. var defaultValue = (propKey = propValue = hasSrcSet = null),
  15187. checked = null,
  15188. defaultChecked = null;
  15189. for (hasSrc in props)
  15190. if (props.hasOwnProperty(hasSrc)) {
  15191. var propValue$227 = props[hasSrc];
  15192. if (null != propValue$227)
  15193. switch (hasSrc) {
  15194. case "name":
  15195. hasSrcSet = propValue$227;
  15196. break;
  15197. case "type":
  15198. propValue = propValue$227;
  15199. break;
  15200. case "checked":
  15201. checked = propValue$227;
  15202. break;
  15203. case "defaultChecked":
  15204. defaultChecked = propValue$227;
  15205. break;
  15206. case "value":
  15207. propKey = propValue$227;
  15208. break;
  15209. case "defaultValue":
  15210. defaultValue = propValue$227;
  15211. break;
  15212. case "children":
  15213. case "dangerouslySetInnerHTML":
  15214. if (null != propValue$227)
  15215. throw Error(formatProdErrorMessage(137, tag));
  15216. break;
  15217. default:
  15218. setProp(domElement, tag, hasSrc, propValue$227, props, null);
  15219. }
  15220. }
  15221. initInput(
  15222. domElement,
  15223. propKey,
  15224. defaultValue,
  15225. checked,
  15226. defaultChecked,
  15227. propValue,
  15228. hasSrcSet,
  15229. !1
  15230. );
  15231. return;
  15232. case "select":
  15233. listenToNonDelegatedEvent("invalid", domElement);
  15234. hasSrc = propValue = propKey = null;
  15235. for (hasSrcSet in props)
  15236. if (
  15237. props.hasOwnProperty(hasSrcSet) &&
  15238. ((defaultValue = props[hasSrcSet]), null != defaultValue)
  15239. )
  15240. switch (hasSrcSet) {
  15241. case "value":
  15242. propKey = defaultValue;
  15243. break;
  15244. case "defaultValue":
  15245. propValue = defaultValue;
  15246. break;
  15247. case "multiple":
  15248. hasSrc = defaultValue;
  15249. default:
  15250. setProp(domElement, tag, hasSrcSet, defaultValue, props, null);
  15251. }
  15252. tag = propKey;
  15253. props = propValue;
  15254. domElement.multiple = !!hasSrc;
  15255. null != tag
  15256. ? updateOptions(domElement, !!hasSrc, tag, !1)
  15257. : null != props && updateOptions(domElement, !!hasSrc, props, !0);
  15258. return;
  15259. case "textarea":
  15260. listenToNonDelegatedEvent("invalid", domElement);
  15261. propKey = hasSrcSet = hasSrc = null;
  15262. for (propValue in props)
  15263. if (
  15264. props.hasOwnProperty(propValue) &&
  15265. ((defaultValue = props[propValue]), null != defaultValue)
  15266. )
  15267. switch (propValue) {
  15268. case "value":
  15269. hasSrc = defaultValue;
  15270. break;
  15271. case "defaultValue":
  15272. hasSrcSet = defaultValue;
  15273. break;
  15274. case "children":
  15275. propKey = defaultValue;
  15276. break;
  15277. case "dangerouslySetInnerHTML":
  15278. if (null != defaultValue) throw Error(formatProdErrorMessage(91));
  15279. break;
  15280. default:
  15281. setProp(domElement, tag, propValue, defaultValue, props, null);
  15282. }
  15283. initTextarea(domElement, hasSrc, hasSrcSet, propKey);
  15284. return;
  15285. case "option":
  15286. for (checked in props)
  15287. if (
  15288. props.hasOwnProperty(checked) &&
  15289. ((hasSrc = props[checked]), null != hasSrc)
  15290. )
  15291. switch (checked) {
  15292. case "selected":
  15293. domElement.selected =
  15294. hasSrc &&
  15295. "function" !== typeof hasSrc &&
  15296. "symbol" !== typeof hasSrc;
  15297. break;
  15298. default:
  15299. setProp(domElement, tag, checked, hasSrc, props, null);
  15300. }
  15301. return;
  15302. case "dialog":
  15303. listenToNonDelegatedEvent("beforetoggle", domElement);
  15304. listenToNonDelegatedEvent("toggle", domElement);
  15305. listenToNonDelegatedEvent("cancel", domElement);
  15306. listenToNonDelegatedEvent("close", domElement);
  15307. break;
  15308. case "iframe":
  15309. case "object":
  15310. listenToNonDelegatedEvent("load", domElement);
  15311. break;
  15312. case "video":
  15313. case "audio":
  15314. for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
  15315. listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
  15316. break;
  15317. case "image":
  15318. listenToNonDelegatedEvent("error", domElement);
  15319. listenToNonDelegatedEvent("load", domElement);
  15320. break;
  15321. case "details":
  15322. listenToNonDelegatedEvent("toggle", domElement);
  15323. break;
  15324. case "embed":
  15325. case "source":
  15326. case "link":
  15327. listenToNonDelegatedEvent("error", domElement),
  15328. listenToNonDelegatedEvent("load", domElement);
  15329. case "area":
  15330. case "base":
  15331. case "br":
  15332. case "col":
  15333. case "hr":
  15334. case "keygen":
  15335. case "meta":
  15336. case "param":
  15337. case "track":
  15338. case "wbr":
  15339. case "menuitem":
  15340. for (defaultChecked in props)
  15341. if (
  15342. props.hasOwnProperty(defaultChecked) &&
  15343. ((hasSrc = props[defaultChecked]), null != hasSrc)
  15344. )
  15345. switch (defaultChecked) {
  15346. case "children":
  15347. case "dangerouslySetInnerHTML":
  15348. throw Error(formatProdErrorMessage(137, tag));
  15349. default:
  15350. setProp(domElement, tag, defaultChecked, hasSrc, props, null);
  15351. }
  15352. return;
  15353. default:
  15354. if (isCustomElement(tag)) {
  15355. for (propValue$227 in props)
  15356. props.hasOwnProperty(propValue$227) &&
  15357. ((hasSrc = props[propValue$227]),
  15358. void 0 !== hasSrc &&
  15359. setPropOnCustomElement(
  15360. domElement,
  15361. tag,
  15362. propValue$227,
  15363. hasSrc,
  15364. props,
  15365. void 0
  15366. ));
  15367. return;
  15368. }
  15369. }
  15370. for (defaultValue in props)
  15371. props.hasOwnProperty(defaultValue) &&
  15372. ((hasSrc = props[defaultValue]),
  15373. null != hasSrc &&
  15374. setProp(domElement, tag, defaultValue, hasSrc, props, null));
  15375. }
  15376. function updateProperties(domElement, tag, lastProps, nextProps) {
  15377. switch (tag) {
  15378. case "div":
  15379. case "span":
  15380. case "svg":
  15381. case "path":
  15382. case "a":
  15383. case "g":
  15384. case "p":
  15385. case "li":
  15386. break;
  15387. case "input":
  15388. var name = null,
  15389. type = null,
  15390. value = null,
  15391. defaultValue = null,
  15392. lastDefaultValue = null,
  15393. checked = null,
  15394. defaultChecked = null;
  15395. for (propKey in lastProps) {
  15396. var lastProp = lastProps[propKey];
  15397. if (lastProps.hasOwnProperty(propKey) && null != lastProp)
  15398. switch (propKey) {
  15399. case "checked":
  15400. break;
  15401. case "value":
  15402. break;
  15403. case "defaultValue":
  15404. lastDefaultValue = lastProp;
  15405. default:
  15406. nextProps.hasOwnProperty(propKey) ||
  15407. setProp(domElement, tag, propKey, null, nextProps, lastProp);
  15408. }
  15409. }
  15410. for (var propKey$244 in nextProps) {
  15411. var propKey = nextProps[propKey$244];
  15412. lastProp = lastProps[propKey$244];
  15413. if (
  15414. nextProps.hasOwnProperty(propKey$244) &&
  15415. (null != propKey || null != lastProp)
  15416. )
  15417. switch (propKey$244) {
  15418. case "type":
  15419. type = propKey;
  15420. break;
  15421. case "name":
  15422. name = propKey;
  15423. break;
  15424. case "checked":
  15425. checked = propKey;
  15426. break;
  15427. case "defaultChecked":
  15428. defaultChecked = propKey;
  15429. break;
  15430. case "value":
  15431. value = propKey;
  15432. break;
  15433. case "defaultValue":
  15434. defaultValue = propKey;
  15435. break;
  15436. case "children":
  15437. case "dangerouslySetInnerHTML":
  15438. if (null != propKey)
  15439. throw Error(formatProdErrorMessage(137, tag));
  15440. break;
  15441. default:
  15442. propKey !== lastProp &&
  15443. setProp(
  15444. domElement,
  15445. tag,
  15446. propKey$244,
  15447. propKey,
  15448. nextProps,
  15449. lastProp
  15450. );
  15451. }
  15452. }
  15453. updateInput(
  15454. domElement,
  15455. value,
  15456. defaultValue,
  15457. lastDefaultValue,
  15458. checked,
  15459. defaultChecked,
  15460. type,
  15461. name
  15462. );
  15463. return;
  15464. case "select":
  15465. propKey = value = defaultValue = propKey$244 = null;
  15466. for (type in lastProps)
  15467. if (
  15468. ((lastDefaultValue = lastProps[type]),
  15469. lastProps.hasOwnProperty(type) && null != lastDefaultValue)
  15470. )
  15471. switch (type) {
  15472. case "value":
  15473. break;
  15474. case "multiple":
  15475. propKey = lastDefaultValue;
  15476. default:
  15477. nextProps.hasOwnProperty(type) ||
  15478. setProp(
  15479. domElement,
  15480. tag,
  15481. type,
  15482. null,
  15483. nextProps,
  15484. lastDefaultValue
  15485. );
  15486. }
  15487. for (name in nextProps)
  15488. if (
  15489. ((type = nextProps[name]),
  15490. (lastDefaultValue = lastProps[name]),
  15491. nextProps.hasOwnProperty(name) &&
  15492. (null != type || null != lastDefaultValue))
  15493. )
  15494. switch (name) {
  15495. case "value":
  15496. propKey$244 = type;
  15497. break;
  15498. case "defaultValue":
  15499. defaultValue = type;
  15500. break;
  15501. case "multiple":
  15502. value = type;
  15503. default:
  15504. type !== lastDefaultValue &&
  15505. setProp(
  15506. domElement,
  15507. tag,
  15508. name,
  15509. type,
  15510. nextProps,
  15511. lastDefaultValue
  15512. );
  15513. }
  15514. tag = defaultValue;
  15515. lastProps = value;
  15516. nextProps = propKey;
  15517. null != propKey$244
  15518. ? updateOptions(domElement, !!lastProps, propKey$244, !1)
  15519. : !!nextProps !== !!lastProps &&
  15520. (null != tag
  15521. ? updateOptions(domElement, !!lastProps, tag, !0)
  15522. : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1));
  15523. return;
  15524. case "textarea":
  15525. propKey = propKey$244 = null;
  15526. for (defaultValue in lastProps)
  15527. if (
  15528. ((name = lastProps[defaultValue]),
  15529. lastProps.hasOwnProperty(defaultValue) &&
  15530. null != name &&
  15531. !nextProps.hasOwnProperty(defaultValue))
  15532. )
  15533. switch (defaultValue) {
  15534. case "value":
  15535. break;
  15536. case "children":
  15537. break;
  15538. default:
  15539. setProp(domElement, tag, defaultValue, null, nextProps, name);
  15540. }
  15541. for (value in nextProps)
  15542. if (
  15543. ((name = nextProps[value]),
  15544. (type = lastProps[value]),
  15545. nextProps.hasOwnProperty(value) && (null != name || null != type))
  15546. )
  15547. switch (value) {
  15548. case "value":
  15549. propKey$244 = name;
  15550. break;
  15551. case "defaultValue":
  15552. propKey = name;
  15553. break;
  15554. case "children":
  15555. break;
  15556. case "dangerouslySetInnerHTML":
  15557. if (null != name) throw Error(formatProdErrorMessage(91));
  15558. break;
  15559. default:
  15560. name !== type &&
  15561. setProp(domElement, tag, value, name, nextProps, type);
  15562. }
  15563. updateTextarea(domElement, propKey$244, propKey);
  15564. return;
  15565. case "option":
  15566. for (var propKey$260 in lastProps)
  15567. if (
  15568. ((propKey$244 = lastProps[propKey$260]),
  15569. lastProps.hasOwnProperty(propKey$260) &&
  15570. null != propKey$244 &&
  15571. !nextProps.hasOwnProperty(propKey$260))
  15572. )
  15573. switch (propKey$260) {
  15574. case "selected":
  15575. domElement.selected = !1;
  15576. break;
  15577. default:
  15578. setProp(
  15579. domElement,
  15580. tag,
  15581. propKey$260,
  15582. null,
  15583. nextProps,
  15584. propKey$244
  15585. );
  15586. }
  15587. for (lastDefaultValue in nextProps)
  15588. if (
  15589. ((propKey$244 = nextProps[lastDefaultValue]),
  15590. (propKey = lastProps[lastDefaultValue]),
  15591. nextProps.hasOwnProperty(lastDefaultValue) &&
  15592. propKey$244 !== propKey &&
  15593. (null != propKey$244 || null != propKey))
  15594. )
  15595. switch (lastDefaultValue) {
  15596. case "selected":
  15597. domElement.selected =
  15598. propKey$244 &&
  15599. "function" !== typeof propKey$244 &&
  15600. "symbol" !== typeof propKey$244;
  15601. break;
  15602. default:
  15603. setProp(
  15604. domElement,
  15605. tag,
  15606. lastDefaultValue,
  15607. propKey$244,
  15608. nextProps,
  15609. propKey
  15610. );
  15611. }
  15612. return;
  15613. case "img":
  15614. case "link":
  15615. case "area":
  15616. case "base":
  15617. case "br":
  15618. case "col":
  15619. case "embed":
  15620. case "hr":
  15621. case "keygen":
  15622. case "meta":
  15623. case "param":
  15624. case "source":
  15625. case "track":
  15626. case "wbr":
  15627. case "menuitem":
  15628. for (var propKey$265 in lastProps)
  15629. (propKey$244 = lastProps[propKey$265]),
  15630. lastProps.hasOwnProperty(propKey$265) &&
  15631. null != propKey$244 &&
  15632. !nextProps.hasOwnProperty(propKey$265) &&
  15633. setProp(domElement, tag, propKey$265, null, nextProps, propKey$244);
  15634. for (checked in nextProps)
  15635. if (
  15636. ((propKey$244 = nextProps[checked]),
  15637. (propKey = lastProps[checked]),
  15638. nextProps.hasOwnProperty(checked) &&
  15639. propKey$244 !== propKey &&
  15640. (null != propKey$244 || null != propKey))
  15641. )
  15642. switch (checked) {
  15643. case "children":
  15644. case "dangerouslySetInnerHTML":
  15645. if (null != propKey$244)
  15646. throw Error(formatProdErrorMessage(137, tag));
  15647. break;
  15648. default:
  15649. setProp(
  15650. domElement,
  15651. tag,
  15652. checked,
  15653. propKey$244,
  15654. nextProps,
  15655. propKey
  15656. );
  15657. }
  15658. return;
  15659. default:
  15660. if (isCustomElement(tag)) {
  15661. for (var propKey$270 in lastProps)
  15662. (propKey$244 = lastProps[propKey$270]),
  15663. lastProps.hasOwnProperty(propKey$270) &&
  15664. void 0 !== propKey$244 &&
  15665. !nextProps.hasOwnProperty(propKey$270) &&
  15666. setPropOnCustomElement(
  15667. domElement,
  15668. tag,
  15669. propKey$270,
  15670. void 0,
  15671. nextProps,
  15672. propKey$244
  15673. );
  15674. for (defaultChecked in nextProps)
  15675. (propKey$244 = nextProps[defaultChecked]),
  15676. (propKey = lastProps[defaultChecked]),
  15677. !nextProps.hasOwnProperty(defaultChecked) ||
  15678. propKey$244 === propKey ||
  15679. (void 0 === propKey$244 && void 0 === propKey) ||
  15680. setPropOnCustomElement(
  15681. domElement,
  15682. tag,
  15683. defaultChecked,
  15684. propKey$244,
  15685. nextProps,
  15686. propKey
  15687. );
  15688. return;
  15689. }
  15690. }
  15691. for (var propKey$275 in lastProps)
  15692. (propKey$244 = lastProps[propKey$275]),
  15693. lastProps.hasOwnProperty(propKey$275) &&
  15694. null != propKey$244 &&
  15695. !nextProps.hasOwnProperty(propKey$275) &&
  15696. setProp(domElement, tag, propKey$275, null, nextProps, propKey$244);
  15697. for (lastProp in nextProps)
  15698. (propKey$244 = nextProps[lastProp]),
  15699. (propKey = lastProps[lastProp]),
  15700. !nextProps.hasOwnProperty(lastProp) ||
  15701. propKey$244 === propKey ||
  15702. (null == propKey$244 && null == propKey) ||
  15703. setProp(domElement, tag, lastProp, propKey$244, nextProps, propKey);
  15704. }
  15705. function isLikelyStaticResource(initiatorType) {
  15706. switch (initiatorType) {
  15707. case "css":
  15708. case "script":
  15709. case "font":
  15710. case "img":
  15711. case "image":
  15712. case "input":
  15713. case "link":
  15714. return !0;
  15715. default:
  15716. return !1;
  15717. }
  15718. }
  15719. function estimateBandwidth() {
  15720. if ("function" === typeof performance.getEntriesByType) {
  15721. for (
  15722. var count = 0,
  15723. bits = 0,
  15724. resourceEntries = performance.getEntriesByType("resource"),
  15725. i = 0;
  15726. i < resourceEntries.length;
  15727. i++
  15728. ) {
  15729. var entry = resourceEntries[i],
  15730. transferSize = entry.transferSize,
  15731. initiatorType = entry.initiatorType,
  15732. duration = entry.duration;
  15733. if (transferSize && duration && isLikelyStaticResource(initiatorType)) {
  15734. initiatorType = 0;
  15735. duration = entry.responseEnd;
  15736. for (i += 1; i < resourceEntries.length; i++) {
  15737. var overlapEntry = resourceEntries[i],
  15738. overlapStartTime = overlapEntry.startTime;
  15739. if (overlapStartTime > duration) break;
  15740. var overlapTransferSize = overlapEntry.transferSize,
  15741. overlapInitiatorType = overlapEntry.initiatorType;
  15742. overlapTransferSize &&
  15743. isLikelyStaticResource(overlapInitiatorType) &&
  15744. ((overlapEntry = overlapEntry.responseEnd),
  15745. (initiatorType +=
  15746. overlapTransferSize *
  15747. (overlapEntry < duration
  15748. ? 1
  15749. : (duration - overlapStartTime) /
  15750. (overlapEntry - overlapStartTime))));
  15751. }
  15752. --i;
  15753. bits += (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);
  15754. count++;
  15755. if (10 < count) break;
  15756. }
  15757. }
  15758. if (0 < count) return bits / count / 1e6;
  15759. }
  15760. return navigator.connection &&
  15761. ((count = navigator.connection.downlink), "number" === typeof count)
  15762. ? count
  15763. : 5;
  15764. }
  15765. var eventsEnabled = null,
  15766. selectionInformation = null;
  15767. function getOwnerDocumentFromRootContainer(rootContainerElement) {
  15768. return 9 === rootContainerElement.nodeType
  15769. ? rootContainerElement
  15770. : rootContainerElement.ownerDocument;
  15771. }
  15772. function getOwnHostContext(namespaceURI) {
  15773. switch (namespaceURI) {
  15774. case "http://www.w3.org/2000/svg":
  15775. return 1;
  15776. case "http://www.w3.org/1998/Math/MathML":
  15777. return 2;
  15778. default:
  15779. return 0;
  15780. }
  15781. }
  15782. function getChildHostContextProd(parentNamespace, type) {
  15783. if (0 === parentNamespace)
  15784. switch (type) {
  15785. case "svg":
  15786. return 1;
  15787. case "math":
  15788. return 2;
  15789. default:
  15790. return 0;
  15791. }
  15792. return 1 === parentNamespace && "foreignObject" === type
  15793. ? 0
  15794. : parentNamespace;
  15795. }
  15796. function shouldSetTextContent(type, props) {
  15797. return (
  15798. "textarea" === type ||
  15799. "noscript" === type ||
  15800. "string" === typeof props.children ||
  15801. "number" === typeof props.children ||
  15802. "bigint" === typeof props.children ||
  15803. ("object" === typeof props.dangerouslySetInnerHTML &&
  15804. null !== props.dangerouslySetInnerHTML &&
  15805. null != props.dangerouslySetInnerHTML.__html)
  15806. );
  15807. }
  15808. var currentPopstateTransitionEvent = null;
  15809. function shouldAttemptEagerTransition() {
  15810. var event = window.event;
  15811. if (event && "popstate" === event.type) {
  15812. if (event === currentPopstateTransitionEvent) return !1;
  15813. currentPopstateTransitionEvent = event;
  15814. return !0;
  15815. }
  15816. currentPopstateTransitionEvent = null;
  15817. return !1;
  15818. }
  15819. var schedulerEvent = void 0;
  15820. function resolveEventType() {
  15821. var event = window.event;
  15822. return event && event !== schedulerEvent ? event.type : null;
  15823. }
  15824. function resolveEventTimeStamp() {
  15825. var event = window.event;
  15826. return event && event !== schedulerEvent ? event.timeStamp : -1.1;
  15827. }
  15828. var scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0,
  15829. cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0,
  15830. localPromise = "function" === typeof Promise ? Promise : void 0,
  15831. scheduleMicrotask =
  15832. "function" === typeof queueMicrotask
  15833. ? queueMicrotask
  15834. : "undefined" !== typeof localPromise
  15835. ? function (callback) {
  15836. return localPromise
  15837. .resolve(null)
  15838. .then(callback)
  15839. .catch(handleErrorInNextTick);
  15840. }
  15841. : scheduleTimeout;
  15842. function handleErrorInNextTick(error) {
  15843. setTimeout(function () {
  15844. throw error;
  15845. });
  15846. }
  15847. function isSingletonScope(type) {
  15848. return "head" === type;
  15849. }
  15850. function clearHydrationBoundary(parentInstance, hydrationInstance) {
  15851. var node = hydrationInstance,
  15852. depth = 0;
  15853. do {
  15854. var nextNode = node.nextSibling;
  15855. parentInstance.removeChild(node);
  15856. if (nextNode && 8 === nextNode.nodeType)
  15857. if (((node = nextNode.data), "/$" === node || "/&" === node)) {
  15858. if (0 === depth) {
  15859. parentInstance.removeChild(nextNode);
  15860. retryIfBlockedOn(hydrationInstance);
  15861. return;
  15862. }
  15863. depth--;
  15864. } else if (
  15865. "$" === node ||
  15866. "$?" === node ||
  15867. "$~" === node ||
  15868. "$!" === node ||
  15869. "&" === node
  15870. )
  15871. depth++;
  15872. else if ("html" === node)
  15873. releaseSingletonInstance(parentInstance.ownerDocument.documentElement);
  15874. else if ("head" === node) {
  15875. node = parentInstance.ownerDocument.head;
  15876. releaseSingletonInstance(node);
  15877. for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
  15878. var nextNode$jscomp$0 = node$jscomp$0.nextSibling,
  15879. nodeName = node$jscomp$0.nodeName;
  15880. node$jscomp$0[internalHoistableMarker] ||
  15881. "SCRIPT" === nodeName ||
  15882. "STYLE" === nodeName ||
  15883. ("LINK" === nodeName &&
  15884. "stylesheet" === node$jscomp$0.rel.toLowerCase()) ||
  15885. node.removeChild(node$jscomp$0);
  15886. node$jscomp$0 = nextNode$jscomp$0;
  15887. }
  15888. } else
  15889. "body" === node &&
  15890. releaseSingletonInstance(parentInstance.ownerDocument.body);
  15891. node = nextNode;
  15892. } while (node);
  15893. retryIfBlockedOn(hydrationInstance);
  15894. }
  15895. function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
  15896. var node = suspenseInstance;
  15897. suspenseInstance = 0;
  15898. do {
  15899. var nextNode = node.nextSibling;
  15900. 1 === node.nodeType
  15901. ? isHidden
  15902. ? ((node._stashedDisplay = node.style.display),
  15903. (node.style.display = "none"))
  15904. : ((node.style.display = node._stashedDisplay || ""),
  15905. "" === node.getAttribute("style") && node.removeAttribute("style"))
  15906. : 3 === node.nodeType &&
  15907. (isHidden
  15908. ? ((node._stashedText = node.nodeValue), (node.nodeValue = ""))
  15909. : (node.nodeValue = node._stashedText || ""));
  15910. if (nextNode && 8 === nextNode.nodeType)
  15911. if (((node = nextNode.data), "/$" === node))
  15912. if (0 === suspenseInstance) break;
  15913. else suspenseInstance--;
  15914. else
  15915. ("$" !== node && "$?" !== node && "$~" !== node && "$!" !== node) ||
  15916. suspenseInstance++;
  15917. node = nextNode;
  15918. } while (node);
  15919. }
  15920. function clearContainerSparingly(container) {
  15921. var nextNode = container.firstChild;
  15922. nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
  15923. for (; nextNode; ) {
  15924. var node = nextNode;
  15925. nextNode = nextNode.nextSibling;
  15926. switch (node.nodeName) {
  15927. case "HTML":
  15928. case "HEAD":
  15929. case "BODY":
  15930. clearContainerSparingly(node);
  15931. detachDeletedInstance(node);
  15932. continue;
  15933. case "SCRIPT":
  15934. case "STYLE":
  15935. continue;
  15936. case "LINK":
  15937. if ("stylesheet" === node.rel.toLowerCase()) continue;
  15938. }
  15939. container.removeChild(node);
  15940. }
  15941. }
  15942. function canHydrateInstance(instance, type, props, inRootOrSingleton) {
  15943. for (; 1 === instance.nodeType; ) {
  15944. var anyProps = props;
  15945. if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
  15946. if (
  15947. !inRootOrSingleton &&
  15948. ("INPUT" !== instance.nodeName || "hidden" !== instance.type)
  15949. )
  15950. break;
  15951. } else if (!inRootOrSingleton)
  15952. if ("input" === type && "hidden" === instance.type) {
  15953. var name = null == anyProps.name ? null : "" + anyProps.name;
  15954. if (
  15955. "hidden" === anyProps.type &&
  15956. instance.getAttribute("name") === name
  15957. )
  15958. return instance;
  15959. } else return instance;
  15960. else if (!instance[internalHoistableMarker])
  15961. switch (type) {
  15962. case "meta":
  15963. if (!instance.hasAttribute("itemprop")) break;
  15964. return instance;
  15965. case "link":
  15966. name = instance.getAttribute("rel");
  15967. if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
  15968. break;
  15969. else if (
  15970. name !== anyProps.rel ||
  15971. instance.getAttribute("href") !==
  15972. (null == anyProps.href || "" === anyProps.href
  15973. ? null
  15974. : anyProps.href) ||
  15975. instance.getAttribute("crossorigin") !==
  15976. (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
  15977. instance.getAttribute("title") !==
  15978. (null == anyProps.title ? null : anyProps.title)
  15979. )
  15980. break;
  15981. return instance;
  15982. case "style":
  15983. if (instance.hasAttribute("data-precedence")) break;
  15984. return instance;
  15985. case "script":
  15986. name = instance.getAttribute("src");
  15987. if (
  15988. (name !== (null == anyProps.src ? null : anyProps.src) ||
  15989. instance.getAttribute("type") !==
  15990. (null == anyProps.type ? null : anyProps.type) ||
  15991. instance.getAttribute("crossorigin") !==
  15992. (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&
  15993. name &&
  15994. instance.hasAttribute("async") &&
  15995. !instance.hasAttribute("itemprop")
  15996. )
  15997. break;
  15998. return instance;
  15999. default:
  16000. return instance;
  16001. }
  16002. instance = getNextHydratable(instance.nextSibling);
  16003. if (null === instance) break;
  16004. }
  16005. return null;
  16006. }
  16007. function canHydrateTextInstance(instance, text, inRootOrSingleton) {
  16008. if ("" === text) return null;
  16009. for (; 3 !== instance.nodeType; ) {
  16010. if (
  16011. (1 !== instance.nodeType ||
  16012. "INPUT" !== instance.nodeName ||
  16013. "hidden" !== instance.type) &&
  16014. !inRootOrSingleton
  16015. )
  16016. return null;
  16017. instance = getNextHydratable(instance.nextSibling);
  16018. if (null === instance) return null;
  16019. }
  16020. return instance;
  16021. }
  16022. function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
  16023. for (; 8 !== instance.nodeType; ) {
  16024. if (
  16025. (1 !== instance.nodeType ||
  16026. "INPUT" !== instance.nodeName ||
  16027. "hidden" !== instance.type) &&
  16028. !inRootOrSingleton
  16029. )
  16030. return null;
  16031. instance = getNextHydratable(instance.nextSibling);
  16032. if (null === instance) return null;
  16033. }
  16034. return instance;
  16035. }
  16036. function isSuspenseInstancePending(instance) {
  16037. return "$?" === instance.data || "$~" === instance.data;
  16038. }
  16039. function isSuspenseInstanceFallback(instance) {
  16040. return (
  16041. "$!" === instance.data ||
  16042. ("$?" === instance.data && "loading" !== instance.ownerDocument.readyState)
  16043. );
  16044. }
  16045. function registerSuspenseInstanceRetry(instance, callback) {
  16046. var ownerDocument = instance.ownerDocument;
  16047. if ("$~" === instance.data) instance._reactRetry = callback;
  16048. else if ("$?" !== instance.data || "loading" !== ownerDocument.readyState)
  16049. callback();
  16050. else {
  16051. var listener = function () {
  16052. callback();
  16053. ownerDocument.removeEventListener("DOMContentLoaded", listener);
  16054. };
  16055. ownerDocument.addEventListener("DOMContentLoaded", listener);
  16056. instance._reactRetry = listener;
  16057. }
  16058. }
  16059. function getNextHydratable(node) {
  16060. for (; null != node; node = node.nextSibling) {
  16061. var nodeType = node.nodeType;
  16062. if (1 === nodeType || 3 === nodeType) break;
  16063. if (8 === nodeType) {
  16064. nodeType = node.data;
  16065. if (
  16066. "$" === nodeType ||
  16067. "$!" === nodeType ||
  16068. "$?" === nodeType ||
  16069. "$~" === nodeType ||
  16070. "&" === nodeType ||
  16071. "F!" === nodeType ||
  16072. "F" === nodeType
  16073. )
  16074. break;
  16075. if ("/$" === nodeType || "/&" === nodeType) return null;
  16076. }
  16077. }
  16078. return node;
  16079. }
  16080. var previousHydratableOnEnteringScopedSingleton = null;
  16081. function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {
  16082. hydrationInstance = hydrationInstance.nextSibling;
  16083. for (var depth = 0; hydrationInstance; ) {
  16084. if (8 === hydrationInstance.nodeType) {
  16085. var data = hydrationInstance.data;
  16086. if ("/$" === data || "/&" === data) {
  16087. if (0 === depth)
  16088. return getNextHydratable(hydrationInstance.nextSibling);
  16089. depth--;
  16090. } else
  16091. ("$" !== data &&
  16092. "$!" !== data &&
  16093. "$?" !== data &&
  16094. "$~" !== data &&
  16095. "&" !== data) ||
  16096. depth++;
  16097. }
  16098. hydrationInstance = hydrationInstance.nextSibling;
  16099. }
  16100. return null;
  16101. }
  16102. function getParentHydrationBoundary(targetInstance) {
  16103. targetInstance = targetInstance.previousSibling;
  16104. for (var depth = 0; targetInstance; ) {
  16105. if (8 === targetInstance.nodeType) {
  16106. var data = targetInstance.data;
  16107. if (
  16108. "$" === data ||
  16109. "$!" === data ||
  16110. "$?" === data ||
  16111. "$~" === data ||
  16112. "&" === data
  16113. ) {
  16114. if (0 === depth) return targetInstance;
  16115. depth--;
  16116. } else ("/$" !== data && "/&" !== data) || depth++;
  16117. }
  16118. targetInstance = targetInstance.previousSibling;
  16119. }
  16120. return null;
  16121. }
  16122. function resolveSingletonInstance(type, props, rootContainerInstance) {
  16123. props = getOwnerDocumentFromRootContainer(rootContainerInstance);
  16124. switch (type) {
  16125. case "html":
  16126. type = props.documentElement;
  16127. if (!type) throw Error(formatProdErrorMessage(452));
  16128. return type;
  16129. case "head":
  16130. type = props.head;
  16131. if (!type) throw Error(formatProdErrorMessage(453));
  16132. return type;
  16133. case "body":
  16134. type = props.body;
  16135. if (!type) throw Error(formatProdErrorMessage(454));
  16136. return type;
  16137. default:
  16138. throw Error(formatProdErrorMessage(451));
  16139. }
  16140. }
  16141. function releaseSingletonInstance(instance) {
  16142. for (var attributes = instance.attributes; attributes.length; )
  16143. instance.removeAttributeNode(attributes[0]);
  16144. detachDeletedInstance(instance);
  16145. }
  16146. var preloadPropsMap = new Map(),
  16147. preconnectsSet = new Set();
  16148. function getHoistableRoot(container) {
  16149. return "function" === typeof container.getRootNode
  16150. ? container.getRootNode()
  16151. : 9 === container.nodeType
  16152. ? container
  16153. : container.ownerDocument;
  16154. }
  16155. var previousDispatcher = ReactDOMSharedInternals.d;
  16156. ReactDOMSharedInternals.d = {
  16157. f: flushSyncWork,
  16158. r: requestFormReset$1,
  16159. D: prefetchDNS$1,
  16160. C: preconnect$1,
  16161. L: preload$1,
  16162. m: preloadModule$1,
  16163. X: preinitScript,
  16164. S: preinitStyle,
  16165. M: preinitModuleScript
  16166. };
  16167. function flushSyncWork() {
  16168. var previousWasRendering = previousDispatcher.f(),
  16169. wasRendering = flushSyncWork$1();
  16170. return previousWasRendering || wasRendering;
  16171. }
  16172. function requestFormReset$1(form) {
  16173. var formInst = getInstanceFromNode(form);
  16174. null !== formInst && 5 === formInst.tag && "form" === formInst.type
  16175. ? requestFormReset$2(formInst)
  16176. : previousDispatcher.r(form);
  16177. }
  16178. var globalDocument = "undefined" === typeof document ? null : document;
  16179. function preconnectAs(rel, href, crossOrigin) {
  16180. var ownerDocument = globalDocument;
  16181. if (ownerDocument && "string" === typeof href && href) {
  16182. var limitedEscapedHref =
  16183. escapeSelectorAttributeValueInsideDoubleQuotes(href);
  16184. limitedEscapedHref =
  16185. 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
  16186. "string" === typeof crossOrigin &&
  16187. (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
  16188. preconnectsSet.has(limitedEscapedHref) ||
  16189. (preconnectsSet.add(limitedEscapedHref),
  16190. (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),
  16191. null === ownerDocument.querySelector(limitedEscapedHref) &&
  16192. ((href = ownerDocument.createElement("link")),
  16193. setInitialProperties(href, "link", rel),
  16194. markNodeAsHoistable(href),
  16195. ownerDocument.head.appendChild(href)));
  16196. }
  16197. }
  16198. function prefetchDNS$1(href) {
  16199. previousDispatcher.D(href);
  16200. preconnectAs("dns-prefetch", href, null);
  16201. }
  16202. function preconnect$1(href, crossOrigin) {
  16203. previousDispatcher.C(href, crossOrigin);
  16204. preconnectAs("preconnect", href, crossOrigin);
  16205. }
  16206. function preload$1(href, as, options) {
  16207. previousDispatcher.L(href, as, options);
  16208. var ownerDocument = globalDocument;
  16209. if (ownerDocument && href && as) {
  16210. var preloadSelector =
  16211. 'link[rel="preload"][as="' +
  16212. escapeSelectorAttributeValueInsideDoubleQuotes(as) +
  16213. '"]';
  16214. "image" === as
  16215. ? options && options.imageSrcSet
  16216. ? ((preloadSelector +=
  16217. '[imagesrcset="' +
  16218. escapeSelectorAttributeValueInsideDoubleQuotes(
  16219. options.imageSrcSet
  16220. ) +
  16221. '"]'),
  16222. "string" === typeof options.imageSizes &&
  16223. (preloadSelector +=
  16224. '[imagesizes="' +
  16225. escapeSelectorAttributeValueInsideDoubleQuotes(
  16226. options.imageSizes
  16227. ) +
  16228. '"]'))
  16229. : (preloadSelector +=
  16230. '[href="' +
  16231. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  16232. '"]')
  16233. : (preloadSelector +=
  16234. '[href="' +
  16235. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  16236. '"]');
  16237. var key = preloadSelector;
  16238. switch (as) {
  16239. case "style":
  16240. key = getStyleKey(href);
  16241. break;
  16242. case "script":
  16243. key = getScriptKey(href);
  16244. }
  16245. preloadPropsMap.has(key) ||
  16246. ((href = assign(
  16247. {
  16248. rel: "preload",
  16249. href:
  16250. "image" === as && options && options.imageSrcSet ? void 0 : href,
  16251. as: as
  16252. },
  16253. options
  16254. )),
  16255. preloadPropsMap.set(key, href),
  16256. null !== ownerDocument.querySelector(preloadSelector) ||
  16257. ("style" === as &&
  16258. ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||
  16259. ("script" === as &&
  16260. ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||
  16261. ((as = ownerDocument.createElement("link")),
  16262. setInitialProperties(as, "link", href),
  16263. markNodeAsHoistable(as),
  16264. ownerDocument.head.appendChild(as)));
  16265. }
  16266. }
  16267. function preloadModule$1(href, options) {
  16268. previousDispatcher.m(href, options);
  16269. var ownerDocument = globalDocument;
  16270. if (ownerDocument && href) {
  16271. var as = options && "string" === typeof options.as ? options.as : "script",
  16272. preloadSelector =
  16273. 'link[rel="modulepreload"][as="' +
  16274. escapeSelectorAttributeValueInsideDoubleQuotes(as) +
  16275. '"][href="' +
  16276. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  16277. '"]',
  16278. key = preloadSelector;
  16279. switch (as) {
  16280. case "audioworklet":
  16281. case "paintworklet":
  16282. case "serviceworker":
  16283. case "sharedworker":
  16284. case "worker":
  16285. case "script":
  16286. key = getScriptKey(href);
  16287. }
  16288. if (
  16289. !preloadPropsMap.has(key) &&
  16290. ((href = assign({ rel: "modulepreload", href: href }, options)),
  16291. preloadPropsMap.set(key, href),
  16292. null === ownerDocument.querySelector(preloadSelector))
  16293. ) {
  16294. switch (as) {
  16295. case "audioworklet":
  16296. case "paintworklet":
  16297. case "serviceworker":
  16298. case "sharedworker":
  16299. case "worker":
  16300. case "script":
  16301. if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
  16302. return;
  16303. }
  16304. as = ownerDocument.createElement("link");
  16305. setInitialProperties(as, "link", href);
  16306. markNodeAsHoistable(as);
  16307. ownerDocument.head.appendChild(as);
  16308. }
  16309. }
  16310. }
  16311. function preinitStyle(href, precedence, options) {
  16312. previousDispatcher.S(href, precedence, options);
  16313. var ownerDocument = globalDocument;
  16314. if (ownerDocument && href) {
  16315. var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,
  16316. key = getStyleKey(href);
  16317. precedence = precedence || "default";
  16318. var resource = styles.get(key);
  16319. if (!resource) {
  16320. var state = { loading: 0, preload: null };
  16321. if (
  16322. (resource = ownerDocument.querySelector(
  16323. getStylesheetSelectorFromKey(key)
  16324. ))
  16325. )
  16326. state.loading = 5;
  16327. else {
  16328. href = assign(
  16329. { rel: "stylesheet", href: href, "data-precedence": precedence },
  16330. options
  16331. );
  16332. (options = preloadPropsMap.get(key)) &&
  16333. adoptPreloadPropsForStylesheet(href, options);
  16334. var link = (resource = ownerDocument.createElement("link"));
  16335. markNodeAsHoistable(link);
  16336. setInitialProperties(link, "link", href);
  16337. link._p = new Promise(function (resolve, reject) {
  16338. link.onload = resolve;
  16339. link.onerror = reject;
  16340. });
  16341. link.addEventListener("load", function () {
  16342. state.loading |= 1;
  16343. });
  16344. link.addEventListener("error", function () {
  16345. state.loading |= 2;
  16346. });
  16347. state.loading |= 4;
  16348. insertStylesheet(resource, precedence, ownerDocument);
  16349. }
  16350. resource = {
  16351. type: "stylesheet",
  16352. instance: resource,
  16353. count: 1,
  16354. state: state
  16355. };
  16356. styles.set(key, resource);
  16357. }
  16358. }
  16359. }
  16360. function preinitScript(src, options) {
  16361. previousDispatcher.X(src, options);
  16362. var ownerDocument = globalDocument;
  16363. if (ownerDocument && src) {
  16364. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
  16365. key = getScriptKey(src),
  16366. resource = scripts.get(key);
  16367. resource ||
  16368. ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
  16369. resource ||
  16370. ((src = assign({ src: src, async: !0 }, options)),
  16371. (options = preloadPropsMap.get(key)) &&
  16372. adoptPreloadPropsForScript(src, options),
  16373. (resource = ownerDocument.createElement("script")),
  16374. markNodeAsHoistable(resource),
  16375. setInitialProperties(resource, "link", src),
  16376. ownerDocument.head.appendChild(resource)),
  16377. (resource = {
  16378. type: "script",
  16379. instance: resource,
  16380. count: 1,
  16381. state: null
  16382. }),
  16383. scripts.set(key, resource));
  16384. }
  16385. }
  16386. function preinitModuleScript(src, options) {
  16387. previousDispatcher.M(src, options);
  16388. var ownerDocument = globalDocument;
  16389. if (ownerDocument && src) {
  16390. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
  16391. key = getScriptKey(src),
  16392. resource = scripts.get(key);
  16393. resource ||
  16394. ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
  16395. resource ||
  16396. ((src = assign({ src: src, async: !0, type: "module" }, options)),
  16397. (options = preloadPropsMap.get(key)) &&
  16398. adoptPreloadPropsForScript(src, options),
  16399. (resource = ownerDocument.createElement("script")),
  16400. markNodeAsHoistable(resource),
  16401. setInitialProperties(resource, "link", src),
  16402. ownerDocument.head.appendChild(resource)),
  16403. (resource = {
  16404. type: "script",
  16405. instance: resource,
  16406. count: 1,
  16407. state: null
  16408. }),
  16409. scripts.set(key, resource));
  16410. }
  16411. }
  16412. function getResource(type, currentProps, pendingProps, currentResource) {
  16413. var JSCompiler_inline_result = (JSCompiler_inline_result =
  16414. rootInstanceStackCursor.current)
  16415. ? getHoistableRoot(JSCompiler_inline_result)
  16416. : null;
  16417. if (!JSCompiler_inline_result) throw Error(formatProdErrorMessage(446));
  16418. switch (type) {
  16419. case "meta":
  16420. case "title":
  16421. return null;
  16422. case "style":
  16423. return "string" === typeof pendingProps.precedence &&
  16424. "string" === typeof pendingProps.href
  16425. ? ((currentProps = getStyleKey(pendingProps.href)),
  16426. (pendingProps = getResourcesFromRoot(
  16427. JSCompiler_inline_result
  16428. ).hoistableStyles),
  16429. (currentResource = pendingProps.get(currentProps)),
  16430. currentResource ||
  16431. ((currentResource = {
  16432. type: "style",
  16433. instance: null,
  16434. count: 0,
  16435. state: null
  16436. }),
  16437. pendingProps.set(currentProps, currentResource)),
  16438. currentResource)
  16439. : { type: "void", instance: null, count: 0, state: null };
  16440. case "link":
  16441. if (
  16442. "stylesheet" === pendingProps.rel &&
  16443. "string" === typeof pendingProps.href &&
  16444. "string" === typeof pendingProps.precedence
  16445. ) {
  16446. type = getStyleKey(pendingProps.href);
  16447. var styles$286 = getResourcesFromRoot(
  16448. JSCompiler_inline_result
  16449. ).hoistableStyles,
  16450. resource$287 = styles$286.get(type);
  16451. resource$287 ||
  16452. ((JSCompiler_inline_result =
  16453. JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result),
  16454. (resource$287 = {
  16455. type: "stylesheet",
  16456. instance: null,
  16457. count: 0,
  16458. state: { loading: 0, preload: null }
  16459. }),
  16460. styles$286.set(type, resource$287),
  16461. (styles$286 = JSCompiler_inline_result.querySelector(
  16462. getStylesheetSelectorFromKey(type)
  16463. )) &&
  16464. !styles$286._p &&
  16465. ((resource$287.instance = styles$286),
  16466. (resource$287.state.loading = 5)),
  16467. preloadPropsMap.has(type) ||
  16468. ((pendingProps = {
  16469. rel: "preload",
  16470. as: "style",
  16471. href: pendingProps.href,
  16472. crossOrigin: pendingProps.crossOrigin,
  16473. integrity: pendingProps.integrity,
  16474. media: pendingProps.media,
  16475. hrefLang: pendingProps.hrefLang,
  16476. referrerPolicy: pendingProps.referrerPolicy
  16477. }),
  16478. preloadPropsMap.set(type, pendingProps),
  16479. styles$286 ||
  16480. preloadStylesheet(
  16481. JSCompiler_inline_result,
  16482. type,
  16483. pendingProps,
  16484. resource$287.state
  16485. )));
  16486. if (currentProps && null === currentResource)
  16487. throw Error(formatProdErrorMessage(528, ""));
  16488. return resource$287;
  16489. }
  16490. if (currentProps && null !== currentResource)
  16491. throw Error(formatProdErrorMessage(529, ""));
  16492. return null;
  16493. case "script":
  16494. return (
  16495. (currentProps = pendingProps.async),
  16496. (pendingProps = pendingProps.src),
  16497. "string" === typeof pendingProps &&
  16498. currentProps &&
  16499. "function" !== typeof currentProps &&
  16500. "symbol" !== typeof currentProps
  16501. ? ((currentProps = getScriptKey(pendingProps)),
  16502. (pendingProps = getResourcesFromRoot(
  16503. JSCompiler_inline_result
  16504. ).hoistableScripts),
  16505. (currentResource = pendingProps.get(currentProps)),
  16506. currentResource ||
  16507. ((currentResource = {
  16508. type: "script",
  16509. instance: null,
  16510. count: 0,
  16511. state: null
  16512. }),
  16513. pendingProps.set(currentProps, currentResource)),
  16514. currentResource)
  16515. : { type: "void", instance: null, count: 0, state: null }
  16516. );
  16517. default:
  16518. throw Error(formatProdErrorMessage(444, type));
  16519. }
  16520. }
  16521. function getStyleKey(href) {
  16522. return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
  16523. }
  16524. function getStylesheetSelectorFromKey(key) {
  16525. return 'link[rel="stylesheet"][' + key + "]";
  16526. }
  16527. function stylesheetPropsFromRawProps(rawProps) {
  16528. return assign({}, rawProps, {
  16529. "data-precedence": rawProps.precedence,
  16530. precedence: null
  16531. });
  16532. }
  16533. function preloadStylesheet(ownerDocument, key, preloadProps, state) {
  16534. ownerDocument.querySelector('link[rel="preload"][as="style"][' + key + "]")
  16535. ? (state.loading = 1)
  16536. : ((key = ownerDocument.createElement("link")),
  16537. (state.preload = key),
  16538. key.addEventListener("load", function () {
  16539. return (state.loading |= 1);
  16540. }),
  16541. key.addEventListener("error", function () {
  16542. return (state.loading |= 2);
  16543. }),
  16544. setInitialProperties(key, "link", preloadProps),
  16545. markNodeAsHoistable(key),
  16546. ownerDocument.head.appendChild(key));
  16547. }
  16548. function getScriptKey(src) {
  16549. return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
  16550. }
  16551. function getScriptSelectorFromKey(key) {
  16552. return "script[async]" + key;
  16553. }
  16554. function acquireResource(hoistableRoot, resource, props) {
  16555. resource.count++;
  16556. if (null === resource.instance)
  16557. switch (resource.type) {
  16558. case "style":
  16559. var instance = hoistableRoot.querySelector(
  16560. 'style[data-href~="' +
  16561. escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +
  16562. '"]'
  16563. );
  16564. if (instance)
  16565. return (
  16566. (resource.instance = instance),
  16567. markNodeAsHoistable(instance),
  16568. instance
  16569. );
  16570. var styleProps = assign({}, props, {
  16571. "data-href": props.href,
  16572. "data-precedence": props.precedence,
  16573. href: null,
  16574. precedence: null
  16575. });
  16576. instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(
  16577. "style"
  16578. );
  16579. markNodeAsHoistable(instance);
  16580. setInitialProperties(instance, "style", styleProps);
  16581. insertStylesheet(instance, props.precedence, hoistableRoot);
  16582. return (resource.instance = instance);
  16583. case "stylesheet":
  16584. styleProps = getStyleKey(props.href);
  16585. var instance$292 = hoistableRoot.querySelector(
  16586. getStylesheetSelectorFromKey(styleProps)
  16587. );
  16588. if (instance$292)
  16589. return (
  16590. (resource.state.loading |= 4),
  16591. (resource.instance = instance$292),
  16592. markNodeAsHoistable(instance$292),
  16593. instance$292
  16594. );
  16595. instance = stylesheetPropsFromRawProps(props);
  16596. (styleProps = preloadPropsMap.get(styleProps)) &&
  16597. adoptPreloadPropsForStylesheet(instance, styleProps);
  16598. instance$292 = (
  16599. hoistableRoot.ownerDocument || hoistableRoot
  16600. ).createElement("link");
  16601. markNodeAsHoistable(instance$292);
  16602. var linkInstance = instance$292;
  16603. linkInstance._p = new Promise(function (resolve, reject) {
  16604. linkInstance.onload = resolve;
  16605. linkInstance.onerror = reject;
  16606. });
  16607. setInitialProperties(instance$292, "link", instance);
  16608. resource.state.loading |= 4;
  16609. insertStylesheet(instance$292, props.precedence, hoistableRoot);
  16610. return (resource.instance = instance$292);
  16611. case "script":
  16612. instance$292 = getScriptKey(props.src);
  16613. if (
  16614. (styleProps = hoistableRoot.querySelector(
  16615. getScriptSelectorFromKey(instance$292)
  16616. ))
  16617. )
  16618. return (
  16619. (resource.instance = styleProps),
  16620. markNodeAsHoistable(styleProps),
  16621. styleProps
  16622. );
  16623. instance = props;
  16624. if ((styleProps = preloadPropsMap.get(instance$292)))
  16625. (instance = assign({}, props)),
  16626. adoptPreloadPropsForScript(instance, styleProps);
  16627. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  16628. styleProps = hoistableRoot.createElement("script");
  16629. markNodeAsHoistable(styleProps);
  16630. setInitialProperties(styleProps, "link", instance);
  16631. hoistableRoot.head.appendChild(styleProps);
  16632. return (resource.instance = styleProps);
  16633. case "void":
  16634. return null;
  16635. default:
  16636. throw Error(formatProdErrorMessage(443, resource.type));
  16637. }
  16638. else
  16639. "stylesheet" === resource.type &&
  16640. 0 === (resource.state.loading & 4) &&
  16641. ((instance = resource.instance),
  16642. (resource.state.loading |= 4),
  16643. insertStylesheet(instance, props.precedence, hoistableRoot));
  16644. return resource.instance;
  16645. }
  16646. function insertStylesheet(instance, precedence, root) {
  16647. for (
  16648. var nodes = root.querySelectorAll(
  16649. 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
  16650. ),
  16651. last = nodes.length ? nodes[nodes.length - 1] : null,
  16652. prior = last,
  16653. i = 0;
  16654. i < nodes.length;
  16655. i++
  16656. ) {
  16657. var node = nodes[i];
  16658. if (node.dataset.precedence === precedence) prior = node;
  16659. else if (prior !== last) break;
  16660. }
  16661. prior
  16662. ? prior.parentNode.insertBefore(instance, prior.nextSibling)
  16663. : ((precedence = 9 === root.nodeType ? root.head : root),
  16664. precedence.insertBefore(instance, precedence.firstChild));
  16665. }
  16666. function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
  16667. null == stylesheetProps.crossOrigin &&
  16668. (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
  16669. null == stylesheetProps.referrerPolicy &&
  16670. (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
  16671. null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
  16672. }
  16673. function adoptPreloadPropsForScript(scriptProps, preloadProps) {
  16674. null == scriptProps.crossOrigin &&
  16675. (scriptProps.crossOrigin = preloadProps.crossOrigin);
  16676. null == scriptProps.referrerPolicy &&
  16677. (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
  16678. null == scriptProps.integrity &&
  16679. (scriptProps.integrity = preloadProps.integrity);
  16680. }
  16681. var tagCaches = null;
  16682. function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
  16683. if (null === tagCaches) {
  16684. var cache = new Map();
  16685. var caches = (tagCaches = new Map());
  16686. caches.set(ownerDocument, cache);
  16687. } else
  16688. (caches = tagCaches),
  16689. (cache = caches.get(ownerDocument)),
  16690. cache || ((cache = new Map()), caches.set(ownerDocument, cache));
  16691. if (cache.has(type)) return cache;
  16692. cache.set(type, null);
  16693. ownerDocument = ownerDocument.getElementsByTagName(type);
  16694. for (caches = 0; caches < ownerDocument.length; caches++) {
  16695. var node = ownerDocument[caches];
  16696. if (
  16697. !(
  16698. node[internalHoistableMarker] ||
  16699. node[internalInstanceKey] ||
  16700. ("link" === type && "stylesheet" === node.getAttribute("rel"))
  16701. ) &&
  16702. "http://www.w3.org/2000/svg" !== node.namespaceURI
  16703. ) {
  16704. var nodeKey = node.getAttribute(keyAttribute) || "";
  16705. nodeKey = type + nodeKey;
  16706. var existing = cache.get(nodeKey);
  16707. existing ? existing.push(node) : cache.set(nodeKey, [node]);
  16708. }
  16709. }
  16710. return cache;
  16711. }
  16712. function mountHoistable(hoistableRoot, type, instance) {
  16713. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  16714. hoistableRoot.head.insertBefore(
  16715. instance,
  16716. "title" === type ? hoistableRoot.querySelector("head > title") : null
  16717. );
  16718. }
  16719. function isHostHoistableType(type, props, hostContext) {
  16720. if (1 === hostContext || null != props.itemProp) return !1;
  16721. switch (type) {
  16722. case "meta":
  16723. case "title":
  16724. return !0;
  16725. case "style":
  16726. if (
  16727. "string" !== typeof props.precedence ||
  16728. "string" !== typeof props.href ||
  16729. "" === props.href
  16730. )
  16731. break;
  16732. return !0;
  16733. case "link":
  16734. if (
  16735. "string" !== typeof props.rel ||
  16736. "string" !== typeof props.href ||
  16737. "" === props.href ||
  16738. props.onLoad ||
  16739. props.onError
  16740. )
  16741. break;
  16742. switch (props.rel) {
  16743. case "stylesheet":
  16744. return (
  16745. (type = props.disabled),
  16746. "string" === typeof props.precedence && null == type
  16747. );
  16748. default:
  16749. return !0;
  16750. }
  16751. case "script":
  16752. if (
  16753. props.async &&
  16754. "function" !== typeof props.async &&
  16755. "symbol" !== typeof props.async &&
  16756. !props.onLoad &&
  16757. !props.onError &&
  16758. props.src &&
  16759. "string" === typeof props.src
  16760. )
  16761. return !0;
  16762. }
  16763. return !1;
  16764. }
  16765. function preloadResource(resource) {
  16766. return "stylesheet" === resource.type && 0 === (resource.state.loading & 3)
  16767. ? !1
  16768. : !0;
  16769. }
  16770. function suspendResource(state, hoistableRoot, resource, props) {
  16771. if (
  16772. "stylesheet" === resource.type &&
  16773. ("string" !== typeof props.media ||
  16774. !1 !== matchMedia(props.media).matches) &&
  16775. 0 === (resource.state.loading & 4)
  16776. ) {
  16777. if (null === resource.instance) {
  16778. var key = getStyleKey(props.href),
  16779. instance = hoistableRoot.querySelector(
  16780. getStylesheetSelectorFromKey(key)
  16781. );
  16782. if (instance) {
  16783. hoistableRoot = instance._p;
  16784. null !== hoistableRoot &&
  16785. "object" === typeof hoistableRoot &&
  16786. "function" === typeof hoistableRoot.then &&
  16787. (state.count++,
  16788. (state = onUnsuspend.bind(state)),
  16789. hoistableRoot.then(state, state));
  16790. resource.state.loading |= 4;
  16791. resource.instance = instance;
  16792. markNodeAsHoistable(instance);
  16793. return;
  16794. }
  16795. instance = hoistableRoot.ownerDocument || hoistableRoot;
  16796. props = stylesheetPropsFromRawProps(props);
  16797. (key = preloadPropsMap.get(key)) &&
  16798. adoptPreloadPropsForStylesheet(props, key);
  16799. instance = instance.createElement("link");
  16800. markNodeAsHoistable(instance);
  16801. var linkInstance = instance;
  16802. linkInstance._p = new Promise(function (resolve, reject) {
  16803. linkInstance.onload = resolve;
  16804. linkInstance.onerror = reject;
  16805. });
  16806. setInitialProperties(instance, "link", props);
  16807. resource.instance = instance;
  16808. }
  16809. null === state.stylesheets && (state.stylesheets = new Map());
  16810. state.stylesheets.set(resource, hoistableRoot);
  16811. (hoistableRoot = resource.state.preload) &&
  16812. 0 === (resource.state.loading & 3) &&
  16813. (state.count++,
  16814. (resource = onUnsuspend.bind(state)),
  16815. hoistableRoot.addEventListener("load", resource),
  16816. hoistableRoot.addEventListener("error", resource));
  16817. }
  16818. }
  16819. var estimatedBytesWithinLimit = 0;
  16820. function waitForCommitToBeReady(state, timeoutOffset) {
  16821. state.stylesheets &&
  16822. 0 === state.count &&
  16823. insertSuspendedStylesheets(state, state.stylesheets);
  16824. return 0 < state.count || 0 < state.imgCount
  16825. ? function (commit) {
  16826. var stylesheetTimer = setTimeout(function () {
  16827. state.stylesheets &&
  16828. insertSuspendedStylesheets(state, state.stylesheets);
  16829. if (state.unsuspend) {
  16830. var unsuspend = state.unsuspend;
  16831. state.unsuspend = null;
  16832. unsuspend();
  16833. }
  16834. }, 6e4 + timeoutOffset);
  16835. 0 < state.imgBytes &&
  16836. 0 === estimatedBytesWithinLimit &&
  16837. (estimatedBytesWithinLimit = 62500 * estimateBandwidth());
  16838. var imgTimer = setTimeout(
  16839. function () {
  16840. state.waitingForImages = !1;
  16841. if (
  16842. 0 === state.count &&
  16843. (state.stylesheets &&
  16844. insertSuspendedStylesheets(state, state.stylesheets),
  16845. state.unsuspend)
  16846. ) {
  16847. var unsuspend = state.unsuspend;
  16848. state.unsuspend = null;
  16849. unsuspend();
  16850. }
  16851. },
  16852. (state.imgBytes > estimatedBytesWithinLimit ? 50 : 800) +
  16853. timeoutOffset
  16854. );
  16855. state.unsuspend = commit;
  16856. return function () {
  16857. state.unsuspend = null;
  16858. clearTimeout(stylesheetTimer);
  16859. clearTimeout(imgTimer);
  16860. };
  16861. }
  16862. : null;
  16863. }
  16864. function onUnsuspend() {
  16865. this.count--;
  16866. if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))
  16867. if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);
  16868. else if (this.unsuspend) {
  16869. var unsuspend = this.unsuspend;
  16870. this.unsuspend = null;
  16871. unsuspend();
  16872. }
  16873. }
  16874. var precedencesByRoot = null;
  16875. function insertSuspendedStylesheets(state, resources) {
  16876. state.stylesheets = null;
  16877. null !== state.unsuspend &&
  16878. (state.count++,
  16879. (precedencesByRoot = new Map()),
  16880. resources.forEach(insertStylesheetIntoRoot, state),
  16881. (precedencesByRoot = null),
  16882. onUnsuspend.call(state));
  16883. }
  16884. function insertStylesheetIntoRoot(root, resource) {
  16885. if (!(resource.state.loading & 4)) {
  16886. var precedences = precedencesByRoot.get(root);
  16887. if (precedences) var last = precedences.get(null);
  16888. else {
  16889. precedences = new Map();
  16890. precedencesByRoot.set(root, precedences);
  16891. for (
  16892. var nodes = root.querySelectorAll(
  16893. "link[data-precedence],style[data-precedence]"
  16894. ),
  16895. i = 0;
  16896. i < nodes.length;
  16897. i++
  16898. ) {
  16899. var node = nodes[i];
  16900. if (
  16901. "LINK" === node.nodeName ||
  16902. "not all" !== node.getAttribute("media")
  16903. )
  16904. precedences.set(node.dataset.precedence, node), (last = node);
  16905. }
  16906. last && precedences.set(null, last);
  16907. }
  16908. nodes = resource.instance;
  16909. node = nodes.getAttribute("data-precedence");
  16910. i = precedences.get(node) || last;
  16911. i === last && precedences.set(null, nodes);
  16912. precedences.set(node, nodes);
  16913. this.count++;
  16914. last = onUnsuspend.bind(this);
  16915. nodes.addEventListener("load", last);
  16916. nodes.addEventListener("error", last);
  16917. i
  16918. ? i.parentNode.insertBefore(nodes, i.nextSibling)
  16919. : ((root = 9 === root.nodeType ? root.head : root),
  16920. root.insertBefore(nodes, root.firstChild));
  16921. resource.state.loading |= 4;
  16922. }
  16923. }
  16924. var HostTransitionContext = {
  16925. $$typeof: REACT_CONTEXT_TYPE,
  16926. Provider: null,
  16927. Consumer: null,
  16928. _currentValue: sharedNotPendingObject,
  16929. _currentValue2: sharedNotPendingObject,
  16930. _threadCount: 0
  16931. };
  16932. function FiberRootNode(
  16933. containerInfo,
  16934. tag,
  16935. hydrate,
  16936. identifierPrefix,
  16937. onUncaughtError,
  16938. onCaughtError,
  16939. onRecoverableError,
  16940. onDefaultTransitionIndicator,
  16941. formState
  16942. ) {
  16943. this.tag = 1;
  16944. this.containerInfo = containerInfo;
  16945. this.pingCache = this.current = this.pendingChildren = null;
  16946. this.timeoutHandle = -1;
  16947. this.callbackNode =
  16948. this.next =
  16949. this.pendingContext =
  16950. this.context =
  16951. this.cancelPendingCommit =
  16952. null;
  16953. this.callbackPriority = 0;
  16954. this.expirationTimes = createLaneMap(-1);
  16955. this.entangledLanes =
  16956. this.shellSuspendCounter =
  16957. this.errorRecoveryDisabledLanes =
  16958. this.expiredLanes =
  16959. this.warmLanes =
  16960. this.pingedLanes =
  16961. this.suspendedLanes =
  16962. this.pendingLanes =
  16963. 0;
  16964. this.entanglements = createLaneMap(0);
  16965. this.hiddenUpdates = createLaneMap(null);
  16966. this.identifierPrefix = identifierPrefix;
  16967. this.onUncaughtError = onUncaughtError;
  16968. this.onCaughtError = onCaughtError;
  16969. this.onRecoverableError = onRecoverableError;
  16970. this.pooledCache = null;
  16971. this.pooledCacheLanes = 0;
  16972. this.formState = formState;
  16973. this.incompleteTransitions = new Map();
  16974. this.passiveEffectDuration = this.effectDuration = -0;
  16975. this.memoizedUpdaters = new Set();
  16976. containerInfo = this.pendingUpdatersLaneMap = [];
  16977. for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set());
  16978. }
  16979. function createFiberRoot(
  16980. containerInfo,
  16981. tag,
  16982. hydrate,
  16983. initialChildren,
  16984. hydrationCallbacks,
  16985. isStrictMode,
  16986. identifierPrefix,
  16987. formState,
  16988. onUncaughtError,
  16989. onCaughtError,
  16990. onRecoverableError,
  16991. onDefaultTransitionIndicator
  16992. ) {
  16993. containerInfo = new FiberRootNode(
  16994. containerInfo,
  16995. tag,
  16996. hydrate,
  16997. identifierPrefix,
  16998. onUncaughtError,
  16999. onCaughtError,
  17000. onRecoverableError,
  17001. onDefaultTransitionIndicator,
  17002. formState
  17003. );
  17004. tag = 1;
  17005. !0 === isStrictMode && (tag |= 24);
  17006. isDevToolsPresent && (tag |= 2);
  17007. isStrictMode = createFiberImplClass(3, null, null, tag);
  17008. containerInfo.current = isStrictMode;
  17009. isStrictMode.stateNode = containerInfo;
  17010. tag = createCache();
  17011. tag.refCount++;
  17012. containerInfo.pooledCache = tag;
  17013. tag.refCount++;
  17014. isStrictMode.memoizedState = {
  17015. element: initialChildren,
  17016. isDehydrated: hydrate,
  17017. cache: tag
  17018. };
  17019. initializeUpdateQueue(isStrictMode);
  17020. return containerInfo;
  17021. }
  17022. function createPortal$1(children, containerInfo, implementation) {
  17023. var key =
  17024. 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
  17025. return {
  17026. $$typeof: REACT_PORTAL_TYPE,
  17027. key: null == key ? null : "" + key,
  17028. children: children,
  17029. containerInfo: containerInfo,
  17030. implementation: implementation
  17031. };
  17032. }
  17033. function getContextForSubtree(parentComponent) {
  17034. if (!parentComponent) return emptyContextObject;
  17035. parentComponent = emptyContextObject;
  17036. return parentComponent;
  17037. }
  17038. function updateContainerImpl(
  17039. rootFiber,
  17040. lane,
  17041. element,
  17042. container,
  17043. parentComponent,
  17044. callback
  17045. ) {
  17046. parentComponent = getContextForSubtree(parentComponent);
  17047. null === container.context
  17048. ? (container.context = parentComponent)
  17049. : (container.pendingContext = parentComponent);
  17050. container = createUpdate(lane);
  17051. container.payload = { element: element };
  17052. callback = void 0 === callback ? null : callback;
  17053. null !== callback && (container.callback = callback);
  17054. element = enqueueUpdate(rootFiber, container, lane);
  17055. null !== element &&
  17056. (startUpdateTimerByLane(lane),
  17057. scheduleUpdateOnFiber(element, rootFiber, lane),
  17058. entangleTransitions(element, rootFiber, lane));
  17059. }
  17060. function markRetryLaneImpl(fiber, retryLane) {
  17061. fiber = fiber.memoizedState;
  17062. if (null !== fiber && null !== fiber.dehydrated) {
  17063. var a = fiber.retryLane;
  17064. fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
  17065. }
  17066. }
  17067. function markRetryLaneIfNotHydrated(fiber, retryLane) {
  17068. markRetryLaneImpl(fiber, retryLane);
  17069. (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
  17070. }
  17071. function attemptContinuousHydration(fiber) {
  17072. if (13 === fiber.tag || 31 === fiber.tag) {
  17073. var root = enqueueConcurrentRenderForLane(fiber, 67108864);
  17074. null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
  17075. markRetryLaneIfNotHydrated(fiber, 67108864);
  17076. }
  17077. }
  17078. function attemptHydrationAtCurrentPriority(fiber) {
  17079. if (13 === fiber.tag || 31 === fiber.tag) {
  17080. var lane = requestUpdateLane();
  17081. lane = getBumpedLaneForHydrationByLane(lane);
  17082. var root = enqueueConcurrentRenderForLane(fiber, lane);
  17083. null !== root && scheduleUpdateOnFiber(root, fiber, lane);
  17084. markRetryLaneIfNotHydrated(fiber, lane);
  17085. }
  17086. }
  17087. var _enabled = !0;
  17088. function dispatchDiscreteEvent(
  17089. domEventName,
  17090. eventSystemFlags,
  17091. container,
  17092. nativeEvent
  17093. ) {
  17094. var prevTransition = ReactSharedInternals.T;
  17095. ReactSharedInternals.T = null;
  17096. var previousPriority = ReactDOMSharedInternals.p;
  17097. try {
  17098. (ReactDOMSharedInternals.p = 2),
  17099. dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  17100. } finally {
  17101. (ReactDOMSharedInternals.p = previousPriority),
  17102. (ReactSharedInternals.T = prevTransition);
  17103. }
  17104. }
  17105. function dispatchContinuousEvent(
  17106. domEventName,
  17107. eventSystemFlags,
  17108. container,
  17109. nativeEvent
  17110. ) {
  17111. var prevTransition = ReactSharedInternals.T;
  17112. ReactSharedInternals.T = null;
  17113. var previousPriority = ReactDOMSharedInternals.p;
  17114. try {
  17115. (ReactDOMSharedInternals.p = 8),
  17116. dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  17117. } finally {
  17118. (ReactDOMSharedInternals.p = previousPriority),
  17119. (ReactSharedInternals.T = prevTransition);
  17120. }
  17121. }
  17122. function dispatchEvent(
  17123. domEventName,
  17124. eventSystemFlags,
  17125. targetContainer,
  17126. nativeEvent
  17127. ) {
  17128. if (_enabled) {
  17129. var blockedOn = findInstanceBlockingEvent(nativeEvent);
  17130. if (null === blockedOn)
  17131. dispatchEventForPluginEventSystem(
  17132. domEventName,
  17133. eventSystemFlags,
  17134. nativeEvent,
  17135. return_targetInst,
  17136. targetContainer
  17137. ),
  17138. clearIfContinuousEvent(domEventName, nativeEvent);
  17139. else if (
  17140. queueIfContinuousEvent(
  17141. blockedOn,
  17142. domEventName,
  17143. eventSystemFlags,
  17144. targetContainer,
  17145. nativeEvent
  17146. )
  17147. )
  17148. nativeEvent.stopPropagation();
  17149. else if (
  17150. (clearIfContinuousEvent(domEventName, nativeEvent),
  17151. eventSystemFlags & 4 &&
  17152. -1 < discreteReplayableEvents.indexOf(domEventName))
  17153. ) {
  17154. for (; null !== blockedOn; ) {
  17155. var fiber = getInstanceFromNode(blockedOn);
  17156. if (null !== fiber)
  17157. switch (fiber.tag) {
  17158. case 3:
  17159. fiber = fiber.stateNode;
  17160. if (fiber.current.memoizedState.isDehydrated) {
  17161. var lanes = getHighestPriorityLanes(fiber.pendingLanes);
  17162. if (0 !== lanes) {
  17163. var root = fiber;
  17164. root.pendingLanes |= 2;
  17165. for (root.entangledLanes |= 2; lanes; ) {
  17166. var lane = 1 << (31 - clz32(lanes));
  17167. root.entanglements[1] |= lane;
  17168. lanes &= ~lane;
  17169. }
  17170. ensureRootIsScheduled(fiber);
  17171. 0 === (executionContext & 6) &&
  17172. ((workInProgressRootRenderTargetTime = now$1() + 500),
  17173. flushSyncWorkAcrossRoots_impl(0, !1));
  17174. }
  17175. }
  17176. break;
  17177. case 31:
  17178. case 13:
  17179. (root = enqueueConcurrentRenderForLane(fiber, 2)),
  17180. null !== root && scheduleUpdateOnFiber(root, fiber, 2),
  17181. flushSyncWork$1(),
  17182. markRetryLaneIfNotHydrated(fiber, 2);
  17183. }
  17184. fiber = findInstanceBlockingEvent(nativeEvent);
  17185. null === fiber &&
  17186. dispatchEventForPluginEventSystem(
  17187. domEventName,
  17188. eventSystemFlags,
  17189. nativeEvent,
  17190. return_targetInst,
  17191. targetContainer
  17192. );
  17193. if (fiber === blockedOn) break;
  17194. blockedOn = fiber;
  17195. }
  17196. null !== blockedOn && nativeEvent.stopPropagation();
  17197. } else
  17198. dispatchEventForPluginEventSystem(
  17199. domEventName,
  17200. eventSystemFlags,
  17201. nativeEvent,
  17202. null,
  17203. targetContainer
  17204. );
  17205. }
  17206. }
  17207. function findInstanceBlockingEvent(nativeEvent) {
  17208. nativeEvent = getEventTarget(nativeEvent);
  17209. return findInstanceBlockingTarget(nativeEvent);
  17210. }
  17211. var return_targetInst = null;
  17212. function findInstanceBlockingTarget(targetNode) {
  17213. return_targetInst = null;
  17214. targetNode = getClosestInstanceFromNode(targetNode);
  17215. if (null !== targetNode) {
  17216. var nearestMounted = getNearestMountedFiber(targetNode);
  17217. if (null === nearestMounted) targetNode = null;
  17218. else {
  17219. var tag = nearestMounted.tag;
  17220. if (13 === tag) {
  17221. targetNode = getSuspenseInstanceFromFiber(nearestMounted);
  17222. if (null !== targetNode) return targetNode;
  17223. targetNode = null;
  17224. } else if (31 === tag) {
  17225. targetNode = getActivityInstanceFromFiber(nearestMounted);
  17226. if (null !== targetNode) return targetNode;
  17227. targetNode = null;
  17228. } else if (3 === tag) {
  17229. if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
  17230. return 3 === nearestMounted.tag
  17231. ? nearestMounted.stateNode.containerInfo
  17232. : null;
  17233. targetNode = null;
  17234. } else nearestMounted !== targetNode && (targetNode = null);
  17235. }
  17236. }
  17237. return_targetInst = targetNode;
  17238. return null;
  17239. }
  17240. function getEventPriority(domEventName) {
  17241. switch (domEventName) {
  17242. case "beforetoggle":
  17243. case "cancel":
  17244. case "click":
  17245. case "close":
  17246. case "contextmenu":
  17247. case "copy":
  17248. case "cut":
  17249. case "auxclick":
  17250. case "dblclick":
  17251. case "dragend":
  17252. case "dragstart":
  17253. case "drop":
  17254. case "focusin":
  17255. case "focusout":
  17256. case "input":
  17257. case "invalid":
  17258. case "keydown":
  17259. case "keypress":
  17260. case "keyup":
  17261. case "mousedown":
  17262. case "mouseup":
  17263. case "paste":
  17264. case "pause":
  17265. case "play":
  17266. case "pointercancel":
  17267. case "pointerdown":
  17268. case "pointerup":
  17269. case "ratechange":
  17270. case "reset":
  17271. case "resize":
  17272. case "seeked":
  17273. case "submit":
  17274. case "toggle":
  17275. case "touchcancel":
  17276. case "touchend":
  17277. case "touchstart":
  17278. case "volumechange":
  17279. case "change":
  17280. case "selectionchange":
  17281. case "textInput":
  17282. case "compositionstart":
  17283. case "compositionend":
  17284. case "compositionupdate":
  17285. case "beforeblur":
  17286. case "afterblur":
  17287. case "beforeinput":
  17288. case "blur":
  17289. case "fullscreenchange":
  17290. case "focus":
  17291. case "hashchange":
  17292. case "popstate":
  17293. case "select":
  17294. case "selectstart":
  17295. return 2;
  17296. case "drag":
  17297. case "dragenter":
  17298. case "dragexit":
  17299. case "dragleave":
  17300. case "dragover":
  17301. case "mousemove":
  17302. case "mouseout":
  17303. case "mouseover":
  17304. case "pointermove":
  17305. case "pointerout":
  17306. case "pointerover":
  17307. case "scroll":
  17308. case "touchmove":
  17309. case "wheel":
  17310. case "mouseenter":
  17311. case "mouseleave":
  17312. case "pointerenter":
  17313. case "pointerleave":
  17314. return 8;
  17315. case "message":
  17316. switch (getCurrentPriorityLevel()) {
  17317. case ImmediatePriority:
  17318. return 2;
  17319. case UserBlockingPriority:
  17320. return 8;
  17321. case NormalPriority$1:
  17322. case LowPriority:
  17323. return 32;
  17324. case IdlePriority:
  17325. return 268435456;
  17326. default:
  17327. return 32;
  17328. }
  17329. default:
  17330. return 32;
  17331. }
  17332. }
  17333. var hasScheduledReplayAttempt = !1,
  17334. queuedFocus = null,
  17335. queuedDrag = null,
  17336. queuedMouse = null,
  17337. queuedPointers = new Map(),
  17338. queuedPointerCaptures = new Map(),
  17339. queuedExplicitHydrationTargets = [],
  17340. discreteReplayableEvents =
  17341. "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(
  17342. " "
  17343. );
  17344. function clearIfContinuousEvent(domEventName, nativeEvent) {
  17345. switch (domEventName) {
  17346. case "focusin":
  17347. case "focusout":
  17348. queuedFocus = null;
  17349. break;
  17350. case "dragenter":
  17351. case "dragleave":
  17352. queuedDrag = null;
  17353. break;
  17354. case "mouseover":
  17355. case "mouseout":
  17356. queuedMouse = null;
  17357. break;
  17358. case "pointerover":
  17359. case "pointerout":
  17360. queuedPointers.delete(nativeEvent.pointerId);
  17361. break;
  17362. case "gotpointercapture":
  17363. case "lostpointercapture":
  17364. queuedPointerCaptures.delete(nativeEvent.pointerId);
  17365. }
  17366. }
  17367. function accumulateOrCreateContinuousQueuedReplayableEvent(
  17368. existingQueuedEvent,
  17369. blockedOn,
  17370. domEventName,
  17371. eventSystemFlags,
  17372. targetContainer,
  17373. nativeEvent
  17374. ) {
  17375. if (
  17376. null === existingQueuedEvent ||
  17377. existingQueuedEvent.nativeEvent !== nativeEvent
  17378. )
  17379. return (
  17380. (existingQueuedEvent = {
  17381. blockedOn: blockedOn,
  17382. domEventName: domEventName,
  17383. eventSystemFlags: eventSystemFlags,
  17384. nativeEvent: nativeEvent,
  17385. targetContainers: [targetContainer]
  17386. }),
  17387. null !== blockedOn &&
  17388. ((blockedOn = getInstanceFromNode(blockedOn)),
  17389. null !== blockedOn && attemptContinuousHydration(blockedOn)),
  17390. existingQueuedEvent
  17391. );
  17392. existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
  17393. blockedOn = existingQueuedEvent.targetContainers;
  17394. null !== targetContainer &&
  17395. -1 === blockedOn.indexOf(targetContainer) &&
  17396. blockedOn.push(targetContainer);
  17397. return existingQueuedEvent;
  17398. }
  17399. function queueIfContinuousEvent(
  17400. blockedOn,
  17401. domEventName,
  17402. eventSystemFlags,
  17403. targetContainer,
  17404. nativeEvent
  17405. ) {
  17406. switch (domEventName) {
  17407. case "focusin":
  17408. return (
  17409. (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
  17410. queuedFocus,
  17411. blockedOn,
  17412. domEventName,
  17413. eventSystemFlags,
  17414. targetContainer,
  17415. nativeEvent
  17416. )),
  17417. !0
  17418. );
  17419. case "dragenter":
  17420. return (
  17421. (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
  17422. queuedDrag,
  17423. blockedOn,
  17424. domEventName,
  17425. eventSystemFlags,
  17426. targetContainer,
  17427. nativeEvent
  17428. )),
  17429. !0
  17430. );
  17431. case "mouseover":
  17432. return (
  17433. (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
  17434. queuedMouse,
  17435. blockedOn,
  17436. domEventName,
  17437. eventSystemFlags,
  17438. targetContainer,
  17439. nativeEvent
  17440. )),
  17441. !0
  17442. );
  17443. case "pointerover":
  17444. var pointerId = nativeEvent.pointerId;
  17445. queuedPointers.set(
  17446. pointerId,
  17447. accumulateOrCreateContinuousQueuedReplayableEvent(
  17448. queuedPointers.get(pointerId) || null,
  17449. blockedOn,
  17450. domEventName,
  17451. eventSystemFlags,
  17452. targetContainer,
  17453. nativeEvent
  17454. )
  17455. );
  17456. return !0;
  17457. case "gotpointercapture":
  17458. return (
  17459. (pointerId = nativeEvent.pointerId),
  17460. queuedPointerCaptures.set(
  17461. pointerId,
  17462. accumulateOrCreateContinuousQueuedReplayableEvent(
  17463. queuedPointerCaptures.get(pointerId) || null,
  17464. blockedOn,
  17465. domEventName,
  17466. eventSystemFlags,
  17467. targetContainer,
  17468. nativeEvent
  17469. )
  17470. ),
  17471. !0
  17472. );
  17473. }
  17474. return !1;
  17475. }
  17476. function attemptExplicitHydrationTarget(queuedTarget) {
  17477. var targetInst = getClosestInstanceFromNode(queuedTarget.target);
  17478. if (null !== targetInst) {
  17479. var nearestMounted = getNearestMountedFiber(targetInst);
  17480. if (null !== nearestMounted)
  17481. if (((targetInst = nearestMounted.tag), 13 === targetInst)) {
  17482. if (
  17483. ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),
  17484. null !== targetInst)
  17485. ) {
  17486. queuedTarget.blockedOn = targetInst;
  17487. runWithPriority(queuedTarget.priority, function () {
  17488. attemptHydrationAtCurrentPriority(nearestMounted);
  17489. });
  17490. return;
  17491. }
  17492. } else if (31 === targetInst) {
  17493. if (
  17494. ((targetInst = getActivityInstanceFromFiber(nearestMounted)),
  17495. null !== targetInst)
  17496. ) {
  17497. queuedTarget.blockedOn = targetInst;
  17498. runWithPriority(queuedTarget.priority, function () {
  17499. attemptHydrationAtCurrentPriority(nearestMounted);
  17500. });
  17501. return;
  17502. }
  17503. } else if (
  17504. 3 === targetInst &&
  17505. nearestMounted.stateNode.current.memoizedState.isDehydrated
  17506. ) {
  17507. queuedTarget.blockedOn =
  17508. 3 === nearestMounted.tag
  17509. ? nearestMounted.stateNode.containerInfo
  17510. : null;
  17511. return;
  17512. }
  17513. }
  17514. queuedTarget.blockedOn = null;
  17515. }
  17516. function attemptReplayContinuousQueuedEvent(queuedEvent) {
  17517. if (null !== queuedEvent.blockedOn) return !1;
  17518. for (
  17519. var targetContainers = queuedEvent.targetContainers;
  17520. 0 < targetContainers.length;
  17521. ) {
  17522. var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
  17523. if (null === nextBlockedOn) {
  17524. nextBlockedOn = queuedEvent.nativeEvent;
  17525. var nativeEventClone = new nextBlockedOn.constructor(
  17526. nextBlockedOn.type,
  17527. nextBlockedOn
  17528. );
  17529. currentReplayingEvent = nativeEventClone;
  17530. nextBlockedOn.target.dispatchEvent(nativeEventClone);
  17531. currentReplayingEvent = null;
  17532. } else
  17533. return (
  17534. (targetContainers = getInstanceFromNode(nextBlockedOn)),
  17535. null !== targetContainers &&
  17536. attemptContinuousHydration(targetContainers),
  17537. (queuedEvent.blockedOn = nextBlockedOn),
  17538. !1
  17539. );
  17540. targetContainers.shift();
  17541. }
  17542. return !0;
  17543. }
  17544. function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
  17545. attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
  17546. }
  17547. function replayUnblockedEvents() {
  17548. hasScheduledReplayAttempt = !1;
  17549. null !== queuedFocus &&
  17550. attemptReplayContinuousQueuedEvent(queuedFocus) &&
  17551. (queuedFocus = null);
  17552. null !== queuedDrag &&
  17553. attemptReplayContinuousQueuedEvent(queuedDrag) &&
  17554. (queuedDrag = null);
  17555. null !== queuedMouse &&
  17556. attemptReplayContinuousQueuedEvent(queuedMouse) &&
  17557. (queuedMouse = null);
  17558. queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
  17559. queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
  17560. }
  17561. function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
  17562. queuedEvent.blockedOn === unblocked &&
  17563. ((queuedEvent.blockedOn = null),
  17564. hasScheduledReplayAttempt ||
  17565. ((hasScheduledReplayAttempt = !0),
  17566. Scheduler.unstable_scheduleCallback(
  17567. Scheduler.unstable_NormalPriority,
  17568. replayUnblockedEvents
  17569. )));
  17570. }
  17571. var lastScheduledReplayQueue = null;
  17572. function scheduleReplayQueueIfNeeded(formReplayingQueue) {
  17573. lastScheduledReplayQueue !== formReplayingQueue &&
  17574. ((lastScheduledReplayQueue = formReplayingQueue),
  17575. Scheduler.unstable_scheduleCallback(
  17576. Scheduler.unstable_NormalPriority,
  17577. function () {
  17578. lastScheduledReplayQueue === formReplayingQueue &&
  17579. (lastScheduledReplayQueue = null);
  17580. for (var i = 0; i < formReplayingQueue.length; i += 3) {
  17581. var form = formReplayingQueue[i],
  17582. submitterOrAction = formReplayingQueue[i + 1],
  17583. formData = formReplayingQueue[i + 2];
  17584. if ("function" !== typeof submitterOrAction)
  17585. if (null === findInstanceBlockingTarget(submitterOrAction || form))
  17586. continue;
  17587. else break;
  17588. var formInst = getInstanceFromNode(form);
  17589. null !== formInst &&
  17590. (formReplayingQueue.splice(i, 3),
  17591. (i -= 3),
  17592. startHostTransition(
  17593. formInst,
  17594. {
  17595. pending: !0,
  17596. data: formData,
  17597. method: form.method,
  17598. action: submitterOrAction
  17599. },
  17600. submitterOrAction,
  17601. formData
  17602. ));
  17603. }
  17604. }
  17605. ));
  17606. }
  17607. function retryIfBlockedOn(unblocked) {
  17608. function unblock(queuedEvent) {
  17609. return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
  17610. }
  17611. null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
  17612. null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
  17613. null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
  17614. queuedPointers.forEach(unblock);
  17615. queuedPointerCaptures.forEach(unblock);
  17616. for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
  17617. var queuedTarget = queuedExplicitHydrationTargets[i];
  17618. queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
  17619. }
  17620. for (
  17621. ;
  17622. 0 < queuedExplicitHydrationTargets.length &&
  17623. ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);
  17624. )
  17625. attemptExplicitHydrationTarget(i),
  17626. null === i.blockedOn && queuedExplicitHydrationTargets.shift();
  17627. i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
  17628. if (null != i)
  17629. for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
  17630. var form = i[queuedTarget],
  17631. submitterOrAction = i[queuedTarget + 1],
  17632. formProps = form[internalPropsKey] || null;
  17633. if ("function" === typeof submitterOrAction)
  17634. formProps || scheduleReplayQueueIfNeeded(i);
  17635. else if (formProps) {
  17636. var action = null;
  17637. if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
  17638. if (
  17639. ((form = submitterOrAction),
  17640. (formProps = submitterOrAction[internalPropsKey] || null))
  17641. )
  17642. action = formProps.formAction;
  17643. else {
  17644. if (null !== findInstanceBlockingTarget(form)) continue;
  17645. }
  17646. else action = formProps.action;
  17647. "function" === typeof action
  17648. ? (i[queuedTarget + 1] = action)
  17649. : (i.splice(queuedTarget, 3), (queuedTarget -= 3));
  17650. scheduleReplayQueueIfNeeded(i);
  17651. }
  17652. }
  17653. }
  17654. function defaultOnDefaultTransitionIndicator() {
  17655. function handleNavigate(event) {
  17656. event.canIntercept &&
  17657. "react-transition" === event.info &&
  17658. event.intercept({
  17659. handler: function () {
  17660. return new Promise(function (resolve) {
  17661. return (pendingResolve = resolve);
  17662. });
  17663. },
  17664. focusReset: "manual",
  17665. scroll: "manual"
  17666. });
  17667. }
  17668. function handleNavigateComplete() {
  17669. null !== pendingResolve && (pendingResolve(), (pendingResolve = null));
  17670. isCancelled || setTimeout(startFakeNavigation, 20);
  17671. }
  17672. function startFakeNavigation() {
  17673. if (!isCancelled && !navigation.transition) {
  17674. var currentEntry = navigation.currentEntry;
  17675. currentEntry &&
  17676. null != currentEntry.url &&
  17677. navigation.navigate(currentEntry.url, {
  17678. state: currentEntry.getState(),
  17679. info: "react-transition",
  17680. history: "replace"
  17681. });
  17682. }
  17683. }
  17684. if ("object" === typeof navigation) {
  17685. var isCancelled = !1,
  17686. pendingResolve = null;
  17687. navigation.addEventListener("navigate", handleNavigate);
  17688. navigation.addEventListener("navigatesuccess", handleNavigateComplete);
  17689. navigation.addEventListener("navigateerror", handleNavigateComplete);
  17690. setTimeout(startFakeNavigation, 100);
  17691. return function () {
  17692. isCancelled = !0;
  17693. navigation.removeEventListener("navigate", handleNavigate);
  17694. navigation.removeEventListener("navigatesuccess", handleNavigateComplete);
  17695. navigation.removeEventListener("navigateerror", handleNavigateComplete);
  17696. null !== pendingResolve && (pendingResolve(), (pendingResolve = null));
  17697. };
  17698. }
  17699. }
  17700. function ReactDOMRoot(internalRoot) {
  17701. this._internalRoot = internalRoot;
  17702. }
  17703. ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =
  17704. function (children) {
  17705. var root = this._internalRoot;
  17706. if (null === root) throw Error(formatProdErrorMessage(409));
  17707. var current = root.current,
  17708. lane = requestUpdateLane();
  17709. updateContainerImpl(current, lane, children, root, null, null);
  17710. };
  17711. ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
  17712. function () {
  17713. var root = this._internalRoot;
  17714. if (null !== root) {
  17715. this._internalRoot = null;
  17716. var container = root.containerInfo;
  17717. updateContainerImpl(root.current, 2, null, root, null, null);
  17718. flushSyncWork$1();
  17719. container[internalContainerInstanceKey] = null;
  17720. }
  17721. };
  17722. function ReactDOMHydrationRoot(internalRoot) {
  17723. this._internalRoot = internalRoot;
  17724. }
  17725. ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
  17726. if (target) {
  17727. var updatePriority = resolveUpdatePriority();
  17728. target = { blockedOn: null, target: target, priority: updatePriority };
  17729. for (
  17730. var i = 0;
  17731. i < queuedExplicitHydrationTargets.length &&
  17732. 0 !== updatePriority &&
  17733. updatePriority < queuedExplicitHydrationTargets[i].priority;
  17734. i++
  17735. );
  17736. queuedExplicitHydrationTargets.splice(i, 0, target);
  17737. 0 === i && attemptExplicitHydrationTarget(target);
  17738. }
  17739. };
  17740. var isomorphicReactPackageVersion$jscomp$inline_2138 = React.version;
  17741. if (
  17742. "19.2.4" !==
  17743. isomorphicReactPackageVersion$jscomp$inline_2138
  17744. )
  17745. throw Error(
  17746. formatProdErrorMessage(
  17747. 527,
  17748. isomorphicReactPackageVersion$jscomp$inline_2138,
  17749. "19.2.4"
  17750. )
  17751. );
  17752. ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
  17753. var fiber = componentOrElement._reactInternals;
  17754. if (void 0 === fiber) {
  17755. if ("function" === typeof componentOrElement.render)
  17756. throw Error(formatProdErrorMessage(188));
  17757. componentOrElement = Object.keys(componentOrElement).join(",");
  17758. throw Error(formatProdErrorMessage(268, componentOrElement));
  17759. }
  17760. componentOrElement = findCurrentFiberUsingSlowPath(fiber);
  17761. componentOrElement =
  17762. null !== componentOrElement
  17763. ? findCurrentHostFiberImpl(componentOrElement)
  17764. : null;
  17765. componentOrElement =
  17766. null === componentOrElement ? null : componentOrElement.stateNode;
  17767. return componentOrElement;
  17768. };
  17769. var internals$jscomp$inline_2658 = {
  17770. bundleType: 0,
  17771. version: "19.2.4",
  17772. rendererPackageName: "react-dom",
  17773. currentDispatcherRef: ReactSharedInternals,
  17774. reconcilerVersion: "19.2.4"
  17775. };
  17776. if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
  17777. var hook$jscomp$inline_2659 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  17778. if (
  17779. !hook$jscomp$inline_2659.isDisabled &&
  17780. hook$jscomp$inline_2659.supportsFiber
  17781. )
  17782. try {
  17783. (rendererID = hook$jscomp$inline_2659.inject(
  17784. internals$jscomp$inline_2658
  17785. )),
  17786. (injectedHook = hook$jscomp$inline_2659);
  17787. } catch (err) {}
  17788. }
  17789. function getCrossOriginStringAs(as, input) {
  17790. if ("font" === as) return "";
  17791. if ("string" === typeof input)
  17792. return "use-credentials" === input ? input : "";
  17793. }
  17794. exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = {
  17795. d: {
  17796. f: noop$1,
  17797. r: function () {
  17798. throw Error(formatProdErrorMessage(522));
  17799. },
  17800. D: noop$1,
  17801. C: noop$1,
  17802. L: noop$1,
  17803. m: noop$1,
  17804. X: noop$1,
  17805. S: noop$1,
  17806. M: noop$1
  17807. },
  17808. p: 0,
  17809. findDOMNode: null
  17810. };
  17811. exports.createPortal = function (children, container) {
  17812. var key =
  17813. 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
  17814. if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
  17815. return createPortal$1(children, container, null, key);
  17816. };
  17817. exports.createRoot = function (container, options) {
  17818. if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
  17819. var isStrictMode = !1,
  17820. identifierPrefix = "",
  17821. onUncaughtError = defaultOnUncaughtError,
  17822. onCaughtError = defaultOnCaughtError,
  17823. onRecoverableError = defaultOnRecoverableError;
  17824. null !== options &&
  17825. void 0 !== options &&
  17826. (!0 === options.unstable_strictMode && (isStrictMode = !0),
  17827. void 0 !== options.identifierPrefix &&
  17828. (identifierPrefix = options.identifierPrefix),
  17829. void 0 !== options.onUncaughtError &&
  17830. (onUncaughtError = options.onUncaughtError),
  17831. void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
  17832. void 0 !== options.onRecoverableError &&
  17833. (onRecoverableError = options.onRecoverableError));
  17834. options = createFiberRoot(
  17835. container,
  17836. 1,
  17837. !1,
  17838. null,
  17839. null,
  17840. isStrictMode,
  17841. identifierPrefix,
  17842. null,
  17843. onUncaughtError,
  17844. onCaughtError,
  17845. onRecoverableError,
  17846. defaultOnDefaultTransitionIndicator
  17847. );
  17848. container[internalContainerInstanceKey] = options.current;
  17849. listenToAllSupportedEvents(container);
  17850. return new ReactDOMRoot(options);
  17851. };
  17852. exports.flushSync = function (fn) {
  17853. var previousTransition = ReactSharedInternals.T,
  17854. previousUpdatePriority = ReactDOMSharedInternals.p;
  17855. try {
  17856. if (((ReactSharedInternals.T = null), (ReactDOMSharedInternals.p = 2), fn))
  17857. return fn();
  17858. } finally {
  17859. (ReactSharedInternals.T = previousTransition),
  17860. (ReactDOMSharedInternals.p = previousUpdatePriority),
  17861. ReactDOMSharedInternals.d.f();
  17862. }
  17863. };
  17864. exports.hydrateRoot = function (container, initialChildren, options) {
  17865. if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
  17866. var isStrictMode = !1,
  17867. identifierPrefix = "",
  17868. onUncaughtError = defaultOnUncaughtError,
  17869. onCaughtError = defaultOnCaughtError,
  17870. onRecoverableError = defaultOnRecoverableError,
  17871. formState = null;
  17872. null !== options &&
  17873. void 0 !== options &&
  17874. (!0 === options.unstable_strictMode && (isStrictMode = !0),
  17875. void 0 !== options.identifierPrefix &&
  17876. (identifierPrefix = options.identifierPrefix),
  17877. void 0 !== options.onUncaughtError &&
  17878. (onUncaughtError = options.onUncaughtError),
  17879. void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
  17880. void 0 !== options.onRecoverableError &&
  17881. (onRecoverableError = options.onRecoverableError),
  17882. void 0 !== options.formState && (formState = options.formState));
  17883. initialChildren = createFiberRoot(
  17884. container,
  17885. 1,
  17886. !0,
  17887. initialChildren,
  17888. null != options ? options : null,
  17889. isStrictMode,
  17890. identifierPrefix,
  17891. formState,
  17892. onUncaughtError,
  17893. onCaughtError,
  17894. onRecoverableError,
  17895. defaultOnDefaultTransitionIndicator
  17896. );
  17897. initialChildren.context = getContextForSubtree(null);
  17898. options = initialChildren.current;
  17899. isStrictMode = requestUpdateLane();
  17900. isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
  17901. identifierPrefix = createUpdate(isStrictMode);
  17902. identifierPrefix.callback = null;
  17903. enqueueUpdate(options, identifierPrefix, isStrictMode);
  17904. startUpdateTimerByLane(isStrictMode);
  17905. options = isStrictMode;
  17906. initialChildren.current.lanes = options;
  17907. markRootUpdated$1(initialChildren, options);
  17908. ensureRootIsScheduled(initialChildren);
  17909. container[internalContainerInstanceKey] = initialChildren.current;
  17910. listenToAllSupportedEvents(container);
  17911. return new ReactDOMHydrationRoot(initialChildren);
  17912. };
  17913. exports.preconnect = function (href, options) {
  17914. "string" === typeof href &&
  17915. (options
  17916. ? ((options = options.crossOrigin),
  17917. (options =
  17918. "string" === typeof options
  17919. ? "use-credentials" === options
  17920. ? options
  17921. : ""
  17922. : void 0))
  17923. : (options = null),
  17924. ReactDOMSharedInternals.d.C(href, options));
  17925. };
  17926. exports.prefetchDNS = function (href) {
  17927. "string" === typeof href && ReactDOMSharedInternals.d.D(href);
  17928. };
  17929. exports.preinit = function (href, options) {
  17930. if ("string" === typeof href && options && "string" === typeof options.as) {
  17931. var as = options.as,
  17932. crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
  17933. integrity =
  17934. "string" === typeof options.integrity ? options.integrity : void 0,
  17935. fetchPriority =
  17936. "string" === typeof options.fetchPriority
  17937. ? options.fetchPriority
  17938. : void 0;
  17939. "style" === as
  17940. ? ReactDOMSharedInternals.d.S(
  17941. href,
  17942. "string" === typeof options.precedence ? options.precedence : void 0,
  17943. {
  17944. crossOrigin: crossOrigin,
  17945. integrity: integrity,
  17946. fetchPriority: fetchPriority
  17947. }
  17948. )
  17949. : "script" === as &&
  17950. ReactDOMSharedInternals.d.X(href, {
  17951. crossOrigin: crossOrigin,
  17952. integrity: integrity,
  17953. fetchPriority: fetchPriority,
  17954. nonce: "string" === typeof options.nonce ? options.nonce : void 0
  17955. });
  17956. }
  17957. };
  17958. exports.preinitModule = function (href, options) {
  17959. if ("string" === typeof href)
  17960. if ("object" === typeof options && null !== options) {
  17961. if (null == options.as || "script" === options.as) {
  17962. var crossOrigin = getCrossOriginStringAs(
  17963. options.as,
  17964. options.crossOrigin
  17965. );
  17966. ReactDOMSharedInternals.d.M(href, {
  17967. crossOrigin: crossOrigin,
  17968. integrity:
  17969. "string" === typeof options.integrity ? options.integrity : void 0,
  17970. nonce: "string" === typeof options.nonce ? options.nonce : void 0
  17971. });
  17972. }
  17973. } else null == options && ReactDOMSharedInternals.d.M(href);
  17974. };
  17975. exports.preload = function (href, options) {
  17976. if (
  17977. "string" === typeof href &&
  17978. "object" === typeof options &&
  17979. null !== options &&
  17980. "string" === typeof options.as
  17981. ) {
  17982. var as = options.as,
  17983. crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
  17984. ReactDOMSharedInternals.d.L(href, as, {
  17985. crossOrigin: crossOrigin,
  17986. integrity:
  17987. "string" === typeof options.integrity ? options.integrity : void 0,
  17988. nonce: "string" === typeof options.nonce ? options.nonce : void 0,
  17989. type: "string" === typeof options.type ? options.type : void 0,
  17990. fetchPriority:
  17991. "string" === typeof options.fetchPriority
  17992. ? options.fetchPriority
  17993. : void 0,
  17994. referrerPolicy:
  17995. "string" === typeof options.referrerPolicy
  17996. ? options.referrerPolicy
  17997. : void 0,
  17998. imageSrcSet:
  17999. "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
  18000. imageSizes:
  18001. "string" === typeof options.imageSizes ? options.imageSizes : void 0,
  18002. media: "string" === typeof options.media ? options.media : void 0
  18003. });
  18004. }
  18005. };
  18006. exports.preloadModule = function (href, options) {
  18007. if ("string" === typeof href)
  18008. if (options) {
  18009. var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
  18010. ReactDOMSharedInternals.d.m(href, {
  18011. as:
  18012. "string" === typeof options.as && "script" !== options.as
  18013. ? options.as
  18014. : void 0,
  18015. crossOrigin: crossOrigin,
  18016. integrity:
  18017. "string" === typeof options.integrity ? options.integrity : void 0
  18018. });
  18019. } else ReactDOMSharedInternals.d.m(href);
  18020. };
  18021. exports.requestFormReset = function (form) {
  18022. ReactDOMSharedInternals.d.r(form);
  18023. };
  18024. exports.unstable_batchedUpdates = function (fn, a) {
  18025. return fn(a);
  18026. };
  18027. exports.useFormState = function (action, initialState, permalink) {
  18028. return ReactSharedInternals.H.useFormState(action, initialState, permalink);
  18029. };
  18030. exports.useFormStatus = function () {
  18031. return ReactSharedInternals.H.useHostTransitionStatus();
  18032. };
  18033. exports.version = "19.2.4";
  18034. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  18035. "function" ===
  18036. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
  18037. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());