react-dom_client.js 982 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217
  1. import {
  2. require_react_dom
  3. } from "./chunk-2RADP4CJ.js";
  4. import {
  5. require_react
  6. } from "./chunk-6KCF6AHO.js";
  7. import {
  8. __commonJS
  9. } from "./chunk-DC5AMYBS.js";
  10. // node_modules/scheduler/cjs/scheduler.development.js
  11. var require_scheduler_development = __commonJS({
  12. "node_modules/scheduler/cjs/scheduler.development.js"(exports) {
  13. "use strict";
  14. (function() {
  15. function performWorkUntilDeadline() {
  16. needsPaint = false;
  17. if (isMessageLoopRunning) {
  18. var currentTime = exports.unstable_now();
  19. startTime = currentTime;
  20. var hasMoreWork = true;
  21. try {
  22. a: {
  23. isHostCallbackScheduled = false;
  24. isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
  25. isPerformingWork = true;
  26. var previousPriorityLevel = currentPriorityLevel;
  27. try {
  28. b: {
  29. advanceTimers(currentTime);
  30. for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
  31. var callback = currentTask.callback;
  32. if ("function" === typeof callback) {
  33. currentTask.callback = null;
  34. currentPriorityLevel = currentTask.priorityLevel;
  35. var continuationCallback = callback(
  36. currentTask.expirationTime <= currentTime
  37. );
  38. currentTime = exports.unstable_now();
  39. if ("function" === typeof continuationCallback) {
  40. currentTask.callback = continuationCallback;
  41. advanceTimers(currentTime);
  42. hasMoreWork = true;
  43. break b;
  44. }
  45. currentTask === peek(taskQueue) && pop(taskQueue);
  46. advanceTimers(currentTime);
  47. } else pop(taskQueue);
  48. currentTask = peek(taskQueue);
  49. }
  50. if (null !== currentTask) hasMoreWork = true;
  51. else {
  52. var firstTimer = peek(timerQueue);
  53. null !== firstTimer && requestHostTimeout(
  54. handleTimeout,
  55. firstTimer.startTime - currentTime
  56. );
  57. hasMoreWork = false;
  58. }
  59. }
  60. break a;
  61. } finally {
  62. currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
  63. }
  64. hasMoreWork = void 0;
  65. }
  66. } finally {
  67. hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
  68. }
  69. }
  70. }
  71. function push(heap, node) {
  72. var index = heap.length;
  73. heap.push(node);
  74. a: for (; 0 < index; ) {
  75. var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
  76. if (0 < compare(parent, node))
  77. heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
  78. else break a;
  79. }
  80. }
  81. function peek(heap) {
  82. return 0 === heap.length ? null : heap[0];
  83. }
  84. function pop(heap) {
  85. if (0 === heap.length) return null;
  86. var first = heap[0], last = heap.pop();
  87. if (last !== first) {
  88. heap[0] = last;
  89. a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
  90. var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
  91. if (0 > compare(left, last))
  92. rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
  93. else if (rightIndex < length && 0 > compare(right, last))
  94. heap[index] = right, heap[rightIndex] = last, index = rightIndex;
  95. else break a;
  96. }
  97. }
  98. return first;
  99. }
  100. function compare(a, b) {
  101. var diff = a.sortIndex - b.sortIndex;
  102. return 0 !== diff ? diff : a.id - b.id;
  103. }
  104. function advanceTimers(currentTime) {
  105. for (var timer = peek(timerQueue); null !== timer; ) {
  106. if (null === timer.callback) pop(timerQueue);
  107. else if (timer.startTime <= currentTime)
  108. pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
  109. else break;
  110. timer = peek(timerQueue);
  111. }
  112. }
  113. function handleTimeout(currentTime) {
  114. isHostTimeoutScheduled = false;
  115. advanceTimers(currentTime);
  116. if (!isHostCallbackScheduled)
  117. if (null !== peek(taskQueue))
  118. isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
  119. else {
  120. var firstTimer = peek(timerQueue);
  121. null !== firstTimer && requestHostTimeout(
  122. handleTimeout,
  123. firstTimer.startTime - currentTime
  124. );
  125. }
  126. }
  127. function shouldYieldToHost() {
  128. return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
  129. }
  130. function requestHostTimeout(callback, ms) {
  131. taskTimeoutID = localSetTimeout(function() {
  132. callback(exports.unstable_now());
  133. }, ms);
  134. }
  135. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  136. exports.unstable_now = void 0;
  137. if ("object" === typeof performance && "function" === typeof performance.now) {
  138. var localPerformance = performance;
  139. exports.unstable_now = function() {
  140. return localPerformance.now();
  141. };
  142. } else {
  143. var localDate = Date, initialTime = localDate.now();
  144. exports.unstable_now = function() {
  145. return localDate.now() - initialTime;
  146. };
  147. }
  148. var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
  149. if ("function" === typeof localSetImmediate)
  150. var schedulePerformWorkUntilDeadline = function() {
  151. localSetImmediate(performWorkUntilDeadline);
  152. };
  153. else if ("undefined" !== typeof MessageChannel) {
  154. var channel = new MessageChannel(), port = channel.port2;
  155. channel.port1.onmessage = performWorkUntilDeadline;
  156. schedulePerformWorkUntilDeadline = function() {
  157. port.postMessage(null);
  158. };
  159. } else
  160. schedulePerformWorkUntilDeadline = function() {
  161. localSetTimeout(performWorkUntilDeadline, 0);
  162. };
  163. exports.unstable_IdlePriority = 5;
  164. exports.unstable_ImmediatePriority = 1;
  165. exports.unstable_LowPriority = 4;
  166. exports.unstable_NormalPriority = 3;
  167. exports.unstable_Profiling = null;
  168. exports.unstable_UserBlockingPriority = 2;
  169. exports.unstable_cancelCallback = function(task) {
  170. task.callback = null;
  171. };
  172. exports.unstable_forceFrameRate = function(fps) {
  173. 0 > fps || 125 < fps ? console.error(
  174. "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
  175. ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
  176. };
  177. exports.unstable_getCurrentPriorityLevel = function() {
  178. return currentPriorityLevel;
  179. };
  180. exports.unstable_next = function(eventHandler) {
  181. switch (currentPriorityLevel) {
  182. case 1:
  183. case 2:
  184. case 3:
  185. var priorityLevel = 3;
  186. break;
  187. default:
  188. priorityLevel = currentPriorityLevel;
  189. }
  190. var previousPriorityLevel = currentPriorityLevel;
  191. currentPriorityLevel = priorityLevel;
  192. try {
  193. return eventHandler();
  194. } finally {
  195. currentPriorityLevel = previousPriorityLevel;
  196. }
  197. };
  198. exports.unstable_requestPaint = function() {
  199. needsPaint = true;
  200. };
  201. exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
  202. switch (priorityLevel) {
  203. case 1:
  204. case 2:
  205. case 3:
  206. case 4:
  207. case 5:
  208. break;
  209. default:
  210. priorityLevel = 3;
  211. }
  212. var previousPriorityLevel = currentPriorityLevel;
  213. currentPriorityLevel = priorityLevel;
  214. try {
  215. return eventHandler();
  216. } finally {
  217. currentPriorityLevel = previousPriorityLevel;
  218. }
  219. };
  220. exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
  221. var currentTime = exports.unstable_now();
  222. "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
  223. switch (priorityLevel) {
  224. case 1:
  225. var timeout = -1;
  226. break;
  227. case 2:
  228. timeout = 250;
  229. break;
  230. case 5:
  231. timeout = 1073741823;
  232. break;
  233. case 4:
  234. timeout = 1e4;
  235. break;
  236. default:
  237. timeout = 5e3;
  238. }
  239. timeout = options + timeout;
  240. priorityLevel = {
  241. id: taskIdCounter++,
  242. callback,
  243. priorityLevel,
  244. startTime: options,
  245. expirationTime: timeout,
  246. sortIndex: -1
  247. };
  248. options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
  249. return priorityLevel;
  250. };
  251. exports.unstable_shouldYield = shouldYieldToHost;
  252. exports.unstable_wrapCallback = function(callback) {
  253. var parentPriorityLevel = currentPriorityLevel;
  254. return function() {
  255. var previousPriorityLevel = currentPriorityLevel;
  256. currentPriorityLevel = parentPriorityLevel;
  257. try {
  258. return callback.apply(this, arguments);
  259. } finally {
  260. currentPriorityLevel = previousPriorityLevel;
  261. }
  262. };
  263. };
  264. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  265. })();
  266. }
  267. });
  268. // node_modules/scheduler/index.js
  269. var require_scheduler = __commonJS({
  270. "node_modules/scheduler/index.js"(exports, module) {
  271. "use strict";
  272. if (false) {
  273. module.exports = null;
  274. } else {
  275. module.exports = require_scheduler_development();
  276. }
  277. }
  278. });
  279. // node_modules/react-dom/cjs/react-dom-client.development.js
  280. var require_react_dom_client_development = __commonJS({
  281. "node_modules/react-dom/cjs/react-dom-client.development.js"(exports) {
  282. "use strict";
  283. (function() {
  284. function findHook(fiber, id) {
  285. for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
  286. fiber = fiber.next, id--;
  287. return fiber;
  288. }
  289. function copyWithSetImpl(obj, path, index, value) {
  290. if (index >= path.length) return value;
  291. var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
  292. updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
  293. return updated;
  294. }
  295. function copyWithRename(obj, oldPath, newPath) {
  296. if (oldPath.length !== newPath.length)
  297. console.warn("copyWithRename() expects paths of the same length");
  298. else {
  299. for (var i = 0; i < newPath.length - 1; i++)
  300. if (oldPath[i] !== newPath[i]) {
  301. console.warn(
  302. "copyWithRename() expects paths to be the same except for the deepest key"
  303. );
  304. return;
  305. }
  306. return copyWithRenameImpl(obj, oldPath, newPath, 0);
  307. }
  308. }
  309. function copyWithRenameImpl(obj, oldPath, newPath, index) {
  310. var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
  311. index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(
  312. obj[oldKey],
  313. oldPath,
  314. newPath,
  315. index + 1
  316. );
  317. return updated;
  318. }
  319. function copyWithDeleteImpl(obj, path, index) {
  320. var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
  321. if (index + 1 === path.length)
  322. return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
  323. updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
  324. return updated;
  325. }
  326. function shouldSuspendImpl() {
  327. return false;
  328. }
  329. function shouldErrorImpl() {
  330. return null;
  331. }
  332. function warnInvalidHookAccess() {
  333. console.error(
  334. "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
  335. );
  336. }
  337. function warnInvalidContextAccess() {
  338. console.error(
  339. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  340. );
  341. }
  342. function noop() {
  343. }
  344. function warnForMissingKey() {
  345. }
  346. function setToSortedString(set) {
  347. var array = [];
  348. set.forEach(function(value) {
  349. array.push(value);
  350. });
  351. return array.sort().join(", ");
  352. }
  353. function createFiber(tag, pendingProps, key, mode) {
  354. return new FiberNode(tag, pendingProps, key, mode);
  355. }
  356. function scheduleRoot(root2, element) {
  357. root2.context === emptyContextObject && (updateContainerImpl(root2.current, 2, element, root2, null, null), flushSyncWork$1());
  358. }
  359. function scheduleRefresh(root2, update) {
  360. if (null !== resolveFamily) {
  361. var staleFamilies = update.staleFamilies;
  362. update = update.updatedFamilies;
  363. flushPendingEffects();
  364. scheduleFibersWithFamiliesRecursively(
  365. root2.current,
  366. update,
  367. staleFamilies
  368. );
  369. flushSyncWork$1();
  370. }
  371. }
  372. function setRefreshHandler(handler) {
  373. resolveFamily = handler;
  374. }
  375. function isValidContainer(node) {
  376. return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType);
  377. }
  378. function getNearestMountedFiber(fiber) {
  379. var node = fiber, nearestMounted = fiber;
  380. if (fiber.alternate) for (; node.return; ) node = node.return;
  381. else {
  382. fiber = node;
  383. do
  384. node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
  385. while (fiber);
  386. }
  387. return 3 === node.tag ? nearestMounted : null;
  388. }
  389. function getSuspenseInstanceFromFiber(fiber) {
  390. if (13 === fiber.tag) {
  391. var suspenseState = fiber.memoizedState;
  392. null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState));
  393. if (null !== suspenseState) return suspenseState.dehydrated;
  394. }
  395. return null;
  396. }
  397. function getActivityInstanceFromFiber(fiber) {
  398. if (31 === fiber.tag) {
  399. var activityState = fiber.memoizedState;
  400. null === activityState && (fiber = fiber.alternate, null !== fiber && (activityState = fiber.memoizedState));
  401. if (null !== activityState) return activityState.dehydrated;
  402. }
  403. return null;
  404. }
  405. function assertIsMounted(fiber) {
  406. if (getNearestMountedFiber(fiber) !== fiber)
  407. throw Error("Unable to find node on an unmounted component.");
  408. }
  409. function findCurrentFiberUsingSlowPath(fiber) {
  410. var alternate = fiber.alternate;
  411. if (!alternate) {
  412. alternate = getNearestMountedFiber(fiber);
  413. if (null === alternate)
  414. throw Error("Unable to find node on an unmounted component.");
  415. return alternate !== fiber ? null : fiber;
  416. }
  417. for (var a = fiber, b = alternate; ; ) {
  418. var parentA = a.return;
  419. if (null === parentA) break;
  420. var parentB = parentA.alternate;
  421. if (null === parentB) {
  422. b = parentA.return;
  423. if (null !== b) {
  424. a = b;
  425. continue;
  426. }
  427. break;
  428. }
  429. if (parentA.child === parentB.child) {
  430. for (parentB = parentA.child; parentB; ) {
  431. if (parentB === a) return assertIsMounted(parentA), fiber;
  432. if (parentB === b) return assertIsMounted(parentA), alternate;
  433. parentB = parentB.sibling;
  434. }
  435. throw Error("Unable to find node on an unmounted component.");
  436. }
  437. if (a.return !== b.return) a = parentA, b = parentB;
  438. else {
  439. for (var didFindChild = false, _child = parentA.child; _child; ) {
  440. if (_child === a) {
  441. didFindChild = true;
  442. a = parentA;
  443. b = parentB;
  444. break;
  445. }
  446. if (_child === b) {
  447. didFindChild = true;
  448. b = parentA;
  449. a = parentB;
  450. break;
  451. }
  452. _child = _child.sibling;
  453. }
  454. if (!didFindChild) {
  455. for (_child = parentB.child; _child; ) {
  456. if (_child === a) {
  457. didFindChild = true;
  458. a = parentB;
  459. b = parentA;
  460. break;
  461. }
  462. if (_child === b) {
  463. didFindChild = true;
  464. b = parentB;
  465. a = parentA;
  466. break;
  467. }
  468. _child = _child.sibling;
  469. }
  470. if (!didFindChild)
  471. throw Error(
  472. "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
  473. );
  474. }
  475. }
  476. if (a.alternate !== b)
  477. throw Error(
  478. "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
  479. );
  480. }
  481. if (3 !== a.tag)
  482. throw Error("Unable to find node on an unmounted component.");
  483. return a.stateNode.current === a ? fiber : alternate;
  484. }
  485. function findCurrentHostFiberImpl(node) {
  486. var tag = node.tag;
  487. if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
  488. for (node = node.child; null !== node; ) {
  489. tag = findCurrentHostFiberImpl(node);
  490. if (null !== tag) return tag;
  491. node = node.sibling;
  492. }
  493. return null;
  494. }
  495. function getIteratorFn(maybeIterable) {
  496. if (null === maybeIterable || "object" !== typeof maybeIterable)
  497. return null;
  498. maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
  499. return "function" === typeof maybeIterable ? maybeIterable : null;
  500. }
  501. function getComponentNameFromType(type) {
  502. if (null == type) return null;
  503. if ("function" === typeof type)
  504. return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
  505. if ("string" === typeof type) return type;
  506. switch (type) {
  507. case REACT_FRAGMENT_TYPE:
  508. return "Fragment";
  509. case REACT_PROFILER_TYPE:
  510. return "Profiler";
  511. case REACT_STRICT_MODE_TYPE:
  512. return "StrictMode";
  513. case REACT_SUSPENSE_TYPE:
  514. return "Suspense";
  515. case REACT_SUSPENSE_LIST_TYPE:
  516. return "SuspenseList";
  517. case REACT_ACTIVITY_TYPE:
  518. return "Activity";
  519. }
  520. if ("object" === typeof type)
  521. switch ("number" === typeof type.tag && console.error(
  522. "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
  523. ), type.$$typeof) {
  524. case REACT_PORTAL_TYPE:
  525. return "Portal";
  526. case REACT_CONTEXT_TYPE:
  527. return type.displayName || "Context";
  528. case REACT_CONSUMER_TYPE:
  529. return (type._context.displayName || "Context") + ".Consumer";
  530. case REACT_FORWARD_REF_TYPE:
  531. var innerType = type.render;
  532. type = type.displayName;
  533. type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
  534. return type;
  535. case REACT_MEMO_TYPE:
  536. return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
  537. case REACT_LAZY_TYPE:
  538. innerType = type._payload;
  539. type = type._init;
  540. try {
  541. return getComponentNameFromType(type(innerType));
  542. } catch (x) {
  543. }
  544. }
  545. return null;
  546. }
  547. function getComponentNameFromOwner(owner) {
  548. return "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null;
  549. }
  550. function getComponentNameFromFiber(fiber) {
  551. var type = fiber.type;
  552. switch (fiber.tag) {
  553. case 31:
  554. return "Activity";
  555. case 24:
  556. return "Cache";
  557. case 9:
  558. return (type._context.displayName || "Context") + ".Consumer";
  559. case 10:
  560. return type.displayName || "Context";
  561. case 18:
  562. return "DehydratedFragment";
  563. case 11:
  564. return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef");
  565. case 7:
  566. return "Fragment";
  567. case 26:
  568. case 27:
  569. case 5:
  570. return type;
  571. case 4:
  572. return "Portal";
  573. case 3:
  574. return "Root";
  575. case 6:
  576. return "Text";
  577. case 16:
  578. return getComponentNameFromType(type);
  579. case 8:
  580. return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
  581. case 22:
  582. return "Offscreen";
  583. case 12:
  584. return "Profiler";
  585. case 21:
  586. return "Scope";
  587. case 13:
  588. return "Suspense";
  589. case 19:
  590. return "SuspenseList";
  591. case 25:
  592. return "TracingMarker";
  593. case 1:
  594. case 0:
  595. case 14:
  596. case 15:
  597. if ("function" === typeof type)
  598. return type.displayName || type.name || null;
  599. if ("string" === typeof type) return type;
  600. break;
  601. case 29:
  602. type = fiber._debugInfo;
  603. if (null != type) {
  604. for (var i = type.length - 1; 0 <= i; i--)
  605. if ("string" === typeof type[i].name) return type[i].name;
  606. }
  607. if (null !== fiber.return)
  608. return getComponentNameFromFiber(fiber.return);
  609. }
  610. return null;
  611. }
  612. function createCursor(defaultValue) {
  613. return { current: defaultValue };
  614. }
  615. function pop(cursor, fiber) {
  616. 0 > index$jscomp$0 ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && console.error("Unexpected Fiber popped."), cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, fiberStack[index$jscomp$0] = null, index$jscomp$0--);
  617. }
  618. function push(cursor, value, fiber) {
  619. index$jscomp$0++;
  620. valueStack[index$jscomp$0] = cursor.current;
  621. fiberStack[index$jscomp$0] = fiber;
  622. cursor.current = value;
  623. }
  624. function requiredContext(c) {
  625. null === c && console.error(
  626. "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
  627. );
  628. return c;
  629. }
  630. function pushHostContainer(fiber, nextRootInstance) {
  631. push(rootInstanceStackCursor, nextRootInstance, fiber);
  632. push(contextFiberStackCursor, fiber, fiber);
  633. push(contextStackCursor, null, fiber);
  634. var nextRootContext = nextRootInstance.nodeType;
  635. switch (nextRootContext) {
  636. case 9:
  637. case 11:
  638. nextRootContext = 9 === nextRootContext ? "#document" : "#fragment";
  639. nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : HostContextNamespaceNone : HostContextNamespaceNone;
  640. break;
  641. default:
  642. if (nextRootContext = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI)
  643. nextRootInstance = getOwnHostContext(nextRootInstance), nextRootInstance = getChildHostContextProd(
  644. nextRootInstance,
  645. nextRootContext
  646. );
  647. else
  648. switch (nextRootContext) {
  649. case "svg":
  650. nextRootInstance = HostContextNamespaceSvg;
  651. break;
  652. case "math":
  653. nextRootInstance = HostContextNamespaceMath;
  654. break;
  655. default:
  656. nextRootInstance = HostContextNamespaceNone;
  657. }
  658. }
  659. nextRootContext = nextRootContext.toLowerCase();
  660. nextRootContext = updatedAncestorInfoDev(null, nextRootContext);
  661. nextRootContext = {
  662. context: nextRootInstance,
  663. ancestorInfo: nextRootContext
  664. };
  665. pop(contextStackCursor, fiber);
  666. push(contextStackCursor, nextRootContext, fiber);
  667. }
  668. function popHostContainer(fiber) {
  669. pop(contextStackCursor, fiber);
  670. pop(contextFiberStackCursor, fiber);
  671. pop(rootInstanceStackCursor, fiber);
  672. }
  673. function getHostContext() {
  674. return requiredContext(contextStackCursor.current);
  675. }
  676. function pushHostContext(fiber) {
  677. null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber, fiber);
  678. var context = requiredContext(contextStackCursor.current);
  679. var type = fiber.type;
  680. var nextContext = getChildHostContextProd(context.context, type);
  681. type = updatedAncestorInfoDev(context.ancestorInfo, type);
  682. nextContext = { context: nextContext, ancestorInfo: type };
  683. context !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber));
  684. }
  685. function popHostContext(fiber) {
  686. contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
  687. hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), HostTransitionContext._currentValue = NotPendingTransition);
  688. }
  689. function disabledLog() {
  690. }
  691. function disableLogs() {
  692. if (0 === disabledDepth) {
  693. prevLog = console.log;
  694. prevInfo = console.info;
  695. prevWarn = console.warn;
  696. prevError = console.error;
  697. prevGroup = console.group;
  698. prevGroupCollapsed = console.groupCollapsed;
  699. prevGroupEnd = console.groupEnd;
  700. var props = {
  701. configurable: true,
  702. enumerable: true,
  703. value: disabledLog,
  704. writable: true
  705. };
  706. Object.defineProperties(console, {
  707. info: props,
  708. log: props,
  709. warn: props,
  710. error: props,
  711. group: props,
  712. groupCollapsed: props,
  713. groupEnd: props
  714. });
  715. }
  716. disabledDepth++;
  717. }
  718. function reenableLogs() {
  719. disabledDepth--;
  720. if (0 === disabledDepth) {
  721. var props = { configurable: true, enumerable: true, writable: true };
  722. Object.defineProperties(console, {
  723. log: assign({}, props, { value: prevLog }),
  724. info: assign({}, props, { value: prevInfo }),
  725. warn: assign({}, props, { value: prevWarn }),
  726. error: assign({}, props, { value: prevError }),
  727. group: assign({}, props, { value: prevGroup }),
  728. groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
  729. groupEnd: assign({}, props, { value: prevGroupEnd })
  730. });
  731. }
  732. 0 > disabledDepth && console.error(
  733. "disabledDepth fell below zero. This is a bug in React. Please file an issue."
  734. );
  735. }
  736. function formatOwnerStack(error) {
  737. var prevPrepareStackTrace = Error.prepareStackTrace;
  738. Error.prepareStackTrace = void 0;
  739. error = error.stack;
  740. Error.prepareStackTrace = prevPrepareStackTrace;
  741. error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29));
  742. prevPrepareStackTrace = error.indexOf("\n");
  743. -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1));
  744. prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
  745. -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf(
  746. "\n",
  747. prevPrepareStackTrace
  748. ));
  749. if (-1 !== prevPrepareStackTrace)
  750. error = error.slice(0, prevPrepareStackTrace);
  751. else return "";
  752. return error;
  753. }
  754. function describeBuiltInComponentFrame(name) {
  755. if (void 0 === prefix)
  756. try {
  757. throw Error();
  758. } catch (x) {
  759. var match = x.stack.trim().match(/\n( *(at )?)/);
  760. prefix = match && match[1] || "";
  761. suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
  762. }
  763. return "\n" + prefix + name + suffix;
  764. }
  765. function describeNativeComponentFrame(fn, construct) {
  766. if (!fn || reentry) return "";
  767. var frame = componentFrameCache.get(fn);
  768. if (void 0 !== frame) return frame;
  769. reentry = true;
  770. frame = Error.prepareStackTrace;
  771. Error.prepareStackTrace = void 0;
  772. var previousDispatcher2 = null;
  773. previousDispatcher2 = ReactSharedInternals.H;
  774. ReactSharedInternals.H = null;
  775. disableLogs();
  776. try {
  777. var RunInRootFrame = {
  778. DetermineComponentFrameRoot: function() {
  779. try {
  780. if (construct) {
  781. var Fake = function() {
  782. throw Error();
  783. };
  784. Object.defineProperty(Fake.prototype, "props", {
  785. set: function() {
  786. throw Error();
  787. }
  788. });
  789. if ("object" === typeof Reflect && Reflect.construct) {
  790. try {
  791. Reflect.construct(Fake, []);
  792. } catch (x) {
  793. var control = x;
  794. }
  795. Reflect.construct(fn, [], Fake);
  796. } else {
  797. try {
  798. Fake.call();
  799. } catch (x$0) {
  800. control = x$0;
  801. }
  802. fn.call(Fake.prototype);
  803. }
  804. } else {
  805. try {
  806. throw Error();
  807. } catch (x$1) {
  808. control = x$1;
  809. }
  810. (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
  811. });
  812. }
  813. } catch (sample) {
  814. if (sample && control && "string" === typeof sample.stack)
  815. return [sample.stack, control.stack];
  816. }
  817. return [null, null];
  818. }
  819. };
  820. RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
  821. var namePropDescriptor = Object.getOwnPropertyDescriptor(
  822. RunInRootFrame.DetermineComponentFrameRoot,
  823. "name"
  824. );
  825. namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
  826. RunInRootFrame.DetermineComponentFrameRoot,
  827. "name",
  828. { value: "DetermineComponentFrameRoot" }
  829. );
  830. var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
  831. if (sampleStack && controlStack) {
  832. var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
  833. for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
  834. "DetermineComponentFrameRoot"
  835. ); )
  836. namePropDescriptor++;
  837. for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
  838. "DetermineComponentFrameRoot"
  839. ); )
  840. _RunInRootFrame$Deter++;
  841. if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
  842. for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
  843. _RunInRootFrame$Deter--;
  844. for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
  845. if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
  846. if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
  847. do
  848. if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
  849. var _frame = "\n" + sampleLines[namePropDescriptor].replace(
  850. " at new ",
  851. " at "
  852. );
  853. fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
  854. "function" === typeof fn && componentFrameCache.set(fn, _frame);
  855. return _frame;
  856. }
  857. while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
  858. }
  859. break;
  860. }
  861. }
  862. } finally {
  863. reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame;
  864. }
  865. sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
  866. "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
  867. return sampleLines;
  868. }
  869. function describeFiber(fiber, childFiber) {
  870. switch (fiber.tag) {
  871. case 26:
  872. case 27:
  873. case 5:
  874. return describeBuiltInComponentFrame(fiber.type);
  875. case 16:
  876. return describeBuiltInComponentFrame("Lazy");
  877. case 13:
  878. return fiber.child !== childFiber && null !== childFiber ? describeBuiltInComponentFrame("Suspense Fallback") : describeBuiltInComponentFrame("Suspense");
  879. case 19:
  880. return describeBuiltInComponentFrame("SuspenseList");
  881. case 0:
  882. case 15:
  883. return describeNativeComponentFrame(fiber.type, false);
  884. case 11:
  885. return describeNativeComponentFrame(fiber.type.render, false);
  886. case 1:
  887. return describeNativeComponentFrame(fiber.type, true);
  888. case 31:
  889. return describeBuiltInComponentFrame("Activity");
  890. default:
  891. return "";
  892. }
  893. }
  894. function getStackByFiberInDevAndProd(workInProgress2) {
  895. try {
  896. var info = "", previous = null;
  897. do {
  898. info += describeFiber(workInProgress2, previous);
  899. var debugInfo = workInProgress2._debugInfo;
  900. if (debugInfo)
  901. for (var i = debugInfo.length - 1; 0 <= i; i--) {
  902. var entry = debugInfo[i];
  903. if ("string" === typeof entry.name) {
  904. var JSCompiler_temp_const = info;
  905. a: {
  906. var name = entry.name, env = entry.env, location = entry.debugLocation;
  907. if (null != location) {
  908. var childStack = formatOwnerStack(location), idx = childStack.lastIndexOf("\n"), lastLine = -1 === idx ? childStack : childStack.slice(idx + 1);
  909. if (-1 !== lastLine.indexOf(name)) {
  910. var JSCompiler_inline_result = "\n" + lastLine;
  911. break a;
  912. }
  913. }
  914. JSCompiler_inline_result = describeBuiltInComponentFrame(
  915. name + (env ? " [" + env + "]" : "")
  916. );
  917. }
  918. info = JSCompiler_temp_const + JSCompiler_inline_result;
  919. }
  920. }
  921. previous = workInProgress2;
  922. workInProgress2 = workInProgress2.return;
  923. } while (workInProgress2);
  924. return info;
  925. } catch (x) {
  926. return "\nError generating stack: " + x.message + "\n" + x.stack;
  927. }
  928. }
  929. function describeFunctionComponentFrameWithoutLineNumber(fn) {
  930. return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : "";
  931. }
  932. function getCurrentFiberOwnerNameInDevOrNull() {
  933. if (null === current) return null;
  934. var owner = current._debugOwner;
  935. return null != owner ? getComponentNameFromOwner(owner) : null;
  936. }
  937. function getCurrentFiberStackInDev() {
  938. if (null === current) return "";
  939. var workInProgress2 = current;
  940. try {
  941. var info = "";
  942. 6 === workInProgress2.tag && (workInProgress2 = workInProgress2.return);
  943. switch (workInProgress2.tag) {
  944. case 26:
  945. case 27:
  946. case 5:
  947. info += describeBuiltInComponentFrame(workInProgress2.type);
  948. break;
  949. case 13:
  950. info += describeBuiltInComponentFrame("Suspense");
  951. break;
  952. case 19:
  953. info += describeBuiltInComponentFrame("SuspenseList");
  954. break;
  955. case 31:
  956. info += describeBuiltInComponentFrame("Activity");
  957. break;
  958. case 30:
  959. case 0:
  960. case 15:
  961. case 1:
  962. workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
  963. workInProgress2.type
  964. ));
  965. break;
  966. case 11:
  967. workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
  968. workInProgress2.type.render
  969. ));
  970. }
  971. for (; workInProgress2; )
  972. if ("number" === typeof workInProgress2.tag) {
  973. var fiber = workInProgress2;
  974. workInProgress2 = fiber._debugOwner;
  975. var debugStack = fiber._debugStack;
  976. if (workInProgress2 && debugStack) {
  977. var formattedStack = formatOwnerStack(debugStack);
  978. "" !== formattedStack && (info += "\n" + formattedStack);
  979. }
  980. } else if (null != workInProgress2.debugStack) {
  981. var ownerStack = workInProgress2.debugStack;
  982. (workInProgress2 = workInProgress2.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack));
  983. } else break;
  984. var JSCompiler_inline_result = info;
  985. } catch (x) {
  986. JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack;
  987. }
  988. return JSCompiler_inline_result;
  989. }
  990. function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
  991. var previousFiber = current;
  992. setCurrentFiber(fiber);
  993. try {
  994. return null !== fiber && fiber._debugTask ? fiber._debugTask.run(
  995. callback.bind(null, arg0, arg1, arg2, arg3, arg4)
  996. ) : callback(arg0, arg1, arg2, arg3, arg4);
  997. } finally {
  998. setCurrentFiber(previousFiber);
  999. }
  1000. throw Error(
  1001. "runWithFiberInDEV should never be called in production. This is a bug in React."
  1002. );
  1003. }
  1004. function setCurrentFiber(fiber) {
  1005. ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev;
  1006. isRendering = false;
  1007. current = fiber;
  1008. }
  1009. function typeName(value) {
  1010. return "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
  1011. }
  1012. function willCoercionThrow(value) {
  1013. try {
  1014. return testStringCoercion(value), false;
  1015. } catch (e) {
  1016. return true;
  1017. }
  1018. }
  1019. function testStringCoercion(value) {
  1020. return "" + value;
  1021. }
  1022. function checkAttributeStringCoercion(value, attributeName) {
  1023. if (willCoercionThrow(value))
  1024. return console.error(
  1025. "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
  1026. attributeName,
  1027. typeName(value)
  1028. ), testStringCoercion(value);
  1029. }
  1030. function checkCSSPropertyStringCoercion(value, propName) {
  1031. if (willCoercionThrow(value))
  1032. return console.error(
  1033. "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
  1034. propName,
  1035. typeName(value)
  1036. ), testStringCoercion(value);
  1037. }
  1038. function checkFormFieldValueStringCoercion(value) {
  1039. if (willCoercionThrow(value))
  1040. return console.error(
  1041. "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
  1042. typeName(value)
  1043. ), testStringCoercion(value);
  1044. }
  1045. function injectInternals(internals) {
  1046. if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
  1047. var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  1048. if (hook.isDisabled) return true;
  1049. if (!hook.supportsFiber)
  1050. return console.error(
  1051. "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
  1052. ), true;
  1053. try {
  1054. rendererID = hook.inject(internals), injectedHook = hook;
  1055. } catch (err) {
  1056. console.error("React instrumentation encountered an error: %o.", err);
  1057. }
  1058. return hook.checkDCE ? true : false;
  1059. }
  1060. function setIsStrictModeForDevtools(newIsStrictMode) {
  1061. "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
  1062. if (injectedHook && "function" === typeof injectedHook.setStrictMode)
  1063. try {
  1064. injectedHook.setStrictMode(rendererID, newIsStrictMode);
  1065. } catch (err) {
  1066. hasLoggedError || (hasLoggedError = true, console.error(
  1067. "React instrumentation encountered an error: %o",
  1068. err
  1069. ));
  1070. }
  1071. }
  1072. function clz32Fallback(x) {
  1073. x >>>= 0;
  1074. return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0;
  1075. }
  1076. function getHighestPriorityLanes(lanes) {
  1077. var pendingSyncLanes = lanes & 42;
  1078. if (0 !== pendingSyncLanes) return pendingSyncLanes;
  1079. switch (lanes & -lanes) {
  1080. case 1:
  1081. return 1;
  1082. case 2:
  1083. return 2;
  1084. case 4:
  1085. return 4;
  1086. case 8:
  1087. return 8;
  1088. case 16:
  1089. return 16;
  1090. case 32:
  1091. return 32;
  1092. case 64:
  1093. return 64;
  1094. case 128:
  1095. return 128;
  1096. case 256:
  1097. case 512:
  1098. case 1024:
  1099. case 2048:
  1100. case 4096:
  1101. case 8192:
  1102. case 16384:
  1103. case 32768:
  1104. case 65536:
  1105. case 131072:
  1106. return lanes & 261888;
  1107. case 262144:
  1108. case 524288:
  1109. case 1048576:
  1110. case 2097152:
  1111. return lanes & 3932160;
  1112. case 4194304:
  1113. case 8388608:
  1114. case 16777216:
  1115. case 33554432:
  1116. return lanes & 62914560;
  1117. case 67108864:
  1118. return 67108864;
  1119. case 134217728:
  1120. return 134217728;
  1121. case 268435456:
  1122. return 268435456;
  1123. case 536870912:
  1124. return 536870912;
  1125. case 1073741824:
  1126. return 0;
  1127. default:
  1128. return console.error(
  1129. "Should have found matching lanes. This is a bug in React."
  1130. ), lanes;
  1131. }
  1132. }
  1133. function getNextLanes(root2, wipLanes, rootHasPendingCommit) {
  1134. var pendingLanes = root2.pendingLanes;
  1135. if (0 === pendingLanes) return 0;
  1136. var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
  1137. root2 = root2.warmLanes;
  1138. var nonIdlePendingLanes = pendingLanes & 134217727;
  1139. 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
  1140. return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes;
  1141. }
  1142. function checkIfRootIsPrerendering(root2, renderLanes2) {
  1143. return 0 === (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2);
  1144. }
  1145. function computeExpirationTime(lane, currentTime) {
  1146. switch (lane) {
  1147. case 1:
  1148. case 2:
  1149. case 4:
  1150. case 8:
  1151. case 64:
  1152. return currentTime + 250;
  1153. case 16:
  1154. case 32:
  1155. case 128:
  1156. case 256:
  1157. case 512:
  1158. case 1024:
  1159. case 2048:
  1160. case 4096:
  1161. case 8192:
  1162. case 16384:
  1163. case 32768:
  1164. case 65536:
  1165. case 131072:
  1166. case 262144:
  1167. case 524288:
  1168. case 1048576:
  1169. case 2097152:
  1170. return currentTime + 5e3;
  1171. case 4194304:
  1172. case 8388608:
  1173. case 16777216:
  1174. case 33554432:
  1175. return -1;
  1176. case 67108864:
  1177. case 134217728:
  1178. case 268435456:
  1179. case 536870912:
  1180. case 1073741824:
  1181. return -1;
  1182. default:
  1183. return console.error(
  1184. "Should have found matching lanes. This is a bug in React."
  1185. ), -1;
  1186. }
  1187. }
  1188. function claimNextRetryLane() {
  1189. var lane = nextRetryLane;
  1190. nextRetryLane <<= 1;
  1191. 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
  1192. return lane;
  1193. }
  1194. function createLaneMap(initial) {
  1195. for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
  1196. return laneMap;
  1197. }
  1198. function markRootUpdated$1(root2, updateLane) {
  1199. root2.pendingLanes |= updateLane;
  1200. 268435456 !== updateLane && (root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0);
  1201. }
  1202. function markRootFinished(root2, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
  1203. var previouslyPendingLanes = root2.pendingLanes;
  1204. root2.pendingLanes = remainingLanes;
  1205. root2.suspendedLanes = 0;
  1206. root2.pingedLanes = 0;
  1207. root2.warmLanes = 0;
  1208. root2.expiredLanes &= remainingLanes;
  1209. root2.entangledLanes &= remainingLanes;
  1210. root2.errorRecoveryDisabledLanes &= remainingLanes;
  1211. root2.shellSuspendCounter = 0;
  1212. var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates;
  1213. for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
  1214. var index = 31 - clz32(remainingLanes), lane = 1 << index;
  1215. entanglements[index] = 0;
  1216. expirationTimes[index] = -1;
  1217. var hiddenUpdatesForLane = hiddenUpdates[index];
  1218. if (null !== hiddenUpdatesForLane)
  1219. for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) {
  1220. var update = hiddenUpdatesForLane[index];
  1221. null !== update && (update.lane &= -536870913);
  1222. }
  1223. remainingLanes &= ~lane;
  1224. }
  1225. 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, 0);
  1226. 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root2.tag && (root2.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
  1227. }
  1228. function markSpawnedDeferredLane(root2, spawnedLane, entangledLanes) {
  1229. root2.pendingLanes |= spawnedLane;
  1230. root2.suspendedLanes &= ~spawnedLane;
  1231. var spawnedLaneIndex = 31 - clz32(spawnedLane);
  1232. root2.entangledLanes |= spawnedLane;
  1233. root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 261930;
  1234. }
  1235. function markRootEntangled(root2, entangledLanes) {
  1236. var rootEntangledLanes = root2.entangledLanes |= entangledLanes;
  1237. for (root2 = root2.entanglements; rootEntangledLanes; ) {
  1238. var index = 31 - clz32(rootEntangledLanes), lane = 1 << index;
  1239. lane & entangledLanes | root2[index] & entangledLanes && (root2[index] |= entangledLanes);
  1240. rootEntangledLanes &= ~lane;
  1241. }
  1242. }
  1243. function getBumpedLaneForHydration(root2, renderLanes2) {
  1244. var renderLane = renderLanes2 & -renderLanes2;
  1245. renderLane = 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
  1246. return 0 !== (renderLane & (root2.suspendedLanes | renderLanes2)) ? 0 : renderLane;
  1247. }
  1248. function getBumpedLaneForHydrationByLane(lane) {
  1249. switch (lane) {
  1250. case 2:
  1251. lane = 1;
  1252. break;
  1253. case 8:
  1254. lane = 4;
  1255. break;
  1256. case 32:
  1257. lane = 16;
  1258. break;
  1259. case 256:
  1260. case 512:
  1261. case 1024:
  1262. case 2048:
  1263. case 4096:
  1264. case 8192:
  1265. case 16384:
  1266. case 32768:
  1267. case 65536:
  1268. case 131072:
  1269. case 262144:
  1270. case 524288:
  1271. case 1048576:
  1272. case 2097152:
  1273. case 4194304:
  1274. case 8388608:
  1275. case 16777216:
  1276. case 33554432:
  1277. lane = 128;
  1278. break;
  1279. case 268435456:
  1280. lane = 134217728;
  1281. break;
  1282. default:
  1283. lane = 0;
  1284. }
  1285. return lane;
  1286. }
  1287. function addFiberToLanesMap(root2, fiber, lanes) {
  1288. if (isDevToolsPresent)
  1289. for (root2 = root2.pendingUpdatersLaneMap; 0 < lanes; ) {
  1290. var index = 31 - clz32(lanes), lane = 1 << index;
  1291. root2[index].add(fiber);
  1292. lanes &= ~lane;
  1293. }
  1294. }
  1295. function movePendingFibersToMemoized(root2, lanes) {
  1296. if (isDevToolsPresent)
  1297. for (var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap, memoizedUpdaters = root2.memoizedUpdaters; 0 < lanes; ) {
  1298. var index = 31 - clz32(lanes);
  1299. root2 = 1 << index;
  1300. index = pendingUpdatersLaneMap[index];
  1301. 0 < index.size && (index.forEach(function(fiber) {
  1302. var alternate = fiber.alternate;
  1303. null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber);
  1304. }), index.clear());
  1305. lanes &= ~root2;
  1306. }
  1307. }
  1308. function lanesToEventPriority(lanes) {
  1309. lanes &= -lanes;
  1310. return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes ? 0 !== (lanes & 134217727) ? DefaultEventPriority : IdleEventPriority : ContinuousEventPriority : DiscreteEventPriority;
  1311. }
  1312. function resolveUpdatePriority() {
  1313. var updatePriority = ReactDOMSharedInternals.p;
  1314. if (0 !== updatePriority) return updatePriority;
  1315. updatePriority = window.event;
  1316. return void 0 === updatePriority ? DefaultEventPriority : getEventPriority(updatePriority.type);
  1317. }
  1318. function runWithPriority(priority, fn) {
  1319. var previousPriority = ReactDOMSharedInternals.p;
  1320. try {
  1321. return ReactDOMSharedInternals.p = priority, fn();
  1322. } finally {
  1323. ReactDOMSharedInternals.p = previousPriority;
  1324. }
  1325. }
  1326. function detachDeletedInstance(node) {
  1327. delete node[internalInstanceKey];
  1328. delete node[internalPropsKey];
  1329. delete node[internalEventHandlersKey];
  1330. delete node[internalEventHandlerListenersKey];
  1331. delete node[internalEventHandlesSetKey];
  1332. }
  1333. function getClosestInstanceFromNode(targetNode) {
  1334. var targetInst = targetNode[internalInstanceKey];
  1335. if (targetInst) return targetInst;
  1336. for (var parentNode = targetNode.parentNode; parentNode; ) {
  1337. if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) {
  1338. parentNode = targetInst.alternate;
  1339. if (null !== targetInst.child || null !== parentNode && null !== parentNode.child)
  1340. for (targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) {
  1341. if (parentNode = targetNode[internalInstanceKey])
  1342. return parentNode;
  1343. targetNode = getParentHydrationBoundary(targetNode);
  1344. }
  1345. return targetInst;
  1346. }
  1347. targetNode = parentNode;
  1348. parentNode = targetNode.parentNode;
  1349. }
  1350. return null;
  1351. }
  1352. function getInstanceFromNode(node) {
  1353. if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) {
  1354. var tag = node.tag;
  1355. if (5 === tag || 6 === tag || 13 === tag || 31 === tag || 26 === tag || 27 === tag || 3 === tag)
  1356. return node;
  1357. }
  1358. return null;
  1359. }
  1360. function getNodeFromInstance(inst) {
  1361. var tag = inst.tag;
  1362. if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
  1363. return inst.stateNode;
  1364. throw Error("getNodeFromInstance: Invalid argument.");
  1365. }
  1366. function getResourcesFromRoot(root2) {
  1367. var resources = root2[internalRootNodeResourcesKey];
  1368. resources || (resources = root2[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() });
  1369. return resources;
  1370. }
  1371. function markNodeAsHoistable(node) {
  1372. node[internalHoistableMarker] = true;
  1373. }
  1374. function registerTwoPhaseEvent(registrationName, dependencies) {
  1375. registerDirectEvent(registrationName, dependencies);
  1376. registerDirectEvent(registrationName + "Capture", dependencies);
  1377. }
  1378. function registerDirectEvent(registrationName, dependencies) {
  1379. registrationNameDependencies[registrationName] && console.error(
  1380. "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
  1381. registrationName
  1382. );
  1383. registrationNameDependencies[registrationName] = dependencies;
  1384. var lowerCasedName = registrationName.toLowerCase();
  1385. possibleRegistrationNames[lowerCasedName] = registrationName;
  1386. "onDoubleClick" === registrationName && (possibleRegistrationNames.ondblclick = registrationName);
  1387. for (registrationName = 0; registrationName < dependencies.length; registrationName++)
  1388. allNativeEvents.add(dependencies[registrationName]);
  1389. }
  1390. function checkControlledValueProps(tagName, props) {
  1391. hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error(
  1392. "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
  1393. ) : console.error(
  1394. "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
  1395. ));
  1396. props.onChange || props.readOnly || props.disabled || null == props.checked || console.error(
  1397. "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
  1398. );
  1399. }
  1400. function isAttributeNameSafe(attributeName) {
  1401. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
  1402. return true;
  1403. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
  1404. return false;
  1405. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
  1406. return validatedAttributeNameCache[attributeName] = true;
  1407. illegalAttributeNameCache[attributeName] = true;
  1408. console.error("Invalid attribute name: `%s`", attributeName);
  1409. return false;
  1410. }
  1411. function getValueForAttributeOnCustomComponent(node, name, expected) {
  1412. if (isAttributeNameSafe(name)) {
  1413. if (!node.hasAttribute(name)) {
  1414. switch (typeof expected) {
  1415. case "symbol":
  1416. case "object":
  1417. return expected;
  1418. case "function":
  1419. return expected;
  1420. case "boolean":
  1421. if (false === expected) return expected;
  1422. }
  1423. return void 0 === expected ? void 0 : null;
  1424. }
  1425. node = node.getAttribute(name);
  1426. if ("" === node && true === expected) return true;
  1427. checkAttributeStringCoercion(expected, name);
  1428. return node === "" + expected ? expected : node;
  1429. }
  1430. }
  1431. function setValueForAttribute(node, name, value) {
  1432. if (isAttributeNameSafe(name))
  1433. if (null === value) node.removeAttribute(name);
  1434. else {
  1435. switch (typeof value) {
  1436. case "undefined":
  1437. case "function":
  1438. case "symbol":
  1439. node.removeAttribute(name);
  1440. return;
  1441. case "boolean":
  1442. var prefix2 = name.toLowerCase().slice(0, 5);
  1443. if ("data-" !== prefix2 && "aria-" !== prefix2) {
  1444. node.removeAttribute(name);
  1445. return;
  1446. }
  1447. }
  1448. checkAttributeStringCoercion(value, name);
  1449. node.setAttribute(name, "" + value);
  1450. }
  1451. }
  1452. function setValueForKnownAttribute(node, name, value) {
  1453. if (null === value) node.removeAttribute(name);
  1454. else {
  1455. switch (typeof value) {
  1456. case "undefined":
  1457. case "function":
  1458. case "symbol":
  1459. case "boolean":
  1460. node.removeAttribute(name);
  1461. return;
  1462. }
  1463. checkAttributeStringCoercion(value, name);
  1464. node.setAttribute(name, "" + value);
  1465. }
  1466. }
  1467. function setValueForNamespacedAttribute(node, namespace, name, value) {
  1468. if (null === value) node.removeAttribute(name);
  1469. else {
  1470. switch (typeof value) {
  1471. case "undefined":
  1472. case "function":
  1473. case "symbol":
  1474. case "boolean":
  1475. node.removeAttribute(name);
  1476. return;
  1477. }
  1478. checkAttributeStringCoercion(value, name);
  1479. node.setAttributeNS(namespace, name, "" + value);
  1480. }
  1481. }
  1482. function getToStringValue(value) {
  1483. switch (typeof value) {
  1484. case "bigint":
  1485. case "boolean":
  1486. case "number":
  1487. case "string":
  1488. case "undefined":
  1489. return value;
  1490. case "object":
  1491. return checkFormFieldValueStringCoercion(value), value;
  1492. default:
  1493. return "";
  1494. }
  1495. }
  1496. function isCheckable(elem) {
  1497. var type = elem.type;
  1498. return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type || "radio" === type);
  1499. }
  1500. function trackValueOnNode(node, valueField, currentValue) {
  1501. var descriptor = Object.getOwnPropertyDescriptor(
  1502. node.constructor.prototype,
  1503. valueField
  1504. );
  1505. if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) {
  1506. var get = descriptor.get, set = descriptor.set;
  1507. Object.defineProperty(node, valueField, {
  1508. configurable: true,
  1509. get: function() {
  1510. return get.call(this);
  1511. },
  1512. set: function(value) {
  1513. checkFormFieldValueStringCoercion(value);
  1514. currentValue = "" + value;
  1515. set.call(this, value);
  1516. }
  1517. });
  1518. Object.defineProperty(node, valueField, {
  1519. enumerable: descriptor.enumerable
  1520. });
  1521. return {
  1522. getValue: function() {
  1523. return currentValue;
  1524. },
  1525. setValue: function(value) {
  1526. checkFormFieldValueStringCoercion(value);
  1527. currentValue = "" + value;
  1528. },
  1529. stopTracking: function() {
  1530. node._valueTracker = null;
  1531. delete node[valueField];
  1532. }
  1533. };
  1534. }
  1535. }
  1536. function track(node) {
  1537. if (!node._valueTracker) {
  1538. var valueField = isCheckable(node) ? "checked" : "value";
  1539. node._valueTracker = trackValueOnNode(
  1540. node,
  1541. valueField,
  1542. "" + node[valueField]
  1543. );
  1544. }
  1545. }
  1546. function updateValueIfChanged(node) {
  1547. if (!node) return false;
  1548. var tracker = node._valueTracker;
  1549. if (!tracker) return true;
  1550. var lastValue = tracker.getValue();
  1551. var value = "";
  1552. node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value);
  1553. node = value;
  1554. return node !== lastValue ? (tracker.setValue(node), true) : false;
  1555. }
  1556. function getActiveElement(doc) {
  1557. doc = doc || ("undefined" !== typeof document ? document : void 0);
  1558. if ("undefined" === typeof doc) return null;
  1559. try {
  1560. return doc.activeElement || doc.body;
  1561. } catch (e) {
  1562. return doc.body;
  1563. }
  1564. }
  1565. function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
  1566. return value.replace(
  1567. escapeSelectorAttributeValueInsideDoubleQuotesRegex,
  1568. function(ch) {
  1569. return "\\" + ch.charCodeAt(0).toString(16) + " ";
  1570. }
  1571. );
  1572. }
  1573. function validateInputProps(element, props) {
  1574. void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || (console.error(
  1575. "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
  1576. getCurrentFiberOwnerNameInDevOrNull() || "A component",
  1577. props.type
  1578. ), didWarnCheckedDefaultChecked = true);
  1579. void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || (console.error(
  1580. "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
  1581. getCurrentFiberOwnerNameInDevOrNull() || "A component",
  1582. props.type
  1583. ), didWarnValueDefaultValue$1 = true);
  1584. }
  1585. function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {
  1586. element.name = "";
  1587. null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type ? (checkAttributeStringCoercion(type, "type"), element.type = type) : element.removeAttribute("type");
  1588. if (null != value)
  1589. if ("number" === type) {
  1590. if (0 === value && "" === element.value || element.value != value)
  1591. element.value = "" + getToStringValue(value);
  1592. } else
  1593. element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value));
  1594. else
  1595. "submit" !== type && "reset" !== type || element.removeAttribute("value");
  1596. null != value ? setDefaultValue(element, type, getToStringValue(value)) : null != defaultValue ? setDefaultValue(element, type, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value");
  1597. null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked);
  1598. null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked);
  1599. null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? (checkAttributeStringCoercion(name, "name"), element.name = "" + getToStringValue(name)) : element.removeAttribute("name");
  1600. }
  1601. function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating2) {
  1602. null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type && (checkAttributeStringCoercion(type, "type"), element.type = type);
  1603. if (null != value || null != defaultValue) {
  1604. if (!("submit" !== type && "reset" !== type || void 0 !== value && null !== value)) {
  1605. track(element);
  1606. return;
  1607. }
  1608. defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  1609. value = null != value ? "" + getToStringValue(value) : defaultValue;
  1610. isHydrating2 || value === element.value || (element.value = value);
  1611. element.defaultValue = value;
  1612. }
  1613. checked = null != checked ? checked : defaultChecked;
  1614. checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
  1615. element.checked = isHydrating2 ? element.checked : !!checked;
  1616. element.defaultChecked = !!checked;
  1617. null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (checkAttributeStringCoercion(name, "name"), element.name = name);
  1618. track(element);
  1619. }
  1620. function setDefaultValue(node, type, value) {
  1621. "number" === type && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value || (node.defaultValue = "" + value);
  1622. }
  1623. function validateOptionProps(element, props) {
  1624. null == props.value && ("object" === typeof props.children && null !== props.children ? React.Children.forEach(props.children, function(child) {
  1625. null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = true, console.error(
  1626. "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
  1627. ));
  1628. }) : null == props.dangerouslySetInnerHTML || didWarnInvalidInnerHTML || (didWarnInvalidInnerHTML = true, console.error(
  1629. "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
  1630. )));
  1631. null == props.selected || didWarnSelectedSetOnOption || (console.error(
  1632. "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
  1633. ), didWarnSelectedSetOnOption = true);
  1634. }
  1635. function getDeclarationErrorAddendum() {
  1636. var ownerName = getCurrentFiberOwnerNameInDevOrNull();
  1637. return ownerName ? "\n\nCheck the render method of `" + ownerName + "`." : "";
  1638. }
  1639. function updateOptions(node, multiple, propValue, setDefaultSelected) {
  1640. node = node.options;
  1641. if (multiple) {
  1642. multiple = {};
  1643. for (var i = 0; i < propValue.length; i++)
  1644. multiple["$" + propValue[i]] = true;
  1645. for (propValue = 0; propValue < node.length; propValue++)
  1646. i = multiple.hasOwnProperty("$" + node[propValue].value), node[propValue].selected !== i && (node[propValue].selected = i), i && setDefaultSelected && (node[propValue].defaultSelected = true);
  1647. } else {
  1648. propValue = "" + getToStringValue(propValue);
  1649. multiple = null;
  1650. for (i = 0; i < node.length; i++) {
  1651. if (node[i].value === propValue) {
  1652. node[i].selected = true;
  1653. setDefaultSelected && (node[i].defaultSelected = true);
  1654. return;
  1655. }
  1656. null !== multiple || node[i].disabled || (multiple = node[i]);
  1657. }
  1658. null !== multiple && (multiple.selected = true);
  1659. }
  1660. }
  1661. function validateSelectProps(element, props) {
  1662. for (element = 0; element < valuePropNames.length; element++) {
  1663. var propName = valuePropNames[element];
  1664. if (null != props[propName]) {
  1665. var propNameIsArray = isArrayImpl(props[propName]);
  1666. props.multiple && !propNameIsArray ? console.error(
  1667. "The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",
  1668. propName,
  1669. getDeclarationErrorAddendum()
  1670. ) : !props.multiple && propNameIsArray && console.error(
  1671. "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",
  1672. propName,
  1673. getDeclarationErrorAddendum()
  1674. );
  1675. }
  1676. }
  1677. void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue || (console.error(
  1678. "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"
  1679. ), didWarnValueDefaultValue = true);
  1680. }
  1681. function validateTextareaProps(element, props) {
  1682. void 0 === props.value || void 0 === props.defaultValue || didWarnValDefaultVal || (console.error(
  1683. "%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",
  1684. getCurrentFiberOwnerNameInDevOrNull() || "A component"
  1685. ), didWarnValDefaultVal = true);
  1686. null != props.children && null == props.value && console.error(
  1687. "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
  1688. );
  1689. }
  1690. function updateTextarea(element, value, defaultValue) {
  1691. if (null != value && (value = "" + getToStringValue(value), value !== element.value && (element.value = value), null == defaultValue)) {
  1692. element.defaultValue !== value && (element.defaultValue = value);
  1693. return;
  1694. }
  1695. element.defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  1696. }
  1697. function initTextarea(element, value, defaultValue, children) {
  1698. if (null == value) {
  1699. if (null != children) {
  1700. if (null != defaultValue)
  1701. throw Error(
  1702. "If you supply `defaultValue` on a <textarea>, do not pass children."
  1703. );
  1704. if (isArrayImpl(children)) {
  1705. if (1 < children.length)
  1706. throw Error("<textarea> can only have at most one child.");
  1707. children = children[0];
  1708. }
  1709. defaultValue = children;
  1710. }
  1711. null == defaultValue && (defaultValue = "");
  1712. value = defaultValue;
  1713. }
  1714. defaultValue = getToStringValue(value);
  1715. element.defaultValue = defaultValue;
  1716. children = element.textContent;
  1717. children === defaultValue && "" !== children && null !== children && (element.value = children);
  1718. track(element);
  1719. }
  1720. function findNotableNode(node, indent) {
  1721. return void 0 === node.serverProps && 0 === node.serverTail.length && 1 === node.children.length && 3 < node.distanceFromLeaf && node.distanceFromLeaf > 15 - indent ? findNotableNode(node.children[0], indent) : node;
  1722. }
  1723. function indentation(indent) {
  1724. return " " + " ".repeat(indent);
  1725. }
  1726. function added(indent) {
  1727. return "+ " + " ".repeat(indent);
  1728. }
  1729. function removed(indent) {
  1730. return "- " + " ".repeat(indent);
  1731. }
  1732. function describeFiberType(fiber) {
  1733. switch (fiber.tag) {
  1734. case 26:
  1735. case 27:
  1736. case 5:
  1737. return fiber.type;
  1738. case 16:
  1739. return "Lazy";
  1740. case 31:
  1741. return "Activity";
  1742. case 13:
  1743. return "Suspense";
  1744. case 19:
  1745. return "SuspenseList";
  1746. case 0:
  1747. case 15:
  1748. return fiber = fiber.type, fiber.displayName || fiber.name || null;
  1749. case 11:
  1750. return fiber = fiber.type.render, fiber.displayName || fiber.name || null;
  1751. case 1:
  1752. return fiber = fiber.type, fiber.displayName || fiber.name || null;
  1753. default:
  1754. return null;
  1755. }
  1756. }
  1757. function describeTextNode(content, maxLength) {
  1758. return needsEscaping.test(content) ? (content = JSON.stringify(content), content.length > maxLength - 2 ? 8 > maxLength ? '{"..."}' : "{" + content.slice(0, maxLength - 7) + '..."}' : "{" + content + "}") : content.length > maxLength ? 5 > maxLength ? '{"..."}' : content.slice(0, maxLength - 3) + "..." : content;
  1759. }
  1760. function describeTextDiff(clientText, serverProps, indent) {
  1761. var maxLength = 120 - 2 * indent;
  1762. if (null === serverProps)
  1763. return added(indent) + describeTextNode(clientText, maxLength) + "\n";
  1764. if ("string" === typeof serverProps) {
  1765. for (var firstDiff = 0; firstDiff < serverProps.length && firstDiff < clientText.length && serverProps.charCodeAt(firstDiff) === clientText.charCodeAt(firstDiff); firstDiff++) ;
  1766. firstDiff > maxLength - 8 && 10 < firstDiff && (clientText = "..." + clientText.slice(firstDiff - 8), serverProps = "..." + serverProps.slice(firstDiff - 8));
  1767. return added(indent) + describeTextNode(clientText, maxLength) + "\n" + removed(indent) + describeTextNode(serverProps, maxLength) + "\n";
  1768. }
  1769. return indentation(indent) + describeTextNode(clientText, maxLength) + "\n";
  1770. }
  1771. function objectName(object) {
  1772. return Object.prototype.toString.call(object).replace(/^\[object (.*)\]$/, function(m, p0) {
  1773. return p0;
  1774. });
  1775. }
  1776. function describeValue(value, maxLength) {
  1777. switch (typeof value) {
  1778. case "string":
  1779. return value = JSON.stringify(value), value.length > maxLength ? 5 > maxLength ? '"..."' : value.slice(0, maxLength - 4) + '..."' : value;
  1780. case "object":
  1781. if (null === value) return "null";
  1782. if (isArrayImpl(value)) return "[...]";
  1783. if (value.$$typeof === REACT_ELEMENT_TYPE)
  1784. return (maxLength = getComponentNameFromType(value.type)) ? "<" + maxLength + ">" : "<...>";
  1785. var name = objectName(value);
  1786. if ("Object" === name) {
  1787. name = "";
  1788. maxLength -= 2;
  1789. for (var propName in value)
  1790. if (value.hasOwnProperty(propName)) {
  1791. var jsonPropName = JSON.stringify(propName);
  1792. jsonPropName !== '"' + propName + '"' && (propName = jsonPropName);
  1793. maxLength -= propName.length - 2;
  1794. jsonPropName = describeValue(
  1795. value[propName],
  1796. 15 > maxLength ? maxLength : 15
  1797. );
  1798. maxLength -= jsonPropName.length;
  1799. if (0 > maxLength) {
  1800. name += "" === name ? "..." : ", ...";
  1801. break;
  1802. }
  1803. name += ("" === name ? "" : ",") + propName + ":" + jsonPropName;
  1804. }
  1805. return "{" + name + "}";
  1806. }
  1807. return name;
  1808. case "function":
  1809. return (maxLength = value.displayName || value.name) ? "function " + maxLength : "function";
  1810. default:
  1811. return String(value);
  1812. }
  1813. }
  1814. function describePropValue(value, maxLength) {
  1815. return "string" !== typeof value || needsEscaping.test(value) ? "{" + describeValue(value, maxLength - 2) + "}" : value.length > maxLength - 2 ? 5 > maxLength ? '"..."' : '"' + value.slice(0, maxLength - 5) + '..."' : '"' + value + '"';
  1816. }
  1817. function describeExpandedElement(type, props, rowPrefix) {
  1818. var remainingRowLength = 120 - rowPrefix.length - type.length, properties = [], propName;
  1819. for (propName in props)
  1820. if (props.hasOwnProperty(propName) && "children" !== propName) {
  1821. var propValue = describePropValue(
  1822. props[propName],
  1823. 120 - rowPrefix.length - propName.length - 1
  1824. );
  1825. remainingRowLength -= propName.length + propValue.length + 2;
  1826. properties.push(propName + "=" + propValue);
  1827. }
  1828. return 0 === properties.length ? rowPrefix + "<" + type + ">\n" : 0 < remainingRowLength ? rowPrefix + "<" + type + " " + properties.join(" ") + ">\n" : rowPrefix + "<" + type + "\n" + rowPrefix + " " + properties.join("\n" + rowPrefix + " ") + "\n" + rowPrefix + ">\n";
  1829. }
  1830. function describePropertiesDiff(clientObject, serverObject, indent) {
  1831. var properties = "", remainingServerProperties = assign({}, serverObject), propName;
  1832. for (propName in clientObject)
  1833. if (clientObject.hasOwnProperty(propName)) {
  1834. delete remainingServerProperties[propName];
  1835. var maxLength = 120 - 2 * indent - propName.length - 2, clientPropValue = describeValue(clientObject[propName], maxLength);
  1836. serverObject.hasOwnProperty(propName) ? (maxLength = describeValue(serverObject[propName], maxLength), properties += added(indent) + propName + ": " + clientPropValue + "\n", properties += removed(indent) + propName + ": " + maxLength + "\n") : properties += added(indent) + propName + ": " + clientPropValue + "\n";
  1837. }
  1838. for (var _propName in remainingServerProperties)
  1839. remainingServerProperties.hasOwnProperty(_propName) && (clientObject = describeValue(
  1840. remainingServerProperties[_propName],
  1841. 120 - 2 * indent - _propName.length - 2
  1842. ), properties += removed(indent) + _propName + ": " + clientObject + "\n");
  1843. return properties;
  1844. }
  1845. function describeElementDiff(type, clientProps, serverProps, indent) {
  1846. var content = "", serverPropNames = /* @__PURE__ */ new Map();
  1847. for (propName$jscomp$0 in serverProps)
  1848. serverProps.hasOwnProperty(propName$jscomp$0) && serverPropNames.set(
  1849. propName$jscomp$0.toLowerCase(),
  1850. propName$jscomp$0
  1851. );
  1852. if (1 === serverPropNames.size && serverPropNames.has("children"))
  1853. content += describeExpandedElement(
  1854. type,
  1855. clientProps,
  1856. indentation(indent)
  1857. );
  1858. else {
  1859. for (var _propName2 in clientProps)
  1860. if (clientProps.hasOwnProperty(_propName2) && "children" !== _propName2) {
  1861. var maxLength$jscomp$0 = 120 - 2 * (indent + 1) - _propName2.length - 1, serverPropName = serverPropNames.get(_propName2.toLowerCase());
  1862. if (void 0 !== serverPropName) {
  1863. serverPropNames.delete(_propName2.toLowerCase());
  1864. var propName$jscomp$0 = clientProps[_propName2];
  1865. serverPropName = serverProps[serverPropName];
  1866. var clientPropValue = describePropValue(
  1867. propName$jscomp$0,
  1868. maxLength$jscomp$0
  1869. );
  1870. maxLength$jscomp$0 = describePropValue(
  1871. serverPropName,
  1872. maxLength$jscomp$0
  1873. );
  1874. "object" === typeof propName$jscomp$0 && null !== propName$jscomp$0 && "object" === typeof serverPropName && null !== serverPropName && "Object" === objectName(propName$jscomp$0) && "Object" === objectName(serverPropName) && (2 < Object.keys(propName$jscomp$0).length || 2 < Object.keys(serverPropName).length || -1 < clientPropValue.indexOf("...") || -1 < maxLength$jscomp$0.indexOf("...")) ? content += indentation(indent + 1) + _propName2 + "={{\n" + describePropertiesDiff(
  1875. propName$jscomp$0,
  1876. serverPropName,
  1877. indent + 2
  1878. ) + indentation(indent + 1) + "}}\n" : (content += added(indent + 1) + _propName2 + "=" + clientPropValue + "\n", content += removed(indent + 1) + _propName2 + "=" + maxLength$jscomp$0 + "\n");
  1879. } else
  1880. content += indentation(indent + 1) + _propName2 + "=" + describePropValue(clientProps[_propName2], maxLength$jscomp$0) + "\n";
  1881. }
  1882. serverPropNames.forEach(function(propName) {
  1883. if ("children" !== propName) {
  1884. var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;
  1885. content += removed(indent + 1) + propName + "=" + describePropValue(serverProps[propName], maxLength) + "\n";
  1886. }
  1887. });
  1888. content = "" === content ? indentation(indent) + "<" + type + ">\n" : indentation(indent) + "<" + type + "\n" + content + indentation(indent) + ">\n";
  1889. }
  1890. type = serverProps.children;
  1891. clientProps = clientProps.children;
  1892. if ("string" === typeof type || "number" === typeof type || "bigint" === typeof type) {
  1893. serverPropNames = "";
  1894. if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
  1895. serverPropNames = "" + clientProps;
  1896. content += describeTextDiff(serverPropNames, "" + type, indent + 1);
  1897. } else if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
  1898. content = null == type ? content + describeTextDiff("" + clientProps, null, indent + 1) : content + describeTextDiff("" + clientProps, void 0, indent + 1);
  1899. return content;
  1900. }
  1901. function describeSiblingFiber(fiber, indent) {
  1902. var type = describeFiberType(fiber);
  1903. if (null === type) {
  1904. type = "";
  1905. for (fiber = fiber.child; fiber; )
  1906. type += describeSiblingFiber(fiber, indent), fiber = fiber.sibling;
  1907. return type;
  1908. }
  1909. return indentation(indent) + "<" + type + ">\n";
  1910. }
  1911. function describeNode(node, indent) {
  1912. var skipToNode = findNotableNode(node, indent);
  1913. if (skipToNode !== node && (1 !== node.children.length || node.children[0] !== skipToNode))
  1914. return indentation(indent) + "...\n" + describeNode(skipToNode, indent + 1);
  1915. skipToNode = "";
  1916. var debugInfo = node.fiber._debugInfo;
  1917. if (debugInfo)
  1918. for (var i = 0; i < debugInfo.length; i++) {
  1919. var serverComponentName = debugInfo[i].name;
  1920. "string" === typeof serverComponentName && (skipToNode += indentation(indent) + "<" + serverComponentName + ">\n", indent++);
  1921. }
  1922. debugInfo = "";
  1923. i = node.fiber.pendingProps;
  1924. if (6 === node.fiber.tag)
  1925. debugInfo = describeTextDiff(i, node.serverProps, indent), indent++;
  1926. else if (serverComponentName = describeFiberType(node.fiber), null !== serverComponentName)
  1927. if (void 0 === node.serverProps) {
  1928. debugInfo = indent;
  1929. var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2, content = "";
  1930. for (propName in i)
  1931. if (i.hasOwnProperty(propName) && "children" !== propName) {
  1932. var propValue = describePropValue(i[propName], 15);
  1933. maxLength -= propName.length + propValue.length + 2;
  1934. if (0 > maxLength) {
  1935. content += " ...";
  1936. break;
  1937. }
  1938. content += " " + propName + "=" + propValue;
  1939. }
  1940. debugInfo = indentation(debugInfo) + "<" + serverComponentName + content + ">\n";
  1941. indent++;
  1942. } else
  1943. null === node.serverProps ? (debugInfo = describeExpandedElement(
  1944. serverComponentName,
  1945. i,
  1946. added(indent)
  1947. ), indent++) : "string" === typeof node.serverProps ? console.error(
  1948. "Should not have matched a non HostText fiber to a Text node. This is a bug in React."
  1949. ) : (debugInfo = describeElementDiff(
  1950. serverComponentName,
  1951. i,
  1952. node.serverProps,
  1953. indent
  1954. ), indent++);
  1955. var propName = "";
  1956. i = node.fiber.child;
  1957. for (serverComponentName = 0; i && serverComponentName < node.children.length; )
  1958. maxLength = node.children[serverComponentName], maxLength.fiber === i ? (propName += describeNode(maxLength, indent), serverComponentName++) : propName += describeSiblingFiber(i, indent), i = i.sibling;
  1959. i && 0 < node.children.length && (propName += indentation(indent) + "...\n");
  1960. i = node.serverTail;
  1961. null === node.serverProps && indent--;
  1962. for (node = 0; node < i.length; node++)
  1963. serverComponentName = i[node], propName = "string" === typeof serverComponentName ? propName + (removed(indent) + describeTextNode(serverComponentName, 120 - 2 * indent) + "\n") : propName + describeExpandedElement(
  1964. serverComponentName.type,
  1965. serverComponentName.props,
  1966. removed(indent)
  1967. );
  1968. return skipToNode + debugInfo + propName;
  1969. }
  1970. function describeDiff(rootNode) {
  1971. try {
  1972. return "\n\n" + describeNode(rootNode, 0);
  1973. } catch (x) {
  1974. return "";
  1975. }
  1976. }
  1977. function describeAncestors(ancestor, child, props) {
  1978. for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )
  1979. fiber === ancestor && (distanceFromLeaf = 0), node = {
  1980. fiber,
  1981. children: null !== node ? [node] : [],
  1982. serverProps: fiber === child ? props : fiber === ancestor ? null : void 0,
  1983. serverTail: [],
  1984. distanceFromLeaf
  1985. }, distanceFromLeaf++, fiber = fiber.return;
  1986. return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, ">") : "";
  1987. }
  1988. function updatedAncestorInfoDev(oldInfo, tag) {
  1989. var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev), info = { tag };
  1990. -1 !== inScopeTags.indexOf(tag) && (ancestorInfo.aTagInScope = null, ancestorInfo.buttonTagInScope = null, ancestorInfo.nobrTagInScope = null);
  1991. -1 !== buttonScopeTags.indexOf(tag) && (ancestorInfo.pTagInButtonScope = null);
  1992. -1 !== specialTags.indexOf(tag) && "address" !== tag && "div" !== tag && "p" !== tag && (ancestorInfo.listItemTagAutoclosing = null, ancestorInfo.dlItemTagAutoclosing = null);
  1993. ancestorInfo.current = info;
  1994. "form" === tag && (ancestorInfo.formTag = info);
  1995. "a" === tag && (ancestorInfo.aTagInScope = info);
  1996. "button" === tag && (ancestorInfo.buttonTagInScope = info);
  1997. "nobr" === tag && (ancestorInfo.nobrTagInScope = info);
  1998. "p" === tag && (ancestorInfo.pTagInButtonScope = info);
  1999. "li" === tag && (ancestorInfo.listItemTagAutoclosing = info);
  2000. if ("dd" === tag || "dt" === tag)
  2001. ancestorInfo.dlItemTagAutoclosing = info;
  2002. "#document" === tag || "html" === tag ? ancestorInfo.containerTagInScope = null : ancestorInfo.containerTagInScope || (ancestorInfo.containerTagInScope = info);
  2003. null !== oldInfo || "#document" !== tag && "html" !== tag && "body" !== tag ? true === ancestorInfo.implicitRootScope && (ancestorInfo.implicitRootScope = false) : ancestorInfo.implicitRootScope = true;
  2004. return ancestorInfo;
  2005. }
  2006. function isTagValidWithParent(tag, parentTag, implicitRootScope) {
  2007. switch (parentTag) {
  2008. case "select":
  2009. return "hr" === tag || "option" === tag || "optgroup" === tag || "script" === tag || "template" === tag || "#text" === tag;
  2010. case "optgroup":
  2011. return "option" === tag || "#text" === tag;
  2012. case "option":
  2013. return "#text" === tag;
  2014. case "tr":
  2015. return "th" === tag || "td" === tag || "style" === tag || "script" === tag || "template" === tag;
  2016. case "tbody":
  2017. case "thead":
  2018. case "tfoot":
  2019. return "tr" === tag || "style" === tag || "script" === tag || "template" === tag;
  2020. case "colgroup":
  2021. return "col" === tag || "template" === tag;
  2022. case "table":
  2023. return "caption" === tag || "colgroup" === tag || "tbody" === tag || "tfoot" === tag || "thead" === tag || "style" === tag || "script" === tag || "template" === tag;
  2024. case "head":
  2025. return "base" === tag || "basefont" === tag || "bgsound" === tag || "link" === tag || "meta" === tag || "title" === tag || "noscript" === tag || "noframes" === tag || "style" === tag || "script" === tag || "template" === tag;
  2026. case "html":
  2027. if (implicitRootScope) break;
  2028. return "head" === tag || "body" === tag || "frameset" === tag;
  2029. case "frameset":
  2030. return "frame" === tag;
  2031. case "#document":
  2032. if (!implicitRootScope) return "html" === tag;
  2033. }
  2034. switch (tag) {
  2035. case "h1":
  2036. case "h2":
  2037. case "h3":
  2038. case "h4":
  2039. case "h5":
  2040. case "h6":
  2041. return "h1" !== parentTag && "h2" !== parentTag && "h3" !== parentTag && "h4" !== parentTag && "h5" !== parentTag && "h6" !== parentTag;
  2042. case "rp":
  2043. case "rt":
  2044. return -1 === impliedEndTags.indexOf(parentTag);
  2045. case "caption":
  2046. case "col":
  2047. case "colgroup":
  2048. case "frameset":
  2049. case "frame":
  2050. case "tbody":
  2051. case "td":
  2052. case "tfoot":
  2053. case "th":
  2054. case "thead":
  2055. case "tr":
  2056. return null == parentTag;
  2057. case "head":
  2058. return implicitRootScope || null === parentTag;
  2059. case "html":
  2060. return implicitRootScope && "#document" === parentTag || null === parentTag;
  2061. case "body":
  2062. return implicitRootScope && ("#document" === parentTag || "html" === parentTag) || null === parentTag;
  2063. }
  2064. return true;
  2065. }
  2066. function findInvalidAncestorForTag(tag, ancestorInfo) {
  2067. switch (tag) {
  2068. case "address":
  2069. case "article":
  2070. case "aside":
  2071. case "blockquote":
  2072. case "center":
  2073. case "details":
  2074. case "dialog":
  2075. case "dir":
  2076. case "div":
  2077. case "dl":
  2078. case "fieldset":
  2079. case "figcaption":
  2080. case "figure":
  2081. case "footer":
  2082. case "header":
  2083. case "hgroup":
  2084. case "main":
  2085. case "menu":
  2086. case "nav":
  2087. case "ol":
  2088. case "p":
  2089. case "section":
  2090. case "summary":
  2091. case "ul":
  2092. case "pre":
  2093. case "listing":
  2094. case "table":
  2095. case "hr":
  2096. case "xmp":
  2097. case "h1":
  2098. case "h2":
  2099. case "h3":
  2100. case "h4":
  2101. case "h5":
  2102. case "h6":
  2103. return ancestorInfo.pTagInButtonScope;
  2104. case "form":
  2105. return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
  2106. case "li":
  2107. return ancestorInfo.listItemTagAutoclosing;
  2108. case "dd":
  2109. case "dt":
  2110. return ancestorInfo.dlItemTagAutoclosing;
  2111. case "button":
  2112. return ancestorInfo.buttonTagInScope;
  2113. case "a":
  2114. return ancestorInfo.aTagInScope;
  2115. case "nobr":
  2116. return ancestorInfo.nobrTagInScope;
  2117. }
  2118. return null;
  2119. }
  2120. function findAncestor(parent, tagName) {
  2121. for (; parent; ) {
  2122. switch (parent.tag) {
  2123. case 5:
  2124. case 26:
  2125. case 27:
  2126. if (parent.type === tagName) return parent;
  2127. }
  2128. parent = parent.return;
  2129. }
  2130. return null;
  2131. }
  2132. function validateDOMNesting(childTag, ancestorInfo) {
  2133. ancestorInfo = ancestorInfo || emptyAncestorInfoDev;
  2134. var parentInfo = ancestorInfo.current;
  2135. ancestorInfo = (parentInfo = isTagValidWithParent(
  2136. childTag,
  2137. parentInfo && parentInfo.tag,
  2138. ancestorInfo.implicitRootScope
  2139. ) ? null : parentInfo) ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
  2140. ancestorInfo = parentInfo || ancestorInfo;
  2141. if (!ancestorInfo) return true;
  2142. var ancestorTag = ancestorInfo.tag;
  2143. ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
  2144. if (didWarn[ancestorInfo]) return false;
  2145. didWarn[ancestorInfo] = true;
  2146. var ancestor = (ancestorInfo = current) ? findAncestor(ancestorInfo.return, ancestorTag) : null, ancestorDescription = null !== ancestorInfo && null !== ancestor ? describeAncestors(ancestor, ancestorInfo, null) : "", tagDisplayName = "<" + childTag + ">";
  2147. parentInfo ? (parentInfo = "", "table" === ancestorTag && "tr" === childTag && (parentInfo += " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."), console.error(
  2148. "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
  2149. tagDisplayName,
  2150. ancestorTag,
  2151. parentInfo,
  2152. ancestorDescription
  2153. )) : console.error(
  2154. "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
  2155. tagDisplayName,
  2156. ancestorTag,
  2157. ancestorDescription
  2158. );
  2159. ancestorInfo && (childTag = ancestorInfo.return, null === ancestor || null === childTag || ancestor === childTag && childTag._debugOwner === ancestorInfo._debugOwner || runWithFiberInDEV(ancestor, function() {
  2160. console.error(
  2161. "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
  2162. ancestorTag,
  2163. tagDisplayName
  2164. );
  2165. }));
  2166. return false;
  2167. }
  2168. function validateTextNesting(childText, parentTag, implicitRootScope) {
  2169. if (implicitRootScope || isTagValidWithParent("#text", parentTag, false))
  2170. return true;
  2171. implicitRootScope = "#text|" + parentTag;
  2172. if (didWarn[implicitRootScope]) return false;
  2173. didWarn[implicitRootScope] = true;
  2174. var ancestor = (implicitRootScope = current) ? findAncestor(implicitRootScope, parentTag) : null;
  2175. implicitRootScope = null !== implicitRootScope && null !== ancestor ? describeAncestors(
  2176. ancestor,
  2177. implicitRootScope,
  2178. 6 !== implicitRootScope.tag ? { children: null } : null
  2179. ) : "";
  2180. /\S/.test(childText) ? console.error(
  2181. "In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s",
  2182. parentTag,
  2183. implicitRootScope
  2184. ) : console.error(
  2185. "In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s",
  2186. parentTag,
  2187. implicitRootScope
  2188. );
  2189. return false;
  2190. }
  2191. function setTextContent(node, text) {
  2192. if (text) {
  2193. var firstChild = node.firstChild;
  2194. if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) {
  2195. firstChild.nodeValue = text;
  2196. return;
  2197. }
  2198. }
  2199. node.textContent = text;
  2200. }
  2201. function camelize(string) {
  2202. return string.replace(hyphenPattern, function(_, character) {
  2203. return character.toUpperCase();
  2204. });
  2205. }
  2206. function setValueForStyle(style2, styleName, value) {
  2207. var isCustomProperty = 0 === styleName.indexOf("--");
  2208. isCustomProperty || (-1 < styleName.indexOf("-") ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
  2209. "Unsupported style property %s. Did you mean %s?",
  2210. styleName,
  2211. camelize(styleName.replace(msPattern, "ms-"))
  2212. )) : badVendoredStyleNamePattern.test(styleName) ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
  2213. "Unsupported vendor-prefixed style property %s. Did you mean %s?",
  2214. styleName,
  2215. styleName.charAt(0).toUpperCase() + styleName.slice(1)
  2216. )) : !badStyleValueWithSemicolonPattern.test(value) || warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value] || (warnedStyleValues[value] = true, console.error(
  2217. `Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,
  2218. styleName,
  2219. value.replace(badStyleValueWithSemicolonPattern, "")
  2220. )), "number" === typeof value && (isNaN(value) ? warnedForNaNValue || (warnedForNaNValue = true, console.error(
  2221. "`NaN` is an invalid value for the `%s` css style property.",
  2222. styleName
  2223. )) : isFinite(value) || warnedForInfinityValue || (warnedForInfinityValue = true, console.error(
  2224. "`Infinity` is an invalid value for the `%s` css style property.",
  2225. styleName
  2226. ))));
  2227. null == value || "boolean" === typeof value || "" === value ? isCustomProperty ? style2.setProperty(styleName, "") : "float" === styleName ? style2.cssFloat = "" : style2[styleName] = "" : isCustomProperty ? style2.setProperty(styleName, value) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? "float" === styleName ? style2.cssFloat = value : (checkCSSPropertyStringCoercion(value, styleName), style2[styleName] = ("" + value).trim()) : style2[styleName] = value + "px";
  2228. }
  2229. function setValueForStyles(node, styles, prevStyles) {
  2230. if (null != styles && "object" !== typeof styles)
  2231. throw Error(
  2232. "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
  2233. );
  2234. styles && Object.freeze(styles);
  2235. node = node.style;
  2236. if (null != prevStyles) {
  2237. if (styles) {
  2238. var expandedUpdates = {};
  2239. if (prevStyles) {
  2240. for (var key in prevStyles)
  2241. if (prevStyles.hasOwnProperty(key) && !styles.hasOwnProperty(key))
  2242. for (var longhands = shorthandToLonghand[key] || [key], i = 0; i < longhands.length; i++)
  2243. expandedUpdates[longhands[i]] = key;
  2244. }
  2245. for (var _key in styles)
  2246. if (styles.hasOwnProperty(_key) && (!prevStyles || prevStyles[_key] !== styles[_key]))
  2247. for (key = shorthandToLonghand[_key] || [_key], longhands = 0; longhands < key.length; longhands++)
  2248. expandedUpdates[key[longhands]] = _key;
  2249. _key = {};
  2250. for (var key$jscomp$0 in styles)
  2251. for (key = shorthandToLonghand[key$jscomp$0] || [key$jscomp$0], longhands = 0; longhands < key.length; longhands++)
  2252. _key[key[longhands]] = key$jscomp$0;
  2253. key$jscomp$0 = {};
  2254. for (var _key2 in expandedUpdates)
  2255. if (key = expandedUpdates[_key2], (longhands = _key[_key2]) && key !== longhands && (i = key + "," + longhands, !key$jscomp$0[i])) {
  2256. key$jscomp$0[i] = true;
  2257. i = console;
  2258. var value = styles[key];
  2259. i.error.call(
  2260. i,
  2261. "%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",
  2262. null == value || "boolean" === typeof value || "" === value ? "Removing" : "Updating",
  2263. key,
  2264. longhands
  2265. );
  2266. }
  2267. }
  2268. for (var styleName in prevStyles)
  2269. !prevStyles.hasOwnProperty(styleName) || null != styles && styles.hasOwnProperty(styleName) || (0 === styleName.indexOf("--") ? node.setProperty(styleName, "") : "float" === styleName ? node.cssFloat = "" : node[styleName] = "");
  2270. for (var _styleName in styles)
  2271. _key2 = styles[_styleName], styles.hasOwnProperty(_styleName) && prevStyles[_styleName] !== _key2 && setValueForStyle(node, _styleName, _key2);
  2272. } else
  2273. for (expandedUpdates in styles)
  2274. styles.hasOwnProperty(expandedUpdates) && setValueForStyle(node, expandedUpdates, styles[expandedUpdates]);
  2275. }
  2276. function isCustomElement(tagName) {
  2277. if (-1 === tagName.indexOf("-")) return false;
  2278. switch (tagName) {
  2279. case "annotation-xml":
  2280. case "color-profile":
  2281. case "font-face":
  2282. case "font-face-src":
  2283. case "font-face-uri":
  2284. case "font-face-format":
  2285. case "font-face-name":
  2286. case "missing-glyph":
  2287. return false;
  2288. default:
  2289. return true;
  2290. }
  2291. }
  2292. function getAttributeAlias(name) {
  2293. return aliases.get(name) || name;
  2294. }
  2295. function validateProperty$1(tagName, name) {
  2296. if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name])
  2297. return true;
  2298. if (rARIACamel$1.test(name)) {
  2299. tagName = "aria-" + name.slice(4).toLowerCase();
  2300. tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
  2301. if (null == tagName)
  2302. return console.error(
  2303. "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
  2304. name
  2305. ), warnedProperties$1[name] = true;
  2306. if (name !== tagName)
  2307. return console.error(
  2308. "Invalid ARIA attribute `%s`. Did you mean `%s`?",
  2309. name,
  2310. tagName
  2311. ), warnedProperties$1[name] = true;
  2312. }
  2313. if (rARIA$1.test(name)) {
  2314. tagName = name.toLowerCase();
  2315. tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
  2316. if (null == tagName) return warnedProperties$1[name] = true, false;
  2317. name !== tagName && (console.error(
  2318. "Unknown ARIA attribute `%s`. Did you mean `%s`?",
  2319. name,
  2320. tagName
  2321. ), warnedProperties$1[name] = true);
  2322. }
  2323. return true;
  2324. }
  2325. function validateProperties$2(type, props) {
  2326. var invalidProps = [], key;
  2327. for (key in props)
  2328. validateProperty$1(type, key) || invalidProps.push(key);
  2329. props = invalidProps.map(function(prop) {
  2330. return "`" + prop + "`";
  2331. }).join(", ");
  2332. 1 === invalidProps.length ? console.error(
  2333. "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
  2334. props,
  2335. type
  2336. ) : 1 < invalidProps.length && console.error(
  2337. "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
  2338. props,
  2339. type
  2340. );
  2341. }
  2342. function validateProperty(tagName, name, value, eventRegistry) {
  2343. if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])
  2344. return true;
  2345. var lowerCasedName = name.toLowerCase();
  2346. if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName)
  2347. return console.error(
  2348. "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."
  2349. ), warnedProperties[name] = true;
  2350. if ("function" === typeof value && ("form" === tagName && "action" === name || "input" === tagName && "formAction" === name || "button" === tagName && "formAction" === name))
  2351. return true;
  2352. if (null != eventRegistry) {
  2353. tagName = eventRegistry.possibleRegistrationNames;
  2354. if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))
  2355. return true;
  2356. eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null;
  2357. if (null != eventRegistry)
  2358. return console.error(
  2359. "Invalid event handler property `%s`. Did you mean `%s`?",
  2360. name,
  2361. eventRegistry
  2362. ), warnedProperties[name] = true;
  2363. if (EVENT_NAME_REGEX.test(name))
  2364. return console.error(
  2365. "Unknown event handler property `%s`. It will be ignored.",
  2366. name
  2367. ), warnedProperties[name] = true;
  2368. } else if (EVENT_NAME_REGEX.test(name))
  2369. return INVALID_EVENT_NAME_REGEX.test(name) && console.error(
  2370. "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
  2371. name
  2372. ), warnedProperties[name] = true;
  2373. if (rARIA.test(name) || rARIACamel.test(name)) return true;
  2374. if ("innerhtml" === lowerCasedName)
  2375. return console.error(
  2376. "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
  2377. ), warnedProperties[name] = true;
  2378. if ("aria" === lowerCasedName)
  2379. return console.error(
  2380. "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
  2381. ), warnedProperties[name] = true;
  2382. if ("is" === lowerCasedName && null !== value && void 0 !== value && "string" !== typeof value)
  2383. return console.error(
  2384. "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
  2385. typeof value
  2386. ), warnedProperties[name] = true;
  2387. if ("number" === typeof value && isNaN(value))
  2388. return console.error(
  2389. "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
  2390. name
  2391. ), warnedProperties[name] = true;
  2392. if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
  2393. if (lowerCasedName = possibleStandardNames[lowerCasedName], lowerCasedName !== name)
  2394. return console.error(
  2395. "Invalid DOM property `%s`. Did you mean `%s`?",
  2396. name,
  2397. lowerCasedName
  2398. ), warnedProperties[name] = true;
  2399. } else if (name !== lowerCasedName)
  2400. return console.error(
  2401. "React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",
  2402. name,
  2403. lowerCasedName
  2404. ), warnedProperties[name] = true;
  2405. switch (name) {
  2406. case "dangerouslySetInnerHTML":
  2407. case "children":
  2408. case "style":
  2409. case "suppressContentEditableWarning":
  2410. case "suppressHydrationWarning":
  2411. case "defaultValue":
  2412. case "defaultChecked":
  2413. case "innerHTML":
  2414. case "ref":
  2415. return true;
  2416. case "innerText":
  2417. case "textContent":
  2418. return true;
  2419. }
  2420. switch (typeof value) {
  2421. case "boolean":
  2422. switch (name) {
  2423. case "autoFocus":
  2424. case "checked":
  2425. case "multiple":
  2426. case "muted":
  2427. case "selected":
  2428. case "contentEditable":
  2429. case "spellCheck":
  2430. case "draggable":
  2431. case "value":
  2432. case "autoReverse":
  2433. case "externalResourcesRequired":
  2434. case "focusable":
  2435. case "preserveAlpha":
  2436. case "allowFullScreen":
  2437. case "async":
  2438. case "autoPlay":
  2439. case "controls":
  2440. case "default":
  2441. case "defer":
  2442. case "disabled":
  2443. case "disablePictureInPicture":
  2444. case "disableRemotePlayback":
  2445. case "formNoValidate":
  2446. case "hidden":
  2447. case "loop":
  2448. case "noModule":
  2449. case "noValidate":
  2450. case "open":
  2451. case "playsInline":
  2452. case "readOnly":
  2453. case "required":
  2454. case "reversed":
  2455. case "scoped":
  2456. case "seamless":
  2457. case "itemScope":
  2458. case "capture":
  2459. case "download":
  2460. case "inert":
  2461. return true;
  2462. default:
  2463. lowerCasedName = name.toLowerCase().slice(0, 5);
  2464. if ("data-" === lowerCasedName || "aria-" === lowerCasedName)
  2465. return true;
  2466. value ? console.error(
  2467. 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',
  2468. value,
  2469. name,
  2470. name,
  2471. value,
  2472. name
  2473. ) : console.error(
  2474. 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',
  2475. value,
  2476. name,
  2477. name,
  2478. value,
  2479. name,
  2480. name,
  2481. name
  2482. );
  2483. return warnedProperties[name] = true;
  2484. }
  2485. case "function":
  2486. case "symbol":
  2487. return warnedProperties[name] = true, false;
  2488. case "string":
  2489. if ("false" === value || "true" === value) {
  2490. switch (name) {
  2491. case "checked":
  2492. case "selected":
  2493. case "multiple":
  2494. case "muted":
  2495. case "allowFullScreen":
  2496. case "async":
  2497. case "autoPlay":
  2498. case "controls":
  2499. case "default":
  2500. case "defer":
  2501. case "disabled":
  2502. case "disablePictureInPicture":
  2503. case "disableRemotePlayback":
  2504. case "formNoValidate":
  2505. case "hidden":
  2506. case "loop":
  2507. case "noModule":
  2508. case "noValidate":
  2509. case "open":
  2510. case "playsInline":
  2511. case "readOnly":
  2512. case "required":
  2513. case "reversed":
  2514. case "scoped":
  2515. case "seamless":
  2516. case "itemScope":
  2517. case "inert":
  2518. break;
  2519. default:
  2520. return true;
  2521. }
  2522. console.error(
  2523. "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
  2524. value,
  2525. name,
  2526. "false" === value ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".',
  2527. name,
  2528. value
  2529. );
  2530. warnedProperties[name] = true;
  2531. }
  2532. }
  2533. return true;
  2534. }
  2535. function warnUnknownProperties(type, props, eventRegistry) {
  2536. var unknownProps = [], key;
  2537. for (key in props)
  2538. validateProperty(type, key, props[key], eventRegistry) || unknownProps.push(key);
  2539. props = unknownProps.map(function(prop) {
  2540. return "`" + prop + "`";
  2541. }).join(", ");
  2542. 1 === unknownProps.length ? console.error(
  2543. "Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",
  2544. props,
  2545. type
  2546. ) : 1 < unknownProps.length && console.error(
  2547. "Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",
  2548. props,
  2549. type
  2550. );
  2551. }
  2552. function sanitizeURL(url) {
  2553. return isJavaScriptProtocol.test("" + url) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url;
  2554. }
  2555. function noop$1() {
  2556. }
  2557. function getEventTarget(nativeEvent) {
  2558. nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
  2559. nativeEvent.correspondingUseElement && (nativeEvent = nativeEvent.correspondingUseElement);
  2560. return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
  2561. }
  2562. function restoreStateOfTarget(target) {
  2563. var internalInstance = getInstanceFromNode(target);
  2564. if (internalInstance && (target = internalInstance.stateNode)) {
  2565. var props = target[internalPropsKey] || null;
  2566. a: switch (target = internalInstance.stateNode, internalInstance.type) {
  2567. case "input":
  2568. updateInput(
  2569. target,
  2570. props.value,
  2571. props.defaultValue,
  2572. props.defaultValue,
  2573. props.checked,
  2574. props.defaultChecked,
  2575. props.type,
  2576. props.name
  2577. );
  2578. internalInstance = props.name;
  2579. if ("radio" === props.type && null != internalInstance) {
  2580. for (props = target; props.parentNode; ) props = props.parentNode;
  2581. checkAttributeStringCoercion(internalInstance, "name");
  2582. props = props.querySelectorAll(
  2583. 'input[name="' + escapeSelectorAttributeValueInsideDoubleQuotes(
  2584. "" + internalInstance
  2585. ) + '"][type="radio"]'
  2586. );
  2587. for (internalInstance = 0; internalInstance < props.length; internalInstance++) {
  2588. var otherNode = props[internalInstance];
  2589. if (otherNode !== target && otherNode.form === target.form) {
  2590. var otherProps = otherNode[internalPropsKey] || null;
  2591. if (!otherProps)
  2592. throw Error(
  2593. "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."
  2594. );
  2595. updateInput(
  2596. otherNode,
  2597. otherProps.value,
  2598. otherProps.defaultValue,
  2599. otherProps.defaultValue,
  2600. otherProps.checked,
  2601. otherProps.defaultChecked,
  2602. otherProps.type,
  2603. otherProps.name
  2604. );
  2605. }
  2606. }
  2607. for (internalInstance = 0; internalInstance < props.length; internalInstance++)
  2608. otherNode = props[internalInstance], otherNode.form === target.form && updateValueIfChanged(otherNode);
  2609. }
  2610. break a;
  2611. case "textarea":
  2612. updateTextarea(target, props.value, props.defaultValue);
  2613. break a;
  2614. case "select":
  2615. internalInstance = props.value, null != internalInstance && updateOptions(target, !!props.multiple, internalInstance, false);
  2616. }
  2617. }
  2618. }
  2619. function batchedUpdates$1(fn, a, b) {
  2620. if (isInsideEventHandler) return fn(a, b);
  2621. isInsideEventHandler = true;
  2622. try {
  2623. var JSCompiler_inline_result = fn(a);
  2624. return JSCompiler_inline_result;
  2625. } finally {
  2626. if (isInsideEventHandler = false, null !== restoreTarget || null !== restoreQueue) {
  2627. if (flushSyncWork$1(), restoreTarget && (a = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(a), fn))
  2628. for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
  2629. }
  2630. }
  2631. }
  2632. function getListener(inst, registrationName) {
  2633. var stateNode = inst.stateNode;
  2634. if (null === stateNode) return null;
  2635. var props = stateNode[internalPropsKey] || null;
  2636. if (null === props) return null;
  2637. stateNode = props[registrationName];
  2638. a: switch (registrationName) {
  2639. case "onClick":
  2640. case "onClickCapture":
  2641. case "onDoubleClick":
  2642. case "onDoubleClickCapture":
  2643. case "onMouseDown":
  2644. case "onMouseDownCapture":
  2645. case "onMouseMove":
  2646. case "onMouseMoveCapture":
  2647. case "onMouseUp":
  2648. case "onMouseUpCapture":
  2649. case "onMouseEnter":
  2650. (props = !props.disabled) || (inst = inst.type, props = !("button" === inst || "input" === inst || "select" === inst || "textarea" === inst));
  2651. inst = !props;
  2652. break a;
  2653. default:
  2654. inst = false;
  2655. }
  2656. if (inst) return null;
  2657. if (stateNode && "function" !== typeof stateNode)
  2658. throw Error(
  2659. "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof stateNode + "` type."
  2660. );
  2661. return stateNode;
  2662. }
  2663. function getData() {
  2664. if (fallbackText) return fallbackText;
  2665. var start, startValue = startText, startLength = startValue.length, end, endValue = "value" in root ? root.value : root.textContent, endLength = endValue.length;
  2666. for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ;
  2667. var minEnd = startLength - start;
  2668. for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ;
  2669. return fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0);
  2670. }
  2671. function getEventCharCode(nativeEvent) {
  2672. var keyCode = nativeEvent.keyCode;
  2673. "charCode" in nativeEvent ? (nativeEvent = nativeEvent.charCode, 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13)) : nativeEvent = keyCode;
  2674. 10 === nativeEvent && (nativeEvent = 13);
  2675. return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
  2676. }
  2677. function functionThatReturnsTrue() {
  2678. return true;
  2679. }
  2680. function functionThatReturnsFalse() {
  2681. return false;
  2682. }
  2683. function createSyntheticEvent(Interface) {
  2684. function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
  2685. this._reactName = reactName;
  2686. this._targetInst = targetInst;
  2687. this.type = reactEventType;
  2688. this.nativeEvent = nativeEvent;
  2689. this.target = nativeEventTarget;
  2690. this.currentTarget = null;
  2691. for (var propName in Interface)
  2692. Interface.hasOwnProperty(propName) && (reactName = Interface[propName], this[propName] = reactName ? reactName(nativeEvent) : nativeEvent[propName]);
  2693. this.isDefaultPrevented = (null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : false === nativeEvent.returnValue) ? functionThatReturnsTrue : functionThatReturnsFalse;
  2694. this.isPropagationStopped = functionThatReturnsFalse;
  2695. return this;
  2696. }
  2697. assign(SyntheticBaseEvent.prototype, {
  2698. preventDefault: function() {
  2699. this.defaultPrevented = true;
  2700. var event = this.nativeEvent;
  2701. event && (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = false), this.isDefaultPrevented = functionThatReturnsTrue);
  2702. },
  2703. stopPropagation: function() {
  2704. var event = this.nativeEvent;
  2705. event && (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = true), this.isPropagationStopped = functionThatReturnsTrue);
  2706. },
  2707. persist: function() {
  2708. },
  2709. isPersistent: functionThatReturnsTrue
  2710. });
  2711. return SyntheticBaseEvent;
  2712. }
  2713. function modifierStateGetter(keyArg) {
  2714. var nativeEvent = this.nativeEvent;
  2715. return nativeEvent.getModifierState ? nativeEvent.getModifierState(keyArg) : (keyArg = modifierKeyToProp[keyArg]) ? !!nativeEvent[keyArg] : false;
  2716. }
  2717. function getEventModifierState() {
  2718. return modifierStateGetter;
  2719. }
  2720. function isFallbackCompositionEnd(domEventName, nativeEvent) {
  2721. switch (domEventName) {
  2722. case "keyup":
  2723. return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
  2724. case "keydown":
  2725. return nativeEvent.keyCode !== START_KEYCODE;
  2726. case "keypress":
  2727. case "mousedown":
  2728. case "focusout":
  2729. return true;
  2730. default:
  2731. return false;
  2732. }
  2733. }
  2734. function getDataFromCustomEvent(nativeEvent) {
  2735. nativeEvent = nativeEvent.detail;
  2736. return "object" === typeof nativeEvent && "data" in nativeEvent ? nativeEvent.data : null;
  2737. }
  2738. function getNativeBeforeInputChars(domEventName, nativeEvent) {
  2739. switch (domEventName) {
  2740. case "compositionend":
  2741. return getDataFromCustomEvent(nativeEvent);
  2742. case "keypress":
  2743. if (nativeEvent.which !== SPACEBAR_CODE) return null;
  2744. hasSpaceKeypress = true;
  2745. return SPACEBAR_CHAR;
  2746. case "textInput":
  2747. return domEventName = nativeEvent.data, domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName;
  2748. default:
  2749. return null;
  2750. }
  2751. }
  2752. function getFallbackBeforeInputChars(domEventName, nativeEvent) {
  2753. if (isComposing)
  2754. return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root = null, isComposing = false, domEventName) : null;
  2755. switch (domEventName) {
  2756. case "paste":
  2757. return null;
  2758. case "keypress":
  2759. if (!(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) || nativeEvent.ctrlKey && nativeEvent.altKey) {
  2760. if (nativeEvent.char && 1 < nativeEvent.char.length)
  2761. return nativeEvent.char;
  2762. if (nativeEvent.which)
  2763. return String.fromCharCode(nativeEvent.which);
  2764. }
  2765. return null;
  2766. case "compositionend":
  2767. return useFallbackCompositionData && "ko" !== nativeEvent.locale ? null : nativeEvent.data;
  2768. default:
  2769. return null;
  2770. }
  2771. }
  2772. function isTextInputElement(elem) {
  2773. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  2774. return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName ? true : false;
  2775. }
  2776. function isEventSupported(eventNameSuffix) {
  2777. if (!canUseDOM) return false;
  2778. eventNameSuffix = "on" + eventNameSuffix;
  2779. var isSupported = eventNameSuffix in document;
  2780. isSupported || (isSupported = document.createElement("div"), isSupported.setAttribute(eventNameSuffix, "return;"), isSupported = "function" === typeof isSupported[eventNameSuffix]);
  2781. return isSupported;
  2782. }
  2783. function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
  2784. restoreTarget ? restoreQueue ? restoreQueue.push(target) : restoreQueue = [target] : restoreTarget = target;
  2785. inst = accumulateTwoPhaseListeners(inst, "onChange");
  2786. 0 < inst.length && (nativeEvent = new SyntheticEvent(
  2787. "onChange",
  2788. "change",
  2789. null,
  2790. nativeEvent,
  2791. target
  2792. ), dispatchQueue.push({ event: nativeEvent, listeners: inst }));
  2793. }
  2794. function runEventInBatch(dispatchQueue) {
  2795. processDispatchQueue(dispatchQueue, 0);
  2796. }
  2797. function getInstIfValueChanged(targetInst) {
  2798. var targetNode = getNodeFromInstance(targetInst);
  2799. if (updateValueIfChanged(targetNode)) return targetInst;
  2800. }
  2801. function getTargetInstForChangeEvent(domEventName, targetInst) {
  2802. if ("change" === domEventName) return targetInst;
  2803. }
  2804. function stopWatchingForValueChange() {
  2805. activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null);
  2806. }
  2807. function handlePropertyChange(nativeEvent) {
  2808. if ("value" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst$1)) {
  2809. var dispatchQueue = [];
  2810. createAndAccumulateChangeEvent(
  2811. dispatchQueue,
  2812. activeElementInst$1,
  2813. nativeEvent,
  2814. getEventTarget(nativeEvent)
  2815. );
  2816. batchedUpdates$1(runEventInBatch, dispatchQueue);
  2817. }
  2818. }
  2819. function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
  2820. "focusin" === domEventName ? (stopWatchingForValueChange(), activeElement$1 = target, activeElementInst$1 = targetInst, activeElement$1.attachEvent("onpropertychange", handlePropertyChange)) : "focusout" === domEventName && stopWatchingForValueChange();
  2821. }
  2822. function getTargetInstForInputEventPolyfill(domEventName) {
  2823. if ("selectionchange" === domEventName || "keyup" === domEventName || "keydown" === domEventName)
  2824. return getInstIfValueChanged(activeElementInst$1);
  2825. }
  2826. function getTargetInstForClickEvent(domEventName, targetInst) {
  2827. if ("click" === domEventName) return getInstIfValueChanged(targetInst);
  2828. }
  2829. function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
  2830. if ("input" === domEventName || "change" === domEventName)
  2831. return getInstIfValueChanged(targetInst);
  2832. }
  2833. function is(x, y) {
  2834. return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
  2835. }
  2836. function shallowEqual(objA, objB) {
  2837. if (objectIs(objA, objB)) return true;
  2838. if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB)
  2839. return false;
  2840. var keysA = Object.keys(objA), keysB = Object.keys(objB);
  2841. if (keysA.length !== keysB.length) return false;
  2842. for (keysB = 0; keysB < keysA.length; keysB++) {
  2843. var currentKey = keysA[keysB];
  2844. if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
  2845. return false;
  2846. }
  2847. return true;
  2848. }
  2849. function getLeafNode(node) {
  2850. for (; node && node.firstChild; ) node = node.firstChild;
  2851. return node;
  2852. }
  2853. function getNodeForCharacterOffset(root2, offset) {
  2854. var node = getLeafNode(root2);
  2855. root2 = 0;
  2856. for (var nodeEnd; node; ) {
  2857. if (3 === node.nodeType) {
  2858. nodeEnd = root2 + node.textContent.length;
  2859. if (root2 <= offset && nodeEnd >= offset)
  2860. return { node, offset: offset - root2 };
  2861. root2 = nodeEnd;
  2862. }
  2863. a: {
  2864. for (; node; ) {
  2865. if (node.nextSibling) {
  2866. node = node.nextSibling;
  2867. break a;
  2868. }
  2869. node = node.parentNode;
  2870. }
  2871. node = void 0;
  2872. }
  2873. node = getLeafNode(node);
  2874. }
  2875. }
  2876. function containsNode(outerNode, innerNode) {
  2877. return outerNode && innerNode ? outerNode === innerNode ? true : outerNode && 3 === outerNode.nodeType ? false : innerNode && 3 === innerNode.nodeType ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : outerNode.compareDocumentPosition ? !!(outerNode.compareDocumentPosition(innerNode) & 16) : false : false;
  2878. }
  2879. function getActiveElementDeep(containerInfo) {
  2880. containerInfo = null != containerInfo && null != containerInfo.ownerDocument && null != containerInfo.ownerDocument.defaultView ? containerInfo.ownerDocument.defaultView : window;
  2881. for (var element = getActiveElement(containerInfo.document); element instanceof containerInfo.HTMLIFrameElement; ) {
  2882. try {
  2883. var JSCompiler_inline_result = "string" === typeof element.contentWindow.location.href;
  2884. } catch (err) {
  2885. JSCompiler_inline_result = false;
  2886. }
  2887. if (JSCompiler_inline_result) containerInfo = element.contentWindow;
  2888. else break;
  2889. element = getActiveElement(containerInfo.document);
  2890. }
  2891. return element;
  2892. }
  2893. function hasSelectionCapabilities(elem) {
  2894. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  2895. return nodeName && ("input" === nodeName && ("text" === elem.type || "search" === elem.type || "tel" === elem.type || "url" === elem.type || "password" === elem.type) || "textarea" === nodeName || "true" === elem.contentEditable);
  2896. }
  2897. function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
  2898. var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : 9 === nativeEventTarget.nodeType ? nativeEventTarget : nativeEventTarget.ownerDocument;
  2899. mouseDown || null == activeElement || activeElement !== getActiveElement(doc) || (doc = activeElement, "selectionStart" in doc && hasSelectionCapabilities(doc) ? doc = { start: doc.selectionStart, end: doc.selectionEnd } : (doc = (doc.ownerDocument && doc.ownerDocument.defaultView || window).getSelection(), doc = {
  2900. anchorNode: doc.anchorNode,
  2901. anchorOffset: doc.anchorOffset,
  2902. focusNode: doc.focusNode,
  2903. focusOffset: doc.focusOffset
  2904. }), lastSelection && shallowEqual(lastSelection, doc) || (lastSelection = doc, doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect"), 0 < doc.length && (nativeEvent = new SyntheticEvent(
  2905. "onSelect",
  2906. "select",
  2907. null,
  2908. nativeEvent,
  2909. nativeEventTarget
  2910. ), dispatchQueue.push({ event: nativeEvent, listeners: doc }), nativeEvent.target = activeElement)));
  2911. }
  2912. function makePrefixMap(styleProp, eventName) {
  2913. var prefixes = {};
  2914. prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  2915. prefixes["Webkit" + styleProp] = "webkit" + eventName;
  2916. prefixes["Moz" + styleProp] = "moz" + eventName;
  2917. return prefixes;
  2918. }
  2919. function getVendorPrefixedEventName(eventName) {
  2920. if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
  2921. if (!vendorPrefixes[eventName]) return eventName;
  2922. var prefixMap = vendorPrefixes[eventName], styleProp;
  2923. for (styleProp in prefixMap)
  2924. if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
  2925. return prefixedEventNames[eventName] = prefixMap[styleProp];
  2926. return eventName;
  2927. }
  2928. function registerSimpleEvent(domEventName, reactName) {
  2929. topLevelEventsToReactNames.set(domEventName, reactName);
  2930. registerTwoPhaseEvent(reactName, [domEventName]);
  2931. }
  2932. function getArrayKind(array) {
  2933. for (var kind = EMPTY_ARRAY, i = 0; i < array.length; i++) {
  2934. var value = array[i];
  2935. if ("object" === typeof value && null !== value)
  2936. if (isArrayImpl(value) && 2 === value.length && "string" === typeof value[0]) {
  2937. if (kind !== EMPTY_ARRAY && kind !== ENTRIES_ARRAY)
  2938. return COMPLEX_ARRAY;
  2939. kind = ENTRIES_ARRAY;
  2940. } else return COMPLEX_ARRAY;
  2941. else {
  2942. if ("function" === typeof value || "string" === typeof value && 50 < value.length || kind !== EMPTY_ARRAY && kind !== PRIMITIVE_ARRAY)
  2943. return COMPLEX_ARRAY;
  2944. kind = PRIMITIVE_ARRAY;
  2945. }
  2946. }
  2947. return kind;
  2948. }
  2949. function addObjectToProperties(object, properties, indent, prefix2) {
  2950. for (var key in object)
  2951. hasOwnProperty.call(object, key) && "_" !== key[0] && addValueToProperties(key, object[key], properties, indent, prefix2);
  2952. }
  2953. function addValueToProperties(propertyName, value, properties, indent, prefix2) {
  2954. switch (typeof value) {
  2955. case "object":
  2956. if (null === value) {
  2957. value = "null";
  2958. break;
  2959. } else {
  2960. if (value.$$typeof === REACT_ELEMENT_TYPE) {
  2961. var typeName2 = getComponentNameFromType(value.type) || "…", key = value.key;
  2962. value = value.props;
  2963. var propsKeys = Object.keys(value), propsLength = propsKeys.length;
  2964. if (null == key && 0 === propsLength) {
  2965. value = "<" + typeName2 + " />";
  2966. break;
  2967. }
  2968. if (3 > indent || 1 === propsLength && "children" === propsKeys[0] && null == key) {
  2969. value = "<" + typeName2 + " … />";
  2970. break;
  2971. }
  2972. properties.push([
  2973. prefix2 + "  ".repeat(indent) + propertyName,
  2974. "<" + typeName2
  2975. ]);
  2976. null !== key && addValueToProperties(
  2977. "key",
  2978. key,
  2979. properties,
  2980. indent + 1,
  2981. prefix2
  2982. );
  2983. propertyName = false;
  2984. for (var propKey in value)
  2985. "children" === propKey ? null != value.children && (!isArrayImpl(value.children) || 0 < value.children.length) && (propertyName = true) : hasOwnProperty.call(value, propKey) && "_" !== propKey[0] && addValueToProperties(
  2986. propKey,
  2987. value[propKey],
  2988. properties,
  2989. indent + 1,
  2990. prefix2
  2991. );
  2992. properties.push([
  2993. "",
  2994. propertyName ? ">…</" + typeName2 + ">" : "/>"
  2995. ]);
  2996. return;
  2997. }
  2998. typeName2 = Object.prototype.toString.call(value);
  2999. typeName2 = typeName2.slice(8, typeName2.length - 1);
  3000. if ("Array" === typeName2) {
  3001. if (propKey = getArrayKind(value), propKey === PRIMITIVE_ARRAY || propKey === EMPTY_ARRAY) {
  3002. value = JSON.stringify(value);
  3003. break;
  3004. } else if (propKey === ENTRIES_ARRAY) {
  3005. properties.push([
  3006. prefix2 + "  ".repeat(indent) + propertyName,
  3007. ""
  3008. ]);
  3009. for (propertyName = 0; propertyName < value.length; propertyName++)
  3010. typeName2 = value[propertyName], addValueToProperties(
  3011. typeName2[0],
  3012. typeName2[1],
  3013. properties,
  3014. indent + 1,
  3015. prefix2
  3016. );
  3017. return;
  3018. }
  3019. }
  3020. if ("Promise" === typeName2) {
  3021. if ("fulfilled" === value.status) {
  3022. if (typeName2 = properties.length, addValueToProperties(
  3023. propertyName,
  3024. value.value,
  3025. properties,
  3026. indent,
  3027. prefix2
  3028. ), properties.length > typeName2) {
  3029. properties = properties[typeName2];
  3030. properties[1] = "Promise<" + (properties[1] || "Object") + ">";
  3031. return;
  3032. }
  3033. } else if ("rejected" === value.status && (typeName2 = properties.length, addValueToProperties(
  3034. propertyName,
  3035. value.reason,
  3036. properties,
  3037. indent,
  3038. prefix2
  3039. ), properties.length > typeName2)) {
  3040. properties = properties[typeName2];
  3041. properties[1] = "Rejected Promise<" + properties[1] + ">";
  3042. return;
  3043. }
  3044. properties.push([
  3045. "  ".repeat(indent) + propertyName,
  3046. "Promise"
  3047. ]);
  3048. return;
  3049. }
  3050. "Object" === typeName2 && (propKey = Object.getPrototypeOf(value)) && "function" === typeof propKey.constructor && (typeName2 = propKey.constructor.name);
  3051. properties.push([
  3052. prefix2 + "  ".repeat(indent) + propertyName,
  3053. "Object" === typeName2 ? 3 > indent ? "" : "…" : typeName2
  3054. ]);
  3055. 3 > indent && addObjectToProperties(value, properties, indent + 1, prefix2);
  3056. return;
  3057. }
  3058. case "function":
  3059. value = "" === value.name ? "() => {}" : value.name + "() {}";
  3060. break;
  3061. case "string":
  3062. value = value === OMITTED_PROP_ERROR ? "…" : JSON.stringify(value);
  3063. break;
  3064. case "undefined":
  3065. value = "undefined";
  3066. break;
  3067. case "boolean":
  3068. value = value ? "true" : "false";
  3069. break;
  3070. default:
  3071. value = String(value);
  3072. }
  3073. properties.push([
  3074. prefix2 + "  ".repeat(indent) + propertyName,
  3075. value
  3076. ]);
  3077. }
  3078. function addObjectDiffToProperties(prev, next, properties, indent) {
  3079. var isDeeplyEqual = true;
  3080. for (key in prev)
  3081. key in next || (properties.push([
  3082. REMOVED + "  ".repeat(indent) + key,
  3083. "…"
  3084. ]), isDeeplyEqual = false);
  3085. for (var _key in next)
  3086. if (_key in prev) {
  3087. var key = prev[_key];
  3088. var nextValue = next[_key];
  3089. if (key !== nextValue) {
  3090. if (0 === indent && "children" === _key)
  3091. isDeeplyEqual = "  ".repeat(indent) + _key, properties.push(
  3092. [REMOVED + isDeeplyEqual, "…"],
  3093. [ADDED + isDeeplyEqual, "…"]
  3094. );
  3095. else {
  3096. if (!(3 <= indent)) {
  3097. if ("object" === typeof key && "object" === typeof nextValue && null !== key && null !== nextValue && key.$$typeof === nextValue.$$typeof)
  3098. if (nextValue.$$typeof === REACT_ELEMENT_TYPE) {
  3099. if (key.type === nextValue.type && key.key === nextValue.key) {
  3100. key = getComponentNameFromType(nextValue.type) || "…";
  3101. isDeeplyEqual = "  ".repeat(indent) + _key;
  3102. key = "<" + key + " … />";
  3103. properties.push(
  3104. [REMOVED + isDeeplyEqual, key],
  3105. [ADDED + isDeeplyEqual, key]
  3106. );
  3107. isDeeplyEqual = false;
  3108. continue;
  3109. }
  3110. } else {
  3111. var prevKind = Object.prototype.toString.call(key), nextKind = Object.prototype.toString.call(nextValue);
  3112. if (prevKind === nextKind && ("[object Object]" === nextKind || "[object Array]" === nextKind)) {
  3113. prevKind = [
  3114. UNCHANGED + "  ".repeat(indent) + _key,
  3115. "[object Array]" === nextKind ? "Array" : ""
  3116. ];
  3117. properties.push(prevKind);
  3118. nextKind = properties.length;
  3119. addObjectDiffToProperties(
  3120. key,
  3121. nextValue,
  3122. properties,
  3123. indent + 1
  3124. ) ? nextKind === properties.length && (prevKind[1] = "Referentially unequal but deeply equal objects. Consider memoization.") : isDeeplyEqual = false;
  3125. continue;
  3126. }
  3127. }
  3128. else if ("function" === typeof key && "function" === typeof nextValue && key.name === nextValue.name && key.length === nextValue.length && (prevKind = Function.prototype.toString.call(key), nextKind = Function.prototype.toString.call(nextValue), prevKind === nextKind)) {
  3129. key = "" === nextValue.name ? "() => {}" : nextValue.name + "() {}";
  3130. properties.push([
  3131. UNCHANGED + "  ".repeat(indent) + _key,
  3132. key + " Referentially unequal function closure. Consider memoization."
  3133. ]);
  3134. continue;
  3135. }
  3136. }
  3137. addValueToProperties(_key, key, properties, indent, REMOVED);
  3138. addValueToProperties(_key, nextValue, properties, indent, ADDED);
  3139. }
  3140. isDeeplyEqual = false;
  3141. }
  3142. } else
  3143. properties.push([
  3144. ADDED + "  ".repeat(indent) + _key,
  3145. "…"
  3146. ]), isDeeplyEqual = false;
  3147. return isDeeplyEqual;
  3148. }
  3149. function setCurrentTrackFromLanes(lanes) {
  3150. currentTrack = lanes & 63 ? "Blocking" : lanes & 64 ? "Gesture" : lanes & 4194176 ? "Transition" : lanes & 62914560 ? "Suspense" : lanes & 2080374784 ? "Idle" : "Other";
  3151. }
  3152. function logComponentTrigger(fiber, startTime, endTime, trigger) {
  3153. supportsUserTiming && (reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = trigger, reusableComponentDevToolDetails.properties = null, (fiber = fiber._debugTask) ? fiber.run(
  3154. performance.measure.bind(
  3155. performance,
  3156. trigger,
  3157. reusableComponentOptions
  3158. )
  3159. ) : performance.measure(trigger, reusableComponentOptions));
  3160. }
  3161. function logComponentReappeared(fiber, startTime, endTime) {
  3162. logComponentTrigger(fiber, startTime, endTime, "Reconnect");
  3163. }
  3164. function logComponentRender(fiber, startTime, endTime, wasHydrated, committedLanes) {
  3165. var name = getComponentNameFromFiber(fiber);
  3166. if (null !== name && supportsUserTiming) {
  3167. var alternate = fiber.alternate, selfTime = fiber.actualDuration;
  3168. if (null === alternate || alternate.child !== fiber.child)
  3169. for (var child = fiber.child; null !== child; child = child.sibling)
  3170. selfTime -= child.actualDuration;
  3171. wasHydrated = 0.5 > selfTime ? wasHydrated ? "tertiary-light" : "primary-light" : 10 > selfTime ? wasHydrated ? "tertiary" : "primary" : 100 > selfTime ? wasHydrated ? "tertiary-dark" : "primary-dark" : "error";
  3172. var props = fiber.memoizedProps;
  3173. selfTime = fiber._debugTask;
  3174. null !== props && null !== alternate && alternate.memoizedProps !== props ? (child = [resuableChangedPropsEntry], props = addObjectDiffToProperties(
  3175. alternate.memoizedProps,
  3176. props,
  3177. child,
  3178. 0
  3179. ), 1 < child.length && (props && !alreadyWarnedForDeepEquality && 0 === (alternate.lanes & committedLanes) && 100 < fiber.actualDuration ? (alreadyWarnedForDeepEquality = true, child[0] = reusableDeeplyEqualPropsEntry, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = DEEP_EQUALITY_WARNING) : (reusableComponentDevToolDetails.color = wasHydrated, reusableComponentDevToolDetails.tooltipText = name), reusableComponentDevToolDetails.properties = child, reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, null != selfTime ? selfTime.run(
  3180. performance.measure.bind(
  3181. performance,
  3182. "​" + name,
  3183. reusableComponentOptions
  3184. )
  3185. ) : performance.measure(
  3186. "​" + name,
  3187. reusableComponentOptions
  3188. ))) : null != selfTime ? selfTime.run(
  3189. console.timeStamp.bind(
  3190. console,
  3191. name,
  3192. startTime,
  3193. endTime,
  3194. COMPONENTS_TRACK,
  3195. void 0,
  3196. wasHydrated
  3197. )
  3198. ) : console.timeStamp(
  3199. name,
  3200. startTime,
  3201. endTime,
  3202. COMPONENTS_TRACK,
  3203. void 0,
  3204. wasHydrated
  3205. );
  3206. }
  3207. }
  3208. function logComponentErrored(fiber, startTime, endTime, errors) {
  3209. if (supportsUserTiming) {
  3210. var name = getComponentNameFromFiber(fiber);
  3211. if (null !== name) {
  3212. for (var debugTask = null, properties = [], i = 0; i < errors.length; i++) {
  3213. var capturedValue = errors[i];
  3214. null == debugTask && null !== capturedValue.source && (debugTask = capturedValue.source._debugTask);
  3215. capturedValue = capturedValue.value;
  3216. properties.push([
  3217. "Error",
  3218. "object" === typeof capturedValue && null !== capturedValue && "string" === typeof capturedValue.message ? String(capturedValue.message) : String(capturedValue)
  3219. ]);
  3220. }
  3221. null !== fiber.key && addValueToProperties("key", fiber.key, properties, 0, "");
  3222. null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, properties, 0, "");
  3223. null == debugTask && (debugTask = fiber._debugTask);
  3224. fiber = {
  3225. start: startTime,
  3226. end: endTime,
  3227. detail: {
  3228. devtools: {
  3229. color: "error",
  3230. track: COMPONENTS_TRACK,
  3231. tooltipText: 13 === fiber.tag ? "Hydration failed" : "Error boundary caught an error",
  3232. properties
  3233. }
  3234. }
  3235. };
  3236. debugTask ? debugTask.run(
  3237. performance.measure.bind(performance, "​" + name, fiber)
  3238. ) : performance.measure("​" + name, fiber);
  3239. }
  3240. }
  3241. }
  3242. function logComponentEffect(fiber, startTime, endTime, selfTime, errors) {
  3243. if (null !== errors) {
  3244. if (supportsUserTiming) {
  3245. var name = getComponentNameFromFiber(fiber);
  3246. if (null !== name) {
  3247. selfTime = [];
  3248. for (var i = 0; i < errors.length; i++) {
  3249. var error = errors[i].value;
  3250. selfTime.push([
  3251. "Error",
  3252. "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
  3253. ]);
  3254. }
  3255. null !== fiber.key && addValueToProperties("key", fiber.key, selfTime, 0, "");
  3256. null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, selfTime, 0, "");
  3257. startTime = {
  3258. start: startTime,
  3259. end: endTime,
  3260. detail: {
  3261. devtools: {
  3262. color: "error",
  3263. track: COMPONENTS_TRACK,
  3264. tooltipText: "A lifecycle or effect errored",
  3265. properties: selfTime
  3266. }
  3267. }
  3268. };
  3269. (fiber = fiber._debugTask) ? fiber.run(
  3270. performance.measure.bind(
  3271. performance,
  3272. "​" + name,
  3273. startTime
  3274. )
  3275. ) : performance.measure("​" + name, startTime);
  3276. }
  3277. }
  3278. } else
  3279. name = getComponentNameFromFiber(fiber), null !== name && supportsUserTiming && (errors = 1 > selfTime ? "secondary-light" : 100 > selfTime ? "secondary" : 500 > selfTime ? "secondary-dark" : "error", (fiber = fiber._debugTask) ? fiber.run(
  3280. console.timeStamp.bind(
  3281. console,
  3282. name,
  3283. startTime,
  3284. endTime,
  3285. COMPONENTS_TRACK,
  3286. void 0,
  3287. errors
  3288. )
  3289. ) : console.timeStamp(
  3290. name,
  3291. startTime,
  3292. endTime,
  3293. COMPONENTS_TRACK,
  3294. void 0,
  3295. errors
  3296. ));
  3297. }
  3298. function logRenderPhase(startTime, endTime, lanes, debugTask) {
  3299. if (supportsUserTiming && !(endTime <= startTime)) {
  3300. var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark";
  3301. lanes = (lanes & 536870912) === lanes ? "Prepared" : (lanes & 201326741) === lanes ? "Hydrated" : "Render";
  3302. debugTask ? debugTask.run(
  3303. console.timeStamp.bind(
  3304. console,
  3305. lanes,
  3306. startTime,
  3307. endTime,
  3308. currentTrack,
  3309. LANES_TRACK_GROUP,
  3310. color
  3311. )
  3312. ) : console.timeStamp(
  3313. lanes,
  3314. startTime,
  3315. endTime,
  3316. currentTrack,
  3317. LANES_TRACK_GROUP,
  3318. color
  3319. );
  3320. }
  3321. }
  3322. function logSuspendedRenderPhase(startTime, endTime, lanes, debugTask) {
  3323. !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
  3324. console.timeStamp.bind(
  3325. console,
  3326. "Prewarm",
  3327. startTime,
  3328. endTime,
  3329. currentTrack,
  3330. LANES_TRACK_GROUP,
  3331. lanes
  3332. )
  3333. ) : console.timeStamp(
  3334. "Prewarm",
  3335. startTime,
  3336. endTime,
  3337. currentTrack,
  3338. LANES_TRACK_GROUP,
  3339. lanes
  3340. ));
  3341. }
  3342. function logSuspendedWithDelayPhase(startTime, endTime, lanes, debugTask) {
  3343. !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
  3344. console.timeStamp.bind(
  3345. console,
  3346. "Suspended",
  3347. startTime,
  3348. endTime,
  3349. currentTrack,
  3350. LANES_TRACK_GROUP,
  3351. lanes
  3352. )
  3353. ) : console.timeStamp(
  3354. "Suspended",
  3355. startTime,
  3356. endTime,
  3357. currentTrack,
  3358. LANES_TRACK_GROUP,
  3359. lanes
  3360. ));
  3361. }
  3362. function logRecoveredRenderPhase(startTime, endTime, lanes, recoverableErrors, hydrationFailed, debugTask) {
  3363. if (supportsUserTiming && !(endTime <= startTime)) {
  3364. lanes = [];
  3365. for (var i = 0; i < recoverableErrors.length; i++) {
  3366. var error = recoverableErrors[i].value;
  3367. lanes.push([
  3368. "Recoverable Error",
  3369. "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
  3370. ]);
  3371. }
  3372. startTime = {
  3373. start: startTime,
  3374. end: endTime,
  3375. detail: {
  3376. devtools: {
  3377. color: "primary-dark",
  3378. track: currentTrack,
  3379. trackGroup: LANES_TRACK_GROUP,
  3380. tooltipText: hydrationFailed ? "Hydration Failed" : "Recovered after Error",
  3381. properties: lanes
  3382. }
  3383. }
  3384. };
  3385. debugTask ? debugTask.run(
  3386. performance.measure.bind(performance, "Recovered", startTime)
  3387. ) : performance.measure("Recovered", startTime);
  3388. }
  3389. }
  3390. function logErroredRenderPhase(startTime, endTime, lanes, debugTask) {
  3391. !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
  3392. console.timeStamp.bind(
  3393. console,
  3394. "Errored",
  3395. startTime,
  3396. endTime,
  3397. currentTrack,
  3398. LANES_TRACK_GROUP,
  3399. "error"
  3400. )
  3401. ) : console.timeStamp(
  3402. "Errored",
  3403. startTime,
  3404. endTime,
  3405. currentTrack,
  3406. LANES_TRACK_GROUP,
  3407. "error"
  3408. ));
  3409. }
  3410. function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {
  3411. !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
  3412. console.timeStamp.bind(
  3413. console,
  3414. reason,
  3415. startTime,
  3416. endTime,
  3417. currentTrack,
  3418. LANES_TRACK_GROUP,
  3419. "secondary-light"
  3420. )
  3421. ) : console.timeStamp(
  3422. reason,
  3423. startTime,
  3424. endTime,
  3425. currentTrack,
  3426. LANES_TRACK_GROUP,
  3427. "secondary-light"
  3428. ));
  3429. }
  3430. function logCommitErrored(startTime, endTime, errors, passive, debugTask) {
  3431. if (supportsUserTiming && !(endTime <= startTime)) {
  3432. for (var properties = [], i = 0; i < errors.length; i++) {
  3433. var error = errors[i].value;
  3434. properties.push([
  3435. "Error",
  3436. "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
  3437. ]);
  3438. }
  3439. startTime = {
  3440. start: startTime,
  3441. end: endTime,
  3442. detail: {
  3443. devtools: {
  3444. color: "error",
  3445. track: currentTrack,
  3446. trackGroup: LANES_TRACK_GROUP,
  3447. tooltipText: passive ? "Remaining Effects Errored" : "Commit Errored",
  3448. properties
  3449. }
  3450. }
  3451. };
  3452. debugTask ? debugTask.run(
  3453. performance.measure.bind(performance, "Errored", startTime)
  3454. ) : performance.measure("Errored", startTime);
  3455. }
  3456. }
  3457. function logAnimatingPhase(startTime, endTime, debugTask) {
  3458. !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
  3459. console.timeStamp.bind(
  3460. console,
  3461. "Animating",
  3462. startTime,
  3463. endTime,
  3464. currentTrack,
  3465. LANES_TRACK_GROUP,
  3466. "secondary-dark"
  3467. )
  3468. ) : console.timeStamp(
  3469. "Animating",
  3470. startTime,
  3471. endTime,
  3472. currentTrack,
  3473. LANES_TRACK_GROUP,
  3474. "secondary-dark"
  3475. ));
  3476. }
  3477. function finishQueueingConcurrentUpdates() {
  3478. for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) {
  3479. var fiber = concurrentQueues[i];
  3480. concurrentQueues[i++] = null;
  3481. var queue = concurrentQueues[i];
  3482. concurrentQueues[i++] = null;
  3483. var update = concurrentQueues[i];
  3484. concurrentQueues[i++] = null;
  3485. var lane = concurrentQueues[i];
  3486. concurrentQueues[i++] = null;
  3487. if (null !== queue && null !== update) {
  3488. var pending = queue.pending;
  3489. null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
  3490. queue.pending = update;
  3491. }
  3492. 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
  3493. }
  3494. }
  3495. function enqueueUpdate$1(fiber, queue, update, lane) {
  3496. concurrentQueues[concurrentQueuesIndex++] = fiber;
  3497. concurrentQueues[concurrentQueuesIndex++] = queue;
  3498. concurrentQueues[concurrentQueuesIndex++] = update;
  3499. concurrentQueues[concurrentQueuesIndex++] = lane;
  3500. concurrentlyUpdatedLanes |= lane;
  3501. fiber.lanes |= lane;
  3502. fiber = fiber.alternate;
  3503. null !== fiber && (fiber.lanes |= lane);
  3504. }
  3505. function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
  3506. enqueueUpdate$1(fiber, queue, update, lane);
  3507. return getRootForUpdatedFiber(fiber);
  3508. }
  3509. function enqueueConcurrentRenderForLane(fiber, lane) {
  3510. enqueueUpdate$1(fiber, null, null, lane);
  3511. return getRootForUpdatedFiber(fiber);
  3512. }
  3513. function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
  3514. sourceFiber.lanes |= lane;
  3515. var alternate = sourceFiber.alternate;
  3516. null !== alternate && (alternate.lanes |= lane);
  3517. for (var isHidden = false, parent = sourceFiber.return; null !== parent; )
  3518. parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & OffscreenVisible || (isHidden = true)), sourceFiber = parent, parent = parent.return;
  3519. return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden && null !== update && (isHidden = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden], null === alternate ? sourceFiber[isHidden] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null;
  3520. }
  3521. function getRootForUpdatedFiber(sourceFiber) {
  3522. if (nestedUpdateCount > NESTED_UPDATE_LIMIT)
  3523. throw nestedPassiveUpdateCount = nestedUpdateCount = 0, rootWithPassiveNestedUpdates = rootWithNestedUpdates = null, Error(
  3524. "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
  3525. );
  3526. nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, console.error(
  3527. "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."
  3528. ));
  3529. null === sourceFiber.alternate && 0 !== (sourceFiber.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
  3530. for (var node = sourceFiber, parent = node.return; null !== parent; )
  3531. null === node.alternate && 0 !== (node.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), node = parent, parent = node.return;
  3532. return 3 === node.tag ? node.stateNode : null;
  3533. }
  3534. function resolveFunctionForHotReloading(type) {
  3535. if (null === resolveFamily) return type;
  3536. var family = resolveFamily(type);
  3537. return void 0 === family ? type : family.current;
  3538. }
  3539. function resolveForwardRefForHotReloading(type) {
  3540. if (null === resolveFamily) return type;
  3541. var family = resolveFamily(type);
  3542. return void 0 === family ? null !== type && void 0 !== type && "function" === typeof type.render && (family = resolveFunctionForHotReloading(type.render), type.render !== family) ? (family = { $$typeof: REACT_FORWARD_REF_TYPE, render: family }, void 0 !== type.displayName && (family.displayName = type.displayName), family) : type : family.current;
  3543. }
  3544. function isCompatibleFamilyForHotReloading(fiber, element) {
  3545. if (null === resolveFamily) return false;
  3546. var prevType = fiber.elementType;
  3547. element = element.type;
  3548. var needsCompareFamilies = false, $$typeofNextType = "object" === typeof element && null !== element ? element.$$typeof : null;
  3549. switch (fiber.tag) {
  3550. case 1:
  3551. "function" === typeof element && (needsCompareFamilies = true);
  3552. break;
  3553. case 0:
  3554. "function" === typeof element ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
  3555. break;
  3556. case 11:
  3557. $$typeofNextType === REACT_FORWARD_REF_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
  3558. break;
  3559. case 14:
  3560. case 15:
  3561. $$typeofNextType === REACT_MEMO_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
  3562. break;
  3563. default:
  3564. return false;
  3565. }
  3566. return needsCompareFamilies && (fiber = resolveFamily(prevType), void 0 !== fiber && fiber === resolveFamily(element)) ? true : false;
  3567. }
  3568. function markFailedErrorBoundaryForHotReloading(fiber) {
  3569. null !== resolveFamily && "function" === typeof WeakSet && (null === failedBoundaries && (failedBoundaries = /* @__PURE__ */ new WeakSet()), failedBoundaries.add(fiber));
  3570. }
  3571. function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
  3572. do {
  3573. var _fiber = fiber, alternate = _fiber.alternate, child = _fiber.child, sibling = _fiber.sibling, tag = _fiber.tag;
  3574. _fiber = _fiber.type;
  3575. var candidateType = null;
  3576. switch (tag) {
  3577. case 0:
  3578. case 15:
  3579. case 1:
  3580. candidateType = _fiber;
  3581. break;
  3582. case 11:
  3583. candidateType = _fiber.render;
  3584. }
  3585. if (null === resolveFamily)
  3586. throw Error("Expected resolveFamily to be set during hot reload.");
  3587. var needsRender = false;
  3588. _fiber = false;
  3589. null !== candidateType && (candidateType = resolveFamily(candidateType), void 0 !== candidateType && (staleFamilies.has(candidateType) ? _fiber = true : updatedFamilies.has(candidateType) && (1 === tag ? _fiber = true : needsRender = true)));
  3590. null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (_fiber = true);
  3591. _fiber && (fiber._debugNeedsRemount = true);
  3592. if (_fiber || needsRender)
  3593. alternate = enqueueConcurrentRenderForLane(fiber, 2), null !== alternate && scheduleUpdateOnFiber(alternate, fiber, 2);
  3594. null === child || _fiber || scheduleFibersWithFamiliesRecursively(
  3595. child,
  3596. updatedFamilies,
  3597. staleFamilies
  3598. );
  3599. if (null === sibling) break;
  3600. fiber = sibling;
  3601. } while (1);
  3602. }
  3603. function FiberNode(tag, pendingProps, key, mode) {
  3604. this.tag = tag;
  3605. this.key = key;
  3606. this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
  3607. this.index = 0;
  3608. this.refCleanup = this.ref = null;
  3609. this.pendingProps = pendingProps;
  3610. this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
  3611. this.mode = mode;
  3612. this.subtreeFlags = this.flags = 0;
  3613. this.deletions = null;
  3614. this.childLanes = this.lanes = 0;
  3615. this.alternate = null;
  3616. this.actualDuration = -0;
  3617. this.actualStartTime = -1.1;
  3618. this.treeBaseDuration = this.selfBaseDuration = -0;
  3619. this._debugTask = this._debugStack = this._debugOwner = this._debugInfo = null;
  3620. this._debugNeedsRemount = false;
  3621. this._debugHookTypes = null;
  3622. hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(this);
  3623. }
  3624. function shouldConstruct(Component) {
  3625. Component = Component.prototype;
  3626. return !(!Component || !Component.isReactComponent);
  3627. }
  3628. function createWorkInProgress(current2, pendingProps) {
  3629. var workInProgress2 = current2.alternate;
  3630. null === workInProgress2 ? (workInProgress2 = createFiber(
  3631. current2.tag,
  3632. pendingProps,
  3633. current2.key,
  3634. current2.mode
  3635. ), workInProgress2.elementType = current2.elementType, workInProgress2.type = current2.type, workInProgress2.stateNode = current2.stateNode, workInProgress2._debugOwner = current2._debugOwner, workInProgress2._debugStack = current2._debugStack, workInProgress2._debugTask = current2._debugTask, workInProgress2._debugHookTypes = current2._debugHookTypes, workInProgress2.alternate = current2, current2.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current2.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.actualDuration = -0, workInProgress2.actualStartTime = -1.1);
  3636. workInProgress2.flags = current2.flags & 65011712;
  3637. workInProgress2.childLanes = current2.childLanes;
  3638. workInProgress2.lanes = current2.lanes;
  3639. workInProgress2.child = current2.child;
  3640. workInProgress2.memoizedProps = current2.memoizedProps;
  3641. workInProgress2.memoizedState = current2.memoizedState;
  3642. workInProgress2.updateQueue = current2.updateQueue;
  3643. pendingProps = current2.dependencies;
  3644. workInProgress2.dependencies = null === pendingProps ? null : {
  3645. lanes: pendingProps.lanes,
  3646. firstContext: pendingProps.firstContext,
  3647. _debugThenableState: pendingProps._debugThenableState
  3648. };
  3649. workInProgress2.sibling = current2.sibling;
  3650. workInProgress2.index = current2.index;
  3651. workInProgress2.ref = current2.ref;
  3652. workInProgress2.refCleanup = current2.refCleanup;
  3653. workInProgress2.selfBaseDuration = current2.selfBaseDuration;
  3654. workInProgress2.treeBaseDuration = current2.treeBaseDuration;
  3655. workInProgress2._debugInfo = current2._debugInfo;
  3656. workInProgress2._debugNeedsRemount = current2._debugNeedsRemount;
  3657. switch (workInProgress2.tag) {
  3658. case 0:
  3659. case 15:
  3660. workInProgress2.type = resolveFunctionForHotReloading(current2.type);
  3661. break;
  3662. case 1:
  3663. workInProgress2.type = resolveFunctionForHotReloading(current2.type);
  3664. break;
  3665. case 11:
  3666. workInProgress2.type = resolveForwardRefForHotReloading(current2.type);
  3667. }
  3668. return workInProgress2;
  3669. }
  3670. function resetWorkInProgress(workInProgress2, renderLanes2) {
  3671. workInProgress2.flags &= 65011714;
  3672. var current2 = workInProgress2.alternate;
  3673. null === current2 ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null, workInProgress2.selfBaseDuration = 0, workInProgress2.treeBaseDuration = 0) : (workInProgress2.childLanes = current2.childLanes, workInProgress2.lanes = current2.lanes, workInProgress2.child = current2.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current2.memoizedProps, workInProgress2.memoizedState = current2.memoizedState, workInProgress2.updateQueue = current2.updateQueue, workInProgress2.type = current2.type, renderLanes2 = current2.dependencies, workInProgress2.dependencies = null === renderLanes2 ? null : {
  3674. lanes: renderLanes2.lanes,
  3675. firstContext: renderLanes2.firstContext,
  3676. _debugThenableState: renderLanes2._debugThenableState
  3677. }, workInProgress2.selfBaseDuration = current2.selfBaseDuration, workInProgress2.treeBaseDuration = current2.treeBaseDuration);
  3678. return workInProgress2;
  3679. }
  3680. function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
  3681. var fiberTag = 0, resolvedType = type;
  3682. if ("function" === typeof type)
  3683. shouldConstruct(type) && (fiberTag = 1), resolvedType = resolveFunctionForHotReloading(resolvedType);
  3684. else if ("string" === typeof type)
  3685. fiberTag = getHostContext(), fiberTag = isHostHoistableType(type, pendingProps, fiberTag) ? 26 : "html" === type || "head" === type || "body" === type ? 27 : 5;
  3686. else
  3687. a: switch (type) {
  3688. case REACT_ACTIVITY_TYPE:
  3689. return key = createFiber(31, pendingProps, key, mode), key.elementType = REACT_ACTIVITY_TYPE, key.lanes = lanes, key;
  3690. case REACT_FRAGMENT_TYPE:
  3691. return createFiberFromFragment(
  3692. pendingProps.children,
  3693. mode,
  3694. lanes,
  3695. key
  3696. );
  3697. case REACT_STRICT_MODE_TYPE:
  3698. fiberTag = 8;
  3699. mode |= StrictLegacyMode;
  3700. mode |= StrictEffectsMode;
  3701. break;
  3702. case REACT_PROFILER_TYPE:
  3703. return type = pendingProps, owner = mode, "string" !== typeof type.id && console.error(
  3704. 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
  3705. typeof type.id
  3706. ), key = createFiber(12, type, key, owner | ProfileMode), key.elementType = REACT_PROFILER_TYPE, key.lanes = lanes, key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }, key;
  3707. case REACT_SUSPENSE_TYPE:
  3708. return key = createFiber(13, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_TYPE, key.lanes = lanes, key;
  3709. case REACT_SUSPENSE_LIST_TYPE:
  3710. return key = createFiber(19, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_LIST_TYPE, key.lanes = lanes, key;
  3711. default:
  3712. if ("object" === typeof type && null !== type)
  3713. switch (type.$$typeof) {
  3714. case REACT_CONTEXT_TYPE:
  3715. fiberTag = 10;
  3716. break a;
  3717. case REACT_CONSUMER_TYPE:
  3718. fiberTag = 9;
  3719. break a;
  3720. case REACT_FORWARD_REF_TYPE:
  3721. fiberTag = 11;
  3722. resolvedType = resolveForwardRefForHotReloading(resolvedType);
  3723. break a;
  3724. case REACT_MEMO_TYPE:
  3725. fiberTag = 14;
  3726. break a;
  3727. case REACT_LAZY_TYPE:
  3728. fiberTag = 16;
  3729. resolvedType = null;
  3730. break a;
  3731. }
  3732. resolvedType = "";
  3733. if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
  3734. resolvedType += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
  3735. null === type ? pendingProps = "null" : isArrayImpl(type) ? pendingProps = "array" : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE ? (pendingProps = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", resolvedType = " Did you accidentally export a JSX literal instead of a component?") : pendingProps = typeof type;
  3736. (fiberTag = owner ? getComponentNameFromOwner(owner) : null) && (resolvedType += "\n\nCheck the render method of `" + fiberTag + "`.");
  3737. fiberTag = 29;
  3738. pendingProps = Error(
  3739. "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (pendingProps + "." + resolvedType)
  3740. );
  3741. resolvedType = null;
  3742. }
  3743. key = createFiber(fiberTag, pendingProps, key, mode);
  3744. key.elementType = type;
  3745. key.type = resolvedType;
  3746. key.lanes = lanes;
  3747. key._debugOwner = owner;
  3748. return key;
  3749. }
  3750. function createFiberFromElement(element, mode, lanes) {
  3751. mode = createFiberFromTypeAndProps(
  3752. element.type,
  3753. element.key,
  3754. element.props,
  3755. element._owner,
  3756. mode,
  3757. lanes
  3758. );
  3759. mode._debugOwner = element._owner;
  3760. mode._debugStack = element._debugStack;
  3761. mode._debugTask = element._debugTask;
  3762. return mode;
  3763. }
  3764. function createFiberFromFragment(elements, mode, lanes, key) {
  3765. elements = createFiber(7, elements, key, mode);
  3766. elements.lanes = lanes;
  3767. return elements;
  3768. }
  3769. function createFiberFromText(content, mode, lanes) {
  3770. content = createFiber(6, content, null, mode);
  3771. content.lanes = lanes;
  3772. return content;
  3773. }
  3774. function createFiberFromDehydratedFragment(dehydratedNode) {
  3775. var fiber = createFiber(18, null, null, NoMode);
  3776. fiber.stateNode = dehydratedNode;
  3777. return fiber;
  3778. }
  3779. function createFiberFromPortal(portal, mode, lanes) {
  3780. mode = createFiber(
  3781. 4,
  3782. null !== portal.children ? portal.children : [],
  3783. portal.key,
  3784. mode
  3785. );
  3786. mode.lanes = lanes;
  3787. mode.stateNode = {
  3788. containerInfo: portal.containerInfo,
  3789. pendingChildren: null,
  3790. implementation: portal.implementation
  3791. };
  3792. return mode;
  3793. }
  3794. function createCapturedValueAtFiber(value, source) {
  3795. if ("object" === typeof value && null !== value) {
  3796. var existing = CapturedStacks.get(value);
  3797. if (void 0 !== existing) return existing;
  3798. source = {
  3799. value,
  3800. source,
  3801. stack: getStackByFiberInDevAndProd(source)
  3802. };
  3803. CapturedStacks.set(value, source);
  3804. return source;
  3805. }
  3806. return {
  3807. value,
  3808. source,
  3809. stack: getStackByFiberInDevAndProd(source)
  3810. };
  3811. }
  3812. function pushTreeFork(workInProgress2, totalChildren) {
  3813. warnIfNotHydrating();
  3814. forkStack[forkStackIndex++] = treeForkCount;
  3815. forkStack[forkStackIndex++] = treeForkProvider;
  3816. treeForkProvider = workInProgress2;
  3817. treeForkCount = totalChildren;
  3818. }
  3819. function pushTreeId(workInProgress2, totalChildren, index) {
  3820. warnIfNotHydrating();
  3821. idStack[idStackIndex++] = treeContextId;
  3822. idStack[idStackIndex++] = treeContextOverflow;
  3823. idStack[idStackIndex++] = treeContextProvider;
  3824. treeContextProvider = workInProgress2;
  3825. var baseIdWithLeadingBit = treeContextId;
  3826. workInProgress2 = treeContextOverflow;
  3827. var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
  3828. baseIdWithLeadingBit &= ~(1 << baseLength);
  3829. index += 1;
  3830. var length = 32 - clz32(totalChildren) + baseLength;
  3831. if (30 < length) {
  3832. var numberOfOverflowBits = baseLength - baseLength % 5;
  3833. length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
  3834. baseIdWithLeadingBit >>= numberOfOverflowBits;
  3835. baseLength -= numberOfOverflowBits;
  3836. treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit;
  3837. treeContextOverflow = length + workInProgress2;
  3838. } else
  3839. treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
  3840. }
  3841. function pushMaterializedTreeId(workInProgress2) {
  3842. warnIfNotHydrating();
  3843. null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
  3844. }
  3845. function popTreeContext(workInProgress2) {
  3846. for (; workInProgress2 === treeForkProvider; )
  3847. treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
  3848. for (; workInProgress2 === treeContextProvider; )
  3849. treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
  3850. }
  3851. function getSuspendedTreeContext() {
  3852. warnIfNotHydrating();
  3853. return null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null;
  3854. }
  3855. function restoreSuspendedTreeContext(workInProgress2, suspendedContext) {
  3856. warnIfNotHydrating();
  3857. idStack[idStackIndex++] = treeContextId;
  3858. idStack[idStackIndex++] = treeContextOverflow;
  3859. idStack[idStackIndex++] = treeContextProvider;
  3860. treeContextId = suspendedContext.id;
  3861. treeContextOverflow = suspendedContext.overflow;
  3862. treeContextProvider = workInProgress2;
  3863. }
  3864. function warnIfNotHydrating() {
  3865. isHydrating || console.error(
  3866. "Expected to be hydrating. This is a bug in React. Please file an issue."
  3867. );
  3868. }
  3869. function buildHydrationDiffNode(fiber, distanceFromLeaf) {
  3870. if (null === fiber.return) {
  3871. if (null === hydrationDiffRootDEV)
  3872. hydrationDiffRootDEV = {
  3873. fiber,
  3874. children: [],
  3875. serverProps: void 0,
  3876. serverTail: [],
  3877. distanceFromLeaf
  3878. };
  3879. else {
  3880. if (hydrationDiffRootDEV.fiber !== fiber)
  3881. throw Error(
  3882. "Saw multiple hydration diff roots in a pass. This is a bug in React."
  3883. );
  3884. hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf && (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);
  3885. }
  3886. return hydrationDiffRootDEV;
  3887. }
  3888. var siblings = buildHydrationDiffNode(
  3889. fiber.return,
  3890. distanceFromLeaf + 1
  3891. ).children;
  3892. if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)
  3893. return siblings = siblings[siblings.length - 1], siblings.distanceFromLeaf > distanceFromLeaf && (siblings.distanceFromLeaf = distanceFromLeaf), siblings;
  3894. distanceFromLeaf = {
  3895. fiber,
  3896. children: [],
  3897. serverProps: void 0,
  3898. serverTail: [],
  3899. distanceFromLeaf
  3900. };
  3901. siblings.push(distanceFromLeaf);
  3902. return distanceFromLeaf;
  3903. }
  3904. function warnIfHydrating() {
  3905. isHydrating && console.error(
  3906. "We should not be hydrating here. This is a bug in React. Please file a bug."
  3907. );
  3908. }
  3909. function warnNonHydratedInstance(fiber, rejectedCandidate) {
  3910. didSuspendOrErrorDEV || (fiber = buildHydrationDiffNode(fiber, 0), fiber.serverProps = null, null !== rejectedCandidate && (rejectedCandidate = describeHydratableInstanceForDevWarnings(rejectedCandidate), fiber.serverTail.push(rejectedCandidate)));
  3911. }
  3912. function throwOnHydrationMismatch(fiber) {
  3913. var fromText = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : false, diff = "", diffRoot = hydrationDiffRootDEV;
  3914. null !== diffRoot && (hydrationDiffRootDEV = null, diff = describeDiff(diffRoot));
  3915. queueHydrationError(
  3916. createCapturedValueAtFiber(
  3917. Error(
  3918. "Hydration failed because the server rendered " + (fromText ? "text" : "HTML") + " didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" + diff
  3919. ),
  3920. fiber
  3921. )
  3922. );
  3923. throw HydrationMismatchException;
  3924. }
  3925. function prepareToHydrateHostInstance(fiber) {
  3926. var didHydrate = fiber.stateNode;
  3927. var type = fiber.type, props = fiber.memoizedProps;
  3928. didHydrate[internalInstanceKey] = fiber;
  3929. didHydrate[internalPropsKey] = props;
  3930. validatePropertiesInDevelopment(type, props);
  3931. switch (type) {
  3932. case "dialog":
  3933. listenToNonDelegatedEvent("cancel", didHydrate);
  3934. listenToNonDelegatedEvent("close", didHydrate);
  3935. break;
  3936. case "iframe":
  3937. case "object":
  3938. case "embed":
  3939. listenToNonDelegatedEvent("load", didHydrate);
  3940. break;
  3941. case "video":
  3942. case "audio":
  3943. for (type = 0; type < mediaEventTypes.length; type++)
  3944. listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate);
  3945. break;
  3946. case "source":
  3947. listenToNonDelegatedEvent("error", didHydrate);
  3948. break;
  3949. case "img":
  3950. case "image":
  3951. case "link":
  3952. listenToNonDelegatedEvent("error", didHydrate);
  3953. listenToNonDelegatedEvent("load", didHydrate);
  3954. break;
  3955. case "details":
  3956. listenToNonDelegatedEvent("toggle", didHydrate);
  3957. break;
  3958. case "input":
  3959. checkControlledValueProps("input", props);
  3960. listenToNonDelegatedEvent("invalid", didHydrate);
  3961. validateInputProps(didHydrate, props);
  3962. initInput(
  3963. didHydrate,
  3964. props.value,
  3965. props.defaultValue,
  3966. props.checked,
  3967. props.defaultChecked,
  3968. props.type,
  3969. props.name,
  3970. true
  3971. );
  3972. break;
  3973. case "option":
  3974. validateOptionProps(didHydrate, props);
  3975. break;
  3976. case "select":
  3977. checkControlledValueProps("select", props);
  3978. listenToNonDelegatedEvent("invalid", didHydrate);
  3979. validateSelectProps(didHydrate, props);
  3980. break;
  3981. case "textarea":
  3982. checkControlledValueProps("textarea", props), listenToNonDelegatedEvent("invalid", didHydrate), validateTextareaProps(didHydrate, props), initTextarea(
  3983. didHydrate,
  3984. props.value,
  3985. props.defaultValue,
  3986. props.children
  3987. );
  3988. }
  3989. type = props.children;
  3990. "string" !== typeof type && "number" !== typeof type && "bigint" !== typeof type || didHydrate.textContent === "" + type || true === props.suppressHydrationWarning || checkForUnmatchedText(didHydrate.textContent, type) ? (null != props.popover && (listenToNonDelegatedEvent("beforetoggle", didHydrate), listenToNonDelegatedEvent("toggle", didHydrate)), null != props.onScroll && listenToNonDelegatedEvent("scroll", didHydrate), null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", didHydrate), null != props.onClick && (didHydrate.onclick = noop$1), didHydrate = true) : didHydrate = false;
  3991. didHydrate || throwOnHydrationMismatch(fiber, true);
  3992. }
  3993. function popToNextHostParent(fiber) {
  3994. for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
  3995. switch (hydrationParentFiber.tag) {
  3996. case 5:
  3997. case 31:
  3998. case 13:
  3999. rootOrSingletonContext = false;
  4000. return;
  4001. case 27:
  4002. case 3:
  4003. rootOrSingletonContext = true;
  4004. return;
  4005. default:
  4006. hydrationParentFiber = hydrationParentFiber.return;
  4007. }
  4008. }
  4009. function popHydrationState(fiber) {
  4010. if (fiber !== hydrationParentFiber) return false;
  4011. if (!isHydrating)
  4012. return popToNextHostParent(fiber), isHydrating = true, false;
  4013. var tag = fiber.tag, JSCompiler_temp;
  4014. if (JSCompiler_temp = 3 !== tag && 27 !== tag) {
  4015. if (JSCompiler_temp = 5 === tag)
  4016. JSCompiler_temp = fiber.type, JSCompiler_temp = !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || shouldSetTextContent(fiber.type, fiber.memoizedProps);
  4017. JSCompiler_temp = !JSCompiler_temp;
  4018. }
  4019. if (JSCompiler_temp && nextHydratableInstance) {
  4020. for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) {
  4021. var diffNode = buildHydrationDiffNode(fiber, 0), description = describeHydratableInstanceForDevWarnings(JSCompiler_temp);
  4022. diffNode.serverTail.push(description);
  4023. JSCompiler_temp = "Suspense" === description.type ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling);
  4024. }
  4025. throwOnHydrationMismatch(fiber);
  4026. }
  4027. popToNextHostParent(fiber);
  4028. if (13 === tag) {
  4029. fiber = fiber.memoizedState;
  4030. fiber = null !== fiber ? fiber.dehydrated : null;
  4031. if (!fiber)
  4032. throw Error(
  4033. "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
  4034. );
  4035. nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
  4036. } else if (31 === tag) {
  4037. fiber = fiber.memoizedState;
  4038. fiber = null !== fiber ? fiber.dehydrated : null;
  4039. if (!fiber)
  4040. throw Error(
  4041. "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
  4042. );
  4043. nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
  4044. } else
  4045. 27 === tag ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null;
  4046. return true;
  4047. }
  4048. function resetHydrationState() {
  4049. nextHydratableInstance = hydrationParentFiber = null;
  4050. didSuspendOrErrorDEV = isHydrating = false;
  4051. }
  4052. function upgradeHydrationErrorsToRecoverable() {
  4053. var queuedErrors = hydrationErrors;
  4054. null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
  4055. workInProgressRootRecoverableErrors,
  4056. queuedErrors
  4057. ), hydrationErrors = null);
  4058. return queuedErrors;
  4059. }
  4060. function queueHydrationError(error) {
  4061. null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
  4062. }
  4063. function emitPendingHydrationWarnings() {
  4064. var diffRoot = hydrationDiffRootDEV;
  4065. if (null !== diffRoot) {
  4066. hydrationDiffRootDEV = null;
  4067. for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; )
  4068. diffRoot = diffRoot.children[0];
  4069. runWithFiberInDEV(diffRoot.fiber, function() {
  4070. console.error(
  4071. "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s",
  4072. "https://react.dev/link/hydration-mismatch",
  4073. diff
  4074. );
  4075. });
  4076. }
  4077. }
  4078. function resetContextDependencies() {
  4079. lastContextDependency = currentlyRenderingFiber$1 = null;
  4080. isDisallowedContextReadInDEV = false;
  4081. }
  4082. function pushProvider(providerFiber, context, nextValue) {
  4083. push(valueCursor, context._currentValue, providerFiber);
  4084. context._currentValue = nextValue;
  4085. push(rendererCursorDEV, context._currentRenderer, providerFiber);
  4086. void 0 !== context._currentRenderer && null !== context._currentRenderer && context._currentRenderer !== rendererSigil && console.error(
  4087. "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
  4088. );
  4089. context._currentRenderer = rendererSigil;
  4090. }
  4091. function popProvider(context, providerFiber) {
  4092. context._currentValue = valueCursor.current;
  4093. var currentRenderer = rendererCursorDEV.current;
  4094. pop(rendererCursorDEV, providerFiber);
  4095. context._currentRenderer = currentRenderer;
  4096. pop(valueCursor, providerFiber);
  4097. }
  4098. function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
  4099. for (; null !== parent; ) {
  4100. var alternate = parent.alternate;
  4101. (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2);
  4102. if (parent === propagationRoot) break;
  4103. parent = parent.return;
  4104. }
  4105. parent !== propagationRoot && console.error(
  4106. "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
  4107. );
  4108. }
  4109. function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
  4110. var fiber = workInProgress2.child;
  4111. null !== fiber && (fiber.return = workInProgress2);
  4112. for (; null !== fiber; ) {
  4113. var list = fiber.dependencies;
  4114. if (null !== list) {
  4115. var nextFiber = fiber.child;
  4116. list = list.firstContext;
  4117. a: for (; null !== list; ) {
  4118. var dependency = list;
  4119. list = fiber;
  4120. for (var i = 0; i < contexts.length; i++)
  4121. if (dependency.context === contexts[i]) {
  4122. list.lanes |= renderLanes2;
  4123. dependency = list.alternate;
  4124. null !== dependency && (dependency.lanes |= renderLanes2);
  4125. scheduleContextWorkOnParentPath(
  4126. list.return,
  4127. renderLanes2,
  4128. workInProgress2
  4129. );
  4130. forcePropagateEntireTree || (nextFiber = null);
  4131. break a;
  4132. }
  4133. list = dependency.next;
  4134. }
  4135. } else if (18 === fiber.tag) {
  4136. nextFiber = fiber.return;
  4137. if (null === nextFiber)
  4138. throw Error(
  4139. "We just came from a parent so we must have had a parent. This is a bug in React."
  4140. );
  4141. nextFiber.lanes |= renderLanes2;
  4142. list = nextFiber.alternate;
  4143. null !== list && (list.lanes |= renderLanes2);
  4144. scheduleContextWorkOnParentPath(
  4145. nextFiber,
  4146. renderLanes2,
  4147. workInProgress2
  4148. );
  4149. nextFiber = null;
  4150. } else nextFiber = fiber.child;
  4151. if (null !== nextFiber) nextFiber.return = fiber;
  4152. else
  4153. for (nextFiber = fiber; null !== nextFiber; ) {
  4154. if (nextFiber === workInProgress2) {
  4155. nextFiber = null;
  4156. break;
  4157. }
  4158. fiber = nextFiber.sibling;
  4159. if (null !== fiber) {
  4160. fiber.return = nextFiber.return;
  4161. nextFiber = fiber;
  4162. break;
  4163. }
  4164. nextFiber = nextFiber.return;
  4165. }
  4166. fiber = nextFiber;
  4167. }
  4168. }
  4169. function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) {
  4170. current2 = null;
  4171. for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) {
  4172. if (!isInsidePropagationBailout) {
  4173. if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
  4174. else if (0 !== (parent.flags & 262144)) break;
  4175. }
  4176. if (10 === parent.tag) {
  4177. var currentParent = parent.alternate;
  4178. if (null === currentParent)
  4179. throw Error("Should have a current fiber. This is a bug in React.");
  4180. currentParent = currentParent.memoizedProps;
  4181. if (null !== currentParent) {
  4182. var context = parent.type;
  4183. objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context) : current2 = [context]);
  4184. }
  4185. } else if (parent === hostTransitionProviderCursor.current) {
  4186. currentParent = parent.alternate;
  4187. if (null === currentParent)
  4188. throw Error("Should have a current fiber. This is a bug in React.");
  4189. currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]);
  4190. }
  4191. parent = parent.return;
  4192. }
  4193. null !== current2 && propagateContextChanges(
  4194. workInProgress2,
  4195. current2,
  4196. renderLanes2,
  4197. forcePropagateEntireTree
  4198. );
  4199. workInProgress2.flags |= 262144;
  4200. }
  4201. function checkIfContextChanged(currentDependencies) {
  4202. for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) {
  4203. if (!objectIs(
  4204. currentDependencies.context._currentValue,
  4205. currentDependencies.memoizedValue
  4206. ))
  4207. return true;
  4208. currentDependencies = currentDependencies.next;
  4209. }
  4210. return false;
  4211. }
  4212. function prepareToReadContext(workInProgress2) {
  4213. currentlyRenderingFiber$1 = workInProgress2;
  4214. lastContextDependency = null;
  4215. workInProgress2 = workInProgress2.dependencies;
  4216. null !== workInProgress2 && (workInProgress2.firstContext = null);
  4217. }
  4218. function readContext(context) {
  4219. isDisallowedContextReadInDEV && console.error(
  4220. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  4221. );
  4222. return readContextForConsumer(currentlyRenderingFiber$1, context);
  4223. }
  4224. function readContextDuringReconciliation(consumer, context) {
  4225. null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
  4226. return readContextForConsumer(consumer, context);
  4227. }
  4228. function readContextForConsumer(consumer, context) {
  4229. var value = context._currentValue;
  4230. context = { context, memoizedValue: value, next: null };
  4231. if (null === lastContextDependency) {
  4232. if (null === consumer)
  4233. throw Error(
  4234. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  4235. );
  4236. lastContextDependency = context;
  4237. consumer.dependencies = {
  4238. lanes: 0,
  4239. firstContext: context,
  4240. _debugThenableState: null
  4241. };
  4242. consumer.flags |= 524288;
  4243. } else lastContextDependency = lastContextDependency.next = context;
  4244. return value;
  4245. }
  4246. function createCache() {
  4247. return {
  4248. controller: new AbortControllerLocal(),
  4249. data: /* @__PURE__ */ new Map(),
  4250. refCount: 0
  4251. };
  4252. }
  4253. function retainCache(cache) {
  4254. cache.controller.signal.aborted && console.warn(
  4255. "A cache instance was retained after it was already freed. This likely indicates a bug in React."
  4256. );
  4257. cache.refCount++;
  4258. }
  4259. function releaseCache(cache) {
  4260. cache.refCount--;
  4261. 0 > cache.refCount && console.warn(
  4262. "A cache instance was released after it was already freed. This likely indicates a bug in React."
  4263. );
  4264. 0 === cache.refCount && scheduleCallback$2(NormalPriority, function() {
  4265. cache.controller.abort();
  4266. });
  4267. }
  4268. function startUpdateTimerByLane(lane, method, fiber) {
  4269. if (0 !== (lane & 127))
  4270. 0 > blockingUpdateTime && (blockingUpdateTime = now(), blockingUpdateTask = createTask(method), blockingUpdateMethodName = method, null != fiber && (blockingUpdateComponentName = getComponentNameFromFiber(fiber)), (executionContext & (RenderContext | CommitContext)) !== NoContext && (componentEffectSpawnedUpdate = true, blockingUpdateType = SPAWNED_UPDATE), lane = resolveEventTimeStamp(), method = resolveEventType(), lane !== blockingEventRepeatTime || method !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== method && (blockingUpdateType = SPAWNED_UPDATE), blockingEventTime = lane, blockingEventType = method);
  4271. else if (0 !== (lane & 4194048) && 0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = createTask(method), transitionUpdateMethodName = method, null != fiber && (transitionUpdateComponentName = getComponentNameFromFiber(fiber)), 0 > transitionStartTime)) {
  4272. lane = resolveEventTimeStamp();
  4273. method = resolveEventType();
  4274. if (lane !== transitionEventRepeatTime || method !== transitionEventType)
  4275. transitionEventRepeatTime = -1.1;
  4276. transitionEventTime = lane;
  4277. transitionEventType = method;
  4278. }
  4279. }
  4280. function startHostActionTimer(fiber) {
  4281. if (0 > blockingUpdateTime) {
  4282. blockingUpdateTime = now();
  4283. blockingUpdateTask = null != fiber._debugTask ? fiber._debugTask : null;
  4284. (executionContext & (RenderContext | CommitContext)) !== NoContext && (blockingUpdateType = SPAWNED_UPDATE);
  4285. var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
  4286. newEventTime !== blockingEventRepeatTime || newEventType !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== newEventType && (blockingUpdateType = SPAWNED_UPDATE);
  4287. blockingEventTime = newEventTime;
  4288. blockingEventType = newEventType;
  4289. }
  4290. if (0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = null != fiber._debugTask ? fiber._debugTask : null, 0 > transitionStartTime)) {
  4291. fiber = resolveEventTimeStamp();
  4292. newEventTime = resolveEventType();
  4293. if (fiber !== transitionEventRepeatTime || newEventTime !== transitionEventType)
  4294. transitionEventRepeatTime = -1.1;
  4295. transitionEventTime = fiber;
  4296. transitionEventType = newEventTime;
  4297. }
  4298. }
  4299. function pushNestedEffectDurations() {
  4300. var prevEffectDuration = profilerEffectDuration;
  4301. profilerEffectDuration = 0;
  4302. return prevEffectDuration;
  4303. }
  4304. function popNestedEffectDurations(prevEffectDuration) {
  4305. var elapsedTime = profilerEffectDuration;
  4306. profilerEffectDuration = prevEffectDuration;
  4307. return elapsedTime;
  4308. }
  4309. function bubbleNestedEffectDurations(prevEffectDuration) {
  4310. var elapsedTime = profilerEffectDuration;
  4311. profilerEffectDuration += prevEffectDuration;
  4312. return elapsedTime;
  4313. }
  4314. function resetComponentEffectTimers() {
  4315. componentEffectEndTime = componentEffectStartTime = -1.1;
  4316. }
  4317. function pushComponentEffectStart() {
  4318. var prevEffectStart = componentEffectStartTime;
  4319. componentEffectStartTime = -1.1;
  4320. return prevEffectStart;
  4321. }
  4322. function popComponentEffectStart(prevEffectStart) {
  4323. 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart);
  4324. }
  4325. function pushComponentEffectDuration() {
  4326. var prevEffectDuration = componentEffectDuration;
  4327. componentEffectDuration = -0;
  4328. return prevEffectDuration;
  4329. }
  4330. function popComponentEffectDuration(prevEffectDuration) {
  4331. 0 <= prevEffectDuration && (componentEffectDuration = prevEffectDuration);
  4332. }
  4333. function pushComponentEffectErrors() {
  4334. var prevErrors = componentEffectErrors;
  4335. componentEffectErrors = null;
  4336. return prevErrors;
  4337. }
  4338. function pushComponentEffectDidSpawnUpdate() {
  4339. var prev = componentEffectSpawnedUpdate;
  4340. componentEffectSpawnedUpdate = false;
  4341. return prev;
  4342. }
  4343. function startProfilerTimer(fiber) {
  4344. profilerStartTime = now();
  4345. 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
  4346. }
  4347. function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
  4348. if (0 <= profilerStartTime) {
  4349. var elapsedTime = now() - profilerStartTime;
  4350. fiber.actualDuration += elapsedTime;
  4351. fiber.selfBaseDuration = elapsedTime;
  4352. profilerStartTime = -1;
  4353. }
  4354. }
  4355. function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
  4356. if (0 <= profilerStartTime) {
  4357. var elapsedTime = now() - profilerStartTime;
  4358. fiber.actualDuration += elapsedTime;
  4359. profilerStartTime = -1;
  4360. }
  4361. }
  4362. function recordEffectDuration() {
  4363. if (0 <= profilerStartTime) {
  4364. var endTime = now(), elapsedTime = endTime - profilerStartTime;
  4365. profilerStartTime = -1;
  4366. profilerEffectDuration += elapsedTime;
  4367. componentEffectDuration += elapsedTime;
  4368. componentEffectEndTime = endTime;
  4369. }
  4370. }
  4371. function recordEffectError(errorInfo) {
  4372. null === componentEffectErrors && (componentEffectErrors = []);
  4373. componentEffectErrors.push(errorInfo);
  4374. null === commitErrors && (commitErrors = []);
  4375. commitErrors.push(errorInfo);
  4376. }
  4377. function startEffectTimer() {
  4378. profilerStartTime = now();
  4379. 0 > componentEffectStartTime && (componentEffectStartTime = profilerStartTime);
  4380. }
  4381. function transferActualDuration(fiber) {
  4382. for (var child = fiber.child; child; )
  4383. fiber.actualDuration += child.actualDuration, child = child.sibling;
  4384. }
  4385. function entangleAsyncAction(transition, thenable) {
  4386. if (null === currentEntangledListeners) {
  4387. var entangledListeners = currentEntangledListeners = [];
  4388. currentEntangledPendingCount = 0;
  4389. currentEntangledLane = requestTransitionLane();
  4390. currentEntangledActionThenable = {
  4391. status: "pending",
  4392. value: void 0,
  4393. then: function(resolve) {
  4394. entangledListeners.push(resolve);
  4395. }
  4396. };
  4397. }
  4398. currentEntangledPendingCount++;
  4399. thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
  4400. return thenable;
  4401. }
  4402. function pingEngtangledActionScope() {
  4403. if (0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), null !== currentEntangledListeners)) {
  4404. null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
  4405. var listeners = currentEntangledListeners;
  4406. currentEntangledListeners = null;
  4407. currentEntangledLane = 0;
  4408. currentEntangledActionThenable = null;
  4409. for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
  4410. }
  4411. }
  4412. function chainThenableValue(thenable, result) {
  4413. var listeners = [], thenableWithOverride = {
  4414. status: "pending",
  4415. value: null,
  4416. reason: null,
  4417. then: function(resolve) {
  4418. listeners.push(resolve);
  4419. }
  4420. };
  4421. thenable.then(
  4422. function() {
  4423. thenableWithOverride.status = "fulfilled";
  4424. thenableWithOverride.value = result;
  4425. for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
  4426. },
  4427. function(error) {
  4428. thenableWithOverride.status = "rejected";
  4429. thenableWithOverride.reason = error;
  4430. for (error = 0; error < listeners.length; error++)
  4431. (0, listeners[error])(void 0);
  4432. }
  4433. );
  4434. return thenableWithOverride;
  4435. }
  4436. function peekCacheFromPool() {
  4437. var cacheResumedFromPreviousRender = resumedCache.current;
  4438. return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
  4439. }
  4440. function pushTransition(offscreenWorkInProgress, prevCachePool) {
  4441. null === prevCachePool ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
  4442. }
  4443. function getSuspendedCache() {
  4444. var cacheFromPool = peekCacheFromPool();
  4445. return null === cacheFromPool ? null : { parent: CacheContext._currentValue, pool: cacheFromPool };
  4446. }
  4447. function createThenableState() {
  4448. return { didWarnAboutUncachedPromise: false, thenables: [] };
  4449. }
  4450. function isThenableResolved(thenable) {
  4451. thenable = thenable.status;
  4452. return "fulfilled" === thenable || "rejected" === thenable;
  4453. }
  4454. function trackUsedThenable(thenableState2, thenable, index) {
  4455. null !== ReactSharedInternals.actQueue && (ReactSharedInternals.didUsePromise = true);
  4456. var trackedThenables = thenableState2.thenables;
  4457. index = trackedThenables[index];
  4458. void 0 === index ? trackedThenables.push(thenable) : index !== thenable && (thenableState2.didWarnAboutUncachedPromise || (thenableState2.didWarnAboutUncachedPromise = true, console.error(
  4459. "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework."
  4460. )), thenable.then(noop$1, noop$1), thenable = index);
  4461. if (void 0 === thenable._debugInfo) {
  4462. thenableState2 = performance.now();
  4463. trackedThenables = thenable.displayName;
  4464. var ioInfo = {
  4465. name: "string" === typeof trackedThenables ? trackedThenables : "Promise",
  4466. start: thenableState2,
  4467. end: thenableState2,
  4468. value: thenable
  4469. };
  4470. thenable._debugInfo = [{ awaited: ioInfo }];
  4471. "fulfilled" !== thenable.status && "rejected" !== thenable.status && (thenableState2 = function() {
  4472. ioInfo.end = performance.now();
  4473. }, thenable.then(thenableState2, thenableState2));
  4474. }
  4475. switch (thenable.status) {
  4476. case "fulfilled":
  4477. return thenable.value;
  4478. case "rejected":
  4479. throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
  4480. default:
  4481. if ("string" === typeof thenable.status)
  4482. thenable.then(noop$1, noop$1);
  4483. else {
  4484. thenableState2 = workInProgressRoot;
  4485. if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter)
  4486. throw Error(
  4487. "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
  4488. );
  4489. thenableState2 = thenable;
  4490. thenableState2.status = "pending";
  4491. thenableState2.then(
  4492. function(fulfilledValue) {
  4493. if ("pending" === thenable.status) {
  4494. var fulfilledThenable = thenable;
  4495. fulfilledThenable.status = "fulfilled";
  4496. fulfilledThenable.value = fulfilledValue;
  4497. }
  4498. },
  4499. function(error) {
  4500. if ("pending" === thenable.status) {
  4501. var rejectedThenable = thenable;
  4502. rejectedThenable.status = "rejected";
  4503. rejectedThenable.reason = error;
  4504. }
  4505. }
  4506. );
  4507. }
  4508. switch (thenable.status) {
  4509. case "fulfilled":
  4510. return thenable.value;
  4511. case "rejected":
  4512. throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
  4513. }
  4514. suspendedThenable = thenable;
  4515. needsToResetSuspendedThenableDEV = true;
  4516. throw SuspenseException;
  4517. }
  4518. }
  4519. function resolveLazy(lazyType) {
  4520. try {
  4521. return callLazyInitInDEV(lazyType);
  4522. } catch (x) {
  4523. if (null !== x && "object" === typeof x && "function" === typeof x.then)
  4524. throw suspendedThenable = x, needsToResetSuspendedThenableDEV = true, SuspenseException;
  4525. throw x;
  4526. }
  4527. }
  4528. function getSuspendedThenable() {
  4529. if (null === suspendedThenable)
  4530. throw Error(
  4531. "Expected a suspended thenable. This is a bug in React. Please file an issue."
  4532. );
  4533. var thenable = suspendedThenable;
  4534. suspendedThenable = null;
  4535. needsToResetSuspendedThenableDEV = false;
  4536. return thenable;
  4537. }
  4538. function checkIfUseWrappedInAsyncCatch(rejectedReason) {
  4539. if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
  4540. throw Error(
  4541. "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
  4542. );
  4543. }
  4544. function pushDebugInfo(debugInfo) {
  4545. var previousDebugInfo = currentDebugInfo;
  4546. null != debugInfo && (currentDebugInfo = null === previousDebugInfo ? debugInfo : previousDebugInfo.concat(debugInfo));
  4547. return previousDebugInfo;
  4548. }
  4549. function getCurrentDebugTask() {
  4550. var debugInfo = currentDebugInfo;
  4551. if (null != debugInfo) {
  4552. for (var i = debugInfo.length - 1; 0 <= i; i--)
  4553. if (null != debugInfo[i].name) {
  4554. var debugTask = debugInfo[i].debugTask;
  4555. if (null != debugTask) return debugTask;
  4556. }
  4557. }
  4558. return null;
  4559. }
  4560. function validateFragmentProps(element, fiber, returnFiber) {
  4561. for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) {
  4562. var key = keys[i];
  4563. if ("children" !== key && "key" !== key) {
  4564. null === fiber && (fiber = createFiberFromElement(element, returnFiber.mode, 0), fiber._debugInfo = currentDebugInfo, fiber.return = returnFiber);
  4565. runWithFiberInDEV(
  4566. fiber,
  4567. function(erroredKey) {
  4568. console.error(
  4569. "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
  4570. erroredKey
  4571. );
  4572. },
  4573. key
  4574. );
  4575. break;
  4576. }
  4577. }
  4578. }
  4579. function unwrapThenable(thenable) {
  4580. var index = thenableIndexCounter$1;
  4581. thenableIndexCounter$1 += 1;
  4582. null === thenableState$1 && (thenableState$1 = createThenableState());
  4583. return trackUsedThenable(thenableState$1, thenable, index);
  4584. }
  4585. function coerceRef(workInProgress2, element) {
  4586. element = element.props.ref;
  4587. workInProgress2.ref = void 0 !== element ? element : null;
  4588. }
  4589. function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
  4590. if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
  4591. throw Error(
  4592. 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.'
  4593. );
  4594. returnFiber = Object.prototype.toString.call(newChild);
  4595. throw Error(
  4596. "Objects are not valid as a React child (found: " + ("[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber) + "). If you meant to render a collection of children, use an array instead."
  4597. );
  4598. }
  4599. function throwOnInvalidObjectType(returnFiber, newChild) {
  4600. var debugTask = getCurrentDebugTask();
  4601. null !== debugTask ? debugTask.run(
  4602. throwOnInvalidObjectTypeImpl.bind(null, returnFiber, newChild)
  4603. ) : throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  4604. }
  4605. function warnOnFunctionTypeImpl(returnFiber, invalidChild) {
  4606. var parentName = getComponentNameFromFiber(returnFiber) || "Component";
  4607. ownerHasFunctionTypeWarning[parentName] || (ownerHasFunctionTypeWarning[parentName] = true, invalidChild = invalidChild.displayName || invalidChild.name || "Component", 3 === returnFiber.tag ? console.error(
  4608. "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)",
  4609. invalidChild,
  4610. invalidChild,
  4611. invalidChild
  4612. ) : console.error(
  4613. "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}</%s>",
  4614. invalidChild,
  4615. invalidChild,
  4616. parentName,
  4617. invalidChild,
  4618. parentName
  4619. ));
  4620. }
  4621. function warnOnFunctionType(returnFiber, invalidChild) {
  4622. var debugTask = getCurrentDebugTask();
  4623. null !== debugTask ? debugTask.run(
  4624. warnOnFunctionTypeImpl.bind(null, returnFiber, invalidChild)
  4625. ) : warnOnFunctionTypeImpl(returnFiber, invalidChild);
  4626. }
  4627. function warnOnSymbolTypeImpl(returnFiber, invalidChild) {
  4628. var parentName = getComponentNameFromFiber(returnFiber) || "Component";
  4629. ownerHasSymbolTypeWarning[parentName] || (ownerHasSymbolTypeWarning[parentName] = true, invalidChild = String(invalidChild), 3 === returnFiber.tag ? console.error(
  4630. "Symbols are not valid as a React child.\n root.render(%s)",
  4631. invalidChild
  4632. ) : console.error(
  4633. "Symbols are not valid as a React child.\n <%s>%s</%s>",
  4634. parentName,
  4635. invalidChild,
  4636. parentName
  4637. ));
  4638. }
  4639. function warnOnSymbolType(returnFiber, invalidChild) {
  4640. var debugTask = getCurrentDebugTask();
  4641. null !== debugTask ? debugTask.run(
  4642. warnOnSymbolTypeImpl.bind(null, returnFiber, invalidChild)
  4643. ) : warnOnSymbolTypeImpl(returnFiber, invalidChild);
  4644. }
  4645. function createChildReconciler(shouldTrackSideEffects) {
  4646. function deleteChild(returnFiber, childToDelete) {
  4647. if (shouldTrackSideEffects) {
  4648. var deletions = returnFiber.deletions;
  4649. null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
  4650. }
  4651. }
  4652. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  4653. if (!shouldTrackSideEffects) return null;
  4654. for (; null !== currentFirstChild; )
  4655. deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
  4656. return null;
  4657. }
  4658. function mapRemainingChildren(currentFirstChild) {
  4659. for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; )
  4660. null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
  4661. return existingChildren;
  4662. }
  4663. function useFiber(fiber, pendingProps) {
  4664. fiber = createWorkInProgress(fiber, pendingProps);
  4665. fiber.index = 0;
  4666. fiber.sibling = null;
  4667. return fiber;
  4668. }
  4669. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  4670. newFiber.index = newIndex;
  4671. if (!shouldTrackSideEffects)
  4672. return newFiber.flags |= 1048576, lastPlacedIndex;
  4673. newIndex = newFiber.alternate;
  4674. if (null !== newIndex)
  4675. return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex;
  4676. newFiber.flags |= 67108866;
  4677. return lastPlacedIndex;
  4678. }
  4679. function placeSingleChild(newFiber) {
  4680. shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866);
  4681. return newFiber;
  4682. }
  4683. function updateTextNode(returnFiber, current2, textContent, lanes) {
  4684. if (null === current2 || 6 !== current2.tag)
  4685. return current2 = createFiberFromText(
  4686. textContent,
  4687. returnFiber.mode,
  4688. lanes
  4689. ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
  4690. current2 = useFiber(current2, textContent);
  4691. current2.return = returnFiber;
  4692. current2._debugInfo = currentDebugInfo;
  4693. return current2;
  4694. }
  4695. function updateElement(returnFiber, current2, element, lanes) {
  4696. var elementType = element.type;
  4697. if (elementType === REACT_FRAGMENT_TYPE)
  4698. return current2 = updateFragment(
  4699. returnFiber,
  4700. current2,
  4701. element.props.children,
  4702. lanes,
  4703. element.key
  4704. ), validateFragmentProps(element, current2, returnFiber), current2;
  4705. if (null !== current2 && (current2.elementType === elementType || isCompatibleFamilyForHotReloading(current2, element) || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current2.type))
  4706. return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2._debugOwner = element._owner, current2._debugInfo = currentDebugInfo, current2;
  4707. current2 = createFiberFromElement(element, returnFiber.mode, lanes);
  4708. coerceRef(current2, element);
  4709. current2.return = returnFiber;
  4710. current2._debugInfo = currentDebugInfo;
  4711. return current2;
  4712. }
  4713. function updatePortal(returnFiber, current2, portal, lanes) {
  4714. if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation)
  4715. return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2._debugInfo = currentDebugInfo, current2;
  4716. current2 = useFiber(current2, portal.children || []);
  4717. current2.return = returnFiber;
  4718. current2._debugInfo = currentDebugInfo;
  4719. return current2;
  4720. }
  4721. function updateFragment(returnFiber, current2, fragment, lanes, key) {
  4722. if (null === current2 || 7 !== current2.tag)
  4723. return current2 = createFiberFromFragment(
  4724. fragment,
  4725. returnFiber.mode,
  4726. lanes,
  4727. key
  4728. ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
  4729. current2 = useFiber(current2, fragment);
  4730. current2.return = returnFiber;
  4731. current2._debugInfo = currentDebugInfo;
  4732. return current2;
  4733. }
  4734. function createChild(returnFiber, newChild, lanes) {
  4735. if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
  4736. return newChild = createFiberFromText(
  4737. "" + newChild,
  4738. returnFiber.mode,
  4739. lanes
  4740. ), newChild.return = returnFiber, newChild._debugOwner = returnFiber, newChild._debugTask = returnFiber._debugTask, newChild._debugInfo = currentDebugInfo, newChild;
  4741. if ("object" === typeof newChild && null !== newChild) {
  4742. switch (newChild.$$typeof) {
  4743. case REACT_ELEMENT_TYPE:
  4744. return lanes = createFiberFromElement(
  4745. newChild,
  4746. returnFiber.mode,
  4747. lanes
  4748. ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
  4749. case REACT_PORTAL_TYPE:
  4750. return newChild = createFiberFromPortal(
  4751. newChild,
  4752. returnFiber.mode,
  4753. lanes
  4754. ), newChild.return = returnFiber, newChild._debugInfo = currentDebugInfo, newChild;
  4755. case REACT_LAZY_TYPE:
  4756. var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);
  4757. newChild = resolveLazy(newChild);
  4758. returnFiber = createChild(returnFiber, newChild, lanes);
  4759. currentDebugInfo = _prevDebugInfo;
  4760. return returnFiber;
  4761. }
  4762. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  4763. return lanes = createFiberFromFragment(
  4764. newChild,
  4765. returnFiber.mode,
  4766. lanes,
  4767. null
  4768. ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
  4769. if ("function" === typeof newChild.then)
  4770. return _prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = createChild(
  4771. returnFiber,
  4772. unwrapThenable(newChild),
  4773. lanes
  4774. ), currentDebugInfo = _prevDebugInfo, returnFiber;
  4775. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  4776. return createChild(
  4777. returnFiber,
  4778. readContextDuringReconciliation(returnFiber, newChild),
  4779. lanes
  4780. );
  4781. throwOnInvalidObjectType(returnFiber, newChild);
  4782. }
  4783. "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
  4784. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  4785. return null;
  4786. }
  4787. function updateSlot(returnFiber, oldFiber, newChild, lanes) {
  4788. var key = null !== oldFiber ? oldFiber.key : null;
  4789. if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
  4790. return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
  4791. if ("object" === typeof newChild && null !== newChild) {
  4792. switch (newChild.$$typeof) {
  4793. case REACT_ELEMENT_TYPE:
  4794. return newChild.key === key ? (key = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
  4795. returnFiber,
  4796. oldFiber,
  4797. newChild,
  4798. lanes
  4799. ), currentDebugInfo = key, returnFiber) : null;
  4800. case REACT_PORTAL_TYPE:
  4801. return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
  4802. case REACT_LAZY_TYPE:
  4803. return key = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = updateSlot(
  4804. returnFiber,
  4805. oldFiber,
  4806. newChild,
  4807. lanes
  4808. ), currentDebugInfo = key, returnFiber;
  4809. }
  4810. if (isArrayImpl(newChild) || getIteratorFn(newChild)) {
  4811. if (null !== key) return null;
  4812. key = pushDebugInfo(newChild._debugInfo);
  4813. returnFiber = updateFragment(
  4814. returnFiber,
  4815. oldFiber,
  4816. newChild,
  4817. lanes,
  4818. null
  4819. );
  4820. currentDebugInfo = key;
  4821. return returnFiber;
  4822. }
  4823. if ("function" === typeof newChild.then)
  4824. return key = pushDebugInfo(newChild._debugInfo), returnFiber = updateSlot(
  4825. returnFiber,
  4826. oldFiber,
  4827. unwrapThenable(newChild),
  4828. lanes
  4829. ), currentDebugInfo = key, returnFiber;
  4830. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  4831. return updateSlot(
  4832. returnFiber,
  4833. oldFiber,
  4834. readContextDuringReconciliation(returnFiber, newChild),
  4835. lanes
  4836. );
  4837. throwOnInvalidObjectType(returnFiber, newChild);
  4838. }
  4839. "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
  4840. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  4841. return null;
  4842. }
  4843. function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
  4844. if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
  4845. return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
  4846. if ("object" === typeof newChild && null !== newChild) {
  4847. switch (newChild.$$typeof) {
  4848. case REACT_ELEMENT_TYPE:
  4849. return newIdx = existingChildren.get(
  4850. null === newChild.key ? newIdx : newChild.key
  4851. ) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
  4852. returnFiber,
  4853. newIdx,
  4854. newChild,
  4855. lanes
  4856. ), currentDebugInfo = existingChildren, returnFiber;
  4857. case REACT_PORTAL_TYPE:
  4858. return existingChildren = existingChildren.get(
  4859. null === newChild.key ? newIdx : newChild.key
  4860. ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
  4861. case REACT_LAZY_TYPE:
  4862. var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);
  4863. newChild = resolveLazy(newChild);
  4864. returnFiber = updateFromMap(
  4865. existingChildren,
  4866. returnFiber,
  4867. newIdx,
  4868. newChild,
  4869. lanes
  4870. );
  4871. currentDebugInfo = _prevDebugInfo7;
  4872. return returnFiber;
  4873. }
  4874. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  4875. return newIdx = existingChildren.get(newIdx) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateFragment(
  4876. returnFiber,
  4877. newIdx,
  4878. newChild,
  4879. lanes,
  4880. null
  4881. ), currentDebugInfo = existingChildren, returnFiber;
  4882. if ("function" === typeof newChild.then)
  4883. return _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo), returnFiber = updateFromMap(
  4884. existingChildren,
  4885. returnFiber,
  4886. newIdx,
  4887. unwrapThenable(newChild),
  4888. lanes
  4889. ), currentDebugInfo = _prevDebugInfo7, returnFiber;
  4890. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  4891. return updateFromMap(
  4892. existingChildren,
  4893. returnFiber,
  4894. newIdx,
  4895. readContextDuringReconciliation(returnFiber, newChild),
  4896. lanes
  4897. );
  4898. throwOnInvalidObjectType(returnFiber, newChild);
  4899. }
  4900. "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
  4901. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  4902. return null;
  4903. }
  4904. function warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys) {
  4905. if ("object" !== typeof child || null === child) return knownKeys;
  4906. switch (child.$$typeof) {
  4907. case REACT_ELEMENT_TYPE:
  4908. case REACT_PORTAL_TYPE:
  4909. warnForMissingKey(returnFiber, workInProgress2, child);
  4910. var key = child.key;
  4911. if ("string" !== typeof key) break;
  4912. if (null === knownKeys) {
  4913. knownKeys = /* @__PURE__ */ new Set();
  4914. knownKeys.add(key);
  4915. break;
  4916. }
  4917. if (!knownKeys.has(key)) {
  4918. knownKeys.add(key);
  4919. break;
  4920. }
  4921. runWithFiberInDEV(workInProgress2, function() {
  4922. console.error(
  4923. "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",
  4924. key
  4925. );
  4926. });
  4927. break;
  4928. case REACT_LAZY_TYPE:
  4929. child = resolveLazy(child), warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys);
  4930. }
  4931. return knownKeys;
  4932. }
  4933. function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
  4934. for (var knownKeys = null, resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
  4935. oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
  4936. var newFiber = updateSlot(
  4937. returnFiber,
  4938. oldFiber,
  4939. newChildren[newIdx],
  4940. lanes
  4941. );
  4942. if (null === newFiber) {
  4943. null === oldFiber && (oldFiber = nextOldFiber);
  4944. break;
  4945. }
  4946. knownKeys = warnOnInvalidKey(
  4947. returnFiber,
  4948. newFiber,
  4949. newChildren[newIdx],
  4950. knownKeys
  4951. );
  4952. shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
  4953. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  4954. null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
  4955. previousNewFiber = newFiber;
  4956. oldFiber = nextOldFiber;
  4957. }
  4958. if (newIdx === newChildren.length)
  4959. return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
  4960. if (null === oldFiber) {
  4961. for (; newIdx < newChildren.length; newIdx++)
  4962. oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
  4963. returnFiber,
  4964. oldFiber,
  4965. newChildren[newIdx],
  4966. knownKeys
  4967. ), currentFirstChild = placeChild(
  4968. oldFiber,
  4969. currentFirstChild,
  4970. newIdx
  4971. ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
  4972. isHydrating && pushTreeFork(returnFiber, newIdx);
  4973. return resultingFirstChild;
  4974. }
  4975. for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
  4976. nextOldFiber = updateFromMap(
  4977. oldFiber,
  4978. returnFiber,
  4979. newIdx,
  4980. newChildren[newIdx],
  4981. lanes
  4982. ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
  4983. returnFiber,
  4984. nextOldFiber,
  4985. newChildren[newIdx],
  4986. knownKeys
  4987. ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
  4988. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  4989. ), currentFirstChild = placeChild(
  4990. nextOldFiber,
  4991. currentFirstChild,
  4992. newIdx
  4993. ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
  4994. shouldTrackSideEffects && oldFiber.forEach(function(child) {
  4995. return deleteChild(returnFiber, child);
  4996. });
  4997. isHydrating && pushTreeFork(returnFiber, newIdx);
  4998. return resultingFirstChild;
  4999. }
  5000. function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
  5001. if (null == newChildren)
  5002. throw Error("An iterable object provided no iterator.");
  5003. for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, knownKeys = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) {
  5004. oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
  5005. var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
  5006. if (null === newFiber) {
  5007. null === oldFiber && (oldFiber = nextOldFiber);
  5008. break;
  5009. }
  5010. knownKeys = warnOnInvalidKey(
  5011. returnFiber,
  5012. newFiber,
  5013. step.value,
  5014. knownKeys
  5015. );
  5016. shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
  5017. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  5018. null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
  5019. previousNewFiber = newFiber;
  5020. oldFiber = nextOldFiber;
  5021. }
  5022. if (step.done)
  5023. return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
  5024. if (null === oldFiber) {
  5025. for (; !step.done; newIdx++, step = newChildren.next())
  5026. oldFiber = createChild(returnFiber, step.value, lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
  5027. returnFiber,
  5028. oldFiber,
  5029. step.value,
  5030. knownKeys
  5031. ), currentFirstChild = placeChild(
  5032. oldFiber,
  5033. currentFirstChild,
  5034. newIdx
  5035. ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
  5036. isHydrating && pushTreeFork(returnFiber, newIdx);
  5037. return resultingFirstChild;
  5038. }
  5039. for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
  5040. nextOldFiber = updateFromMap(
  5041. oldFiber,
  5042. returnFiber,
  5043. newIdx,
  5044. step.value,
  5045. lanes
  5046. ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
  5047. returnFiber,
  5048. nextOldFiber,
  5049. step.value,
  5050. knownKeys
  5051. ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
  5052. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  5053. ), currentFirstChild = placeChild(
  5054. nextOldFiber,
  5055. currentFirstChild,
  5056. newIdx
  5057. ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
  5058. shouldTrackSideEffects && oldFiber.forEach(function(child) {
  5059. return deleteChild(returnFiber, child);
  5060. });
  5061. isHydrating && pushTreeFork(returnFiber, newIdx);
  5062. return resultingFirstChild;
  5063. }
  5064. function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
  5065. "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (validateFragmentProps(newChild, null, returnFiber), newChild = newChild.props.children);
  5066. if ("object" === typeof newChild && null !== newChild) {
  5067. switch (newChild.$$typeof) {
  5068. case REACT_ELEMENT_TYPE:
  5069. var prevDebugInfo = pushDebugInfo(newChild._debugInfo);
  5070. a: {
  5071. for (var key = newChild.key; null !== currentFirstChild; ) {
  5072. if (currentFirstChild.key === key) {
  5073. key = newChild.type;
  5074. if (key === REACT_FRAGMENT_TYPE) {
  5075. if (7 === currentFirstChild.tag) {
  5076. deleteRemainingChildren(
  5077. returnFiber,
  5078. currentFirstChild.sibling
  5079. );
  5080. lanes = useFiber(
  5081. currentFirstChild,
  5082. newChild.props.children
  5083. );
  5084. lanes.return = returnFiber;
  5085. lanes._debugOwner = newChild._owner;
  5086. lanes._debugInfo = currentDebugInfo;
  5087. validateFragmentProps(newChild, lanes, returnFiber);
  5088. returnFiber = lanes;
  5089. break a;
  5090. }
  5091. } else if (currentFirstChild.elementType === key || isCompatibleFamilyForHotReloading(
  5092. currentFirstChild,
  5093. newChild
  5094. ) || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) {
  5095. deleteRemainingChildren(
  5096. returnFiber,
  5097. currentFirstChild.sibling
  5098. );
  5099. lanes = useFiber(currentFirstChild, newChild.props);
  5100. coerceRef(lanes, newChild);
  5101. lanes.return = returnFiber;
  5102. lanes._debugOwner = newChild._owner;
  5103. lanes._debugInfo = currentDebugInfo;
  5104. returnFiber = lanes;
  5105. break a;
  5106. }
  5107. deleteRemainingChildren(returnFiber, currentFirstChild);
  5108. break;
  5109. } else deleteChild(returnFiber, currentFirstChild);
  5110. currentFirstChild = currentFirstChild.sibling;
  5111. }
  5112. newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
  5113. newChild.props.children,
  5114. returnFiber.mode,
  5115. lanes,
  5116. newChild.key
  5117. ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, validateFragmentProps(newChild, lanes, returnFiber), returnFiber = lanes) : (lanes = createFiberFromElement(
  5118. newChild,
  5119. returnFiber.mode,
  5120. lanes
  5121. ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes._debugInfo = currentDebugInfo, returnFiber = lanes);
  5122. }
  5123. returnFiber = placeSingleChild(returnFiber);
  5124. currentDebugInfo = prevDebugInfo;
  5125. return returnFiber;
  5126. case REACT_PORTAL_TYPE:
  5127. a: {
  5128. prevDebugInfo = newChild;
  5129. for (newChild = prevDebugInfo.key; null !== currentFirstChild; ) {
  5130. if (currentFirstChild.key === newChild)
  5131. if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === prevDebugInfo.containerInfo && currentFirstChild.stateNode.implementation === prevDebugInfo.implementation) {
  5132. deleteRemainingChildren(
  5133. returnFiber,
  5134. currentFirstChild.sibling
  5135. );
  5136. lanes = useFiber(
  5137. currentFirstChild,
  5138. prevDebugInfo.children || []
  5139. );
  5140. lanes.return = returnFiber;
  5141. returnFiber = lanes;
  5142. break a;
  5143. } else {
  5144. deleteRemainingChildren(returnFiber, currentFirstChild);
  5145. break;
  5146. }
  5147. else deleteChild(returnFiber, currentFirstChild);
  5148. currentFirstChild = currentFirstChild.sibling;
  5149. }
  5150. lanes = createFiberFromPortal(
  5151. prevDebugInfo,
  5152. returnFiber.mode,
  5153. lanes
  5154. );
  5155. lanes.return = returnFiber;
  5156. returnFiber = lanes;
  5157. }
  5158. return placeSingleChild(returnFiber);
  5159. case REACT_LAZY_TYPE:
  5160. return prevDebugInfo = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = reconcileChildFibersImpl(
  5161. returnFiber,
  5162. currentFirstChild,
  5163. newChild,
  5164. lanes
  5165. ), currentDebugInfo = prevDebugInfo, returnFiber;
  5166. }
  5167. if (isArrayImpl(newChild))
  5168. return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildrenArray(
  5169. returnFiber,
  5170. currentFirstChild,
  5171. newChild,
  5172. lanes
  5173. ), currentDebugInfo = prevDebugInfo, returnFiber;
  5174. if (getIteratorFn(newChild)) {
  5175. prevDebugInfo = pushDebugInfo(newChild._debugInfo);
  5176. key = getIteratorFn(newChild);
  5177. if ("function" !== typeof key)
  5178. throw Error(
  5179. "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
  5180. );
  5181. var newChildren = key.call(newChild);
  5182. if (newChildren === newChild) {
  5183. if (0 !== returnFiber.tag || "[object GeneratorFunction]" !== Object.prototype.toString.call(returnFiber.type) || "[object Generator]" !== Object.prototype.toString.call(newChildren))
  5184. didWarnAboutGenerators || console.error(
  5185. "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
  5186. ), didWarnAboutGenerators = true;
  5187. } else
  5188. newChild.entries !== key || didWarnAboutMaps || (console.error(
  5189. "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
  5190. ), didWarnAboutMaps = true);
  5191. returnFiber = reconcileChildrenIterator(
  5192. returnFiber,
  5193. currentFirstChild,
  5194. newChildren,
  5195. lanes
  5196. );
  5197. currentDebugInfo = prevDebugInfo;
  5198. return returnFiber;
  5199. }
  5200. if ("function" === typeof newChild.then)
  5201. return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildFibersImpl(
  5202. returnFiber,
  5203. currentFirstChild,
  5204. unwrapThenable(newChild),
  5205. lanes
  5206. ), currentDebugInfo = prevDebugInfo, returnFiber;
  5207. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  5208. return reconcileChildFibersImpl(
  5209. returnFiber,
  5210. currentFirstChild,
  5211. readContextDuringReconciliation(returnFiber, newChild),
  5212. lanes
  5213. );
  5214. throwOnInvalidObjectType(returnFiber, newChild);
  5215. }
  5216. if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
  5217. return prevDebugInfo = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(
  5218. returnFiber,
  5219. currentFirstChild.sibling
  5220. ), lanes = useFiber(currentFirstChild, prevDebugInfo), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(
  5221. prevDebugInfo,
  5222. returnFiber.mode,
  5223. lanes
  5224. ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, returnFiber = lanes), placeSingleChild(returnFiber);
  5225. "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
  5226. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  5227. return deleteRemainingChildren(returnFiber, currentFirstChild);
  5228. }
  5229. return function(returnFiber, currentFirstChild, newChild, lanes) {
  5230. var prevDebugInfo = currentDebugInfo;
  5231. currentDebugInfo = null;
  5232. try {
  5233. thenableIndexCounter$1 = 0;
  5234. var firstChildFiber = reconcileChildFibersImpl(
  5235. returnFiber,
  5236. currentFirstChild,
  5237. newChild,
  5238. lanes
  5239. );
  5240. thenableState$1 = null;
  5241. return firstChildFiber;
  5242. } catch (x) {
  5243. if (x === SuspenseException || x === SuspenseActionException) throw x;
  5244. var fiber = createFiber(29, x, null, returnFiber.mode);
  5245. fiber.lanes = lanes;
  5246. fiber.return = returnFiber;
  5247. var debugInfo = fiber._debugInfo = currentDebugInfo;
  5248. fiber._debugOwner = returnFiber._debugOwner;
  5249. fiber._debugTask = returnFiber._debugTask;
  5250. if (null != debugInfo) {
  5251. for (var i = debugInfo.length - 1; 0 <= i; i--)
  5252. if ("string" === typeof debugInfo[i].stack) {
  5253. fiber._debugOwner = debugInfo[i];
  5254. fiber._debugTask = debugInfo[i].debugTask;
  5255. break;
  5256. }
  5257. }
  5258. return fiber;
  5259. } finally {
  5260. currentDebugInfo = prevDebugInfo;
  5261. }
  5262. };
  5263. }
  5264. function validateSuspenseListNestedChild(childSlot, index) {
  5265. var isAnArray = isArrayImpl(childSlot);
  5266. childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot);
  5267. return isAnArray || childSlot ? (isAnArray = isAnArray ? "array" : "iterable", console.error(
  5268. "A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",
  5269. isAnArray,
  5270. index,
  5271. isAnArray
  5272. ), false) : true;
  5273. }
  5274. function initializeUpdateQueue(fiber) {
  5275. fiber.updateQueue = {
  5276. baseState: fiber.memoizedState,
  5277. firstBaseUpdate: null,
  5278. lastBaseUpdate: null,
  5279. shared: { pending: null, lanes: 0, hiddenCallbacks: null },
  5280. callbacks: null
  5281. };
  5282. }
  5283. function cloneUpdateQueue(current2, workInProgress2) {
  5284. current2 = current2.updateQueue;
  5285. workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = {
  5286. baseState: current2.baseState,
  5287. firstBaseUpdate: current2.firstBaseUpdate,
  5288. lastBaseUpdate: current2.lastBaseUpdate,
  5289. shared: current2.shared,
  5290. callbacks: null
  5291. });
  5292. }
  5293. function createUpdate(lane) {
  5294. return {
  5295. lane,
  5296. tag: UpdateState,
  5297. payload: null,
  5298. callback: null,
  5299. next: null
  5300. };
  5301. }
  5302. function enqueueUpdate(fiber, update, lane) {
  5303. var updateQueue = fiber.updateQueue;
  5304. if (null === updateQueue) return null;
  5305. updateQueue = updateQueue.shared;
  5306. if (currentlyProcessingQueue === updateQueue && !didWarnUpdateInsideUpdate) {
  5307. var componentName2 = getComponentNameFromFiber(fiber);
  5308. console.error(
  5309. "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s",
  5310. componentName2
  5311. );
  5312. didWarnUpdateInsideUpdate = true;
  5313. }
  5314. if ((executionContext & RenderContext) !== NoContext)
  5315. return componentName2 = updateQueue.pending, null === componentName2 ? update.next = update : (update.next = componentName2.next, componentName2.next = update), updateQueue.pending = update, update = getRootForUpdatedFiber(fiber), markUpdateLaneFromFiberToRoot(fiber, null, lane), update;
  5316. enqueueUpdate$1(fiber, updateQueue, update, lane);
  5317. return getRootForUpdatedFiber(fiber);
  5318. }
  5319. function entangleTransitions(root2, fiber, lane) {
  5320. fiber = fiber.updateQueue;
  5321. if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) {
  5322. var queueLanes = fiber.lanes;
  5323. queueLanes &= root2.pendingLanes;
  5324. lane |= queueLanes;
  5325. fiber.lanes = lane;
  5326. markRootEntangled(root2, lane);
  5327. }
  5328. }
  5329. function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
  5330. var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate;
  5331. if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) {
  5332. var newFirst = null, newLast = null;
  5333. queue = queue.firstBaseUpdate;
  5334. if (null !== queue) {
  5335. do {
  5336. var clone = {
  5337. lane: queue.lane,
  5338. tag: queue.tag,
  5339. payload: queue.payload,
  5340. callback: null,
  5341. next: null
  5342. };
  5343. null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone;
  5344. queue = queue.next;
  5345. } while (null !== queue);
  5346. null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
  5347. } else newFirst = newLast = capturedUpdate;
  5348. queue = {
  5349. baseState: current2.baseState,
  5350. firstBaseUpdate: newFirst,
  5351. lastBaseUpdate: newLast,
  5352. shared: current2.shared,
  5353. callbacks: current2.callbacks
  5354. };
  5355. workInProgress2.updateQueue = queue;
  5356. return;
  5357. }
  5358. workInProgress2 = queue.lastBaseUpdate;
  5359. null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate;
  5360. queue.lastBaseUpdate = capturedUpdate;
  5361. }
  5362. function suspendIfUpdateReadFromEntangledAsyncAction() {
  5363. if (didReadFromEntangledAsyncAction) {
  5364. var entangledActionThenable = currentEntangledActionThenable;
  5365. if (null !== entangledActionThenable) throw entangledActionThenable;
  5366. }
  5367. }
  5368. function processUpdateQueue(workInProgress2, props, instance$jscomp$0, renderLanes2) {
  5369. didReadFromEntangledAsyncAction = false;
  5370. var queue = workInProgress2.updateQueue;
  5371. hasForceUpdate = false;
  5372. currentlyProcessingQueue = queue.shared;
  5373. var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
  5374. if (null !== pendingQueue) {
  5375. queue.shared.pending = null;
  5376. var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
  5377. lastPendingUpdate.next = null;
  5378. null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate;
  5379. lastBaseUpdate = lastPendingUpdate;
  5380. var current2 = workInProgress2.alternate;
  5381. null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate));
  5382. }
  5383. if (null !== firstBaseUpdate) {
  5384. var newState = queue.baseState;
  5385. lastBaseUpdate = 0;
  5386. current2 = firstPendingUpdate = lastPendingUpdate = null;
  5387. pendingQueue = firstBaseUpdate;
  5388. do {
  5389. var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
  5390. if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
  5391. 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true);
  5392. null !== current2 && (current2 = current2.next = {
  5393. lane: 0,
  5394. tag: pendingQueue.tag,
  5395. payload: pendingQueue.payload,
  5396. callback: null,
  5397. next: null
  5398. });
  5399. a: {
  5400. updateLane = workInProgress2;
  5401. var partialState = pendingQueue;
  5402. var nextProps = props, instance = instance$jscomp$0;
  5403. switch (partialState.tag) {
  5404. case ReplaceState:
  5405. partialState = partialState.payload;
  5406. if ("function" === typeof partialState) {
  5407. isDisallowedContextReadInDEV = true;
  5408. var nextState = partialState.call(
  5409. instance,
  5410. newState,
  5411. nextProps
  5412. );
  5413. if (updateLane.mode & StrictLegacyMode) {
  5414. setIsStrictModeForDevtools(true);
  5415. try {
  5416. partialState.call(instance, newState, nextProps);
  5417. } finally {
  5418. setIsStrictModeForDevtools(false);
  5419. }
  5420. }
  5421. isDisallowedContextReadInDEV = false;
  5422. newState = nextState;
  5423. break a;
  5424. }
  5425. newState = partialState;
  5426. break a;
  5427. case CaptureUpdate:
  5428. updateLane.flags = updateLane.flags & -65537 | 128;
  5429. case UpdateState:
  5430. nextState = partialState.payload;
  5431. if ("function" === typeof nextState) {
  5432. isDisallowedContextReadInDEV = true;
  5433. partialState = nextState.call(
  5434. instance,
  5435. newState,
  5436. nextProps
  5437. );
  5438. if (updateLane.mode & StrictLegacyMode) {
  5439. setIsStrictModeForDevtools(true);
  5440. try {
  5441. nextState.call(instance, newState, nextProps);
  5442. } finally {
  5443. setIsStrictModeForDevtools(false);
  5444. }
  5445. }
  5446. isDisallowedContextReadInDEV = false;
  5447. } else partialState = nextState;
  5448. if (null === partialState || void 0 === partialState) break a;
  5449. newState = assign({}, newState, partialState);
  5450. break a;
  5451. case ForceUpdate:
  5452. hasForceUpdate = true;
  5453. }
  5454. }
  5455. updateLane = pendingQueue.callback;
  5456. null !== updateLane && (workInProgress2.flags |= 64, isHiddenUpdate && (workInProgress2.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
  5457. } else
  5458. isHiddenUpdate = {
  5459. lane: updateLane,
  5460. tag: pendingQueue.tag,
  5461. payload: pendingQueue.payload,
  5462. callback: pendingQueue.callback,
  5463. next: null
  5464. }, null === current2 ? (firstPendingUpdate = current2 = isHiddenUpdate, lastPendingUpdate = newState) : current2 = current2.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
  5465. pendingQueue = pendingQueue.next;
  5466. if (null === pendingQueue)
  5467. if (pendingQueue = queue.shared.pending, null === pendingQueue)
  5468. break;
  5469. else
  5470. isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
  5471. } while (1);
  5472. null === current2 && (lastPendingUpdate = newState);
  5473. queue.baseState = lastPendingUpdate;
  5474. queue.firstBaseUpdate = firstPendingUpdate;
  5475. queue.lastBaseUpdate = current2;
  5476. null === firstBaseUpdate && (queue.shared.lanes = 0);
  5477. workInProgressRootSkippedLanes |= lastBaseUpdate;
  5478. workInProgress2.lanes = lastBaseUpdate;
  5479. workInProgress2.memoizedState = newState;
  5480. }
  5481. currentlyProcessingQueue = null;
  5482. }
  5483. function callCallback(callback, context) {
  5484. if ("function" !== typeof callback)
  5485. throw Error(
  5486. "Invalid argument passed as callback. Expected a function. Instead received: " + callback
  5487. );
  5488. callback.call(context);
  5489. }
  5490. function commitHiddenCallbacks(updateQueue, context) {
  5491. var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
  5492. if (null !== hiddenCallbacks)
  5493. for (updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; updateQueue < hiddenCallbacks.length; updateQueue++)
  5494. callCallback(hiddenCallbacks[updateQueue], context);
  5495. }
  5496. function commitCallbacks(updateQueue, context) {
  5497. var callbacks = updateQueue.callbacks;
  5498. if (null !== callbacks)
  5499. for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
  5500. callCallback(callbacks[updateQueue], context);
  5501. }
  5502. function pushHiddenContext(fiber, context) {
  5503. var prevEntangledRenderLanes = entangledRenderLanes;
  5504. push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);
  5505. push(currentTreeHiddenStackCursor, context, fiber);
  5506. entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes;
  5507. }
  5508. function reuseHiddenContextOnStack(fiber) {
  5509. push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);
  5510. push(
  5511. currentTreeHiddenStackCursor,
  5512. currentTreeHiddenStackCursor.current,
  5513. fiber
  5514. );
  5515. }
  5516. function popHiddenContext(fiber) {
  5517. entangledRenderLanes = prevEntangledRenderLanesCursor.current;
  5518. pop(currentTreeHiddenStackCursor, fiber);
  5519. pop(prevEntangledRenderLanesCursor, fiber);
  5520. }
  5521. function pushPrimaryTreeSuspenseHandler(handler) {
  5522. var current2 = handler.alternate;
  5523. push(
  5524. suspenseStackCursor,
  5525. suspenseStackCursor.current & SubtreeSuspenseContextMask,
  5526. handler
  5527. );
  5528. push(suspenseHandlerStackCursor, handler, handler);
  5529. null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler));
  5530. }
  5531. function pushDehydratedActivitySuspenseHandler(fiber) {
  5532. push(suspenseStackCursor, suspenseStackCursor.current, fiber);
  5533. push(suspenseHandlerStackCursor, fiber, fiber);
  5534. null === shellBoundary && (shellBoundary = fiber);
  5535. }
  5536. function pushOffscreenSuspenseHandler(fiber) {
  5537. 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), null === shellBoundary && (shellBoundary = fiber)) : reuseSuspenseHandlerOnStack(fiber);
  5538. }
  5539. function reuseSuspenseHandlerOnStack(fiber) {
  5540. push(suspenseStackCursor, suspenseStackCursor.current, fiber);
  5541. push(
  5542. suspenseHandlerStackCursor,
  5543. suspenseHandlerStackCursor.current,
  5544. fiber
  5545. );
  5546. }
  5547. function popSuspenseHandler(fiber) {
  5548. pop(suspenseHandlerStackCursor, fiber);
  5549. shellBoundary === fiber && (shellBoundary = null);
  5550. pop(suspenseStackCursor, fiber);
  5551. }
  5552. function findFirstSuspended(row) {
  5553. for (var node = row; null !== node; ) {
  5554. if (13 === node.tag) {
  5555. var state = node.memoizedState;
  5556. if (null !== state && (state = state.dehydrated, null === state || isSuspenseInstancePending(state) || isSuspenseInstanceFallback(state)))
  5557. return node;
  5558. } else if (19 === node.tag && ("forwards" === node.memoizedProps.revealOrder || "backwards" === node.memoizedProps.revealOrder || "unstable_legacy-backwards" === node.memoizedProps.revealOrder || "together" === node.memoizedProps.revealOrder)) {
  5559. if (0 !== (node.flags & 128)) return node;
  5560. } else if (null !== node.child) {
  5561. node.child.return = node;
  5562. node = node.child;
  5563. continue;
  5564. }
  5565. if (node === row) break;
  5566. for (; null === node.sibling; ) {
  5567. if (null === node.return || node.return === row) return null;
  5568. node = node.return;
  5569. }
  5570. node.sibling.return = node.return;
  5571. node = node.sibling;
  5572. }
  5573. return null;
  5574. }
  5575. function mountHookTypesDev() {
  5576. var hookName = currentHookNameInDev;
  5577. null === hookTypesDev ? hookTypesDev = [hookName] : hookTypesDev.push(hookName);
  5578. }
  5579. function updateHookTypesDev() {
  5580. var hookName = currentHookNameInDev;
  5581. if (null !== hookTypesDev && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName)) {
  5582. var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
  5583. if (!didWarnAboutMismatchedHooksForComponent.has(componentName2) && (didWarnAboutMismatchedHooksForComponent.add(componentName2), null !== hookTypesDev)) {
  5584. for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) {
  5585. var oldHookName = hookTypesDev[i], newHookName = i === hookTypesUpdateIndexDev ? hookName : oldHookName;
  5586. for (oldHookName = i + 1 + ". " + oldHookName; 30 > oldHookName.length; )
  5587. oldHookName += " ";
  5588. oldHookName += newHookName + "\n";
  5589. table += oldHookName;
  5590. }
  5591. console.error(
  5592. "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
  5593. componentName2,
  5594. table
  5595. );
  5596. }
  5597. }
  5598. }
  5599. function checkDepsAreArrayDev(deps) {
  5600. void 0 === deps || null === deps || isArrayImpl(deps) || console.error(
  5601. "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
  5602. currentHookNameInDev,
  5603. typeof deps
  5604. );
  5605. }
  5606. function warnOnUseFormStateInDev() {
  5607. var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
  5608. didWarnAboutUseFormState.has(componentName2) || (didWarnAboutUseFormState.add(componentName2), console.error(
  5609. "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",
  5610. componentName2
  5611. ));
  5612. }
  5613. function throwInvalidHookError() {
  5614. throw Error(
  5615. "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
  5616. );
  5617. }
  5618. function areHookInputsEqual(nextDeps, prevDeps) {
  5619. if (ignorePreviousDependencies) return false;
  5620. if (null === prevDeps)
  5621. return console.error(
  5622. "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
  5623. currentHookNameInDev
  5624. ), false;
  5625. nextDeps.length !== prevDeps.length && console.error(
  5626. "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",
  5627. currentHookNameInDev,
  5628. "[" + prevDeps.join(", ") + "]",
  5629. "[" + nextDeps.join(", ") + "]"
  5630. );
  5631. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
  5632. if (!objectIs(nextDeps[i], prevDeps[i])) return false;
  5633. return true;
  5634. }
  5635. function renderWithHooks(current2, workInProgress2, Component, props, secondArg, nextRenderLanes) {
  5636. renderLanes = nextRenderLanes;
  5637. currentlyRenderingFiber = workInProgress2;
  5638. hookTypesDev = null !== current2 ? current2._debugHookTypes : null;
  5639. hookTypesUpdateIndexDev = -1;
  5640. ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
  5641. if ("[object AsyncFunction]" === Object.prototype.toString.call(Component) || "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component))
  5642. nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), console.error(
  5643. "%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
  5644. null === nextRenderLanes ? "An unknown Component" : "<" + nextRenderLanes + ">"
  5645. ));
  5646. workInProgress2.memoizedState = null;
  5647. workInProgress2.updateQueue = null;
  5648. workInProgress2.lanes = 0;
  5649. ReactSharedInternals.H = null !== current2 && null !== current2.memoizedState ? HooksDispatcherOnUpdateInDEV : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV;
  5650. shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = (workInProgress2.mode & StrictLegacyMode) !== NoMode;
  5651. var children = callComponentInDEV(Component, props, secondArg);
  5652. shouldDoubleInvokeUserFnsInHooksDEV = false;
  5653. didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(
  5654. workInProgress2,
  5655. Component,
  5656. props,
  5657. secondArg
  5658. ));
  5659. if (nextRenderLanes) {
  5660. setIsStrictModeForDevtools(true);
  5661. try {
  5662. children = renderWithHooksAgain(
  5663. workInProgress2,
  5664. Component,
  5665. props,
  5666. secondArg
  5667. );
  5668. } finally {
  5669. setIsStrictModeForDevtools(false);
  5670. }
  5671. }
  5672. finishRenderingHooks(current2, workInProgress2);
  5673. return children;
  5674. }
  5675. function finishRenderingHooks(current2, workInProgress2) {
  5676. workInProgress2._debugHookTypes = hookTypesDev;
  5677. null === workInProgress2.dependencies ? null !== thenableState && (workInProgress2.dependencies = {
  5678. lanes: 0,
  5679. firstContext: null,
  5680. _debugThenableState: thenableState
  5681. }) : workInProgress2.dependencies._debugThenableState = thenableState;
  5682. ReactSharedInternals.H = ContextOnlyDispatcher;
  5683. var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
  5684. renderLanes = 0;
  5685. hookTypesDev = currentHookNameInDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
  5686. hookTypesUpdateIndexDev = -1;
  5687. null !== current2 && (current2.flags & 65011712) !== (workInProgress2.flags & 65011712) && console.error(
  5688. "Internal React error: Expected static flag was missing. Please notify the React team."
  5689. );
  5690. didScheduleRenderPhaseUpdate = false;
  5691. thenableIndexCounter = 0;
  5692. thenableState = null;
  5693. if (didRenderTooFewHooks)
  5694. throw Error(
  5695. "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
  5696. );
  5697. null === current2 || didReceiveUpdate || (current2 = current2.dependencies, null !== current2 && checkIfContextChanged(current2) && (didReceiveUpdate = true));
  5698. needsToResetSuspendedThenableDEV ? (needsToResetSuspendedThenableDEV = false, current2 = true) : current2 = false;
  5699. current2 && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Unknown", didWarnAboutUseWrappedInTryCatch.has(workInProgress2) || didWarnAboutAsyncClientComponent.has(workInProgress2) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress2), console.error(
  5700. "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary."
  5701. )));
  5702. }
  5703. function renderWithHooksAgain(workInProgress2, Component, props, secondArg) {
  5704. currentlyRenderingFiber = workInProgress2;
  5705. var numberOfReRenders = 0;
  5706. do {
  5707. didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
  5708. thenableIndexCounter = 0;
  5709. didScheduleRenderPhaseUpdateDuringThisPass = false;
  5710. if (numberOfReRenders >= RE_RENDER_LIMIT)
  5711. throw Error(
  5712. "Too many re-renders. React limits the number of renders to prevent an infinite loop."
  5713. );
  5714. numberOfReRenders += 1;
  5715. ignorePreviousDependencies = false;
  5716. workInProgressHook = currentHook = null;
  5717. if (null != workInProgress2.updateQueue) {
  5718. var children = workInProgress2.updateQueue;
  5719. children.lastEffect = null;
  5720. children.events = null;
  5721. children.stores = null;
  5722. null != children.memoCache && (children.memoCache.index = 0);
  5723. }
  5724. hookTypesUpdateIndexDev = -1;
  5725. ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
  5726. children = callComponentInDEV(Component, props, secondArg);
  5727. } while (didScheduleRenderPhaseUpdateDuringThisPass);
  5728. return children;
  5729. }
  5730. function TransitionAwareHostComponent() {
  5731. var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
  5732. maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable;
  5733. dispatcher = dispatcher.useState()[0];
  5734. (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024);
  5735. return maybeThenable;
  5736. }
  5737. function checkDidRenderIdHook() {
  5738. var didRenderIdHook = 0 !== localIdCounter;
  5739. localIdCounter = 0;
  5740. return didRenderIdHook;
  5741. }
  5742. function bailoutHooks(current2, workInProgress2, lanes) {
  5743. workInProgress2.updateQueue = current2.updateQueue;
  5744. workInProgress2.flags = (workInProgress2.mode & StrictEffectsMode) !== NoMode ? workInProgress2.flags & -402655237 : workInProgress2.flags & -2053;
  5745. current2.lanes &= ~lanes;
  5746. }
  5747. function resetHooksOnUnwind(workInProgress2) {
  5748. if (didScheduleRenderPhaseUpdate) {
  5749. for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) {
  5750. var queue = workInProgress2.queue;
  5751. null !== queue && (queue.pending = null);
  5752. workInProgress2 = workInProgress2.next;
  5753. }
  5754. didScheduleRenderPhaseUpdate = false;
  5755. }
  5756. renderLanes = 0;
  5757. hookTypesDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
  5758. hookTypesUpdateIndexDev = -1;
  5759. currentHookNameInDev = null;
  5760. didScheduleRenderPhaseUpdateDuringThisPass = false;
  5761. thenableIndexCounter = localIdCounter = 0;
  5762. thenableState = null;
  5763. }
  5764. function mountWorkInProgressHook() {
  5765. var hook = {
  5766. memoizedState: null,
  5767. baseState: null,
  5768. baseQueue: null,
  5769. queue: null,
  5770. next: null
  5771. };
  5772. null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
  5773. return workInProgressHook;
  5774. }
  5775. function updateWorkInProgressHook() {
  5776. if (null === currentHook) {
  5777. var nextCurrentHook = currentlyRenderingFiber.alternate;
  5778. nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
  5779. } else nextCurrentHook = currentHook.next;
  5780. var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
  5781. if (null !== nextWorkInProgressHook)
  5782. workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
  5783. else {
  5784. if (null === nextCurrentHook) {
  5785. if (null === currentlyRenderingFiber.alternate)
  5786. throw Error(
  5787. "Update hook called on initial render. This is likely a bug in React. Please file an issue."
  5788. );
  5789. throw Error("Rendered more hooks than during the previous render.");
  5790. }
  5791. currentHook = nextCurrentHook;
  5792. nextCurrentHook = {
  5793. memoizedState: currentHook.memoizedState,
  5794. baseState: currentHook.baseState,
  5795. baseQueue: currentHook.baseQueue,
  5796. queue: currentHook.queue,
  5797. next: null
  5798. };
  5799. null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
  5800. }
  5801. return workInProgressHook;
  5802. }
  5803. function createFunctionComponentUpdateQueue() {
  5804. return { lastEffect: null, events: null, stores: null, memoCache: null };
  5805. }
  5806. function useThenable(thenable) {
  5807. var index = thenableIndexCounter;
  5808. thenableIndexCounter += 1;
  5809. null === thenableState && (thenableState = createThenableState());
  5810. thenable = trackUsedThenable(thenableState, thenable, index);
  5811. index = currentlyRenderingFiber;
  5812. null === (null === workInProgressHook ? index.memoizedState : workInProgressHook.next) && (index = index.alternate, ReactSharedInternals.H = null !== index && null !== index.memoizedState ? HooksDispatcherOnUpdateInDEV : HooksDispatcherOnMountInDEV);
  5813. return thenable;
  5814. }
  5815. function use(usable) {
  5816. if (null !== usable && "object" === typeof usable) {
  5817. if ("function" === typeof usable.then) return useThenable(usable);
  5818. if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
  5819. }
  5820. throw Error("An unsupported type was passed to use(): " + String(usable));
  5821. }
  5822. function useMemoCache(size) {
  5823. var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
  5824. null !== updateQueue && (memoCache = updateQueue.memoCache);
  5825. if (null == memoCache) {
  5826. var current2 = currentlyRenderingFiber.alternate;
  5827. null !== current2 && (current2 = current2.updateQueue, null !== current2 && (current2 = current2.memoCache, null != current2 && (memoCache = {
  5828. data: current2.data.map(function(array) {
  5829. return array.slice();
  5830. }),
  5831. index: 0
  5832. })));
  5833. }
  5834. null == memoCache && (memoCache = { data: [], index: 0 });
  5835. null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue);
  5836. updateQueue.memoCache = memoCache;
  5837. updateQueue = memoCache.data[memoCache.index];
  5838. if (void 0 === updateQueue || ignorePreviousDependencies)
  5839. for (updateQueue = memoCache.data[memoCache.index] = Array(size), current2 = 0; current2 < size; current2++)
  5840. updateQueue[current2] = REACT_MEMO_CACHE_SENTINEL;
  5841. else
  5842. updateQueue.length !== size && console.error(
  5843. "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",
  5844. updateQueue.length,
  5845. size
  5846. );
  5847. memoCache.index++;
  5848. return updateQueue;
  5849. }
  5850. function basicStateReducer(state, action) {
  5851. return "function" === typeof action ? action(state) : action;
  5852. }
  5853. function mountReducer(reducer, initialArg, init) {
  5854. var hook = mountWorkInProgressHook();
  5855. if (void 0 !== init) {
  5856. var initialState = init(initialArg);
  5857. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5858. setIsStrictModeForDevtools(true);
  5859. try {
  5860. init(initialArg);
  5861. } finally {
  5862. setIsStrictModeForDevtools(false);
  5863. }
  5864. }
  5865. } else initialState = initialArg;
  5866. hook.memoizedState = hook.baseState = initialState;
  5867. reducer = {
  5868. pending: null,
  5869. lanes: 0,
  5870. dispatch: null,
  5871. lastRenderedReducer: reducer,
  5872. lastRenderedState: initialState
  5873. };
  5874. hook.queue = reducer;
  5875. reducer = reducer.dispatch = dispatchReducerAction.bind(
  5876. null,
  5877. currentlyRenderingFiber,
  5878. reducer
  5879. );
  5880. return [hook.memoizedState, reducer];
  5881. }
  5882. function updateReducer(reducer) {
  5883. var hook = updateWorkInProgressHook();
  5884. return updateReducerImpl(hook, currentHook, reducer);
  5885. }
  5886. function updateReducerImpl(hook, current2, reducer) {
  5887. var queue = hook.queue;
  5888. if (null === queue)
  5889. throw Error(
  5890. "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
  5891. );
  5892. queue.lastRenderedReducer = reducer;
  5893. var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
  5894. if (null !== pendingQueue) {
  5895. if (null !== baseQueue) {
  5896. var baseFirst = baseQueue.next;
  5897. baseQueue.next = pendingQueue.next;
  5898. pendingQueue.next = baseFirst;
  5899. }
  5900. current2.baseQueue !== baseQueue && console.error(
  5901. "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."
  5902. );
  5903. current2.baseQueue = baseQueue = pendingQueue;
  5904. queue.pending = null;
  5905. }
  5906. pendingQueue = hook.baseState;
  5907. if (null === baseQueue) hook.memoizedState = pendingQueue;
  5908. else {
  5909. current2 = baseQueue.next;
  5910. var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction2 = false;
  5911. do {
  5912. var updateLane = update.lane & -536870913;
  5913. if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
  5914. var revertLane = update.revertLane;
  5915. if (0 === revertLane)
  5916. null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = {
  5917. lane: 0,
  5918. revertLane: 0,
  5919. gesture: null,
  5920. action: update.action,
  5921. hasEagerState: update.hasEagerState,
  5922. eagerState: update.eagerState,
  5923. next: null
  5924. }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
  5925. else if ((renderLanes & revertLane) === revertLane) {
  5926. update = update.next;
  5927. revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
  5928. continue;
  5929. } else
  5930. updateLane = {
  5931. lane: 0,
  5932. revertLane: update.revertLane,
  5933. gesture: null,
  5934. action: update.action,
  5935. hasEagerState: update.hasEagerState,
  5936. eagerState: update.eagerState,
  5937. next: null
  5938. }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
  5939. updateLane = update.action;
  5940. shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane);
  5941. pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane);
  5942. } else
  5943. revertLane = {
  5944. lane: updateLane,
  5945. revertLane: update.revertLane,
  5946. gesture: update.gesture,
  5947. action: update.action,
  5948. hasEagerState: update.hasEagerState,
  5949. eagerState: update.eagerState,
  5950. next: null
  5951. }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
  5952. update = update.next;
  5953. } while (null !== update && update !== current2);
  5954. null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst;
  5955. if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction2 && (reducer = currentEntangledActionThenable, null !== reducer)))
  5956. throw reducer;
  5957. hook.memoizedState = pendingQueue;
  5958. hook.baseState = baseFirst;
  5959. hook.baseQueue = newBaseQueueLast;
  5960. queue.lastRenderedState = pendingQueue;
  5961. }
  5962. null === baseQueue && (queue.lanes = 0);
  5963. return [hook.memoizedState, queue.dispatch];
  5964. }
  5965. function rerenderReducer(reducer) {
  5966. var hook = updateWorkInProgressHook(), queue = hook.queue;
  5967. if (null === queue)
  5968. throw Error(
  5969. "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
  5970. );
  5971. queue.lastRenderedReducer = reducer;
  5972. var dispatch = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
  5973. if (null !== lastRenderPhaseUpdate) {
  5974. queue.pending = null;
  5975. var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
  5976. do
  5977. newState = reducer(newState, update.action), update = update.next;
  5978. while (update !== lastRenderPhaseUpdate);
  5979. objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
  5980. hook.memoizedState = newState;
  5981. null === hook.baseQueue && (hook.baseState = newState);
  5982. queue.lastRenderedState = newState;
  5983. }
  5984. return [newState, dispatch];
  5985. }
  5986. function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
  5987. var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
  5988. if (isHydrating) {
  5989. if (void 0 === getServerSnapshot)
  5990. throw Error(
  5991. "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
  5992. );
  5993. var nextSnapshot = getServerSnapshot();
  5994. didWarnUncachedGetSnapshot || nextSnapshot === getServerSnapshot() || (console.error(
  5995. "The result of getServerSnapshot should be cached to avoid an infinite loop"
  5996. ), didWarnUncachedGetSnapshot = true);
  5997. } else {
  5998. nextSnapshot = getSnapshot();
  5999. didWarnUncachedGetSnapshot || (getServerSnapshot = getSnapshot(), objectIs(nextSnapshot, getServerSnapshot) || (console.error(
  6000. "The result of getSnapshot should be cached to avoid an infinite loop"
  6001. ), didWarnUncachedGetSnapshot = true));
  6002. if (null === workInProgressRoot)
  6003. throw Error(
  6004. "Expected a work-in-progress root. This is a bug in React. Please file an issue."
  6005. );
  6006. 0 !== (workInProgressRootRenderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
  6007. }
  6008. hook.memoizedState = nextSnapshot;
  6009. getServerSnapshot = { value: nextSnapshot, getSnapshot };
  6010. hook.queue = getServerSnapshot;
  6011. mountEffect(
  6012. subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),
  6013. [subscribe]
  6014. );
  6015. fiber.flags |= 2048;
  6016. pushSimpleEffect(
  6017. HasEffect | Passive,
  6018. { destroy: void 0 },
  6019. updateStoreInstance.bind(
  6020. null,
  6021. fiber,
  6022. getServerSnapshot,
  6023. nextSnapshot,
  6024. getSnapshot
  6025. ),
  6026. null
  6027. );
  6028. return nextSnapshot;
  6029. }
  6030. function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
  6031. var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
  6032. if (isHydrating$jscomp$0) {
  6033. if (void 0 === getServerSnapshot)
  6034. throw Error(
  6035. "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
  6036. );
  6037. getServerSnapshot = getServerSnapshot();
  6038. } else if (getServerSnapshot = getSnapshot(), !didWarnUncachedGetSnapshot) {
  6039. var cachedSnapshot = getSnapshot();
  6040. objectIs(getServerSnapshot, cachedSnapshot) || (console.error(
  6041. "The result of getSnapshot should be cached to avoid an infinite loop"
  6042. ), didWarnUncachedGetSnapshot = true);
  6043. }
  6044. if (cachedSnapshot = !objectIs(
  6045. (currentHook || hook).memoizedState,
  6046. getServerSnapshot
  6047. ))
  6048. hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
  6049. hook = hook.queue;
  6050. var create = subscribeToStore.bind(null, fiber, hook, subscribe);
  6051. updateEffectImpl(2048, Passive, create, [subscribe]);
  6052. if (hook.getSnapshot !== getSnapshot || cachedSnapshot || null !== workInProgressHook && workInProgressHook.memoizedState.tag & HasEffect) {
  6053. fiber.flags |= 2048;
  6054. pushSimpleEffect(
  6055. HasEffect | Passive,
  6056. { destroy: void 0 },
  6057. updateStoreInstance.bind(
  6058. null,
  6059. fiber,
  6060. hook,
  6061. getServerSnapshot,
  6062. getSnapshot
  6063. ),
  6064. null
  6065. );
  6066. if (null === workInProgressRoot)
  6067. throw Error(
  6068. "Expected a work-in-progress root. This is a bug in React. Please file an issue."
  6069. );
  6070. isHydrating$jscomp$0 || 0 !== (renderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
  6071. }
  6072. return getServerSnapshot;
  6073. }
  6074. function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
  6075. fiber.flags |= 16384;
  6076. fiber = { getSnapshot, value: renderedSnapshot };
  6077. getSnapshot = currentlyRenderingFiber.updateQueue;
  6078. null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
  6079. }
  6080. function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
  6081. inst.value = nextSnapshot;
  6082. inst.getSnapshot = getSnapshot;
  6083. checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
  6084. }
  6085. function subscribeToStore(fiber, inst, subscribe) {
  6086. return subscribe(function() {
  6087. checkIfSnapshotChanged(inst) && (startUpdateTimerByLane(2, "updateSyncExternalStore()", fiber), forceStoreRerender(fiber));
  6088. });
  6089. }
  6090. function checkIfSnapshotChanged(inst) {
  6091. var latestGetSnapshot = inst.getSnapshot;
  6092. inst = inst.value;
  6093. try {
  6094. var nextValue = latestGetSnapshot();
  6095. return !objectIs(inst, nextValue);
  6096. } catch (error) {
  6097. return true;
  6098. }
  6099. }
  6100. function forceStoreRerender(fiber) {
  6101. var root2 = enqueueConcurrentRenderForLane(fiber, 2);
  6102. null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
  6103. }
  6104. function mountStateImpl(initialState) {
  6105. var hook = mountWorkInProgressHook();
  6106. if ("function" === typeof initialState) {
  6107. var initialStateInitializer = initialState;
  6108. initialState = initialStateInitializer();
  6109. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  6110. setIsStrictModeForDevtools(true);
  6111. try {
  6112. initialStateInitializer();
  6113. } finally {
  6114. setIsStrictModeForDevtools(false);
  6115. }
  6116. }
  6117. }
  6118. hook.memoizedState = hook.baseState = initialState;
  6119. hook.queue = {
  6120. pending: null,
  6121. lanes: 0,
  6122. dispatch: null,
  6123. lastRenderedReducer: basicStateReducer,
  6124. lastRenderedState: initialState
  6125. };
  6126. return hook;
  6127. }
  6128. function mountState(initialState) {
  6129. initialState = mountStateImpl(initialState);
  6130. var queue = initialState.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
  6131. queue.dispatch = dispatch;
  6132. return [initialState.memoizedState, dispatch];
  6133. }
  6134. function mountOptimistic(passthrough) {
  6135. var hook = mountWorkInProgressHook();
  6136. hook.memoizedState = hook.baseState = passthrough;
  6137. var queue = {
  6138. pending: null,
  6139. lanes: 0,
  6140. dispatch: null,
  6141. lastRenderedReducer: null,
  6142. lastRenderedState: null
  6143. };
  6144. hook.queue = queue;
  6145. hook = dispatchOptimisticSetState.bind(
  6146. null,
  6147. currentlyRenderingFiber,
  6148. true,
  6149. queue
  6150. );
  6151. queue.dispatch = hook;
  6152. return [passthrough, hook];
  6153. }
  6154. function updateOptimistic(passthrough, reducer) {
  6155. var hook = updateWorkInProgressHook();
  6156. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  6157. }
  6158. function updateOptimisticImpl(hook, current2, passthrough, reducer) {
  6159. hook.baseState = passthrough;
  6160. return updateReducerImpl(
  6161. hook,
  6162. currentHook,
  6163. "function" === typeof reducer ? reducer : basicStateReducer
  6164. );
  6165. }
  6166. function rerenderOptimistic(passthrough, reducer) {
  6167. var hook = updateWorkInProgressHook();
  6168. if (null !== currentHook)
  6169. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  6170. hook.baseState = passthrough;
  6171. return [passthrough, hook.queue.dispatch];
  6172. }
  6173. function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
  6174. if (isRenderPhaseUpdate(fiber))
  6175. throw Error("Cannot update form state while rendering.");
  6176. fiber = actionQueue.action;
  6177. if (null !== fiber) {
  6178. var actionNode = {
  6179. payload,
  6180. action: fiber,
  6181. next: null,
  6182. isTransition: true,
  6183. status: "pending",
  6184. value: null,
  6185. reason: null,
  6186. listeners: [],
  6187. then: function(listener) {
  6188. actionNode.listeners.push(listener);
  6189. }
  6190. };
  6191. null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false;
  6192. setState(actionNode);
  6193. setPendingState = actionQueue.pending;
  6194. null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
  6195. }
  6196. }
  6197. function runActionStateAction(actionQueue, node) {
  6198. var action = node.action, payload = node.payload, prevState = actionQueue.state;
  6199. if (node.isTransition) {
  6200. var prevTransition = ReactSharedInternals.T, currentTransition = {};
  6201. currentTransition._updatedFibers = /* @__PURE__ */ new Set();
  6202. ReactSharedInternals.T = currentTransition;
  6203. try {
  6204. var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
  6205. null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
  6206. handleActionReturnValue(actionQueue, node, returnValue);
  6207. } catch (error) {
  6208. onActionError(actionQueue, node, error);
  6209. } finally {
  6210. null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
  6211. "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
  6212. ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (actionQueue = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < actionQueue && console.warn(
  6213. "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
  6214. ));
  6215. }
  6216. } else
  6217. try {
  6218. currentTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, currentTransition);
  6219. } catch (error$4) {
  6220. onActionError(actionQueue, node, error$4);
  6221. }
  6222. }
  6223. function handleActionReturnValue(actionQueue, node, returnValue) {
  6224. null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(
  6225. function(nextState) {
  6226. onActionSuccess(actionQueue, node, nextState);
  6227. },
  6228. function(error) {
  6229. return onActionError(actionQueue, node, error);
  6230. }
  6231. ), node.isTransition || console.error(
  6232. "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
  6233. )) : onActionSuccess(actionQueue, node, returnValue);
  6234. }
  6235. function onActionSuccess(actionQueue, actionNode, nextState) {
  6236. actionNode.status = "fulfilled";
  6237. actionNode.value = nextState;
  6238. notifyActionListeners(actionNode);
  6239. actionQueue.state = nextState;
  6240. actionNode = actionQueue.pending;
  6241. null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
  6242. }
  6243. function onActionError(actionQueue, actionNode, error) {
  6244. var last = actionQueue.pending;
  6245. actionQueue.pending = null;
  6246. if (null !== last) {
  6247. last = last.next;
  6248. do
  6249. actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
  6250. while (actionNode !== last);
  6251. }
  6252. actionQueue.action = null;
  6253. }
  6254. function notifyActionListeners(actionNode) {
  6255. actionNode = actionNode.listeners;
  6256. for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
  6257. }
  6258. function actionStateReducer(oldState, newState) {
  6259. return newState;
  6260. }
  6261. function mountActionState(action, initialStateProp) {
  6262. if (isHydrating) {
  6263. var ssrFormState = workInProgressRoot.formState;
  6264. if (null !== ssrFormState) {
  6265. a: {
  6266. var isMatching = currentlyRenderingFiber;
  6267. if (isHydrating) {
  6268. if (nextHydratableInstance) {
  6269. b: {
  6270. var markerInstance = nextHydratableInstance;
  6271. for (var inRootOrSingleton = rootOrSingletonContext; 8 !== markerInstance.nodeType; ) {
  6272. if (!inRootOrSingleton) {
  6273. markerInstance = null;
  6274. break b;
  6275. }
  6276. markerInstance = getNextHydratable(
  6277. markerInstance.nextSibling
  6278. );
  6279. if (null === markerInstance) {
  6280. markerInstance = null;
  6281. break b;
  6282. }
  6283. }
  6284. inRootOrSingleton = markerInstance.data;
  6285. markerInstance = inRootOrSingleton === FORM_STATE_IS_MATCHING || inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING ? markerInstance : null;
  6286. }
  6287. if (markerInstance) {
  6288. nextHydratableInstance = getNextHydratable(
  6289. markerInstance.nextSibling
  6290. );
  6291. isMatching = markerInstance.data === FORM_STATE_IS_MATCHING;
  6292. break a;
  6293. }
  6294. }
  6295. throwOnHydrationMismatch(isMatching);
  6296. }
  6297. isMatching = false;
  6298. }
  6299. isMatching && (initialStateProp = ssrFormState[0]);
  6300. }
  6301. }
  6302. ssrFormState = mountWorkInProgressHook();
  6303. ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
  6304. isMatching = {
  6305. pending: null,
  6306. lanes: 0,
  6307. dispatch: null,
  6308. lastRenderedReducer: actionStateReducer,
  6309. lastRenderedState: initialStateProp
  6310. };
  6311. ssrFormState.queue = isMatching;
  6312. ssrFormState = dispatchSetState.bind(
  6313. null,
  6314. currentlyRenderingFiber,
  6315. isMatching
  6316. );
  6317. isMatching.dispatch = ssrFormState;
  6318. isMatching = mountStateImpl(false);
  6319. inRootOrSingleton = dispatchOptimisticSetState.bind(
  6320. null,
  6321. currentlyRenderingFiber,
  6322. false,
  6323. isMatching.queue
  6324. );
  6325. isMatching = mountWorkInProgressHook();
  6326. markerInstance = {
  6327. state: initialStateProp,
  6328. dispatch: null,
  6329. action,
  6330. pending: null
  6331. };
  6332. isMatching.queue = markerInstance;
  6333. ssrFormState = dispatchActionState.bind(
  6334. null,
  6335. currentlyRenderingFiber,
  6336. markerInstance,
  6337. inRootOrSingleton,
  6338. ssrFormState
  6339. );
  6340. markerInstance.dispatch = ssrFormState;
  6341. isMatching.memoizedState = action;
  6342. return [initialStateProp, ssrFormState, false];
  6343. }
  6344. function updateActionState(action) {
  6345. var stateHook = updateWorkInProgressHook();
  6346. return updateActionStateImpl(stateHook, currentHook, action);
  6347. }
  6348. function updateActionStateImpl(stateHook, currentStateHook, action) {
  6349. currentStateHook = updateReducerImpl(
  6350. stateHook,
  6351. currentStateHook,
  6352. actionStateReducer
  6353. )[0];
  6354. stateHook = updateReducer(basicStateReducer)[0];
  6355. if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then)
  6356. try {
  6357. var state = useThenable(currentStateHook);
  6358. } catch (x) {
  6359. if (x === SuspenseException) throw SuspenseActionException;
  6360. throw x;
  6361. }
  6362. else state = currentStateHook;
  6363. currentStateHook = updateWorkInProgressHook();
  6364. var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch;
  6365. action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
  6366. HasEffect | Passive,
  6367. { destroy: void 0 },
  6368. actionStateActionEffect.bind(null, actionQueue, action),
  6369. null
  6370. ));
  6371. return [state, dispatch, stateHook];
  6372. }
  6373. function actionStateActionEffect(actionQueue, action) {
  6374. actionQueue.action = action;
  6375. }
  6376. function rerenderActionState(action) {
  6377. var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
  6378. if (null !== currentStateHook)
  6379. return updateActionStateImpl(stateHook, currentStateHook, action);
  6380. updateWorkInProgressHook();
  6381. stateHook = stateHook.memoizedState;
  6382. currentStateHook = updateWorkInProgressHook();
  6383. var dispatch = currentStateHook.queue.dispatch;
  6384. currentStateHook.memoizedState = action;
  6385. return [stateHook, dispatch, false];
  6386. }
  6387. function pushSimpleEffect(tag, inst, create, deps) {
  6388. tag = { tag, create, deps, inst, next: null };
  6389. inst = currentlyRenderingFiber.updateQueue;
  6390. null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
  6391. create = inst.lastEffect;
  6392. null === create ? inst.lastEffect = tag.next = tag : (deps = create.next, create.next = tag, tag.next = deps, inst.lastEffect = tag);
  6393. return tag;
  6394. }
  6395. function mountRef(initialValue) {
  6396. var hook = mountWorkInProgressHook();
  6397. initialValue = { current: initialValue };
  6398. return hook.memoizedState = initialValue;
  6399. }
  6400. function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
  6401. var hook = mountWorkInProgressHook();
  6402. currentlyRenderingFiber.flags |= fiberFlags;
  6403. hook.memoizedState = pushSimpleEffect(
  6404. HasEffect | hookFlags,
  6405. { destroy: void 0 },
  6406. create,
  6407. void 0 === deps ? null : deps
  6408. );
  6409. }
  6410. function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
  6411. var hook = updateWorkInProgressHook();
  6412. deps = void 0 === deps ? null : deps;
  6413. var inst = hook.memoizedState.inst;
  6414. null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
  6415. HasEffect | hookFlags,
  6416. inst,
  6417. create,
  6418. deps
  6419. ));
  6420. }
  6421. function mountEffect(create, deps) {
  6422. (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ? mountEffectImpl(276826112, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps);
  6423. }
  6424. function useEffectEventImpl(payload) {
  6425. currentlyRenderingFiber.flags |= 4;
  6426. var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
  6427. if (null === componentUpdateQueue)
  6428. componentUpdateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = componentUpdateQueue, componentUpdateQueue.events = [payload];
  6429. else {
  6430. var events = componentUpdateQueue.events;
  6431. null === events ? componentUpdateQueue.events = [payload] : events.push(payload);
  6432. }
  6433. }
  6434. function mountEvent(callback) {
  6435. var hook = mountWorkInProgressHook(), ref = { impl: callback };
  6436. hook.memoizedState = ref;
  6437. return function() {
  6438. if ((executionContext & RenderContext) !== NoContext)
  6439. throw Error(
  6440. "A function wrapped in useEffectEvent can't be called during rendering."
  6441. );
  6442. return ref.impl.apply(void 0, arguments);
  6443. };
  6444. }
  6445. function updateEvent(callback) {
  6446. var ref = updateWorkInProgressHook().memoizedState;
  6447. useEffectEventImpl({ ref, nextImpl: callback });
  6448. return function() {
  6449. if ((executionContext & RenderContext) !== NoContext)
  6450. throw Error(
  6451. "A function wrapped in useEffectEvent can't be called during rendering."
  6452. );
  6453. return ref.impl.apply(void 0, arguments);
  6454. };
  6455. }
  6456. function mountLayoutEffect(create, deps) {
  6457. var fiberFlags = 4194308;
  6458. (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
  6459. return mountEffectImpl(fiberFlags, Layout, create, deps);
  6460. }
  6461. function imperativeHandleEffect(create, ref) {
  6462. if ("function" === typeof ref) {
  6463. create = create();
  6464. var refCleanup = ref(create);
  6465. return function() {
  6466. "function" === typeof refCleanup ? refCleanup() : ref(null);
  6467. };
  6468. }
  6469. if (null !== ref && void 0 !== ref)
  6470. return ref.hasOwnProperty("current") || console.error(
  6471. "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
  6472. "an object with keys {" + Object.keys(ref).join(", ") + "}"
  6473. ), create = create(), ref.current = create, function() {
  6474. ref.current = null;
  6475. };
  6476. }
  6477. function mountImperativeHandle(ref, create, deps) {
  6478. "function" !== typeof create && console.error(
  6479. "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
  6480. null !== create ? typeof create : "null"
  6481. );
  6482. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  6483. var fiberFlags = 4194308;
  6484. (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
  6485. mountEffectImpl(
  6486. fiberFlags,
  6487. Layout,
  6488. imperativeHandleEffect.bind(null, create, ref),
  6489. deps
  6490. );
  6491. }
  6492. function updateImperativeHandle(ref, create, deps) {
  6493. "function" !== typeof create && console.error(
  6494. "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
  6495. null !== create ? typeof create : "null"
  6496. );
  6497. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  6498. updateEffectImpl(
  6499. 4,
  6500. Layout,
  6501. imperativeHandleEffect.bind(null, create, ref),
  6502. deps
  6503. );
  6504. }
  6505. function mountCallback(callback, deps) {
  6506. mountWorkInProgressHook().memoizedState = [
  6507. callback,
  6508. void 0 === deps ? null : deps
  6509. ];
  6510. return callback;
  6511. }
  6512. function updateCallback(callback, deps) {
  6513. var hook = updateWorkInProgressHook();
  6514. deps = void 0 === deps ? null : deps;
  6515. var prevState = hook.memoizedState;
  6516. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  6517. return prevState[0];
  6518. hook.memoizedState = [callback, deps];
  6519. return callback;
  6520. }
  6521. function mountMemo(nextCreate, deps) {
  6522. var hook = mountWorkInProgressHook();
  6523. deps = void 0 === deps ? null : deps;
  6524. var nextValue = nextCreate();
  6525. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  6526. setIsStrictModeForDevtools(true);
  6527. try {
  6528. nextCreate();
  6529. } finally {
  6530. setIsStrictModeForDevtools(false);
  6531. }
  6532. }
  6533. hook.memoizedState = [nextValue, deps];
  6534. return nextValue;
  6535. }
  6536. function updateMemo(nextCreate, deps) {
  6537. var hook = updateWorkInProgressHook();
  6538. deps = void 0 === deps ? null : deps;
  6539. var prevState = hook.memoizedState;
  6540. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  6541. return prevState[0];
  6542. prevState = nextCreate();
  6543. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  6544. setIsStrictModeForDevtools(true);
  6545. try {
  6546. nextCreate();
  6547. } finally {
  6548. setIsStrictModeForDevtools(false);
  6549. }
  6550. }
  6551. hook.memoizedState = [prevState, deps];
  6552. return prevState;
  6553. }
  6554. function mountDeferredValue(value, initialValue) {
  6555. var hook = mountWorkInProgressHook();
  6556. return mountDeferredValueImpl(hook, value, initialValue);
  6557. }
  6558. function updateDeferredValue(value, initialValue) {
  6559. var hook = updateWorkInProgressHook();
  6560. return updateDeferredValueImpl(
  6561. hook,
  6562. currentHook.memoizedState,
  6563. value,
  6564. initialValue
  6565. );
  6566. }
  6567. function rerenderDeferredValue(value, initialValue) {
  6568. var hook = updateWorkInProgressHook();
  6569. return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
  6570. hook,
  6571. currentHook.memoizedState,
  6572. value,
  6573. initialValue
  6574. );
  6575. }
  6576. function mountDeferredValueImpl(hook, value, initialValue) {
  6577. if (void 0 === initialValue || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
  6578. return hook.memoizedState = value;
  6579. hook.memoizedState = initialValue;
  6580. hook = requestDeferredLane();
  6581. currentlyRenderingFiber.lanes |= hook;
  6582. workInProgressRootSkippedLanes |= hook;
  6583. return initialValue;
  6584. }
  6585. function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
  6586. if (objectIs(value, prevValue)) return value;
  6587. if (null !== currentTreeHiddenStackCursor.current)
  6588. return hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook;
  6589. if (0 === (renderLanes & 42) || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
  6590. return didReceiveUpdate = true, hook.memoizedState = value;
  6591. hook = requestDeferredLane();
  6592. currentlyRenderingFiber.lanes |= hook;
  6593. workInProgressRootSkippedLanes |= hook;
  6594. return prevValue;
  6595. }
  6596. function releaseAsyncTransition() {
  6597. ReactSharedInternals.asyncTransitions--;
  6598. }
  6599. function startTransition(fiber, queue, pendingState, finishedState, callback) {
  6600. var previousPriority = ReactDOMSharedInternals.p;
  6601. ReactDOMSharedInternals.p = 0 !== previousPriority && previousPriority < ContinuousEventPriority ? previousPriority : ContinuousEventPriority;
  6602. var prevTransition = ReactSharedInternals.T, currentTransition = {};
  6603. currentTransition._updatedFibers = /* @__PURE__ */ new Set();
  6604. ReactSharedInternals.T = currentTransition;
  6605. dispatchOptimisticSetState(fiber, false, queue, pendingState);
  6606. try {
  6607. var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
  6608. null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
  6609. if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
  6610. ReactSharedInternals.asyncTransitions++;
  6611. returnValue.then(releaseAsyncTransition, releaseAsyncTransition);
  6612. var thenableForFinishedState = chainThenableValue(
  6613. returnValue,
  6614. finishedState
  6615. );
  6616. dispatchSetStateInternal(
  6617. fiber,
  6618. queue,
  6619. thenableForFinishedState,
  6620. requestUpdateLane(fiber)
  6621. );
  6622. } else
  6623. dispatchSetStateInternal(
  6624. fiber,
  6625. queue,
  6626. finishedState,
  6627. requestUpdateLane(fiber)
  6628. );
  6629. } catch (error) {
  6630. dispatchSetStateInternal(
  6631. fiber,
  6632. queue,
  6633. { then: function() {
  6634. }, status: "rejected", reason: error },
  6635. requestUpdateLane(fiber)
  6636. );
  6637. } finally {
  6638. ReactDOMSharedInternals.p = previousPriority, null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
  6639. "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
  6640. ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (fiber = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < fiber && console.warn(
  6641. "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
  6642. ));
  6643. }
  6644. }
  6645. function startHostTransition(formFiber, pendingState, action, formData) {
  6646. if (5 !== formFiber.tag)
  6647. throw Error(
  6648. "Expected the form instance to be a HostComponent. This is a bug in React."
  6649. );
  6650. var queue = ensureFormComponentIsStateful(formFiber).queue;
  6651. startHostActionTimer(formFiber);
  6652. startTransition(
  6653. formFiber,
  6654. queue,
  6655. pendingState,
  6656. NotPendingTransition,
  6657. null === action ? noop : function() {
  6658. requestFormReset$1(formFiber);
  6659. return action(formData);
  6660. }
  6661. );
  6662. }
  6663. function ensureFormComponentIsStateful(formFiber) {
  6664. var existingStateHook = formFiber.memoizedState;
  6665. if (null !== existingStateHook) return existingStateHook;
  6666. existingStateHook = {
  6667. memoizedState: NotPendingTransition,
  6668. baseState: NotPendingTransition,
  6669. baseQueue: null,
  6670. queue: {
  6671. pending: null,
  6672. lanes: 0,
  6673. dispatch: null,
  6674. lastRenderedReducer: basicStateReducer,
  6675. lastRenderedState: NotPendingTransition
  6676. },
  6677. next: null
  6678. };
  6679. var initialResetState = {};
  6680. existingStateHook.next = {
  6681. memoizedState: initialResetState,
  6682. baseState: initialResetState,
  6683. baseQueue: null,
  6684. queue: {
  6685. pending: null,
  6686. lanes: 0,
  6687. dispatch: null,
  6688. lastRenderedReducer: basicStateReducer,
  6689. lastRenderedState: initialResetState
  6690. },
  6691. next: null
  6692. };
  6693. formFiber.memoizedState = existingStateHook;
  6694. formFiber = formFiber.alternate;
  6695. null !== formFiber && (formFiber.memoizedState = existingStateHook);
  6696. return existingStateHook;
  6697. }
  6698. function requestFormReset$1(formFiber) {
  6699. null === ReactSharedInternals.T && console.error(
  6700. "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
  6701. );
  6702. var stateHook = ensureFormComponentIsStateful(formFiber);
  6703. null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);
  6704. dispatchSetStateInternal(
  6705. formFiber,
  6706. stateHook.next.queue,
  6707. {},
  6708. requestUpdateLane(formFiber)
  6709. );
  6710. }
  6711. function mountTransition() {
  6712. var stateHook = mountStateImpl(false);
  6713. stateHook = startTransition.bind(
  6714. null,
  6715. currentlyRenderingFiber,
  6716. stateHook.queue,
  6717. true,
  6718. false
  6719. );
  6720. mountWorkInProgressHook().memoizedState = stateHook;
  6721. return [false, stateHook];
  6722. }
  6723. function updateTransition() {
  6724. var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
  6725. return [
  6726. "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
  6727. start
  6728. ];
  6729. }
  6730. function rerenderTransition() {
  6731. var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
  6732. return [
  6733. "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
  6734. start
  6735. ];
  6736. }
  6737. function useHostTransitionStatus() {
  6738. return readContext(HostTransitionContext);
  6739. }
  6740. function mountId() {
  6741. var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
  6742. if (isHydrating) {
  6743. var treeId = treeContextOverflow;
  6744. var idWithLeadingBit = treeContextId;
  6745. treeId = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + treeId;
  6746. identifierPrefix = "_" + identifierPrefix + "R_" + treeId;
  6747. treeId = localIdCounter++;
  6748. 0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
  6749. identifierPrefix += "_";
  6750. } else
  6751. treeId = globalClientIdCounter++, identifierPrefix = "_" + identifierPrefix + "r_" + treeId.toString(32) + "_";
  6752. return hook.memoizedState = identifierPrefix;
  6753. }
  6754. function mountRefresh() {
  6755. return mountWorkInProgressHook().memoizedState = refreshCache.bind(
  6756. null,
  6757. currentlyRenderingFiber
  6758. );
  6759. }
  6760. function refreshCache(fiber, seedKey) {
  6761. for (var provider = fiber.return; null !== provider; ) {
  6762. switch (provider.tag) {
  6763. case 24:
  6764. case 3:
  6765. var lane = requestUpdateLane(provider), refreshUpdate = createUpdate(lane), root2 = enqueueUpdate(provider, refreshUpdate, lane);
  6766. null !== root2 && (startUpdateTimerByLane(lane, "refresh()", fiber), scheduleUpdateOnFiber(root2, provider, lane), entangleTransitions(root2, provider, lane));
  6767. fiber = createCache();
  6768. null !== seedKey && void 0 !== seedKey && null !== root2 && console.error(
  6769. "The seed argument is not enabled outside experimental channels."
  6770. );
  6771. refreshUpdate.payload = { cache: fiber };
  6772. return;
  6773. }
  6774. provider = provider.return;
  6775. }
  6776. }
  6777. function dispatchReducerAction(fiber, queue, action) {
  6778. var args = arguments;
  6779. "function" === typeof args[3] && console.error(
  6780. "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
  6781. );
  6782. args = requestUpdateLane(fiber);
  6783. var update = {
  6784. lane: args,
  6785. revertLane: 0,
  6786. gesture: null,
  6787. action,
  6788. hasEagerState: false,
  6789. eagerState: null,
  6790. next: null
  6791. };
  6792. isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, update) : (update = enqueueConcurrentHookUpdate(fiber, queue, update, args), null !== update && (startUpdateTimerByLane(args, "dispatch()", fiber), scheduleUpdateOnFiber(update, fiber, args), entangleTransitionUpdate(update, queue, args)));
  6793. }
  6794. function dispatchSetState(fiber, queue, action) {
  6795. var args = arguments;
  6796. "function" === typeof args[3] && console.error(
  6797. "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
  6798. );
  6799. args = requestUpdateLane(fiber);
  6800. dispatchSetStateInternal(fiber, queue, action, args) && startUpdateTimerByLane(args, "setState()", fiber);
  6801. }
  6802. function dispatchSetStateInternal(fiber, queue, action, lane) {
  6803. var update = {
  6804. lane,
  6805. revertLane: 0,
  6806. gesture: null,
  6807. action,
  6808. hasEagerState: false,
  6809. eagerState: null,
  6810. next: null
  6811. };
  6812. if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
  6813. else {
  6814. var alternate = fiber.alternate;
  6815. if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate)) {
  6816. var prevDispatcher = ReactSharedInternals.H;
  6817. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  6818. try {
  6819. var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
  6820. update.hasEagerState = true;
  6821. update.eagerState = eagerState;
  6822. if (objectIs(eagerState, currentState))
  6823. return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
  6824. } catch (error) {
  6825. } finally {
  6826. ReactSharedInternals.H = prevDispatcher;
  6827. }
  6828. }
  6829. action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
  6830. if (null !== action)
  6831. return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true;
  6832. }
  6833. return false;
  6834. }
  6835. function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
  6836. null === ReactSharedInternals.T && 0 === currentEntangledLane && console.error(
  6837. "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."
  6838. );
  6839. action = {
  6840. lane: 2,
  6841. revertLane: requestTransitionLane(),
  6842. gesture: null,
  6843. action,
  6844. hasEagerState: false,
  6845. eagerState: null,
  6846. next: null
  6847. };
  6848. if (isRenderPhaseUpdate(fiber)) {
  6849. if (throwIfDuringRender)
  6850. throw Error("Cannot update optimistic state while rendering.");
  6851. console.error("Cannot call startTransition while rendering.");
  6852. } else
  6853. throwIfDuringRender = enqueueConcurrentHookUpdate(
  6854. fiber,
  6855. queue,
  6856. action,
  6857. 2
  6858. ), null !== throwIfDuringRender && (startUpdateTimerByLane(2, "setOptimistic()", fiber), scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2));
  6859. }
  6860. function isRenderPhaseUpdate(fiber) {
  6861. var alternate = fiber.alternate;
  6862. return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber;
  6863. }
  6864. function enqueueRenderPhaseUpdate(queue, update) {
  6865. didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
  6866. var pending = queue.pending;
  6867. null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
  6868. queue.pending = update;
  6869. }
  6870. function entangleTransitionUpdate(root2, queue, lane) {
  6871. if (0 !== (lane & 4194048)) {
  6872. var queueLanes = queue.lanes;
  6873. queueLanes &= root2.pendingLanes;
  6874. lane |= queueLanes;
  6875. queue.lanes = lane;
  6876. markRootEntangled(root2, lane);
  6877. }
  6878. }
  6879. function warnOnInvalidCallback(callback) {
  6880. if (null !== callback && "function" !== typeof callback) {
  6881. var key = String(callback);
  6882. didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error(
  6883. "Expected the last optional `callback` argument to be a function. Instead received: %s.",
  6884. callback
  6885. ));
  6886. }
  6887. }
  6888. function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
  6889. var prevState = workInProgress2.memoizedState, partialState = getDerivedStateFromProps(nextProps, prevState);
  6890. if (workInProgress2.mode & StrictLegacyMode) {
  6891. setIsStrictModeForDevtools(true);
  6892. try {
  6893. partialState = getDerivedStateFromProps(nextProps, prevState);
  6894. } finally {
  6895. setIsStrictModeForDevtools(false);
  6896. }
  6897. }
  6898. void 0 === partialState && (ctor = getComponentNameFromType(ctor) || "Component", didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), console.error(
  6899. "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
  6900. ctor
  6901. )));
  6902. prevState = null === partialState || void 0 === partialState ? prevState : assign({}, prevState, partialState);
  6903. workInProgress2.memoizedState = prevState;
  6904. 0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = prevState);
  6905. }
  6906. function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
  6907. var instance = workInProgress2.stateNode;
  6908. if ("function" === typeof instance.shouldComponentUpdate) {
  6909. oldProps = instance.shouldComponentUpdate(
  6910. newProps,
  6911. newState,
  6912. nextContext
  6913. );
  6914. if (workInProgress2.mode & StrictLegacyMode) {
  6915. setIsStrictModeForDevtools(true);
  6916. try {
  6917. oldProps = instance.shouldComponentUpdate(
  6918. newProps,
  6919. newState,
  6920. nextContext
  6921. );
  6922. } finally {
  6923. setIsStrictModeForDevtools(false);
  6924. }
  6925. }
  6926. void 0 === oldProps && console.error(
  6927. "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",
  6928. getComponentNameFromType(ctor) || "Component"
  6929. );
  6930. return oldProps;
  6931. }
  6932. return ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
  6933. }
  6934. function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
  6935. var oldState = instance.state;
  6936. "function" === typeof instance.componentWillReceiveProps && instance.componentWillReceiveProps(newProps, nextContext);
  6937. "function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  6938. instance.state !== oldState && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Component", didWarnAboutStateAssignmentForComponent.has(workInProgress2) || (didWarnAboutStateAssignmentForComponent.add(workInProgress2), console.error(
  6939. "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
  6940. workInProgress2
  6941. )), classComponentUpdater.enqueueReplaceState(
  6942. instance,
  6943. instance.state,
  6944. null
  6945. ));
  6946. }
  6947. function resolveClassComponentProps(Component, baseProps) {
  6948. var newProps = baseProps;
  6949. if ("ref" in baseProps) {
  6950. newProps = {};
  6951. for (var propName in baseProps)
  6952. "ref" !== propName && (newProps[propName] = baseProps[propName]);
  6953. }
  6954. if (Component = Component.defaultProps) {
  6955. newProps === baseProps && (newProps = assign({}, newProps));
  6956. for (var _propName in Component)
  6957. void 0 === newProps[_propName] && (newProps[_propName] = Component[_propName]);
  6958. }
  6959. return newProps;
  6960. }
  6961. function defaultOnUncaughtError(error) {
  6962. reportGlobalError(error);
  6963. console.warn(
  6964. "%s\n\n%s\n",
  6965. componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components.",
  6966. "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
  6967. );
  6968. }
  6969. function defaultOnCaughtError(error) {
  6970. var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component." : "The above error occurred in one of your React components.", recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + ".");
  6971. if ("object" === typeof error && null !== error && "string" === typeof error.environmentName) {
  6972. var JSCompiler_inline_result = error.environmentName;
  6973. error = [
  6974. "%o\n\n%s\n\n%s\n",
  6975. error,
  6976. componentNameMessage,
  6977. recreateMessage
  6978. ].slice(0);
  6979. "string" === typeof error[0] ? error.splice(
  6980. 0,
  6981. 1,
  6982. badgeFormat + " " + error[0],
  6983. badgeStyle,
  6984. pad + JSCompiler_inline_result + pad,
  6985. resetStyle
  6986. ) : error.splice(
  6987. 0,
  6988. 0,
  6989. badgeFormat,
  6990. badgeStyle,
  6991. pad + JSCompiler_inline_result + pad,
  6992. resetStyle
  6993. );
  6994. error.unshift(console);
  6995. JSCompiler_inline_result = bind.apply(console.error, error);
  6996. JSCompiler_inline_result();
  6997. } else
  6998. console.error(
  6999. "%o\n\n%s\n\n%s\n",
  7000. error,
  7001. componentNameMessage,
  7002. recreateMessage
  7003. );
  7004. }
  7005. function defaultOnRecoverableError(error) {
  7006. reportGlobalError(error);
  7007. }
  7008. function logUncaughtError(root2, errorInfo) {
  7009. try {
  7010. componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
  7011. errorBoundaryName = null;
  7012. var error = errorInfo.value;
  7013. if (null !== ReactSharedInternals.actQueue)
  7014. ReactSharedInternals.thrownErrors.push(error);
  7015. else {
  7016. var onUncaughtError = root2.onUncaughtError;
  7017. onUncaughtError(error, { componentStack: errorInfo.stack });
  7018. }
  7019. } catch (e$5) {
  7020. setTimeout(function() {
  7021. throw e$5;
  7022. });
  7023. }
  7024. }
  7025. function logCaughtError(root2, boundary, errorInfo) {
  7026. try {
  7027. componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
  7028. errorBoundaryName = getComponentNameFromFiber(boundary);
  7029. var onCaughtError = root2.onCaughtError;
  7030. onCaughtError(errorInfo.value, {
  7031. componentStack: errorInfo.stack,
  7032. errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
  7033. });
  7034. } catch (e$6) {
  7035. setTimeout(function() {
  7036. throw e$6;
  7037. });
  7038. }
  7039. }
  7040. function createRootErrorUpdate(root2, errorInfo, lane) {
  7041. lane = createUpdate(lane);
  7042. lane.tag = CaptureUpdate;
  7043. lane.payload = { element: null };
  7044. lane.callback = function() {
  7045. runWithFiberInDEV(errorInfo.source, logUncaughtError, root2, errorInfo);
  7046. };
  7047. return lane;
  7048. }
  7049. function createClassErrorUpdate(lane) {
  7050. lane = createUpdate(lane);
  7051. lane.tag = CaptureUpdate;
  7052. return lane;
  7053. }
  7054. function initializeClassErrorUpdate(update, root2, fiber, errorInfo) {
  7055. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  7056. if ("function" === typeof getDerivedStateFromError) {
  7057. var error = errorInfo.value;
  7058. update.payload = function() {
  7059. return getDerivedStateFromError(error);
  7060. };
  7061. update.callback = function() {
  7062. markFailedErrorBoundaryForHotReloading(fiber);
  7063. runWithFiberInDEV(
  7064. errorInfo.source,
  7065. logCaughtError,
  7066. root2,
  7067. fiber,
  7068. errorInfo
  7069. );
  7070. };
  7071. }
  7072. var inst = fiber.stateNode;
  7073. null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() {
  7074. markFailedErrorBoundaryForHotReloading(fiber);
  7075. runWithFiberInDEV(
  7076. errorInfo.source,
  7077. logCaughtError,
  7078. root2,
  7079. fiber,
  7080. errorInfo
  7081. );
  7082. "function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
  7083. callComponentDidCatchInDEV(this, errorInfo);
  7084. "function" === typeof getDerivedStateFromError || 0 === (fiber.lanes & 2) && console.error(
  7085. "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",
  7086. getComponentNameFromFiber(fiber) || "Unknown"
  7087. );
  7088. });
  7089. }
  7090. function throwException(root2, returnFiber, sourceFiber, value, rootRenderLanes) {
  7091. sourceFiber.flags |= 32768;
  7092. isDevToolsPresent && restorePendingUpdaters(root2, rootRenderLanes);
  7093. if (null !== value && "object" === typeof value && "function" === typeof value.then) {
  7094. returnFiber = sourceFiber.alternate;
  7095. null !== returnFiber && propagateParentContextChanges(
  7096. returnFiber,
  7097. sourceFiber,
  7098. rootRenderLanes,
  7099. true
  7100. );
  7101. isHydrating && (didSuspendOrErrorDEV = true);
  7102. sourceFiber = suspenseHandlerStackCursor.current;
  7103. if (null !== sourceFiber) {
  7104. switch (sourceFiber.tag) {
  7105. case 31:
  7106. case 13:
  7107. return null === shellBoundary ? renderDidSuspendDelayIfPossible() : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value]) : returnFiber.add(value), attachPingListener(root2, value, rootRenderLanes)), false;
  7108. case 22:
  7109. return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = {
  7110. transitions: null,
  7111. markerInstances: null,
  7112. retryQueue: /* @__PURE__ */ new Set([value])
  7113. }, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root2, value, rootRenderLanes)), false;
  7114. }
  7115. throw Error(
  7116. "Unexpected Suspense handler tag (" + sourceFiber.tag + "). This is a bug in React."
  7117. );
  7118. }
  7119. attachPingListener(root2, value, rootRenderLanes);
  7120. renderDidSuspendDelayIfPossible();
  7121. return false;
  7122. }
  7123. if (isHydrating)
  7124. return didSuspendOrErrorDEV = true, returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && queueHydrationError(
  7125. createCapturedValueAtFiber(
  7126. Error(
  7127. "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
  7128. { cause: value }
  7129. ),
  7130. sourceFiber
  7131. )
  7132. )) : (value !== HydrationMismatchException && queueHydrationError(
  7133. createCapturedValueAtFiber(
  7134. Error(
  7135. "There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
  7136. { cause: value }
  7137. ),
  7138. sourceFiber
  7139. )
  7140. ), root2 = root2.current.alternate, root2.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root2.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
  7141. root2.stateNode,
  7142. value,
  7143. rootRenderLanes
  7144. ), enqueueCapturedUpdate(root2, rootRenderLanes), workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored)), false;
  7145. var error = createCapturedValueAtFiber(
  7146. Error(
  7147. "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
  7148. { cause: value }
  7149. ),
  7150. sourceFiber
  7151. );
  7152. null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error] : workInProgressRootConcurrentErrors.push(error);
  7153. workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored);
  7154. if (null === returnFiber) return true;
  7155. value = createCapturedValueAtFiber(value, sourceFiber);
  7156. sourceFiber = returnFiber;
  7157. do {
  7158. switch (sourceFiber.tag) {
  7159. case 3:
  7160. return sourceFiber.flags |= 65536, root2 = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root2, root2 = createRootErrorUpdate(
  7161. sourceFiber.stateNode,
  7162. value,
  7163. root2
  7164. ), enqueueCapturedUpdate(sourceFiber, root2), false;
  7165. case 1:
  7166. if (returnFiber = sourceFiber.type, error = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== error && "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(error))))
  7167. return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
  7168. rootRenderLanes,
  7169. root2,
  7170. sourceFiber,
  7171. value
  7172. ), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false;
  7173. }
  7174. sourceFiber = sourceFiber.return;
  7175. } while (null !== sourceFiber);
  7176. return false;
  7177. }
  7178. function reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2) {
  7179. workInProgress2.child = null === current2 ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
  7180. workInProgress2,
  7181. current2.child,
  7182. nextChildren,
  7183. renderLanes2
  7184. );
  7185. }
  7186. function updateForwardRef(current2, workInProgress2, Component, nextProps, renderLanes2) {
  7187. Component = Component.render;
  7188. var ref = workInProgress2.ref;
  7189. if ("ref" in nextProps) {
  7190. var propsWithoutRef = {};
  7191. for (var key in nextProps)
  7192. "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
  7193. } else propsWithoutRef = nextProps;
  7194. prepareToReadContext(workInProgress2);
  7195. nextProps = renderWithHooks(
  7196. current2,
  7197. workInProgress2,
  7198. Component,
  7199. propsWithoutRef,
  7200. ref,
  7201. renderLanes2
  7202. );
  7203. key = checkDidRenderIdHook();
  7204. if (null !== current2 && !didReceiveUpdate)
  7205. return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
  7206. isHydrating && key && pushMaterializedTreeId(workInProgress2);
  7207. workInProgress2.flags |= 1;
  7208. reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
  7209. return workInProgress2.child;
  7210. }
  7211. function updateMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
  7212. if (null === current2) {
  7213. var type = Component.type;
  7214. if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare)
  7215. return Component = resolveFunctionForHotReloading(type), workInProgress2.tag = 15, workInProgress2.type = Component, validateFunctionComponentInDev(workInProgress2, type), updateSimpleMemoComponent(
  7216. current2,
  7217. workInProgress2,
  7218. Component,
  7219. nextProps,
  7220. renderLanes2
  7221. );
  7222. current2 = createFiberFromTypeAndProps(
  7223. Component.type,
  7224. null,
  7225. nextProps,
  7226. workInProgress2,
  7227. workInProgress2.mode,
  7228. renderLanes2
  7229. );
  7230. current2.ref = workInProgress2.ref;
  7231. current2.return = workInProgress2;
  7232. return workInProgress2.child = current2;
  7233. }
  7234. type = current2.child;
  7235. if (!checkScheduledUpdateOrContext(current2, renderLanes2)) {
  7236. var prevProps = type.memoizedProps;
  7237. Component = Component.compare;
  7238. Component = null !== Component ? Component : shallowEqual;
  7239. if (Component(prevProps, nextProps) && current2.ref === workInProgress2.ref)
  7240. return bailoutOnAlreadyFinishedWork(
  7241. current2,
  7242. workInProgress2,
  7243. renderLanes2
  7244. );
  7245. }
  7246. workInProgress2.flags |= 1;
  7247. current2 = createWorkInProgress(type, nextProps);
  7248. current2.ref = workInProgress2.ref;
  7249. current2.return = workInProgress2;
  7250. return workInProgress2.child = current2;
  7251. }
  7252. function updateSimpleMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
  7253. if (null !== current2) {
  7254. var prevProps = current2.memoizedProps;
  7255. if (shallowEqual(prevProps, nextProps) && current2.ref === workInProgress2.ref && workInProgress2.type === current2.type)
  7256. if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current2, renderLanes2))
  7257. 0 !== (current2.flags & 131072) && (didReceiveUpdate = true);
  7258. else
  7259. return workInProgress2.lanes = current2.lanes, bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
  7260. }
  7261. return updateFunctionComponent(
  7262. current2,
  7263. workInProgress2,
  7264. Component,
  7265. nextProps,
  7266. renderLanes2
  7267. );
  7268. }
  7269. function updateOffscreenComponent(current2, workInProgress2, renderLanes2, nextProps) {
  7270. var nextChildren = nextProps.children, prevState = null !== current2 ? current2.memoizedState : null;
  7271. null === current2 && null === workInProgress2.stateNode && (workInProgress2.stateNode = {
  7272. _visibility: OffscreenVisible,
  7273. _pendingMarkers: null,
  7274. _retryCache: null,
  7275. _transitions: null
  7276. });
  7277. if ("hidden" === nextProps.mode) {
  7278. if (0 !== (workInProgress2.flags & 128)) {
  7279. prevState = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2;
  7280. if (null !== current2) {
  7281. nextProps = workInProgress2.child = current2.child;
  7282. for (nextChildren = 0; null !== nextProps; )
  7283. nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes, nextProps = nextProps.sibling;
  7284. nextProps = nextChildren & ~prevState;
  7285. } else nextProps = 0, workInProgress2.child = null;
  7286. return deferHiddenOffscreenComponent(
  7287. current2,
  7288. workInProgress2,
  7289. prevState,
  7290. renderLanes2,
  7291. nextProps
  7292. );
  7293. }
  7294. if (0 !== (renderLanes2 & 536870912))
  7295. workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current2 && pushTransition(
  7296. workInProgress2,
  7297. null !== prevState ? prevState.cachePool : null
  7298. ), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(workInProgress2), pushOffscreenSuspenseHandler(workInProgress2);
  7299. else
  7300. return nextProps = workInProgress2.lanes = 536870912, deferHiddenOffscreenComponent(
  7301. current2,
  7302. workInProgress2,
  7303. null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2,
  7304. renderLanes2,
  7305. nextProps
  7306. );
  7307. } else
  7308. null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current2 && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(workInProgress2), reuseSuspenseHandlerOnStack(workInProgress2));
  7309. reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
  7310. return workInProgress2.child;
  7311. }
  7312. function bailoutOffscreenComponent(current2, workInProgress2) {
  7313. null !== current2 && 22 === current2.tag || null !== workInProgress2.stateNode || (workInProgress2.stateNode = {
  7314. _visibility: OffscreenVisible,
  7315. _pendingMarkers: null,
  7316. _retryCache: null,
  7317. _transitions: null
  7318. });
  7319. return workInProgress2.sibling;
  7320. }
  7321. function deferHiddenOffscreenComponent(current2, workInProgress2, nextBaseLanes, renderLanes2, remainingChildLanes) {
  7322. var JSCompiler_inline_result = peekCacheFromPool();
  7323. JSCompiler_inline_result = null === JSCompiler_inline_result ? null : {
  7324. parent: CacheContext._currentValue,
  7325. pool: JSCompiler_inline_result
  7326. };
  7327. workInProgress2.memoizedState = {
  7328. baseLanes: nextBaseLanes,
  7329. cachePool: JSCompiler_inline_result
  7330. };
  7331. null !== current2 && pushTransition(workInProgress2, null);
  7332. reuseHiddenContextOnStack(workInProgress2);
  7333. pushOffscreenSuspenseHandler(workInProgress2);
  7334. null !== current2 && propagateParentContextChanges(current2, workInProgress2, renderLanes2, true);
  7335. workInProgress2.childLanes = remainingChildLanes;
  7336. return null;
  7337. }
  7338. function mountActivityChildren(workInProgress2, nextProps) {
  7339. var hiddenProp = nextProps.hidden;
  7340. void 0 !== hiddenProp && console.error(
  7341. `<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
  7342. - <Activity %s>
  7343. + <Activity %s>`,
  7344. true === hiddenProp ? "hidden" : false === hiddenProp ? "hidden={false}" : "hidden={...}",
  7345. hiddenProp ? 'mode="hidden"' : 'mode="visible"'
  7346. );
  7347. nextProps = mountWorkInProgressOffscreenFiber(
  7348. { mode: nextProps.mode, children: nextProps.children },
  7349. workInProgress2.mode
  7350. );
  7351. nextProps.ref = workInProgress2.ref;
  7352. workInProgress2.child = nextProps;
  7353. nextProps.return = workInProgress2;
  7354. return nextProps;
  7355. }
  7356. function retryActivityComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
  7357. reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
  7358. current2 = mountActivityChildren(
  7359. workInProgress2,
  7360. workInProgress2.pendingProps
  7361. );
  7362. current2.flags |= 2;
  7363. popSuspenseHandler(workInProgress2);
  7364. workInProgress2.memoizedState = null;
  7365. return current2;
  7366. }
  7367. function updateActivityComponent(current2, workInProgress2, renderLanes2) {
  7368. var nextProps = workInProgress2.pendingProps, didSuspend = 0 !== (workInProgress2.flags & 128);
  7369. workInProgress2.flags &= -129;
  7370. if (null === current2) {
  7371. if (isHydrating) {
  7372. if ("hidden" === nextProps.mode)
  7373. return current2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.lanes = 536870912, bailoutOffscreenComponent(null, current2);
  7374. pushDehydratedActivitySuspenseHandler(workInProgress2);
  7375. (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
  7376. current2,
  7377. rootOrSingletonContext
  7378. ), renderLanes2 = null !== renderLanes2 && renderLanes2.data === ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (nextProps = {
  7379. dehydrated: renderLanes2,
  7380. treeContext: getSuspendedTreeContext(),
  7381. retryLane: 536870912,
  7382. hydrationErrors: null
  7383. }, workInProgress2.memoizedState = nextProps, nextProps = createFiberFromDehydratedFragment(renderLanes2), nextProps.return = workInProgress2, workInProgress2.child = nextProps, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
  7384. if (null === renderLanes2)
  7385. throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
  7386. workInProgress2.lanes = 536870912;
  7387. return null;
  7388. }
  7389. return mountActivityChildren(workInProgress2, nextProps);
  7390. }
  7391. var prevState = current2.memoizedState;
  7392. if (null !== prevState) {
  7393. var activityInstance = prevState.dehydrated;
  7394. pushDehydratedActivitySuspenseHandler(workInProgress2);
  7395. if (didSuspend)
  7396. if (workInProgress2.flags & 256)
  7397. workInProgress2.flags &= -257, workInProgress2 = retryActivityComponentWithoutHydrating(
  7398. current2,
  7399. workInProgress2,
  7400. renderLanes2
  7401. );
  7402. else if (null !== workInProgress2.memoizedState)
  7403. workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null;
  7404. else
  7405. throw Error(
  7406. "Client rendering an Activity suspended it again. This is a bug in React."
  7407. );
  7408. else if (warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), didReceiveUpdate || propagateParentContextChanges(
  7409. current2,
  7410. workInProgress2,
  7411. renderLanes2,
  7412. false
  7413. ), didSuspend = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || didSuspend) {
  7414. nextProps = workInProgressRoot;
  7415. if (null !== nextProps && (activityInstance = getBumpedLaneForHydration(
  7416. nextProps,
  7417. renderLanes2
  7418. ), 0 !== activityInstance && activityInstance !== prevState.retryLane))
  7419. throw prevState.retryLane = activityInstance, enqueueConcurrentRenderForLane(current2, activityInstance), scheduleUpdateOnFiber(nextProps, current2, activityInstance), SelectiveHydrationException;
  7420. renderDidSuspendDelayIfPossible();
  7421. workInProgress2 = retryActivityComponentWithoutHydrating(
  7422. current2,
  7423. workInProgress2,
  7424. renderLanes2
  7425. );
  7426. } else
  7427. current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
  7428. activityInstance.nextSibling
  7429. ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.flags |= 4096;
  7430. return workInProgress2;
  7431. }
  7432. prevState = current2.child;
  7433. nextProps = { mode: nextProps.mode, children: nextProps.children };
  7434. 0 !== (renderLanes2 & 536870912) && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
  7435. current2 = createWorkInProgress(prevState, nextProps);
  7436. current2.ref = workInProgress2.ref;
  7437. workInProgress2.child = current2;
  7438. current2.return = workInProgress2;
  7439. return current2;
  7440. }
  7441. function markRef(current2, workInProgress2) {
  7442. var ref = workInProgress2.ref;
  7443. if (null === ref)
  7444. null !== current2 && null !== current2.ref && (workInProgress2.flags |= 4194816);
  7445. else {
  7446. if ("function" !== typeof ref && "object" !== typeof ref)
  7447. throw Error(
  7448. "Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
  7449. );
  7450. if (null === current2 || current2.ref !== ref)
  7451. workInProgress2.flags |= 4194816;
  7452. }
  7453. }
  7454. function updateFunctionComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
  7455. if (Component.prototype && "function" === typeof Component.prototype.render) {
  7456. var componentName2 = getComponentNameFromType(Component) || "Unknown";
  7457. didWarnAboutBadClass[componentName2] || (console.error(
  7458. "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",
  7459. componentName2,
  7460. componentName2
  7461. ), didWarnAboutBadClass[componentName2] = true);
  7462. }
  7463. workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
  7464. workInProgress2,
  7465. null
  7466. );
  7467. null === current2 && (validateFunctionComponentInDev(workInProgress2, workInProgress2.type), Component.contextTypes && (componentName2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypes[componentName2] || (didWarnAboutContextTypes[componentName2] = true, console.error(
  7468. "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
  7469. componentName2
  7470. ))));
  7471. prepareToReadContext(workInProgress2);
  7472. Component = renderWithHooks(
  7473. current2,
  7474. workInProgress2,
  7475. Component,
  7476. nextProps,
  7477. void 0,
  7478. renderLanes2
  7479. );
  7480. nextProps = checkDidRenderIdHook();
  7481. if (null !== current2 && !didReceiveUpdate)
  7482. return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
  7483. isHydrating && nextProps && pushMaterializedTreeId(workInProgress2);
  7484. workInProgress2.flags |= 1;
  7485. reconcileChildren(current2, workInProgress2, Component, renderLanes2);
  7486. return workInProgress2.child;
  7487. }
  7488. function replayFunctionComponent(current2, workInProgress2, nextProps, Component, secondArg, renderLanes2) {
  7489. prepareToReadContext(workInProgress2);
  7490. hookTypesUpdateIndexDev = -1;
  7491. ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
  7492. workInProgress2.updateQueue = null;
  7493. nextProps = renderWithHooksAgain(
  7494. workInProgress2,
  7495. Component,
  7496. nextProps,
  7497. secondArg
  7498. );
  7499. finishRenderingHooks(current2, workInProgress2);
  7500. Component = checkDidRenderIdHook();
  7501. if (null !== current2 && !didReceiveUpdate)
  7502. return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
  7503. isHydrating && Component && pushMaterializedTreeId(workInProgress2);
  7504. workInProgress2.flags |= 1;
  7505. reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
  7506. return workInProgress2.child;
  7507. }
  7508. function updateClassComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
  7509. switch (shouldErrorImpl(workInProgress2)) {
  7510. case false:
  7511. var _instance = workInProgress2.stateNode, state = new workInProgress2.type(
  7512. workInProgress2.memoizedProps,
  7513. _instance.context
  7514. ).state;
  7515. _instance.updater.enqueueSetState(_instance, state, null);
  7516. break;
  7517. case true:
  7518. workInProgress2.flags |= 128;
  7519. workInProgress2.flags |= 65536;
  7520. _instance = Error("Simulated error coming from DevTools");
  7521. var lane = renderLanes2 & -renderLanes2;
  7522. workInProgress2.lanes |= lane;
  7523. state = workInProgressRoot;
  7524. if (null === state)
  7525. throw Error(
  7526. "Expected a work-in-progress root. This is a bug in React. Please file an issue."
  7527. );
  7528. lane = createClassErrorUpdate(lane);
  7529. initializeClassErrorUpdate(
  7530. lane,
  7531. state,
  7532. workInProgress2,
  7533. createCapturedValueAtFiber(_instance, workInProgress2)
  7534. );
  7535. enqueueCapturedUpdate(workInProgress2, lane);
  7536. }
  7537. prepareToReadContext(workInProgress2);
  7538. if (null === workInProgress2.stateNode) {
  7539. state = emptyContextObject;
  7540. _instance = Component.contextType;
  7541. "contextType" in Component && null !== _instance && (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(Component) && (didWarnAboutInvalidateContextType.add(Component), lane = void 0 === _instance ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : "object" !== typeof _instance ? " However, it is set to a " + typeof _instance + "." : _instance.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(_instance).join(", ") + "}.", console.error(
  7542. "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
  7543. getComponentNameFromType(Component) || "Component",
  7544. lane
  7545. ));
  7546. "object" === typeof _instance && null !== _instance && (state = readContext(_instance));
  7547. _instance = new Component(nextProps, state);
  7548. if (workInProgress2.mode & StrictLegacyMode) {
  7549. setIsStrictModeForDevtools(true);
  7550. try {
  7551. _instance = new Component(nextProps, state);
  7552. } finally {
  7553. setIsStrictModeForDevtools(false);
  7554. }
  7555. }
  7556. state = workInProgress2.memoizedState = null !== _instance.state && void 0 !== _instance.state ? _instance.state : null;
  7557. _instance.updater = classComponentUpdater;
  7558. workInProgress2.stateNode = _instance;
  7559. _instance._reactInternals = workInProgress2;
  7560. _instance._reactInternalInstance = fakeInternalInstance;
  7561. "function" === typeof Component.getDerivedStateFromProps && null === state && (state = getComponentNameFromType(Component) || "Component", didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), console.error(
  7562. "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",
  7563. state,
  7564. null === _instance.state ? "null" : "undefined",
  7565. state
  7566. )));
  7567. if ("function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate) {
  7568. var foundWillUpdateName = lane = state = null;
  7569. "function" === typeof _instance.componentWillMount && true !== _instance.componentWillMount.__suppressDeprecationWarning ? state = "componentWillMount" : "function" === typeof _instance.UNSAFE_componentWillMount && (state = "UNSAFE_componentWillMount");
  7570. "function" === typeof _instance.componentWillReceiveProps && true !== _instance.componentWillReceiveProps.__suppressDeprecationWarning ? lane = "componentWillReceiveProps" : "function" === typeof _instance.UNSAFE_componentWillReceiveProps && (lane = "UNSAFE_componentWillReceiveProps");
  7571. "function" === typeof _instance.componentWillUpdate && true !== _instance.componentWillUpdate.__suppressDeprecationWarning ? foundWillUpdateName = "componentWillUpdate" : "function" === typeof _instance.UNSAFE_componentWillUpdate && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
  7572. if (null !== state || null !== lane || null !== foundWillUpdateName) {
  7573. _instance = getComponentNameFromType(Component) || "Component";
  7574. var newApiName = "function" === typeof Component.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
  7575. didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), console.error(
  7576. "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
  7577. _instance,
  7578. newApiName,
  7579. null !== state ? "\n " + state : "",
  7580. null !== lane ? "\n " + lane : "",
  7581. null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
  7582. ));
  7583. }
  7584. }
  7585. _instance = workInProgress2.stateNode;
  7586. state = getComponentNameFromType(Component) || "Component";
  7587. _instance.render || (Component.prototype && "function" === typeof Component.prototype.render ? console.error(
  7588. "No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
  7589. state
  7590. ) : console.error(
  7591. "No `render` method found on the %s instance: you may have forgotten to define `render`.",
  7592. state
  7593. ));
  7594. !_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || console.error(
  7595. "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",
  7596. state
  7597. );
  7598. _instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && console.error(
  7599. "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
  7600. state
  7601. );
  7602. _instance.contextType && console.error(
  7603. "contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
  7604. state
  7605. );
  7606. Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), console.error(
  7607. "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
  7608. state
  7609. ));
  7610. Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), console.error(
  7611. "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",
  7612. state
  7613. ));
  7614. "function" === typeof _instance.componentShouldUpdate && console.error(
  7615. "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",
  7616. state
  7617. );
  7618. Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && console.error(
  7619. "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
  7620. getComponentNameFromType(Component) || "A pure component"
  7621. );
  7622. "function" === typeof _instance.componentDidUnmount && console.error(
  7623. "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
  7624. state
  7625. );
  7626. "function" === typeof _instance.componentDidReceiveProps && console.error(
  7627. "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",
  7628. state
  7629. );
  7630. "function" === typeof _instance.componentWillRecieveProps && console.error(
  7631. "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
  7632. state
  7633. );
  7634. "function" === typeof _instance.UNSAFE_componentWillRecieveProps && console.error(
  7635. "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
  7636. state
  7637. );
  7638. lane = _instance.props !== nextProps;
  7639. void 0 !== _instance.props && lane && console.error(
  7640. "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
  7641. state
  7642. );
  7643. _instance.defaultProps && console.error(
  7644. "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
  7645. state,
  7646. state
  7647. );
  7648. "function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), console.error(
  7649. "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
  7650. getComponentNameFromType(Component)
  7651. ));
  7652. "function" === typeof _instance.getDerivedStateFromProps && console.error(
  7653. "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
  7654. state
  7655. );
  7656. "function" === typeof _instance.getDerivedStateFromError && console.error(
  7657. "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
  7658. state
  7659. );
  7660. "function" === typeof Component.getSnapshotBeforeUpdate && console.error(
  7661. "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
  7662. state
  7663. );
  7664. (lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && console.error("%s.state: must be set to an object or null", state);
  7665. "function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && console.error(
  7666. "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
  7667. state
  7668. );
  7669. _instance = workInProgress2.stateNode;
  7670. _instance.props = nextProps;
  7671. _instance.state = workInProgress2.memoizedState;
  7672. _instance.refs = {};
  7673. initializeUpdateQueue(workInProgress2);
  7674. state = Component.contextType;
  7675. _instance.context = "object" === typeof state && null !== state ? readContext(state) : emptyContextObject;
  7676. _instance.state === nextProps && (state = getComponentNameFromType(Component) || "Component", didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), console.error(
  7677. "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
  7678. state
  7679. )));
  7680. workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
  7681. workInProgress2,
  7682. _instance
  7683. );
  7684. ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(
  7685. workInProgress2,
  7686. _instance
  7687. );
  7688. _instance.state = workInProgress2.memoizedState;
  7689. state = Component.getDerivedStateFromProps;
  7690. "function" === typeof state && (applyDerivedStateFromProps(
  7691. workInProgress2,
  7692. Component,
  7693. state,
  7694. nextProps
  7695. ), _instance.state = workInProgress2.memoizedState);
  7696. "function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || (state = _instance.state, "function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount(), state !== _instance.state && (console.error(
  7697. "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
  7698. getComponentNameFromFiber(workInProgress2) || "Component"
  7699. ), classComponentUpdater.enqueueReplaceState(
  7700. _instance,
  7701. _instance.state,
  7702. null
  7703. )), processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), _instance.state = workInProgress2.memoizedState);
  7704. "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308);
  7705. (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728);
  7706. _instance = true;
  7707. } else if (null === current2) {
  7708. _instance = workInProgress2.stateNode;
  7709. var unresolvedOldProps = workInProgress2.memoizedProps;
  7710. lane = resolveClassComponentProps(Component, unresolvedOldProps);
  7711. _instance.props = lane;
  7712. var oldContext = _instance.context;
  7713. foundWillUpdateName = Component.contextType;
  7714. state = emptyContextObject;
  7715. "object" === typeof foundWillUpdateName && null !== foundWillUpdateName && (state = readContext(foundWillUpdateName));
  7716. newApiName = Component.getDerivedStateFromProps;
  7717. foundWillUpdateName = "function" === typeof newApiName || "function" === typeof _instance.getSnapshotBeforeUpdate;
  7718. unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps;
  7719. foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (unresolvedOldProps || oldContext !== state) && callComponentWillReceiveProps(
  7720. workInProgress2,
  7721. _instance,
  7722. nextProps,
  7723. state
  7724. );
  7725. hasForceUpdate = false;
  7726. var oldState = workInProgress2.memoizedState;
  7727. _instance.state = oldState;
  7728. processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
  7729. suspendIfUpdateReadFromEntangledAsyncAction();
  7730. oldContext = workInProgress2.memoizedState;
  7731. unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(
  7732. workInProgress2,
  7733. Component,
  7734. newApiName,
  7735. nextProps
  7736. ), oldContext = workInProgress2.memoizedState), (lane = hasForceUpdate || checkShouldComponentUpdate(
  7737. workInProgress2,
  7738. Component,
  7739. lane,
  7740. nextProps,
  7741. oldState,
  7742. oldContext,
  7743. state
  7744. )) ? (foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || ("function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount()), "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728)) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), _instance.props = nextProps, _instance.state = oldContext, _instance.context = state, _instance = lane) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), _instance = false);
  7745. } else {
  7746. _instance = workInProgress2.stateNode;
  7747. cloneUpdateQueue(current2, workInProgress2);
  7748. state = workInProgress2.memoizedProps;
  7749. foundWillUpdateName = resolveClassComponentProps(Component, state);
  7750. _instance.props = foundWillUpdateName;
  7751. newApiName = workInProgress2.pendingProps;
  7752. oldState = _instance.context;
  7753. oldContext = Component.contextType;
  7754. lane = emptyContextObject;
  7755. "object" === typeof oldContext && null !== oldContext && (lane = readContext(oldContext));
  7756. unresolvedOldProps = Component.getDerivedStateFromProps;
  7757. (oldContext = "function" === typeof unresolvedOldProps || "function" === typeof _instance.getSnapshotBeforeUpdate) || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (state !== newApiName || oldState !== lane) && callComponentWillReceiveProps(
  7758. workInProgress2,
  7759. _instance,
  7760. nextProps,
  7761. lane
  7762. );
  7763. hasForceUpdate = false;
  7764. oldState = workInProgress2.memoizedState;
  7765. _instance.state = oldState;
  7766. processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
  7767. suspendIfUpdateReadFromEntangledAsyncAction();
  7768. var newState = workInProgress2.memoizedState;
  7769. state !== newApiName || oldState !== newState || hasForceUpdate || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(
  7770. workInProgress2,
  7771. Component,
  7772. unresolvedOldProps,
  7773. nextProps
  7774. ), newState = workInProgress2.memoizedState), (foundWillUpdateName = hasForceUpdate || checkShouldComponentUpdate(
  7775. workInProgress2,
  7776. Component,
  7777. foundWillUpdateName,
  7778. nextProps,
  7779. oldState,
  7780. newState,
  7781. lane
  7782. ) || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies)) ? (oldContext || "function" !== typeof _instance.UNSAFE_componentWillUpdate && "function" !== typeof _instance.componentWillUpdate || ("function" === typeof _instance.componentWillUpdate && _instance.componentWillUpdate(nextProps, newState, lane), "function" === typeof _instance.UNSAFE_componentWillUpdate && _instance.UNSAFE_componentWillUpdate(
  7783. nextProps,
  7784. newState,
  7785. lane
  7786. )), "function" === typeof _instance.componentDidUpdate && (workInProgress2.flags |= 4), "function" === typeof _instance.getSnapshotBeforeUpdate && (workInProgress2.flags |= 1024)) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), _instance.props = nextProps, _instance.state = newState, _instance.context = lane, _instance = foundWillUpdateName) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), _instance = false);
  7787. }
  7788. lane = _instance;
  7789. markRef(current2, workInProgress2);
  7790. state = 0 !== (workInProgress2.flags & 128);
  7791. if (lane || state) {
  7792. lane = workInProgress2.stateNode;
  7793. setCurrentFiber(workInProgress2);
  7794. if (state && "function" !== typeof Component.getDerivedStateFromError)
  7795. Component = null, profilerStartTime = -1;
  7796. else if (Component = callRenderInDEV(lane), workInProgress2.mode & StrictLegacyMode) {
  7797. setIsStrictModeForDevtools(true);
  7798. try {
  7799. callRenderInDEV(lane);
  7800. } finally {
  7801. setIsStrictModeForDevtools(false);
  7802. }
  7803. }
  7804. workInProgress2.flags |= 1;
  7805. null !== current2 && state ? (workInProgress2.child = reconcileChildFibers(
  7806. workInProgress2,
  7807. current2.child,
  7808. null,
  7809. renderLanes2
  7810. ), workInProgress2.child = reconcileChildFibers(
  7811. workInProgress2,
  7812. null,
  7813. Component,
  7814. renderLanes2
  7815. )) : reconcileChildren(current2, workInProgress2, Component, renderLanes2);
  7816. workInProgress2.memoizedState = lane.state;
  7817. current2 = workInProgress2.child;
  7818. } else
  7819. current2 = bailoutOnAlreadyFinishedWork(
  7820. current2,
  7821. workInProgress2,
  7822. renderLanes2
  7823. );
  7824. renderLanes2 = workInProgress2.stateNode;
  7825. _instance && renderLanes2.props !== nextProps && (didWarnAboutReassigningProps || console.error(
  7826. "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
  7827. getComponentNameFromFiber(workInProgress2) || "a component"
  7828. ), didWarnAboutReassigningProps = true);
  7829. return current2;
  7830. }
  7831. function mountHostRootWithoutHydrating(current2, workInProgress2, nextChildren, renderLanes2) {
  7832. resetHydrationState();
  7833. workInProgress2.flags |= 256;
  7834. reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
  7835. return workInProgress2.child;
  7836. }
  7837. function validateFunctionComponentInDev(workInProgress2, Component) {
  7838. Component && Component.childContextTypes && console.error(
  7839. "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
  7840. Component.displayName || Component.name || "Component"
  7841. );
  7842. "function" === typeof Component.getDerivedStateFromProps && (workInProgress2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] || (console.error(
  7843. "%s: Function components do not support getDerivedStateFromProps.",
  7844. workInProgress2
  7845. ), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] = true));
  7846. "object" === typeof Component.contextType && null !== Component.contextType && (Component = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypeOnFunctionComponent[Component] || (console.error(
  7847. "%s: Function components do not support contextType.",
  7848. Component
  7849. ), didWarnAboutContextTypeOnFunctionComponent[Component] = true));
  7850. }
  7851. function mountSuspenseOffscreenState(renderLanes2) {
  7852. return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
  7853. }
  7854. function getRemainingWorkInPrimaryTree(current2, primaryTreeDidDefer, renderLanes2) {
  7855. current2 = null !== current2 ? current2.childLanes & ~renderLanes2 : 0;
  7856. primaryTreeDidDefer && (current2 |= workInProgressDeferredLane);
  7857. return current2;
  7858. }
  7859. function updateSuspenseComponent(current2, workInProgress2, renderLanes2) {
  7860. var JSCompiler_object_inline_digest_2724;
  7861. var JSCompiler_object_inline_stack_2725 = workInProgress2.pendingProps;
  7862. shouldSuspendImpl(workInProgress2) && (workInProgress2.flags |= 128);
  7863. var JSCompiler_object_inline_message_2723 = false;
  7864. var didSuspend = 0 !== (workInProgress2.flags & 128);
  7865. (JSCompiler_object_inline_digest_2724 = didSuspend) || (JSCompiler_object_inline_digest_2724 = null !== current2 && null === current2.memoizedState ? false : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
  7866. JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_message_2723 = true, workInProgress2.flags &= -129);
  7867. JSCompiler_object_inline_digest_2724 = 0 !== (workInProgress2.flags & 32);
  7868. workInProgress2.flags &= -33;
  7869. if (null === current2) {
  7870. if (isHydrating) {
  7871. JSCompiler_object_inline_message_2723 ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2);
  7872. (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
  7873. current2,
  7874. rootOrSingletonContext
  7875. ), renderLanes2 = null !== renderLanes2 && renderLanes2.data !== ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (JSCompiler_object_inline_digest_2724 = {
  7876. dehydrated: renderLanes2,
  7877. treeContext: getSuspendedTreeContext(),
  7878. retryLane: 536870912,
  7879. hydrationErrors: null
  7880. }, workInProgress2.memoizedState = JSCompiler_object_inline_digest_2724, JSCompiler_object_inline_digest_2724 = createFiberFromDehydratedFragment(renderLanes2), JSCompiler_object_inline_digest_2724.return = workInProgress2, workInProgress2.child = JSCompiler_object_inline_digest_2724, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
  7881. if (null === renderLanes2)
  7882. throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
  7883. isSuspenseInstanceFallback(renderLanes2) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912;
  7884. return null;
  7885. }
  7886. var nextPrimaryChildren = JSCompiler_object_inline_stack_2725.children;
  7887. JSCompiler_object_inline_stack_2725 = JSCompiler_object_inline_stack_2725.fallback;
  7888. if (JSCompiler_object_inline_message_2723) {
  7889. reuseSuspenseHandlerOnStack(workInProgress2);
  7890. var mode = workInProgress2.mode;
  7891. nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
  7892. { mode: "hidden", children: nextPrimaryChildren },
  7893. mode
  7894. );
  7895. JSCompiler_object_inline_stack_2725 = createFiberFromFragment(
  7896. JSCompiler_object_inline_stack_2725,
  7897. mode,
  7898. renderLanes2,
  7899. null
  7900. );
  7901. nextPrimaryChildren.return = workInProgress2;
  7902. JSCompiler_object_inline_stack_2725.return = workInProgress2;
  7903. nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2725;
  7904. workInProgress2.child = nextPrimaryChildren;
  7905. JSCompiler_object_inline_stack_2725 = workInProgress2.child;
  7906. JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2);
  7907. JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
  7908. current2,
  7909. JSCompiler_object_inline_digest_2724,
  7910. renderLanes2
  7911. );
  7912. workInProgress2.memoizedState = SUSPENDED_MARKER;
  7913. return bailoutOffscreenComponent(
  7914. null,
  7915. JSCompiler_object_inline_stack_2725
  7916. );
  7917. }
  7918. pushPrimaryTreeSuspenseHandler(workInProgress2);
  7919. return mountSuspensePrimaryChildren(
  7920. workInProgress2,
  7921. nextPrimaryChildren
  7922. );
  7923. }
  7924. var prevState = current2.memoizedState;
  7925. if (null !== prevState) {
  7926. var JSCompiler_object_inline_componentStack_2726 = prevState.dehydrated;
  7927. if (null !== JSCompiler_object_inline_componentStack_2726) {
  7928. if (didSuspend)
  7929. workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
  7930. current2,
  7931. workInProgress2,
  7932. renderLanes2
  7933. )) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, JSCompiler_object_inline_stack_2725 = mountWorkInProgressOffscreenFiber(
  7934. {
  7935. mode: "visible",
  7936. children: JSCompiler_object_inline_stack_2725.children
  7937. },
  7938. mode
  7939. ), nextPrimaryChildren = createFiberFromFragment(
  7940. nextPrimaryChildren,
  7941. mode,
  7942. renderLanes2,
  7943. null
  7944. ), nextPrimaryChildren.flags |= 2, JSCompiler_object_inline_stack_2725.return = workInProgress2, nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, reconcileChildFibers(
  7945. workInProgress2,
  7946. current2.child,
  7947. null,
  7948. renderLanes2
  7949. ), JSCompiler_object_inline_stack_2725 = workInProgress2.child, JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2), JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
  7950. current2,
  7951. JSCompiler_object_inline_digest_2724,
  7952. renderLanes2
  7953. ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = bailoutOffscreenComponent(
  7954. null,
  7955. JSCompiler_object_inline_stack_2725
  7956. ));
  7957. else if (pushPrimaryTreeSuspenseHandler(workInProgress2), warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), isSuspenseInstanceFallback(
  7958. JSCompiler_object_inline_componentStack_2726
  7959. )) {
  7960. JSCompiler_object_inline_digest_2724 = JSCompiler_object_inline_componentStack_2726.nextSibling && JSCompiler_object_inline_componentStack_2726.nextSibling.dataset;
  7961. if (JSCompiler_object_inline_digest_2724) {
  7962. nextPrimaryChildren = JSCompiler_object_inline_digest_2724.dgst;
  7963. var message = JSCompiler_object_inline_digest_2724.msg;
  7964. mode = JSCompiler_object_inline_digest_2724.stck;
  7965. var componentStack = JSCompiler_object_inline_digest_2724.cstck;
  7966. }
  7967. JSCompiler_object_inline_message_2723 = message;
  7968. JSCompiler_object_inline_digest_2724 = nextPrimaryChildren;
  7969. JSCompiler_object_inline_stack_2725 = mode;
  7970. JSCompiler_object_inline_componentStack_2726 = componentStack;
  7971. nextPrimaryChildren = JSCompiler_object_inline_message_2723;
  7972. mode = JSCompiler_object_inline_componentStack_2726;
  7973. nextPrimaryChildren = nextPrimaryChildren ? Error(nextPrimaryChildren) : Error(
  7974. "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
  7975. );
  7976. nextPrimaryChildren.stack = JSCompiler_object_inline_stack_2725 || "";
  7977. nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2724;
  7978. JSCompiler_object_inline_digest_2724 = void 0 === mode ? null : mode;
  7979. JSCompiler_object_inline_stack_2725 = {
  7980. value: nextPrimaryChildren,
  7981. source: null,
  7982. stack: JSCompiler_object_inline_digest_2724
  7983. };
  7984. "string" === typeof JSCompiler_object_inline_digest_2724 && CapturedStacks.set(
  7985. nextPrimaryChildren,
  7986. JSCompiler_object_inline_stack_2725
  7987. );
  7988. queueHydrationError(JSCompiler_object_inline_stack_2725);
  7989. workInProgress2 = retrySuspenseComponentWithoutHydrating(
  7990. current2,
  7991. workInProgress2,
  7992. renderLanes2
  7993. );
  7994. } else if (didReceiveUpdate || propagateParentContextChanges(
  7995. current2,
  7996. workInProgress2,
  7997. renderLanes2,
  7998. false
  7999. ), JSCompiler_object_inline_digest_2724 = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || JSCompiler_object_inline_digest_2724) {
  8000. JSCompiler_object_inline_digest_2724 = workInProgressRoot;
  8001. if (null !== JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_stack_2725 = getBumpedLaneForHydration(
  8002. JSCompiler_object_inline_digest_2724,
  8003. renderLanes2
  8004. ), 0 !== JSCompiler_object_inline_stack_2725 && JSCompiler_object_inline_stack_2725 !== prevState.retryLane))
  8005. throw prevState.retryLane = JSCompiler_object_inline_stack_2725, enqueueConcurrentRenderForLane(
  8006. current2,
  8007. JSCompiler_object_inline_stack_2725
  8008. ), scheduleUpdateOnFiber(
  8009. JSCompiler_object_inline_digest_2724,
  8010. current2,
  8011. JSCompiler_object_inline_stack_2725
  8012. ), SelectiveHydrationException;
  8013. isSuspenseInstancePending(
  8014. JSCompiler_object_inline_componentStack_2726
  8015. ) || renderDidSuspendDelayIfPossible();
  8016. workInProgress2 = retrySuspenseComponentWithoutHydrating(
  8017. current2,
  8018. workInProgress2,
  8019. renderLanes2
  8020. );
  8021. } else
  8022. isSuspenseInstancePending(
  8023. JSCompiler_object_inline_componentStack_2726
  8024. ) ? (workInProgress2.flags |= 192, workInProgress2.child = current2.child, workInProgress2 = null) : (current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
  8025. JSCompiler_object_inline_componentStack_2726.nextSibling
  8026. ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountSuspensePrimaryChildren(
  8027. workInProgress2,
  8028. JSCompiler_object_inline_stack_2725.children
  8029. ), workInProgress2.flags |= 4096);
  8030. return workInProgress2;
  8031. }
  8032. }
  8033. if (JSCompiler_object_inline_message_2723)
  8034. return reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, componentStack = current2.child, JSCompiler_object_inline_componentStack_2726 = componentStack.sibling, JSCompiler_object_inline_stack_2725 = createWorkInProgress(
  8035. componentStack,
  8036. {
  8037. mode: "hidden",
  8038. children: JSCompiler_object_inline_stack_2725.children
  8039. }
  8040. ), JSCompiler_object_inline_stack_2725.subtreeFlags = componentStack.subtreeFlags & 65011712, null !== JSCompiler_object_inline_componentStack_2726 ? nextPrimaryChildren = createWorkInProgress(
  8041. JSCompiler_object_inline_componentStack_2726,
  8042. nextPrimaryChildren
  8043. ) : (nextPrimaryChildren = createFiberFromFragment(
  8044. nextPrimaryChildren,
  8045. mode,
  8046. renderLanes2,
  8047. null
  8048. ), nextPrimaryChildren.flags |= 2), nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_2725), JSCompiler_object_inline_stack_2725 = workInProgress2.child, nextPrimaryChildren = current2.child.memoizedState, null === nextPrimaryChildren ? nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes2) : (mode = nextPrimaryChildren.cachePool, null !== mode ? (componentStack = CacheContext._currentValue, mode = mode.parent !== componentStack ? { parent: componentStack, pool: componentStack } : mode) : mode = getSuspendedCache(), nextPrimaryChildren = {
  8049. baseLanes: nextPrimaryChildren.baseLanes | renderLanes2,
  8050. cachePool: mode
  8051. }), JSCompiler_object_inline_stack_2725.memoizedState = nextPrimaryChildren, JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
  8052. current2,
  8053. JSCompiler_object_inline_digest_2724,
  8054. renderLanes2
  8055. ), workInProgress2.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(
  8056. current2.child,
  8057. JSCompiler_object_inline_stack_2725
  8058. );
  8059. null !== prevState && (renderLanes2 & 62914560) === renderLanes2 && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
  8060. pushPrimaryTreeSuspenseHandler(workInProgress2);
  8061. renderLanes2 = current2.child;
  8062. current2 = renderLanes2.sibling;
  8063. renderLanes2 = createWorkInProgress(renderLanes2, {
  8064. mode: "visible",
  8065. children: JSCompiler_object_inline_stack_2725.children
  8066. });
  8067. renderLanes2.return = workInProgress2;
  8068. renderLanes2.sibling = null;
  8069. null !== current2 && (JSCompiler_object_inline_digest_2724 = workInProgress2.deletions, null === JSCompiler_object_inline_digest_2724 ? (workInProgress2.deletions = [current2], workInProgress2.flags |= 16) : JSCompiler_object_inline_digest_2724.push(current2));
  8070. workInProgress2.child = renderLanes2;
  8071. workInProgress2.memoizedState = null;
  8072. return renderLanes2;
  8073. }
  8074. function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
  8075. primaryChildren = mountWorkInProgressOffscreenFiber(
  8076. { mode: "visible", children: primaryChildren },
  8077. workInProgress2.mode
  8078. );
  8079. primaryChildren.return = workInProgress2;
  8080. return workInProgress2.child = primaryChildren;
  8081. }
  8082. function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
  8083. offscreenProps = createFiber(22, offscreenProps, null, mode);
  8084. offscreenProps.lanes = 0;
  8085. return offscreenProps;
  8086. }
  8087. function retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
  8088. reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
  8089. current2 = mountSuspensePrimaryChildren(
  8090. workInProgress2,
  8091. workInProgress2.pendingProps.children
  8092. );
  8093. current2.flags |= 2;
  8094. workInProgress2.memoizedState = null;
  8095. return current2;
  8096. }
  8097. function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
  8098. fiber.lanes |= renderLanes2;
  8099. var alternate = fiber.alternate;
  8100. null !== alternate && (alternate.lanes |= renderLanes2);
  8101. scheduleContextWorkOnParentPath(
  8102. fiber.return,
  8103. renderLanes2,
  8104. propagationRoot
  8105. );
  8106. }
  8107. function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode, treeForkCount2) {
  8108. var renderState = workInProgress2.memoizedState;
  8109. null === renderState ? workInProgress2.memoizedState = {
  8110. isBackwards,
  8111. rendering: null,
  8112. renderingStartTime: 0,
  8113. last: lastContentRow,
  8114. tail,
  8115. tailMode,
  8116. treeForkCount: treeForkCount2
  8117. } : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode, renderState.treeForkCount = treeForkCount2);
  8118. }
  8119. function updateSuspenseListComponent(current2, workInProgress2, renderLanes2) {
  8120. var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail, newChildren = nextProps.children, suspenseContext = suspenseStackCursor.current;
  8121. (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback)) ? (suspenseContext = suspenseContext & SubtreeSuspenseContextMask | ForceSuspenseFallback, workInProgress2.flags |= 128) : suspenseContext &= SubtreeSuspenseContextMask;
  8122. push(suspenseStackCursor, suspenseContext, workInProgress2);
  8123. suspenseContext = null == revealOrder ? "null" : revealOrder;
  8124. if ("forwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && "together" !== revealOrder && "independent" !== revealOrder && !didWarnAboutRevealOrder[suspenseContext])
  8125. if (didWarnAboutRevealOrder[suspenseContext] = true, null == revealOrder)
  8126. console.error(
  8127. 'The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".'
  8128. );
  8129. else if ("backwards" === revealOrder)
  8130. console.error(
  8131. 'The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.'
  8132. );
  8133. else if ("string" === typeof revealOrder)
  8134. switch (revealOrder.toLowerCase()) {
  8135. case "together":
  8136. case "forwards":
  8137. case "backwards":
  8138. case "independent":
  8139. console.error(
  8140. '"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',
  8141. revealOrder,
  8142. revealOrder.toLowerCase()
  8143. );
  8144. break;
  8145. case "forward":
  8146. case "backward":
  8147. console.error(
  8148. '"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',
  8149. revealOrder,
  8150. revealOrder.toLowerCase()
  8151. );
  8152. break;
  8153. default:
  8154. console.error(
  8155. '"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
  8156. revealOrder
  8157. );
  8158. }
  8159. else
  8160. console.error(
  8161. '%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
  8162. revealOrder
  8163. );
  8164. suspenseContext = null == tailMode ? "null" : tailMode;
  8165. if (!didWarnAboutTailOptions[suspenseContext])
  8166. if (null == tailMode) {
  8167. if ("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder)
  8168. didWarnAboutTailOptions[suspenseContext] = true, console.error(
  8169. 'The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".'
  8170. );
  8171. } else
  8172. "visible" !== tailMode && "collapsed" !== tailMode && "hidden" !== tailMode ? (didWarnAboutTailOptions[suspenseContext] = true, console.error(
  8173. '"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',
  8174. tailMode
  8175. )) : "forwards" !== revealOrder && "backwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && (didWarnAboutTailOptions[suspenseContext] = true, console.error(
  8176. '<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',
  8177. tailMode
  8178. ));
  8179. a: if (("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder) && void 0 !== newChildren && null !== newChildren && false !== newChildren)
  8180. if (isArrayImpl(newChildren))
  8181. for (suspenseContext = 0; suspenseContext < newChildren.length; suspenseContext++) {
  8182. if (!validateSuspenseListNestedChild(
  8183. newChildren[suspenseContext],
  8184. suspenseContext
  8185. ))
  8186. break a;
  8187. }
  8188. else if (suspenseContext = getIteratorFn(newChildren), "function" === typeof suspenseContext) {
  8189. if (suspenseContext = suspenseContext.call(newChildren))
  8190. for (var step = suspenseContext.next(), _i = 0; !step.done; step = suspenseContext.next()) {
  8191. if (!validateSuspenseListNestedChild(step.value, _i)) break a;
  8192. _i++;
  8193. }
  8194. } else
  8195. console.error(
  8196. 'A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',
  8197. revealOrder
  8198. );
  8199. reconcileChildren(current2, workInProgress2, newChildren, renderLanes2);
  8200. isHydrating ? (warnIfNotHydrating(), newChildren = treeForkCount) : newChildren = 0;
  8201. if (!nextProps && null !== current2 && 0 !== (current2.flags & 128))
  8202. a: for (current2 = workInProgress2.child; null !== current2; ) {
  8203. if (13 === current2.tag)
  8204. null !== current2.memoizedState && scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
  8205. else if (19 === current2.tag)
  8206. scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
  8207. else if (null !== current2.child) {
  8208. current2.child.return = current2;
  8209. current2 = current2.child;
  8210. continue;
  8211. }
  8212. if (current2 === workInProgress2) break a;
  8213. for (; null === current2.sibling; ) {
  8214. if (null === current2.return || current2.return === workInProgress2)
  8215. break a;
  8216. current2 = current2.return;
  8217. }
  8218. current2.sibling.return = current2.return;
  8219. current2 = current2.sibling;
  8220. }
  8221. switch (revealOrder) {
  8222. case "forwards":
  8223. renderLanes2 = workInProgress2.child;
  8224. for (revealOrder = null; null !== renderLanes2; )
  8225. current2 = renderLanes2.alternate, null !== current2 && null === findFirstSuspended(current2) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
  8226. renderLanes2 = revealOrder;
  8227. null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null);
  8228. initSuspenseListRenderState(
  8229. workInProgress2,
  8230. false,
  8231. revealOrder,
  8232. renderLanes2,
  8233. tailMode,
  8234. newChildren
  8235. );
  8236. break;
  8237. case "backwards":
  8238. case "unstable_legacy-backwards":
  8239. renderLanes2 = null;
  8240. revealOrder = workInProgress2.child;
  8241. for (workInProgress2.child = null; null !== revealOrder; ) {
  8242. current2 = revealOrder.alternate;
  8243. if (null !== current2 && null === findFirstSuspended(current2)) {
  8244. workInProgress2.child = revealOrder;
  8245. break;
  8246. }
  8247. current2 = revealOrder.sibling;
  8248. revealOrder.sibling = renderLanes2;
  8249. renderLanes2 = revealOrder;
  8250. revealOrder = current2;
  8251. }
  8252. initSuspenseListRenderState(
  8253. workInProgress2,
  8254. true,
  8255. renderLanes2,
  8256. null,
  8257. tailMode,
  8258. newChildren
  8259. );
  8260. break;
  8261. case "together":
  8262. initSuspenseListRenderState(
  8263. workInProgress2,
  8264. false,
  8265. null,
  8266. null,
  8267. void 0,
  8268. newChildren
  8269. );
  8270. break;
  8271. default:
  8272. workInProgress2.memoizedState = null;
  8273. }
  8274. return workInProgress2.child;
  8275. }
  8276. function bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2) {
  8277. null !== current2 && (workInProgress2.dependencies = current2.dependencies);
  8278. profilerStartTime = -1;
  8279. workInProgressRootSkippedLanes |= workInProgress2.lanes;
  8280. if (0 === (renderLanes2 & workInProgress2.childLanes))
  8281. if (null !== current2) {
  8282. if (propagateParentContextChanges(
  8283. current2,
  8284. workInProgress2,
  8285. renderLanes2,
  8286. false
  8287. ), 0 === (renderLanes2 & workInProgress2.childLanes))
  8288. return null;
  8289. } else return null;
  8290. if (null !== current2 && workInProgress2.child !== current2.child)
  8291. throw Error("Resuming work not yet implemented.");
  8292. if (null !== workInProgress2.child) {
  8293. current2 = workInProgress2.child;
  8294. renderLanes2 = createWorkInProgress(current2, current2.pendingProps);
  8295. workInProgress2.child = renderLanes2;
  8296. for (renderLanes2.return = workInProgress2; null !== current2.sibling; )
  8297. current2 = current2.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current2, current2.pendingProps), renderLanes2.return = workInProgress2;
  8298. renderLanes2.sibling = null;
  8299. }
  8300. return workInProgress2.child;
  8301. }
  8302. function checkScheduledUpdateOrContext(current2, renderLanes2) {
  8303. if (0 !== (current2.lanes & renderLanes2)) return true;
  8304. current2 = current2.dependencies;
  8305. return null !== current2 && checkIfContextChanged(current2) ? true : false;
  8306. }
  8307. function attemptEarlyBailoutIfNoScheduledUpdate(current2, workInProgress2, renderLanes2) {
  8308. switch (workInProgress2.tag) {
  8309. case 3:
  8310. pushHostContainer(
  8311. workInProgress2,
  8312. workInProgress2.stateNode.containerInfo
  8313. );
  8314. pushProvider(
  8315. workInProgress2,
  8316. CacheContext,
  8317. current2.memoizedState.cache
  8318. );
  8319. resetHydrationState();
  8320. break;
  8321. case 27:
  8322. case 5:
  8323. pushHostContext(workInProgress2);
  8324. break;
  8325. case 4:
  8326. pushHostContainer(
  8327. workInProgress2,
  8328. workInProgress2.stateNode.containerInfo
  8329. );
  8330. break;
  8331. case 10:
  8332. pushProvider(
  8333. workInProgress2,
  8334. workInProgress2.type,
  8335. workInProgress2.memoizedProps.value
  8336. );
  8337. break;
  8338. case 12:
  8339. 0 !== (renderLanes2 & workInProgress2.childLanes) && (workInProgress2.flags |= 4);
  8340. workInProgress2.flags |= 2048;
  8341. var stateNode = workInProgress2.stateNode;
  8342. stateNode.effectDuration = -0;
  8343. stateNode.passiveEffectDuration = -0;
  8344. break;
  8345. case 31:
  8346. if (null !== workInProgress2.memoizedState)
  8347. return workInProgress2.flags |= 128, pushDehydratedActivitySuspenseHandler(workInProgress2), null;
  8348. break;
  8349. case 13:
  8350. stateNode = workInProgress2.memoizedState;
  8351. if (null !== stateNode) {
  8352. if (null !== stateNode.dehydrated)
  8353. return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null;
  8354. if (0 !== (renderLanes2 & workInProgress2.child.childLanes))
  8355. return updateSuspenseComponent(
  8356. current2,
  8357. workInProgress2,
  8358. renderLanes2
  8359. );
  8360. pushPrimaryTreeSuspenseHandler(workInProgress2);
  8361. current2 = bailoutOnAlreadyFinishedWork(
  8362. current2,
  8363. workInProgress2,
  8364. renderLanes2
  8365. );
  8366. return null !== current2 ? current2.sibling : null;
  8367. }
  8368. pushPrimaryTreeSuspenseHandler(workInProgress2);
  8369. break;
  8370. case 19:
  8371. var didSuspendBefore = 0 !== (current2.flags & 128);
  8372. stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes);
  8373. stateNode || (propagateParentContextChanges(
  8374. current2,
  8375. workInProgress2,
  8376. renderLanes2,
  8377. false
  8378. ), stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes));
  8379. if (didSuspendBefore) {
  8380. if (stateNode)
  8381. return updateSuspenseListComponent(
  8382. current2,
  8383. workInProgress2,
  8384. renderLanes2
  8385. );
  8386. workInProgress2.flags |= 128;
  8387. }
  8388. didSuspendBefore = workInProgress2.memoizedState;
  8389. null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null);
  8390. push(
  8391. suspenseStackCursor,
  8392. suspenseStackCursor.current,
  8393. workInProgress2
  8394. );
  8395. if (stateNode) break;
  8396. else return null;
  8397. case 22:
  8398. return workInProgress2.lanes = 0, updateOffscreenComponent(
  8399. current2,
  8400. workInProgress2,
  8401. renderLanes2,
  8402. workInProgress2.pendingProps
  8403. );
  8404. case 24:
  8405. pushProvider(
  8406. workInProgress2,
  8407. CacheContext,
  8408. current2.memoizedState.cache
  8409. );
  8410. }
  8411. return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
  8412. }
  8413. function beginWork(current2, workInProgress2, renderLanes2) {
  8414. if (workInProgress2._debugNeedsRemount && null !== current2) {
  8415. renderLanes2 = createFiberFromTypeAndProps(
  8416. workInProgress2.type,
  8417. workInProgress2.key,
  8418. workInProgress2.pendingProps,
  8419. workInProgress2._debugOwner || null,
  8420. workInProgress2.mode,
  8421. workInProgress2.lanes
  8422. );
  8423. renderLanes2._debugStack = workInProgress2._debugStack;
  8424. renderLanes2._debugTask = workInProgress2._debugTask;
  8425. var returnFiber = workInProgress2.return;
  8426. if (null === returnFiber) throw Error("Cannot swap the root fiber.");
  8427. current2.alternate = null;
  8428. workInProgress2.alternate = null;
  8429. renderLanes2.index = workInProgress2.index;
  8430. renderLanes2.sibling = workInProgress2.sibling;
  8431. renderLanes2.return = workInProgress2.return;
  8432. renderLanes2.ref = workInProgress2.ref;
  8433. renderLanes2._debugInfo = workInProgress2._debugInfo;
  8434. if (workInProgress2 === returnFiber.child)
  8435. returnFiber.child = renderLanes2;
  8436. else {
  8437. var prevSibling = returnFiber.child;
  8438. if (null === prevSibling)
  8439. throw Error("Expected parent to have a child.");
  8440. for (; prevSibling.sibling !== workInProgress2; )
  8441. if (prevSibling = prevSibling.sibling, null === prevSibling)
  8442. throw Error("Expected to find the previous sibling.");
  8443. prevSibling.sibling = renderLanes2;
  8444. }
  8445. workInProgress2 = returnFiber.deletions;
  8446. null === workInProgress2 ? (returnFiber.deletions = [current2], returnFiber.flags |= 16) : workInProgress2.push(current2);
  8447. renderLanes2.flags |= 2;
  8448. return renderLanes2;
  8449. }
  8450. if (null !== current2)
  8451. if (current2.memoizedProps !== workInProgress2.pendingProps || workInProgress2.type !== current2.type)
  8452. didReceiveUpdate = true;
  8453. else {
  8454. if (!checkScheduledUpdateOrContext(current2, renderLanes2) && 0 === (workInProgress2.flags & 128))
  8455. return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate(
  8456. current2,
  8457. workInProgress2,
  8458. renderLanes2
  8459. );
  8460. didReceiveUpdate = 0 !== (current2.flags & 131072) ? true : false;
  8461. }
  8462. else {
  8463. didReceiveUpdate = false;
  8464. if (returnFiber = isHydrating)
  8465. warnIfNotHydrating(), returnFiber = 0 !== (workInProgress2.flags & 1048576);
  8466. returnFiber && (returnFiber = workInProgress2.index, warnIfNotHydrating(), pushTreeId(workInProgress2, treeForkCount, returnFiber));
  8467. }
  8468. workInProgress2.lanes = 0;
  8469. switch (workInProgress2.tag) {
  8470. case 16:
  8471. a: if (returnFiber = workInProgress2.pendingProps, current2 = resolveLazy(workInProgress2.elementType), workInProgress2.type = current2, "function" === typeof current2)
  8472. shouldConstruct(current2) ? (returnFiber = resolveClassComponentProps(
  8473. current2,
  8474. returnFiber
  8475. ), workInProgress2.tag = 1, workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateClassComponent(
  8476. null,
  8477. workInProgress2,
  8478. current2,
  8479. returnFiber,
  8480. renderLanes2
  8481. )) : (workInProgress2.tag = 0, validateFunctionComponentInDev(workInProgress2, current2), workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateFunctionComponent(
  8482. null,
  8483. workInProgress2,
  8484. current2,
  8485. returnFiber,
  8486. renderLanes2
  8487. ));
  8488. else {
  8489. if (void 0 !== current2 && null !== current2) {
  8490. if (prevSibling = current2.$$typeof, prevSibling === REACT_FORWARD_REF_TYPE) {
  8491. workInProgress2.tag = 11;
  8492. workInProgress2.type = current2 = resolveForwardRefForHotReloading(current2);
  8493. workInProgress2 = updateForwardRef(
  8494. null,
  8495. workInProgress2,
  8496. current2,
  8497. returnFiber,
  8498. renderLanes2
  8499. );
  8500. break a;
  8501. } else if (prevSibling === REACT_MEMO_TYPE) {
  8502. workInProgress2.tag = 14;
  8503. workInProgress2 = updateMemoComponent(
  8504. null,
  8505. workInProgress2,
  8506. current2,
  8507. returnFiber,
  8508. renderLanes2
  8509. );
  8510. break a;
  8511. }
  8512. }
  8513. workInProgress2 = "";
  8514. null !== current2 && "object" === typeof current2 && current2.$$typeof === REACT_LAZY_TYPE && (workInProgress2 = " Did you wrap a component in React.lazy() more than once?");
  8515. renderLanes2 = getComponentNameFromType(current2) || current2;
  8516. throw Error(
  8517. "Element type is invalid. Received a promise that resolves to: " + renderLanes2 + ". Lazy element type must resolve to a class or function." + workInProgress2
  8518. );
  8519. }
  8520. return workInProgress2;
  8521. case 0:
  8522. return updateFunctionComponent(
  8523. current2,
  8524. workInProgress2,
  8525. workInProgress2.type,
  8526. workInProgress2.pendingProps,
  8527. renderLanes2
  8528. );
  8529. case 1:
  8530. return returnFiber = workInProgress2.type, prevSibling = resolveClassComponentProps(
  8531. returnFiber,
  8532. workInProgress2.pendingProps
  8533. ), updateClassComponent(
  8534. current2,
  8535. workInProgress2,
  8536. returnFiber,
  8537. prevSibling,
  8538. renderLanes2
  8539. );
  8540. case 3:
  8541. a: {
  8542. pushHostContainer(
  8543. workInProgress2,
  8544. workInProgress2.stateNode.containerInfo
  8545. );
  8546. if (null === current2)
  8547. throw Error(
  8548. "Should have a current fiber. This is a bug in React."
  8549. );
  8550. returnFiber = workInProgress2.pendingProps;
  8551. var prevState = workInProgress2.memoizedState;
  8552. prevSibling = prevState.element;
  8553. cloneUpdateQueue(current2, workInProgress2);
  8554. processUpdateQueue(workInProgress2, returnFiber, null, renderLanes2);
  8555. var nextState = workInProgress2.memoizedState;
  8556. returnFiber = nextState.cache;
  8557. pushProvider(workInProgress2, CacheContext, returnFiber);
  8558. returnFiber !== prevState.cache && propagateContextChanges(
  8559. workInProgress2,
  8560. [CacheContext],
  8561. renderLanes2,
  8562. true
  8563. );
  8564. suspendIfUpdateReadFromEntangledAsyncAction();
  8565. returnFiber = nextState.element;
  8566. if (prevState.isDehydrated)
  8567. if (prevState = {
  8568. element: returnFiber,
  8569. isDehydrated: false,
  8570. cache: nextState.cache
  8571. }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) {
  8572. workInProgress2 = mountHostRootWithoutHydrating(
  8573. current2,
  8574. workInProgress2,
  8575. returnFiber,
  8576. renderLanes2
  8577. );
  8578. break a;
  8579. } else if (returnFiber !== prevSibling) {
  8580. prevSibling = createCapturedValueAtFiber(
  8581. Error(
  8582. "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."
  8583. ),
  8584. workInProgress2
  8585. );
  8586. queueHydrationError(prevSibling);
  8587. workInProgress2 = mountHostRootWithoutHydrating(
  8588. current2,
  8589. workInProgress2,
  8590. returnFiber,
  8591. renderLanes2
  8592. );
  8593. break a;
  8594. } else {
  8595. current2 = workInProgress2.stateNode.containerInfo;
  8596. switch (current2.nodeType) {
  8597. case 9:
  8598. current2 = current2.body;
  8599. break;
  8600. default:
  8601. current2 = "HTML" === current2.nodeName ? current2.ownerDocument.body : current2;
  8602. }
  8603. nextHydratableInstance = getNextHydratable(current2.firstChild);
  8604. hydrationParentFiber = workInProgress2;
  8605. isHydrating = true;
  8606. hydrationErrors = null;
  8607. didSuspendOrErrorDEV = false;
  8608. hydrationDiffRootDEV = null;
  8609. rootOrSingletonContext = true;
  8610. renderLanes2 = mountChildFibers(
  8611. workInProgress2,
  8612. null,
  8613. returnFiber,
  8614. renderLanes2
  8615. );
  8616. for (workInProgress2.child = renderLanes2; renderLanes2; )
  8617. renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling;
  8618. }
  8619. else {
  8620. resetHydrationState();
  8621. if (returnFiber === prevSibling) {
  8622. workInProgress2 = bailoutOnAlreadyFinishedWork(
  8623. current2,
  8624. workInProgress2,
  8625. renderLanes2
  8626. );
  8627. break a;
  8628. }
  8629. reconcileChildren(
  8630. current2,
  8631. workInProgress2,
  8632. returnFiber,
  8633. renderLanes2
  8634. );
  8635. }
  8636. workInProgress2 = workInProgress2.child;
  8637. }
  8638. return workInProgress2;
  8639. case 26:
  8640. return markRef(current2, workInProgress2), null === current2 ? (renderLanes2 = getResource(
  8641. workInProgress2.type,
  8642. null,
  8643. workInProgress2.pendingProps,
  8644. null
  8645. )) ? workInProgress2.memoizedState = renderLanes2 : isHydrating || (renderLanes2 = workInProgress2.type, current2 = workInProgress2.pendingProps, returnFiber = requiredContext(
  8646. rootInstanceStackCursor.current
  8647. ), returnFiber = getOwnerDocumentFromRootContainer(
  8648. returnFiber
  8649. ).createElement(renderLanes2), returnFiber[internalInstanceKey] = workInProgress2, returnFiber[internalPropsKey] = current2, setInitialProperties(returnFiber, renderLanes2, current2), markNodeAsHoistable(returnFiber), workInProgress2.stateNode = returnFiber) : workInProgress2.memoizedState = getResource(
  8650. workInProgress2.type,
  8651. current2.memoizedProps,
  8652. workInProgress2.pendingProps,
  8653. current2.memoizedState
  8654. ), null;
  8655. case 27:
  8656. return pushHostContext(workInProgress2), null === current2 && isHydrating && (returnFiber = requiredContext(rootInstanceStackCursor.current), prevSibling = getHostContext(), returnFiber = workInProgress2.stateNode = resolveSingletonInstance(
  8657. workInProgress2.type,
  8658. workInProgress2.pendingProps,
  8659. returnFiber,
  8660. prevSibling,
  8661. false
  8662. ), didSuspendOrErrorDEV || (prevSibling = diffHydratedProperties(
  8663. returnFiber,
  8664. workInProgress2.type,
  8665. workInProgress2.pendingProps,
  8666. prevSibling
  8667. ), null !== prevSibling && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevSibling)), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, prevSibling = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = prevSibling, nextHydratableInstance = getNextHydratable(
  8668. returnFiber.firstChild
  8669. )) : nextHydratableInstance = prevSibling), reconcileChildren(
  8670. current2,
  8671. workInProgress2,
  8672. workInProgress2.pendingProps.children,
  8673. renderLanes2
  8674. ), markRef(current2, workInProgress2), null === current2 && (workInProgress2.flags |= 4194304), workInProgress2.child;
  8675. case 5:
  8676. return null === current2 && isHydrating && (prevState = getHostContext(), returnFiber = validateDOMNesting(
  8677. workInProgress2.type,
  8678. prevState.ancestorInfo
  8679. ), prevSibling = nextHydratableInstance, (nextState = !prevSibling) || (nextState = canHydrateInstance(
  8680. prevSibling,
  8681. workInProgress2.type,
  8682. workInProgress2.pendingProps,
  8683. rootOrSingletonContext
  8684. ), null !== nextState ? (workInProgress2.stateNode = nextState, didSuspendOrErrorDEV || (prevState = diffHydratedProperties(
  8685. nextState,
  8686. workInProgress2.type,
  8687. workInProgress2.pendingProps,
  8688. prevState
  8689. ), null !== prevState && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevState)), hydrationParentFiber = workInProgress2, nextHydratableInstance = getNextHydratable(
  8690. nextState.firstChild
  8691. ), rootOrSingletonContext = false, prevState = true) : prevState = false, nextState = !prevState), nextState && (returnFiber && warnNonHydratedInstance(workInProgress2, prevSibling), throwOnHydrationMismatch(workInProgress2))), pushHostContext(workInProgress2), prevSibling = workInProgress2.type, prevState = workInProgress2.pendingProps, nextState = null !== current2 ? current2.memoizedProps : null, returnFiber = prevState.children, shouldSetTextContent(prevSibling, prevState) ? returnFiber = null : null !== nextState && shouldSetTextContent(prevSibling, nextState) && (workInProgress2.flags |= 32), null !== workInProgress2.memoizedState && (prevSibling = renderWithHooks(
  8692. current2,
  8693. workInProgress2,
  8694. TransitionAwareHostComponent,
  8695. null,
  8696. null,
  8697. renderLanes2
  8698. ), HostTransitionContext._currentValue = prevSibling), markRef(current2, workInProgress2), reconcileChildren(
  8699. current2,
  8700. workInProgress2,
  8701. returnFiber,
  8702. renderLanes2
  8703. ), workInProgress2.child;
  8704. case 6:
  8705. return null === current2 && isHydrating && (renderLanes2 = workInProgress2.pendingProps, current2 = getHostContext(), returnFiber = current2.ancestorInfo.current, renderLanes2 = null != returnFiber ? validateTextNesting(
  8706. renderLanes2,
  8707. returnFiber.tag,
  8708. current2.ancestorInfo.implicitRootScope
  8709. ) : true, current2 = nextHydratableInstance, (returnFiber = !current2) || (returnFiber = canHydrateTextInstance(
  8710. current2,
  8711. workInProgress2.pendingProps,
  8712. rootOrSingletonContext
  8713. ), null !== returnFiber ? (workInProgress2.stateNode = returnFiber, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, returnFiber = true) : returnFiber = false, returnFiber = !returnFiber), returnFiber && (renderLanes2 && warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2))), null;
  8714. case 13:
  8715. return updateSuspenseComponent(current2, workInProgress2, renderLanes2);
  8716. case 4:
  8717. return pushHostContainer(
  8718. workInProgress2,
  8719. workInProgress2.stateNode.containerInfo
  8720. ), returnFiber = workInProgress2.pendingProps, null === current2 ? workInProgress2.child = reconcileChildFibers(
  8721. workInProgress2,
  8722. null,
  8723. returnFiber,
  8724. renderLanes2
  8725. ) : reconcileChildren(
  8726. current2,
  8727. workInProgress2,
  8728. returnFiber,
  8729. renderLanes2
  8730. ), workInProgress2.child;
  8731. case 11:
  8732. return updateForwardRef(
  8733. current2,
  8734. workInProgress2,
  8735. workInProgress2.type,
  8736. workInProgress2.pendingProps,
  8737. renderLanes2
  8738. );
  8739. case 7:
  8740. return reconcileChildren(
  8741. current2,
  8742. workInProgress2,
  8743. workInProgress2.pendingProps,
  8744. renderLanes2
  8745. ), workInProgress2.child;
  8746. case 8:
  8747. return reconcileChildren(
  8748. current2,
  8749. workInProgress2,
  8750. workInProgress2.pendingProps.children,
  8751. renderLanes2
  8752. ), workInProgress2.child;
  8753. case 12:
  8754. return workInProgress2.flags |= 4, workInProgress2.flags |= 2048, returnFiber = workInProgress2.stateNode, returnFiber.effectDuration = -0, returnFiber.passiveEffectDuration = -0, reconcileChildren(
  8755. current2,
  8756. workInProgress2,
  8757. workInProgress2.pendingProps.children,
  8758. renderLanes2
  8759. ), workInProgress2.child;
  8760. case 10:
  8761. return returnFiber = workInProgress2.type, prevSibling = workInProgress2.pendingProps, prevState = prevSibling.value, "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || (hasWarnedAboutUsingNoValuePropOnContextProvider = true, console.error(
  8762. "The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
  8763. )), pushProvider(workInProgress2, returnFiber, prevState), reconcileChildren(
  8764. current2,
  8765. workInProgress2,
  8766. prevSibling.children,
  8767. renderLanes2
  8768. ), workInProgress2.child;
  8769. case 9:
  8770. return prevSibling = workInProgress2.type._context, returnFiber = workInProgress2.pendingProps.children, "function" !== typeof returnFiber && console.error(
  8771. "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
  8772. ), prepareToReadContext(workInProgress2), prevSibling = readContext(prevSibling), returnFiber = callComponentInDEV(
  8773. returnFiber,
  8774. prevSibling,
  8775. void 0
  8776. ), workInProgress2.flags |= 1, reconcileChildren(
  8777. current2,
  8778. workInProgress2,
  8779. returnFiber,
  8780. renderLanes2
  8781. ), workInProgress2.child;
  8782. case 14:
  8783. return updateMemoComponent(
  8784. current2,
  8785. workInProgress2,
  8786. workInProgress2.type,
  8787. workInProgress2.pendingProps,
  8788. renderLanes2
  8789. );
  8790. case 15:
  8791. return updateSimpleMemoComponent(
  8792. current2,
  8793. workInProgress2,
  8794. workInProgress2.type,
  8795. workInProgress2.pendingProps,
  8796. renderLanes2
  8797. );
  8798. case 19:
  8799. return updateSuspenseListComponent(
  8800. current2,
  8801. workInProgress2,
  8802. renderLanes2
  8803. );
  8804. case 31:
  8805. return updateActivityComponent(current2, workInProgress2, renderLanes2);
  8806. case 22:
  8807. return updateOffscreenComponent(
  8808. current2,
  8809. workInProgress2,
  8810. renderLanes2,
  8811. workInProgress2.pendingProps
  8812. );
  8813. case 24:
  8814. return prepareToReadContext(workInProgress2), returnFiber = readContext(CacheContext), null === current2 ? (prevSibling = peekCacheFromPool(), null === prevSibling && (prevSibling = workInProgressRoot, prevState = createCache(), prevSibling.pooledCache = prevState, retainCache(prevState), null !== prevState && (prevSibling.pooledCacheLanes |= renderLanes2), prevSibling = prevState), workInProgress2.memoizedState = {
  8815. parent: returnFiber,
  8816. cache: prevSibling
  8817. }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, prevSibling)) : (0 !== (current2.lanes & renderLanes2) && (cloneUpdateQueue(current2, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), prevSibling = current2.memoizedState, prevState = workInProgress2.memoizedState, prevSibling.parent !== returnFiber ? (prevSibling = {
  8818. parent: returnFiber,
  8819. cache: returnFiber
  8820. }, workInProgress2.memoizedState = prevSibling, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = prevSibling), pushProvider(workInProgress2, CacheContext, returnFiber)) : (returnFiber = prevState.cache, pushProvider(workInProgress2, CacheContext, returnFiber), returnFiber !== prevSibling.cache && propagateContextChanges(
  8821. workInProgress2,
  8822. [CacheContext],
  8823. renderLanes2,
  8824. true
  8825. ))), reconcileChildren(
  8826. current2,
  8827. workInProgress2,
  8828. workInProgress2.pendingProps.children,
  8829. renderLanes2
  8830. ), workInProgress2.child;
  8831. case 29:
  8832. throw workInProgress2.pendingProps;
  8833. }
  8834. throw Error(
  8835. "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
  8836. );
  8837. }
  8838. function markUpdate(workInProgress2) {
  8839. workInProgress2.flags |= 4;
  8840. }
  8841. function preloadInstanceAndSuspendIfNeeded(workInProgress2, type, oldProps, newProps, renderLanes2) {
  8842. if (type = (workInProgress2.mode & SuspenseyImagesMode) !== NoMode)
  8843. type = false;
  8844. if (type) {
  8845. if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2)
  8846. if (workInProgress2.stateNode.complete) workInProgress2.flags |= 8192;
  8847. else if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
  8848. else
  8849. throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
  8850. } else workInProgress2.flags &= -16777217;
  8851. }
  8852. function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
  8853. if ("stylesheet" !== resource.type || (resource.state.loading & Inserted) !== NotLoaded)
  8854. workInProgress2.flags &= -16777217;
  8855. else if (workInProgress2.flags |= 16777216, !preloadResource(resource))
  8856. if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
  8857. else
  8858. throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
  8859. }
  8860. function scheduleRetryEffect(workInProgress2, retryQueue) {
  8861. null !== retryQueue && (workInProgress2.flags |= 4);
  8862. workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
  8863. }
  8864. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  8865. if (!isHydrating)
  8866. switch (renderState.tailMode) {
  8867. case "hidden":
  8868. hasRenderedATailFallback = renderState.tail;
  8869. for (var lastTailNode = null; null !== hasRenderedATailFallback; )
  8870. null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
  8871. null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
  8872. break;
  8873. case "collapsed":
  8874. lastTailNode = renderState.tail;
  8875. for (var _lastTailNode = null; null !== lastTailNode; )
  8876. null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), lastTailNode = lastTailNode.sibling;
  8877. null === _lastTailNode ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : _lastTailNode.sibling = null;
  8878. }
  8879. }
  8880. function bubbleProperties(completedWork) {
  8881. var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
  8882. if (didBailout)
  8883. if ((completedWork.mode & ProfileMode) !== NoMode) {
  8884. for (var _treeBaseDuration = completedWork.selfBaseDuration, _child2 = completedWork.child; null !== _child2; )
  8885. newChildLanes |= _child2.lanes | _child2.childLanes, subtreeFlags |= _child2.subtreeFlags & 65011712, subtreeFlags |= _child2.flags & 65011712, _treeBaseDuration += _child2.treeBaseDuration, _child2 = _child2.sibling;
  8886. completedWork.treeBaseDuration = _treeBaseDuration;
  8887. } else
  8888. for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
  8889. newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712, subtreeFlags |= _treeBaseDuration.flags & 65011712, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
  8890. else if ((completedWork.mode & ProfileMode) !== NoMode) {
  8891. _treeBaseDuration = completedWork.actualDuration;
  8892. _child2 = completedWork.selfBaseDuration;
  8893. for (var child = completedWork.child; null !== child; )
  8894. newChildLanes |= child.lanes | child.childLanes, subtreeFlags |= child.subtreeFlags, subtreeFlags |= child.flags, _treeBaseDuration += child.actualDuration, _child2 += child.treeBaseDuration, child = child.sibling;
  8895. completedWork.actualDuration = _treeBaseDuration;
  8896. completedWork.treeBaseDuration = _child2;
  8897. } else
  8898. for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
  8899. newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags, subtreeFlags |= _treeBaseDuration.flags, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
  8900. completedWork.subtreeFlags |= subtreeFlags;
  8901. completedWork.childLanes = newChildLanes;
  8902. return didBailout;
  8903. }
  8904. function completeWork(current2, workInProgress2, renderLanes2) {
  8905. var newProps = workInProgress2.pendingProps;
  8906. popTreeContext(workInProgress2);
  8907. switch (workInProgress2.tag) {
  8908. case 16:
  8909. case 15:
  8910. case 0:
  8911. case 11:
  8912. case 7:
  8913. case 8:
  8914. case 12:
  8915. case 9:
  8916. case 14:
  8917. return bubbleProperties(workInProgress2), null;
  8918. case 1:
  8919. return bubbleProperties(workInProgress2), null;
  8920. case 3:
  8921. renderLanes2 = workInProgress2.stateNode;
  8922. newProps = null;
  8923. null !== current2 && (newProps = current2.memoizedState.cache);
  8924. workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048);
  8925. popProvider(CacheContext, workInProgress2);
  8926. popHostContainer(workInProgress2);
  8927. renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null);
  8928. if (null === current2 || null === current2.child)
  8929. popHydrationState(workInProgress2) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress2)) : null === current2 || current2.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable());
  8930. bubbleProperties(workInProgress2);
  8931. return null;
  8932. case 26:
  8933. var type = workInProgress2.type, nextResource = workInProgress2.memoizedState;
  8934. null === current2 ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
  8935. workInProgress2,
  8936. nextResource
  8937. )) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
  8938. workInProgress2,
  8939. type,
  8940. null,
  8941. newProps,
  8942. renderLanes2
  8943. ))) : nextResource ? nextResource !== current2.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
  8944. workInProgress2,
  8945. nextResource
  8946. )) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current2 = current2.memoizedProps, current2 !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
  8947. workInProgress2,
  8948. type,
  8949. current2,
  8950. newProps,
  8951. renderLanes2
  8952. ));
  8953. return null;
  8954. case 27:
  8955. popHostContext(workInProgress2);
  8956. renderLanes2 = requiredContext(rootInstanceStackCursor.current);
  8957. type = workInProgress2.type;
  8958. if (null !== current2 && null != workInProgress2.stateNode)
  8959. current2.memoizedProps !== newProps && markUpdate(workInProgress2);
  8960. else {
  8961. if (!newProps) {
  8962. if (null === workInProgress2.stateNode)
  8963. throw Error(
  8964. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  8965. );
  8966. bubbleProperties(workInProgress2);
  8967. return null;
  8968. }
  8969. current2 = getHostContext();
  8970. popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (current2 = resolveSingletonInstance(
  8971. type,
  8972. newProps,
  8973. renderLanes2,
  8974. current2,
  8975. true
  8976. ), workInProgress2.stateNode = current2, markUpdate(workInProgress2));
  8977. }
  8978. bubbleProperties(workInProgress2);
  8979. return null;
  8980. case 5:
  8981. popHostContext(workInProgress2);
  8982. type = workInProgress2.type;
  8983. if (null !== current2 && null != workInProgress2.stateNode)
  8984. current2.memoizedProps !== newProps && markUpdate(workInProgress2);
  8985. else {
  8986. if (!newProps) {
  8987. if (null === workInProgress2.stateNode)
  8988. throw Error(
  8989. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  8990. );
  8991. bubbleProperties(workInProgress2);
  8992. return null;
  8993. }
  8994. var _currentHostContext = getHostContext();
  8995. if (popHydrationState(workInProgress2))
  8996. prepareToHydrateHostInstance(workInProgress2, _currentHostContext);
  8997. else {
  8998. nextResource = requiredContext(rootInstanceStackCursor.current);
  8999. validateDOMNesting(type, _currentHostContext.ancestorInfo);
  9000. _currentHostContext = _currentHostContext.context;
  9001. nextResource = getOwnerDocumentFromRootContainer(nextResource);
  9002. switch (_currentHostContext) {
  9003. case HostContextNamespaceSvg:
  9004. nextResource = nextResource.createElementNS(
  9005. SVG_NAMESPACE,
  9006. type
  9007. );
  9008. break;
  9009. case HostContextNamespaceMath:
  9010. nextResource = nextResource.createElementNS(
  9011. MATH_NAMESPACE,
  9012. type
  9013. );
  9014. break;
  9015. default:
  9016. switch (type) {
  9017. case "svg":
  9018. nextResource = nextResource.createElementNS(
  9019. SVG_NAMESPACE,
  9020. type
  9021. );
  9022. break;
  9023. case "math":
  9024. nextResource = nextResource.createElementNS(
  9025. MATH_NAMESPACE,
  9026. type
  9027. );
  9028. break;
  9029. case "script":
  9030. nextResource = nextResource.createElement("div");
  9031. nextResource.innerHTML = "<script><\/script>";
  9032. nextResource = nextResource.removeChild(
  9033. nextResource.firstChild
  9034. );
  9035. break;
  9036. case "select":
  9037. nextResource = "string" === typeof newProps.is ? nextResource.createElement("select", {
  9038. is: newProps.is
  9039. }) : nextResource.createElement("select");
  9040. newProps.multiple ? nextResource.multiple = true : newProps.size && (nextResource.size = newProps.size);
  9041. break;
  9042. default:
  9043. nextResource = "string" === typeof newProps.is ? nextResource.createElement(type, {
  9044. is: newProps.is
  9045. }) : nextResource.createElement(type), -1 === type.indexOf("-") && (type !== type.toLowerCase() && console.error(
  9046. "<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
  9047. type
  9048. ), "[object HTMLUnknownElement]" !== Object.prototype.toString.call(nextResource) || hasOwnProperty.call(warnedUnknownTags, type) || (warnedUnknownTags[type] = true, console.error(
  9049. "The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",
  9050. type
  9051. )));
  9052. }
  9053. }
  9054. nextResource[internalInstanceKey] = workInProgress2;
  9055. nextResource[internalPropsKey] = newProps;
  9056. a: for (_currentHostContext = workInProgress2.child; null !== _currentHostContext; ) {
  9057. if (5 === _currentHostContext.tag || 6 === _currentHostContext.tag)
  9058. nextResource.appendChild(_currentHostContext.stateNode);
  9059. else if (4 !== _currentHostContext.tag && 27 !== _currentHostContext.tag && null !== _currentHostContext.child) {
  9060. _currentHostContext.child.return = _currentHostContext;
  9061. _currentHostContext = _currentHostContext.child;
  9062. continue;
  9063. }
  9064. if (_currentHostContext === workInProgress2) break a;
  9065. for (; null === _currentHostContext.sibling; ) {
  9066. if (null === _currentHostContext.return || _currentHostContext.return === workInProgress2)
  9067. break a;
  9068. _currentHostContext = _currentHostContext.return;
  9069. }
  9070. _currentHostContext.sibling.return = _currentHostContext.return;
  9071. _currentHostContext = _currentHostContext.sibling;
  9072. }
  9073. workInProgress2.stateNode = nextResource;
  9074. a: switch (setInitialProperties(nextResource, type, newProps), type) {
  9075. case "button":
  9076. case "input":
  9077. case "select":
  9078. case "textarea":
  9079. newProps = !!newProps.autoFocus;
  9080. break a;
  9081. case "img":
  9082. newProps = true;
  9083. break a;
  9084. default:
  9085. newProps = false;
  9086. }
  9087. newProps && markUpdate(workInProgress2);
  9088. }
  9089. }
  9090. bubbleProperties(workInProgress2);
  9091. preloadInstanceAndSuspendIfNeeded(
  9092. workInProgress2,
  9093. workInProgress2.type,
  9094. null === current2 ? null : current2.memoizedProps,
  9095. workInProgress2.pendingProps,
  9096. renderLanes2
  9097. );
  9098. return null;
  9099. case 6:
  9100. if (current2 && null != workInProgress2.stateNode)
  9101. current2.memoizedProps !== newProps && markUpdate(workInProgress2);
  9102. else {
  9103. if ("string" !== typeof newProps && null === workInProgress2.stateNode)
  9104. throw Error(
  9105. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  9106. );
  9107. current2 = requiredContext(rootInstanceStackCursor.current);
  9108. renderLanes2 = getHostContext();
  9109. if (popHydrationState(workInProgress2)) {
  9110. current2 = workInProgress2.stateNode;
  9111. renderLanes2 = workInProgress2.memoizedProps;
  9112. type = !didSuspendOrErrorDEV;
  9113. newProps = null;
  9114. nextResource = hydrationParentFiber;
  9115. if (null !== nextResource)
  9116. switch (nextResource.tag) {
  9117. case 3:
  9118. type && (type = diffHydratedTextForDevWarnings(
  9119. current2,
  9120. renderLanes2,
  9121. newProps
  9122. ), null !== type && (buildHydrationDiffNode(workInProgress2, 0).serverProps = type));
  9123. break;
  9124. case 27:
  9125. case 5:
  9126. newProps = nextResource.memoizedProps, type && (type = diffHydratedTextForDevWarnings(
  9127. current2,
  9128. renderLanes2,
  9129. newProps
  9130. ), null !== type && (buildHydrationDiffNode(
  9131. workInProgress2,
  9132. 0
  9133. ).serverProps = type));
  9134. }
  9135. current2[internalInstanceKey] = workInProgress2;
  9136. current2 = current2.nodeValue === renderLanes2 || null !== newProps && true === newProps.suppressHydrationWarning || checkForUnmatchedText(current2.nodeValue, renderLanes2) ? true : false;
  9137. current2 || throwOnHydrationMismatch(workInProgress2, true);
  9138. } else
  9139. type = renderLanes2.ancestorInfo.current, null != type && validateTextNesting(
  9140. newProps,
  9141. type.tag,
  9142. renderLanes2.ancestorInfo.implicitRootScope
  9143. ), current2 = getOwnerDocumentFromRootContainer(current2).createTextNode(
  9144. newProps
  9145. ), current2[internalInstanceKey] = workInProgress2, workInProgress2.stateNode = current2;
  9146. }
  9147. bubbleProperties(workInProgress2);
  9148. return null;
  9149. case 31:
  9150. renderLanes2 = workInProgress2.memoizedState;
  9151. if (null === current2 || null !== current2.memoizedState) {
  9152. newProps = popHydrationState(workInProgress2);
  9153. if (null !== renderLanes2) {
  9154. if (null === current2) {
  9155. if (!newProps)
  9156. throw Error(
  9157. "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
  9158. );
  9159. current2 = workInProgress2.memoizedState;
  9160. current2 = null !== current2 ? current2.dehydrated : null;
  9161. if (!current2)
  9162. throw Error(
  9163. "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue."
  9164. );
  9165. current2[internalInstanceKey] = workInProgress2;
  9166. bubbleProperties(workInProgress2);
  9167. (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
  9168. } else
  9169. emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (renderLanes2 = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
  9170. current2 = false;
  9171. } else
  9172. renderLanes2 = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = renderLanes2), current2 = true;
  9173. if (!current2) {
  9174. if (workInProgress2.flags & 256)
  9175. return popSuspenseHandler(workInProgress2), workInProgress2;
  9176. popSuspenseHandler(workInProgress2);
  9177. return null;
  9178. }
  9179. if (0 !== (workInProgress2.flags & 128))
  9180. throw Error(
  9181. "Client rendering an Activity suspended it again. This is a bug in React."
  9182. );
  9183. }
  9184. bubbleProperties(workInProgress2);
  9185. return null;
  9186. case 13:
  9187. newProps = workInProgress2.memoizedState;
  9188. if (null === current2 || null !== current2.memoizedState && null !== current2.memoizedState.dehydrated) {
  9189. type = newProps;
  9190. nextResource = popHydrationState(workInProgress2);
  9191. if (null !== type && null !== type.dehydrated) {
  9192. if (null === current2) {
  9193. if (!nextResource)
  9194. throw Error(
  9195. "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
  9196. );
  9197. nextResource = workInProgress2.memoizedState;
  9198. nextResource = null !== nextResource ? nextResource.dehydrated : null;
  9199. if (!nextResource)
  9200. throw Error(
  9201. "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
  9202. );
  9203. nextResource[internalInstanceKey] = workInProgress2;
  9204. bubbleProperties(workInProgress2);
  9205. (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
  9206. } else
  9207. emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (type = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
  9208. type = false;
  9209. } else
  9210. type = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = type), type = true;
  9211. if (!type) {
  9212. if (workInProgress2.flags & 256)
  9213. return popSuspenseHandler(workInProgress2), workInProgress2;
  9214. popSuspenseHandler(workInProgress2);
  9215. return null;
  9216. }
  9217. }
  9218. popSuspenseHandler(workInProgress2);
  9219. if (0 !== (workInProgress2.flags & 128))
  9220. return workInProgress2.lanes = renderLanes2, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2;
  9221. renderLanes2 = null !== newProps;
  9222. current2 = null !== current2 && null !== current2.memoizedState;
  9223. renderLanes2 && (newProps = workInProgress2.child, type = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type && (newProps.flags |= 2048));
  9224. renderLanes2 !== current2 && renderLanes2 && (workInProgress2.child.flags |= 8192);
  9225. scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
  9226. bubbleProperties(workInProgress2);
  9227. (workInProgress2.mode & ProfileMode) !== NoMode && renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
  9228. return null;
  9229. case 4:
  9230. return popHostContainer(workInProgress2), null === current2 && listenToAllSupportedEvents(
  9231. workInProgress2.stateNode.containerInfo
  9232. ), bubbleProperties(workInProgress2), null;
  9233. case 10:
  9234. return popProvider(workInProgress2.type, workInProgress2), bubbleProperties(workInProgress2), null;
  9235. case 19:
  9236. pop(suspenseStackCursor, workInProgress2);
  9237. newProps = workInProgress2.memoizedState;
  9238. if (null === newProps) return bubbleProperties(workInProgress2), null;
  9239. type = 0 !== (workInProgress2.flags & 128);
  9240. nextResource = newProps.rendering;
  9241. if (null === nextResource)
  9242. if (type) cutOffTailIfNeeded(newProps, false);
  9243. else {
  9244. if (workInProgressRootExitStatus !== RootInProgress || null !== current2 && 0 !== (current2.flags & 128))
  9245. for (current2 = workInProgress2.child; null !== current2; ) {
  9246. nextResource = findFirstSuspended(current2);
  9247. if (null !== nextResource) {
  9248. workInProgress2.flags |= 128;
  9249. cutOffTailIfNeeded(newProps, false);
  9250. current2 = nextResource.updateQueue;
  9251. workInProgress2.updateQueue = current2;
  9252. scheduleRetryEffect(workInProgress2, current2);
  9253. workInProgress2.subtreeFlags = 0;
  9254. current2 = renderLanes2;
  9255. for (renderLanes2 = workInProgress2.child; null !== renderLanes2; )
  9256. resetWorkInProgress(renderLanes2, current2), renderLanes2 = renderLanes2.sibling;
  9257. push(
  9258. suspenseStackCursor,
  9259. suspenseStackCursor.current & SubtreeSuspenseContextMask | ForceSuspenseFallback,
  9260. workInProgress2
  9261. );
  9262. isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount);
  9263. return workInProgress2.child;
  9264. }
  9265. current2 = current2.sibling;
  9266. }
  9267. null !== newProps.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
  9268. }
  9269. else {
  9270. if (!type)
  9271. if (current2 = findFirstSuspended(nextResource), null !== current2) {
  9272. if (workInProgress2.flags |= 128, type = true, current2 = current2.updateQueue, workInProgress2.updateQueue = current2, scheduleRetryEffect(workInProgress2, current2), cutOffTailIfNeeded(newProps, true), null === newProps.tail && "hidden" === newProps.tailMode && !nextResource.alternate && !isHydrating)
  9273. return bubbleProperties(workInProgress2), null;
  9274. } else
  9275. 2 * now$1() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
  9276. newProps.isBackwards ? (nextResource.sibling = workInProgress2.child, workInProgress2.child = nextResource) : (current2 = newProps.last, null !== current2 ? current2.sibling = nextResource : workInProgress2.child = nextResource, newProps.last = nextResource);
  9277. }
  9278. if (null !== newProps.tail)
  9279. return current2 = newProps.tail, newProps.rendering = current2, newProps.tail = current2.sibling, newProps.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 = type ? renderLanes2 & SubtreeSuspenseContextMask | ForceSuspenseFallback : renderLanes2 & SubtreeSuspenseContextMask, push(suspenseStackCursor, renderLanes2, workInProgress2), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), current2;
  9280. bubbleProperties(workInProgress2);
  9281. return null;
  9282. case 22:
  9283. case 23:
  9284. return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), newProps = null !== workInProgress2.memoizedState, null !== current2 ? null !== current2.memoizedState !== newProps && (workInProgress2.flags |= 8192) : newProps && (workInProgress2.flags |= 8192), newProps ? 0 !== (renderLanes2 & 536870912) && 0 === (workInProgress2.flags & 128) && (bubbleProperties(workInProgress2), workInProgress2.subtreeFlags & 6 && (workInProgress2.flags |= 8192)) : bubbleProperties(workInProgress2), renderLanes2 = workInProgress2.updateQueue, null !== renderLanes2 && scheduleRetryEffect(workInProgress2, renderLanes2.retryQueue), renderLanes2 = null, null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (renderLanes2 = current2.memoizedState.cachePool.pool), newProps = null, null !== workInProgress2.memoizedState && null !== workInProgress2.memoizedState.cachePool && (newProps = workInProgress2.memoizedState.cachePool.pool), newProps !== renderLanes2 && (workInProgress2.flags |= 2048), null !== current2 && pop(resumedCache, workInProgress2), null;
  9285. case 24:
  9286. return renderLanes2 = null, null !== current2 && (renderLanes2 = current2.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext, workInProgress2), bubbleProperties(workInProgress2), null;
  9287. case 25:
  9288. return null;
  9289. case 30:
  9290. return null;
  9291. }
  9292. throw Error(
  9293. "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
  9294. );
  9295. }
  9296. function unwindWork(current2, workInProgress2) {
  9297. popTreeContext(workInProgress2);
  9298. switch (workInProgress2.tag) {
  9299. case 1:
  9300. return current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
  9301. case 3:
  9302. return popProvider(CacheContext, workInProgress2), popHostContainer(workInProgress2), current2 = workInProgress2.flags, 0 !== (current2 & 65536) && 0 === (current2 & 128) ? (workInProgress2.flags = current2 & -65537 | 128, workInProgress2) : null;
  9303. case 26:
  9304. case 27:
  9305. case 5:
  9306. return popHostContext(workInProgress2), null;
  9307. case 31:
  9308. if (null !== workInProgress2.memoizedState) {
  9309. popSuspenseHandler(workInProgress2);
  9310. if (null === workInProgress2.alternate)
  9311. throw Error(
  9312. "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
  9313. );
  9314. resetHydrationState();
  9315. }
  9316. current2 = workInProgress2.flags;
  9317. return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
  9318. case 13:
  9319. popSuspenseHandler(workInProgress2);
  9320. current2 = workInProgress2.memoizedState;
  9321. if (null !== current2 && null !== current2.dehydrated) {
  9322. if (null === workInProgress2.alternate)
  9323. throw Error(
  9324. "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
  9325. );
  9326. resetHydrationState();
  9327. }
  9328. current2 = workInProgress2.flags;
  9329. return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
  9330. case 19:
  9331. return pop(suspenseStackCursor, workInProgress2), null;
  9332. case 4:
  9333. return popHostContainer(workInProgress2), null;
  9334. case 10:
  9335. return popProvider(workInProgress2.type, workInProgress2), null;
  9336. case 22:
  9337. case 23:
  9338. return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), null !== current2 && pop(resumedCache, workInProgress2), current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
  9339. case 24:
  9340. return popProvider(CacheContext, workInProgress2), null;
  9341. case 25:
  9342. return null;
  9343. default:
  9344. return null;
  9345. }
  9346. }
  9347. function unwindInterruptedWork(current2, interruptedWork) {
  9348. popTreeContext(interruptedWork);
  9349. switch (interruptedWork.tag) {
  9350. case 3:
  9351. popProvider(CacheContext, interruptedWork);
  9352. popHostContainer(interruptedWork);
  9353. break;
  9354. case 26:
  9355. case 27:
  9356. case 5:
  9357. popHostContext(interruptedWork);
  9358. break;
  9359. case 4:
  9360. popHostContainer(interruptedWork);
  9361. break;
  9362. case 31:
  9363. null !== interruptedWork.memoizedState && popSuspenseHandler(interruptedWork);
  9364. break;
  9365. case 13:
  9366. popSuspenseHandler(interruptedWork);
  9367. break;
  9368. case 19:
  9369. pop(suspenseStackCursor, interruptedWork);
  9370. break;
  9371. case 10:
  9372. popProvider(interruptedWork.type, interruptedWork);
  9373. break;
  9374. case 22:
  9375. case 23:
  9376. popSuspenseHandler(interruptedWork);
  9377. popHiddenContext(interruptedWork);
  9378. null !== current2 && pop(resumedCache, interruptedWork);
  9379. break;
  9380. case 24:
  9381. popProvider(CacheContext, interruptedWork);
  9382. }
  9383. }
  9384. function shouldProfile(current2) {
  9385. return (current2.mode & ProfileMode) !== NoMode;
  9386. }
  9387. function commitHookLayoutEffects(finishedWork, hookFlags) {
  9388. shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
  9389. }
  9390. function commitHookLayoutUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
  9391. shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
  9392. hookFlags,
  9393. finishedWork,
  9394. nearestMountedAncestor
  9395. ), recordEffectDuration()) : commitHookEffectListUnmount(
  9396. hookFlags,
  9397. finishedWork,
  9398. nearestMountedAncestor
  9399. );
  9400. }
  9401. function commitHookEffectListMount(flags, finishedWork) {
  9402. try {
  9403. var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  9404. if (null !== lastEffect) {
  9405. var firstEffect = lastEffect.next;
  9406. updateQueue = firstEffect;
  9407. do {
  9408. if ((updateQueue.tag & flags) === flags && (lastEffect = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = runWithFiberInDEV(
  9409. finishedWork,
  9410. callCreateInDEV,
  9411. updateQueue
  9412. ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), void 0 !== lastEffect && "function" !== typeof lastEffect)) {
  9413. var hookName = void 0;
  9414. hookName = 0 !== (updateQueue.tag & Layout) ? "useLayoutEffect" : 0 !== (updateQueue.tag & Insertion) ? "useInsertionEffect" : "useEffect";
  9415. var addendum = void 0;
  9416. addendum = null === lastEffect ? " You returned null. If your effect does not require clean up, return undefined (or nothing)." : "function" === typeof lastEffect.then ? "\n\nIt looks like you wrote " + hookName + "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" + hookName + "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching" : " You returned: " + lastEffect;
  9417. runWithFiberInDEV(
  9418. finishedWork,
  9419. function(n, a) {
  9420. console.error(
  9421. "%s must not return anything besides a function, which is used for clean-up.%s",
  9422. n,
  9423. a
  9424. );
  9425. },
  9426. hookName,
  9427. addendum
  9428. );
  9429. }
  9430. updateQueue = updateQueue.next;
  9431. } while (updateQueue !== firstEffect);
  9432. }
  9433. } catch (error) {
  9434. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9435. }
  9436. }
  9437. function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
  9438. try {
  9439. var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  9440. if (null !== lastEffect) {
  9441. var firstEffect = lastEffect.next;
  9442. updateQueue = firstEffect;
  9443. do {
  9444. if ((updateQueue.tag & flags) === flags) {
  9445. var inst = updateQueue.inst, destroy = inst.destroy;
  9446. void 0 !== destroy && (inst.destroy = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = finishedWork, runWithFiberInDEV(
  9447. lastEffect,
  9448. callDestroyInDEV,
  9449. lastEffect,
  9450. nearestMountedAncestor,
  9451. destroy
  9452. ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false));
  9453. }
  9454. updateQueue = updateQueue.next;
  9455. } while (updateQueue !== firstEffect);
  9456. }
  9457. } catch (error) {
  9458. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9459. }
  9460. }
  9461. function commitHookPassiveMountEffects(finishedWork, hookFlags) {
  9462. shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
  9463. }
  9464. function commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
  9465. shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
  9466. hookFlags,
  9467. finishedWork,
  9468. nearestMountedAncestor
  9469. ), recordEffectDuration()) : commitHookEffectListUnmount(
  9470. hookFlags,
  9471. finishedWork,
  9472. nearestMountedAncestor
  9473. );
  9474. }
  9475. function commitClassCallbacks(finishedWork) {
  9476. var updateQueue = finishedWork.updateQueue;
  9477. if (null !== updateQueue) {
  9478. var instance = finishedWork.stateNode;
  9479. finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance.props !== finishedWork.memoizedProps && console.error(
  9480. "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  9481. getComponentNameFromFiber(finishedWork) || "instance"
  9482. ), instance.state !== finishedWork.memoizedState && console.error(
  9483. "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  9484. getComponentNameFromFiber(finishedWork) || "instance"
  9485. ));
  9486. try {
  9487. runWithFiberInDEV(
  9488. finishedWork,
  9489. commitCallbacks,
  9490. updateQueue,
  9491. instance
  9492. );
  9493. } catch (error) {
  9494. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9495. }
  9496. }
  9497. }
  9498. function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) {
  9499. return instance.getSnapshotBeforeUpdate(prevProps, prevState);
  9500. }
  9501. function commitClassSnapshot(finishedWork, current2) {
  9502. var prevProps = current2.memoizedProps, prevState = current2.memoizedState;
  9503. current2 = finishedWork.stateNode;
  9504. finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current2.props !== finishedWork.memoizedProps && console.error(
  9505. "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  9506. getComponentNameFromFiber(finishedWork) || "instance"
  9507. ), current2.state !== finishedWork.memoizedState && console.error(
  9508. "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  9509. getComponentNameFromFiber(finishedWork) || "instance"
  9510. ));
  9511. try {
  9512. var resolvedPrevProps = resolveClassComponentProps(
  9513. finishedWork.type,
  9514. prevProps
  9515. );
  9516. var snapshot = runWithFiberInDEV(
  9517. finishedWork,
  9518. callGetSnapshotBeforeUpdates,
  9519. current2,
  9520. resolvedPrevProps,
  9521. prevState
  9522. );
  9523. prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;
  9524. void 0 !== snapshot || prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function() {
  9525. console.error(
  9526. "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",
  9527. getComponentNameFromFiber(finishedWork)
  9528. );
  9529. }));
  9530. current2.__reactInternalSnapshotBeforeUpdate = snapshot;
  9531. } catch (error) {
  9532. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9533. }
  9534. }
  9535. function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance) {
  9536. instance.props = resolveClassComponentProps(
  9537. current2.type,
  9538. current2.memoizedProps
  9539. );
  9540. instance.state = current2.memoizedState;
  9541. shouldProfile(current2) ? (startEffectTimer(), runWithFiberInDEV(
  9542. current2,
  9543. callComponentWillUnmountInDEV,
  9544. current2,
  9545. nearestMountedAncestor,
  9546. instance
  9547. ), recordEffectDuration()) : runWithFiberInDEV(
  9548. current2,
  9549. callComponentWillUnmountInDEV,
  9550. current2,
  9551. nearestMountedAncestor,
  9552. instance
  9553. );
  9554. }
  9555. function commitAttachRef(finishedWork) {
  9556. var ref = finishedWork.ref;
  9557. if (null !== ref) {
  9558. switch (finishedWork.tag) {
  9559. case 26:
  9560. case 27:
  9561. case 5:
  9562. var instanceToUse = finishedWork.stateNode;
  9563. break;
  9564. case 30:
  9565. instanceToUse = finishedWork.stateNode;
  9566. break;
  9567. default:
  9568. instanceToUse = finishedWork.stateNode;
  9569. }
  9570. if ("function" === typeof ref)
  9571. if (shouldProfile(finishedWork))
  9572. try {
  9573. startEffectTimer(), finishedWork.refCleanup = ref(instanceToUse);
  9574. } finally {
  9575. recordEffectDuration();
  9576. }
  9577. else finishedWork.refCleanup = ref(instanceToUse);
  9578. else
  9579. "string" === typeof ref ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || console.error(
  9580. "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",
  9581. getComponentNameFromFiber(finishedWork)
  9582. ), ref.current = instanceToUse;
  9583. }
  9584. }
  9585. function safelyAttachRef(current2, nearestMountedAncestor) {
  9586. try {
  9587. runWithFiberInDEV(current2, commitAttachRef, current2);
  9588. } catch (error) {
  9589. captureCommitPhaseError(current2, nearestMountedAncestor, error);
  9590. }
  9591. }
  9592. function safelyDetachRef(current2, nearestMountedAncestor) {
  9593. var ref = current2.ref, refCleanup = current2.refCleanup;
  9594. if (null !== ref)
  9595. if ("function" === typeof refCleanup)
  9596. try {
  9597. if (shouldProfile(current2))
  9598. try {
  9599. startEffectTimer(), runWithFiberInDEV(current2, refCleanup);
  9600. } finally {
  9601. recordEffectDuration(current2);
  9602. }
  9603. else runWithFiberInDEV(current2, refCleanup);
  9604. } catch (error) {
  9605. captureCommitPhaseError(current2, nearestMountedAncestor, error);
  9606. } finally {
  9607. current2.refCleanup = null, current2 = current2.alternate, null != current2 && (current2.refCleanup = null);
  9608. }
  9609. else if ("function" === typeof ref)
  9610. try {
  9611. if (shouldProfile(current2))
  9612. try {
  9613. startEffectTimer(), runWithFiberInDEV(current2, ref, null);
  9614. } finally {
  9615. recordEffectDuration(current2);
  9616. }
  9617. else runWithFiberInDEV(current2, ref, null);
  9618. } catch (error$7) {
  9619. captureCommitPhaseError(current2, nearestMountedAncestor, error$7);
  9620. }
  9621. else ref.current = null;
  9622. }
  9623. function commitProfiler(finishedWork, current2, commitStartTime2, effectDuration) {
  9624. var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit;
  9625. _finishedWork$memoize = _finishedWork$memoize.onRender;
  9626. current2 = null === current2 ? "mount" : "update";
  9627. currentUpdateIsNested && (current2 = "nested-update");
  9628. "function" === typeof _finishedWork$memoize && _finishedWork$memoize(
  9629. id,
  9630. current2,
  9631. finishedWork.actualDuration,
  9632. finishedWork.treeBaseDuration,
  9633. finishedWork.actualStartTime,
  9634. commitStartTime2
  9635. );
  9636. "function" === typeof onCommit && onCommit(id, current2, effectDuration, commitStartTime2);
  9637. }
  9638. function commitProfilerPostCommitImpl(finishedWork, current2, commitStartTime2, passiveEffectDuration) {
  9639. var _finishedWork$memoize2 = finishedWork.memoizedProps;
  9640. finishedWork = _finishedWork$memoize2.id;
  9641. _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;
  9642. current2 = null === current2 ? "mount" : "update";
  9643. currentUpdateIsNested && (current2 = "nested-update");
  9644. "function" === typeof _finishedWork$memoize2 && _finishedWork$memoize2(
  9645. finishedWork,
  9646. current2,
  9647. passiveEffectDuration,
  9648. commitStartTime2
  9649. );
  9650. }
  9651. function commitHostMount(finishedWork) {
  9652. var type = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
  9653. try {
  9654. runWithFiberInDEV(
  9655. finishedWork,
  9656. commitMount,
  9657. instance,
  9658. type,
  9659. props,
  9660. finishedWork
  9661. );
  9662. } catch (error) {
  9663. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9664. }
  9665. }
  9666. function commitHostUpdate(finishedWork, newProps, oldProps) {
  9667. try {
  9668. runWithFiberInDEV(
  9669. finishedWork,
  9670. commitUpdate,
  9671. finishedWork.stateNode,
  9672. finishedWork.type,
  9673. oldProps,
  9674. newProps,
  9675. finishedWork
  9676. );
  9677. } catch (error) {
  9678. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9679. }
  9680. }
  9681. function isHostParent(fiber) {
  9682. return 5 === fiber.tag || 3 === fiber.tag || 26 === fiber.tag || 27 === fiber.tag && isSingletonScope(fiber.type) || 4 === fiber.tag;
  9683. }
  9684. function getHostSibling(fiber) {
  9685. a: for (; ; ) {
  9686. for (; null === fiber.sibling; ) {
  9687. if (null === fiber.return || isHostParent(fiber.return)) return null;
  9688. fiber = fiber.return;
  9689. }
  9690. fiber.sibling.return = fiber.return;
  9691. for (fiber = fiber.sibling; 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; ) {
  9692. if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
  9693. if (fiber.flags & 2) continue a;
  9694. if (null === fiber.child || 4 === fiber.tag) continue a;
  9695. else fiber.child.return = fiber, fiber = fiber.child;
  9696. }
  9697. if (!(fiber.flags & 2)) return fiber.stateNode;
  9698. }
  9699. }
  9700. function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  9701. var tag = node.tag;
  9702. if (5 === tag || 6 === tag)
  9703. node = node.stateNode, before ? (warnForReactChildrenConflict(parent), (9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent).insertBefore(node, before)) : (warnForReactChildrenConflict(parent), before = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent, before.appendChild(node), parent = parent._reactRootContainer, null !== parent && void 0 !== parent || null !== before.onclick || (before.onclick = noop$1));
  9704. else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, null !== node))
  9705. for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; null !== node; )
  9706. insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
  9707. }
  9708. function insertOrAppendPlacementNode(node, before, parent) {
  9709. var tag = node.tag;
  9710. if (5 === tag || 6 === tag)
  9711. node = node.stateNode, before ? parent.insertBefore(node, before) : parent.appendChild(node);
  9712. else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, null !== node))
  9713. for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; null !== node; )
  9714. insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
  9715. }
  9716. function commitPlacement(finishedWork) {
  9717. for (var hostParentFiber, parentFiber = finishedWork.return; null !== parentFiber; ) {
  9718. if (isHostParent(parentFiber)) {
  9719. hostParentFiber = parentFiber;
  9720. break;
  9721. }
  9722. parentFiber = parentFiber.return;
  9723. }
  9724. if (null == hostParentFiber)
  9725. throw Error(
  9726. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  9727. );
  9728. switch (hostParentFiber.tag) {
  9729. case 27:
  9730. hostParentFiber = hostParentFiber.stateNode;
  9731. parentFiber = getHostSibling(finishedWork);
  9732. insertOrAppendPlacementNode(
  9733. finishedWork,
  9734. parentFiber,
  9735. hostParentFiber
  9736. );
  9737. break;
  9738. case 5:
  9739. parentFiber = hostParentFiber.stateNode;
  9740. hostParentFiber.flags & 32 && (resetTextContent(parentFiber), hostParentFiber.flags &= -33);
  9741. hostParentFiber = getHostSibling(finishedWork);
  9742. insertOrAppendPlacementNode(
  9743. finishedWork,
  9744. hostParentFiber,
  9745. parentFiber
  9746. );
  9747. break;
  9748. case 3:
  9749. case 4:
  9750. hostParentFiber = hostParentFiber.stateNode.containerInfo;
  9751. parentFiber = getHostSibling(finishedWork);
  9752. insertOrAppendPlacementNodeIntoContainer(
  9753. finishedWork,
  9754. parentFiber,
  9755. hostParentFiber
  9756. );
  9757. break;
  9758. default:
  9759. throw Error(
  9760. "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
  9761. );
  9762. }
  9763. }
  9764. function commitHostSingletonAcquisition(finishedWork) {
  9765. var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
  9766. try {
  9767. runWithFiberInDEV(
  9768. finishedWork,
  9769. acquireSingletonInstance,
  9770. finishedWork.type,
  9771. props,
  9772. singleton,
  9773. finishedWork
  9774. );
  9775. } catch (error) {
  9776. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9777. }
  9778. }
  9779. function isHydratingParent(current2, finishedWork) {
  9780. return 31 === finishedWork.tag ? (finishedWork = finishedWork.memoizedState, null !== current2.memoizedState && null === finishedWork) : 13 === finishedWork.tag ? (current2 = current2.memoizedState, finishedWork = finishedWork.memoizedState, null !== current2 && null !== current2.dehydrated && (null === finishedWork || null === finishedWork.dehydrated)) : 3 === finishedWork.tag ? current2.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) : false;
  9781. }
  9782. function commitBeforeMutationEffects(root2, firstChild) {
  9783. root2 = root2.containerInfo;
  9784. eventsEnabled = _enabled;
  9785. root2 = getActiveElementDeep(root2);
  9786. if (hasSelectionCapabilities(root2)) {
  9787. if ("selectionStart" in root2)
  9788. var JSCompiler_temp = {
  9789. start: root2.selectionStart,
  9790. end: root2.selectionEnd
  9791. };
  9792. else
  9793. a: {
  9794. JSCompiler_temp = (JSCompiler_temp = root2.ownerDocument) && JSCompiler_temp.defaultView || window;
  9795. var selection = JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
  9796. if (selection && 0 !== selection.rangeCount) {
  9797. JSCompiler_temp = selection.anchorNode;
  9798. var anchorOffset = selection.anchorOffset, focusNode = selection.focusNode;
  9799. selection = selection.focusOffset;
  9800. try {
  9801. JSCompiler_temp.nodeType, focusNode.nodeType;
  9802. } catch (e$2) {
  9803. JSCompiler_temp = null;
  9804. break a;
  9805. }
  9806. var length = 0, start = -1, end = -1, indexWithinAnchor = 0, indexWithinFocus = 0, node = root2, parentNode = null;
  9807. b: for (; ; ) {
  9808. for (var next; ; ) {
  9809. node !== JSCompiler_temp || 0 !== anchorOffset && 3 !== node.nodeType || (start = length + anchorOffset);
  9810. node !== focusNode || 0 !== selection && 3 !== node.nodeType || (end = length + selection);
  9811. 3 === node.nodeType && (length += node.nodeValue.length);
  9812. if (null === (next = node.firstChild)) break;
  9813. parentNode = node;
  9814. node = next;
  9815. }
  9816. for (; ; ) {
  9817. if (node === root2) break b;
  9818. parentNode === JSCompiler_temp && ++indexWithinAnchor === anchorOffset && (start = length);
  9819. parentNode === focusNode && ++indexWithinFocus === selection && (end = length);
  9820. if (null !== (next = node.nextSibling)) break;
  9821. node = parentNode;
  9822. parentNode = node.parentNode;
  9823. }
  9824. node = next;
  9825. }
  9826. JSCompiler_temp = -1 === start || -1 === end ? null : { start, end };
  9827. } else JSCompiler_temp = null;
  9828. }
  9829. JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
  9830. } else JSCompiler_temp = null;
  9831. selectionInformation = {
  9832. focusedElem: root2,
  9833. selectionRange: JSCompiler_temp
  9834. };
  9835. _enabled = false;
  9836. for (nextEffect = firstChild; null !== nextEffect; )
  9837. if (firstChild = nextEffect, root2 = firstChild.child, 0 !== (firstChild.subtreeFlags & 1028) && null !== root2)
  9838. root2.return = firstChild, nextEffect = root2;
  9839. else
  9840. for (; null !== nextEffect; ) {
  9841. root2 = firstChild = nextEffect;
  9842. JSCompiler_temp = root2.alternate;
  9843. anchorOffset = root2.flags;
  9844. switch (root2.tag) {
  9845. case 0:
  9846. if (0 !== (anchorOffset & 4) && (root2 = root2.updateQueue, root2 = null !== root2 ? root2.events : null, null !== root2))
  9847. for (JSCompiler_temp = 0; JSCompiler_temp < root2.length; JSCompiler_temp++)
  9848. anchorOffset = root2[JSCompiler_temp], anchorOffset.ref.impl = anchorOffset.nextImpl;
  9849. break;
  9850. case 11:
  9851. case 15:
  9852. break;
  9853. case 1:
  9854. 0 !== (anchorOffset & 1024) && null !== JSCompiler_temp && commitClassSnapshot(root2, JSCompiler_temp);
  9855. break;
  9856. case 3:
  9857. if (0 !== (anchorOffset & 1024)) {
  9858. if (root2 = root2.stateNode.containerInfo, JSCompiler_temp = root2.nodeType, 9 === JSCompiler_temp)
  9859. clearContainerSparingly(root2);
  9860. else if (1 === JSCompiler_temp)
  9861. switch (root2.nodeName) {
  9862. case "HEAD":
  9863. case "HTML":
  9864. case "BODY":
  9865. clearContainerSparingly(root2);
  9866. break;
  9867. default:
  9868. root2.textContent = "";
  9869. }
  9870. }
  9871. break;
  9872. case 5:
  9873. case 26:
  9874. case 27:
  9875. case 6:
  9876. case 4:
  9877. case 17:
  9878. break;
  9879. default:
  9880. if (0 !== (anchorOffset & 1024))
  9881. throw Error(
  9882. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  9883. );
  9884. }
  9885. root2 = firstChild.sibling;
  9886. if (null !== root2) {
  9887. root2.return = firstChild.return;
  9888. nextEffect = root2;
  9889. break;
  9890. }
  9891. nextEffect = firstChild.return;
  9892. }
  9893. }
  9894. function commitLayoutEffectOnFiber(finishedRoot, current2, finishedWork) {
  9895. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
  9896. switch (finishedWork.tag) {
  9897. case 0:
  9898. case 11:
  9899. case 15:
  9900. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9901. flags & 4 && commitHookLayoutEffects(finishedWork, Layout | HasEffect);
  9902. break;
  9903. case 1:
  9904. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9905. if (flags & 4)
  9906. if (finishedRoot = finishedWork.stateNode, null === current2)
  9907. finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
  9908. "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  9909. getComponentNameFromFiber(finishedWork) || "instance"
  9910. ), finishedRoot.state !== finishedWork.memoizedState && console.error(
  9911. "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  9912. getComponentNameFromFiber(finishedWork) || "instance"
  9913. )), shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
  9914. finishedWork,
  9915. callComponentDidMountInDEV,
  9916. finishedWork,
  9917. finishedRoot
  9918. ), recordEffectDuration()) : runWithFiberInDEV(
  9919. finishedWork,
  9920. callComponentDidMountInDEV,
  9921. finishedWork,
  9922. finishedRoot
  9923. );
  9924. else {
  9925. var prevProps = resolveClassComponentProps(
  9926. finishedWork.type,
  9927. current2.memoizedProps
  9928. );
  9929. current2 = current2.memoizedState;
  9930. finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
  9931. "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  9932. getComponentNameFromFiber(finishedWork) || "instance"
  9933. ), finishedRoot.state !== finishedWork.memoizedState && console.error(
  9934. "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  9935. getComponentNameFromFiber(finishedWork) || "instance"
  9936. ));
  9937. shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
  9938. finishedWork,
  9939. callComponentDidUpdateInDEV,
  9940. finishedWork,
  9941. finishedRoot,
  9942. prevProps,
  9943. current2,
  9944. finishedRoot.__reactInternalSnapshotBeforeUpdate
  9945. ), recordEffectDuration()) : runWithFiberInDEV(
  9946. finishedWork,
  9947. callComponentDidUpdateInDEV,
  9948. finishedWork,
  9949. finishedRoot,
  9950. prevProps,
  9951. current2,
  9952. finishedRoot.__reactInternalSnapshotBeforeUpdate
  9953. );
  9954. }
  9955. flags & 64 && commitClassCallbacks(finishedWork);
  9956. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  9957. break;
  9958. case 3:
  9959. current2 = pushNestedEffectDurations();
  9960. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9961. if (flags & 64 && (flags = finishedWork.updateQueue, null !== flags)) {
  9962. prevProps = null;
  9963. if (null !== finishedWork.child)
  9964. switch (finishedWork.child.tag) {
  9965. case 27:
  9966. case 5:
  9967. prevProps = finishedWork.child.stateNode;
  9968. break;
  9969. case 1:
  9970. prevProps = finishedWork.child.stateNode;
  9971. }
  9972. try {
  9973. runWithFiberInDEV(
  9974. finishedWork,
  9975. commitCallbacks,
  9976. flags,
  9977. prevProps
  9978. );
  9979. } catch (error) {
  9980. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9981. }
  9982. }
  9983. finishedRoot.effectDuration += popNestedEffectDurations(current2);
  9984. break;
  9985. case 27:
  9986. null === current2 && flags & 4 && commitHostSingletonAcquisition(finishedWork);
  9987. case 26:
  9988. case 5:
  9989. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9990. if (null === current2) {
  9991. if (flags & 4) commitHostMount(finishedWork);
  9992. else if (flags & 64) {
  9993. finishedRoot = finishedWork.type;
  9994. current2 = finishedWork.memoizedProps;
  9995. prevProps = finishedWork.stateNode;
  9996. try {
  9997. runWithFiberInDEV(
  9998. finishedWork,
  9999. commitHydratedInstance,
  10000. prevProps,
  10001. finishedRoot,
  10002. current2,
  10003. finishedWork
  10004. );
  10005. } catch (error) {
  10006. captureCommitPhaseError(
  10007. finishedWork,
  10008. finishedWork.return,
  10009. error
  10010. );
  10011. }
  10012. }
  10013. }
  10014. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  10015. break;
  10016. case 12:
  10017. if (flags & 4) {
  10018. flags = pushNestedEffectDurations();
  10019. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  10020. finishedRoot = finishedWork.stateNode;
  10021. finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);
  10022. try {
  10023. runWithFiberInDEV(
  10024. finishedWork,
  10025. commitProfiler,
  10026. finishedWork,
  10027. current2,
  10028. commitStartTime,
  10029. finishedRoot.effectDuration
  10030. );
  10031. } catch (error) {
  10032. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10033. }
  10034. } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  10035. break;
  10036. case 31:
  10037. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  10038. flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  10039. break;
  10040. case 13:
  10041. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  10042. flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  10043. flags & 64 && (finishedRoot = finishedWork.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot && (flags = retryDehydratedSuspenseBoundary.bind(
  10044. null,
  10045. finishedWork
  10046. ), registerSuspenseInstanceRetry(finishedRoot, flags))));
  10047. break;
  10048. case 22:
  10049. flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
  10050. if (!flags) {
  10051. current2 = null !== current2 && null !== current2.memoizedState || offscreenSubtreeWasHidden;
  10052. prevProps = offscreenSubtreeIsHidden;
  10053. var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  10054. offscreenSubtreeIsHidden = flags;
  10055. (offscreenSubtreeWasHidden = current2) && !prevOffscreenSubtreeWasHidden ? (recursivelyTraverseReappearLayoutEffects(
  10056. finishedRoot,
  10057. finishedWork,
  10058. 0 !== (finishedWork.subtreeFlags & 8772)
  10059. ), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
  10060. finishedWork,
  10061. componentEffectStartTime,
  10062. componentEffectEndTime
  10063. )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  10064. offscreenSubtreeIsHidden = prevProps;
  10065. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  10066. }
  10067. break;
  10068. case 30:
  10069. break;
  10070. default:
  10071. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  10072. }
  10073. (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  10074. finishedWork,
  10075. componentEffectStartTime,
  10076. componentEffectEndTime,
  10077. componentEffectDuration,
  10078. componentEffectErrors
  10079. ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
  10080. finishedWork.return.alternate,
  10081. finishedWork.return
  10082. ) || logComponentTrigger(
  10083. finishedWork,
  10084. componentEffectStartTime,
  10085. componentEffectEndTime,
  10086. "Mount"
  10087. )));
  10088. popComponentEffectStart(prevEffectStart);
  10089. popComponentEffectDuration(prevEffectDuration);
  10090. componentEffectErrors = prevEffectErrors;
  10091. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10092. }
  10093. function detachFiberAfterEffects(fiber) {
  10094. var alternate = fiber.alternate;
  10095. null !== alternate && (fiber.alternate = null, detachFiberAfterEffects(alternate));
  10096. fiber.child = null;
  10097. fiber.deletions = null;
  10098. fiber.sibling = null;
  10099. 5 === fiber.tag && (alternate = fiber.stateNode, null !== alternate && detachDeletedInstance(alternate));
  10100. fiber.stateNode = null;
  10101. fiber._debugOwner = null;
  10102. fiber.return = null;
  10103. fiber.dependencies = null;
  10104. fiber.memoizedProps = null;
  10105. fiber.memoizedState = null;
  10106. fiber.pendingProps = null;
  10107. fiber.stateNode = null;
  10108. fiber.updateQueue = null;
  10109. }
  10110. function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
  10111. for (parent = parent.child; null !== parent; )
  10112. commitDeletionEffectsOnFiber(
  10113. finishedRoot,
  10114. nearestMountedAncestor,
  10115. parent
  10116. ), parent = parent.sibling;
  10117. }
  10118. function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
  10119. if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
  10120. try {
  10121. injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
  10122. } catch (err) {
  10123. hasLoggedError || (hasLoggedError = true, console.error(
  10124. "React instrumentation encountered an error: %o",
  10125. err
  10126. ));
  10127. }
  10128. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  10129. switch (deletedFiber.tag) {
  10130. case 26:
  10131. offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
  10132. recursivelyTraverseDeletionEffects(
  10133. finishedRoot,
  10134. nearestMountedAncestor,
  10135. deletedFiber
  10136. );
  10137. deletedFiber.memoizedState ? deletedFiber.memoizedState.count-- : deletedFiber.stateNode && (finishedRoot = deletedFiber.stateNode, finishedRoot.parentNode.removeChild(finishedRoot));
  10138. break;
  10139. case 27:
  10140. offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
  10141. var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
  10142. isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = false);
  10143. recursivelyTraverseDeletionEffects(
  10144. finishedRoot,
  10145. nearestMountedAncestor,
  10146. deletedFiber
  10147. );
  10148. runWithFiberInDEV(
  10149. deletedFiber,
  10150. releaseSingletonInstance,
  10151. deletedFiber.stateNode
  10152. );
  10153. hostParent = prevHostParent;
  10154. hostParentIsContainer = prevHostParentIsContainer;
  10155. break;
  10156. case 5:
  10157. offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
  10158. case 6:
  10159. prevHostParent = hostParent;
  10160. prevHostParentIsContainer = hostParentIsContainer;
  10161. hostParent = null;
  10162. recursivelyTraverseDeletionEffects(
  10163. finishedRoot,
  10164. nearestMountedAncestor,
  10165. deletedFiber
  10166. );
  10167. hostParent = prevHostParent;
  10168. hostParentIsContainer = prevHostParentIsContainer;
  10169. if (null !== hostParent)
  10170. if (hostParentIsContainer)
  10171. try {
  10172. runWithFiberInDEV(
  10173. deletedFiber,
  10174. removeChildFromContainer,
  10175. hostParent,
  10176. deletedFiber.stateNode
  10177. );
  10178. } catch (error) {
  10179. captureCommitPhaseError(
  10180. deletedFiber,
  10181. nearestMountedAncestor,
  10182. error
  10183. );
  10184. }
  10185. else
  10186. try {
  10187. runWithFiberInDEV(
  10188. deletedFiber,
  10189. removeChild,
  10190. hostParent,
  10191. deletedFiber.stateNode
  10192. );
  10193. } catch (error) {
  10194. captureCommitPhaseError(
  10195. deletedFiber,
  10196. nearestMountedAncestor,
  10197. error
  10198. );
  10199. }
  10200. break;
  10201. case 18:
  10202. null !== hostParent && (hostParentIsContainer ? (finishedRoot = hostParent, clearHydrationBoundary(
  10203. 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName ? finishedRoot.ownerDocument.body : finishedRoot,
  10204. deletedFiber.stateNode
  10205. ), retryIfBlockedOn(finishedRoot)) : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
  10206. break;
  10207. case 4:
  10208. prevHostParent = hostParent;
  10209. prevHostParentIsContainer = hostParentIsContainer;
  10210. hostParent = deletedFiber.stateNode.containerInfo;
  10211. hostParentIsContainer = true;
  10212. recursivelyTraverseDeletionEffects(
  10213. finishedRoot,
  10214. nearestMountedAncestor,
  10215. deletedFiber
  10216. );
  10217. hostParent = prevHostParent;
  10218. hostParentIsContainer = prevHostParentIsContainer;
  10219. break;
  10220. case 0:
  10221. case 11:
  10222. case 14:
  10223. case 15:
  10224. commitHookEffectListUnmount(
  10225. Insertion,
  10226. deletedFiber,
  10227. nearestMountedAncestor
  10228. );
  10229. offscreenSubtreeWasHidden || commitHookLayoutUnmountEffects(
  10230. deletedFiber,
  10231. nearestMountedAncestor,
  10232. Layout
  10233. );
  10234. recursivelyTraverseDeletionEffects(
  10235. finishedRoot,
  10236. nearestMountedAncestor,
  10237. deletedFiber
  10238. );
  10239. break;
  10240. case 1:
  10241. offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, "function" === typeof prevHostParent.componentWillUnmount && safelyCallComponentWillUnmount(
  10242. deletedFiber,
  10243. nearestMountedAncestor,
  10244. prevHostParent
  10245. ));
  10246. recursivelyTraverseDeletionEffects(
  10247. finishedRoot,
  10248. nearestMountedAncestor,
  10249. deletedFiber
  10250. );
  10251. break;
  10252. case 21:
  10253. recursivelyTraverseDeletionEffects(
  10254. finishedRoot,
  10255. nearestMountedAncestor,
  10256. deletedFiber
  10257. );
  10258. break;
  10259. case 22:
  10260. offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || null !== deletedFiber.memoizedState;
  10261. recursivelyTraverseDeletionEffects(
  10262. finishedRoot,
  10263. nearestMountedAncestor,
  10264. deletedFiber
  10265. );
  10266. offscreenSubtreeWasHidden = prevHostParent;
  10267. break;
  10268. default:
  10269. recursivelyTraverseDeletionEffects(
  10270. finishedRoot,
  10271. nearestMountedAncestor,
  10272. deletedFiber
  10273. );
  10274. }
  10275. (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  10276. deletedFiber,
  10277. componentEffectStartTime,
  10278. componentEffectEndTime,
  10279. componentEffectDuration,
  10280. componentEffectErrors
  10281. );
  10282. popComponentEffectStart(prevEffectStart);
  10283. popComponentEffectDuration(prevEffectDuration);
  10284. componentEffectErrors = prevEffectErrors;
  10285. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10286. }
  10287. function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
  10288. if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot))) {
  10289. finishedRoot = finishedRoot.dehydrated;
  10290. try {
  10291. runWithFiberInDEV(
  10292. finishedWork,
  10293. commitHydratedActivityInstance,
  10294. finishedRoot
  10295. );
  10296. } catch (error) {
  10297. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10298. }
  10299. }
  10300. }
  10301. function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
  10302. if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot))))
  10303. try {
  10304. runWithFiberInDEV(
  10305. finishedWork,
  10306. commitHydratedSuspenseInstance,
  10307. finishedRoot
  10308. );
  10309. } catch (error) {
  10310. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10311. }
  10312. }
  10313. function getRetryCache(finishedWork) {
  10314. switch (finishedWork.tag) {
  10315. case 31:
  10316. case 13:
  10317. case 19:
  10318. var retryCache = finishedWork.stateNode;
  10319. null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
  10320. return retryCache;
  10321. case 22:
  10322. return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, null === retryCache && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
  10323. default:
  10324. throw Error(
  10325. "Unexpected Suspense handler tag (" + finishedWork.tag + "). This is a bug in React."
  10326. );
  10327. }
  10328. }
  10329. function attachSuspenseRetryListeners(finishedWork, wakeables) {
  10330. var retryCache = getRetryCache(finishedWork);
  10331. wakeables.forEach(function(wakeable) {
  10332. if (!retryCache.has(wakeable)) {
  10333. retryCache.add(wakeable);
  10334. if (isDevToolsPresent)
  10335. if (null !== inProgressLanes && null !== inProgressRoot)
  10336. restorePendingUpdaters(inProgressRoot, inProgressLanes);
  10337. else
  10338. throw Error(
  10339. "Expected finished root and lanes to be set. This is a bug in React."
  10340. );
  10341. var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
  10342. wakeable.then(retry, retry);
  10343. }
  10344. });
  10345. }
  10346. function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
  10347. var deletions = parentFiber.deletions;
  10348. if (null !== deletions)
  10349. for (var i = 0; i < deletions.length; i++) {
  10350. var root2 = root$jscomp$0, returnFiber = parentFiber, deletedFiber = deletions[i], prevEffectStart = pushComponentEffectStart(), parent = returnFiber;
  10351. a: for (; null !== parent; ) {
  10352. switch (parent.tag) {
  10353. case 27:
  10354. if (isSingletonScope(parent.type)) {
  10355. hostParent = parent.stateNode;
  10356. hostParentIsContainer = false;
  10357. break a;
  10358. }
  10359. break;
  10360. case 5:
  10361. hostParent = parent.stateNode;
  10362. hostParentIsContainer = false;
  10363. break a;
  10364. case 3:
  10365. case 4:
  10366. hostParent = parent.stateNode.containerInfo;
  10367. hostParentIsContainer = true;
  10368. break a;
  10369. }
  10370. parent = parent.return;
  10371. }
  10372. if (null === hostParent)
  10373. throw Error(
  10374. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  10375. );
  10376. commitDeletionEffectsOnFiber(root2, returnFiber, deletedFiber);
  10377. hostParent = null;
  10378. hostParentIsContainer = false;
  10379. (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
  10380. deletedFiber,
  10381. componentEffectStartTime,
  10382. componentEffectEndTime,
  10383. "Unmount"
  10384. );
  10385. popComponentEffectStart(prevEffectStart);
  10386. root2 = deletedFiber;
  10387. returnFiber = root2.alternate;
  10388. null !== returnFiber && (returnFiber.return = null);
  10389. root2.return = null;
  10390. }
  10391. if (parentFiber.subtreeFlags & 13886)
  10392. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10393. commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
  10394. }
  10395. function commitMutationEffectsOnFiber(finishedWork, root2) {
  10396. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), current2 = finishedWork.alternate, flags = finishedWork.flags;
  10397. switch (finishedWork.tag) {
  10398. case 0:
  10399. case 11:
  10400. case 14:
  10401. case 15:
  10402. recursivelyTraverseMutationEffects(root2, finishedWork);
  10403. commitReconciliationEffects(finishedWork);
  10404. flags & 4 && (commitHookEffectListUnmount(
  10405. Insertion | HasEffect,
  10406. finishedWork,
  10407. finishedWork.return
  10408. ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), commitHookLayoutUnmountEffects(
  10409. finishedWork,
  10410. finishedWork.return,
  10411. Layout | HasEffect
  10412. ));
  10413. break;
  10414. case 1:
  10415. recursivelyTraverseMutationEffects(root2, finishedWork);
  10416. commitReconciliationEffects(finishedWork);
  10417. flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
  10418. if (flags & 64 && offscreenSubtreeIsHidden && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.callbacks, null !== current2))) {
  10419. var existingHiddenCallbacks = flags.shared.hiddenCallbacks;
  10420. flags.shared.hiddenCallbacks = null === existingHiddenCallbacks ? current2 : existingHiddenCallbacks.concat(current2);
  10421. }
  10422. break;
  10423. case 26:
  10424. existingHiddenCallbacks = currentHoistableRoot;
  10425. recursivelyTraverseMutationEffects(root2, finishedWork);
  10426. commitReconciliationEffects(finishedWork);
  10427. flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
  10428. if (flags & 4) {
  10429. var currentResource = null !== current2 ? current2.memoizedState : null;
  10430. flags = finishedWork.memoizedState;
  10431. if (null === current2)
  10432. if (null === flags)
  10433. if (null === finishedWork.stateNode) {
  10434. a: {
  10435. flags = finishedWork.type;
  10436. current2 = finishedWork.memoizedProps;
  10437. existingHiddenCallbacks = existingHiddenCallbacks.ownerDocument || existingHiddenCallbacks;
  10438. b: switch (flags) {
  10439. case "title":
  10440. currentResource = existingHiddenCallbacks.getElementsByTagName(
  10441. "title"
  10442. )[0];
  10443. if (!currentResource || currentResource[internalHoistableMarker] || currentResource[internalInstanceKey] || currentResource.namespaceURI === SVG_NAMESPACE || currentResource.hasAttribute("itemprop"))
  10444. currentResource = existingHiddenCallbacks.createElement(flags), existingHiddenCallbacks.head.insertBefore(
  10445. currentResource,
  10446. existingHiddenCallbacks.querySelector(
  10447. "head > title"
  10448. )
  10449. );
  10450. setInitialProperties(currentResource, flags, current2);
  10451. currentResource[internalInstanceKey] = finishedWork;
  10452. markNodeAsHoistable(currentResource);
  10453. flags = currentResource;
  10454. break a;
  10455. case "link":
  10456. var maybeNodes = getHydratableHoistableCache(
  10457. "link",
  10458. "href",
  10459. existingHiddenCallbacks
  10460. ).get(flags + (current2.href || ""));
  10461. if (maybeNodes) {
  10462. for (var i = 0; i < maybeNodes.length; i++)
  10463. if (currentResource = maybeNodes[i], currentResource.getAttribute("href") === (null == current2.href || "" === current2.href ? null : current2.href) && currentResource.getAttribute("rel") === (null == current2.rel ? null : current2.rel) && currentResource.getAttribute("title") === (null == current2.title ? null : current2.title) && currentResource.getAttribute("crossorigin") === (null == current2.crossOrigin ? null : current2.crossOrigin)) {
  10464. maybeNodes.splice(i, 1);
  10465. break b;
  10466. }
  10467. }
  10468. currentResource = existingHiddenCallbacks.createElement(flags);
  10469. setInitialProperties(currentResource, flags, current2);
  10470. existingHiddenCallbacks.head.appendChild(
  10471. currentResource
  10472. );
  10473. break;
  10474. case "meta":
  10475. if (maybeNodes = getHydratableHoistableCache(
  10476. "meta",
  10477. "content",
  10478. existingHiddenCallbacks
  10479. ).get(flags + (current2.content || ""))) {
  10480. for (i = 0; i < maybeNodes.length; i++)
  10481. if (currentResource = maybeNodes[i], checkAttributeStringCoercion(
  10482. current2.content,
  10483. "content"
  10484. ), currentResource.getAttribute("content") === (null == current2.content ? null : "" + current2.content) && currentResource.getAttribute("name") === (null == current2.name ? null : current2.name) && currentResource.getAttribute("property") === (null == current2.property ? null : current2.property) && currentResource.getAttribute("http-equiv") === (null == current2.httpEquiv ? null : current2.httpEquiv) && currentResource.getAttribute("charset") === (null == current2.charSet ? null : current2.charSet)) {
  10485. maybeNodes.splice(i, 1);
  10486. break b;
  10487. }
  10488. }
  10489. currentResource = existingHiddenCallbacks.createElement(flags);
  10490. setInitialProperties(currentResource, flags, current2);
  10491. existingHiddenCallbacks.head.appendChild(
  10492. currentResource
  10493. );
  10494. break;
  10495. default:
  10496. throw Error(
  10497. 'getNodesForType encountered a type it did not expect: "' + flags + '". This is a bug in React.'
  10498. );
  10499. }
  10500. currentResource[internalInstanceKey] = finishedWork;
  10501. markNodeAsHoistable(currentResource);
  10502. flags = currentResource;
  10503. }
  10504. finishedWork.stateNode = flags;
  10505. } else
  10506. mountHoistable(
  10507. existingHiddenCallbacks,
  10508. finishedWork.type,
  10509. finishedWork.stateNode
  10510. );
  10511. else
  10512. finishedWork.stateNode = acquireResource(
  10513. existingHiddenCallbacks,
  10514. flags,
  10515. finishedWork.memoizedProps
  10516. );
  10517. else
  10518. currentResource !== flags ? (null === currentResource ? null !== current2.stateNode && (current2 = current2.stateNode, current2.parentNode.removeChild(current2)) : currentResource.count--, null === flags ? mountHoistable(
  10519. existingHiddenCallbacks,
  10520. finishedWork.type,
  10521. finishedWork.stateNode
  10522. ) : acquireResource(
  10523. existingHiddenCallbacks,
  10524. flags,
  10525. finishedWork.memoizedProps
  10526. )) : null === flags && null !== finishedWork.stateNode && commitHostUpdate(
  10527. finishedWork,
  10528. finishedWork.memoizedProps,
  10529. current2.memoizedProps
  10530. );
  10531. }
  10532. break;
  10533. case 27:
  10534. recursivelyTraverseMutationEffects(root2, finishedWork);
  10535. commitReconciliationEffects(finishedWork);
  10536. flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
  10537. null !== current2 && flags & 4 && commitHostUpdate(
  10538. finishedWork,
  10539. finishedWork.memoizedProps,
  10540. current2.memoizedProps
  10541. );
  10542. break;
  10543. case 5:
  10544. recursivelyTraverseMutationEffects(root2, finishedWork);
  10545. commitReconciliationEffects(finishedWork);
  10546. flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
  10547. if (finishedWork.flags & 32) {
  10548. existingHiddenCallbacks = finishedWork.stateNode;
  10549. try {
  10550. runWithFiberInDEV(
  10551. finishedWork,
  10552. resetTextContent,
  10553. existingHiddenCallbacks
  10554. );
  10555. } catch (error) {
  10556. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10557. }
  10558. }
  10559. flags & 4 && null != finishedWork.stateNode && (existingHiddenCallbacks = finishedWork.memoizedProps, commitHostUpdate(
  10560. finishedWork,
  10561. existingHiddenCallbacks,
  10562. null !== current2 ? current2.memoizedProps : existingHiddenCallbacks
  10563. ));
  10564. flags & 1024 && (needsFormReset = true, "form" !== finishedWork.type && console.error(
  10565. "Unexpected host component type. Expected a form. This is a bug in React."
  10566. ));
  10567. break;
  10568. case 6:
  10569. recursivelyTraverseMutationEffects(root2, finishedWork);
  10570. commitReconciliationEffects(finishedWork);
  10571. if (flags & 4) {
  10572. if (null === finishedWork.stateNode)
  10573. throw Error(
  10574. "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
  10575. );
  10576. flags = finishedWork.memoizedProps;
  10577. current2 = null !== current2 ? current2.memoizedProps : flags;
  10578. existingHiddenCallbacks = finishedWork.stateNode;
  10579. try {
  10580. runWithFiberInDEV(
  10581. finishedWork,
  10582. commitTextUpdate,
  10583. existingHiddenCallbacks,
  10584. current2,
  10585. flags
  10586. );
  10587. } catch (error) {
  10588. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10589. }
  10590. }
  10591. break;
  10592. case 3:
  10593. existingHiddenCallbacks = pushNestedEffectDurations();
  10594. tagCaches = null;
  10595. currentResource = currentHoistableRoot;
  10596. currentHoistableRoot = getHoistableRoot(root2.containerInfo);
  10597. recursivelyTraverseMutationEffects(root2, finishedWork);
  10598. currentHoistableRoot = currentResource;
  10599. commitReconciliationEffects(finishedWork);
  10600. if (flags & 4 && null !== current2 && current2.memoizedState.isDehydrated)
  10601. try {
  10602. runWithFiberInDEV(
  10603. finishedWork,
  10604. commitHydratedContainer,
  10605. root2.containerInfo
  10606. );
  10607. } catch (error) {
  10608. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10609. }
  10610. needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
  10611. root2.effectDuration += popNestedEffectDurations(
  10612. existingHiddenCallbacks
  10613. );
  10614. break;
  10615. case 4:
  10616. flags = currentHoistableRoot;
  10617. currentHoistableRoot = getHoistableRoot(
  10618. finishedWork.stateNode.containerInfo
  10619. );
  10620. recursivelyTraverseMutationEffects(root2, finishedWork);
  10621. commitReconciliationEffects(finishedWork);
  10622. currentHoistableRoot = flags;
  10623. break;
  10624. case 12:
  10625. flags = pushNestedEffectDurations();
  10626. recursivelyTraverseMutationEffects(root2, finishedWork);
  10627. commitReconciliationEffects(finishedWork);
  10628. finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags);
  10629. break;
  10630. case 31:
  10631. recursivelyTraverseMutationEffects(root2, finishedWork);
  10632. commitReconciliationEffects(finishedWork);
  10633. flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
  10634. break;
  10635. case 13:
  10636. recursivelyTraverseMutationEffects(root2, finishedWork);
  10637. commitReconciliationEffects(finishedWork);
  10638. finishedWork.child.flags & 8192 && null !== finishedWork.memoizedState !== (null !== current2 && null !== current2.memoizedState) && (globalMostRecentFallbackTime = now$1());
  10639. flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
  10640. break;
  10641. case 22:
  10642. existingHiddenCallbacks = null !== finishedWork.memoizedState;
  10643. var wasHidden = null !== current2 && null !== current2.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  10644. offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || existingHiddenCallbacks;
  10645. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
  10646. recursivelyTraverseMutationEffects(root2, finishedWork);
  10647. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  10648. offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
  10649. wasHidden && !existingHiddenCallbacks && !prevOffscreenSubtreeIsHidden && !prevOffscreenSubtreeWasHidden && (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
  10650. finishedWork,
  10651. componentEffectStartTime,
  10652. componentEffectEndTime
  10653. );
  10654. commitReconciliationEffects(finishedWork);
  10655. if (flags & 8192)
  10656. a: for (root2 = finishedWork.stateNode, root2._visibility = existingHiddenCallbacks ? root2._visibility & ~OffscreenVisible : root2._visibility | OffscreenVisible, !existingHiddenCallbacks || null === current2 || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || (recursivelyTraverseDisappearLayoutEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
  10657. finishedWork,
  10658. componentEffectStartTime,
  10659. componentEffectEndTime,
  10660. "Disconnect"
  10661. )), current2 = null, root2 = finishedWork; ; ) {
  10662. if (5 === root2.tag || 26 === root2.tag) {
  10663. if (null === current2) {
  10664. wasHidden = current2 = root2;
  10665. try {
  10666. currentResource = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
  10667. wasHidden,
  10668. hideInstance,
  10669. currentResource
  10670. ) : runWithFiberInDEV(
  10671. wasHidden,
  10672. unhideInstance,
  10673. wasHidden.stateNode,
  10674. wasHidden.memoizedProps
  10675. );
  10676. } catch (error) {
  10677. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  10678. }
  10679. }
  10680. } else if (6 === root2.tag) {
  10681. if (null === current2) {
  10682. wasHidden = root2;
  10683. try {
  10684. maybeNodes = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
  10685. wasHidden,
  10686. hideTextInstance,
  10687. maybeNodes
  10688. ) : runWithFiberInDEV(
  10689. wasHidden,
  10690. unhideTextInstance,
  10691. maybeNodes,
  10692. wasHidden.memoizedProps
  10693. );
  10694. } catch (error) {
  10695. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  10696. }
  10697. }
  10698. } else if (18 === root2.tag) {
  10699. if (null === current2) {
  10700. wasHidden = root2;
  10701. try {
  10702. i = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
  10703. wasHidden,
  10704. hideDehydratedBoundary,
  10705. i
  10706. ) : runWithFiberInDEV(
  10707. wasHidden,
  10708. unhideDehydratedBoundary,
  10709. wasHidden.stateNode
  10710. );
  10711. } catch (error) {
  10712. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  10713. }
  10714. }
  10715. } else if ((22 !== root2.tag && 23 !== root2.tag || null === root2.memoizedState || root2 === finishedWork) && null !== root2.child) {
  10716. root2.child.return = root2;
  10717. root2 = root2.child;
  10718. continue;
  10719. }
  10720. if (root2 === finishedWork) break a;
  10721. for (; null === root2.sibling; ) {
  10722. if (null === root2.return || root2.return === finishedWork)
  10723. break a;
  10724. current2 === root2 && (current2 = null);
  10725. root2 = root2.return;
  10726. }
  10727. current2 === root2 && (current2 = null);
  10728. root2.sibling.return = root2.return;
  10729. root2 = root2.sibling;
  10730. }
  10731. flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.retryQueue, null !== current2 && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current2))));
  10732. break;
  10733. case 19:
  10734. recursivelyTraverseMutationEffects(root2, finishedWork);
  10735. commitReconciliationEffects(finishedWork);
  10736. flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
  10737. break;
  10738. case 30:
  10739. break;
  10740. case 21:
  10741. break;
  10742. default:
  10743. recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork);
  10744. }
  10745. (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  10746. finishedWork,
  10747. componentEffectStartTime,
  10748. componentEffectEndTime,
  10749. componentEffectDuration,
  10750. componentEffectErrors
  10751. ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
  10752. finishedWork.return.alternate,
  10753. finishedWork.return
  10754. ) || logComponentTrigger(
  10755. finishedWork,
  10756. componentEffectStartTime,
  10757. componentEffectEndTime,
  10758. "Mount"
  10759. )));
  10760. popComponentEffectStart(prevEffectStart);
  10761. popComponentEffectDuration(prevEffectDuration);
  10762. componentEffectErrors = prevEffectErrors;
  10763. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10764. }
  10765. function commitReconciliationEffects(finishedWork) {
  10766. var flags = finishedWork.flags;
  10767. if (flags & 2) {
  10768. try {
  10769. runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
  10770. } catch (error) {
  10771. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10772. }
  10773. finishedWork.flags &= -3;
  10774. }
  10775. flags & 4096 && (finishedWork.flags &= -4097);
  10776. }
  10777. function recursivelyResetForms(parentFiber) {
  10778. if (parentFiber.subtreeFlags & 1024)
  10779. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  10780. var fiber = parentFiber;
  10781. recursivelyResetForms(fiber);
  10782. 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
  10783. parentFiber = parentFiber.sibling;
  10784. }
  10785. }
  10786. function recursivelyTraverseLayoutEffects(root2, parentFiber) {
  10787. if (parentFiber.subtreeFlags & 8772)
  10788. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10789. commitLayoutEffectOnFiber(root2, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
  10790. }
  10791. function disappearLayoutEffects(finishedWork) {
  10792. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  10793. switch (finishedWork.tag) {
  10794. case 0:
  10795. case 11:
  10796. case 14:
  10797. case 15:
  10798. commitHookLayoutUnmountEffects(
  10799. finishedWork,
  10800. finishedWork.return,
  10801. Layout
  10802. );
  10803. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10804. break;
  10805. case 1:
  10806. safelyDetachRef(finishedWork, finishedWork.return);
  10807. var instance = finishedWork.stateNode;
  10808. "function" === typeof instance.componentWillUnmount && safelyCallComponentWillUnmount(
  10809. finishedWork,
  10810. finishedWork.return,
  10811. instance
  10812. );
  10813. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10814. break;
  10815. case 27:
  10816. runWithFiberInDEV(
  10817. finishedWork,
  10818. releaseSingletonInstance,
  10819. finishedWork.stateNode
  10820. );
  10821. case 26:
  10822. case 5:
  10823. safelyDetachRef(finishedWork, finishedWork.return);
  10824. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10825. break;
  10826. case 22:
  10827. null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10828. break;
  10829. case 30:
  10830. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10831. break;
  10832. default:
  10833. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  10834. }
  10835. (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  10836. finishedWork,
  10837. componentEffectStartTime,
  10838. componentEffectEndTime,
  10839. componentEffectDuration,
  10840. componentEffectErrors
  10841. );
  10842. popComponentEffectStart(prevEffectStart);
  10843. popComponentEffectDuration(prevEffectDuration);
  10844. componentEffectErrors = prevEffectErrors;
  10845. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10846. }
  10847. function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
  10848. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10849. disappearLayoutEffects(parentFiber), parentFiber = parentFiber.sibling;
  10850. }
  10851. function reappearLayoutEffects(finishedRoot, current2, finishedWork, includeWorkInProgressEffects) {
  10852. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
  10853. switch (finishedWork.tag) {
  10854. case 0:
  10855. case 11:
  10856. case 15:
  10857. recursivelyTraverseReappearLayoutEffects(
  10858. finishedRoot,
  10859. finishedWork,
  10860. includeWorkInProgressEffects
  10861. );
  10862. commitHookLayoutEffects(finishedWork, Layout);
  10863. break;
  10864. case 1:
  10865. recursivelyTraverseReappearLayoutEffects(
  10866. finishedRoot,
  10867. finishedWork,
  10868. includeWorkInProgressEffects
  10869. );
  10870. current2 = finishedWork.stateNode;
  10871. "function" === typeof current2.componentDidMount && runWithFiberInDEV(
  10872. finishedWork,
  10873. callComponentDidMountInDEV,
  10874. finishedWork,
  10875. current2
  10876. );
  10877. current2 = finishedWork.updateQueue;
  10878. if (null !== current2) {
  10879. finishedRoot = finishedWork.stateNode;
  10880. try {
  10881. runWithFiberInDEV(
  10882. finishedWork,
  10883. commitHiddenCallbacks,
  10884. current2,
  10885. finishedRoot
  10886. );
  10887. } catch (error) {
  10888. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10889. }
  10890. }
  10891. includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
  10892. safelyAttachRef(finishedWork, finishedWork.return);
  10893. break;
  10894. case 27:
  10895. commitHostSingletonAcquisition(finishedWork);
  10896. case 26:
  10897. case 5:
  10898. recursivelyTraverseReappearLayoutEffects(
  10899. finishedRoot,
  10900. finishedWork,
  10901. includeWorkInProgressEffects
  10902. );
  10903. includeWorkInProgressEffects && null === current2 && flags & 4 && commitHostMount(finishedWork);
  10904. safelyAttachRef(finishedWork, finishedWork.return);
  10905. break;
  10906. case 12:
  10907. if (includeWorkInProgressEffects && flags & 4) {
  10908. flags = pushNestedEffectDurations();
  10909. recursivelyTraverseReappearLayoutEffects(
  10910. finishedRoot,
  10911. finishedWork,
  10912. includeWorkInProgressEffects
  10913. );
  10914. includeWorkInProgressEffects = finishedWork.stateNode;
  10915. includeWorkInProgressEffects.effectDuration += bubbleNestedEffectDurations(flags);
  10916. try {
  10917. runWithFiberInDEV(
  10918. finishedWork,
  10919. commitProfiler,
  10920. finishedWork,
  10921. current2,
  10922. commitStartTime,
  10923. includeWorkInProgressEffects.effectDuration
  10924. );
  10925. } catch (error) {
  10926. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10927. }
  10928. } else
  10929. recursivelyTraverseReappearLayoutEffects(
  10930. finishedRoot,
  10931. finishedWork,
  10932. includeWorkInProgressEffects
  10933. );
  10934. break;
  10935. case 31:
  10936. recursivelyTraverseReappearLayoutEffects(
  10937. finishedRoot,
  10938. finishedWork,
  10939. includeWorkInProgressEffects
  10940. );
  10941. includeWorkInProgressEffects && flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  10942. break;
  10943. case 13:
  10944. recursivelyTraverseReappearLayoutEffects(
  10945. finishedRoot,
  10946. finishedWork,
  10947. includeWorkInProgressEffects
  10948. );
  10949. includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  10950. break;
  10951. case 22:
  10952. null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects(
  10953. finishedRoot,
  10954. finishedWork,
  10955. includeWorkInProgressEffects
  10956. );
  10957. safelyAttachRef(finishedWork, finishedWork.return);
  10958. break;
  10959. case 30:
  10960. break;
  10961. default:
  10962. recursivelyTraverseReappearLayoutEffects(
  10963. finishedRoot,
  10964. finishedWork,
  10965. includeWorkInProgressEffects
  10966. );
  10967. }
  10968. (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  10969. finishedWork,
  10970. componentEffectStartTime,
  10971. componentEffectEndTime,
  10972. componentEffectDuration,
  10973. componentEffectErrors
  10974. );
  10975. popComponentEffectStart(prevEffectStart);
  10976. popComponentEffectDuration(prevEffectDuration);
  10977. componentEffectErrors = prevEffectErrors;
  10978. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  10979. }
  10980. function recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {
  10981. includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
  10982. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10983. reappearLayoutEffects(
  10984. finishedRoot,
  10985. parentFiber.alternate,
  10986. parentFiber,
  10987. includeWorkInProgressEffects
  10988. ), parentFiber = parentFiber.sibling;
  10989. }
  10990. function commitOffscreenPassiveMountEffects(current2, finishedWork) {
  10991. var previousCache = null;
  10992. null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (previousCache = current2.memoizedState.cachePool.pool);
  10993. current2 = null;
  10994. null !== finishedWork.memoizedState && null !== finishedWork.memoizedState.cachePool && (current2 = finishedWork.memoizedState.cachePool.pool);
  10995. current2 !== previousCache && (null != current2 && retainCache(current2), null != previousCache && releaseCache(previousCache));
  10996. }
  10997. function commitCachePassiveMountEffect(current2, finishedWork) {
  10998. current2 = null;
  10999. null !== finishedWork.alternate && (current2 = finishedWork.alternate.memoizedState.cache);
  11000. finishedWork = finishedWork.memoizedState.cache;
  11001. finishedWork !== current2 && (retainCache(finishedWork), null != current2 && releaseCache(current2));
  11002. }
  11003. function recursivelyTraversePassiveMountEffects(root2, parentFiber, committedLanes, committedTransitions, endTime) {
  11004. if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
  11005. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  11006. var nextSibling = parentFiber.sibling;
  11007. commitPassiveMountOnFiber(
  11008. root2,
  11009. parentFiber,
  11010. committedLanes,
  11011. committedTransitions,
  11012. null !== nextSibling ? nextSibling.actualStartTime : endTime
  11013. );
  11014. parentFiber = nextSibling;
  11015. }
  11016. }
  11017. function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions, endTime) {
  11018. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality, flags = finishedWork.flags;
  11019. switch (finishedWork.tag) {
  11020. case 0:
  11021. case 11:
  11022. case 15:
  11023. (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
  11024. finishedWork,
  11025. finishedWork.actualStartTime,
  11026. endTime,
  11027. inHydratedSubtree,
  11028. committedLanes
  11029. );
  11030. recursivelyTraversePassiveMountEffects(
  11031. finishedRoot,
  11032. finishedWork,
  11033. committedLanes,
  11034. committedTransitions,
  11035. endTime
  11036. );
  11037. flags & 2048 && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
  11038. break;
  11039. case 1:
  11040. (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && (0 !== (finishedWork.flags & 128) ? logComponentErrored(
  11041. finishedWork,
  11042. finishedWork.actualStartTime,
  11043. endTime,
  11044. []
  11045. ) : 0 !== (finishedWork.flags & 1) && logComponentRender(
  11046. finishedWork,
  11047. finishedWork.actualStartTime,
  11048. endTime,
  11049. inHydratedSubtree,
  11050. committedLanes
  11051. ));
  11052. recursivelyTraversePassiveMountEffects(
  11053. finishedRoot,
  11054. finishedWork,
  11055. committedLanes,
  11056. committedTransitions,
  11057. endTime
  11058. );
  11059. break;
  11060. case 3:
  11061. var prevProfilerEffectDuration = pushNestedEffectDurations(), wasInHydratedSubtree = inHydratedSubtree;
  11062. inHydratedSubtree = null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256);
  11063. recursivelyTraversePassiveMountEffects(
  11064. finishedRoot,
  11065. finishedWork,
  11066. committedLanes,
  11067. committedTransitions,
  11068. endTime
  11069. );
  11070. inHydratedSubtree = wasInHydratedSubtree;
  11071. flags & 2048 && (committedLanes = null, null !== finishedWork.alternate && (committedLanes = finishedWork.alternate.memoizedState.cache), committedTransitions = finishedWork.memoizedState.cache, committedTransitions !== committedLanes && (retainCache(committedTransitions), null != committedLanes && releaseCache(committedLanes)));
  11072. finishedRoot.passiveEffectDuration += popNestedEffectDurations(
  11073. prevProfilerEffectDuration
  11074. );
  11075. break;
  11076. case 12:
  11077. if (flags & 2048) {
  11078. flags = pushNestedEffectDurations();
  11079. recursivelyTraversePassiveMountEffects(
  11080. finishedRoot,
  11081. finishedWork,
  11082. committedLanes,
  11083. committedTransitions,
  11084. endTime
  11085. );
  11086. finishedRoot = finishedWork.stateNode;
  11087. finishedRoot.passiveEffectDuration += bubbleNestedEffectDurations(flags);
  11088. try {
  11089. runWithFiberInDEV(
  11090. finishedWork,
  11091. commitProfilerPostCommitImpl,
  11092. finishedWork,
  11093. finishedWork.alternate,
  11094. commitStartTime,
  11095. finishedRoot.passiveEffectDuration
  11096. );
  11097. } catch (error) {
  11098. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  11099. }
  11100. } else
  11101. recursivelyTraversePassiveMountEffects(
  11102. finishedRoot,
  11103. finishedWork,
  11104. committedLanes,
  11105. committedTransitions,
  11106. endTime
  11107. );
  11108. break;
  11109. case 31:
  11110. flags = inHydratedSubtree;
  11111. prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
  11112. wasInHydratedSubtree = finishedWork.memoizedState;
  11113. null !== prevProfilerEffectDuration && null === wasInHydratedSubtree ? (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
  11114. finishedWork,
  11115. finishedWork.actualStartTime,
  11116. endTime,
  11117. prevProfilerEffectDuration
  11118. )) : inHydratedSubtree = true) : inHydratedSubtree = false;
  11119. recursivelyTraversePassiveMountEffects(
  11120. finishedRoot,
  11121. finishedWork,
  11122. committedLanes,
  11123. committedTransitions,
  11124. endTime
  11125. );
  11126. inHydratedSubtree = flags;
  11127. break;
  11128. case 13:
  11129. flags = inHydratedSubtree;
  11130. prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
  11131. wasInHydratedSubtree = finishedWork.memoizedState;
  11132. null === prevProfilerEffectDuration || null === prevProfilerEffectDuration.dehydrated || null !== wasInHydratedSubtree && null !== wasInHydratedSubtree.dehydrated ? inHydratedSubtree = false : (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
  11133. finishedWork,
  11134. finishedWork.actualStartTime,
  11135. endTime,
  11136. prevProfilerEffectDuration
  11137. )) : inHydratedSubtree = true);
  11138. recursivelyTraversePassiveMountEffects(
  11139. finishedRoot,
  11140. finishedWork,
  11141. committedLanes,
  11142. committedTransitions,
  11143. endTime
  11144. );
  11145. inHydratedSubtree = flags;
  11146. break;
  11147. case 23:
  11148. break;
  11149. case 22:
  11150. wasInHydratedSubtree = finishedWork.stateNode;
  11151. prevProfilerEffectDuration = finishedWork.alternate;
  11152. null !== finishedWork.memoizedState ? wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
  11153. finishedRoot,
  11154. finishedWork,
  11155. committedLanes,
  11156. committedTransitions,
  11157. endTime
  11158. ) : recursivelyTraverseAtomicPassiveEffects(
  11159. finishedRoot,
  11160. finishedWork,
  11161. committedLanes,
  11162. committedTransitions,
  11163. endTime
  11164. ) : wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
  11165. finishedRoot,
  11166. finishedWork,
  11167. committedLanes,
  11168. committedTransitions,
  11169. endTime
  11170. ) : (wasInHydratedSubtree._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
  11171. finishedRoot,
  11172. finishedWork,
  11173. committedLanes,
  11174. committedTransitions,
  11175. 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== finishedWork.actualDuration && (null === finishedWork.alternate || finishedWork.alternate.child !== finishedWork.child),
  11176. endTime
  11177. ), (finishedWork.mode & ProfileMode) === NoMode || inHydratedSubtree || (finishedRoot = finishedWork.actualStartTime, 0 <= finishedRoot && 0.05 < endTime - finishedRoot && logComponentReappeared(finishedWork, finishedRoot, endTime), 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
  11178. finishedWork,
  11179. componentEffectStartTime,
  11180. componentEffectEndTime
  11181. )));
  11182. flags & 2048 && commitOffscreenPassiveMountEffects(
  11183. prevProfilerEffectDuration,
  11184. finishedWork
  11185. );
  11186. break;
  11187. case 24:
  11188. recursivelyTraversePassiveMountEffects(
  11189. finishedRoot,
  11190. finishedWork,
  11191. committedLanes,
  11192. committedTransitions,
  11193. endTime
  11194. );
  11195. flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  11196. break;
  11197. default:
  11198. recursivelyTraversePassiveMountEffects(
  11199. finishedRoot,
  11200. finishedWork,
  11201. committedLanes,
  11202. committedTransitions,
  11203. endTime
  11204. );
  11205. }
  11206. if ((finishedWork.mode & ProfileMode) !== NoMode) {
  11207. if (finishedRoot = !inHydratedSubtree && null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate)
  11208. committedLanes = finishedWork.actualStartTime, 0 <= committedLanes && 0.05 < endTime - committedLanes && logComponentTrigger(
  11209. finishedWork,
  11210. committedLanes,
  11211. endTime,
  11212. "Mount"
  11213. );
  11214. 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  11215. finishedWork,
  11216. componentEffectStartTime,
  11217. componentEffectEndTime,
  11218. componentEffectDuration,
  11219. componentEffectErrors
  11220. ), finishedRoot && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
  11221. finishedWork,
  11222. componentEffectStartTime,
  11223. componentEffectEndTime,
  11224. "Mount"
  11225. ));
  11226. }
  11227. popComponentEffectStart(prevEffectStart);
  11228. popComponentEffectDuration(prevEffectDuration);
  11229. componentEffectErrors = prevEffectErrors;
  11230. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11231. alreadyWarnedForDeepEquality = prevDeepEquality;
  11232. }
  11233. function recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
  11234. includeWorkInProgressEffects = includeWorkInProgressEffects && (0 !== (parentFiber.subtreeFlags & 10256) || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child));
  11235. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  11236. var nextSibling = parentFiber.sibling;
  11237. reconnectPassiveEffects(
  11238. finishedRoot,
  11239. parentFiber,
  11240. committedLanes,
  11241. committedTransitions,
  11242. includeWorkInProgressEffects,
  11243. null !== nextSibling ? nextSibling.actualStartTime : endTime
  11244. );
  11245. parentFiber = nextSibling;
  11246. }
  11247. }
  11248. function reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
  11249. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality;
  11250. includeWorkInProgressEffects && (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
  11251. finishedWork,
  11252. finishedWork.actualStartTime,
  11253. endTime,
  11254. inHydratedSubtree,
  11255. committedLanes
  11256. );
  11257. var flags = finishedWork.flags;
  11258. switch (finishedWork.tag) {
  11259. case 0:
  11260. case 11:
  11261. case 15:
  11262. recursivelyTraverseReconnectPassiveEffects(
  11263. finishedRoot,
  11264. finishedWork,
  11265. committedLanes,
  11266. committedTransitions,
  11267. includeWorkInProgressEffects,
  11268. endTime
  11269. );
  11270. commitHookPassiveMountEffects(finishedWork, Passive);
  11271. break;
  11272. case 23:
  11273. break;
  11274. case 22:
  11275. var _instance2 = finishedWork.stateNode;
  11276. null !== finishedWork.memoizedState ? _instance2._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraverseReconnectPassiveEffects(
  11277. finishedRoot,
  11278. finishedWork,
  11279. committedLanes,
  11280. committedTransitions,
  11281. includeWorkInProgressEffects,
  11282. endTime
  11283. ) : recursivelyTraverseAtomicPassiveEffects(
  11284. finishedRoot,
  11285. finishedWork,
  11286. committedLanes,
  11287. committedTransitions,
  11288. endTime
  11289. ) : (_instance2._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
  11290. finishedRoot,
  11291. finishedWork,
  11292. committedLanes,
  11293. committedTransitions,
  11294. includeWorkInProgressEffects,
  11295. endTime
  11296. ));
  11297. includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
  11298. finishedWork.alternate,
  11299. finishedWork
  11300. );
  11301. break;
  11302. case 24:
  11303. recursivelyTraverseReconnectPassiveEffects(
  11304. finishedRoot,
  11305. finishedWork,
  11306. committedLanes,
  11307. committedTransitions,
  11308. includeWorkInProgressEffects,
  11309. endTime
  11310. );
  11311. includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  11312. break;
  11313. default:
  11314. recursivelyTraverseReconnectPassiveEffects(
  11315. finishedRoot,
  11316. finishedWork,
  11317. committedLanes,
  11318. committedTransitions,
  11319. includeWorkInProgressEffects,
  11320. endTime
  11321. );
  11322. }
  11323. (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  11324. finishedWork,
  11325. componentEffectStartTime,
  11326. componentEffectEndTime,
  11327. componentEffectDuration,
  11328. componentEffectErrors
  11329. );
  11330. popComponentEffectStart(prevEffectStart);
  11331. popComponentEffectDuration(prevEffectDuration);
  11332. componentEffectErrors = prevEffectErrors;
  11333. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11334. alreadyWarnedForDeepEquality = prevDeepEquality;
  11335. }
  11336. function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber, committedLanes$jscomp$0, committedTransitions$jscomp$0, endTime$jscomp$0) {
  11337. if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
  11338. for (var child = parentFiber.child; null !== child; ) {
  11339. parentFiber = child.sibling;
  11340. var finishedRoot = finishedRoot$jscomp$0, committedLanes = committedLanes$jscomp$0, committedTransitions = committedTransitions$jscomp$0, endTime = null !== parentFiber ? parentFiber.actualStartTime : endTime$jscomp$0, prevDeepEquality = alreadyWarnedForDeepEquality;
  11341. (child.mode & ProfileMode) !== NoMode && 0 < child.actualStartTime && 0 !== (child.flags & 1) && logComponentRender(
  11342. child,
  11343. child.actualStartTime,
  11344. endTime,
  11345. inHydratedSubtree,
  11346. committedLanes
  11347. );
  11348. var flags = child.flags;
  11349. switch (child.tag) {
  11350. case 22:
  11351. recursivelyTraverseAtomicPassiveEffects(
  11352. finishedRoot,
  11353. child,
  11354. committedLanes,
  11355. committedTransitions,
  11356. endTime
  11357. );
  11358. flags & 2048 && commitOffscreenPassiveMountEffects(child.alternate, child);
  11359. break;
  11360. case 24:
  11361. recursivelyTraverseAtomicPassiveEffects(
  11362. finishedRoot,
  11363. child,
  11364. committedLanes,
  11365. committedTransitions,
  11366. endTime
  11367. );
  11368. flags & 2048 && commitCachePassiveMountEffect(child.alternate, child);
  11369. break;
  11370. default:
  11371. recursivelyTraverseAtomicPassiveEffects(
  11372. finishedRoot,
  11373. child,
  11374. committedLanes,
  11375. committedTransitions,
  11376. endTime
  11377. );
  11378. }
  11379. alreadyWarnedForDeepEquality = prevDeepEquality;
  11380. child = parentFiber;
  11381. }
  11382. }
  11383. function recursivelyAccumulateSuspenseyCommit(parentFiber, committedLanes, suspendedState) {
  11384. if (parentFiber.subtreeFlags & suspenseyCommitFlag)
  11385. for (parentFiber = parentFiber.child; null !== parentFiber; )
  11386. accumulateSuspenseyCommitOnFiber(
  11387. parentFiber,
  11388. committedLanes,
  11389. suspendedState
  11390. ), parentFiber = parentFiber.sibling;
  11391. }
  11392. function accumulateSuspenseyCommitOnFiber(fiber, committedLanes, suspendedState) {
  11393. switch (fiber.tag) {
  11394. case 26:
  11395. recursivelyAccumulateSuspenseyCommit(
  11396. fiber,
  11397. committedLanes,
  11398. suspendedState
  11399. );
  11400. fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState && suspendResource(
  11401. suspendedState,
  11402. currentHoistableRoot,
  11403. fiber.memoizedState,
  11404. fiber.memoizedProps
  11405. );
  11406. break;
  11407. case 5:
  11408. recursivelyAccumulateSuspenseyCommit(
  11409. fiber,
  11410. committedLanes,
  11411. suspendedState
  11412. );
  11413. break;
  11414. case 3:
  11415. case 4:
  11416. var previousHoistableRoot = currentHoistableRoot;
  11417. currentHoistableRoot = getHoistableRoot(
  11418. fiber.stateNode.containerInfo
  11419. );
  11420. recursivelyAccumulateSuspenseyCommit(
  11421. fiber,
  11422. committedLanes,
  11423. suspendedState
  11424. );
  11425. currentHoistableRoot = previousHoistableRoot;
  11426. break;
  11427. case 22:
  11428. null === fiber.memoizedState && (previousHoistableRoot = fiber.alternate, null !== previousHoistableRoot && null !== previousHoistableRoot.memoizedState ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(
  11429. fiber,
  11430. committedLanes,
  11431. suspendedState
  11432. ), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(
  11433. fiber,
  11434. committedLanes,
  11435. suspendedState
  11436. ));
  11437. break;
  11438. default:
  11439. recursivelyAccumulateSuspenseyCommit(
  11440. fiber,
  11441. committedLanes,
  11442. suspendedState
  11443. );
  11444. }
  11445. }
  11446. function detachAlternateSiblings(parentFiber) {
  11447. var previousFiber = parentFiber.alternate;
  11448. if (null !== previousFiber && (parentFiber = previousFiber.child, null !== parentFiber)) {
  11449. previousFiber.child = null;
  11450. do
  11451. previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
  11452. while (null !== parentFiber);
  11453. }
  11454. }
  11455. function recursivelyTraversePassiveUnmountEffects(parentFiber) {
  11456. var deletions = parentFiber.deletions;
  11457. if (0 !== (parentFiber.flags & 16)) {
  11458. if (null !== deletions)
  11459. for (var i = 0; i < deletions.length; i++) {
  11460. var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
  11461. nextEffect = childToDelete;
  11462. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  11463. childToDelete,
  11464. parentFiber
  11465. );
  11466. (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
  11467. childToDelete,
  11468. componentEffectStartTime,
  11469. componentEffectEndTime,
  11470. "Unmount"
  11471. );
  11472. popComponentEffectStart(prevEffectStart);
  11473. }
  11474. detachAlternateSiblings(parentFiber);
  11475. }
  11476. if (parentFiber.subtreeFlags & 10256)
  11477. for (parentFiber = parentFiber.child; null !== parentFiber; )
  11478. commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
  11479. }
  11480. function commitPassiveUnmountOnFiber(finishedWork) {
  11481. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  11482. switch (finishedWork.tag) {
  11483. case 0:
  11484. case 11:
  11485. case 15:
  11486. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11487. finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(
  11488. finishedWork,
  11489. finishedWork.return,
  11490. Passive | HasEffect
  11491. );
  11492. break;
  11493. case 3:
  11494. var prevProfilerEffectDuration = pushNestedEffectDurations();
  11495. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11496. finishedWork.stateNode.passiveEffectDuration += popNestedEffectDurations(prevProfilerEffectDuration);
  11497. break;
  11498. case 12:
  11499. prevProfilerEffectDuration = pushNestedEffectDurations();
  11500. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11501. finishedWork.stateNode.passiveEffectDuration += bubbleNestedEffectDurations(prevProfilerEffectDuration);
  11502. break;
  11503. case 22:
  11504. prevProfilerEffectDuration = finishedWork.stateNode;
  11505. null !== finishedWork.memoizedState && prevProfilerEffectDuration._visibility & OffscreenPassiveEffectsConnected && (null === finishedWork.return || 13 !== finishedWork.return.tag) ? (prevProfilerEffectDuration._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
  11506. finishedWork,
  11507. componentEffectStartTime,
  11508. componentEffectEndTime,
  11509. "Disconnect"
  11510. )) : recursivelyTraversePassiveUnmountEffects(finishedWork);
  11511. break;
  11512. default:
  11513. recursivelyTraversePassiveUnmountEffects(finishedWork);
  11514. }
  11515. (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  11516. finishedWork,
  11517. componentEffectStartTime,
  11518. componentEffectEndTime,
  11519. componentEffectDuration,
  11520. componentEffectErrors
  11521. );
  11522. popComponentEffectStart(prevEffectStart);
  11523. popComponentEffectDuration(prevEffectDuration);
  11524. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11525. componentEffectErrors = prevEffectErrors;
  11526. }
  11527. function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
  11528. var deletions = parentFiber.deletions;
  11529. if (0 !== (parentFiber.flags & 16)) {
  11530. if (null !== deletions)
  11531. for (var i = 0; i < deletions.length; i++) {
  11532. var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
  11533. nextEffect = childToDelete;
  11534. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  11535. childToDelete,
  11536. parentFiber
  11537. );
  11538. (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
  11539. childToDelete,
  11540. componentEffectStartTime,
  11541. componentEffectEndTime,
  11542. "Unmount"
  11543. );
  11544. popComponentEffectStart(prevEffectStart);
  11545. }
  11546. detachAlternateSiblings(parentFiber);
  11547. }
  11548. for (parentFiber = parentFiber.child; null !== parentFiber; )
  11549. disconnectPassiveEffect(parentFiber), parentFiber = parentFiber.sibling;
  11550. }
  11551. function disconnectPassiveEffect(finishedWork) {
  11552. var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  11553. switch (finishedWork.tag) {
  11554. case 0:
  11555. case 11:
  11556. case 15:
  11557. commitHookPassiveUnmountEffects(
  11558. finishedWork,
  11559. finishedWork.return,
  11560. Passive
  11561. );
  11562. recursivelyTraverseDisconnectPassiveEffects(finishedWork);
  11563. break;
  11564. case 22:
  11565. var instance = finishedWork.stateNode;
  11566. instance._visibility & OffscreenPassiveEffectsConnected && (instance._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork));
  11567. break;
  11568. default:
  11569. recursivelyTraverseDisconnectPassiveEffects(finishedWork);
  11570. }
  11571. (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  11572. finishedWork,
  11573. componentEffectStartTime,
  11574. componentEffectEndTime,
  11575. componentEffectDuration,
  11576. componentEffectErrors
  11577. );
  11578. popComponentEffectStart(prevEffectStart);
  11579. popComponentEffectDuration(prevEffectDuration);
  11580. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11581. componentEffectErrors = prevEffectErrors;
  11582. }
  11583. function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor$jscomp$0) {
  11584. for (; null !== nextEffect; ) {
  11585. var fiber = nextEffect, current2 = fiber, nearestMountedAncestor = nearestMountedAncestor$jscomp$0, prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  11586. switch (current2.tag) {
  11587. case 0:
  11588. case 11:
  11589. case 15:
  11590. commitHookPassiveUnmountEffects(
  11591. current2,
  11592. nearestMountedAncestor,
  11593. Passive
  11594. );
  11595. break;
  11596. case 23:
  11597. case 22:
  11598. null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (nearestMountedAncestor = current2.memoizedState.cachePool.pool, null != nearestMountedAncestor && retainCache(nearestMountedAncestor));
  11599. break;
  11600. case 24:
  11601. releaseCache(current2.memoizedState.cache);
  11602. }
  11603. (current2.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
  11604. current2,
  11605. componentEffectStartTime,
  11606. componentEffectEndTime,
  11607. componentEffectDuration,
  11608. componentEffectErrors
  11609. );
  11610. popComponentEffectStart(prevEffectStart);
  11611. popComponentEffectDuration(prevEffectDuration);
  11612. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  11613. componentEffectErrors = prevEffectErrors;
  11614. current2 = fiber.child;
  11615. if (null !== current2) current2.return = fiber, nextEffect = current2;
  11616. else
  11617. a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
  11618. current2 = nextEffect;
  11619. prevEffectStart = current2.sibling;
  11620. prevEffectDuration = current2.return;
  11621. detachFiberAfterEffects(current2);
  11622. if (current2 === fiber) {
  11623. nextEffect = null;
  11624. break a;
  11625. }
  11626. if (null !== prevEffectStart) {
  11627. prevEffectStart.return = prevEffectDuration;
  11628. nextEffect = prevEffectStart;
  11629. break a;
  11630. }
  11631. nextEffect = prevEffectDuration;
  11632. }
  11633. }
  11634. }
  11635. function onCommitRoot() {
  11636. commitHooks.forEach(function(commitHook) {
  11637. return commitHook();
  11638. });
  11639. }
  11640. function isConcurrentActEnvironment() {
  11641. var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT ? IS_REACT_ACT_ENVIRONMENT : void 0;
  11642. isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || console.error(
  11643. "The current testing environment is not configured to support act(...)"
  11644. );
  11645. return isReactActEnvironmentGlobal;
  11646. }
  11647. function requestUpdateLane(fiber) {
  11648. if ((executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes)
  11649. return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
  11650. var transition = ReactSharedInternals.T;
  11651. return null !== transition ? (transition._updatedFibers || (transition._updatedFibers = /* @__PURE__ */ new Set()), transition._updatedFibers.add(fiber), requestTransitionLane()) : resolveUpdatePriority();
  11652. }
  11653. function requestDeferredLane() {
  11654. if (0 === workInProgressDeferredLane)
  11655. if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {
  11656. var lane = nextTransitionDeferredLane;
  11657. nextTransitionDeferredLane <<= 1;
  11658. 0 === (nextTransitionDeferredLane & 3932160) && (nextTransitionDeferredLane = 262144);
  11659. workInProgressDeferredLane = lane;
  11660. } else workInProgressDeferredLane = 536870912;
  11661. lane = suspenseHandlerStackCursor.current;
  11662. null !== lane && (lane.flags |= 32);
  11663. return workInProgressDeferredLane;
  11664. }
  11665. function scheduleUpdateOnFiber(root2, fiber, lane) {
  11666. isRunningInsertionEffect && console.error("useInsertionEffect must not schedule updates.");
  11667. isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = true);
  11668. if (root2 === workInProgressRoot && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
  11669. prepareFreshStack(root2, 0), markRootSuspended(
  11670. root2,
  11671. workInProgressRootRenderLanes,
  11672. workInProgressDeferredLane,
  11673. false
  11674. );
  11675. markRootUpdated$1(root2, lane);
  11676. if ((executionContext & RenderContext) !== NoContext && root2 === workInProgressRoot) {
  11677. if (isRendering)
  11678. switch (fiber.tag) {
  11679. case 0:
  11680. case 11:
  11681. case 15:
  11682. root2 = workInProgress && getComponentNameFromFiber(workInProgress) || "Unknown";
  11683. didWarnAboutUpdateInRenderForAnotherComponent.has(root2) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root2), fiber = getComponentNameFromFiber(fiber) || "Unknown", console.error(
  11684. "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",
  11685. fiber,
  11686. root2,
  11687. root2
  11688. ));
  11689. break;
  11690. case 1:
  11691. didWarnAboutUpdateInRender || (console.error(
  11692. "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."
  11693. ), didWarnAboutUpdateInRender = true);
  11694. }
  11695. } else
  11696. isDevToolsPresent && addFiberToLanesMap(root2, fiber, lane), warnIfUpdatesNotWrappedWithActDEV(fiber), root2 === workInProgressRoot && ((executionContext & RenderContext) === NoContext && (workInProgressRootInterleavedUpdatedLanes |= lane), workInProgressRootExitStatus === RootSuspendedWithDelay && markRootSuspended(
  11697. root2,
  11698. workInProgressRootRenderLanes,
  11699. workInProgressDeferredLane,
  11700. false
  11701. )), ensureRootIsScheduled(root2);
  11702. }
  11703. function performWorkOnRoot(root2, lanes, forceSync) {
  11704. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  11705. throw Error("Should not already be working.");
  11706. if (0 !== workInProgressRootRenderLanes && null !== workInProgress) {
  11707. var yieldedFiber = workInProgress, yieldEndTime = now$1();
  11708. switch (yieldReason) {
  11709. case SuspendedOnImmediate:
  11710. case SuspendedOnData:
  11711. var startTime = yieldStartTime;
  11712. supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
  11713. console.timeStamp.bind(
  11714. console,
  11715. "Suspended",
  11716. startTime,
  11717. yieldEndTime,
  11718. COMPONENTS_TRACK,
  11719. void 0,
  11720. "primary-light"
  11721. )
  11722. ) : console.timeStamp(
  11723. "Suspended",
  11724. startTime,
  11725. yieldEndTime,
  11726. COMPONENTS_TRACK,
  11727. void 0,
  11728. "primary-light"
  11729. ));
  11730. break;
  11731. case SuspendedOnAction:
  11732. startTime = yieldStartTime;
  11733. supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
  11734. console.timeStamp.bind(
  11735. console,
  11736. "Action",
  11737. startTime,
  11738. yieldEndTime,
  11739. COMPONENTS_TRACK,
  11740. void 0,
  11741. "primary-light"
  11742. )
  11743. ) : console.timeStamp(
  11744. "Action",
  11745. startTime,
  11746. yieldEndTime,
  11747. COMPONENTS_TRACK,
  11748. void 0,
  11749. "primary-light"
  11750. ));
  11751. break;
  11752. default:
  11753. supportsUserTiming && (yieldedFiber = yieldEndTime - yieldStartTime, 3 > yieldedFiber || console.timeStamp(
  11754. "Blocked",
  11755. yieldStartTime,
  11756. yieldEndTime,
  11757. COMPONENTS_TRACK,
  11758. void 0,
  11759. 5 > yieldedFiber ? "primary-light" : 10 > yieldedFiber ? "primary" : 100 > yieldedFiber ? "primary-dark" : "error"
  11760. ));
  11761. }
  11762. }
  11763. startTime = (forceSync = !forceSync && 0 === (lanes & 127) && 0 === (lanes & root2.expiredLanes) || checkIfRootIsPrerendering(root2, lanes)) ? renderRootConcurrent(root2, lanes) : renderRootSync(root2, lanes, true);
  11764. var renderWasConcurrent = forceSync;
  11765. do {
  11766. if (startTime === RootInProgress) {
  11767. workInProgressRootIsPrerendering && !forceSync && markRootSuspended(root2, lanes, 0, false);
  11768. lanes = workInProgressSuspendedReason;
  11769. yieldStartTime = now();
  11770. yieldReason = lanes;
  11771. break;
  11772. } else {
  11773. yieldedFiber = now$1();
  11774. yieldEndTime = root2.current.alternate;
  11775. if (renderWasConcurrent && !isRenderConsistentWithExternalStores(yieldEndTime)) {
  11776. setCurrentTrackFromLanes(lanes);
  11777. yieldEndTime = renderStartTime;
  11778. startTime = yieldedFiber;
  11779. !supportsUserTiming || startTime <= yieldEndTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
  11780. console.timeStamp.bind(
  11781. console,
  11782. "Teared Render",
  11783. yieldEndTime,
  11784. startTime,
  11785. currentTrack,
  11786. LANES_TRACK_GROUP,
  11787. "error"
  11788. )
  11789. ) : console.timeStamp(
  11790. "Teared Render",
  11791. yieldEndTime,
  11792. startTime,
  11793. currentTrack,
  11794. LANES_TRACK_GROUP,
  11795. "error"
  11796. ));
  11797. finalizeRender(lanes, yieldedFiber);
  11798. startTime = renderRootSync(root2, lanes, false);
  11799. renderWasConcurrent = false;
  11800. continue;
  11801. }
  11802. if (startTime === RootErrored) {
  11803. renderWasConcurrent = lanes;
  11804. if (root2.errorRecoveryDisabledLanes & renderWasConcurrent)
  11805. var errorRetryLanes = 0;
  11806. else
  11807. errorRetryLanes = root2.pendingLanes & -536870913, errorRetryLanes = 0 !== errorRetryLanes ? errorRetryLanes : errorRetryLanes & 536870912 ? 536870912 : 0;
  11808. if (0 !== errorRetryLanes) {
  11809. setCurrentTrackFromLanes(lanes);
  11810. logErroredRenderPhase(
  11811. renderStartTime,
  11812. yieldedFiber,
  11813. lanes,
  11814. workInProgressUpdateTask
  11815. );
  11816. finalizeRender(lanes, yieldedFiber);
  11817. lanes = errorRetryLanes;
  11818. a: {
  11819. yieldedFiber = root2;
  11820. startTime = renderWasConcurrent;
  11821. renderWasConcurrent = workInProgressRootConcurrentErrors;
  11822. var wasRootDehydrated = yieldedFiber.current.memoizedState.isDehydrated;
  11823. wasRootDehydrated && (prepareFreshStack(yieldedFiber, errorRetryLanes).flags |= 256);
  11824. errorRetryLanes = renderRootSync(
  11825. yieldedFiber,
  11826. errorRetryLanes,
  11827. false
  11828. );
  11829. if (errorRetryLanes !== RootErrored) {
  11830. if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
  11831. yieldedFiber.errorRecoveryDisabledLanes |= startTime;
  11832. workInProgressRootInterleavedUpdatedLanes |= startTime;
  11833. startTime = RootSuspendedWithDelay;
  11834. break a;
  11835. }
  11836. yieldedFiber = workInProgressRootRecoverableErrors;
  11837. workInProgressRootRecoverableErrors = renderWasConcurrent;
  11838. null !== yieldedFiber && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = yieldedFiber : workInProgressRootRecoverableErrors.push.apply(
  11839. workInProgressRootRecoverableErrors,
  11840. yieldedFiber
  11841. ));
  11842. }
  11843. startTime = errorRetryLanes;
  11844. }
  11845. renderWasConcurrent = false;
  11846. if (startTime !== RootErrored) continue;
  11847. else yieldedFiber = now$1();
  11848. }
  11849. }
  11850. if (startTime === RootFatalErrored) {
  11851. setCurrentTrackFromLanes(lanes);
  11852. logErroredRenderPhase(
  11853. renderStartTime,
  11854. yieldedFiber,
  11855. lanes,
  11856. workInProgressUpdateTask
  11857. );
  11858. finalizeRender(lanes, yieldedFiber);
  11859. prepareFreshStack(root2, 0);
  11860. markRootSuspended(root2, lanes, 0, true);
  11861. break;
  11862. }
  11863. a: {
  11864. forceSync = root2;
  11865. switch (startTime) {
  11866. case RootInProgress:
  11867. case RootFatalErrored:
  11868. throw Error("Root did not complete. This is a bug in React.");
  11869. case RootSuspendedWithDelay:
  11870. if ((lanes & 4194048) !== lanes) break;
  11871. case RootSuspendedAtTheShell:
  11872. setCurrentTrackFromLanes(lanes);
  11873. logSuspendedRenderPhase(
  11874. renderStartTime,
  11875. yieldedFiber,
  11876. lanes,
  11877. workInProgressUpdateTask
  11878. );
  11879. finalizeRender(lanes, yieldedFiber);
  11880. yieldEndTime = lanes;
  11881. 0 !== (yieldEndTime & 127) ? blockingSuspendedTime = yieldedFiber : 0 !== (yieldEndTime & 4194048) && (transitionSuspendedTime = yieldedFiber);
  11882. markRootSuspended(
  11883. forceSync,
  11884. lanes,
  11885. workInProgressDeferredLane,
  11886. !workInProgressRootDidSkipSuspendedSiblings
  11887. );
  11888. break a;
  11889. case RootErrored:
  11890. workInProgressRootRecoverableErrors = null;
  11891. break;
  11892. case RootSuspended:
  11893. case RootCompleted:
  11894. break;
  11895. default:
  11896. throw Error("Unknown root exit status.");
  11897. }
  11898. if (null !== ReactSharedInternals.actQueue)
  11899. commitRoot(
  11900. forceSync,
  11901. yieldEndTime,
  11902. lanes,
  11903. workInProgressRootRecoverableErrors,
  11904. workInProgressTransitions,
  11905. workInProgressRootDidIncludeRecursiveRenderUpdate,
  11906. workInProgressDeferredLane,
  11907. workInProgressRootInterleavedUpdatedLanes,
  11908. workInProgressSuspendedRetryLanes,
  11909. startTime,
  11910. null,
  11911. null,
  11912. renderStartTime,
  11913. yieldedFiber
  11914. );
  11915. else {
  11916. if ((lanes & 62914560) === lanes && (renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(), 10 < renderWasConcurrent)) {
  11917. markRootSuspended(
  11918. forceSync,
  11919. lanes,
  11920. workInProgressDeferredLane,
  11921. !workInProgressRootDidSkipSuspendedSiblings
  11922. );
  11923. if (0 !== getNextLanes(forceSync, 0, true)) break a;
  11924. pendingEffectsLanes = lanes;
  11925. forceSync.timeoutHandle = scheduleTimeout(
  11926. commitRootWhenReady.bind(
  11927. null,
  11928. forceSync,
  11929. yieldEndTime,
  11930. workInProgressRootRecoverableErrors,
  11931. workInProgressTransitions,
  11932. workInProgressRootDidIncludeRecursiveRenderUpdate,
  11933. lanes,
  11934. workInProgressDeferredLane,
  11935. workInProgressRootInterleavedUpdatedLanes,
  11936. workInProgressSuspendedRetryLanes,
  11937. workInProgressRootDidSkipSuspendedSiblings,
  11938. startTime,
  11939. "Throttled",
  11940. renderStartTime,
  11941. yieldedFiber
  11942. ),
  11943. renderWasConcurrent
  11944. );
  11945. break a;
  11946. }
  11947. commitRootWhenReady(
  11948. forceSync,
  11949. yieldEndTime,
  11950. workInProgressRootRecoverableErrors,
  11951. workInProgressTransitions,
  11952. workInProgressRootDidIncludeRecursiveRenderUpdate,
  11953. lanes,
  11954. workInProgressDeferredLane,
  11955. workInProgressRootInterleavedUpdatedLanes,
  11956. workInProgressSuspendedRetryLanes,
  11957. workInProgressRootDidSkipSuspendedSiblings,
  11958. startTime,
  11959. null,
  11960. renderStartTime,
  11961. yieldedFiber
  11962. );
  11963. }
  11964. }
  11965. }
  11966. break;
  11967. } while (1);
  11968. ensureRootIsScheduled(root2);
  11969. }
  11970. function commitRootWhenReady(root2, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
  11971. root2.timeoutHandle = noTimeout;
  11972. var subtreeFlags = finishedWork.subtreeFlags, suspendedState = null;
  11973. if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) {
  11974. if (suspendedState = {
  11975. stylesheets: null,
  11976. count: 0,
  11977. imgCount: 0,
  11978. imgBytes: 0,
  11979. suspenseyImages: [],
  11980. waitingForImages: true,
  11981. waitingForViewTransition: false,
  11982. unsuspend: noop$1
  11983. }, accumulateSuspenseyCommitOnFiber(finishedWork, lanes, suspendedState), subtreeFlags = (lanes & 62914560) === lanes ? globalMostRecentFallbackTime - now$1() : (lanes & 4194048) === lanes ? globalMostRecentTransitionTime - now$1() : 0, subtreeFlags = waitForCommitToBeReady(suspendedState, subtreeFlags), null !== subtreeFlags) {
  11984. pendingEffectsLanes = lanes;
  11985. root2.cancelPendingCommit = subtreeFlags(
  11986. commitRoot.bind(
  11987. null,
  11988. root2,
  11989. finishedWork,
  11990. lanes,
  11991. recoverableErrors,
  11992. transitions,
  11993. didIncludeRenderPhaseUpdate,
  11994. spawnedLane,
  11995. updatedLanes,
  11996. suspendedRetryLanes,
  11997. exitStatus,
  11998. suspendedState,
  11999. suspendedState.waitingForViewTransition ? "Waiting for the previous Animation" : 0 < suspendedState.count ? 0 < suspendedState.imgCount ? "Suspended on CSS and Images" : "Suspended on CSS" : 1 === suspendedState.imgCount ? "Suspended on an Image" : 0 < suspendedState.imgCount ? "Suspended on Images" : null,
  12000. completedRenderStartTime,
  12001. completedRenderEndTime
  12002. )
  12003. );
  12004. markRootSuspended(
  12005. root2,
  12006. lanes,
  12007. spawnedLane,
  12008. !didSkipSuspendedSiblings
  12009. );
  12010. return;
  12011. }
  12012. }
  12013. commitRoot(
  12014. root2,
  12015. finishedWork,
  12016. lanes,
  12017. recoverableErrors,
  12018. transitions,
  12019. didIncludeRenderPhaseUpdate,
  12020. spawnedLane,
  12021. updatedLanes,
  12022. suspendedRetryLanes,
  12023. exitStatus,
  12024. suspendedState,
  12025. suspendedCommitReason,
  12026. completedRenderStartTime,
  12027. completedRenderEndTime
  12028. );
  12029. }
  12030. function isRenderConsistentWithExternalStores(finishedWork) {
  12031. for (var node = finishedWork; ; ) {
  12032. var tag = node.tag;
  12033. if ((0 === tag || 11 === tag || 15 === tag) && node.flags & 16384 && (tag = node.updateQueue, null !== tag && (tag = tag.stores, null !== tag)))
  12034. for (var i = 0; i < tag.length; i++) {
  12035. var check = tag[i], getSnapshot = check.getSnapshot;
  12036. check = check.value;
  12037. try {
  12038. if (!objectIs(getSnapshot(), check)) return false;
  12039. } catch (error) {
  12040. return false;
  12041. }
  12042. }
  12043. tag = node.child;
  12044. if (node.subtreeFlags & 16384 && null !== tag)
  12045. tag.return = node, node = tag;
  12046. else {
  12047. if (node === finishedWork) break;
  12048. for (; null === node.sibling; ) {
  12049. if (null === node.return || node.return === finishedWork) return true;
  12050. node = node.return;
  12051. }
  12052. node.sibling.return = node.return;
  12053. node = node.sibling;
  12054. }
  12055. }
  12056. return true;
  12057. }
  12058. function markRootSuspended(root2, suspendedLanes, spawnedLane, didAttemptEntireTree) {
  12059. suspendedLanes &= ~workInProgressRootPingedLanes;
  12060. suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
  12061. root2.suspendedLanes |= suspendedLanes;
  12062. root2.pingedLanes &= ~suspendedLanes;
  12063. didAttemptEntireTree && (root2.warmLanes |= suspendedLanes);
  12064. didAttemptEntireTree = root2.expirationTimes;
  12065. for (var lanes = suspendedLanes; 0 < lanes; ) {
  12066. var index = 31 - clz32(lanes), lane = 1 << index;
  12067. didAttemptEntireTree[index] = -1;
  12068. lanes &= ~lane;
  12069. }
  12070. 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, suspendedLanes);
  12071. }
  12072. function flushSyncWork$1() {
  12073. return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, false), false) : true;
  12074. }
  12075. function resetWorkInProgressStack() {
  12076. if (null !== workInProgress) {
  12077. if (workInProgressSuspendedReason === NotSuspended)
  12078. var interruptedWork = workInProgress.return;
  12079. else
  12080. interruptedWork = workInProgress, resetContextDependencies(), resetHooksOnUnwind(interruptedWork), thenableState$1 = null, thenableIndexCounter$1 = 0, interruptedWork = workInProgress;
  12081. for (; null !== interruptedWork; )
  12082. unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
  12083. workInProgress = null;
  12084. }
  12085. }
  12086. function finalizeRender(lanes, finalizationTime) {
  12087. 0 !== (lanes & 127) && (blockingClampTime = finalizationTime);
  12088. 0 !== (lanes & 4194048) && (transitionClampTime = finalizationTime);
  12089. 0 !== (lanes & 62914560) && (retryClampTime = finalizationTime);
  12090. 0 !== (lanes & 2080374784) && (idleClampTime = finalizationTime);
  12091. }
  12092. function prepareFreshStack(root2, lanes) {
  12093. supportsUserTiming && (console.timeStamp(
  12094. "Blocking Track",
  12095. 3e-3,
  12096. 3e-3,
  12097. "Blocking",
  12098. LANES_TRACK_GROUP,
  12099. "primary-light"
  12100. ), console.timeStamp(
  12101. "Transition Track",
  12102. 3e-3,
  12103. 3e-3,
  12104. "Transition",
  12105. LANES_TRACK_GROUP,
  12106. "primary-light"
  12107. ), console.timeStamp(
  12108. "Suspense Track",
  12109. 3e-3,
  12110. 3e-3,
  12111. "Suspense",
  12112. LANES_TRACK_GROUP,
  12113. "primary-light"
  12114. ), console.timeStamp(
  12115. "Idle Track",
  12116. 3e-3,
  12117. 3e-3,
  12118. "Idle",
  12119. LANES_TRACK_GROUP,
  12120. "primary-light"
  12121. ));
  12122. var previousRenderStartTime = renderStartTime;
  12123. renderStartTime = now();
  12124. if (0 !== workInProgressRootRenderLanes && 0 < previousRenderStartTime) {
  12125. setCurrentTrackFromLanes(workInProgressRootRenderLanes);
  12126. if (workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootSuspendedWithDelay)
  12127. logSuspendedRenderPhase(
  12128. previousRenderStartTime,
  12129. renderStartTime,
  12130. lanes,
  12131. workInProgressUpdateTask
  12132. );
  12133. else {
  12134. var endTime = renderStartTime, debugTask = workInProgressUpdateTask;
  12135. if (supportsUserTiming && !(endTime <= previousRenderStartTime)) {
  12136. var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", label = (lanes & 536870912) === lanes ? "Prewarm" : (lanes & 201326741) === lanes ? "Interrupted Hydration" : "Interrupted Render";
  12137. debugTask ? debugTask.run(
  12138. console.timeStamp.bind(
  12139. console,
  12140. label,
  12141. previousRenderStartTime,
  12142. endTime,
  12143. currentTrack,
  12144. LANES_TRACK_GROUP,
  12145. color
  12146. )
  12147. ) : console.timeStamp(
  12148. label,
  12149. previousRenderStartTime,
  12150. endTime,
  12151. currentTrack,
  12152. LANES_TRACK_GROUP,
  12153. color
  12154. );
  12155. }
  12156. }
  12157. finalizeRender(workInProgressRootRenderLanes, renderStartTime);
  12158. }
  12159. previousRenderStartTime = workInProgressUpdateTask;
  12160. workInProgressUpdateTask = null;
  12161. if (0 !== (lanes & 127)) {
  12162. workInProgressUpdateTask = blockingUpdateTask;
  12163. debugTask = 0 <= blockingUpdateTime && blockingUpdateTime < blockingClampTime ? blockingClampTime : blockingUpdateTime;
  12164. endTime = 0 <= blockingEventTime && blockingEventTime < blockingClampTime ? blockingClampTime : blockingEventTime;
  12165. color = 0 <= endTime ? endTime : 0 <= debugTask ? debugTask : renderStartTime;
  12166. 0 <= blockingSuspendedTime ? (setCurrentTrackFromLanes(2), logSuspendedWithDelayPhase(
  12167. blockingSuspendedTime,
  12168. color,
  12169. lanes,
  12170. previousRenderStartTime
  12171. )) : 0 !== (animatingLanes & 127) && (setCurrentTrackFromLanes(2), logAnimatingPhase(blockingClampTime, color, animatingTask));
  12172. previousRenderStartTime = debugTask;
  12173. var eventTime = endTime, eventType = blockingEventType, eventIsRepeat = 0 < blockingEventRepeatTime, isSpawnedUpdate = blockingUpdateType === SPAWNED_UPDATE, isPingedUpdate = blockingUpdateType === PINGED_UPDATE;
  12174. debugTask = renderStartTime;
  12175. endTime = blockingUpdateTask;
  12176. color = blockingUpdateMethodName;
  12177. label = blockingUpdateComponentName;
  12178. if (supportsUserTiming) {
  12179. currentTrack = "Blocking";
  12180. 0 < previousRenderStartTime ? previousRenderStartTime > debugTask && (previousRenderStartTime = debugTask) : previousRenderStartTime = debugTask;
  12181. 0 < eventTime ? eventTime > previousRenderStartTime && (eventTime = previousRenderStartTime) : eventTime = previousRenderStartTime;
  12182. if (null !== eventType && previousRenderStartTime > eventTime) {
  12183. var color$jscomp$0 = eventIsRepeat ? "secondary-light" : "warning";
  12184. endTime ? endTime.run(
  12185. console.timeStamp.bind(
  12186. console,
  12187. eventIsRepeat ? "Consecutive" : "Event: " + eventType,
  12188. eventTime,
  12189. previousRenderStartTime,
  12190. currentTrack,
  12191. LANES_TRACK_GROUP,
  12192. color$jscomp$0
  12193. )
  12194. ) : console.timeStamp(
  12195. eventIsRepeat ? "Consecutive" : "Event: " + eventType,
  12196. eventTime,
  12197. previousRenderStartTime,
  12198. currentTrack,
  12199. LANES_TRACK_GROUP,
  12200. color$jscomp$0
  12201. );
  12202. }
  12203. debugTask > previousRenderStartTime && (eventTime = isSpawnedUpdate ? "error" : (lanes & 738197653) === lanes ? "tertiary-light" : "primary-light", isSpawnedUpdate = isPingedUpdate ? "Promise Resolved" : isSpawnedUpdate ? "Cascading Update" : 5 < debugTask - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != label && isPingedUpdate.push(["Component name", label]), null != color && isPingedUpdate.push(["Method name", color]), previousRenderStartTime = {
  12204. start: previousRenderStartTime,
  12205. end: debugTask,
  12206. detail: {
  12207. devtools: {
  12208. properties: isPingedUpdate,
  12209. track: currentTrack,
  12210. trackGroup: LANES_TRACK_GROUP,
  12211. color: eventTime
  12212. }
  12213. }
  12214. }, endTime ? endTime.run(
  12215. performance.measure.bind(
  12216. performance,
  12217. isSpawnedUpdate,
  12218. previousRenderStartTime
  12219. )
  12220. ) : performance.measure(isSpawnedUpdate, previousRenderStartTime));
  12221. }
  12222. blockingUpdateTime = -1.1;
  12223. blockingUpdateType = 0;
  12224. blockingUpdateComponentName = blockingUpdateMethodName = null;
  12225. blockingSuspendedTime = -1.1;
  12226. blockingEventRepeatTime = blockingEventTime;
  12227. blockingEventTime = -1.1;
  12228. blockingClampTime = now();
  12229. }
  12230. 0 !== (lanes & 4194048) && (workInProgressUpdateTask = transitionUpdateTask, debugTask = 0 <= transitionStartTime && transitionStartTime < transitionClampTime ? transitionClampTime : transitionStartTime, previousRenderStartTime = 0 <= transitionUpdateTime && transitionUpdateTime < transitionClampTime ? transitionClampTime : transitionUpdateTime, endTime = 0 <= transitionEventTime && transitionEventTime < transitionClampTime ? transitionClampTime : transitionEventTime, color = 0 <= endTime ? endTime : 0 <= previousRenderStartTime ? previousRenderStartTime : renderStartTime, 0 <= transitionSuspendedTime ? (setCurrentTrackFromLanes(256), logSuspendedWithDelayPhase(
  12231. transitionSuspendedTime,
  12232. color,
  12233. lanes,
  12234. workInProgressUpdateTask
  12235. )) : 0 !== (animatingLanes & 4194048) && (setCurrentTrackFromLanes(256), logAnimatingPhase(transitionClampTime, color, animatingTask)), isPingedUpdate = endTime, eventTime = transitionEventType, eventType = 0 < transitionEventRepeatTime, eventIsRepeat = transitionUpdateType === PINGED_UPDATE, color = renderStartTime, endTime = transitionUpdateTask, label = transitionUpdateMethodName, isSpawnedUpdate = transitionUpdateComponentName, supportsUserTiming && (currentTrack = "Transition", 0 < previousRenderStartTime ? previousRenderStartTime > color && (previousRenderStartTime = color) : previousRenderStartTime = color, 0 < debugTask ? debugTask > previousRenderStartTime && (debugTask = previousRenderStartTime) : debugTask = previousRenderStartTime, 0 < isPingedUpdate ? isPingedUpdate > debugTask && (isPingedUpdate = debugTask) : isPingedUpdate = debugTask, debugTask > isPingedUpdate && null !== eventTime && (color$jscomp$0 = eventType ? "secondary-light" : "warning", endTime ? endTime.run(
  12236. console.timeStamp.bind(
  12237. console,
  12238. eventType ? "Consecutive" : "Event: " + eventTime,
  12239. isPingedUpdate,
  12240. debugTask,
  12241. currentTrack,
  12242. LANES_TRACK_GROUP,
  12243. color$jscomp$0
  12244. )
  12245. ) : console.timeStamp(
  12246. eventType ? "Consecutive" : "Event: " + eventTime,
  12247. isPingedUpdate,
  12248. debugTask,
  12249. currentTrack,
  12250. LANES_TRACK_GROUP,
  12251. color$jscomp$0
  12252. )), previousRenderStartTime > debugTask && (endTime ? endTime.run(
  12253. console.timeStamp.bind(
  12254. console,
  12255. "Action",
  12256. debugTask,
  12257. previousRenderStartTime,
  12258. currentTrack,
  12259. LANES_TRACK_GROUP,
  12260. "primary-dark"
  12261. )
  12262. ) : console.timeStamp(
  12263. "Action",
  12264. debugTask,
  12265. previousRenderStartTime,
  12266. currentTrack,
  12267. LANES_TRACK_GROUP,
  12268. "primary-dark"
  12269. )), color > previousRenderStartTime && (debugTask = eventIsRepeat ? "Promise Resolved" : 5 < color - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != isSpawnedUpdate && isPingedUpdate.push(["Component name", isSpawnedUpdate]), null != label && isPingedUpdate.push(["Method name", label]), previousRenderStartTime = {
  12270. start: previousRenderStartTime,
  12271. end: color,
  12272. detail: {
  12273. devtools: {
  12274. properties: isPingedUpdate,
  12275. track: currentTrack,
  12276. trackGroup: LANES_TRACK_GROUP,
  12277. color: "primary-light"
  12278. }
  12279. }
  12280. }, endTime ? endTime.run(
  12281. performance.measure.bind(
  12282. performance,
  12283. debugTask,
  12284. previousRenderStartTime
  12285. )
  12286. ) : performance.measure(debugTask, previousRenderStartTime))), transitionUpdateTime = transitionStartTime = -1.1, transitionUpdateType = 0, transitionSuspendedTime = -1.1, transitionEventRepeatTime = transitionEventTime, transitionEventTime = -1.1, transitionClampTime = now());
  12287. 0 !== (lanes & 62914560) && 0 !== (animatingLanes & 62914560) && (setCurrentTrackFromLanes(4194304), logAnimatingPhase(retryClampTime, renderStartTime, animatingTask));
  12288. 0 !== (lanes & 2080374784) && 0 !== (animatingLanes & 2080374784) && (setCurrentTrackFromLanes(268435456), logAnimatingPhase(idleClampTime, renderStartTime, animatingTask));
  12289. previousRenderStartTime = root2.timeoutHandle;
  12290. previousRenderStartTime !== noTimeout && (root2.timeoutHandle = noTimeout, cancelTimeout(previousRenderStartTime));
  12291. previousRenderStartTime = root2.cancelPendingCommit;
  12292. null !== previousRenderStartTime && (root2.cancelPendingCommit = null, previousRenderStartTime());
  12293. pendingEffectsLanes = 0;
  12294. resetWorkInProgressStack();
  12295. workInProgressRoot = root2;
  12296. workInProgress = previousRenderStartTime = createWorkInProgress(
  12297. root2.current,
  12298. null
  12299. );
  12300. workInProgressRootRenderLanes = lanes;
  12301. workInProgressSuspendedReason = NotSuspended;
  12302. workInProgressThrownValue = null;
  12303. workInProgressRootDidSkipSuspendedSiblings = false;
  12304. workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root2, lanes);
  12305. workInProgressRootDidAttachPingListener = false;
  12306. workInProgressRootExitStatus = RootInProgress;
  12307. workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0;
  12308. workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
  12309. workInProgressRootDidIncludeRecursiveRenderUpdate = false;
  12310. 0 !== (lanes & 8) && (lanes |= lanes & 32);
  12311. endTime = root2.entangledLanes;
  12312. if (0 !== endTime)
  12313. for (root2 = root2.entanglements, endTime &= lanes; 0 < endTime; )
  12314. debugTask = 31 - clz32(endTime), color = 1 << debugTask, lanes |= root2[debugTask], endTime &= ~color;
  12315. entangledRenderLanes = lanes;
  12316. finishQueueingConcurrentUpdates();
  12317. root2 = getCurrentTime();
  12318. 1e3 < root2 - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = root2);
  12319. ReactStrictModeWarnings.discardPendingWarnings();
  12320. return previousRenderStartTime;
  12321. }
  12322. function handleThrow(root2, thrownValue) {
  12323. currentlyRenderingFiber = null;
  12324. ReactSharedInternals.H = ContextOnlyDispatcher;
  12325. ReactSharedInternals.getCurrentStack = null;
  12326. isRendering = false;
  12327. current = null;
  12328. thrownValue === SuspenseException || thrownValue === SuspenseActionException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnImmediate) : thrownValue === SuspenseyCommitException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnInstance) : workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? SuspendedOnHydration : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then ? SuspendedOnDeprecatedThrowPromise : SuspendedOnError;
  12329. workInProgressThrownValue = thrownValue;
  12330. var erroredWork = workInProgress;
  12331. null === erroredWork ? (workInProgressRootExitStatus = RootFatalErrored, logUncaughtError(
  12332. root2,
  12333. createCapturedValueAtFiber(thrownValue, root2.current)
  12334. )) : erroredWork.mode & ProfileMode && stopProfilerTimerIfRunningAndRecordDuration(erroredWork);
  12335. }
  12336. function shouldRemainOnPreviousScreen() {
  12337. var handler = suspenseHandlerStackCursor.current;
  12338. return null === handler ? true : (workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null === shellBoundary ? true : false : (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes || 0 !== (workInProgressRootRenderLanes & 536870912) ? handler === shellBoundary : false;
  12339. }
  12340. function pushDispatcher() {
  12341. var prevDispatcher = ReactSharedInternals.H;
  12342. ReactSharedInternals.H = ContextOnlyDispatcher;
  12343. return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
  12344. }
  12345. function pushAsyncDispatcher() {
  12346. var prevAsyncDispatcher = ReactSharedInternals.A;
  12347. ReactSharedInternals.A = DefaultAsyncDispatcher;
  12348. return prevAsyncDispatcher;
  12349. }
  12350. function markRenderDerivedCause(fiber) {
  12351. null === workInProgressUpdateTask && (workInProgressUpdateTask = null == fiber._debugTask ? null : fiber._debugTask);
  12352. }
  12353. function renderDidSuspendDelayIfPossible() {
  12354. workInProgressRootExitStatus = RootSuspendedWithDelay;
  12355. workInProgressRootDidSkipSuspendedSiblings || (workInProgressRootRenderLanes & 4194048) !== workInProgressRootRenderLanes && null !== suspenseHandlerStackCursor.current || (workInProgressRootIsPrerendering = true);
  12356. 0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) || null === workInProgressRoot || markRootSuspended(
  12357. workInProgressRoot,
  12358. workInProgressRootRenderLanes,
  12359. workInProgressDeferredLane,
  12360. false
  12361. );
  12362. }
  12363. function renderRootSync(root2, lanes, shouldYieldForPrerendering) {
  12364. var prevExecutionContext = executionContext;
  12365. executionContext |= RenderContext;
  12366. var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
  12367. if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
  12368. if (isDevToolsPresent) {
  12369. var memoizedUpdaters = root2.memoizedUpdaters;
  12370. 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
  12371. movePendingFibersToMemoized(root2, lanes);
  12372. }
  12373. workInProgressTransitions = null;
  12374. prepareFreshStack(root2, lanes);
  12375. }
  12376. lanes = false;
  12377. memoizedUpdaters = workInProgressRootExitStatus;
  12378. a: do
  12379. try {
  12380. if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress) {
  12381. var unitOfWork = workInProgress, thrownValue = workInProgressThrownValue;
  12382. switch (workInProgressSuspendedReason) {
  12383. case SuspendedOnHydration:
  12384. resetWorkInProgressStack();
  12385. memoizedUpdaters = RootSuspendedAtTheShell;
  12386. break a;
  12387. case SuspendedOnImmediate:
  12388. case SuspendedOnData:
  12389. case SuspendedOnAction:
  12390. case SuspendedOnDeprecatedThrowPromise:
  12391. null === suspenseHandlerStackCursor.current && (lanes = true);
  12392. var reason = workInProgressSuspendedReason;
  12393. workInProgressSuspendedReason = NotSuspended;
  12394. workInProgressThrownValue = null;
  12395. throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
  12396. if (shouldYieldForPrerendering && workInProgressRootIsPrerendering) {
  12397. memoizedUpdaters = RootInProgress;
  12398. break a;
  12399. }
  12400. break;
  12401. default:
  12402. reason = workInProgressSuspendedReason, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
  12403. }
  12404. }
  12405. workLoopSync();
  12406. memoizedUpdaters = workInProgressRootExitStatus;
  12407. break;
  12408. } catch (thrownValue$8) {
  12409. handleThrow(root2, thrownValue$8);
  12410. }
  12411. while (1);
  12412. lanes && root2.shellSuspendCounter++;
  12413. resetContextDependencies();
  12414. executionContext = prevExecutionContext;
  12415. ReactSharedInternals.H = prevDispatcher;
  12416. ReactSharedInternals.A = prevAsyncDispatcher;
  12417. null === workInProgress && (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates());
  12418. return memoizedUpdaters;
  12419. }
  12420. function workLoopSync() {
  12421. for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
  12422. }
  12423. function renderRootConcurrent(root2, lanes) {
  12424. var prevExecutionContext = executionContext;
  12425. executionContext |= RenderContext;
  12426. var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
  12427. if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
  12428. if (isDevToolsPresent) {
  12429. var memoizedUpdaters = root2.memoizedUpdaters;
  12430. 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
  12431. movePendingFibersToMemoized(root2, lanes);
  12432. }
  12433. workInProgressTransitions = null;
  12434. workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;
  12435. prepareFreshStack(root2, lanes);
  12436. } else
  12437. workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
  12438. root2,
  12439. lanes
  12440. );
  12441. a: do
  12442. try {
  12443. if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress)
  12444. b: switch (lanes = workInProgress, memoizedUpdaters = workInProgressThrownValue, workInProgressSuspendedReason) {
  12445. case SuspendedOnError:
  12446. workInProgressSuspendedReason = NotSuspended;
  12447. workInProgressThrownValue = null;
  12448. throwAndUnwindWorkLoop(
  12449. root2,
  12450. lanes,
  12451. memoizedUpdaters,
  12452. SuspendedOnError
  12453. );
  12454. break;
  12455. case SuspendedOnData:
  12456. case SuspendedOnAction:
  12457. if (isThenableResolved(memoizedUpdaters)) {
  12458. workInProgressSuspendedReason = NotSuspended;
  12459. workInProgressThrownValue = null;
  12460. replaySuspendedUnitOfWork(lanes);
  12461. break;
  12462. }
  12463. lanes = function() {
  12464. workInProgressSuspendedReason !== SuspendedOnData && workInProgressSuspendedReason !== SuspendedOnAction || workInProgressRoot !== root2 || (workInProgressSuspendedReason = SuspendedAndReadyToContinue);
  12465. ensureRootIsScheduled(root2);
  12466. };
  12467. memoizedUpdaters.then(lanes, lanes);
  12468. break a;
  12469. case SuspendedOnImmediate:
  12470. workInProgressSuspendedReason = SuspendedAndReadyToContinue;
  12471. break a;
  12472. case SuspendedOnInstance:
  12473. workInProgressSuspendedReason = SuspendedOnInstanceAndReadyToContinue;
  12474. break a;
  12475. case SuspendedAndReadyToContinue:
  12476. isThenableResolved(memoizedUpdaters) ? (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes)) : (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(
  12477. root2,
  12478. lanes,
  12479. memoizedUpdaters,
  12480. SuspendedAndReadyToContinue
  12481. ));
  12482. break;
  12483. case SuspendedOnInstanceAndReadyToContinue:
  12484. var resource = null;
  12485. switch (workInProgress.tag) {
  12486. case 26:
  12487. resource = workInProgress.memoizedState;
  12488. case 5:
  12489. case 27:
  12490. var hostFiber = workInProgress;
  12491. if (resource ? preloadResource(resource) : hostFiber.stateNode.complete) {
  12492. workInProgressSuspendedReason = NotSuspended;
  12493. workInProgressThrownValue = null;
  12494. var sibling = hostFiber.sibling;
  12495. if (null !== sibling) workInProgress = sibling;
  12496. else {
  12497. var returnFiber = hostFiber.return;
  12498. null !== returnFiber ? (workInProgress = returnFiber, completeUnitOfWork(returnFiber)) : workInProgress = null;
  12499. }
  12500. break b;
  12501. }
  12502. break;
  12503. default:
  12504. console.error(
  12505. "Unexpected type of fiber triggered a suspensey commit. This is a bug in React."
  12506. );
  12507. }
  12508. workInProgressSuspendedReason = NotSuspended;
  12509. workInProgressThrownValue = null;
  12510. throwAndUnwindWorkLoop(
  12511. root2,
  12512. lanes,
  12513. memoizedUpdaters,
  12514. SuspendedOnInstanceAndReadyToContinue
  12515. );
  12516. break;
  12517. case SuspendedOnDeprecatedThrowPromise:
  12518. workInProgressSuspendedReason = NotSuspended;
  12519. workInProgressThrownValue = null;
  12520. throwAndUnwindWorkLoop(
  12521. root2,
  12522. lanes,
  12523. memoizedUpdaters,
  12524. SuspendedOnDeprecatedThrowPromise
  12525. );
  12526. break;
  12527. case SuspendedOnHydration:
  12528. resetWorkInProgressStack();
  12529. workInProgressRootExitStatus = RootSuspendedAtTheShell;
  12530. break a;
  12531. default:
  12532. throw Error(
  12533. "Unexpected SuspendedReason. This is a bug in React."
  12534. );
  12535. }
  12536. null !== ReactSharedInternals.actQueue ? workLoopSync() : workLoopConcurrentByScheduler();
  12537. break;
  12538. } catch (thrownValue$9) {
  12539. handleThrow(root2, thrownValue$9);
  12540. }
  12541. while (1);
  12542. resetContextDependencies();
  12543. ReactSharedInternals.H = prevDispatcher;
  12544. ReactSharedInternals.A = prevAsyncDispatcher;
  12545. executionContext = prevExecutionContext;
  12546. if (null !== workInProgress) return RootInProgress;
  12547. workInProgressRoot = null;
  12548. workInProgressRootRenderLanes = 0;
  12549. finishQueueingConcurrentUpdates();
  12550. return workInProgressRootExitStatus;
  12551. }
  12552. function workLoopConcurrentByScheduler() {
  12553. for (; null !== workInProgress && !shouldYield(); )
  12554. performUnitOfWork(workInProgress);
  12555. }
  12556. function performUnitOfWork(unitOfWork) {
  12557. var current2 = unitOfWork.alternate;
  12558. (unitOfWork.mode & ProfileMode) !== NoMode ? (startProfilerTimer(unitOfWork), current2 = runWithFiberInDEV(
  12559. unitOfWork,
  12560. beginWork,
  12561. current2,
  12562. unitOfWork,
  12563. entangledRenderLanes
  12564. ), stopProfilerTimerIfRunningAndRecordDuration(unitOfWork)) : current2 = runWithFiberInDEV(
  12565. unitOfWork,
  12566. beginWork,
  12567. current2,
  12568. unitOfWork,
  12569. entangledRenderLanes
  12570. );
  12571. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  12572. null === current2 ? completeUnitOfWork(unitOfWork) : workInProgress = current2;
  12573. }
  12574. function replaySuspendedUnitOfWork(unitOfWork) {
  12575. var next = runWithFiberInDEV(unitOfWork, replayBeginWork, unitOfWork);
  12576. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  12577. null === next ? completeUnitOfWork(unitOfWork) : workInProgress = next;
  12578. }
  12579. function replayBeginWork(unitOfWork) {
  12580. var current2 = unitOfWork.alternate, isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;
  12581. isProfilingMode && startProfilerTimer(unitOfWork);
  12582. switch (unitOfWork.tag) {
  12583. case 15:
  12584. case 0:
  12585. current2 = replayFunctionComponent(
  12586. current2,
  12587. unitOfWork,
  12588. unitOfWork.pendingProps,
  12589. unitOfWork.type,
  12590. void 0,
  12591. workInProgressRootRenderLanes
  12592. );
  12593. break;
  12594. case 11:
  12595. current2 = replayFunctionComponent(
  12596. current2,
  12597. unitOfWork,
  12598. unitOfWork.pendingProps,
  12599. unitOfWork.type.render,
  12600. unitOfWork.ref,
  12601. workInProgressRootRenderLanes
  12602. );
  12603. break;
  12604. case 5:
  12605. resetHooksOnUnwind(unitOfWork);
  12606. default:
  12607. unwindInterruptedWork(current2, unitOfWork), unitOfWork = workInProgress = resetWorkInProgress(unitOfWork, entangledRenderLanes), current2 = beginWork(current2, unitOfWork, entangledRenderLanes);
  12608. }
  12609. isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
  12610. return current2;
  12611. }
  12612. function throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, suspendedReason) {
  12613. resetContextDependencies();
  12614. resetHooksOnUnwind(unitOfWork);
  12615. thenableState$1 = null;
  12616. thenableIndexCounter$1 = 0;
  12617. var returnFiber = unitOfWork.return;
  12618. try {
  12619. if (throwException(
  12620. root2,
  12621. returnFiber,
  12622. unitOfWork,
  12623. thrownValue,
  12624. workInProgressRootRenderLanes
  12625. )) {
  12626. workInProgressRootExitStatus = RootFatalErrored;
  12627. logUncaughtError(
  12628. root2,
  12629. createCapturedValueAtFiber(thrownValue, root2.current)
  12630. );
  12631. workInProgress = null;
  12632. return;
  12633. }
  12634. } catch (error) {
  12635. if (null !== returnFiber) throw workInProgress = returnFiber, error;
  12636. workInProgressRootExitStatus = RootFatalErrored;
  12637. logUncaughtError(
  12638. root2,
  12639. createCapturedValueAtFiber(thrownValue, root2.current)
  12640. );
  12641. workInProgress = null;
  12642. return;
  12643. }
  12644. if (unitOfWork.flags & 32768) {
  12645. if (isHydrating || suspendedReason === SuspendedOnError) root2 = true;
  12646. else if (workInProgressRootIsPrerendering || 0 !== (workInProgressRootRenderLanes & 536870912))
  12647. root2 = false;
  12648. else if (workInProgressRootDidSkipSuspendedSiblings = root2 = true, suspendedReason === SuspendedOnData || suspendedReason === SuspendedOnAction || suspendedReason === SuspendedOnImmediate || suspendedReason === SuspendedOnDeprecatedThrowPromise)
  12649. suspendedReason = suspenseHandlerStackCursor.current, null !== suspendedReason && 13 === suspendedReason.tag && (suspendedReason.flags |= 16384);
  12650. unwindUnitOfWork(unitOfWork, root2);
  12651. } else completeUnitOfWork(unitOfWork);
  12652. }
  12653. function completeUnitOfWork(unitOfWork) {
  12654. var completedWork = unitOfWork;
  12655. do {
  12656. if (0 !== (completedWork.flags & 32768)) {
  12657. unwindUnitOfWork(
  12658. completedWork,
  12659. workInProgressRootDidSkipSuspendedSiblings
  12660. );
  12661. return;
  12662. }
  12663. var current2 = completedWork.alternate;
  12664. unitOfWork = completedWork.return;
  12665. startProfilerTimer(completedWork);
  12666. current2 = runWithFiberInDEV(
  12667. completedWork,
  12668. completeWork,
  12669. current2,
  12670. completedWork,
  12671. entangledRenderLanes
  12672. );
  12673. (completedWork.mode & ProfileMode) !== NoMode && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);
  12674. if (null !== current2) {
  12675. workInProgress = current2;
  12676. return;
  12677. }
  12678. completedWork = completedWork.sibling;
  12679. if (null !== completedWork) {
  12680. workInProgress = completedWork;
  12681. return;
  12682. }
  12683. workInProgress = completedWork = unitOfWork;
  12684. } while (null !== completedWork);
  12685. workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted);
  12686. }
  12687. function unwindUnitOfWork(unitOfWork, skipSiblings) {
  12688. do {
  12689. var next = unwindWork(unitOfWork.alternate, unitOfWork);
  12690. if (null !== next) {
  12691. next.flags &= 32767;
  12692. workInProgress = next;
  12693. return;
  12694. }
  12695. if ((unitOfWork.mode & ProfileMode) !== NoMode) {
  12696. stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
  12697. next = unitOfWork.actualDuration;
  12698. for (var child = unitOfWork.child; null !== child; )
  12699. next += child.actualDuration, child = child.sibling;
  12700. unitOfWork.actualDuration = next;
  12701. }
  12702. next = unitOfWork.return;
  12703. null !== next && (next.flags |= 32768, next.subtreeFlags = 0, next.deletions = null);
  12704. if (!skipSiblings && (unitOfWork = unitOfWork.sibling, null !== unitOfWork)) {
  12705. workInProgress = unitOfWork;
  12706. return;
  12707. }
  12708. workInProgress = unitOfWork = next;
  12709. } while (null !== unitOfWork);
  12710. workInProgressRootExitStatus = RootSuspendedAtTheShell;
  12711. workInProgress = null;
  12712. }
  12713. function commitRoot(root2, finishedWork, lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, suspendedRetryLanes, exitStatus, suspendedState, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
  12714. root2.cancelPendingCommit = null;
  12715. do
  12716. flushPendingEffects();
  12717. while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
  12718. ReactStrictModeWarnings.flushLegacyContextWarning();
  12719. ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
  12720. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  12721. throw Error("Should not already be working.");
  12722. setCurrentTrackFromLanes(lanes);
  12723. exitStatus === RootErrored ? logErroredRenderPhase(
  12724. completedRenderStartTime,
  12725. completedRenderEndTime,
  12726. lanes,
  12727. workInProgressUpdateTask
  12728. ) : null !== recoverableErrors ? logRecoveredRenderPhase(
  12729. completedRenderStartTime,
  12730. completedRenderEndTime,
  12731. lanes,
  12732. recoverableErrors,
  12733. null !== finishedWork && null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 !== (finishedWork.flags & 256),
  12734. workInProgressUpdateTask
  12735. ) : logRenderPhase(
  12736. completedRenderStartTime,
  12737. completedRenderEndTime,
  12738. lanes,
  12739. workInProgressUpdateTask
  12740. );
  12741. if (null !== finishedWork) {
  12742. 0 === lanes && console.error(
  12743. "finishedLanes should not be empty during a commit. This is a bug in React."
  12744. );
  12745. if (finishedWork === root2.current)
  12746. throw Error(
  12747. "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
  12748. );
  12749. didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
  12750. didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
  12751. markRootFinished(
  12752. root2,
  12753. lanes,
  12754. didIncludeRenderPhaseUpdate,
  12755. spawnedLane,
  12756. updatedLanes,
  12757. suspendedRetryLanes
  12758. );
  12759. root2 === workInProgressRoot && (workInProgress = workInProgressRoot = null, workInProgressRootRenderLanes = 0);
  12760. pendingFinishedWork = finishedWork;
  12761. pendingEffectsRoot = root2;
  12762. pendingEffectsLanes = lanes;
  12763. pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
  12764. pendingPassiveTransitions = transitions;
  12765. pendingRecoverableErrors = recoverableErrors;
  12766. pendingEffectsRenderEndTime = completedRenderEndTime;
  12767. pendingSuspendedCommitReason = suspendedCommitReason;
  12768. pendingDelayedCommitReason = IMMEDIATE_COMMIT;
  12769. pendingSuspendedViewTransitionReason = null;
  12770. 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) ? (root2.callbackNode = null, root2.callbackPriority = 0, scheduleCallback$1(NormalPriority$1, function() {
  12771. schedulerEvent = window.event;
  12772. pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
  12773. flushPassiveEffects();
  12774. return null;
  12775. })) : (root2.callbackNode = null, root2.callbackPriority = 0);
  12776. commitErrors = null;
  12777. commitStartTime = now();
  12778. null !== suspendedCommitReason && logSuspendedCommitPhase(
  12779. completedRenderEndTime,
  12780. commitStartTime,
  12781. suspendedCommitReason,
  12782. workInProgressUpdateTask
  12783. );
  12784. recoverableErrors = 0 !== (finishedWork.flags & 13878);
  12785. if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
  12786. recoverableErrors = ReactSharedInternals.T;
  12787. ReactSharedInternals.T = null;
  12788. transitions = ReactDOMSharedInternals.p;
  12789. ReactDOMSharedInternals.p = DiscreteEventPriority;
  12790. spawnedLane = executionContext;
  12791. executionContext |= CommitContext;
  12792. try {
  12793. commitBeforeMutationEffects(root2, finishedWork, lanes);
  12794. } finally {
  12795. executionContext = spawnedLane, ReactDOMSharedInternals.p = transitions, ReactSharedInternals.T = recoverableErrors;
  12796. }
  12797. }
  12798. pendingEffectsStatus = PENDING_MUTATION_PHASE;
  12799. flushMutationEffects();
  12800. flushLayoutEffects();
  12801. flushSpawnedWork();
  12802. }
  12803. }
  12804. function flushMutationEffects() {
  12805. if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
  12806. pendingEffectsStatus = NO_PENDING_EFFECTS;
  12807. var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
  12808. if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
  12809. rootMutationHasEffect = ReactSharedInternals.T;
  12810. ReactSharedInternals.T = null;
  12811. var previousPriority = ReactDOMSharedInternals.p;
  12812. ReactDOMSharedInternals.p = DiscreteEventPriority;
  12813. var prevExecutionContext = executionContext;
  12814. executionContext |= CommitContext;
  12815. try {
  12816. inProgressLanes = lanes;
  12817. inProgressRoot = root2;
  12818. resetComponentEffectTimers();
  12819. commitMutationEffectsOnFiber(finishedWork, root2);
  12820. inProgressRoot = inProgressLanes = null;
  12821. lanes = selectionInformation;
  12822. var curFocusedElem = getActiveElementDeep(root2.containerInfo), priorFocusedElem = lanes.focusedElem, priorSelectionRange = lanes.selectionRange;
  12823. if (curFocusedElem !== priorFocusedElem && priorFocusedElem && priorFocusedElem.ownerDocument && containsNode(
  12824. priorFocusedElem.ownerDocument.documentElement,
  12825. priorFocusedElem
  12826. )) {
  12827. if (null !== priorSelectionRange && hasSelectionCapabilities(priorFocusedElem)) {
  12828. var start = priorSelectionRange.start, end = priorSelectionRange.end;
  12829. void 0 === end && (end = start);
  12830. if ("selectionStart" in priorFocusedElem)
  12831. priorFocusedElem.selectionStart = start, priorFocusedElem.selectionEnd = Math.min(
  12832. end,
  12833. priorFocusedElem.value.length
  12834. );
  12835. else {
  12836. var doc = priorFocusedElem.ownerDocument || document, win = doc && doc.defaultView || window;
  12837. if (win.getSelection) {
  12838. var selection = win.getSelection(), length = priorFocusedElem.textContent.length, start$jscomp$0 = Math.min(
  12839. priorSelectionRange.start,
  12840. length
  12841. ), end$jscomp$0 = void 0 === priorSelectionRange.end ? start$jscomp$0 : Math.min(priorSelectionRange.end, length);
  12842. !selection.extend && start$jscomp$0 > end$jscomp$0 && (curFocusedElem = end$jscomp$0, end$jscomp$0 = start$jscomp$0, start$jscomp$0 = curFocusedElem);
  12843. var startMarker = getNodeForCharacterOffset(
  12844. priorFocusedElem,
  12845. start$jscomp$0
  12846. ), endMarker = getNodeForCharacterOffset(
  12847. priorFocusedElem,
  12848. end$jscomp$0
  12849. );
  12850. if (startMarker && endMarker && (1 !== selection.rangeCount || selection.anchorNode !== startMarker.node || selection.anchorOffset !== startMarker.offset || selection.focusNode !== endMarker.node || selection.focusOffset !== endMarker.offset)) {
  12851. var range = doc.createRange();
  12852. range.setStart(startMarker.node, startMarker.offset);
  12853. selection.removeAllRanges();
  12854. start$jscomp$0 > end$jscomp$0 ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset), selection.addRange(range));
  12855. }
  12856. }
  12857. }
  12858. }
  12859. doc = [];
  12860. for (selection = priorFocusedElem; selection = selection.parentNode; )
  12861. 1 === selection.nodeType && doc.push({
  12862. element: selection,
  12863. left: selection.scrollLeft,
  12864. top: selection.scrollTop
  12865. });
  12866. "function" === typeof priorFocusedElem.focus && priorFocusedElem.focus();
  12867. for (priorFocusedElem = 0; priorFocusedElem < doc.length; priorFocusedElem++) {
  12868. var info = doc[priorFocusedElem];
  12869. info.element.scrollLeft = info.left;
  12870. info.element.scrollTop = info.top;
  12871. }
  12872. }
  12873. _enabled = !!eventsEnabled;
  12874. selectionInformation = eventsEnabled = null;
  12875. } finally {
  12876. executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootMutationHasEffect;
  12877. }
  12878. }
  12879. root2.current = finishedWork;
  12880. pendingEffectsStatus = PENDING_LAYOUT_PHASE;
  12881. }
  12882. }
  12883. function flushLayoutEffects() {
  12884. if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
  12885. pendingEffectsStatus = NO_PENDING_EFFECTS;
  12886. var suspendedViewTransitionReason = pendingSuspendedViewTransitionReason;
  12887. if (null !== suspendedViewTransitionReason) {
  12888. commitStartTime = now();
  12889. var startTime = commitEndTime, endTime = commitStartTime;
  12890. !supportsUserTiming || endTime <= startTime || (animatingTask ? animatingTask.run(
  12891. console.timeStamp.bind(
  12892. console,
  12893. suspendedViewTransitionReason,
  12894. startTime,
  12895. endTime,
  12896. currentTrack,
  12897. LANES_TRACK_GROUP,
  12898. "secondary-light"
  12899. )
  12900. ) : console.timeStamp(
  12901. suspendedViewTransitionReason,
  12902. startTime,
  12903. endTime,
  12904. currentTrack,
  12905. LANES_TRACK_GROUP,
  12906. "secondary-light"
  12907. ));
  12908. }
  12909. suspendedViewTransitionReason = pendingEffectsRoot;
  12910. startTime = pendingFinishedWork;
  12911. endTime = pendingEffectsLanes;
  12912. var rootHasLayoutEffect = 0 !== (startTime.flags & 8772);
  12913. if (0 !== (startTime.subtreeFlags & 8772) || rootHasLayoutEffect) {
  12914. rootHasLayoutEffect = ReactSharedInternals.T;
  12915. ReactSharedInternals.T = null;
  12916. var _previousPriority = ReactDOMSharedInternals.p;
  12917. ReactDOMSharedInternals.p = DiscreteEventPriority;
  12918. var _prevExecutionContext = executionContext;
  12919. executionContext |= CommitContext;
  12920. try {
  12921. inProgressLanes = endTime, inProgressRoot = suspendedViewTransitionReason, resetComponentEffectTimers(), commitLayoutEffectOnFiber(
  12922. suspendedViewTransitionReason,
  12923. startTime.alternate,
  12924. startTime
  12925. ), inProgressRoot = inProgressLanes = null;
  12926. } finally {
  12927. executionContext = _prevExecutionContext, ReactDOMSharedInternals.p = _previousPriority, ReactSharedInternals.T = rootHasLayoutEffect;
  12928. }
  12929. }
  12930. suspendedViewTransitionReason = pendingEffectsRenderEndTime;
  12931. startTime = pendingSuspendedCommitReason;
  12932. commitEndTime = now();
  12933. suspendedViewTransitionReason = null === startTime ? suspendedViewTransitionReason : commitStartTime;
  12934. startTime = commitEndTime;
  12935. endTime = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
  12936. rootHasLayoutEffect = workInProgressUpdateTask;
  12937. null !== commitErrors ? logCommitErrored(
  12938. suspendedViewTransitionReason,
  12939. startTime,
  12940. commitErrors,
  12941. false,
  12942. rootHasLayoutEffect
  12943. ) : !supportsUserTiming || startTime <= suspendedViewTransitionReason || (rootHasLayoutEffect ? rootHasLayoutEffect.run(
  12944. console.timeStamp.bind(
  12945. console,
  12946. endTime ? "Commit Interrupted View Transition" : "Commit",
  12947. suspendedViewTransitionReason,
  12948. startTime,
  12949. currentTrack,
  12950. LANES_TRACK_GROUP,
  12951. endTime ? "error" : "secondary-dark"
  12952. )
  12953. ) : console.timeStamp(
  12954. endTime ? "Commit Interrupted View Transition" : "Commit",
  12955. suspendedViewTransitionReason,
  12956. startTime,
  12957. currentTrack,
  12958. LANES_TRACK_GROUP,
  12959. endTime ? "error" : "secondary-dark"
  12960. ));
  12961. pendingEffectsStatus = PENDING_AFTER_MUTATION_PHASE;
  12962. }
  12963. }
  12964. function flushSpawnedWork() {
  12965. if (pendingEffectsStatus === PENDING_SPAWNED_WORK || pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE) {
  12966. if (pendingEffectsStatus === PENDING_SPAWNED_WORK) {
  12967. var startViewTransitionStartTime = commitEndTime;
  12968. commitEndTime = now();
  12969. var endTime = commitEndTime, abortedViewTransition = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
  12970. !supportsUserTiming || endTime <= startViewTransitionStartTime || (animatingTask ? animatingTask.run(
  12971. console.timeStamp.bind(
  12972. console,
  12973. abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
  12974. startViewTransitionStartTime,
  12975. endTime,
  12976. currentTrack,
  12977. LANES_TRACK_GROUP,
  12978. abortedViewTransition ? "error" : "secondary-light"
  12979. )
  12980. ) : console.timeStamp(
  12981. abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
  12982. startViewTransitionStartTime,
  12983. endTime,
  12984. currentTrack,
  12985. LANES_TRACK_GROUP,
  12986. abortedViewTransition ? " error" : "secondary-light"
  12987. ));
  12988. pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT && (pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT);
  12989. }
  12990. pendingEffectsStatus = NO_PENDING_EFFECTS;
  12991. requestPaint();
  12992. startViewTransitionStartTime = pendingEffectsRoot;
  12993. var finishedWork = pendingFinishedWork;
  12994. endTime = pendingEffectsLanes;
  12995. abortedViewTransition = pendingRecoverableErrors;
  12996. var rootDidHavePassiveEffects = 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256);
  12997. rootDidHavePassiveEffects ? pendingEffectsStatus = PENDING_PASSIVE_PHASE : (pendingEffectsStatus = NO_PENDING_EFFECTS, pendingFinishedWork = pendingEffectsRoot = null, releaseRootPooledCache(
  12998. startViewTransitionStartTime,
  12999. startViewTransitionStartTime.pendingLanes
  13000. ), nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null);
  13001. var remainingLanes = startViewTransitionStartTime.pendingLanes;
  13002. 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
  13003. rootDidHavePassiveEffects || commitDoubleInvokeEffectsInDEV(startViewTransitionStartTime);
  13004. remainingLanes = lanesToEventPriority(endTime);
  13005. finishedWork = finishedWork.stateNode;
  13006. if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
  13007. try {
  13008. var didError = 128 === (finishedWork.current.flags & 128);
  13009. switch (remainingLanes) {
  13010. case DiscreteEventPriority:
  13011. var schedulerPriority = ImmediatePriority;
  13012. break;
  13013. case ContinuousEventPriority:
  13014. schedulerPriority = UserBlockingPriority;
  13015. break;
  13016. case DefaultEventPriority:
  13017. schedulerPriority = NormalPriority$1;
  13018. break;
  13019. case IdleEventPriority:
  13020. schedulerPriority = IdlePriority;
  13021. break;
  13022. default:
  13023. schedulerPriority = NormalPriority$1;
  13024. }
  13025. injectedHook.onCommitFiberRoot(
  13026. rendererID,
  13027. finishedWork,
  13028. schedulerPriority,
  13029. didError
  13030. );
  13031. } catch (err) {
  13032. hasLoggedError || (hasLoggedError = true, console.error(
  13033. "React instrumentation encountered an error: %o",
  13034. err
  13035. ));
  13036. }
  13037. isDevToolsPresent && startViewTransitionStartTime.memoizedUpdaters.clear();
  13038. onCommitRoot();
  13039. if (null !== abortedViewTransition) {
  13040. didError = ReactSharedInternals.T;
  13041. schedulerPriority = ReactDOMSharedInternals.p;
  13042. ReactDOMSharedInternals.p = DiscreteEventPriority;
  13043. ReactSharedInternals.T = null;
  13044. try {
  13045. var onRecoverableError = startViewTransitionStartTime.onRecoverableError;
  13046. for (finishedWork = 0; finishedWork < abortedViewTransition.length; finishedWork++) {
  13047. var recoverableError = abortedViewTransition[finishedWork], errorInfo = makeErrorInfo(recoverableError.stack);
  13048. runWithFiberInDEV(
  13049. recoverableError.source,
  13050. onRecoverableError,
  13051. recoverableError.value,
  13052. errorInfo
  13053. );
  13054. }
  13055. } finally {
  13056. ReactSharedInternals.T = didError, ReactDOMSharedInternals.p = schedulerPriority;
  13057. }
  13058. }
  13059. 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
  13060. ensureRootIsScheduled(startViewTransitionStartTime);
  13061. remainingLanes = startViewTransitionStartTime.pendingLanes;
  13062. 0 !== (endTime & 261930) && 0 !== (remainingLanes & 42) ? (nestedUpdateScheduled = true, startViewTransitionStartTime === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = startViewTransitionStartTime)) : nestedUpdateCount = 0;
  13063. rootDidHavePassiveEffects || finalizeRender(endTime, commitEndTime);
  13064. flushSyncWorkAcrossRoots_impl(0, false);
  13065. }
  13066. }
  13067. function makeErrorInfo(componentStack) {
  13068. componentStack = { componentStack };
  13069. Object.defineProperty(componentStack, "digest", {
  13070. get: function() {
  13071. console.error(
  13072. 'You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.'
  13073. );
  13074. }
  13075. });
  13076. return componentStack;
  13077. }
  13078. function releaseRootPooledCache(root2, remainingLanes) {
  13079. 0 === (root2.pooledCacheLanes &= remainingLanes) && (remainingLanes = root2.pooledCache, null != remainingLanes && (root2.pooledCache = null, releaseCache(remainingLanes)));
  13080. }
  13081. function flushPendingEffects() {
  13082. flushMutationEffects();
  13083. flushLayoutEffects();
  13084. flushSpawnedWork();
  13085. return flushPassiveEffects();
  13086. }
  13087. function flushPassiveEffects() {
  13088. if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return false;
  13089. var root2 = pendingEffectsRoot, remainingLanes = pendingEffectsRemainingLanes;
  13090. pendingEffectsRemainingLanes = 0;
  13091. var renderPriority = lanesToEventPriority(pendingEffectsLanes), priority = 0 === DefaultEventPriority || DefaultEventPriority > renderPriority ? DefaultEventPriority : renderPriority;
  13092. renderPriority = ReactSharedInternals.T;
  13093. var previousPriority = ReactDOMSharedInternals.p;
  13094. try {
  13095. ReactDOMSharedInternals.p = priority;
  13096. ReactSharedInternals.T = null;
  13097. var transitions = pendingPassiveTransitions;
  13098. pendingPassiveTransitions = null;
  13099. priority = pendingEffectsRoot;
  13100. var lanes = pendingEffectsLanes;
  13101. pendingEffectsStatus = NO_PENDING_EFFECTS;
  13102. pendingFinishedWork = pendingEffectsRoot = null;
  13103. pendingEffectsLanes = 0;
  13104. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  13105. throw Error("Cannot flush passive effects while already rendering.");
  13106. setCurrentTrackFromLanes(lanes);
  13107. isFlushingPassiveEffects = true;
  13108. didScheduleUpdateDuringPassiveEffects = false;
  13109. var passiveEffectStartTime = 0;
  13110. commitErrors = null;
  13111. passiveEffectStartTime = now$1();
  13112. if (pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT)
  13113. logAnimatingPhase(
  13114. commitEndTime,
  13115. passiveEffectStartTime,
  13116. animatingTask
  13117. );
  13118. else {
  13119. var startTime = commitEndTime, endTime = passiveEffectStartTime, delayedUntilPaint = pendingDelayedCommitReason === DELAYED_PASSIVE_COMMIT;
  13120. !supportsUserTiming || endTime <= startTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
  13121. console.timeStamp.bind(
  13122. console,
  13123. delayedUntilPaint ? "Waiting for Paint" : "Waiting",
  13124. startTime,
  13125. endTime,
  13126. currentTrack,
  13127. LANES_TRACK_GROUP,
  13128. "secondary-light"
  13129. )
  13130. ) : console.timeStamp(
  13131. delayedUntilPaint ? "Waiting for Paint" : "Waiting",
  13132. startTime,
  13133. endTime,
  13134. currentTrack,
  13135. LANES_TRACK_GROUP,
  13136. "secondary-light"
  13137. ));
  13138. }
  13139. startTime = executionContext;
  13140. executionContext |= CommitContext;
  13141. var finishedWork = priority.current;
  13142. resetComponentEffectTimers();
  13143. commitPassiveUnmountOnFiber(finishedWork);
  13144. var finishedWork$jscomp$0 = priority.current;
  13145. finishedWork = pendingEffectsRenderEndTime;
  13146. resetComponentEffectTimers();
  13147. commitPassiveMountOnFiber(
  13148. priority,
  13149. finishedWork$jscomp$0,
  13150. lanes,
  13151. transitions,
  13152. finishedWork
  13153. );
  13154. commitDoubleInvokeEffectsInDEV(priority);
  13155. executionContext = startTime;
  13156. var passiveEffectsEndTime = now$1();
  13157. finishedWork$jscomp$0 = passiveEffectStartTime;
  13158. finishedWork = workInProgressUpdateTask;
  13159. null !== commitErrors ? logCommitErrored(
  13160. finishedWork$jscomp$0,
  13161. passiveEffectsEndTime,
  13162. commitErrors,
  13163. true,
  13164. finishedWork
  13165. ) : !supportsUserTiming || passiveEffectsEndTime <= finishedWork$jscomp$0 || (finishedWork ? finishedWork.run(
  13166. console.timeStamp.bind(
  13167. console,
  13168. "Remaining Effects",
  13169. finishedWork$jscomp$0,
  13170. passiveEffectsEndTime,
  13171. currentTrack,
  13172. LANES_TRACK_GROUP,
  13173. "secondary-dark"
  13174. )
  13175. ) : console.timeStamp(
  13176. "Remaining Effects",
  13177. finishedWork$jscomp$0,
  13178. passiveEffectsEndTime,
  13179. currentTrack,
  13180. LANES_TRACK_GROUP,
  13181. "secondary-dark"
  13182. ));
  13183. finalizeRender(lanes, passiveEffectsEndTime);
  13184. flushSyncWorkAcrossRoots_impl(0, false);
  13185. didScheduleUpdateDuringPassiveEffects ? priority === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = priority) : nestedPassiveUpdateCount = 0;
  13186. didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = false;
  13187. if (injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot)
  13188. try {
  13189. injectedHook.onPostCommitFiberRoot(rendererID, priority);
  13190. } catch (err) {
  13191. hasLoggedError || (hasLoggedError = true, console.error(
  13192. "React instrumentation encountered an error: %o",
  13193. err
  13194. ));
  13195. }
  13196. var stateNode = priority.current.stateNode;
  13197. stateNode.effectDuration = 0;
  13198. stateNode.passiveEffectDuration = 0;
  13199. return true;
  13200. } finally {
  13201. ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = renderPriority, releaseRootPooledCache(root2, remainingLanes);
  13202. }
  13203. }
  13204. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  13205. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  13206. recordEffectError(sourceFiber);
  13207. sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
  13208. rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
  13209. null !== rootFiber && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
  13210. }
  13211. function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
  13212. isRunningInsertionEffect = false;
  13213. if (3 === sourceFiber.tag)
  13214. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  13215. else {
  13216. for (; null !== nearestMountedAncestor; ) {
  13217. if (3 === nearestMountedAncestor.tag) {
  13218. captureCommitPhaseErrorOnRoot(
  13219. nearestMountedAncestor,
  13220. sourceFiber,
  13221. error
  13222. );
  13223. return;
  13224. }
  13225. if (1 === nearestMountedAncestor.tag) {
  13226. var instance = nearestMountedAncestor.stateNode;
  13227. if ("function" === typeof nearestMountedAncestor.type.getDerivedStateFromError || "function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
  13228. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  13229. recordEffectError(sourceFiber);
  13230. error = createClassErrorUpdate(2);
  13231. instance = enqueueUpdate(nearestMountedAncestor, error, 2);
  13232. null !== instance && (initializeClassErrorUpdate(
  13233. error,
  13234. instance,
  13235. nearestMountedAncestor,
  13236. sourceFiber
  13237. ), markRootUpdated$1(instance, 2), ensureRootIsScheduled(instance));
  13238. return;
  13239. }
  13240. }
  13241. nearestMountedAncestor = nearestMountedAncestor.return;
  13242. }
  13243. console.error(
  13244. "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",
  13245. error
  13246. );
  13247. }
  13248. }
  13249. function attachPingListener(root2, wakeable, lanes) {
  13250. var pingCache = root2.pingCache;
  13251. if (null === pingCache) {
  13252. pingCache = root2.pingCache = new PossiblyWeakMap();
  13253. var threadIDs = /* @__PURE__ */ new Set();
  13254. pingCache.set(wakeable, threadIDs);
  13255. } else
  13256. threadIDs = pingCache.get(wakeable), void 0 === threadIDs && (threadIDs = /* @__PURE__ */ new Set(), pingCache.set(wakeable, threadIDs));
  13257. threadIDs.has(lanes) || (workInProgressRootDidAttachPingListener = true, threadIDs.add(lanes), pingCache = pingSuspendedRoot.bind(null, root2, wakeable, lanes), isDevToolsPresent && restorePendingUpdaters(root2, lanes), wakeable.then(pingCache, pingCache));
  13258. }
  13259. function pingSuspendedRoot(root2, wakeable, pingedLanes) {
  13260. var pingCache = root2.pingCache;
  13261. null !== pingCache && pingCache.delete(wakeable);
  13262. root2.pingedLanes |= root2.suspendedLanes & pingedLanes;
  13263. root2.warmLanes &= ~pingedLanes;
  13264. 0 !== (pingedLanes & 127) ? 0 > blockingUpdateTime && (blockingClampTime = blockingUpdateTime = now(), blockingUpdateTask = createTask("Promise Resolved"), blockingUpdateType = PINGED_UPDATE) : 0 !== (pingedLanes & 4194048) && 0 > transitionUpdateTime && (transitionClampTime = transitionUpdateTime = now(), transitionUpdateTask = createTask("Promise Resolved"), transitionUpdateType = PINGED_UPDATE);
  13265. isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && console.error(
  13266. "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act"
  13267. );
  13268. workInProgressRoot === root2 && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS ? (executionContext & RenderContext) === NoContext && prepareFreshStack(root2, 0) : workInProgressRootPingedLanes |= pingedLanes, workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && (workInProgressSuspendedRetryLanes = 0));
  13269. ensureRootIsScheduled(root2);
  13270. }
  13271. function retryTimedOutBoundary(boundaryFiber, retryLane) {
  13272. 0 === retryLane && (retryLane = claimNextRetryLane());
  13273. boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
  13274. null !== boundaryFiber && (markRootUpdated$1(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber));
  13275. }
  13276. function retryDehydratedSuspenseBoundary(boundaryFiber) {
  13277. var suspenseState = boundaryFiber.memoizedState, retryLane = 0;
  13278. null !== suspenseState && (retryLane = suspenseState.retryLane);
  13279. retryTimedOutBoundary(boundaryFiber, retryLane);
  13280. }
  13281. function resolveRetryWakeable(boundaryFiber, wakeable) {
  13282. var retryLane = 0;
  13283. switch (boundaryFiber.tag) {
  13284. case 31:
  13285. case 13:
  13286. var retryCache = boundaryFiber.stateNode;
  13287. var suspenseState = boundaryFiber.memoizedState;
  13288. null !== suspenseState && (retryLane = suspenseState.retryLane);
  13289. break;
  13290. case 19:
  13291. retryCache = boundaryFiber.stateNode;
  13292. break;
  13293. case 22:
  13294. retryCache = boundaryFiber.stateNode._retryCache;
  13295. break;
  13296. default:
  13297. throw Error(
  13298. "Pinged unknown suspense boundary type. This is probably a bug in React."
  13299. );
  13300. }
  13301. null !== retryCache && retryCache.delete(wakeable);
  13302. retryTimedOutBoundary(boundaryFiber, retryLane);
  13303. }
  13304. function recursivelyTraverseAndDoubleInvokeEffectsInDEV(root$jscomp$0, parentFiber, isInStrictMode) {
  13305. if (0 !== (parentFiber.subtreeFlags & 67117056))
  13306. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  13307. var root2 = root$jscomp$0, fiber = parentFiber, isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE;
  13308. isStrictModeFiber = isInStrictMode || isStrictModeFiber;
  13309. 22 !== fiber.tag ? fiber.flags & 67108864 ? isStrictModeFiber && runWithFiberInDEV(
  13310. fiber,
  13311. doubleInvokeEffectsOnFiber,
  13312. root2,
  13313. fiber
  13314. ) : recursivelyTraverseAndDoubleInvokeEffectsInDEV(
  13315. root2,
  13316. fiber,
  13317. isStrictModeFiber
  13318. ) : null === fiber.memoizedState && (isStrictModeFiber && fiber.flags & 8192 ? runWithFiberInDEV(
  13319. fiber,
  13320. doubleInvokeEffectsOnFiber,
  13321. root2,
  13322. fiber
  13323. ) : fiber.subtreeFlags & 67108864 && runWithFiberInDEV(
  13324. fiber,
  13325. recursivelyTraverseAndDoubleInvokeEffectsInDEV,
  13326. root2,
  13327. fiber,
  13328. isStrictModeFiber
  13329. ));
  13330. parentFiber = parentFiber.sibling;
  13331. }
  13332. }
  13333. function doubleInvokeEffectsOnFiber(root2, fiber) {
  13334. setIsStrictModeForDevtools(true);
  13335. try {
  13336. disappearLayoutEffects(fiber), disconnectPassiveEffect(fiber), reappearLayoutEffects(root2, fiber.alternate, fiber, false), reconnectPassiveEffects(root2, fiber, 0, null, false, 0);
  13337. } finally {
  13338. setIsStrictModeForDevtools(false);
  13339. }
  13340. }
  13341. function commitDoubleInvokeEffectsInDEV(root2) {
  13342. var doubleInvokeEffects = true;
  13343. root2.current.mode & (StrictLegacyMode | StrictEffectsMode) || (doubleInvokeEffects = false);
  13344. recursivelyTraverseAndDoubleInvokeEffectsInDEV(
  13345. root2,
  13346. root2.current,
  13347. doubleInvokeEffects
  13348. );
  13349. }
  13350. function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
  13351. if ((executionContext & RenderContext) === NoContext) {
  13352. var tag = fiber.tag;
  13353. if (3 === tag || 1 === tag || 0 === tag || 11 === tag || 14 === tag || 15 === tag) {
  13354. tag = getComponentNameFromFiber(fiber) || "ReactComponent";
  13355. if (null !== didWarnStateUpdateForNotYetMountedComponent) {
  13356. if (didWarnStateUpdateForNotYetMountedComponent.has(tag)) return;
  13357. didWarnStateUpdateForNotYetMountedComponent.add(tag);
  13358. } else didWarnStateUpdateForNotYetMountedComponent = /* @__PURE__ */ new Set([tag]);
  13359. runWithFiberInDEV(fiber, function() {
  13360. console.error(
  13361. "Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead."
  13362. );
  13363. });
  13364. }
  13365. }
  13366. }
  13367. function restorePendingUpdaters(root2, lanes) {
  13368. isDevToolsPresent && root2.memoizedUpdaters.forEach(function(schedulingFiber) {
  13369. addFiberToLanesMap(root2, schedulingFiber, lanes);
  13370. });
  13371. }
  13372. function scheduleCallback$1(priorityLevel, callback) {
  13373. var actQueue = ReactSharedInternals.actQueue;
  13374. return null !== actQueue ? (actQueue.push(callback), fakeActCallbackNode$1) : scheduleCallback$3(priorityLevel, callback);
  13375. }
  13376. function warnIfUpdatesNotWrappedWithActDEV(fiber) {
  13377. isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function() {
  13378. console.error(
  13379. "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act",
  13380. getComponentNameFromFiber(fiber)
  13381. );
  13382. });
  13383. }
  13384. function ensureRootIsScheduled(root2) {
  13385. root2 !== lastScheduledRoot && null === root2.next && (null === lastScheduledRoot ? firstScheduledRoot = lastScheduledRoot = root2 : lastScheduledRoot = lastScheduledRoot.next = root2);
  13386. mightHavePendingSyncWork = true;
  13387. null !== ReactSharedInternals.actQueue ? didScheduleMicrotask_act || (didScheduleMicrotask_act = true, scheduleImmediateRootScheduleTask()) : didScheduleMicrotask || (didScheduleMicrotask = true, scheduleImmediateRootScheduleTask());
  13388. }
  13389. function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
  13390. if (!isFlushingWork && mightHavePendingSyncWork) {
  13391. isFlushingWork = true;
  13392. do {
  13393. var didPerformSomeWork = false;
  13394. for (var root2 = firstScheduledRoot; null !== root2; ) {
  13395. if (!onlyLegacy)
  13396. if (0 !== syncTransitionLanes) {
  13397. var pendingLanes = root2.pendingLanes;
  13398. if (0 === pendingLanes) var nextLanes = 0;
  13399. else {
  13400. var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
  13401. nextLanes = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1;
  13402. nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
  13403. nextLanes = nextLanes & 201326741 ? nextLanes & 201326741 | 1 : nextLanes ? nextLanes | 2 : 0;
  13404. }
  13405. 0 !== nextLanes && (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
  13406. } else
  13407. nextLanes = workInProgressRootRenderLanes, nextLanes = getNextLanes(
  13408. root2,
  13409. root2 === workInProgressRoot ? nextLanes : 0,
  13410. null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
  13411. ), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root2, nextLanes) || (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
  13412. root2 = root2.next;
  13413. }
  13414. } while (didPerformSomeWork);
  13415. isFlushingWork = false;
  13416. }
  13417. }
  13418. function processRootScheduleInImmediateTask() {
  13419. schedulerEvent = window.event;
  13420. processRootScheduleInMicrotask();
  13421. }
  13422. function processRootScheduleInMicrotask() {
  13423. mightHavePendingSyncWork = didScheduleMicrotask_act = didScheduleMicrotask = false;
  13424. var syncTransitionLanes = 0;
  13425. 0 !== currentEventTransitionLane && shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane);
  13426. for (var currentTime = now$1(), prev = null, root2 = firstScheduledRoot; null !== root2; ) {
  13427. var next = root2.next, nextLanes = scheduleTaskForRootDuringMicrotask(root2, currentTime);
  13428. if (0 === nextLanes)
  13429. root2.next = null, null === prev ? firstScheduledRoot = next : prev.next = next, null === next && (lastScheduledRoot = prev);
  13430. else if (prev = root2, 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
  13431. mightHavePendingSyncWork = true;
  13432. root2 = next;
  13433. }
  13434. pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE || flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
  13435. 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
  13436. }
  13437. function scheduleTaskForRootDuringMicrotask(root2, currentTime) {
  13438. for (var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes, expirationTimes = root2.expirationTimes, lanes = root2.pendingLanes & -62914561; 0 < lanes; ) {
  13439. var index = 31 - clz32(lanes), lane = 1 << index, expirationTime = expirationTimes[index];
  13440. if (-1 === expirationTime) {
  13441. if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
  13442. expirationTimes[index] = computeExpirationTime(lane, currentTime);
  13443. } else expirationTime <= currentTime && (root2.expiredLanes |= lane);
  13444. lanes &= ~lane;
  13445. }
  13446. currentTime = workInProgressRoot;
  13447. suspendedLanes = workInProgressRootRenderLanes;
  13448. suspendedLanes = getNextLanes(
  13449. root2,
  13450. root2 === currentTime ? suspendedLanes : 0,
  13451. null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
  13452. );
  13453. pingedLanes = root2.callbackNode;
  13454. if (0 === suspendedLanes || root2 === currentTime && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
  13455. return null !== pingedLanes && cancelCallback(pingedLanes), root2.callbackNode = null, root2.callbackPriority = 0;
  13456. if (0 === (suspendedLanes & 3) || checkIfRootIsPrerendering(root2, suspendedLanes)) {
  13457. currentTime = suspendedLanes & -suspendedLanes;
  13458. if (currentTime !== root2.callbackPriority || null !== ReactSharedInternals.actQueue && pingedLanes !== fakeActCallbackNode)
  13459. cancelCallback(pingedLanes);
  13460. else return currentTime;
  13461. switch (lanesToEventPriority(suspendedLanes)) {
  13462. case DiscreteEventPriority:
  13463. case ContinuousEventPriority:
  13464. suspendedLanes = UserBlockingPriority;
  13465. break;
  13466. case DefaultEventPriority:
  13467. suspendedLanes = NormalPriority$1;
  13468. break;
  13469. case IdleEventPriority:
  13470. suspendedLanes = IdlePriority;
  13471. break;
  13472. default:
  13473. suspendedLanes = NormalPriority$1;
  13474. }
  13475. pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root2);
  13476. null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), suspendedLanes = fakeActCallbackNode) : suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
  13477. root2.callbackPriority = currentTime;
  13478. root2.callbackNode = suspendedLanes;
  13479. return currentTime;
  13480. }
  13481. null !== pingedLanes && cancelCallback(pingedLanes);
  13482. root2.callbackPriority = 2;
  13483. root2.callbackNode = null;
  13484. return 2;
  13485. }
  13486. function performWorkOnRootViaSchedulerTask(root2, didTimeout) {
  13487. nestedUpdateScheduled = currentUpdateIsNested = false;
  13488. schedulerEvent = window.event;
  13489. if (pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE)
  13490. return root2.callbackNode = null, root2.callbackPriority = 0, null;
  13491. var originalCallbackNode = root2.callbackNode;
  13492. pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
  13493. if (flushPendingEffects() && root2.callbackNode !== originalCallbackNode)
  13494. return null;
  13495. var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
  13496. workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
  13497. root2,
  13498. root2 === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
  13499. null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
  13500. );
  13501. if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
  13502. performWorkOnRoot(
  13503. root2,
  13504. workInProgressRootRenderLanes$jscomp$0,
  13505. didTimeout
  13506. );
  13507. scheduleTaskForRootDuringMicrotask(root2, now$1());
  13508. return null != root2.callbackNode && root2.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root2) : null;
  13509. }
  13510. function performSyncWorkOnRoot(root2, lanes) {
  13511. if (flushPendingEffects()) return null;
  13512. currentUpdateIsNested = nestedUpdateScheduled;
  13513. nestedUpdateScheduled = false;
  13514. performWorkOnRoot(root2, lanes, true);
  13515. }
  13516. function cancelCallback(callbackNode) {
  13517. callbackNode !== fakeActCallbackNode && null !== callbackNode && cancelCallback$1(callbackNode);
  13518. }
  13519. function scheduleImmediateRootScheduleTask() {
  13520. null !== ReactSharedInternals.actQueue && ReactSharedInternals.actQueue.push(function() {
  13521. processRootScheduleInMicrotask();
  13522. return null;
  13523. });
  13524. scheduleMicrotask(function() {
  13525. (executionContext & (RenderContext | CommitContext)) !== NoContext ? scheduleCallback$3(
  13526. ImmediatePriority,
  13527. processRootScheduleInImmediateTask
  13528. ) : processRootScheduleInMicrotask();
  13529. });
  13530. }
  13531. function requestTransitionLane() {
  13532. if (0 === currentEventTransitionLane) {
  13533. var actionScopeLane = currentEntangledLane;
  13534. 0 === actionScopeLane && (actionScopeLane = nextTransitionUpdateLane, nextTransitionUpdateLane <<= 1, 0 === (nextTransitionUpdateLane & 261888) && (nextTransitionUpdateLane = 256));
  13535. currentEventTransitionLane = actionScopeLane;
  13536. }
  13537. return currentEventTransitionLane;
  13538. }
  13539. function coerceFormActionProp(actionProp) {
  13540. if (null == actionProp || "symbol" === typeof actionProp || "boolean" === typeof actionProp)
  13541. return null;
  13542. if ("function" === typeof actionProp) return actionProp;
  13543. checkAttributeStringCoercion(actionProp, "action");
  13544. return sanitizeURL("" + actionProp);
  13545. }
  13546. function createFormDataWithSubmitter(form, submitter) {
  13547. var temp = submitter.ownerDocument.createElement("input");
  13548. temp.name = submitter.name;
  13549. temp.value = submitter.value;
  13550. form.id && temp.setAttribute("form", form.id);
  13551. submitter.parentNode.insertBefore(temp, submitter);
  13552. form = new FormData(form);
  13553. temp.parentNode.removeChild(temp);
  13554. return form;
  13555. }
  13556. function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget) {
  13557. if ("submit" === domEventName && maybeTargetInst && maybeTargetInst.stateNode === nativeEventTarget) {
  13558. var action = coerceFormActionProp(
  13559. (nativeEventTarget[internalPropsKey] || null).action
  13560. ), submitter = nativeEvent.submitter;
  13561. submitter && (domEventName = (domEventName = submitter[internalPropsKey] || null) ? coerceFormActionProp(domEventName.formAction) : submitter.getAttribute("formAction"), null !== domEventName && (action = domEventName, submitter = null));
  13562. var event = new SyntheticEvent(
  13563. "action",
  13564. "action",
  13565. null,
  13566. nativeEvent,
  13567. nativeEventTarget
  13568. );
  13569. dispatchQueue.push({
  13570. event,
  13571. listeners: [
  13572. {
  13573. instance: null,
  13574. listener: function() {
  13575. if (nativeEvent.defaultPrevented) {
  13576. if (0 !== currentEventTransitionLane) {
  13577. var formData = submitter ? createFormDataWithSubmitter(
  13578. nativeEventTarget,
  13579. submitter
  13580. ) : new FormData(nativeEventTarget), pendingState = {
  13581. pending: true,
  13582. data: formData,
  13583. method: nativeEventTarget.method,
  13584. action
  13585. };
  13586. Object.freeze(pendingState);
  13587. startHostTransition(
  13588. maybeTargetInst,
  13589. pendingState,
  13590. null,
  13591. formData
  13592. );
  13593. }
  13594. } else
  13595. "function" === typeof action && (event.preventDefault(), formData = submitter ? createFormDataWithSubmitter(
  13596. nativeEventTarget,
  13597. submitter
  13598. ) : new FormData(nativeEventTarget), pendingState = {
  13599. pending: true,
  13600. data: formData,
  13601. method: nativeEventTarget.method,
  13602. action
  13603. }, Object.freeze(pendingState), startHostTransition(
  13604. maybeTargetInst,
  13605. pendingState,
  13606. action,
  13607. formData
  13608. ));
  13609. },
  13610. currentTarget: nativeEventTarget
  13611. }
  13612. ]
  13613. });
  13614. }
  13615. }
  13616. function executeDispatch(event, listener, currentTarget) {
  13617. event.currentTarget = currentTarget;
  13618. try {
  13619. listener(event);
  13620. } catch (error) {
  13621. reportGlobalError(error);
  13622. }
  13623. event.currentTarget = null;
  13624. }
  13625. function processDispatchQueue(dispatchQueue, eventSystemFlags) {
  13626. eventSystemFlags = 0 !== (eventSystemFlags & 4);
  13627. for (var i = 0; i < dispatchQueue.length; i++) {
  13628. var _dispatchQueue$i = dispatchQueue[i];
  13629. a: {
  13630. var previousInstance = void 0, event = _dispatchQueue$i.event;
  13631. _dispatchQueue$i = _dispatchQueue$i.listeners;
  13632. if (eventSystemFlags)
  13633. for (var i$jscomp$0 = _dispatchQueue$i.length - 1; 0 <= i$jscomp$0; i$jscomp$0--) {
  13634. var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget;
  13635. _dispatchListeners$i = _dispatchListeners$i.listener;
  13636. if (instance !== previousInstance && event.isPropagationStopped())
  13637. break a;
  13638. null !== instance ? runWithFiberInDEV(
  13639. instance,
  13640. executeDispatch,
  13641. event,
  13642. _dispatchListeners$i,
  13643. currentTarget
  13644. ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
  13645. previousInstance = instance;
  13646. }
  13647. else
  13648. for (i$jscomp$0 = 0; i$jscomp$0 < _dispatchQueue$i.length; i$jscomp$0++) {
  13649. _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
  13650. instance = _dispatchListeners$i.instance;
  13651. currentTarget = _dispatchListeners$i.currentTarget;
  13652. _dispatchListeners$i = _dispatchListeners$i.listener;
  13653. if (instance !== previousInstance && event.isPropagationStopped())
  13654. break a;
  13655. null !== instance ? runWithFiberInDEV(
  13656. instance,
  13657. executeDispatch,
  13658. event,
  13659. _dispatchListeners$i,
  13660. currentTarget
  13661. ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
  13662. previousInstance = instance;
  13663. }
  13664. }
  13665. }
  13666. }
  13667. function listenToNonDelegatedEvent(domEventName, targetElement) {
  13668. nonDelegatedEvents.has(domEventName) || console.error(
  13669. 'Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',
  13670. domEventName
  13671. );
  13672. var listenerSet = targetElement[internalEventHandlersKey];
  13673. void 0 === listenerSet && (listenerSet = targetElement[internalEventHandlersKey] = /* @__PURE__ */ new Set());
  13674. var listenerSetKey = domEventName + "__bubble";
  13675. listenerSet.has(listenerSetKey) || (addTrappedEventListener(targetElement, domEventName, 2, false), listenerSet.add(listenerSetKey));
  13676. }
  13677. function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
  13678. nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener && console.error(
  13679. 'Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',
  13680. domEventName
  13681. );
  13682. var eventSystemFlags = 0;
  13683. isCapturePhaseListener && (eventSystemFlags |= 4);
  13684. addTrappedEventListener(
  13685. target,
  13686. domEventName,
  13687. eventSystemFlags,
  13688. isCapturePhaseListener
  13689. );
  13690. }
  13691. function listenToAllSupportedEvents(rootContainerElement) {
  13692. if (!rootContainerElement[listeningMarker]) {
  13693. rootContainerElement[listeningMarker] = true;
  13694. allNativeEvents.forEach(function(domEventName) {
  13695. "selectionchange" !== domEventName && (nonDelegatedEvents.has(domEventName) || listenToNativeEvent(domEventName, false, rootContainerElement), listenToNativeEvent(domEventName, true, rootContainerElement));
  13696. });
  13697. var ownerDocument = 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
  13698. null === ownerDocument || ownerDocument[listeningMarker] || (ownerDocument[listeningMarker] = true, listenToNativeEvent("selectionchange", false, ownerDocument));
  13699. }
  13700. }
  13701. function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener) {
  13702. switch (getEventPriority(domEventName)) {
  13703. case DiscreteEventPriority:
  13704. var listenerWrapper = dispatchDiscreteEvent;
  13705. break;
  13706. case ContinuousEventPriority:
  13707. listenerWrapper = dispatchContinuousEvent;
  13708. break;
  13709. default:
  13710. listenerWrapper = dispatchEvent;
  13711. }
  13712. eventSystemFlags = listenerWrapper.bind(
  13713. null,
  13714. domEventName,
  13715. eventSystemFlags,
  13716. targetContainer
  13717. );
  13718. listenerWrapper = void 0;
  13719. !passiveBrowserEventsSupported || "touchstart" !== domEventName && "touchmove" !== domEventName && "wheel" !== domEventName || (listenerWrapper = true);
  13720. isCapturePhaseListener ? void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  13721. capture: true,
  13722. passive: listenerWrapper
  13723. }) : targetContainer.addEventListener(domEventName, eventSystemFlags, true) : void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  13724. passive: listenerWrapper
  13725. }) : targetContainer.addEventListener(
  13726. domEventName,
  13727. eventSystemFlags,
  13728. false
  13729. );
  13730. }
  13731. function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst$jscomp$0, targetContainer) {
  13732. var ancestorInst = targetInst$jscomp$0;
  13733. if (0 === (eventSystemFlags & 1) && 0 === (eventSystemFlags & 2) && null !== targetInst$jscomp$0)
  13734. a: for (; ; ) {
  13735. if (null === targetInst$jscomp$0) return;
  13736. var nodeTag = targetInst$jscomp$0.tag;
  13737. if (3 === nodeTag || 4 === nodeTag) {
  13738. var container = targetInst$jscomp$0.stateNode.containerInfo;
  13739. if (container === targetContainer) break;
  13740. if (4 === nodeTag)
  13741. for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
  13742. var grandTag = nodeTag.tag;
  13743. if ((3 === grandTag || 4 === grandTag) && nodeTag.stateNode.containerInfo === targetContainer)
  13744. return;
  13745. nodeTag = nodeTag.return;
  13746. }
  13747. for (; null !== container; ) {
  13748. nodeTag = getClosestInstanceFromNode(container);
  13749. if (null === nodeTag) return;
  13750. grandTag = nodeTag.tag;
  13751. if (5 === grandTag || 6 === grandTag || 26 === grandTag || 27 === grandTag) {
  13752. targetInst$jscomp$0 = ancestorInst = nodeTag;
  13753. continue a;
  13754. }
  13755. container = container.parentNode;
  13756. }
  13757. }
  13758. targetInst$jscomp$0 = targetInst$jscomp$0.return;
  13759. }
  13760. batchedUpdates$1(function() {
  13761. var targetInst = ancestorInst, nativeEventTarget = getEventTarget(nativeEvent), dispatchQueue = [];
  13762. a: {
  13763. var reactName = topLevelEventsToReactNames.get(domEventName);
  13764. if (void 0 !== reactName) {
  13765. var SyntheticEventCtor = SyntheticEvent, reactEventType = domEventName;
  13766. switch (domEventName) {
  13767. case "keypress":
  13768. if (0 === getEventCharCode(nativeEvent)) break a;
  13769. case "keydown":
  13770. case "keyup":
  13771. SyntheticEventCtor = SyntheticKeyboardEvent;
  13772. break;
  13773. case "focusin":
  13774. reactEventType = "focus";
  13775. SyntheticEventCtor = SyntheticFocusEvent;
  13776. break;
  13777. case "focusout":
  13778. reactEventType = "blur";
  13779. SyntheticEventCtor = SyntheticFocusEvent;
  13780. break;
  13781. case "beforeblur":
  13782. case "afterblur":
  13783. SyntheticEventCtor = SyntheticFocusEvent;
  13784. break;
  13785. case "click":
  13786. if (2 === nativeEvent.button) break a;
  13787. case "auxclick":
  13788. case "dblclick":
  13789. case "mousedown":
  13790. case "mousemove":
  13791. case "mouseup":
  13792. case "mouseout":
  13793. case "mouseover":
  13794. case "contextmenu":
  13795. SyntheticEventCtor = SyntheticMouseEvent;
  13796. break;
  13797. case "drag":
  13798. case "dragend":
  13799. case "dragenter":
  13800. case "dragexit":
  13801. case "dragleave":
  13802. case "dragover":
  13803. case "dragstart":
  13804. case "drop":
  13805. SyntheticEventCtor = SyntheticDragEvent;
  13806. break;
  13807. case "touchcancel":
  13808. case "touchend":
  13809. case "touchmove":
  13810. case "touchstart":
  13811. SyntheticEventCtor = SyntheticTouchEvent;
  13812. break;
  13813. case ANIMATION_END:
  13814. case ANIMATION_ITERATION:
  13815. case ANIMATION_START:
  13816. SyntheticEventCtor = SyntheticAnimationEvent;
  13817. break;
  13818. case TRANSITION_END:
  13819. SyntheticEventCtor = SyntheticTransitionEvent;
  13820. break;
  13821. case "scroll":
  13822. case "scrollend":
  13823. SyntheticEventCtor = SyntheticUIEvent;
  13824. break;
  13825. case "wheel":
  13826. SyntheticEventCtor = SyntheticWheelEvent;
  13827. break;
  13828. case "copy":
  13829. case "cut":
  13830. case "paste":
  13831. SyntheticEventCtor = SyntheticClipboardEvent;
  13832. break;
  13833. case "gotpointercapture":
  13834. case "lostpointercapture":
  13835. case "pointercancel":
  13836. case "pointerdown":
  13837. case "pointermove":
  13838. case "pointerout":
  13839. case "pointerover":
  13840. case "pointerup":
  13841. SyntheticEventCtor = SyntheticPointerEvent;
  13842. break;
  13843. case "toggle":
  13844. case "beforetoggle":
  13845. SyntheticEventCtor = SyntheticToggleEvent;
  13846. }
  13847. var inCapturePhase = 0 !== (eventSystemFlags & 4), accumulateTargetOnly = !inCapturePhase && ("scroll" === domEventName || "scrollend" === domEventName), reactEventName = inCapturePhase ? null !== reactName ? reactName + "Capture" : null : reactName;
  13848. inCapturePhase = [];
  13849. for (var instance = targetInst, lastHostComponent; null !== instance; ) {
  13850. var _instance2 = instance;
  13851. lastHostComponent = _instance2.stateNode;
  13852. _instance2 = _instance2.tag;
  13853. 5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2 || null === lastHostComponent || null === reactEventName || (_instance2 = getListener(instance, reactEventName), null != _instance2 && inCapturePhase.push(
  13854. createDispatchListener(
  13855. instance,
  13856. _instance2,
  13857. lastHostComponent
  13858. )
  13859. ));
  13860. if (accumulateTargetOnly) break;
  13861. instance = instance.return;
  13862. }
  13863. 0 < inCapturePhase.length && (reactName = new SyntheticEventCtor(
  13864. reactName,
  13865. reactEventType,
  13866. null,
  13867. nativeEvent,
  13868. nativeEventTarget
  13869. ), dispatchQueue.push({
  13870. event: reactName,
  13871. listeners: inCapturePhase
  13872. }));
  13873. }
  13874. }
  13875. if (0 === (eventSystemFlags & 7)) {
  13876. a: {
  13877. reactName = "mouseover" === domEventName || "pointerover" === domEventName;
  13878. SyntheticEventCtor = "mouseout" === domEventName || "pointerout" === domEventName;
  13879. if (reactName && nativeEvent !== currentReplayingEvent && (reactEventType = nativeEvent.relatedTarget || nativeEvent.fromElement) && (getClosestInstanceFromNode(reactEventType) || reactEventType[internalContainerInstanceKey]))
  13880. break a;
  13881. if (SyntheticEventCtor || reactName) {
  13882. reactName = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget : (reactName = nativeEventTarget.ownerDocument) ? reactName.defaultView || reactName.parentWindow : window;
  13883. if (SyntheticEventCtor) {
  13884. if (reactEventType = nativeEvent.relatedTarget || nativeEvent.toElement, SyntheticEventCtor = targetInst, reactEventType = reactEventType ? getClosestInstanceFromNode(reactEventType) : null, null !== reactEventType && (accumulateTargetOnly = getNearestMountedFiber(reactEventType), inCapturePhase = reactEventType.tag, reactEventType !== accumulateTargetOnly || 5 !== inCapturePhase && 27 !== inCapturePhase && 6 !== inCapturePhase))
  13885. reactEventType = null;
  13886. } else SyntheticEventCtor = null, reactEventType = targetInst;
  13887. if (SyntheticEventCtor !== reactEventType) {
  13888. inCapturePhase = SyntheticMouseEvent;
  13889. _instance2 = "onMouseLeave";
  13890. reactEventName = "onMouseEnter";
  13891. instance = "mouse";
  13892. if ("pointerout" === domEventName || "pointerover" === domEventName)
  13893. inCapturePhase = SyntheticPointerEvent, _instance2 = "onPointerLeave", reactEventName = "onPointerEnter", instance = "pointer";
  13894. accumulateTargetOnly = null == SyntheticEventCtor ? reactName : getNodeFromInstance(SyntheticEventCtor);
  13895. lastHostComponent = null == reactEventType ? reactName : getNodeFromInstance(reactEventType);
  13896. reactName = new inCapturePhase(
  13897. _instance2,
  13898. instance + "leave",
  13899. SyntheticEventCtor,
  13900. nativeEvent,
  13901. nativeEventTarget
  13902. );
  13903. reactName.target = accumulateTargetOnly;
  13904. reactName.relatedTarget = lastHostComponent;
  13905. _instance2 = null;
  13906. getClosestInstanceFromNode(nativeEventTarget) === targetInst && (inCapturePhase = new inCapturePhase(
  13907. reactEventName,
  13908. instance + "enter",
  13909. reactEventType,
  13910. nativeEvent,
  13911. nativeEventTarget
  13912. ), inCapturePhase.target = lastHostComponent, inCapturePhase.relatedTarget = accumulateTargetOnly, _instance2 = inCapturePhase);
  13913. accumulateTargetOnly = _instance2;
  13914. if (SyntheticEventCtor && reactEventType)
  13915. b: {
  13916. inCapturePhase = getParent;
  13917. reactEventName = SyntheticEventCtor;
  13918. instance = reactEventType;
  13919. lastHostComponent = 0;
  13920. for (_instance2 = reactEventName; _instance2; _instance2 = inCapturePhase(_instance2))
  13921. lastHostComponent++;
  13922. _instance2 = 0;
  13923. for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
  13924. _instance2++;
  13925. for (; 0 < lastHostComponent - _instance2; )
  13926. reactEventName = inCapturePhase(reactEventName), lastHostComponent--;
  13927. for (; 0 < _instance2 - lastHostComponent; )
  13928. instance = inCapturePhase(instance), _instance2--;
  13929. for (; lastHostComponent--; ) {
  13930. if (reactEventName === instance || null !== instance && reactEventName === instance.alternate) {
  13931. inCapturePhase = reactEventName;
  13932. break b;
  13933. }
  13934. reactEventName = inCapturePhase(reactEventName);
  13935. instance = inCapturePhase(instance);
  13936. }
  13937. inCapturePhase = null;
  13938. }
  13939. else inCapturePhase = null;
  13940. null !== SyntheticEventCtor && accumulateEnterLeaveListenersForEvent(
  13941. dispatchQueue,
  13942. reactName,
  13943. SyntheticEventCtor,
  13944. inCapturePhase,
  13945. false
  13946. );
  13947. null !== reactEventType && null !== accumulateTargetOnly && accumulateEnterLeaveListenersForEvent(
  13948. dispatchQueue,
  13949. accumulateTargetOnly,
  13950. reactEventType,
  13951. inCapturePhase,
  13952. true
  13953. );
  13954. }
  13955. }
  13956. }
  13957. a: {
  13958. reactName = targetInst ? getNodeFromInstance(targetInst) : window;
  13959. SyntheticEventCtor = reactName.nodeName && reactName.nodeName.toLowerCase();
  13960. if ("select" === SyntheticEventCtor || "input" === SyntheticEventCtor && "file" === reactName.type)
  13961. var getTargetInstFunc = getTargetInstForChangeEvent;
  13962. else if (isTextInputElement(reactName))
  13963. if (isInputEventSupported)
  13964. getTargetInstFunc = getTargetInstForInputOrChangeEvent;
  13965. else {
  13966. getTargetInstFunc = getTargetInstForInputEventPolyfill;
  13967. var handleEventFunc = handleEventsForInputEventPolyfill;
  13968. }
  13969. else
  13970. SyntheticEventCtor = reactName.nodeName, !SyntheticEventCtor || "input" !== SyntheticEventCtor.toLowerCase() || "checkbox" !== reactName.type && "radio" !== reactName.type ? targetInst && isCustomElement(targetInst.elementType) && (getTargetInstFunc = getTargetInstForChangeEvent) : getTargetInstFunc = getTargetInstForClickEvent;
  13971. if (getTargetInstFunc && (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))) {
  13972. createAndAccumulateChangeEvent(
  13973. dispatchQueue,
  13974. getTargetInstFunc,
  13975. nativeEvent,
  13976. nativeEventTarget
  13977. );
  13978. break a;
  13979. }
  13980. handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
  13981. "focusout" === domEventName && targetInst && "number" === reactName.type && null != targetInst.memoizedProps.value && setDefaultValue(reactName, "number", reactName.value);
  13982. }
  13983. handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
  13984. switch (domEventName) {
  13985. case "focusin":
  13986. if (isTextInputElement(handleEventFunc) || "true" === handleEventFunc.contentEditable)
  13987. activeElement = handleEventFunc, activeElementInst = targetInst, lastSelection = null;
  13988. break;
  13989. case "focusout":
  13990. lastSelection = activeElementInst = activeElement = null;
  13991. break;
  13992. case "mousedown":
  13993. mouseDown = true;
  13994. break;
  13995. case "contextmenu":
  13996. case "mouseup":
  13997. case "dragend":
  13998. mouseDown = false;
  13999. constructSelectEvent(
  14000. dispatchQueue,
  14001. nativeEvent,
  14002. nativeEventTarget
  14003. );
  14004. break;
  14005. case "selectionchange":
  14006. if (skipSelectionChangeEvent) break;
  14007. case "keydown":
  14008. case "keyup":
  14009. constructSelectEvent(
  14010. dispatchQueue,
  14011. nativeEvent,
  14012. nativeEventTarget
  14013. );
  14014. }
  14015. var fallbackData;
  14016. if (canUseCompositionEvent)
  14017. b: {
  14018. switch (domEventName) {
  14019. case "compositionstart":
  14020. var eventType = "onCompositionStart";
  14021. break b;
  14022. case "compositionend":
  14023. eventType = "onCompositionEnd";
  14024. break b;
  14025. case "compositionupdate":
  14026. eventType = "onCompositionUpdate";
  14027. break b;
  14028. }
  14029. eventType = void 0;
  14030. }
  14031. else
  14032. isComposing ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : "keydown" === domEventName && nativeEvent.keyCode === START_KEYCODE && (eventType = "onCompositionStart");
  14033. eventType && (useFallbackCompositionData && "ko" !== nativeEvent.locale && (isComposing || "onCompositionStart" !== eventType ? "onCompositionEnd" === eventType && isComposing && (fallbackData = getData()) : (root = nativeEventTarget, startText = "value" in root ? root.value : root.textContent, isComposing = true)), handleEventFunc = accumulateTwoPhaseListeners(
  14034. targetInst,
  14035. eventType
  14036. ), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
  14037. eventType,
  14038. domEventName,
  14039. null,
  14040. nativeEvent,
  14041. nativeEventTarget
  14042. ), dispatchQueue.push({
  14043. event: eventType,
  14044. listeners: handleEventFunc
  14045. }), fallbackData ? eventType.data = fallbackData : (fallbackData = getDataFromCustomEvent(nativeEvent), null !== fallbackData && (eventType.data = fallbackData))));
  14046. if (fallbackData = canUseTextInputEvent ? getNativeBeforeInputChars(domEventName, nativeEvent) : getFallbackBeforeInputChars(domEventName, nativeEvent))
  14047. eventType = accumulateTwoPhaseListeners(
  14048. targetInst,
  14049. "onBeforeInput"
  14050. ), 0 < eventType.length && (handleEventFunc = new SyntheticInputEvent(
  14051. "onBeforeInput",
  14052. "beforeinput",
  14053. null,
  14054. nativeEvent,
  14055. nativeEventTarget
  14056. ), dispatchQueue.push({
  14057. event: handleEventFunc,
  14058. listeners: eventType
  14059. }), handleEventFunc.data = fallbackData);
  14060. extractEvents$1(
  14061. dispatchQueue,
  14062. domEventName,
  14063. targetInst,
  14064. nativeEvent,
  14065. nativeEventTarget
  14066. );
  14067. }
  14068. processDispatchQueue(dispatchQueue, eventSystemFlags);
  14069. });
  14070. }
  14071. function createDispatchListener(instance, listener, currentTarget) {
  14072. return {
  14073. instance,
  14074. listener,
  14075. currentTarget
  14076. };
  14077. }
  14078. function accumulateTwoPhaseListeners(targetFiber, reactName) {
  14079. for (var captureName = reactName + "Capture", listeners = []; null !== targetFiber; ) {
  14080. var _instance3 = targetFiber, stateNode = _instance3.stateNode;
  14081. _instance3 = _instance3.tag;
  14082. 5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3 || null === stateNode || (_instance3 = getListener(targetFiber, captureName), null != _instance3 && listeners.unshift(
  14083. createDispatchListener(targetFiber, _instance3, stateNode)
  14084. ), _instance3 = getListener(targetFiber, reactName), null != _instance3 && listeners.push(
  14085. createDispatchListener(targetFiber, _instance3, stateNode)
  14086. ));
  14087. if (3 === targetFiber.tag) return listeners;
  14088. targetFiber = targetFiber.return;
  14089. }
  14090. return [];
  14091. }
  14092. function getParent(inst) {
  14093. if (null === inst) return null;
  14094. do
  14095. inst = inst.return;
  14096. while (inst && 5 !== inst.tag && 27 !== inst.tag);
  14097. return inst ? inst : null;
  14098. }
  14099. function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
  14100. for (var registrationName = event._reactName, listeners = []; null !== target && target !== common; ) {
  14101. var _instance4 = target, alternate = _instance4.alternate, stateNode = _instance4.stateNode;
  14102. _instance4 = _instance4.tag;
  14103. if (null !== alternate && alternate === common) break;
  14104. 5 !== _instance4 && 26 !== _instance4 && 27 !== _instance4 || null === stateNode || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), null != stateNode && listeners.unshift(
  14105. createDispatchListener(target, stateNode, alternate)
  14106. )) : inCapturePhase || (stateNode = getListener(target, registrationName), null != stateNode && listeners.push(
  14107. createDispatchListener(target, stateNode, alternate)
  14108. )));
  14109. target = target.return;
  14110. }
  14111. 0 !== listeners.length && dispatchQueue.push({ event, listeners });
  14112. }
  14113. function validatePropertiesInDevelopment(type, props) {
  14114. validateProperties$2(type, props);
  14115. "input" !== type && "textarea" !== type && "select" !== type || null == props || null !== props.value || didWarnValueNull || (didWarnValueNull = true, "select" === type && props.multiple ? console.error(
  14116. "`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",
  14117. type
  14118. ) : console.error(
  14119. "`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
  14120. type
  14121. ));
  14122. var eventRegistry = {
  14123. registrationNameDependencies,
  14124. possibleRegistrationNames
  14125. };
  14126. isCustomElement(type) || "string" === typeof props.is || warnUnknownProperties(type, props, eventRegistry);
  14127. props.contentEditable && !props.suppressContentEditableWarning && null != props.children && console.error(
  14128. "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."
  14129. );
  14130. }
  14131. function warnForPropDifference(propName, serverValue, clientValue, serverDifferences) {
  14132. serverValue !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(serverValue) !== clientValue && (serverDifferences[propName] = serverValue));
  14133. }
  14134. function warnForExtraAttributes(domElement, attributeNames, serverDifferences) {
  14135. attributeNames.forEach(function(attributeName) {
  14136. serverDifferences[getPropNameFromAttributeName(attributeName)] = "style" === attributeName ? getStylesObjectFromElement(domElement) : domElement.getAttribute(attributeName);
  14137. });
  14138. }
  14139. function warnForInvalidEventListener(registrationName, listener) {
  14140. false === listener ? console.error(
  14141. "Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",
  14142. registrationName,
  14143. registrationName,
  14144. registrationName
  14145. ) : console.error(
  14146. "Expected `%s` listener to be a function, instead got a value of `%s` type.",
  14147. registrationName,
  14148. typeof listener
  14149. );
  14150. }
  14151. function normalizeHTML(parent, html) {
  14152. parent = parent.namespaceURI === MATH_NAMESPACE || parent.namespaceURI === SVG_NAMESPACE ? parent.ownerDocument.createElementNS(
  14153. parent.namespaceURI,
  14154. parent.tagName
  14155. ) : parent.ownerDocument.createElement(parent.tagName);
  14156. parent.innerHTML = html;
  14157. return parent.innerHTML;
  14158. }
  14159. function normalizeMarkupForTextOrAttribute(markup) {
  14160. willCoercionThrow(markup) && (console.error(
  14161. "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",
  14162. typeName(markup)
  14163. ), testStringCoercion(markup));
  14164. return ("string" === typeof markup ? markup : "" + markup).replace(NORMALIZE_NEWLINES_REGEX, "\n").replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
  14165. }
  14166. function checkForUnmatchedText(serverText, clientText) {
  14167. clientText = normalizeMarkupForTextOrAttribute(clientText);
  14168. return normalizeMarkupForTextOrAttribute(serverText) === clientText ? true : false;
  14169. }
  14170. function setProp(domElement, tag, key, value, props, prevValue) {
  14171. switch (key) {
  14172. case "children":
  14173. if ("string" === typeof value)
  14174. validateTextNesting(value, tag, false), "body" === tag || "textarea" === tag && "" === value || setTextContent(domElement, value);
  14175. else if ("number" === typeof value || "bigint" === typeof value)
  14176. validateTextNesting("" + value, tag, false), "body" !== tag && setTextContent(domElement, "" + value);
  14177. break;
  14178. case "className":
  14179. setValueForKnownAttribute(domElement, "class", value);
  14180. break;
  14181. case "tabIndex":
  14182. setValueForKnownAttribute(domElement, "tabindex", value);
  14183. break;
  14184. case "dir":
  14185. case "role":
  14186. case "viewBox":
  14187. case "width":
  14188. case "height":
  14189. setValueForKnownAttribute(domElement, key, value);
  14190. break;
  14191. case "style":
  14192. setValueForStyles(domElement, value, prevValue);
  14193. break;
  14194. case "data":
  14195. if ("object" !== tag) {
  14196. setValueForKnownAttribute(domElement, "data", value);
  14197. break;
  14198. }
  14199. case "src":
  14200. case "href":
  14201. if ("" === value && ("a" !== tag || "href" !== key)) {
  14202. "src" === key ? console.error(
  14203. 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  14204. key,
  14205. key
  14206. ) : console.error(
  14207. 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  14208. key,
  14209. key
  14210. );
  14211. domElement.removeAttribute(key);
  14212. break;
  14213. }
  14214. if (null == value || "function" === typeof value || "symbol" === typeof value || "boolean" === typeof value) {
  14215. domElement.removeAttribute(key);
  14216. break;
  14217. }
  14218. checkAttributeStringCoercion(value, key);
  14219. value = sanitizeURL("" + value);
  14220. domElement.setAttribute(key, value);
  14221. break;
  14222. case "action":
  14223. case "formAction":
  14224. null != value && ("form" === tag ? "formAction" === key ? console.error(
  14225. "You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."
  14226. ) : "function" === typeof value && (null == props.encType && null == props.method || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
  14227. "Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."
  14228. )), null == props.target || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
  14229. "Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."
  14230. ))) : "input" === tag || "button" === tag ? "action" === key ? console.error(
  14231. "You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."
  14232. ) : "input" !== tag || "submit" === props.type || "image" === props.type || didWarnFormActionType ? "button" !== tag || null == props.type || "submit" === props.type || didWarnFormActionType ? "function" === typeof value && (null == props.name || didWarnFormActionName || (didWarnFormActionName = true, console.error(
  14233. 'Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'
  14234. )), null == props.formEncType && null == props.formMethod || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
  14235. "Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."
  14236. )), null == props.formTarget || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
  14237. "Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
  14238. ))) : (didWarnFormActionType = true, console.error(
  14239. 'A button can only specify a formAction along with type="submit" or no type.'
  14240. )) : (didWarnFormActionType = true, console.error(
  14241. 'An input can only specify a formAction along with type="submit" or type="image".'
  14242. )) : "action" === key ? console.error(
  14243. "You can only pass the action prop to <form>."
  14244. ) : console.error(
  14245. "You can only pass the formAction prop to <input> or <button>."
  14246. ));
  14247. if ("function" === typeof value) {
  14248. domElement.setAttribute(
  14249. key,
  14250. "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().')"
  14251. );
  14252. break;
  14253. } else
  14254. "function" === typeof prevValue && ("formAction" === key ? ("input" !== tag && setProp(domElement, tag, "name", props.name, props, null), setProp(
  14255. domElement,
  14256. tag,
  14257. "formEncType",
  14258. props.formEncType,
  14259. props,
  14260. null
  14261. ), setProp(
  14262. domElement,
  14263. tag,
  14264. "formMethod",
  14265. props.formMethod,
  14266. props,
  14267. null
  14268. ), setProp(
  14269. domElement,
  14270. tag,
  14271. "formTarget",
  14272. props.formTarget,
  14273. props,
  14274. null
  14275. )) : (setProp(
  14276. domElement,
  14277. tag,
  14278. "encType",
  14279. props.encType,
  14280. props,
  14281. null
  14282. ), setProp(domElement, tag, "method", props.method, props, null), setProp(
  14283. domElement,
  14284. tag,
  14285. "target",
  14286. props.target,
  14287. props,
  14288. null
  14289. )));
  14290. if (null == value || "symbol" === typeof value || "boolean" === typeof value) {
  14291. domElement.removeAttribute(key);
  14292. break;
  14293. }
  14294. checkAttributeStringCoercion(value, key);
  14295. value = sanitizeURL("" + value);
  14296. domElement.setAttribute(key, value);
  14297. break;
  14298. case "onClick":
  14299. null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
  14300. break;
  14301. case "onScroll":
  14302. null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
  14303. break;
  14304. case "onScrollEnd":
  14305. null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
  14306. break;
  14307. case "dangerouslySetInnerHTML":
  14308. if (null != value) {
  14309. if ("object" !== typeof value || !("__html" in value))
  14310. throw Error(
  14311. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  14312. );
  14313. key = value.__html;
  14314. if (null != key) {
  14315. if (null != props.children)
  14316. throw Error(
  14317. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  14318. );
  14319. domElement.innerHTML = key;
  14320. }
  14321. }
  14322. break;
  14323. case "multiple":
  14324. domElement.multiple = value && "function" !== typeof value && "symbol" !== typeof value;
  14325. break;
  14326. case "muted":
  14327. domElement.muted = value && "function" !== typeof value && "symbol" !== typeof value;
  14328. break;
  14329. case "suppressContentEditableWarning":
  14330. case "suppressHydrationWarning":
  14331. case "defaultValue":
  14332. case "defaultChecked":
  14333. case "innerHTML":
  14334. case "ref":
  14335. break;
  14336. case "autoFocus":
  14337. break;
  14338. case "xlinkHref":
  14339. if (null == value || "function" === typeof value || "boolean" === typeof value || "symbol" === typeof value) {
  14340. domElement.removeAttribute("xlink:href");
  14341. break;
  14342. }
  14343. checkAttributeStringCoercion(value, key);
  14344. key = sanitizeURL("" + value);
  14345. domElement.setAttributeNS(xlinkNamespace, "xlink:href", key);
  14346. break;
  14347. case "contentEditable":
  14348. case "spellCheck":
  14349. case "draggable":
  14350. case "value":
  14351. case "autoReverse":
  14352. case "externalResourcesRequired":
  14353. case "focusable":
  14354. case "preserveAlpha":
  14355. null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, "" + value)) : domElement.removeAttribute(key);
  14356. break;
  14357. case "inert":
  14358. "" !== value || didWarnForNewBooleanPropsWithEmptyValue[key] || (didWarnForNewBooleanPropsWithEmptyValue[key] = true, console.error(
  14359. "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
  14360. key
  14361. ));
  14362. case "allowFullScreen":
  14363. case "async":
  14364. case "autoPlay":
  14365. case "controls":
  14366. case "default":
  14367. case "defer":
  14368. case "disabled":
  14369. case "disablePictureInPicture":
  14370. case "disableRemotePlayback":
  14371. case "formNoValidate":
  14372. case "hidden":
  14373. case "loop":
  14374. case "noModule":
  14375. case "noValidate":
  14376. case "open":
  14377. case "playsInline":
  14378. case "readOnly":
  14379. case "required":
  14380. case "reversed":
  14381. case "scoped":
  14382. case "seamless":
  14383. case "itemScope":
  14384. value && "function" !== typeof value && "symbol" !== typeof value ? domElement.setAttribute(key, "") : domElement.removeAttribute(key);
  14385. break;
  14386. case "capture":
  14387. case "download":
  14388. true === value ? domElement.setAttribute(key, "") : false !== value && null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
  14389. break;
  14390. case "cols":
  14391. case "rows":
  14392. case "size":
  14393. case "span":
  14394. null != value && "function" !== typeof value && "symbol" !== typeof value && !isNaN(value) && 1 <= value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
  14395. break;
  14396. case "rowSpan":
  14397. case "start":
  14398. null == value || "function" === typeof value || "symbol" === typeof value || isNaN(value) ? domElement.removeAttribute(key) : (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value));
  14399. break;
  14400. case "popover":
  14401. listenToNonDelegatedEvent("beforetoggle", domElement);
  14402. listenToNonDelegatedEvent("toggle", domElement);
  14403. setValueForAttribute(domElement, "popover", value);
  14404. break;
  14405. case "xlinkActuate":
  14406. setValueForNamespacedAttribute(
  14407. domElement,
  14408. xlinkNamespace,
  14409. "xlink:actuate",
  14410. value
  14411. );
  14412. break;
  14413. case "xlinkArcrole":
  14414. setValueForNamespacedAttribute(
  14415. domElement,
  14416. xlinkNamespace,
  14417. "xlink:arcrole",
  14418. value
  14419. );
  14420. break;
  14421. case "xlinkRole":
  14422. setValueForNamespacedAttribute(
  14423. domElement,
  14424. xlinkNamespace,
  14425. "xlink:role",
  14426. value
  14427. );
  14428. break;
  14429. case "xlinkShow":
  14430. setValueForNamespacedAttribute(
  14431. domElement,
  14432. xlinkNamespace,
  14433. "xlink:show",
  14434. value
  14435. );
  14436. break;
  14437. case "xlinkTitle":
  14438. setValueForNamespacedAttribute(
  14439. domElement,
  14440. xlinkNamespace,
  14441. "xlink:title",
  14442. value
  14443. );
  14444. break;
  14445. case "xlinkType":
  14446. setValueForNamespacedAttribute(
  14447. domElement,
  14448. xlinkNamespace,
  14449. "xlink:type",
  14450. value
  14451. );
  14452. break;
  14453. case "xmlBase":
  14454. setValueForNamespacedAttribute(
  14455. domElement,
  14456. xmlNamespace,
  14457. "xml:base",
  14458. value
  14459. );
  14460. break;
  14461. case "xmlLang":
  14462. setValueForNamespacedAttribute(
  14463. domElement,
  14464. xmlNamespace,
  14465. "xml:lang",
  14466. value
  14467. );
  14468. break;
  14469. case "xmlSpace":
  14470. setValueForNamespacedAttribute(
  14471. domElement,
  14472. xmlNamespace,
  14473. "xml:space",
  14474. value
  14475. );
  14476. break;
  14477. case "is":
  14478. null != prevValue && console.error(
  14479. 'Cannot update the "is" prop after it has been initialized.'
  14480. );
  14481. setValueForAttribute(domElement, "is", value);
  14482. break;
  14483. case "innerText":
  14484. case "textContent":
  14485. break;
  14486. case "popoverTarget":
  14487. didWarnPopoverTargetObject || null == value || "object" !== typeof value || (didWarnPopoverTargetObject = true, console.error(
  14488. "The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",
  14489. value
  14490. ));
  14491. default:
  14492. !(2 < key.length) || "o" !== key[0] && "O" !== key[0] || "n" !== key[1] && "N" !== key[1] ? (key = getAttributeAlias(key), setValueForAttribute(domElement, key, value)) : registrationNameDependencies.hasOwnProperty(key) && null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
  14493. }
  14494. }
  14495. function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
  14496. switch (key) {
  14497. case "style":
  14498. setValueForStyles(domElement, value, prevValue);
  14499. break;
  14500. case "dangerouslySetInnerHTML":
  14501. if (null != value) {
  14502. if ("object" !== typeof value || !("__html" in value))
  14503. throw Error(
  14504. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  14505. );
  14506. key = value.__html;
  14507. if (null != key) {
  14508. if (null != props.children)
  14509. throw Error(
  14510. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  14511. );
  14512. domElement.innerHTML = key;
  14513. }
  14514. }
  14515. break;
  14516. case "children":
  14517. "string" === typeof value ? setTextContent(domElement, value) : ("number" === typeof value || "bigint" === typeof value) && setTextContent(domElement, "" + value);
  14518. break;
  14519. case "onScroll":
  14520. null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
  14521. break;
  14522. case "onScrollEnd":
  14523. null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
  14524. break;
  14525. case "onClick":
  14526. null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
  14527. break;
  14528. case "suppressContentEditableWarning":
  14529. case "suppressHydrationWarning":
  14530. case "innerHTML":
  14531. case "ref":
  14532. break;
  14533. case "innerText":
  14534. case "textContent":
  14535. break;
  14536. default:
  14537. if (registrationNameDependencies.hasOwnProperty(key))
  14538. null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
  14539. else
  14540. a: {
  14541. if ("o" === key[0] && "n" === key[1] && (props = key.endsWith("Capture"), tag = key.slice(2, props ? key.length - 7 : void 0), prevValue = domElement[internalPropsKey] || null, prevValue = null != prevValue ? prevValue[key] : null, "function" === typeof prevValue && domElement.removeEventListener(tag, prevValue, props), "function" === typeof value)) {
  14542. "function" !== typeof prevValue && null !== prevValue && (key in domElement ? domElement[key] = null : domElement.hasAttribute(key) && domElement.removeAttribute(key));
  14543. domElement.addEventListener(tag, value, props);
  14544. break a;
  14545. }
  14546. key in domElement ? domElement[key] = value : true === value ? domElement.setAttribute(key, "") : setValueForAttribute(domElement, key, value);
  14547. }
  14548. }
  14549. }
  14550. function setInitialProperties(domElement, tag, props) {
  14551. validatePropertiesInDevelopment(tag, props);
  14552. switch (tag) {
  14553. case "div":
  14554. case "span":
  14555. case "svg":
  14556. case "path":
  14557. case "a":
  14558. case "g":
  14559. case "p":
  14560. case "li":
  14561. break;
  14562. case "img":
  14563. listenToNonDelegatedEvent("error", domElement);
  14564. listenToNonDelegatedEvent("load", domElement);
  14565. var hasSrc = false, hasSrcSet = false, propKey;
  14566. for (propKey in props)
  14567. if (props.hasOwnProperty(propKey)) {
  14568. var propValue = props[propKey];
  14569. if (null != propValue)
  14570. switch (propKey) {
  14571. case "src":
  14572. hasSrc = true;
  14573. break;
  14574. case "srcSet":
  14575. hasSrcSet = true;
  14576. break;
  14577. case "children":
  14578. case "dangerouslySetInnerHTML":
  14579. throw Error(
  14580. tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  14581. );
  14582. default:
  14583. setProp(domElement, tag, propKey, propValue, props, null);
  14584. }
  14585. }
  14586. hasSrcSet && setProp(domElement, tag, "srcSet", props.srcSet, props, null);
  14587. hasSrc && setProp(domElement, tag, "src", props.src, props, null);
  14588. return;
  14589. case "input":
  14590. checkControlledValueProps("input", props);
  14591. listenToNonDelegatedEvent("invalid", domElement);
  14592. var defaultValue = propKey = propValue = hasSrcSet = null, checked = null, defaultChecked = null;
  14593. for (hasSrc in props)
  14594. if (props.hasOwnProperty(hasSrc)) {
  14595. var _propValue = props[hasSrc];
  14596. if (null != _propValue)
  14597. switch (hasSrc) {
  14598. case "name":
  14599. hasSrcSet = _propValue;
  14600. break;
  14601. case "type":
  14602. propValue = _propValue;
  14603. break;
  14604. case "checked":
  14605. checked = _propValue;
  14606. break;
  14607. case "defaultChecked":
  14608. defaultChecked = _propValue;
  14609. break;
  14610. case "value":
  14611. propKey = _propValue;
  14612. break;
  14613. case "defaultValue":
  14614. defaultValue = _propValue;
  14615. break;
  14616. case "children":
  14617. case "dangerouslySetInnerHTML":
  14618. if (null != _propValue)
  14619. throw Error(
  14620. tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  14621. );
  14622. break;
  14623. default:
  14624. setProp(domElement, tag, hasSrc, _propValue, props, null);
  14625. }
  14626. }
  14627. validateInputProps(domElement, props);
  14628. initInput(
  14629. domElement,
  14630. propKey,
  14631. defaultValue,
  14632. checked,
  14633. defaultChecked,
  14634. propValue,
  14635. hasSrcSet,
  14636. false
  14637. );
  14638. return;
  14639. case "select":
  14640. checkControlledValueProps("select", props);
  14641. listenToNonDelegatedEvent("invalid", domElement);
  14642. hasSrc = propValue = propKey = null;
  14643. for (hasSrcSet in props)
  14644. if (props.hasOwnProperty(hasSrcSet) && (defaultValue = props[hasSrcSet], null != defaultValue))
  14645. switch (hasSrcSet) {
  14646. case "value":
  14647. propKey = defaultValue;
  14648. break;
  14649. case "defaultValue":
  14650. propValue = defaultValue;
  14651. break;
  14652. case "multiple":
  14653. hasSrc = defaultValue;
  14654. default:
  14655. setProp(
  14656. domElement,
  14657. tag,
  14658. hasSrcSet,
  14659. defaultValue,
  14660. props,
  14661. null
  14662. );
  14663. }
  14664. validateSelectProps(domElement, props);
  14665. tag = propKey;
  14666. props = propValue;
  14667. domElement.multiple = !!hasSrc;
  14668. null != tag ? updateOptions(domElement, !!hasSrc, tag, false) : null != props && updateOptions(domElement, !!hasSrc, props, true);
  14669. return;
  14670. case "textarea":
  14671. checkControlledValueProps("textarea", props);
  14672. listenToNonDelegatedEvent("invalid", domElement);
  14673. propKey = hasSrcSet = hasSrc = null;
  14674. for (propValue in props)
  14675. if (props.hasOwnProperty(propValue) && (defaultValue = props[propValue], null != defaultValue))
  14676. switch (propValue) {
  14677. case "value":
  14678. hasSrc = defaultValue;
  14679. break;
  14680. case "defaultValue":
  14681. hasSrcSet = defaultValue;
  14682. break;
  14683. case "children":
  14684. propKey = defaultValue;
  14685. break;
  14686. case "dangerouslySetInnerHTML":
  14687. if (null != defaultValue)
  14688. throw Error(
  14689. "`dangerouslySetInnerHTML` does not make sense on <textarea>."
  14690. );
  14691. break;
  14692. default:
  14693. setProp(
  14694. domElement,
  14695. tag,
  14696. propValue,
  14697. defaultValue,
  14698. props,
  14699. null
  14700. );
  14701. }
  14702. validateTextareaProps(domElement, props);
  14703. initTextarea(domElement, hasSrc, hasSrcSet, propKey);
  14704. return;
  14705. case "option":
  14706. validateOptionProps(domElement, props);
  14707. for (checked in props)
  14708. if (props.hasOwnProperty(checked) && (hasSrc = props[checked], null != hasSrc))
  14709. switch (checked) {
  14710. case "selected":
  14711. domElement.selected = hasSrc && "function" !== typeof hasSrc && "symbol" !== typeof hasSrc;
  14712. break;
  14713. default:
  14714. setProp(domElement, tag, checked, hasSrc, props, null);
  14715. }
  14716. return;
  14717. case "dialog":
  14718. listenToNonDelegatedEvent("beforetoggle", domElement);
  14719. listenToNonDelegatedEvent("toggle", domElement);
  14720. listenToNonDelegatedEvent("cancel", domElement);
  14721. listenToNonDelegatedEvent("close", domElement);
  14722. break;
  14723. case "iframe":
  14724. case "object":
  14725. listenToNonDelegatedEvent("load", domElement);
  14726. break;
  14727. case "video":
  14728. case "audio":
  14729. for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
  14730. listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
  14731. break;
  14732. case "image":
  14733. listenToNonDelegatedEvent("error", domElement);
  14734. listenToNonDelegatedEvent("load", domElement);
  14735. break;
  14736. case "details":
  14737. listenToNonDelegatedEvent("toggle", domElement);
  14738. break;
  14739. case "embed":
  14740. case "source":
  14741. case "link":
  14742. listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
  14743. case "area":
  14744. case "base":
  14745. case "br":
  14746. case "col":
  14747. case "hr":
  14748. case "keygen":
  14749. case "meta":
  14750. case "param":
  14751. case "track":
  14752. case "wbr":
  14753. case "menuitem":
  14754. for (defaultChecked in props)
  14755. if (props.hasOwnProperty(defaultChecked) && (hasSrc = props[defaultChecked], null != hasSrc))
  14756. switch (defaultChecked) {
  14757. case "children":
  14758. case "dangerouslySetInnerHTML":
  14759. throw Error(
  14760. tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  14761. );
  14762. default:
  14763. setProp(domElement, tag, defaultChecked, hasSrc, props, null);
  14764. }
  14765. return;
  14766. default:
  14767. if (isCustomElement(tag)) {
  14768. for (_propValue in props)
  14769. props.hasOwnProperty(_propValue) && (hasSrc = props[_propValue], void 0 !== hasSrc && setPropOnCustomElement(
  14770. domElement,
  14771. tag,
  14772. _propValue,
  14773. hasSrc,
  14774. props,
  14775. void 0
  14776. ));
  14777. return;
  14778. }
  14779. }
  14780. for (defaultValue in props)
  14781. props.hasOwnProperty(defaultValue) && (hasSrc = props[defaultValue], null != hasSrc && setProp(domElement, tag, defaultValue, hasSrc, props, null));
  14782. }
  14783. function updateProperties(domElement, tag, lastProps, nextProps) {
  14784. validatePropertiesInDevelopment(tag, nextProps);
  14785. switch (tag) {
  14786. case "div":
  14787. case "span":
  14788. case "svg":
  14789. case "path":
  14790. case "a":
  14791. case "g":
  14792. case "p":
  14793. case "li":
  14794. break;
  14795. case "input":
  14796. var name = null, type = null, value = null, defaultValue = null, lastDefaultValue = null, checked = null, defaultChecked = null;
  14797. for (propKey in lastProps) {
  14798. var lastProp = lastProps[propKey];
  14799. if (lastProps.hasOwnProperty(propKey) && null != lastProp)
  14800. switch (propKey) {
  14801. case "checked":
  14802. break;
  14803. case "value":
  14804. break;
  14805. case "defaultValue":
  14806. lastDefaultValue = lastProp;
  14807. default:
  14808. nextProps.hasOwnProperty(propKey) || setProp(
  14809. domElement,
  14810. tag,
  14811. propKey,
  14812. null,
  14813. nextProps,
  14814. lastProp
  14815. );
  14816. }
  14817. }
  14818. for (var _propKey8 in nextProps) {
  14819. var propKey = nextProps[_propKey8];
  14820. lastProp = lastProps[_propKey8];
  14821. if (nextProps.hasOwnProperty(_propKey8) && (null != propKey || null != lastProp))
  14822. switch (_propKey8) {
  14823. case "type":
  14824. type = propKey;
  14825. break;
  14826. case "name":
  14827. name = propKey;
  14828. break;
  14829. case "checked":
  14830. checked = propKey;
  14831. break;
  14832. case "defaultChecked":
  14833. defaultChecked = propKey;
  14834. break;
  14835. case "value":
  14836. value = propKey;
  14837. break;
  14838. case "defaultValue":
  14839. defaultValue = propKey;
  14840. break;
  14841. case "children":
  14842. case "dangerouslySetInnerHTML":
  14843. if (null != propKey)
  14844. throw Error(
  14845. tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  14846. );
  14847. break;
  14848. default:
  14849. propKey !== lastProp && setProp(
  14850. domElement,
  14851. tag,
  14852. _propKey8,
  14853. propKey,
  14854. nextProps,
  14855. lastProp
  14856. );
  14857. }
  14858. }
  14859. tag = "checkbox" === lastProps.type || "radio" === lastProps.type ? null != lastProps.checked : null != lastProps.value;
  14860. nextProps = "checkbox" === nextProps.type || "radio" === nextProps.type ? null != nextProps.checked : null != nextProps.value;
  14861. tag || !nextProps || didWarnUncontrolledToControlled || (console.error(
  14862. "A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
  14863. ), didWarnUncontrolledToControlled = true);
  14864. !tag || nextProps || didWarnControlledToUncontrolled || (console.error(
  14865. "A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
  14866. ), didWarnControlledToUncontrolled = true);
  14867. updateInput(
  14868. domElement,
  14869. value,
  14870. defaultValue,
  14871. lastDefaultValue,
  14872. checked,
  14873. defaultChecked,
  14874. type,
  14875. name
  14876. );
  14877. return;
  14878. case "select":
  14879. propKey = value = defaultValue = _propKey8 = null;
  14880. for (type in lastProps)
  14881. if (lastDefaultValue = lastProps[type], lastProps.hasOwnProperty(type) && null != lastDefaultValue)
  14882. switch (type) {
  14883. case "value":
  14884. break;
  14885. case "multiple":
  14886. propKey = lastDefaultValue;
  14887. default:
  14888. nextProps.hasOwnProperty(type) || setProp(
  14889. domElement,
  14890. tag,
  14891. type,
  14892. null,
  14893. nextProps,
  14894. lastDefaultValue
  14895. );
  14896. }
  14897. for (name in nextProps)
  14898. if (type = nextProps[name], lastDefaultValue = lastProps[name], nextProps.hasOwnProperty(name) && (null != type || null != lastDefaultValue))
  14899. switch (name) {
  14900. case "value":
  14901. _propKey8 = type;
  14902. break;
  14903. case "defaultValue":
  14904. defaultValue = type;
  14905. break;
  14906. case "multiple":
  14907. value = type;
  14908. default:
  14909. type !== lastDefaultValue && setProp(
  14910. domElement,
  14911. tag,
  14912. name,
  14913. type,
  14914. nextProps,
  14915. lastDefaultValue
  14916. );
  14917. }
  14918. nextProps = defaultValue;
  14919. tag = value;
  14920. lastProps = propKey;
  14921. null != _propKey8 ? updateOptions(domElement, !!tag, _propKey8, false) : !!lastProps !== !!tag && (null != nextProps ? updateOptions(domElement, !!tag, nextProps, true) : updateOptions(domElement, !!tag, tag ? [] : "", false));
  14922. return;
  14923. case "textarea":
  14924. propKey = _propKey8 = null;
  14925. for (defaultValue in lastProps)
  14926. if (name = lastProps[defaultValue], lastProps.hasOwnProperty(defaultValue) && null != name && !nextProps.hasOwnProperty(defaultValue))
  14927. switch (defaultValue) {
  14928. case "value":
  14929. break;
  14930. case "children":
  14931. break;
  14932. default:
  14933. setProp(domElement, tag, defaultValue, null, nextProps, name);
  14934. }
  14935. for (value in nextProps)
  14936. if (name = nextProps[value], type = lastProps[value], nextProps.hasOwnProperty(value) && (null != name || null != type))
  14937. switch (value) {
  14938. case "value":
  14939. _propKey8 = name;
  14940. break;
  14941. case "defaultValue":
  14942. propKey = name;
  14943. break;
  14944. case "children":
  14945. break;
  14946. case "dangerouslySetInnerHTML":
  14947. if (null != name)
  14948. throw Error(
  14949. "`dangerouslySetInnerHTML` does not make sense on <textarea>."
  14950. );
  14951. break;
  14952. default:
  14953. name !== type && setProp(domElement, tag, value, name, nextProps, type);
  14954. }
  14955. updateTextarea(domElement, _propKey8, propKey);
  14956. return;
  14957. case "option":
  14958. for (var _propKey13 in lastProps)
  14959. if (_propKey8 = lastProps[_propKey13], lastProps.hasOwnProperty(_propKey13) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey13))
  14960. switch (_propKey13) {
  14961. case "selected":
  14962. domElement.selected = false;
  14963. break;
  14964. default:
  14965. setProp(
  14966. domElement,
  14967. tag,
  14968. _propKey13,
  14969. null,
  14970. nextProps,
  14971. _propKey8
  14972. );
  14973. }
  14974. for (lastDefaultValue in nextProps)
  14975. if (_propKey8 = nextProps[lastDefaultValue], propKey = lastProps[lastDefaultValue], nextProps.hasOwnProperty(lastDefaultValue) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
  14976. switch (lastDefaultValue) {
  14977. case "selected":
  14978. domElement.selected = _propKey8 && "function" !== typeof _propKey8 && "symbol" !== typeof _propKey8;
  14979. break;
  14980. default:
  14981. setProp(
  14982. domElement,
  14983. tag,
  14984. lastDefaultValue,
  14985. _propKey8,
  14986. nextProps,
  14987. propKey
  14988. );
  14989. }
  14990. return;
  14991. case "img":
  14992. case "link":
  14993. case "area":
  14994. case "base":
  14995. case "br":
  14996. case "col":
  14997. case "embed":
  14998. case "hr":
  14999. case "keygen":
  15000. case "meta":
  15001. case "param":
  15002. case "source":
  15003. case "track":
  15004. case "wbr":
  15005. case "menuitem":
  15006. for (var _propKey15 in lastProps)
  15007. _propKey8 = lastProps[_propKey15], lastProps.hasOwnProperty(_propKey15) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey15) && setProp(
  15008. domElement,
  15009. tag,
  15010. _propKey15,
  15011. null,
  15012. nextProps,
  15013. _propKey8
  15014. );
  15015. for (checked in nextProps)
  15016. if (_propKey8 = nextProps[checked], propKey = lastProps[checked], nextProps.hasOwnProperty(checked) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
  15017. switch (checked) {
  15018. case "children":
  15019. case "dangerouslySetInnerHTML":
  15020. if (null != _propKey8)
  15021. throw Error(
  15022. tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  15023. );
  15024. break;
  15025. default:
  15026. setProp(
  15027. domElement,
  15028. tag,
  15029. checked,
  15030. _propKey8,
  15031. nextProps,
  15032. propKey
  15033. );
  15034. }
  15035. return;
  15036. default:
  15037. if (isCustomElement(tag)) {
  15038. for (var _propKey17 in lastProps)
  15039. _propKey8 = lastProps[_propKey17], lastProps.hasOwnProperty(_propKey17) && void 0 !== _propKey8 && !nextProps.hasOwnProperty(_propKey17) && setPropOnCustomElement(
  15040. domElement,
  15041. tag,
  15042. _propKey17,
  15043. void 0,
  15044. nextProps,
  15045. _propKey8
  15046. );
  15047. for (defaultChecked in nextProps)
  15048. _propKey8 = nextProps[defaultChecked], propKey = lastProps[defaultChecked], !nextProps.hasOwnProperty(defaultChecked) || _propKey8 === propKey || void 0 === _propKey8 && void 0 === propKey || setPropOnCustomElement(
  15049. domElement,
  15050. tag,
  15051. defaultChecked,
  15052. _propKey8,
  15053. nextProps,
  15054. propKey
  15055. );
  15056. return;
  15057. }
  15058. }
  15059. for (var _propKey19 in lastProps)
  15060. _propKey8 = lastProps[_propKey19], lastProps.hasOwnProperty(_propKey19) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey19) && setProp(domElement, tag, _propKey19, null, nextProps, _propKey8);
  15061. for (lastProp in nextProps)
  15062. _propKey8 = nextProps[lastProp], propKey = lastProps[lastProp], !nextProps.hasOwnProperty(lastProp) || _propKey8 === propKey || null == _propKey8 && null == propKey || setProp(domElement, tag, lastProp, _propKey8, nextProps, propKey);
  15063. }
  15064. function getPropNameFromAttributeName(attrName) {
  15065. switch (attrName) {
  15066. case "class":
  15067. return "className";
  15068. case "for":
  15069. return "htmlFor";
  15070. default:
  15071. return attrName;
  15072. }
  15073. }
  15074. function getStylesObjectFromElement(domElement) {
  15075. var serverValueInObjectForm = {};
  15076. domElement = domElement.style;
  15077. for (var i = 0; i < domElement.length; i++) {
  15078. var styleName = domElement[i];
  15079. serverValueInObjectForm[styleName] = domElement.getPropertyValue(styleName);
  15080. }
  15081. return serverValueInObjectForm;
  15082. }
  15083. function diffHydratedStyles(domElement, value$jscomp$0, serverDifferences) {
  15084. if (null != value$jscomp$0 && "object" !== typeof value$jscomp$0)
  15085. console.error(
  15086. "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
  15087. );
  15088. else {
  15089. var clientValue;
  15090. var delimiter = clientValue = "", styleName;
  15091. for (styleName in value$jscomp$0)
  15092. if (value$jscomp$0.hasOwnProperty(styleName)) {
  15093. var value = value$jscomp$0[styleName];
  15094. null != value && "boolean" !== typeof value && "" !== value && (0 === styleName.indexOf("--") ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName + ":" + ("" + value).trim()) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + ("" + value).trim()) : clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + value + "px", delimiter = ";");
  15095. }
  15096. clientValue = clientValue || null;
  15097. value$jscomp$0 = domElement.getAttribute("style");
  15098. value$jscomp$0 !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(value$jscomp$0) !== clientValue && (serverDifferences.style = getStylesObjectFromElement(domElement)));
  15099. }
  15100. }
  15101. function hydrateAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
  15102. extraAttributes.delete(attributeName);
  15103. domElement = domElement.getAttribute(attributeName);
  15104. if (null === domElement)
  15105. switch (typeof value) {
  15106. case "undefined":
  15107. case "function":
  15108. case "symbol":
  15109. case "boolean":
  15110. return;
  15111. }
  15112. else if (null != value)
  15113. switch (typeof value) {
  15114. case "function":
  15115. case "symbol":
  15116. case "boolean":
  15117. break;
  15118. default:
  15119. if (checkAttributeStringCoercion(value, propKey), domElement === "" + value)
  15120. return;
  15121. }
  15122. warnForPropDifference(propKey, domElement, value, serverDifferences);
  15123. }
  15124. function hydrateBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
  15125. extraAttributes.delete(attributeName);
  15126. domElement = domElement.getAttribute(attributeName);
  15127. if (null === domElement) {
  15128. switch (typeof value) {
  15129. case "function":
  15130. case "symbol":
  15131. return;
  15132. }
  15133. if (!value) return;
  15134. } else
  15135. switch (typeof value) {
  15136. case "function":
  15137. case "symbol":
  15138. break;
  15139. default:
  15140. if (value) return;
  15141. }
  15142. warnForPropDifference(propKey, domElement, value, serverDifferences);
  15143. }
  15144. function hydrateBooleanishAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
  15145. extraAttributes.delete(attributeName);
  15146. domElement = domElement.getAttribute(attributeName);
  15147. if (null === domElement)
  15148. switch (typeof value) {
  15149. case "undefined":
  15150. case "function":
  15151. case "symbol":
  15152. return;
  15153. }
  15154. else if (null != value)
  15155. switch (typeof value) {
  15156. case "function":
  15157. case "symbol":
  15158. break;
  15159. default:
  15160. if (checkAttributeStringCoercion(value, attributeName), domElement === "" + value)
  15161. return;
  15162. }
  15163. warnForPropDifference(propKey, domElement, value, serverDifferences);
  15164. }
  15165. function hydrateNumericAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
  15166. extraAttributes.delete(attributeName);
  15167. domElement = domElement.getAttribute(attributeName);
  15168. if (null === domElement)
  15169. switch (typeof value) {
  15170. case "undefined":
  15171. case "function":
  15172. case "symbol":
  15173. case "boolean":
  15174. return;
  15175. default:
  15176. if (isNaN(value)) return;
  15177. }
  15178. else if (null != value)
  15179. switch (typeof value) {
  15180. case "function":
  15181. case "symbol":
  15182. case "boolean":
  15183. break;
  15184. default:
  15185. if (!isNaN(value) && (checkAttributeStringCoercion(value, propKey), domElement === "" + value))
  15186. return;
  15187. }
  15188. warnForPropDifference(propKey, domElement, value, serverDifferences);
  15189. }
  15190. function hydrateSanitizedAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
  15191. extraAttributes.delete(attributeName);
  15192. domElement = domElement.getAttribute(attributeName);
  15193. if (null === domElement)
  15194. switch (typeof value) {
  15195. case "undefined":
  15196. case "function":
  15197. case "symbol":
  15198. case "boolean":
  15199. return;
  15200. }
  15201. else if (null != value)
  15202. switch (typeof value) {
  15203. case "function":
  15204. case "symbol":
  15205. case "boolean":
  15206. break;
  15207. default:
  15208. if (checkAttributeStringCoercion(value, propKey), attributeName = sanitizeURL("" + value), domElement === attributeName)
  15209. return;
  15210. }
  15211. warnForPropDifference(propKey, domElement, value, serverDifferences);
  15212. }
  15213. function diffHydratedProperties(domElement, tag, props, hostContext) {
  15214. for (var serverDifferences = {}, extraAttributes = /* @__PURE__ */ new Set(), attributes = domElement.attributes, i = 0; i < attributes.length; i++)
  15215. switch (attributes[i].name.toLowerCase()) {
  15216. case "value":
  15217. break;
  15218. case "checked":
  15219. break;
  15220. case "selected":
  15221. break;
  15222. default:
  15223. extraAttributes.add(attributes[i].name);
  15224. }
  15225. if (isCustomElement(tag))
  15226. for (var propKey in props) {
  15227. if (props.hasOwnProperty(propKey)) {
  15228. var value = props[propKey];
  15229. if (null != value) {
  15230. if (registrationNameDependencies.hasOwnProperty(propKey))
  15231. "function" !== typeof value && warnForInvalidEventListener(propKey, value);
  15232. else if (true !== props.suppressHydrationWarning)
  15233. switch (propKey) {
  15234. case "children":
  15235. "string" !== typeof value && "number" !== typeof value || warnForPropDifference(
  15236. "children",
  15237. domElement.textContent,
  15238. value,
  15239. serverDifferences
  15240. );
  15241. continue;
  15242. case "suppressContentEditableWarning":
  15243. case "suppressHydrationWarning":
  15244. case "defaultValue":
  15245. case "defaultChecked":
  15246. case "innerHTML":
  15247. case "ref":
  15248. continue;
  15249. case "dangerouslySetInnerHTML":
  15250. attributes = domElement.innerHTML;
  15251. value = value ? value.__html : void 0;
  15252. null != value && (value = normalizeHTML(domElement, value), warnForPropDifference(
  15253. propKey,
  15254. attributes,
  15255. value,
  15256. serverDifferences
  15257. ));
  15258. continue;
  15259. case "style":
  15260. extraAttributes.delete(propKey);
  15261. diffHydratedStyles(domElement, value, serverDifferences);
  15262. continue;
  15263. case "offsetParent":
  15264. case "offsetTop":
  15265. case "offsetLeft":
  15266. case "offsetWidth":
  15267. case "offsetHeight":
  15268. case "isContentEditable":
  15269. case "outerText":
  15270. case "outerHTML":
  15271. extraAttributes.delete(propKey.toLowerCase());
  15272. console.error(
  15273. "Assignment to read-only property will result in a no-op: `%s`",
  15274. propKey
  15275. );
  15276. continue;
  15277. case "className":
  15278. extraAttributes.delete("class");
  15279. attributes = getValueForAttributeOnCustomComponent(
  15280. domElement,
  15281. "class",
  15282. value
  15283. );
  15284. warnForPropDifference(
  15285. "className",
  15286. attributes,
  15287. value,
  15288. serverDifferences
  15289. );
  15290. continue;
  15291. default:
  15292. hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(propKey.toLowerCase()) : extraAttributes.delete(propKey), attributes = getValueForAttributeOnCustomComponent(
  15293. domElement,
  15294. propKey,
  15295. value
  15296. ), warnForPropDifference(
  15297. propKey,
  15298. attributes,
  15299. value,
  15300. serverDifferences
  15301. );
  15302. }
  15303. }
  15304. }
  15305. }
  15306. else
  15307. for (value in props)
  15308. if (props.hasOwnProperty(value) && (propKey = props[value], null != propKey)) {
  15309. if (registrationNameDependencies.hasOwnProperty(value))
  15310. "function" !== typeof propKey && warnForInvalidEventListener(value, propKey);
  15311. else if (true !== props.suppressHydrationWarning)
  15312. switch (value) {
  15313. case "children":
  15314. "string" !== typeof propKey && "number" !== typeof propKey || warnForPropDifference(
  15315. "children",
  15316. domElement.textContent,
  15317. propKey,
  15318. serverDifferences
  15319. );
  15320. continue;
  15321. case "suppressContentEditableWarning":
  15322. case "suppressHydrationWarning":
  15323. case "value":
  15324. case "checked":
  15325. case "selected":
  15326. case "defaultValue":
  15327. case "defaultChecked":
  15328. case "innerHTML":
  15329. case "ref":
  15330. continue;
  15331. case "dangerouslySetInnerHTML":
  15332. attributes = domElement.innerHTML;
  15333. propKey = propKey ? propKey.__html : void 0;
  15334. null != propKey && (propKey = normalizeHTML(domElement, propKey), attributes !== propKey && (serverDifferences[value] = { __html: attributes }));
  15335. continue;
  15336. case "className":
  15337. hydrateAttribute(
  15338. domElement,
  15339. value,
  15340. "class",
  15341. propKey,
  15342. extraAttributes,
  15343. serverDifferences
  15344. );
  15345. continue;
  15346. case "tabIndex":
  15347. hydrateAttribute(
  15348. domElement,
  15349. value,
  15350. "tabindex",
  15351. propKey,
  15352. extraAttributes,
  15353. serverDifferences
  15354. );
  15355. continue;
  15356. case "style":
  15357. extraAttributes.delete(value);
  15358. diffHydratedStyles(domElement, propKey, serverDifferences);
  15359. continue;
  15360. case "multiple":
  15361. extraAttributes.delete(value);
  15362. warnForPropDifference(
  15363. value,
  15364. domElement.multiple,
  15365. propKey,
  15366. serverDifferences
  15367. );
  15368. continue;
  15369. case "muted":
  15370. extraAttributes.delete(value);
  15371. warnForPropDifference(
  15372. value,
  15373. domElement.muted,
  15374. propKey,
  15375. serverDifferences
  15376. );
  15377. continue;
  15378. case "autoFocus":
  15379. extraAttributes.delete("autofocus");
  15380. warnForPropDifference(
  15381. value,
  15382. domElement.autofocus,
  15383. propKey,
  15384. serverDifferences
  15385. );
  15386. continue;
  15387. case "data":
  15388. if ("object" !== tag) {
  15389. extraAttributes.delete(value);
  15390. attributes = domElement.getAttribute("data");
  15391. warnForPropDifference(
  15392. value,
  15393. attributes,
  15394. propKey,
  15395. serverDifferences
  15396. );
  15397. continue;
  15398. }
  15399. case "src":
  15400. case "href":
  15401. if (!("" !== propKey || "a" === tag && "href" === value || "object" === tag && "data" === value)) {
  15402. "src" === value ? console.error(
  15403. 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  15404. value,
  15405. value
  15406. ) : console.error(
  15407. 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  15408. value,
  15409. value
  15410. );
  15411. continue;
  15412. }
  15413. hydrateSanitizedAttribute(
  15414. domElement,
  15415. value,
  15416. value,
  15417. propKey,
  15418. extraAttributes,
  15419. serverDifferences
  15420. );
  15421. continue;
  15422. case "action":
  15423. case "formAction":
  15424. attributes = domElement.getAttribute(value);
  15425. if ("function" === typeof propKey) {
  15426. extraAttributes.delete(value.toLowerCase());
  15427. "formAction" === value ? (extraAttributes.delete("name"), extraAttributes.delete("formenctype"), extraAttributes.delete("formmethod"), extraAttributes.delete("formtarget")) : (extraAttributes.delete("enctype"), extraAttributes.delete("method"), extraAttributes.delete("target"));
  15428. continue;
  15429. } else if (attributes === EXPECTED_FORM_ACTION_URL) {
  15430. extraAttributes.delete(value.toLowerCase());
  15431. warnForPropDifference(
  15432. value,
  15433. "function",
  15434. propKey,
  15435. serverDifferences
  15436. );
  15437. continue;
  15438. }
  15439. hydrateSanitizedAttribute(
  15440. domElement,
  15441. value,
  15442. value.toLowerCase(),
  15443. propKey,
  15444. extraAttributes,
  15445. serverDifferences
  15446. );
  15447. continue;
  15448. case "xlinkHref":
  15449. hydrateSanitizedAttribute(
  15450. domElement,
  15451. value,
  15452. "xlink:href",
  15453. propKey,
  15454. extraAttributes,
  15455. serverDifferences
  15456. );
  15457. continue;
  15458. case "contentEditable":
  15459. hydrateBooleanishAttribute(
  15460. domElement,
  15461. value,
  15462. "contenteditable",
  15463. propKey,
  15464. extraAttributes,
  15465. serverDifferences
  15466. );
  15467. continue;
  15468. case "spellCheck":
  15469. hydrateBooleanishAttribute(
  15470. domElement,
  15471. value,
  15472. "spellcheck",
  15473. propKey,
  15474. extraAttributes,
  15475. serverDifferences
  15476. );
  15477. continue;
  15478. case "draggable":
  15479. case "autoReverse":
  15480. case "externalResourcesRequired":
  15481. case "focusable":
  15482. case "preserveAlpha":
  15483. hydrateBooleanishAttribute(
  15484. domElement,
  15485. value,
  15486. value,
  15487. propKey,
  15488. extraAttributes,
  15489. serverDifferences
  15490. );
  15491. continue;
  15492. case "allowFullScreen":
  15493. case "async":
  15494. case "autoPlay":
  15495. case "controls":
  15496. case "default":
  15497. case "defer":
  15498. case "disabled":
  15499. case "disablePictureInPicture":
  15500. case "disableRemotePlayback":
  15501. case "formNoValidate":
  15502. case "hidden":
  15503. case "loop":
  15504. case "noModule":
  15505. case "noValidate":
  15506. case "open":
  15507. case "playsInline":
  15508. case "readOnly":
  15509. case "required":
  15510. case "reversed":
  15511. case "scoped":
  15512. case "seamless":
  15513. case "itemScope":
  15514. hydrateBooleanAttribute(
  15515. domElement,
  15516. value,
  15517. value.toLowerCase(),
  15518. propKey,
  15519. extraAttributes,
  15520. serverDifferences
  15521. );
  15522. continue;
  15523. case "capture":
  15524. case "download":
  15525. a: {
  15526. i = domElement;
  15527. var attributeName = attributes = value, serverDifferences$jscomp$0 = serverDifferences;
  15528. extraAttributes.delete(attributeName);
  15529. i = i.getAttribute(attributeName);
  15530. if (null === i)
  15531. switch (typeof propKey) {
  15532. case "undefined":
  15533. case "function":
  15534. case "symbol":
  15535. break a;
  15536. default:
  15537. if (false === propKey) break a;
  15538. }
  15539. else if (null != propKey)
  15540. switch (typeof propKey) {
  15541. case "function":
  15542. case "symbol":
  15543. break;
  15544. case "boolean":
  15545. if (true === propKey && "" === i) break a;
  15546. break;
  15547. default:
  15548. if (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey)
  15549. break a;
  15550. }
  15551. warnForPropDifference(
  15552. attributes,
  15553. i,
  15554. propKey,
  15555. serverDifferences$jscomp$0
  15556. );
  15557. }
  15558. continue;
  15559. case "cols":
  15560. case "rows":
  15561. case "size":
  15562. case "span":
  15563. a: {
  15564. i = domElement;
  15565. attributeName = attributes = value;
  15566. serverDifferences$jscomp$0 = serverDifferences;
  15567. extraAttributes.delete(attributeName);
  15568. i = i.getAttribute(attributeName);
  15569. if (null === i)
  15570. switch (typeof propKey) {
  15571. case "undefined":
  15572. case "function":
  15573. case "symbol":
  15574. case "boolean":
  15575. break a;
  15576. default:
  15577. if (isNaN(propKey) || 1 > propKey) break a;
  15578. }
  15579. else if (null != propKey)
  15580. switch (typeof propKey) {
  15581. case "function":
  15582. case "symbol":
  15583. case "boolean":
  15584. break;
  15585. default:
  15586. if (!(isNaN(propKey) || 1 > propKey) && (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey))
  15587. break a;
  15588. }
  15589. warnForPropDifference(
  15590. attributes,
  15591. i,
  15592. propKey,
  15593. serverDifferences$jscomp$0
  15594. );
  15595. }
  15596. continue;
  15597. case "rowSpan":
  15598. hydrateNumericAttribute(
  15599. domElement,
  15600. value,
  15601. "rowspan",
  15602. propKey,
  15603. extraAttributes,
  15604. serverDifferences
  15605. );
  15606. continue;
  15607. case "start":
  15608. hydrateNumericAttribute(
  15609. domElement,
  15610. value,
  15611. value,
  15612. propKey,
  15613. extraAttributes,
  15614. serverDifferences
  15615. );
  15616. continue;
  15617. case "xHeight":
  15618. hydrateAttribute(
  15619. domElement,
  15620. value,
  15621. "x-height",
  15622. propKey,
  15623. extraAttributes,
  15624. serverDifferences
  15625. );
  15626. continue;
  15627. case "xlinkActuate":
  15628. hydrateAttribute(
  15629. domElement,
  15630. value,
  15631. "xlink:actuate",
  15632. propKey,
  15633. extraAttributes,
  15634. serverDifferences
  15635. );
  15636. continue;
  15637. case "xlinkArcrole":
  15638. hydrateAttribute(
  15639. domElement,
  15640. value,
  15641. "xlink:arcrole",
  15642. propKey,
  15643. extraAttributes,
  15644. serverDifferences
  15645. );
  15646. continue;
  15647. case "xlinkRole":
  15648. hydrateAttribute(
  15649. domElement,
  15650. value,
  15651. "xlink:role",
  15652. propKey,
  15653. extraAttributes,
  15654. serverDifferences
  15655. );
  15656. continue;
  15657. case "xlinkShow":
  15658. hydrateAttribute(
  15659. domElement,
  15660. value,
  15661. "xlink:show",
  15662. propKey,
  15663. extraAttributes,
  15664. serverDifferences
  15665. );
  15666. continue;
  15667. case "xlinkTitle":
  15668. hydrateAttribute(
  15669. domElement,
  15670. value,
  15671. "xlink:title",
  15672. propKey,
  15673. extraAttributes,
  15674. serverDifferences
  15675. );
  15676. continue;
  15677. case "xlinkType":
  15678. hydrateAttribute(
  15679. domElement,
  15680. value,
  15681. "xlink:type",
  15682. propKey,
  15683. extraAttributes,
  15684. serverDifferences
  15685. );
  15686. continue;
  15687. case "xmlBase":
  15688. hydrateAttribute(
  15689. domElement,
  15690. value,
  15691. "xml:base",
  15692. propKey,
  15693. extraAttributes,
  15694. serverDifferences
  15695. );
  15696. continue;
  15697. case "xmlLang":
  15698. hydrateAttribute(
  15699. domElement,
  15700. value,
  15701. "xml:lang",
  15702. propKey,
  15703. extraAttributes,
  15704. serverDifferences
  15705. );
  15706. continue;
  15707. case "xmlSpace":
  15708. hydrateAttribute(
  15709. domElement,
  15710. value,
  15711. "xml:space",
  15712. propKey,
  15713. extraAttributes,
  15714. serverDifferences
  15715. );
  15716. continue;
  15717. case "inert":
  15718. "" !== propKey || didWarnForNewBooleanPropsWithEmptyValue[value] || (didWarnForNewBooleanPropsWithEmptyValue[value] = true, console.error(
  15719. "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
  15720. value
  15721. ));
  15722. hydrateBooleanAttribute(
  15723. domElement,
  15724. value,
  15725. value,
  15726. propKey,
  15727. extraAttributes,
  15728. serverDifferences
  15729. );
  15730. continue;
  15731. default:
  15732. if (!(2 < value.length) || "o" !== value[0] && "O" !== value[0] || "n" !== value[1] && "N" !== value[1]) {
  15733. i = getAttributeAlias(value);
  15734. attributes = false;
  15735. hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(i.toLowerCase()) : (attributeName = value.toLowerCase(), attributeName = possibleStandardNames.hasOwnProperty(
  15736. attributeName
  15737. ) ? possibleStandardNames[attributeName] || null : null, null !== attributeName && attributeName !== value && (attributes = true, extraAttributes.delete(attributeName)), extraAttributes.delete(i));
  15738. a: if (attributeName = domElement, serverDifferences$jscomp$0 = i, i = propKey, isAttributeNameSafe(serverDifferences$jscomp$0))
  15739. if (attributeName.hasAttribute(serverDifferences$jscomp$0))
  15740. attributeName = attributeName.getAttribute(
  15741. serverDifferences$jscomp$0
  15742. ), checkAttributeStringCoercion(
  15743. i,
  15744. serverDifferences$jscomp$0
  15745. ), i = attributeName === "" + i ? i : attributeName;
  15746. else {
  15747. switch (typeof i) {
  15748. case "function":
  15749. case "symbol":
  15750. break a;
  15751. case "boolean":
  15752. if (attributeName = serverDifferences$jscomp$0.toLowerCase().slice(0, 5), "data-" !== attributeName && "aria-" !== attributeName)
  15753. break a;
  15754. }
  15755. i = void 0 === i ? void 0 : null;
  15756. }
  15757. else i = void 0;
  15758. attributes || warnForPropDifference(
  15759. value,
  15760. i,
  15761. propKey,
  15762. serverDifferences
  15763. );
  15764. }
  15765. }
  15766. }
  15767. 0 < extraAttributes.size && true !== props.suppressHydrationWarning && warnForExtraAttributes(domElement, extraAttributes, serverDifferences);
  15768. return 0 === Object.keys(serverDifferences).length ? null : serverDifferences;
  15769. }
  15770. function propNamesListJoin(list, combinator) {
  15771. switch (list.length) {
  15772. case 0:
  15773. return "";
  15774. case 1:
  15775. return list[0];
  15776. case 2:
  15777. return list[0] + " " + combinator + " " + list[1];
  15778. default:
  15779. return list.slice(0, -1).join(", ") + ", " + combinator + " " + list[list.length - 1];
  15780. }
  15781. }
  15782. function isLikelyStaticResource(initiatorType) {
  15783. switch (initiatorType) {
  15784. case "css":
  15785. case "script":
  15786. case "font":
  15787. case "img":
  15788. case "image":
  15789. case "input":
  15790. case "link":
  15791. return true;
  15792. default:
  15793. return false;
  15794. }
  15795. }
  15796. function estimateBandwidth() {
  15797. if ("function" === typeof performance.getEntriesByType) {
  15798. for (var count = 0, bits = 0, resourceEntries = performance.getEntriesByType("resource"), i = 0; i < resourceEntries.length; i++) {
  15799. var entry = resourceEntries[i], transferSize = entry.transferSize, initiatorType = entry.initiatorType, duration = entry.duration;
  15800. if (transferSize && duration && isLikelyStaticResource(initiatorType)) {
  15801. initiatorType = 0;
  15802. duration = entry.responseEnd;
  15803. for (i += 1; i < resourceEntries.length; i++) {
  15804. var overlapEntry = resourceEntries[i], overlapStartTime = overlapEntry.startTime;
  15805. if (overlapStartTime > duration) break;
  15806. var overlapTransferSize = overlapEntry.transferSize, overlapInitiatorType = overlapEntry.initiatorType;
  15807. overlapTransferSize && isLikelyStaticResource(overlapInitiatorType) && (overlapEntry = overlapEntry.responseEnd, initiatorType += overlapTransferSize * (overlapEntry < duration ? 1 : (duration - overlapStartTime) / (overlapEntry - overlapStartTime)));
  15808. }
  15809. --i;
  15810. bits += 8 * (transferSize + initiatorType) / (entry.duration / 1e3);
  15811. count++;
  15812. if (10 < count) break;
  15813. }
  15814. }
  15815. if (0 < count) return bits / count / 1e6;
  15816. }
  15817. return navigator.connection && (count = navigator.connection.downlink, "number" === typeof count) ? count : 5;
  15818. }
  15819. function getOwnerDocumentFromRootContainer(rootContainerElement) {
  15820. return 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
  15821. }
  15822. function getOwnHostContext(namespaceURI) {
  15823. switch (namespaceURI) {
  15824. case SVG_NAMESPACE:
  15825. return HostContextNamespaceSvg;
  15826. case MATH_NAMESPACE:
  15827. return HostContextNamespaceMath;
  15828. default:
  15829. return HostContextNamespaceNone;
  15830. }
  15831. }
  15832. function getChildHostContextProd(parentNamespace, type) {
  15833. if (parentNamespace === HostContextNamespaceNone)
  15834. switch (type) {
  15835. case "svg":
  15836. return HostContextNamespaceSvg;
  15837. case "math":
  15838. return HostContextNamespaceMath;
  15839. default:
  15840. return HostContextNamespaceNone;
  15841. }
  15842. return parentNamespace === HostContextNamespaceSvg && "foreignObject" === type ? HostContextNamespaceNone : parentNamespace;
  15843. }
  15844. function shouldSetTextContent(type, props) {
  15845. return "textarea" === type || "noscript" === type || "string" === typeof props.children || "number" === typeof props.children || "bigint" === typeof props.children || "object" === typeof props.dangerouslySetInnerHTML && null !== props.dangerouslySetInnerHTML && null != props.dangerouslySetInnerHTML.__html;
  15846. }
  15847. function shouldAttemptEagerTransition() {
  15848. var event = window.event;
  15849. if (event && "popstate" === event.type) {
  15850. if (event === currentPopstateTransitionEvent) return false;
  15851. currentPopstateTransitionEvent = event;
  15852. return true;
  15853. }
  15854. currentPopstateTransitionEvent = null;
  15855. return false;
  15856. }
  15857. function resolveEventType() {
  15858. var event = window.event;
  15859. return event && event !== schedulerEvent ? event.type : null;
  15860. }
  15861. function resolveEventTimeStamp() {
  15862. var event = window.event;
  15863. return event && event !== schedulerEvent ? event.timeStamp : -1.1;
  15864. }
  15865. function handleErrorInNextTick(error) {
  15866. setTimeout(function() {
  15867. throw error;
  15868. });
  15869. }
  15870. function commitMount(domElement, type, newProps) {
  15871. switch (type) {
  15872. case "button":
  15873. case "input":
  15874. case "select":
  15875. case "textarea":
  15876. newProps.autoFocus && domElement.focus();
  15877. break;
  15878. case "img":
  15879. newProps.src ? domElement.src = newProps.src : newProps.srcSet && (domElement.srcset = newProps.srcSet);
  15880. }
  15881. }
  15882. function commitHydratedInstance() {
  15883. }
  15884. function commitUpdate(domElement, type, oldProps, newProps) {
  15885. updateProperties(domElement, type, oldProps, newProps);
  15886. domElement[internalPropsKey] = newProps;
  15887. }
  15888. function resetTextContent(domElement) {
  15889. setTextContent(domElement, "");
  15890. }
  15891. function commitTextUpdate(textInstance, oldText, newText) {
  15892. textInstance.nodeValue = newText;
  15893. }
  15894. function warnForReactChildrenConflict(container) {
  15895. if (!container.__reactWarnedAboutChildrenConflict) {
  15896. var props = container[internalPropsKey] || null;
  15897. if (null !== props) {
  15898. var fiber = getInstanceFromNode(container);
  15899. null !== fiber && ("string" === typeof props.children || "number" === typeof props.children ? (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
  15900. console.error(
  15901. 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
  15902. );
  15903. })) : null != props.dangerouslySetInnerHTML && (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
  15904. console.error(
  15905. 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
  15906. );
  15907. })));
  15908. }
  15909. }
  15910. }
  15911. function isSingletonScope(type) {
  15912. return "head" === type;
  15913. }
  15914. function removeChild(parentInstance, child) {
  15915. parentInstance.removeChild(child);
  15916. }
  15917. function removeChildFromContainer(container, child) {
  15918. (9 === container.nodeType ? container.body : "HTML" === container.nodeName ? container.ownerDocument.body : container).removeChild(child);
  15919. }
  15920. function clearHydrationBoundary(parentInstance, hydrationInstance) {
  15921. var node = hydrationInstance, depth = 0;
  15922. do {
  15923. var nextNode = node.nextSibling;
  15924. parentInstance.removeChild(node);
  15925. if (nextNode && 8 === nextNode.nodeType)
  15926. if (node = nextNode.data, node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) {
  15927. if (0 === depth) {
  15928. parentInstance.removeChild(nextNode);
  15929. retryIfBlockedOn(hydrationInstance);
  15930. return;
  15931. }
  15932. depth--;
  15933. } else if (node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || node === SUSPENSE_QUEUED_START_DATA || node === SUSPENSE_FALLBACK_START_DATA || node === ACTIVITY_START_DATA)
  15934. depth++;
  15935. else if (node === PREAMBLE_CONTRIBUTION_HTML)
  15936. releaseSingletonInstance(
  15937. parentInstance.ownerDocument.documentElement
  15938. );
  15939. else if (node === PREAMBLE_CONTRIBUTION_HEAD) {
  15940. node = parentInstance.ownerDocument.head;
  15941. releaseSingletonInstance(node);
  15942. for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
  15943. var nextNode$jscomp$0 = node$jscomp$0.nextSibling, nodeName = node$jscomp$0.nodeName;
  15944. node$jscomp$0[internalHoistableMarker] || "SCRIPT" === nodeName || "STYLE" === nodeName || "LINK" === nodeName && "stylesheet" === node$jscomp$0.rel.toLowerCase() || node.removeChild(node$jscomp$0);
  15945. node$jscomp$0 = nextNode$jscomp$0;
  15946. }
  15947. } else
  15948. node === PREAMBLE_CONTRIBUTION_BODY && releaseSingletonInstance(parentInstance.ownerDocument.body);
  15949. node = nextNode;
  15950. } while (node);
  15951. retryIfBlockedOn(hydrationInstance);
  15952. }
  15953. function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
  15954. var node = suspenseInstance;
  15955. suspenseInstance = 0;
  15956. do {
  15957. var nextNode = node.nextSibling;
  15958. 1 === node.nodeType ? isHidden ? (node._stashedDisplay = node.style.display, node.style.display = "none") : (node.style.display = node._stashedDisplay || "", "" === node.getAttribute("style") && node.removeAttribute("style")) : 3 === node.nodeType && (isHidden ? (node._stashedText = node.nodeValue, node.nodeValue = "") : node.nodeValue = node._stashedText || "");
  15959. if (nextNode && 8 === nextNode.nodeType)
  15960. if (node = nextNode.data, node === SUSPENSE_END_DATA)
  15961. if (0 === suspenseInstance) break;
  15962. else suspenseInstance--;
  15963. else
  15964. node !== SUSPENSE_START_DATA && node !== SUSPENSE_PENDING_START_DATA && node !== SUSPENSE_QUEUED_START_DATA && node !== SUSPENSE_FALLBACK_START_DATA || suspenseInstance++;
  15965. node = nextNode;
  15966. } while (node);
  15967. }
  15968. function hideDehydratedBoundary(suspenseInstance) {
  15969. hideOrUnhideDehydratedBoundary(suspenseInstance, true);
  15970. }
  15971. function hideInstance(instance) {
  15972. instance = instance.style;
  15973. "function" === typeof instance.setProperty ? instance.setProperty("display", "none", "important") : instance.display = "none";
  15974. }
  15975. function hideTextInstance(textInstance) {
  15976. textInstance.nodeValue = "";
  15977. }
  15978. function unhideDehydratedBoundary(dehydratedInstance) {
  15979. hideOrUnhideDehydratedBoundary(dehydratedInstance, false);
  15980. }
  15981. function unhideInstance(instance, props) {
  15982. props = props[STYLE];
  15983. props = void 0 !== props && null !== props && props.hasOwnProperty("display") ? props.display : null;
  15984. instance.style.display = null == props || "boolean" === typeof props ? "" : ("" + props).trim();
  15985. }
  15986. function unhideTextInstance(textInstance, text) {
  15987. textInstance.nodeValue = text;
  15988. }
  15989. function clearContainerSparingly(container) {
  15990. var nextNode = container.firstChild;
  15991. nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
  15992. for (; nextNode; ) {
  15993. var node = nextNode;
  15994. nextNode = nextNode.nextSibling;
  15995. switch (node.nodeName) {
  15996. case "HTML":
  15997. case "HEAD":
  15998. case "BODY":
  15999. clearContainerSparingly(node);
  16000. detachDeletedInstance(node);
  16001. continue;
  16002. case "SCRIPT":
  16003. case "STYLE":
  16004. continue;
  16005. case "LINK":
  16006. if ("stylesheet" === node.rel.toLowerCase()) continue;
  16007. }
  16008. container.removeChild(node);
  16009. }
  16010. }
  16011. function canHydrateInstance(instance, type, props, inRootOrSingleton) {
  16012. for (; 1 === instance.nodeType; ) {
  16013. var anyProps = props;
  16014. if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
  16015. if (!inRootOrSingleton && ("INPUT" !== instance.nodeName || "hidden" !== instance.type))
  16016. break;
  16017. } else if (!inRootOrSingleton)
  16018. if ("input" === type && "hidden" === instance.type) {
  16019. checkAttributeStringCoercion(anyProps.name, "name");
  16020. var name = null == anyProps.name ? null : "" + anyProps.name;
  16021. if ("hidden" === anyProps.type && instance.getAttribute("name") === name)
  16022. return instance;
  16023. } else return instance;
  16024. else if (!instance[internalHoistableMarker])
  16025. switch (type) {
  16026. case "meta":
  16027. if (!instance.hasAttribute("itemprop")) break;
  16028. return instance;
  16029. case "link":
  16030. name = instance.getAttribute("rel");
  16031. if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
  16032. break;
  16033. else if (name !== anyProps.rel || instance.getAttribute("href") !== (null == anyProps.href || "" === anyProps.href ? null : anyProps.href) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) || instance.getAttribute("title") !== (null == anyProps.title ? null : anyProps.title))
  16034. break;
  16035. return instance;
  16036. case "style":
  16037. if (instance.hasAttribute("data-precedence")) break;
  16038. return instance;
  16039. case "script":
  16040. name = instance.getAttribute("src");
  16041. if ((name !== (null == anyProps.src ? null : anyProps.src) || instance.getAttribute("type") !== (null == anyProps.type ? null : anyProps.type) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) && name && instance.hasAttribute("async") && !instance.hasAttribute("itemprop"))
  16042. break;
  16043. return instance;
  16044. default:
  16045. return instance;
  16046. }
  16047. instance = getNextHydratable(instance.nextSibling);
  16048. if (null === instance) break;
  16049. }
  16050. return null;
  16051. }
  16052. function canHydrateTextInstance(instance, text, inRootOrSingleton) {
  16053. if ("" === text) return null;
  16054. for (; 3 !== instance.nodeType; ) {
  16055. if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
  16056. return null;
  16057. instance = getNextHydratable(instance.nextSibling);
  16058. if (null === instance) return null;
  16059. }
  16060. return instance;
  16061. }
  16062. function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
  16063. for (; 8 !== instance.nodeType; ) {
  16064. if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
  16065. return null;
  16066. instance = getNextHydratable(instance.nextSibling);
  16067. if (null === instance) return null;
  16068. }
  16069. return instance;
  16070. }
  16071. function isSuspenseInstancePending(instance) {
  16072. return instance.data === SUSPENSE_PENDING_START_DATA || instance.data === SUSPENSE_QUEUED_START_DATA;
  16073. }
  16074. function isSuspenseInstanceFallback(instance) {
  16075. return instance.data === SUSPENSE_FALLBACK_START_DATA || instance.data === SUSPENSE_PENDING_START_DATA && instance.ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING;
  16076. }
  16077. function registerSuspenseInstanceRetry(instance, callback) {
  16078. var ownerDocument = instance.ownerDocument;
  16079. if (instance.data === SUSPENSE_QUEUED_START_DATA)
  16080. instance._reactRetry = callback;
  16081. else if (instance.data !== SUSPENSE_PENDING_START_DATA || ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING)
  16082. callback();
  16083. else {
  16084. var listener = function() {
  16085. callback();
  16086. ownerDocument.removeEventListener("DOMContentLoaded", listener);
  16087. };
  16088. ownerDocument.addEventListener("DOMContentLoaded", listener);
  16089. instance._reactRetry = listener;
  16090. }
  16091. }
  16092. function getNextHydratable(node) {
  16093. for (; null != node; node = node.nextSibling) {
  16094. var nodeType = node.nodeType;
  16095. if (1 === nodeType || 3 === nodeType) break;
  16096. if (8 === nodeType) {
  16097. nodeType = node.data;
  16098. if (nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || nodeType === SUSPENSE_QUEUED_START_DATA || nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING)
  16099. break;
  16100. if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA)
  16101. return null;
  16102. }
  16103. }
  16104. return node;
  16105. }
  16106. function describeHydratableInstanceForDevWarnings(instance) {
  16107. if (1 === instance.nodeType) {
  16108. for (var JSCompiler_temp_const = instance.nodeName.toLowerCase(), serverDifferences = {}, attributes = instance.attributes, i = 0; i < attributes.length; i++) {
  16109. var attr = attributes[i];
  16110. serverDifferences[getPropNameFromAttributeName(attr.name)] = "style" === attr.name.toLowerCase() ? getStylesObjectFromElement(instance) : attr.value;
  16111. }
  16112. return { type: JSCompiler_temp_const, props: serverDifferences };
  16113. }
  16114. return 8 === instance.nodeType ? instance.data === ACTIVITY_START_DATA ? { type: "Activity", props: {} } : { type: "Suspense", props: {} } : instance.nodeValue;
  16115. }
  16116. function diffHydratedTextForDevWarnings(textInstance, text, parentProps) {
  16117. return null === parentProps || true !== parentProps[SUPPRESS_HYDRATION_WARNING] ? (textInstance.nodeValue === text ? textInstance = null : (text = normalizeMarkupForTextOrAttribute(text), textInstance = normalizeMarkupForTextOrAttribute(textInstance.nodeValue) === text ? null : textInstance.nodeValue), textInstance) : null;
  16118. }
  16119. function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {
  16120. hydrationInstance = hydrationInstance.nextSibling;
  16121. for (var depth = 0; hydrationInstance; ) {
  16122. if (8 === hydrationInstance.nodeType) {
  16123. var data = hydrationInstance.data;
  16124. if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) {
  16125. if (0 === depth)
  16126. return getNextHydratable(hydrationInstance.nextSibling);
  16127. depth--;
  16128. } else
  16129. data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && data !== SUSPENSE_PENDING_START_DATA && data !== SUSPENSE_QUEUED_START_DATA && data !== ACTIVITY_START_DATA || depth++;
  16130. }
  16131. hydrationInstance = hydrationInstance.nextSibling;
  16132. }
  16133. return null;
  16134. }
  16135. function getParentHydrationBoundary(targetInstance) {
  16136. targetInstance = targetInstance.previousSibling;
  16137. for (var depth = 0; targetInstance; ) {
  16138. if (8 === targetInstance.nodeType) {
  16139. var data = targetInstance.data;
  16140. if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_QUEUED_START_DATA || data === ACTIVITY_START_DATA) {
  16141. if (0 === depth) return targetInstance;
  16142. depth--;
  16143. } else
  16144. data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA || depth++;
  16145. }
  16146. targetInstance = targetInstance.previousSibling;
  16147. }
  16148. return null;
  16149. }
  16150. function commitHydratedContainer(container) {
  16151. retryIfBlockedOn(container);
  16152. }
  16153. function commitHydratedActivityInstance(activityInstance) {
  16154. retryIfBlockedOn(activityInstance);
  16155. }
  16156. function commitHydratedSuspenseInstance(suspenseInstance) {
  16157. retryIfBlockedOn(suspenseInstance);
  16158. }
  16159. function resolveSingletonInstance(type, props, rootContainerInstance, hostContext, validateDOMNestingDev) {
  16160. validateDOMNestingDev && validateDOMNesting(type, hostContext.ancestorInfo);
  16161. props = getOwnerDocumentFromRootContainer(rootContainerInstance);
  16162. switch (type) {
  16163. case "html":
  16164. type = props.documentElement;
  16165. if (!type)
  16166. throw Error(
  16167. "React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page."
  16168. );
  16169. return type;
  16170. case "head":
  16171. type = props.head;
  16172. if (!type)
  16173. throw Error(
  16174. "React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page."
  16175. );
  16176. return type;
  16177. case "body":
  16178. type = props.body;
  16179. if (!type)
  16180. throw Error(
  16181. "React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page."
  16182. );
  16183. return type;
  16184. default:
  16185. throw Error(
  16186. "resolveSingletonInstance was called with an element type that is not supported. This is a bug in React."
  16187. );
  16188. }
  16189. }
  16190. function acquireSingletonInstance(type, props, instance, internalInstanceHandle) {
  16191. if (!instance[internalContainerInstanceKey] && getInstanceFromNode(instance)) {
  16192. var tagName = instance.tagName.toLowerCase();
  16193. console.error(
  16194. "You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",
  16195. tagName,
  16196. tagName,
  16197. tagName
  16198. );
  16199. }
  16200. switch (type) {
  16201. case "html":
  16202. case "head":
  16203. case "body":
  16204. break;
  16205. default:
  16206. console.error(
  16207. "acquireSingletonInstance was called with an element type that is not supported. This is a bug in React."
  16208. );
  16209. }
  16210. for (tagName = instance.attributes; tagName.length; )
  16211. instance.removeAttributeNode(tagName[0]);
  16212. setInitialProperties(instance, type, props);
  16213. instance[internalInstanceKey] = internalInstanceHandle;
  16214. instance[internalPropsKey] = props;
  16215. }
  16216. function releaseSingletonInstance(instance) {
  16217. for (var attributes = instance.attributes; attributes.length; )
  16218. instance.removeAttributeNode(attributes[0]);
  16219. detachDeletedInstance(instance);
  16220. }
  16221. function getHoistableRoot(container) {
  16222. return "function" === typeof container.getRootNode ? container.getRootNode() : 9 === container.nodeType ? container : container.ownerDocument;
  16223. }
  16224. function preconnectAs(rel, href, crossOrigin) {
  16225. var ownerDocument = globalDocument;
  16226. if (ownerDocument && "string" === typeof href && href) {
  16227. var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);
  16228. limitedEscapedHref = 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
  16229. "string" === typeof crossOrigin && (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
  16230. preconnectsSet.has(limitedEscapedHref) || (preconnectsSet.add(limitedEscapedHref), rel = { rel, crossOrigin, href }, null === ownerDocument.querySelector(limitedEscapedHref) && (href = ownerDocument.createElement("link"), setInitialProperties(href, "link", rel), markNodeAsHoistable(href), ownerDocument.head.appendChild(href)));
  16231. }
  16232. }
  16233. function getResource(type, currentProps, pendingProps, currentResource) {
  16234. var resourceRoot = (resourceRoot = rootInstanceStackCursor.current) ? getHoistableRoot(resourceRoot) : null;
  16235. if (!resourceRoot)
  16236. throw Error(
  16237. '"resourceRoot" was expected to exist. This is a bug in React.'
  16238. );
  16239. switch (type) {
  16240. case "meta":
  16241. case "title":
  16242. return null;
  16243. case "style":
  16244. return "string" === typeof pendingProps.precedence && "string" === typeof pendingProps.href ? (pendingProps = getStyleKey(pendingProps.href), currentProps = getResourcesFromRoot(resourceRoot).hoistableStyles, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
  16245. type: "style",
  16246. instance: null,
  16247. count: 0,
  16248. state: null
  16249. }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
  16250. case "link":
  16251. if ("stylesheet" === pendingProps.rel && "string" === typeof pendingProps.href && "string" === typeof pendingProps.precedence) {
  16252. type = getStyleKey(pendingProps.href);
  16253. var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles, _resource = _styles.get(type);
  16254. if (!_resource && (resourceRoot = resourceRoot.ownerDocument || resourceRoot, _resource = {
  16255. type: "stylesheet",
  16256. instance: null,
  16257. count: 0,
  16258. state: { loading: NotLoaded, preload: null }
  16259. }, _styles.set(type, _resource), (_styles = resourceRoot.querySelector(
  16260. getStylesheetSelectorFromKey(type)
  16261. )) && !_styles._p && (_resource.instance = _styles, _resource.state.loading = Loaded | Inserted), !preloadPropsMap.has(type))) {
  16262. var preloadProps = {
  16263. rel: "preload",
  16264. as: "style",
  16265. href: pendingProps.href,
  16266. crossOrigin: pendingProps.crossOrigin,
  16267. integrity: pendingProps.integrity,
  16268. media: pendingProps.media,
  16269. hrefLang: pendingProps.hrefLang,
  16270. referrerPolicy: pendingProps.referrerPolicy
  16271. };
  16272. preloadPropsMap.set(type, preloadProps);
  16273. _styles || preloadStylesheet(
  16274. resourceRoot,
  16275. type,
  16276. preloadProps,
  16277. _resource.state
  16278. );
  16279. }
  16280. if (currentProps && null === currentResource)
  16281. throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
  16282. "Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
  16283. );
  16284. return _resource;
  16285. }
  16286. if (currentProps && null !== currentResource)
  16287. throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
  16288. "Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
  16289. );
  16290. return null;
  16291. case "script":
  16292. return currentProps = pendingProps.async, pendingProps = pendingProps.src, "string" === typeof pendingProps && currentProps && "function" !== typeof currentProps && "symbol" !== typeof currentProps ? (pendingProps = getScriptKey(pendingProps), currentProps = getResourcesFromRoot(resourceRoot).hoistableScripts, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
  16293. type: "script",
  16294. instance: null,
  16295. count: 0,
  16296. state: null
  16297. }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
  16298. default:
  16299. throw Error(
  16300. 'getResource encountered a type it did not expect: "' + type + '". this is a bug in React.'
  16301. );
  16302. }
  16303. }
  16304. function describeLinkForResourceErrorDEV(props) {
  16305. var describedProps = 0, description = "<link";
  16306. "string" === typeof props.rel ? (describedProps++, description += ' rel="' + props.rel + '"') : hasOwnProperty.call(props, "rel") && (describedProps++, description += ' rel="' + (null === props.rel ? "null" : "invalid type " + typeof props.rel) + '"');
  16307. "string" === typeof props.href ? (describedProps++, description += ' href="' + props.href + '"') : hasOwnProperty.call(props, "href") && (describedProps++, description += ' href="' + (null === props.href ? "null" : "invalid type " + typeof props.href) + '"');
  16308. "string" === typeof props.precedence ? (describedProps++, description += ' precedence="' + props.precedence + '"') : hasOwnProperty.call(props, "precedence") && (describedProps++, description += " precedence={" + (null === props.precedence ? "null" : "invalid type " + typeof props.precedence) + "}");
  16309. Object.getOwnPropertyNames(props).length > describedProps && (description += " ...");
  16310. return description + " />";
  16311. }
  16312. function getStyleKey(href) {
  16313. return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
  16314. }
  16315. function getStylesheetSelectorFromKey(key) {
  16316. return 'link[rel="stylesheet"][' + key + "]";
  16317. }
  16318. function stylesheetPropsFromRawProps(rawProps) {
  16319. return assign({}, rawProps, {
  16320. "data-precedence": rawProps.precedence,
  16321. precedence: null
  16322. });
  16323. }
  16324. function preloadStylesheet(ownerDocument, key, preloadProps, state) {
  16325. ownerDocument.querySelector(
  16326. 'link[rel="preload"][as="style"][' + key + "]"
  16327. ) ? state.loading = Loaded : (key = ownerDocument.createElement("link"), state.preload = key, key.addEventListener("load", function() {
  16328. return state.loading |= Loaded;
  16329. }), key.addEventListener("error", function() {
  16330. return state.loading |= Errored;
  16331. }), setInitialProperties(key, "link", preloadProps), markNodeAsHoistable(key), ownerDocument.head.appendChild(key));
  16332. }
  16333. function getScriptKey(src) {
  16334. return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
  16335. }
  16336. function getScriptSelectorFromKey(key) {
  16337. return "script[async]" + key;
  16338. }
  16339. function acquireResource(hoistableRoot, resource, props) {
  16340. resource.count++;
  16341. if (null === resource.instance)
  16342. switch (resource.type) {
  16343. case "style":
  16344. var instance = hoistableRoot.querySelector(
  16345. 'style[data-href~="' + escapeSelectorAttributeValueInsideDoubleQuotes(props.href) + '"]'
  16346. );
  16347. if (instance)
  16348. return resource.instance = instance, markNodeAsHoistable(instance), instance;
  16349. var styleProps = assign({}, props, {
  16350. "data-href": props.href,
  16351. "data-precedence": props.precedence,
  16352. href: null,
  16353. precedence: null
  16354. });
  16355. instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("style");
  16356. markNodeAsHoistable(instance);
  16357. setInitialProperties(instance, "style", styleProps);
  16358. insertStylesheet(instance, props.precedence, hoistableRoot);
  16359. return resource.instance = instance;
  16360. case "stylesheet":
  16361. styleProps = getStyleKey(props.href);
  16362. var _instance = hoistableRoot.querySelector(
  16363. getStylesheetSelectorFromKey(styleProps)
  16364. );
  16365. if (_instance)
  16366. return resource.state.loading |= Inserted, resource.instance = _instance, markNodeAsHoistable(_instance), _instance;
  16367. instance = stylesheetPropsFromRawProps(props);
  16368. (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps);
  16369. _instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("link");
  16370. markNodeAsHoistable(_instance);
  16371. var linkInstance = _instance;
  16372. linkInstance._p = new Promise(function(resolve, reject) {
  16373. linkInstance.onload = resolve;
  16374. linkInstance.onerror = reject;
  16375. });
  16376. setInitialProperties(_instance, "link", instance);
  16377. resource.state.loading |= Inserted;
  16378. insertStylesheet(_instance, props.precedence, hoistableRoot);
  16379. return resource.instance = _instance;
  16380. case "script":
  16381. _instance = getScriptKey(props.src);
  16382. if (styleProps = hoistableRoot.querySelector(
  16383. getScriptSelectorFromKey(_instance)
  16384. ))
  16385. return resource.instance = styleProps, markNodeAsHoistable(styleProps), styleProps;
  16386. instance = props;
  16387. if (styleProps = preloadPropsMap.get(_instance))
  16388. instance = assign({}, props), adoptPreloadPropsForScript(instance, styleProps);
  16389. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  16390. styleProps = hoistableRoot.createElement("script");
  16391. markNodeAsHoistable(styleProps);
  16392. setInitialProperties(styleProps, "link", instance);
  16393. hoistableRoot.head.appendChild(styleProps);
  16394. return resource.instance = styleProps;
  16395. case "void":
  16396. return null;
  16397. default:
  16398. throw Error(
  16399. 'acquireResource encountered a resource type it did not expect: "' + resource.type + '". this is a bug in React.'
  16400. );
  16401. }
  16402. else
  16403. "stylesheet" === resource.type && (resource.state.loading & Inserted) === NotLoaded && (instance = resource.instance, resource.state.loading |= Inserted, insertStylesheet(instance, props.precedence, hoistableRoot));
  16404. return resource.instance;
  16405. }
  16406. function insertStylesheet(instance, precedence, root2) {
  16407. for (var nodes = root2.querySelectorAll(
  16408. 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
  16409. ), last = nodes.length ? nodes[nodes.length - 1] : null, prior = last, i = 0; i < nodes.length; i++) {
  16410. var node = nodes[i];
  16411. if (node.dataset.precedence === precedence) prior = node;
  16412. else if (prior !== last) break;
  16413. }
  16414. prior ? prior.parentNode.insertBefore(instance, prior.nextSibling) : (precedence = 9 === root2.nodeType ? root2.head : root2, precedence.insertBefore(instance, precedence.firstChild));
  16415. }
  16416. function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
  16417. null == stylesheetProps.crossOrigin && (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
  16418. null == stylesheetProps.referrerPolicy && (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
  16419. null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
  16420. }
  16421. function adoptPreloadPropsForScript(scriptProps, preloadProps) {
  16422. null == scriptProps.crossOrigin && (scriptProps.crossOrigin = preloadProps.crossOrigin);
  16423. null == scriptProps.referrerPolicy && (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
  16424. null == scriptProps.integrity && (scriptProps.integrity = preloadProps.integrity);
  16425. }
  16426. function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
  16427. if (null === tagCaches) {
  16428. var cache = /* @__PURE__ */ new Map();
  16429. var caches = tagCaches = /* @__PURE__ */ new Map();
  16430. caches.set(ownerDocument, cache);
  16431. } else
  16432. caches = tagCaches, cache = caches.get(ownerDocument), cache || (cache = /* @__PURE__ */ new Map(), caches.set(ownerDocument, cache));
  16433. if (cache.has(type)) return cache;
  16434. cache.set(type, null);
  16435. ownerDocument = ownerDocument.getElementsByTagName(type);
  16436. for (caches = 0; caches < ownerDocument.length; caches++) {
  16437. var node = ownerDocument[caches];
  16438. if (!(node[internalHoistableMarker] || node[internalInstanceKey] || "link" === type && "stylesheet" === node.getAttribute("rel")) && node.namespaceURI !== SVG_NAMESPACE) {
  16439. var nodeKey = node.getAttribute(keyAttribute) || "";
  16440. nodeKey = type + nodeKey;
  16441. var existing = cache.get(nodeKey);
  16442. existing ? existing.push(node) : cache.set(nodeKey, [node]);
  16443. }
  16444. }
  16445. return cache;
  16446. }
  16447. function mountHoistable(hoistableRoot, type, instance) {
  16448. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  16449. hoistableRoot.head.insertBefore(
  16450. instance,
  16451. "title" === type ? hoistableRoot.querySelector("head > title") : null
  16452. );
  16453. }
  16454. function isHostHoistableType(type, props, hostContext) {
  16455. var outsideHostContainerContext = !hostContext.ancestorInfo.containerTagInScope;
  16456. if (hostContext.context === HostContextNamespaceSvg || null != props.itemProp)
  16457. return !outsideHostContainerContext || null == props.itemProp || "meta" !== type && "title" !== type && "style" !== type && "link" !== type && "script" !== type || console.error(
  16458. "Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",
  16459. type,
  16460. type
  16461. ), false;
  16462. switch (type) {
  16463. case "meta":
  16464. case "title":
  16465. return true;
  16466. case "style":
  16467. if ("string" !== typeof props.precedence || "string" !== typeof props.href || "" === props.href) {
  16468. outsideHostContainerContext && console.error(
  16469. 'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.'
  16470. );
  16471. break;
  16472. }
  16473. return true;
  16474. case "link":
  16475. if ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href || props.onLoad || props.onError) {
  16476. if ("stylesheet" === props.rel && "string" === typeof props.precedence) {
  16477. type = props.href;
  16478. var onError = props.onError, disabled = props.disabled;
  16479. hostContext = [];
  16480. props.onLoad && hostContext.push("`onLoad`");
  16481. onError && hostContext.push("`onError`");
  16482. null != disabled && hostContext.push("`disabled`");
  16483. onError = propNamesListJoin(hostContext, "and");
  16484. onError += 1 === hostContext.length ? " prop" : " props";
  16485. disabled = 1 === hostContext.length ? "an " + onError : "the " + onError;
  16486. hostContext.length && console.error(
  16487. 'React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',
  16488. type,
  16489. disabled,
  16490. onError
  16491. );
  16492. }
  16493. outsideHostContainerContext && ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href ? console.error(
  16494. "Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"
  16495. ) : (props.onError || props.onLoad) && console.error(
  16496. "Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
  16497. ));
  16498. break;
  16499. }
  16500. switch (props.rel) {
  16501. case "stylesheet":
  16502. return type = props.precedence, props = props.disabled, "string" !== typeof type && outsideHostContainerContext && console.error(
  16503. 'Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'
  16504. ), "string" === typeof type && null == props;
  16505. default:
  16506. return true;
  16507. }
  16508. case "script":
  16509. type = props.async && "function" !== typeof props.async && "symbol" !== typeof props.async;
  16510. if (!type || props.onLoad || props.onError || !props.src || "string" !== typeof props.src) {
  16511. outsideHostContainerContext && (type ? props.onLoad || props.onError ? console.error(
  16512. "Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
  16513. ) : console.error(
  16514. "Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."
  16515. ) : console.error(
  16516. 'Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'
  16517. ));
  16518. break;
  16519. }
  16520. return true;
  16521. case "noscript":
  16522. case "template":
  16523. outsideHostContainerContext && console.error(
  16524. "Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",
  16525. type
  16526. );
  16527. }
  16528. return false;
  16529. }
  16530. function preloadResource(resource) {
  16531. return "stylesheet" === resource.type && (resource.state.loading & Settled) === NotLoaded ? false : true;
  16532. }
  16533. function suspendResource(state, hoistableRoot, resource, props) {
  16534. if ("stylesheet" === resource.type && ("string" !== typeof props.media || false !== matchMedia(props.media).matches) && (resource.state.loading & Inserted) === NotLoaded) {
  16535. if (null === resource.instance) {
  16536. var key = getStyleKey(props.href), instance = hoistableRoot.querySelector(
  16537. getStylesheetSelectorFromKey(key)
  16538. );
  16539. if (instance) {
  16540. hoistableRoot = instance._p;
  16541. null !== hoistableRoot && "object" === typeof hoistableRoot && "function" === typeof hoistableRoot.then && (state.count++, state = onUnsuspend.bind(state), hoistableRoot.then(state, state));
  16542. resource.state.loading |= Inserted;
  16543. resource.instance = instance;
  16544. markNodeAsHoistable(instance);
  16545. return;
  16546. }
  16547. instance = hoistableRoot.ownerDocument || hoistableRoot;
  16548. props = stylesheetPropsFromRawProps(props);
  16549. (key = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(props, key);
  16550. instance = instance.createElement("link");
  16551. markNodeAsHoistable(instance);
  16552. var linkInstance = instance;
  16553. linkInstance._p = new Promise(function(resolve, reject) {
  16554. linkInstance.onload = resolve;
  16555. linkInstance.onerror = reject;
  16556. });
  16557. setInitialProperties(instance, "link", props);
  16558. resource.instance = instance;
  16559. }
  16560. null === state.stylesheets && (state.stylesheets = /* @__PURE__ */ new Map());
  16561. state.stylesheets.set(resource, hoistableRoot);
  16562. (hoistableRoot = resource.state.preload) && (resource.state.loading & Settled) === NotLoaded && (state.count++, resource = onUnsuspend.bind(state), hoistableRoot.addEventListener("load", resource), hoistableRoot.addEventListener("error", resource));
  16563. }
  16564. }
  16565. function waitForCommitToBeReady(state, timeoutOffset) {
  16566. state.stylesheets && 0 === state.count && insertSuspendedStylesheets(state, state.stylesheets);
  16567. return 0 < state.count || 0 < state.imgCount ? function(commit) {
  16568. var stylesheetTimer = setTimeout(function() {
  16569. state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
  16570. if (state.unsuspend) {
  16571. var unsuspend = state.unsuspend;
  16572. state.unsuspend = null;
  16573. unsuspend();
  16574. }
  16575. }, SUSPENSEY_STYLESHEET_TIMEOUT + timeoutOffset);
  16576. 0 < state.imgBytes && 0 === estimatedBytesWithinLimit && (estimatedBytesWithinLimit = 125 * estimateBandwidth() * SUSPENSEY_IMAGE_TIME_ESTIMATE);
  16577. var imgTimer = setTimeout(
  16578. function() {
  16579. state.waitingForImages = false;
  16580. if (0 === state.count && (state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets), state.unsuspend)) {
  16581. var unsuspend = state.unsuspend;
  16582. state.unsuspend = null;
  16583. unsuspend();
  16584. }
  16585. },
  16586. (state.imgBytes > estimatedBytesWithinLimit ? 50 : SUSPENSEY_IMAGE_TIMEOUT) + timeoutOffset
  16587. );
  16588. state.unsuspend = commit;
  16589. return function() {
  16590. state.unsuspend = null;
  16591. clearTimeout(stylesheetTimer);
  16592. clearTimeout(imgTimer);
  16593. };
  16594. } : null;
  16595. }
  16596. function onUnsuspend() {
  16597. this.count--;
  16598. if (0 === this.count && (0 === this.imgCount || !this.waitingForImages)) {
  16599. if (this.stylesheets)
  16600. insertSuspendedStylesheets(this, this.stylesheets);
  16601. else if (this.unsuspend) {
  16602. var unsuspend = this.unsuspend;
  16603. this.unsuspend = null;
  16604. unsuspend();
  16605. }
  16606. }
  16607. }
  16608. function insertSuspendedStylesheets(state, resources) {
  16609. state.stylesheets = null;
  16610. null !== state.unsuspend && (state.count++, precedencesByRoot = /* @__PURE__ */ new Map(), resources.forEach(insertStylesheetIntoRoot, state), precedencesByRoot = null, onUnsuspend.call(state));
  16611. }
  16612. function insertStylesheetIntoRoot(root2, resource) {
  16613. if (!(resource.state.loading & Inserted)) {
  16614. var precedences = precedencesByRoot.get(root2);
  16615. if (precedences) var last = precedences.get(LAST_PRECEDENCE);
  16616. else {
  16617. precedences = /* @__PURE__ */ new Map();
  16618. precedencesByRoot.set(root2, precedences);
  16619. for (var nodes = root2.querySelectorAll(
  16620. "link[data-precedence],style[data-precedence]"
  16621. ), i = 0; i < nodes.length; i++) {
  16622. var node = nodes[i];
  16623. if ("LINK" === node.nodeName || "not all" !== node.getAttribute("media"))
  16624. precedences.set(node.dataset.precedence, node), last = node;
  16625. }
  16626. last && precedences.set(LAST_PRECEDENCE, last);
  16627. }
  16628. nodes = resource.instance;
  16629. node = nodes.getAttribute("data-precedence");
  16630. i = precedences.get(node) || last;
  16631. i === last && precedences.set(LAST_PRECEDENCE, nodes);
  16632. precedences.set(node, nodes);
  16633. this.count++;
  16634. last = onUnsuspend.bind(this);
  16635. nodes.addEventListener("load", last);
  16636. nodes.addEventListener("error", last);
  16637. i ? i.parentNode.insertBefore(nodes, i.nextSibling) : (root2 = 9 === root2.nodeType ? root2.head : root2, root2.insertBefore(nodes, root2.firstChild));
  16638. resource.state.loading |= Inserted;
  16639. }
  16640. }
  16641. function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, formState) {
  16642. this.tag = 1;
  16643. this.containerInfo = containerInfo;
  16644. this.pingCache = this.current = this.pendingChildren = null;
  16645. this.timeoutHandle = noTimeout;
  16646. this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null;
  16647. this.callbackPriority = 0;
  16648. this.expirationTimes = createLaneMap(-1);
  16649. this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
  16650. this.entanglements = createLaneMap(0);
  16651. this.hiddenUpdates = createLaneMap(null);
  16652. this.identifierPrefix = identifierPrefix;
  16653. this.onUncaughtError = onUncaughtError;
  16654. this.onCaughtError = onCaughtError;
  16655. this.onRecoverableError = onRecoverableError;
  16656. this.pooledCache = null;
  16657. this.pooledCacheLanes = 0;
  16658. this.formState = formState;
  16659. this.incompleteTransitions = /* @__PURE__ */ new Map();
  16660. this.passiveEffectDuration = this.effectDuration = -0;
  16661. this.memoizedUpdaters = /* @__PURE__ */ new Set();
  16662. containerInfo = this.pendingUpdatersLaneMap = [];
  16663. for (tag = 0; 31 > tag; tag++) containerInfo.push(/* @__PURE__ */ new Set());
  16664. this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()";
  16665. }
  16666. function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, formState, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator) {
  16667. containerInfo = new FiberRootNode(
  16668. containerInfo,
  16669. tag,
  16670. hydrate,
  16671. identifierPrefix,
  16672. onUncaughtError,
  16673. onCaughtError,
  16674. onRecoverableError,
  16675. onDefaultTransitionIndicator,
  16676. formState
  16677. );
  16678. tag = ConcurrentMode;
  16679. true === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode);
  16680. tag |= ProfileMode;
  16681. isStrictMode = createFiber(3, null, null, tag);
  16682. containerInfo.current = isStrictMode;
  16683. isStrictMode.stateNode = containerInfo;
  16684. tag = createCache();
  16685. retainCache(tag);
  16686. containerInfo.pooledCache = tag;
  16687. retainCache(tag);
  16688. isStrictMode.memoizedState = {
  16689. element: initialChildren,
  16690. isDehydrated: hydrate,
  16691. cache: tag
  16692. };
  16693. initializeUpdateQueue(isStrictMode);
  16694. return containerInfo;
  16695. }
  16696. function getContextForSubtree(parentComponent) {
  16697. if (!parentComponent) return emptyContextObject;
  16698. parentComponent = emptyContextObject;
  16699. return parentComponent;
  16700. }
  16701. function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
  16702. if (injectedHook && "function" === typeof injectedHook.onScheduleFiberRoot)
  16703. try {
  16704. injectedHook.onScheduleFiberRoot(rendererID, container, element);
  16705. } catch (err) {
  16706. hasLoggedError || (hasLoggedError = true, console.error(
  16707. "React instrumentation encountered an error: %o",
  16708. err
  16709. ));
  16710. }
  16711. parentComponent = getContextForSubtree(parentComponent);
  16712. null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
  16713. isRendering && null !== current && !didWarnAboutNestedUpdates && (didWarnAboutNestedUpdates = true, console.error(
  16714. "Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",
  16715. getComponentNameFromFiber(current) || "Unknown"
  16716. ));
  16717. container = createUpdate(lane);
  16718. container.payload = { element };
  16719. callback = void 0 === callback ? null : callback;
  16720. null !== callback && ("function" !== typeof callback && console.error(
  16721. "Expected the last optional `callback` argument to be a function. Instead received: %s.",
  16722. callback
  16723. ), container.callback = callback);
  16724. element = enqueueUpdate(rootFiber, container, lane);
  16725. null !== element && (startUpdateTimerByLane(lane, "root.render()", null), scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
  16726. }
  16727. function markRetryLaneImpl(fiber, retryLane) {
  16728. fiber = fiber.memoizedState;
  16729. if (null !== fiber && null !== fiber.dehydrated) {
  16730. var a = fiber.retryLane;
  16731. fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
  16732. }
  16733. }
  16734. function markRetryLaneIfNotHydrated(fiber, retryLane) {
  16735. markRetryLaneImpl(fiber, retryLane);
  16736. (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
  16737. }
  16738. function attemptContinuousHydration(fiber) {
  16739. if (13 === fiber.tag || 31 === fiber.tag) {
  16740. var root2 = enqueueConcurrentRenderForLane(fiber, 67108864);
  16741. null !== root2 && scheduleUpdateOnFiber(root2, fiber, 67108864);
  16742. markRetryLaneIfNotHydrated(fiber, 67108864);
  16743. }
  16744. }
  16745. function attemptHydrationAtCurrentPriority(fiber) {
  16746. if (13 === fiber.tag || 31 === fiber.tag) {
  16747. var lane = requestUpdateLane(fiber);
  16748. lane = getBumpedLaneForHydrationByLane(lane);
  16749. var root2 = enqueueConcurrentRenderForLane(fiber, lane);
  16750. null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
  16751. markRetryLaneIfNotHydrated(fiber, lane);
  16752. }
  16753. }
  16754. function getCurrentFiberForDevTools() {
  16755. return current;
  16756. }
  16757. function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
  16758. var prevTransition = ReactSharedInternals.T;
  16759. ReactSharedInternals.T = null;
  16760. var previousPriority = ReactDOMSharedInternals.p;
  16761. try {
  16762. ReactDOMSharedInternals.p = DiscreteEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  16763. } finally {
  16764. ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
  16765. }
  16766. }
  16767. function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
  16768. var prevTransition = ReactSharedInternals.T;
  16769. ReactSharedInternals.T = null;
  16770. var previousPriority = ReactDOMSharedInternals.p;
  16771. try {
  16772. ReactDOMSharedInternals.p = ContinuousEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  16773. } finally {
  16774. ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
  16775. }
  16776. }
  16777. function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  16778. if (_enabled) {
  16779. var blockedOn = findInstanceBlockingEvent(nativeEvent);
  16780. if (null === blockedOn)
  16781. dispatchEventForPluginEventSystem(
  16782. domEventName,
  16783. eventSystemFlags,
  16784. nativeEvent,
  16785. return_targetInst,
  16786. targetContainer
  16787. ), clearIfContinuousEvent(domEventName, nativeEvent);
  16788. else if (queueIfContinuousEvent(
  16789. blockedOn,
  16790. domEventName,
  16791. eventSystemFlags,
  16792. targetContainer,
  16793. nativeEvent
  16794. ))
  16795. nativeEvent.stopPropagation();
  16796. else if (clearIfContinuousEvent(domEventName, nativeEvent), eventSystemFlags & 4 && -1 < discreteReplayableEvents.indexOf(domEventName)) {
  16797. for (; null !== blockedOn; ) {
  16798. var fiber = getInstanceFromNode(blockedOn);
  16799. if (null !== fiber)
  16800. switch (fiber.tag) {
  16801. case 3:
  16802. fiber = fiber.stateNode;
  16803. if (fiber.current.memoizedState.isDehydrated) {
  16804. var lanes = getHighestPriorityLanes(fiber.pendingLanes);
  16805. if (0 !== lanes) {
  16806. var root2 = fiber;
  16807. root2.pendingLanes |= 2;
  16808. for (root2.entangledLanes |= 2; lanes; ) {
  16809. var lane = 1 << 31 - clz32(lanes);
  16810. root2.entanglements[1] |= lane;
  16811. lanes &= ~lane;
  16812. }
  16813. ensureRootIsScheduled(fiber);
  16814. (executionContext & (RenderContext | CommitContext)) === NoContext && (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS, flushSyncWorkAcrossRoots_impl(0, false));
  16815. }
  16816. }
  16817. break;
  16818. case 31:
  16819. case 13:
  16820. root2 = enqueueConcurrentRenderForLane(fiber, 2), null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2), flushSyncWork$1(), markRetryLaneIfNotHydrated(fiber, 2);
  16821. }
  16822. fiber = findInstanceBlockingEvent(nativeEvent);
  16823. null === fiber && dispatchEventForPluginEventSystem(
  16824. domEventName,
  16825. eventSystemFlags,
  16826. nativeEvent,
  16827. return_targetInst,
  16828. targetContainer
  16829. );
  16830. if (fiber === blockedOn) break;
  16831. blockedOn = fiber;
  16832. }
  16833. null !== blockedOn && nativeEvent.stopPropagation();
  16834. } else
  16835. dispatchEventForPluginEventSystem(
  16836. domEventName,
  16837. eventSystemFlags,
  16838. nativeEvent,
  16839. null,
  16840. targetContainer
  16841. );
  16842. }
  16843. }
  16844. function findInstanceBlockingEvent(nativeEvent) {
  16845. nativeEvent = getEventTarget(nativeEvent);
  16846. return findInstanceBlockingTarget(nativeEvent);
  16847. }
  16848. function findInstanceBlockingTarget(targetNode) {
  16849. return_targetInst = null;
  16850. targetNode = getClosestInstanceFromNode(targetNode);
  16851. if (null !== targetNode) {
  16852. var nearestMounted = getNearestMountedFiber(targetNode);
  16853. if (null === nearestMounted) targetNode = null;
  16854. else {
  16855. var tag = nearestMounted.tag;
  16856. if (13 === tag) {
  16857. targetNode = getSuspenseInstanceFromFiber(nearestMounted);
  16858. if (null !== targetNode) return targetNode;
  16859. targetNode = null;
  16860. } else if (31 === tag) {
  16861. targetNode = getActivityInstanceFromFiber(nearestMounted);
  16862. if (null !== targetNode) return targetNode;
  16863. targetNode = null;
  16864. } else if (3 === tag) {
  16865. if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
  16866. return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
  16867. targetNode = null;
  16868. } else nearestMounted !== targetNode && (targetNode = null);
  16869. }
  16870. }
  16871. return_targetInst = targetNode;
  16872. return null;
  16873. }
  16874. function getEventPriority(domEventName) {
  16875. switch (domEventName) {
  16876. case "beforetoggle":
  16877. case "cancel":
  16878. case "click":
  16879. case "close":
  16880. case "contextmenu":
  16881. case "copy":
  16882. case "cut":
  16883. case "auxclick":
  16884. case "dblclick":
  16885. case "dragend":
  16886. case "dragstart":
  16887. case "drop":
  16888. case "focusin":
  16889. case "focusout":
  16890. case "input":
  16891. case "invalid":
  16892. case "keydown":
  16893. case "keypress":
  16894. case "keyup":
  16895. case "mousedown":
  16896. case "mouseup":
  16897. case "paste":
  16898. case "pause":
  16899. case "play":
  16900. case "pointercancel":
  16901. case "pointerdown":
  16902. case "pointerup":
  16903. case "ratechange":
  16904. case "reset":
  16905. case "resize":
  16906. case "seeked":
  16907. case "submit":
  16908. case "toggle":
  16909. case "touchcancel":
  16910. case "touchend":
  16911. case "touchstart":
  16912. case "volumechange":
  16913. case "change":
  16914. case "selectionchange":
  16915. case "textInput":
  16916. case "compositionstart":
  16917. case "compositionend":
  16918. case "compositionupdate":
  16919. case "beforeblur":
  16920. case "afterblur":
  16921. case "beforeinput":
  16922. case "blur":
  16923. case "fullscreenchange":
  16924. case "focus":
  16925. case "hashchange":
  16926. case "popstate":
  16927. case "select":
  16928. case "selectstart":
  16929. return DiscreteEventPriority;
  16930. case "drag":
  16931. case "dragenter":
  16932. case "dragexit":
  16933. case "dragleave":
  16934. case "dragover":
  16935. case "mousemove":
  16936. case "mouseout":
  16937. case "mouseover":
  16938. case "pointermove":
  16939. case "pointerout":
  16940. case "pointerover":
  16941. case "scroll":
  16942. case "touchmove":
  16943. case "wheel":
  16944. case "mouseenter":
  16945. case "mouseleave":
  16946. case "pointerenter":
  16947. case "pointerleave":
  16948. return ContinuousEventPriority;
  16949. case "message":
  16950. switch (getCurrentPriorityLevel()) {
  16951. case ImmediatePriority:
  16952. return DiscreteEventPriority;
  16953. case UserBlockingPriority:
  16954. return ContinuousEventPriority;
  16955. case NormalPriority$1:
  16956. case LowPriority:
  16957. return DefaultEventPriority;
  16958. case IdlePriority:
  16959. return IdleEventPriority;
  16960. default:
  16961. return DefaultEventPriority;
  16962. }
  16963. default:
  16964. return DefaultEventPriority;
  16965. }
  16966. }
  16967. function clearIfContinuousEvent(domEventName, nativeEvent) {
  16968. switch (domEventName) {
  16969. case "focusin":
  16970. case "focusout":
  16971. queuedFocus = null;
  16972. break;
  16973. case "dragenter":
  16974. case "dragleave":
  16975. queuedDrag = null;
  16976. break;
  16977. case "mouseover":
  16978. case "mouseout":
  16979. queuedMouse = null;
  16980. break;
  16981. case "pointerover":
  16982. case "pointerout":
  16983. queuedPointers.delete(nativeEvent.pointerId);
  16984. break;
  16985. case "gotpointercapture":
  16986. case "lostpointercapture":
  16987. queuedPointerCaptures.delete(nativeEvent.pointerId);
  16988. }
  16989. }
  16990. function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  16991. if (null === existingQueuedEvent || existingQueuedEvent.nativeEvent !== nativeEvent)
  16992. return existingQueuedEvent = {
  16993. blockedOn,
  16994. domEventName,
  16995. eventSystemFlags,
  16996. nativeEvent,
  16997. targetContainers: [targetContainer]
  16998. }, null !== blockedOn && (blockedOn = getInstanceFromNode(blockedOn), null !== blockedOn && attemptContinuousHydration(blockedOn)), existingQueuedEvent;
  16999. existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
  17000. blockedOn = existingQueuedEvent.targetContainers;
  17001. null !== targetContainer && -1 === blockedOn.indexOf(targetContainer) && blockedOn.push(targetContainer);
  17002. return existingQueuedEvent;
  17003. }
  17004. function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  17005. switch (domEventName) {
  17006. case "focusin":
  17007. return queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
  17008. queuedFocus,
  17009. blockedOn,
  17010. domEventName,
  17011. eventSystemFlags,
  17012. targetContainer,
  17013. nativeEvent
  17014. ), true;
  17015. case "dragenter":
  17016. return queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
  17017. queuedDrag,
  17018. blockedOn,
  17019. domEventName,
  17020. eventSystemFlags,
  17021. targetContainer,
  17022. nativeEvent
  17023. ), true;
  17024. case "mouseover":
  17025. return queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
  17026. queuedMouse,
  17027. blockedOn,
  17028. domEventName,
  17029. eventSystemFlags,
  17030. targetContainer,
  17031. nativeEvent
  17032. ), true;
  17033. case "pointerover":
  17034. var pointerId = nativeEvent.pointerId;
  17035. queuedPointers.set(
  17036. pointerId,
  17037. accumulateOrCreateContinuousQueuedReplayableEvent(
  17038. queuedPointers.get(pointerId) || null,
  17039. blockedOn,
  17040. domEventName,
  17041. eventSystemFlags,
  17042. targetContainer,
  17043. nativeEvent
  17044. )
  17045. );
  17046. return true;
  17047. case "gotpointercapture":
  17048. return pointerId = nativeEvent.pointerId, queuedPointerCaptures.set(
  17049. pointerId,
  17050. accumulateOrCreateContinuousQueuedReplayableEvent(
  17051. queuedPointerCaptures.get(pointerId) || null,
  17052. blockedOn,
  17053. domEventName,
  17054. eventSystemFlags,
  17055. targetContainer,
  17056. nativeEvent
  17057. )
  17058. ), true;
  17059. }
  17060. return false;
  17061. }
  17062. function attemptExplicitHydrationTarget(queuedTarget) {
  17063. var targetInst = getClosestInstanceFromNode(queuedTarget.target);
  17064. if (null !== targetInst) {
  17065. var nearestMounted = getNearestMountedFiber(targetInst);
  17066. if (null !== nearestMounted) {
  17067. if (targetInst = nearestMounted.tag, 13 === targetInst) {
  17068. if (targetInst = getSuspenseInstanceFromFiber(nearestMounted), null !== targetInst) {
  17069. queuedTarget.blockedOn = targetInst;
  17070. runWithPriority(queuedTarget.priority, function() {
  17071. attemptHydrationAtCurrentPriority(nearestMounted);
  17072. });
  17073. return;
  17074. }
  17075. } else if (31 === targetInst) {
  17076. if (targetInst = getActivityInstanceFromFiber(nearestMounted), null !== targetInst) {
  17077. queuedTarget.blockedOn = targetInst;
  17078. runWithPriority(queuedTarget.priority, function() {
  17079. attemptHydrationAtCurrentPriority(nearestMounted);
  17080. });
  17081. return;
  17082. }
  17083. } else if (3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated) {
  17084. queuedTarget.blockedOn = 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
  17085. return;
  17086. }
  17087. }
  17088. }
  17089. queuedTarget.blockedOn = null;
  17090. }
  17091. function attemptReplayContinuousQueuedEvent(queuedEvent) {
  17092. if (null !== queuedEvent.blockedOn) return false;
  17093. for (var targetContainers = queuedEvent.targetContainers; 0 < targetContainers.length; ) {
  17094. var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
  17095. if (null === nextBlockedOn) {
  17096. nextBlockedOn = queuedEvent.nativeEvent;
  17097. var nativeEventClone = new nextBlockedOn.constructor(
  17098. nextBlockedOn.type,
  17099. nextBlockedOn
  17100. ), event = nativeEventClone;
  17101. null !== currentReplayingEvent && console.error(
  17102. "Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."
  17103. );
  17104. currentReplayingEvent = event;
  17105. nextBlockedOn.target.dispatchEvent(nativeEventClone);
  17106. null === currentReplayingEvent && console.error(
  17107. "Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."
  17108. );
  17109. currentReplayingEvent = null;
  17110. } else
  17111. return targetContainers = getInstanceFromNode(nextBlockedOn), null !== targetContainers && attemptContinuousHydration(targetContainers), queuedEvent.blockedOn = nextBlockedOn, false;
  17112. targetContainers.shift();
  17113. }
  17114. return true;
  17115. }
  17116. function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
  17117. attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
  17118. }
  17119. function replayUnblockedEvents() {
  17120. hasScheduledReplayAttempt = false;
  17121. null !== queuedFocus && attemptReplayContinuousQueuedEvent(queuedFocus) && (queuedFocus = null);
  17122. null !== queuedDrag && attemptReplayContinuousQueuedEvent(queuedDrag) && (queuedDrag = null);
  17123. null !== queuedMouse && attemptReplayContinuousQueuedEvent(queuedMouse) && (queuedMouse = null);
  17124. queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
  17125. queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
  17126. }
  17127. function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
  17128. queuedEvent.blockedOn === unblocked && (queuedEvent.blockedOn = null, hasScheduledReplayAttempt || (hasScheduledReplayAttempt = true, Scheduler.unstable_scheduleCallback(
  17129. Scheduler.unstable_NormalPriority,
  17130. replayUnblockedEvents
  17131. )));
  17132. }
  17133. function scheduleReplayQueueIfNeeded(formReplayingQueue) {
  17134. lastScheduledReplayQueue !== formReplayingQueue && (lastScheduledReplayQueue = formReplayingQueue, Scheduler.unstable_scheduleCallback(
  17135. Scheduler.unstable_NormalPriority,
  17136. function() {
  17137. lastScheduledReplayQueue === formReplayingQueue && (lastScheduledReplayQueue = null);
  17138. for (var i = 0; i < formReplayingQueue.length; i += 3) {
  17139. var form = formReplayingQueue[i], submitterOrAction = formReplayingQueue[i + 1], formData = formReplayingQueue[i + 2];
  17140. if ("function" !== typeof submitterOrAction)
  17141. if (null === findInstanceBlockingTarget(submitterOrAction || form))
  17142. continue;
  17143. else break;
  17144. var formInst = getInstanceFromNode(form);
  17145. null !== formInst && (formReplayingQueue.splice(i, 3), i -= 3, form = {
  17146. pending: true,
  17147. data: formData,
  17148. method: form.method,
  17149. action: submitterOrAction
  17150. }, Object.freeze(form), startHostTransition(
  17151. formInst,
  17152. form,
  17153. submitterOrAction,
  17154. formData
  17155. ));
  17156. }
  17157. }
  17158. ));
  17159. }
  17160. function retryIfBlockedOn(unblocked) {
  17161. function unblock(queuedEvent) {
  17162. return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
  17163. }
  17164. null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
  17165. null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
  17166. null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
  17167. queuedPointers.forEach(unblock);
  17168. queuedPointerCaptures.forEach(unblock);
  17169. for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
  17170. var queuedTarget = queuedExplicitHydrationTargets[i];
  17171. queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
  17172. }
  17173. for (; 0 < queuedExplicitHydrationTargets.length && (i = queuedExplicitHydrationTargets[0], null === i.blockedOn); )
  17174. attemptExplicitHydrationTarget(i), null === i.blockedOn && queuedExplicitHydrationTargets.shift();
  17175. i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
  17176. if (null != i)
  17177. for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
  17178. var form = i[queuedTarget], submitterOrAction = i[queuedTarget + 1], formProps = form[internalPropsKey] || null;
  17179. if ("function" === typeof submitterOrAction)
  17180. formProps || scheduleReplayQueueIfNeeded(i);
  17181. else if (formProps) {
  17182. var action = null;
  17183. if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
  17184. if (form = submitterOrAction, formProps = submitterOrAction[internalPropsKey] || null)
  17185. action = formProps.formAction;
  17186. else {
  17187. if (null !== findInstanceBlockingTarget(form)) continue;
  17188. }
  17189. else action = formProps.action;
  17190. "function" === typeof action ? i[queuedTarget + 1] = action : (i.splice(queuedTarget, 3), queuedTarget -= 3);
  17191. scheduleReplayQueueIfNeeded(i);
  17192. }
  17193. }
  17194. }
  17195. function defaultOnDefaultTransitionIndicator() {
  17196. function handleNavigate(event) {
  17197. event.canIntercept && "react-transition" === event.info && event.intercept({
  17198. handler: function() {
  17199. return new Promise(function(resolve) {
  17200. return pendingResolve = resolve;
  17201. });
  17202. },
  17203. focusReset: "manual",
  17204. scroll: "manual"
  17205. });
  17206. }
  17207. function handleNavigateComplete() {
  17208. null !== pendingResolve && (pendingResolve(), pendingResolve = null);
  17209. isCancelled || setTimeout(startFakeNavigation, 20);
  17210. }
  17211. function startFakeNavigation() {
  17212. if (!isCancelled && !navigation.transition) {
  17213. var currentEntry = navigation.currentEntry;
  17214. currentEntry && null != currentEntry.url && navigation.navigate(currentEntry.url, {
  17215. state: currentEntry.getState(),
  17216. info: "react-transition",
  17217. history: "replace"
  17218. });
  17219. }
  17220. }
  17221. if ("object" === typeof navigation) {
  17222. var isCancelled = false, pendingResolve = null;
  17223. navigation.addEventListener("navigate", handleNavigate);
  17224. navigation.addEventListener("navigatesuccess", handleNavigateComplete);
  17225. navigation.addEventListener("navigateerror", handleNavigateComplete);
  17226. setTimeout(startFakeNavigation, 100);
  17227. return function() {
  17228. isCancelled = true;
  17229. navigation.removeEventListener("navigate", handleNavigate);
  17230. navigation.removeEventListener(
  17231. "navigatesuccess",
  17232. handleNavigateComplete
  17233. );
  17234. navigation.removeEventListener(
  17235. "navigateerror",
  17236. handleNavigateComplete
  17237. );
  17238. null !== pendingResolve && (pendingResolve(), pendingResolve = null);
  17239. };
  17240. }
  17241. }
  17242. function ReactDOMRoot(internalRoot) {
  17243. this._internalRoot = internalRoot;
  17244. }
  17245. function ReactDOMHydrationRoot(internalRoot) {
  17246. this._internalRoot = internalRoot;
  17247. }
  17248. function warnIfReactDOMContainerInDEV(container) {
  17249. container[internalContainerInstanceKey] && (container._reactRootContainer ? console.error(
  17250. "You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."
  17251. ) : console.error(
  17252. "You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."
  17253. ));
  17254. }
  17255. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  17256. var Scheduler = require_scheduler(), React = require_react(), ReactDOM = require_react_dom(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
  17257. Symbol.for("react.scope");
  17258. var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
  17259. Symbol.for("react.legacy_hidden");
  17260. Symbol.for("react.tracing_marker");
  17261. var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
  17262. Symbol.for("react.view_transition");
  17263. var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
  17264. pending: false,
  17265. data: null,
  17266. method: null,
  17267. action: null
  17268. }), valueStack = [];
  17269. var fiberStack = [];
  17270. var index$jscomp$0 = -1, contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
  17271. disabledLog.__reactDisabledLog = true;
  17272. var prefix, suffix, reentry = false;
  17273. var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
  17274. var current = null, isRendering = false, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, requestPaint = Scheduler.unstable_requestPaint, now$1 = Scheduler.unstable_now, getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel, ImmediatePriority = Scheduler.unstable_ImmediatePriority, UserBlockingPriority = Scheduler.unstable_UserBlockingPriority, NormalPriority$1 = Scheduler.unstable_NormalPriority, LowPriority = Scheduler.unstable_LowPriority, IdlePriority = Scheduler.unstable_IdlePriority, log$1 = Scheduler.log, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null, hasLoggedError = false, isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2, nextTransitionUpdateLane = 256, nextTransitionDeferredLane = 262144, nextRetryLane = 4194304, DiscreteEventPriority = 2, ContinuousEventPriority = 8, DefaultEventPriority = 32, IdleEventPriority = 268435456, randomKey = Math.random().toString(36).slice(2), internalInstanceKey = "__reactFiber$" + randomKey, internalPropsKey = "__reactProps$" + randomKey, internalContainerInstanceKey = "__reactContainer$" + randomKey, internalEventHandlersKey = "__reactEvents$" + randomKey, internalEventHandlerListenersKey = "__reactListeners$" + randomKey, internalEventHandlesSetKey = "__reactHandles$" + randomKey, internalRootNodeResourcesKey = "__reactResources$" + randomKey, internalHoistableMarker = "__reactMarker$" + randomKey, allNativeEvents = /* @__PURE__ */ new Set(), registrationNameDependencies = {}, possibleRegistrationNames = {}, hasReadOnlyValue = {
  17275. button: true,
  17276. checkbox: true,
  17277. image: true,
  17278. hidden: true,
  17279. radio: true,
  17280. reset: true,
  17281. submit: true
  17282. }, VALID_ATTRIBUTE_NAME_REGEX = RegExp(
  17283. "^[: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]*$"
  17284. ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = false, didWarnCheckedDefaultChecked = false, didWarnSelectedSetOnOption = false, didWarnInvalidChild = false, didWarnInvalidInnerHTML = false;
  17285. var didWarnValueDefaultValue = false;
  17286. var valuePropNames = ["value", "defaultValue"], didWarnValDefaultVal = false, needsEscaping = /["'&<>\n\t]|^\s|\s$/, specialTags = "address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(
  17287. " "
  17288. ), inScopeTags = "applet caption html table td th marquee object template foreignObject desc title".split(
  17289. " "
  17290. ), buttonScopeTags = inScopeTags.concat(["button"]), impliedEndTags = "dd dt li option optgroup p rp rt".split(" "), emptyAncestorInfoDev = {
  17291. current: null,
  17292. formTag: null,
  17293. aTagInScope: null,
  17294. buttonTagInScope: null,
  17295. nobrTagInScope: null,
  17296. pTagInButtonScope: null,
  17297. listItemTagAutoclosing: null,
  17298. dlItemTagAutoclosing: null,
  17299. containerTagInScope: null,
  17300. implicitRootScope: false
  17301. }, didWarn = {}, shorthandToLonghand = {
  17302. animation: "animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(
  17303. " "
  17304. ),
  17305. background: "backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(
  17306. " "
  17307. ),
  17308. backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
  17309. border: "borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(
  17310. " "
  17311. ),
  17312. borderBlockEnd: [
  17313. "borderBlockEndColor",
  17314. "borderBlockEndStyle",
  17315. "borderBlockEndWidth"
  17316. ],
  17317. borderBlockStart: [
  17318. "borderBlockStartColor",
  17319. "borderBlockStartStyle",
  17320. "borderBlockStartWidth"
  17321. ],
  17322. borderBottom: [
  17323. "borderBottomColor",
  17324. "borderBottomStyle",
  17325. "borderBottomWidth"
  17326. ],
  17327. borderColor: [
  17328. "borderBottomColor",
  17329. "borderLeftColor",
  17330. "borderRightColor",
  17331. "borderTopColor"
  17332. ],
  17333. borderImage: [
  17334. "borderImageOutset",
  17335. "borderImageRepeat",
  17336. "borderImageSlice",
  17337. "borderImageSource",
  17338. "borderImageWidth"
  17339. ],
  17340. borderInlineEnd: [
  17341. "borderInlineEndColor",
  17342. "borderInlineEndStyle",
  17343. "borderInlineEndWidth"
  17344. ],
  17345. borderInlineStart: [
  17346. "borderInlineStartColor",
  17347. "borderInlineStartStyle",
  17348. "borderInlineStartWidth"
  17349. ],
  17350. borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
  17351. borderRadius: [
  17352. "borderBottomLeftRadius",
  17353. "borderBottomRightRadius",
  17354. "borderTopLeftRadius",
  17355. "borderTopRightRadius"
  17356. ],
  17357. borderRight: [
  17358. "borderRightColor",
  17359. "borderRightStyle",
  17360. "borderRightWidth"
  17361. ],
  17362. borderStyle: [
  17363. "borderBottomStyle",
  17364. "borderLeftStyle",
  17365. "borderRightStyle",
  17366. "borderTopStyle"
  17367. ],
  17368. borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
  17369. borderWidth: [
  17370. "borderBottomWidth",
  17371. "borderLeftWidth",
  17372. "borderRightWidth",
  17373. "borderTopWidth"
  17374. ],
  17375. columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
  17376. columns: ["columnCount", "columnWidth"],
  17377. flex: ["flexBasis", "flexGrow", "flexShrink"],
  17378. flexFlow: ["flexDirection", "flexWrap"],
  17379. font: "fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(
  17380. " "
  17381. ),
  17382. fontVariant: "fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(
  17383. " "
  17384. ),
  17385. gap: ["columnGap", "rowGap"],
  17386. grid: "gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(
  17387. " "
  17388. ),
  17389. gridArea: [
  17390. "gridColumnEnd",
  17391. "gridColumnStart",
  17392. "gridRowEnd",
  17393. "gridRowStart"
  17394. ],
  17395. gridColumn: ["gridColumnEnd", "gridColumnStart"],
  17396. gridColumnGap: ["columnGap"],
  17397. gridGap: ["columnGap", "rowGap"],
  17398. gridRow: ["gridRowEnd", "gridRowStart"],
  17399. gridRowGap: ["rowGap"],
  17400. gridTemplate: [
  17401. "gridTemplateAreas",
  17402. "gridTemplateColumns",
  17403. "gridTemplateRows"
  17404. ],
  17405. listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
  17406. margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
  17407. marker: ["markerEnd", "markerMid", "markerStart"],
  17408. mask: "maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(
  17409. " "
  17410. ),
  17411. maskPosition: ["maskPositionX", "maskPositionY"],
  17412. outline: ["outlineColor", "outlineStyle", "outlineWidth"],
  17413. overflow: ["overflowX", "overflowY"],
  17414. padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
  17415. placeContent: ["alignContent", "justifyContent"],
  17416. placeItems: ["alignItems", "justifyItems"],
  17417. placeSelf: ["alignSelf", "justifySelf"],
  17418. textDecoration: [
  17419. "textDecorationColor",
  17420. "textDecorationLine",
  17421. "textDecorationStyle"
  17422. ],
  17423. textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
  17424. transition: [
  17425. "transitionDelay",
  17426. "transitionDuration",
  17427. "transitionProperty",
  17428. "transitionTimingFunction"
  17429. ],
  17430. wordWrap: ["overflowWrap"]
  17431. }, uppercasePattern = /([A-Z])/g, msPattern$1 = /^ms-/, badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/, msPattern = /^-ms-/, hyphenPattern = /-(.)/g, badStyleValueWithSemicolonPattern = /;\s*$/, warnedStyleNames = {}, warnedStyleValues = {}, warnedForNaNValue = false, warnedForInfinityValue = false, unitlessNumbers = new Set(
  17432. "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(
  17433. " "
  17434. )
  17435. ), MATH_NAMESPACE = "http://www.w3.org/1998/Math/MathML", SVG_NAMESPACE = "http://www.w3.org/2000/svg", aliases = /* @__PURE__ */ new Map([
  17436. ["acceptCharset", "accept-charset"],
  17437. ["htmlFor", "for"],
  17438. ["httpEquiv", "http-equiv"],
  17439. ["crossOrigin", "crossorigin"],
  17440. ["accentHeight", "accent-height"],
  17441. ["alignmentBaseline", "alignment-baseline"],
  17442. ["arabicForm", "arabic-form"],
  17443. ["baselineShift", "baseline-shift"],
  17444. ["capHeight", "cap-height"],
  17445. ["clipPath", "clip-path"],
  17446. ["clipRule", "clip-rule"],
  17447. ["colorInterpolation", "color-interpolation"],
  17448. ["colorInterpolationFilters", "color-interpolation-filters"],
  17449. ["colorProfile", "color-profile"],
  17450. ["colorRendering", "color-rendering"],
  17451. ["dominantBaseline", "dominant-baseline"],
  17452. ["enableBackground", "enable-background"],
  17453. ["fillOpacity", "fill-opacity"],
  17454. ["fillRule", "fill-rule"],
  17455. ["floodColor", "flood-color"],
  17456. ["floodOpacity", "flood-opacity"],
  17457. ["fontFamily", "font-family"],
  17458. ["fontSize", "font-size"],
  17459. ["fontSizeAdjust", "font-size-adjust"],
  17460. ["fontStretch", "font-stretch"],
  17461. ["fontStyle", "font-style"],
  17462. ["fontVariant", "font-variant"],
  17463. ["fontWeight", "font-weight"],
  17464. ["glyphName", "glyph-name"],
  17465. ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
  17466. ["glyphOrientationVertical", "glyph-orientation-vertical"],
  17467. ["horizAdvX", "horiz-adv-x"],
  17468. ["horizOriginX", "horiz-origin-x"],
  17469. ["imageRendering", "image-rendering"],
  17470. ["letterSpacing", "letter-spacing"],
  17471. ["lightingColor", "lighting-color"],
  17472. ["markerEnd", "marker-end"],
  17473. ["markerMid", "marker-mid"],
  17474. ["markerStart", "marker-start"],
  17475. ["overlinePosition", "overline-position"],
  17476. ["overlineThickness", "overline-thickness"],
  17477. ["paintOrder", "paint-order"],
  17478. ["panose-1", "panose-1"],
  17479. ["pointerEvents", "pointer-events"],
  17480. ["renderingIntent", "rendering-intent"],
  17481. ["shapeRendering", "shape-rendering"],
  17482. ["stopColor", "stop-color"],
  17483. ["stopOpacity", "stop-opacity"],
  17484. ["strikethroughPosition", "strikethrough-position"],
  17485. ["strikethroughThickness", "strikethrough-thickness"],
  17486. ["strokeDasharray", "stroke-dasharray"],
  17487. ["strokeDashoffset", "stroke-dashoffset"],
  17488. ["strokeLinecap", "stroke-linecap"],
  17489. ["strokeLinejoin", "stroke-linejoin"],
  17490. ["strokeMiterlimit", "stroke-miterlimit"],
  17491. ["strokeOpacity", "stroke-opacity"],
  17492. ["strokeWidth", "stroke-width"],
  17493. ["textAnchor", "text-anchor"],
  17494. ["textDecoration", "text-decoration"],
  17495. ["textRendering", "text-rendering"],
  17496. ["transformOrigin", "transform-origin"],
  17497. ["underlinePosition", "underline-position"],
  17498. ["underlineThickness", "underline-thickness"],
  17499. ["unicodeBidi", "unicode-bidi"],
  17500. ["unicodeRange", "unicode-range"],
  17501. ["unitsPerEm", "units-per-em"],
  17502. ["vAlphabetic", "v-alphabetic"],
  17503. ["vHanging", "v-hanging"],
  17504. ["vIdeographic", "v-ideographic"],
  17505. ["vMathematical", "v-mathematical"],
  17506. ["vectorEffect", "vector-effect"],
  17507. ["vertAdvY", "vert-adv-y"],
  17508. ["vertOriginX", "vert-origin-x"],
  17509. ["vertOriginY", "vert-origin-y"],
  17510. ["wordSpacing", "word-spacing"],
  17511. ["writingMode", "writing-mode"],
  17512. ["xmlnsXlink", "xmlns:xlink"],
  17513. ["xHeight", "x-height"]
  17514. ]), possibleStandardNames = {
  17515. accept: "accept",
  17516. acceptcharset: "acceptCharset",
  17517. "accept-charset": "acceptCharset",
  17518. accesskey: "accessKey",
  17519. action: "action",
  17520. allowfullscreen: "allowFullScreen",
  17521. alt: "alt",
  17522. as: "as",
  17523. async: "async",
  17524. autocapitalize: "autoCapitalize",
  17525. autocomplete: "autoComplete",
  17526. autocorrect: "autoCorrect",
  17527. autofocus: "autoFocus",
  17528. autoplay: "autoPlay",
  17529. autosave: "autoSave",
  17530. capture: "capture",
  17531. cellpadding: "cellPadding",
  17532. cellspacing: "cellSpacing",
  17533. challenge: "challenge",
  17534. charset: "charSet",
  17535. checked: "checked",
  17536. children: "children",
  17537. cite: "cite",
  17538. class: "className",
  17539. classid: "classID",
  17540. classname: "className",
  17541. cols: "cols",
  17542. colspan: "colSpan",
  17543. content: "content",
  17544. contenteditable: "contentEditable",
  17545. contextmenu: "contextMenu",
  17546. controls: "controls",
  17547. controlslist: "controlsList",
  17548. coords: "coords",
  17549. crossorigin: "crossOrigin",
  17550. dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
  17551. data: "data",
  17552. datetime: "dateTime",
  17553. default: "default",
  17554. defaultchecked: "defaultChecked",
  17555. defaultvalue: "defaultValue",
  17556. defer: "defer",
  17557. dir: "dir",
  17558. disabled: "disabled",
  17559. disablepictureinpicture: "disablePictureInPicture",
  17560. disableremoteplayback: "disableRemotePlayback",
  17561. download: "download",
  17562. draggable: "draggable",
  17563. enctype: "encType",
  17564. enterkeyhint: "enterKeyHint",
  17565. fetchpriority: "fetchPriority",
  17566. for: "htmlFor",
  17567. form: "form",
  17568. formmethod: "formMethod",
  17569. formaction: "formAction",
  17570. formenctype: "formEncType",
  17571. formnovalidate: "formNoValidate",
  17572. formtarget: "formTarget",
  17573. frameborder: "frameBorder",
  17574. headers: "headers",
  17575. height: "height",
  17576. hidden: "hidden",
  17577. high: "high",
  17578. href: "href",
  17579. hreflang: "hrefLang",
  17580. htmlfor: "htmlFor",
  17581. httpequiv: "httpEquiv",
  17582. "http-equiv": "httpEquiv",
  17583. icon: "icon",
  17584. id: "id",
  17585. imagesizes: "imageSizes",
  17586. imagesrcset: "imageSrcSet",
  17587. inert: "inert",
  17588. innerhtml: "innerHTML",
  17589. inputmode: "inputMode",
  17590. integrity: "integrity",
  17591. is: "is",
  17592. itemid: "itemID",
  17593. itemprop: "itemProp",
  17594. itemref: "itemRef",
  17595. itemscope: "itemScope",
  17596. itemtype: "itemType",
  17597. keyparams: "keyParams",
  17598. keytype: "keyType",
  17599. kind: "kind",
  17600. label: "label",
  17601. lang: "lang",
  17602. list: "list",
  17603. loop: "loop",
  17604. low: "low",
  17605. manifest: "manifest",
  17606. marginwidth: "marginWidth",
  17607. marginheight: "marginHeight",
  17608. max: "max",
  17609. maxlength: "maxLength",
  17610. media: "media",
  17611. mediagroup: "mediaGroup",
  17612. method: "method",
  17613. min: "min",
  17614. minlength: "minLength",
  17615. multiple: "multiple",
  17616. muted: "muted",
  17617. name: "name",
  17618. nomodule: "noModule",
  17619. nonce: "nonce",
  17620. novalidate: "noValidate",
  17621. open: "open",
  17622. optimum: "optimum",
  17623. pattern: "pattern",
  17624. placeholder: "placeholder",
  17625. playsinline: "playsInline",
  17626. poster: "poster",
  17627. preload: "preload",
  17628. profile: "profile",
  17629. radiogroup: "radioGroup",
  17630. readonly: "readOnly",
  17631. referrerpolicy: "referrerPolicy",
  17632. rel: "rel",
  17633. required: "required",
  17634. reversed: "reversed",
  17635. role: "role",
  17636. rows: "rows",
  17637. rowspan: "rowSpan",
  17638. sandbox: "sandbox",
  17639. scope: "scope",
  17640. scoped: "scoped",
  17641. scrolling: "scrolling",
  17642. seamless: "seamless",
  17643. selected: "selected",
  17644. shape: "shape",
  17645. size: "size",
  17646. sizes: "sizes",
  17647. span: "span",
  17648. spellcheck: "spellCheck",
  17649. src: "src",
  17650. srcdoc: "srcDoc",
  17651. srclang: "srcLang",
  17652. srcset: "srcSet",
  17653. start: "start",
  17654. step: "step",
  17655. style: "style",
  17656. summary: "summary",
  17657. tabindex: "tabIndex",
  17658. target: "target",
  17659. title: "title",
  17660. type: "type",
  17661. usemap: "useMap",
  17662. value: "value",
  17663. width: "width",
  17664. wmode: "wmode",
  17665. wrap: "wrap",
  17666. about: "about",
  17667. accentheight: "accentHeight",
  17668. "accent-height": "accentHeight",
  17669. accumulate: "accumulate",
  17670. additive: "additive",
  17671. alignmentbaseline: "alignmentBaseline",
  17672. "alignment-baseline": "alignmentBaseline",
  17673. allowreorder: "allowReorder",
  17674. alphabetic: "alphabetic",
  17675. amplitude: "amplitude",
  17676. arabicform: "arabicForm",
  17677. "arabic-form": "arabicForm",
  17678. ascent: "ascent",
  17679. attributename: "attributeName",
  17680. attributetype: "attributeType",
  17681. autoreverse: "autoReverse",
  17682. azimuth: "azimuth",
  17683. basefrequency: "baseFrequency",
  17684. baselineshift: "baselineShift",
  17685. "baseline-shift": "baselineShift",
  17686. baseprofile: "baseProfile",
  17687. bbox: "bbox",
  17688. begin: "begin",
  17689. bias: "bias",
  17690. by: "by",
  17691. calcmode: "calcMode",
  17692. capheight: "capHeight",
  17693. "cap-height": "capHeight",
  17694. clip: "clip",
  17695. clippath: "clipPath",
  17696. "clip-path": "clipPath",
  17697. clippathunits: "clipPathUnits",
  17698. cliprule: "clipRule",
  17699. "clip-rule": "clipRule",
  17700. color: "color",
  17701. colorinterpolation: "colorInterpolation",
  17702. "color-interpolation": "colorInterpolation",
  17703. colorinterpolationfilters: "colorInterpolationFilters",
  17704. "color-interpolation-filters": "colorInterpolationFilters",
  17705. colorprofile: "colorProfile",
  17706. "color-profile": "colorProfile",
  17707. colorrendering: "colorRendering",
  17708. "color-rendering": "colorRendering",
  17709. contentscripttype: "contentScriptType",
  17710. contentstyletype: "contentStyleType",
  17711. cursor: "cursor",
  17712. cx: "cx",
  17713. cy: "cy",
  17714. d: "d",
  17715. datatype: "datatype",
  17716. decelerate: "decelerate",
  17717. descent: "descent",
  17718. diffuseconstant: "diffuseConstant",
  17719. direction: "direction",
  17720. display: "display",
  17721. divisor: "divisor",
  17722. dominantbaseline: "dominantBaseline",
  17723. "dominant-baseline": "dominantBaseline",
  17724. dur: "dur",
  17725. dx: "dx",
  17726. dy: "dy",
  17727. edgemode: "edgeMode",
  17728. elevation: "elevation",
  17729. enablebackground: "enableBackground",
  17730. "enable-background": "enableBackground",
  17731. end: "end",
  17732. exponent: "exponent",
  17733. externalresourcesrequired: "externalResourcesRequired",
  17734. fill: "fill",
  17735. fillopacity: "fillOpacity",
  17736. "fill-opacity": "fillOpacity",
  17737. fillrule: "fillRule",
  17738. "fill-rule": "fillRule",
  17739. filter: "filter",
  17740. filterres: "filterRes",
  17741. filterunits: "filterUnits",
  17742. floodopacity: "floodOpacity",
  17743. "flood-opacity": "floodOpacity",
  17744. floodcolor: "floodColor",
  17745. "flood-color": "floodColor",
  17746. focusable: "focusable",
  17747. fontfamily: "fontFamily",
  17748. "font-family": "fontFamily",
  17749. fontsize: "fontSize",
  17750. "font-size": "fontSize",
  17751. fontsizeadjust: "fontSizeAdjust",
  17752. "font-size-adjust": "fontSizeAdjust",
  17753. fontstretch: "fontStretch",
  17754. "font-stretch": "fontStretch",
  17755. fontstyle: "fontStyle",
  17756. "font-style": "fontStyle",
  17757. fontvariant: "fontVariant",
  17758. "font-variant": "fontVariant",
  17759. fontweight: "fontWeight",
  17760. "font-weight": "fontWeight",
  17761. format: "format",
  17762. from: "from",
  17763. fx: "fx",
  17764. fy: "fy",
  17765. g1: "g1",
  17766. g2: "g2",
  17767. glyphname: "glyphName",
  17768. "glyph-name": "glyphName",
  17769. glyphorientationhorizontal: "glyphOrientationHorizontal",
  17770. "glyph-orientation-horizontal": "glyphOrientationHorizontal",
  17771. glyphorientationvertical: "glyphOrientationVertical",
  17772. "glyph-orientation-vertical": "glyphOrientationVertical",
  17773. glyphref: "glyphRef",
  17774. gradienttransform: "gradientTransform",
  17775. gradientunits: "gradientUnits",
  17776. hanging: "hanging",
  17777. horizadvx: "horizAdvX",
  17778. "horiz-adv-x": "horizAdvX",
  17779. horizoriginx: "horizOriginX",
  17780. "horiz-origin-x": "horizOriginX",
  17781. ideographic: "ideographic",
  17782. imagerendering: "imageRendering",
  17783. "image-rendering": "imageRendering",
  17784. in2: "in2",
  17785. in: "in",
  17786. inlist: "inlist",
  17787. intercept: "intercept",
  17788. k1: "k1",
  17789. k2: "k2",
  17790. k3: "k3",
  17791. k4: "k4",
  17792. k: "k",
  17793. kernelmatrix: "kernelMatrix",
  17794. kernelunitlength: "kernelUnitLength",
  17795. kerning: "kerning",
  17796. keypoints: "keyPoints",
  17797. keysplines: "keySplines",
  17798. keytimes: "keyTimes",
  17799. lengthadjust: "lengthAdjust",
  17800. letterspacing: "letterSpacing",
  17801. "letter-spacing": "letterSpacing",
  17802. lightingcolor: "lightingColor",
  17803. "lighting-color": "lightingColor",
  17804. limitingconeangle: "limitingConeAngle",
  17805. local: "local",
  17806. markerend: "markerEnd",
  17807. "marker-end": "markerEnd",
  17808. markerheight: "markerHeight",
  17809. markermid: "markerMid",
  17810. "marker-mid": "markerMid",
  17811. markerstart: "markerStart",
  17812. "marker-start": "markerStart",
  17813. markerunits: "markerUnits",
  17814. markerwidth: "markerWidth",
  17815. mask: "mask",
  17816. maskcontentunits: "maskContentUnits",
  17817. maskunits: "maskUnits",
  17818. mathematical: "mathematical",
  17819. mode: "mode",
  17820. numoctaves: "numOctaves",
  17821. offset: "offset",
  17822. opacity: "opacity",
  17823. operator: "operator",
  17824. order: "order",
  17825. orient: "orient",
  17826. orientation: "orientation",
  17827. origin: "origin",
  17828. overflow: "overflow",
  17829. overlineposition: "overlinePosition",
  17830. "overline-position": "overlinePosition",
  17831. overlinethickness: "overlineThickness",
  17832. "overline-thickness": "overlineThickness",
  17833. paintorder: "paintOrder",
  17834. "paint-order": "paintOrder",
  17835. panose1: "panose1",
  17836. "panose-1": "panose1",
  17837. pathlength: "pathLength",
  17838. patterncontentunits: "patternContentUnits",
  17839. patterntransform: "patternTransform",
  17840. patternunits: "patternUnits",
  17841. pointerevents: "pointerEvents",
  17842. "pointer-events": "pointerEvents",
  17843. points: "points",
  17844. pointsatx: "pointsAtX",
  17845. pointsaty: "pointsAtY",
  17846. pointsatz: "pointsAtZ",
  17847. popover: "popover",
  17848. popovertarget: "popoverTarget",
  17849. popovertargetaction: "popoverTargetAction",
  17850. prefix: "prefix",
  17851. preservealpha: "preserveAlpha",
  17852. preserveaspectratio: "preserveAspectRatio",
  17853. primitiveunits: "primitiveUnits",
  17854. property: "property",
  17855. r: "r",
  17856. radius: "radius",
  17857. refx: "refX",
  17858. refy: "refY",
  17859. renderingintent: "renderingIntent",
  17860. "rendering-intent": "renderingIntent",
  17861. repeatcount: "repeatCount",
  17862. repeatdur: "repeatDur",
  17863. requiredextensions: "requiredExtensions",
  17864. requiredfeatures: "requiredFeatures",
  17865. resource: "resource",
  17866. restart: "restart",
  17867. result: "result",
  17868. results: "results",
  17869. rotate: "rotate",
  17870. rx: "rx",
  17871. ry: "ry",
  17872. scale: "scale",
  17873. security: "security",
  17874. seed: "seed",
  17875. shaperendering: "shapeRendering",
  17876. "shape-rendering": "shapeRendering",
  17877. slope: "slope",
  17878. spacing: "spacing",
  17879. specularconstant: "specularConstant",
  17880. specularexponent: "specularExponent",
  17881. speed: "speed",
  17882. spreadmethod: "spreadMethod",
  17883. startoffset: "startOffset",
  17884. stddeviation: "stdDeviation",
  17885. stemh: "stemh",
  17886. stemv: "stemv",
  17887. stitchtiles: "stitchTiles",
  17888. stopcolor: "stopColor",
  17889. "stop-color": "stopColor",
  17890. stopopacity: "stopOpacity",
  17891. "stop-opacity": "stopOpacity",
  17892. strikethroughposition: "strikethroughPosition",
  17893. "strikethrough-position": "strikethroughPosition",
  17894. strikethroughthickness: "strikethroughThickness",
  17895. "strikethrough-thickness": "strikethroughThickness",
  17896. string: "string",
  17897. stroke: "stroke",
  17898. strokedasharray: "strokeDasharray",
  17899. "stroke-dasharray": "strokeDasharray",
  17900. strokedashoffset: "strokeDashoffset",
  17901. "stroke-dashoffset": "strokeDashoffset",
  17902. strokelinecap: "strokeLinecap",
  17903. "stroke-linecap": "strokeLinecap",
  17904. strokelinejoin: "strokeLinejoin",
  17905. "stroke-linejoin": "strokeLinejoin",
  17906. strokemiterlimit: "strokeMiterlimit",
  17907. "stroke-miterlimit": "strokeMiterlimit",
  17908. strokewidth: "strokeWidth",
  17909. "stroke-width": "strokeWidth",
  17910. strokeopacity: "strokeOpacity",
  17911. "stroke-opacity": "strokeOpacity",
  17912. suppresscontenteditablewarning: "suppressContentEditableWarning",
  17913. suppresshydrationwarning: "suppressHydrationWarning",
  17914. surfacescale: "surfaceScale",
  17915. systemlanguage: "systemLanguage",
  17916. tablevalues: "tableValues",
  17917. targetx: "targetX",
  17918. targety: "targetY",
  17919. textanchor: "textAnchor",
  17920. "text-anchor": "textAnchor",
  17921. textdecoration: "textDecoration",
  17922. "text-decoration": "textDecoration",
  17923. textlength: "textLength",
  17924. textrendering: "textRendering",
  17925. "text-rendering": "textRendering",
  17926. to: "to",
  17927. transform: "transform",
  17928. transformorigin: "transformOrigin",
  17929. "transform-origin": "transformOrigin",
  17930. typeof: "typeof",
  17931. u1: "u1",
  17932. u2: "u2",
  17933. underlineposition: "underlinePosition",
  17934. "underline-position": "underlinePosition",
  17935. underlinethickness: "underlineThickness",
  17936. "underline-thickness": "underlineThickness",
  17937. unicode: "unicode",
  17938. unicodebidi: "unicodeBidi",
  17939. "unicode-bidi": "unicodeBidi",
  17940. unicoderange: "unicodeRange",
  17941. "unicode-range": "unicodeRange",
  17942. unitsperem: "unitsPerEm",
  17943. "units-per-em": "unitsPerEm",
  17944. unselectable: "unselectable",
  17945. valphabetic: "vAlphabetic",
  17946. "v-alphabetic": "vAlphabetic",
  17947. values: "values",
  17948. vectoreffect: "vectorEffect",
  17949. "vector-effect": "vectorEffect",
  17950. version: "version",
  17951. vertadvy: "vertAdvY",
  17952. "vert-adv-y": "vertAdvY",
  17953. vertoriginx: "vertOriginX",
  17954. "vert-origin-x": "vertOriginX",
  17955. vertoriginy: "vertOriginY",
  17956. "vert-origin-y": "vertOriginY",
  17957. vhanging: "vHanging",
  17958. "v-hanging": "vHanging",
  17959. videographic: "vIdeographic",
  17960. "v-ideographic": "vIdeographic",
  17961. viewbox: "viewBox",
  17962. viewtarget: "viewTarget",
  17963. visibility: "visibility",
  17964. vmathematical: "vMathematical",
  17965. "v-mathematical": "vMathematical",
  17966. vocab: "vocab",
  17967. widths: "widths",
  17968. wordspacing: "wordSpacing",
  17969. "word-spacing": "wordSpacing",
  17970. writingmode: "writingMode",
  17971. "writing-mode": "writingMode",
  17972. x1: "x1",
  17973. x2: "x2",
  17974. x: "x",
  17975. xchannelselector: "xChannelSelector",
  17976. xheight: "xHeight",
  17977. "x-height": "xHeight",
  17978. xlinkactuate: "xlinkActuate",
  17979. "xlink:actuate": "xlinkActuate",
  17980. xlinkarcrole: "xlinkArcrole",
  17981. "xlink:arcrole": "xlinkArcrole",
  17982. xlinkhref: "xlinkHref",
  17983. "xlink:href": "xlinkHref",
  17984. xlinkrole: "xlinkRole",
  17985. "xlink:role": "xlinkRole",
  17986. xlinkshow: "xlinkShow",
  17987. "xlink:show": "xlinkShow",
  17988. xlinktitle: "xlinkTitle",
  17989. "xlink:title": "xlinkTitle",
  17990. xlinktype: "xlinkType",
  17991. "xlink:type": "xlinkType",
  17992. xmlbase: "xmlBase",
  17993. "xml:base": "xmlBase",
  17994. xmllang: "xmlLang",
  17995. "xml:lang": "xmlLang",
  17996. xmlns: "xmlns",
  17997. "xml:space": "xmlSpace",
  17998. xmlnsxlink: "xmlnsXlink",
  17999. "xmlns:xlink": "xmlnsXlink",
  18000. xmlspace: "xmlSpace",
  18001. y1: "y1",
  18002. y2: "y2",
  18003. y: "y",
  18004. ychannelselector: "yChannelSelector",
  18005. z: "z",
  18006. zoomandpan: "zoomAndPan"
  18007. }, ariaProperties = {
  18008. "aria-current": 0,
  18009. "aria-description": 0,
  18010. "aria-details": 0,
  18011. "aria-disabled": 0,
  18012. "aria-hidden": 0,
  18013. "aria-invalid": 0,
  18014. "aria-keyshortcuts": 0,
  18015. "aria-label": 0,
  18016. "aria-roledescription": 0,
  18017. "aria-autocomplete": 0,
  18018. "aria-checked": 0,
  18019. "aria-expanded": 0,
  18020. "aria-haspopup": 0,
  18021. "aria-level": 0,
  18022. "aria-modal": 0,
  18023. "aria-multiline": 0,
  18024. "aria-multiselectable": 0,
  18025. "aria-orientation": 0,
  18026. "aria-placeholder": 0,
  18027. "aria-pressed": 0,
  18028. "aria-readonly": 0,
  18029. "aria-required": 0,
  18030. "aria-selected": 0,
  18031. "aria-sort": 0,
  18032. "aria-valuemax": 0,
  18033. "aria-valuemin": 0,
  18034. "aria-valuenow": 0,
  18035. "aria-valuetext": 0,
  18036. "aria-atomic": 0,
  18037. "aria-busy": 0,
  18038. "aria-live": 0,
  18039. "aria-relevant": 0,
  18040. "aria-dropeffect": 0,
  18041. "aria-grabbed": 0,
  18042. "aria-activedescendant": 0,
  18043. "aria-colcount": 0,
  18044. "aria-colindex": 0,
  18045. "aria-colspan": 0,
  18046. "aria-controls": 0,
  18047. "aria-describedby": 0,
  18048. "aria-errormessage": 0,
  18049. "aria-flowto": 0,
  18050. "aria-labelledby": 0,
  18051. "aria-owns": 0,
  18052. "aria-posinset": 0,
  18053. "aria-rowcount": 0,
  18054. "aria-rowindex": 0,
  18055. "aria-rowspan": 0,
  18056. "aria-setsize": 0,
  18057. "aria-braillelabel": 0,
  18058. "aria-brailleroledescription": 0,
  18059. "aria-colindextext": 0,
  18060. "aria-rowindextext": 0
  18061. }, warnedProperties$1 = {}, rARIA$1 = RegExp(
  18062. "^(aria)-[: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]*$"
  18063. ), rARIACamel$1 = RegExp(
  18064. "^(aria)[A-Z][: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]*$"
  18065. ), didWarnValueNull = false, warnedProperties = {}, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA = RegExp(
  18066. "^(aria)-[: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]*$"
  18067. ), rARIACamel = RegExp(
  18068. "^(aria)[A-Z][: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]*$"
  18069. ), isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i, currentReplayingEvent = null, restoreTarget = null, restoreQueue = null, isInsideEventHandler = false, canUseDOM = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), passiveBrowserEventsSupported = false;
  18070. if (canUseDOM)
  18071. try {
  18072. var options$jscomp$0 = {};
  18073. Object.defineProperty(options$jscomp$0, "passive", {
  18074. get: function() {
  18075. passiveBrowserEventsSupported = true;
  18076. }
  18077. });
  18078. window.addEventListener("test", options$jscomp$0, options$jscomp$0);
  18079. window.removeEventListener("test", options$jscomp$0, options$jscomp$0);
  18080. } catch (e) {
  18081. passiveBrowserEventsSupported = false;
  18082. }
  18083. var root = null, startText = null, fallbackText = null, EventInterface = {
  18084. eventPhase: 0,
  18085. bubbles: 0,
  18086. cancelable: 0,
  18087. timeStamp: function(event) {
  18088. return event.timeStamp || Date.now();
  18089. },
  18090. defaultPrevented: 0,
  18091. isTrusted: 0
  18092. }, SyntheticEvent = createSyntheticEvent(EventInterface), UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }), SyntheticUIEvent = createSyntheticEvent(UIEventInterface), lastMovementX, lastMovementY, lastMouseEvent, MouseEventInterface = assign({}, UIEventInterface, {
  18093. screenX: 0,
  18094. screenY: 0,
  18095. clientX: 0,
  18096. clientY: 0,
  18097. pageX: 0,
  18098. pageY: 0,
  18099. ctrlKey: 0,
  18100. shiftKey: 0,
  18101. altKey: 0,
  18102. metaKey: 0,
  18103. getModifierState: getEventModifierState,
  18104. button: 0,
  18105. buttons: 0,
  18106. relatedTarget: function(event) {
  18107. return void 0 === event.relatedTarget ? event.fromElement === event.srcElement ? event.toElement : event.fromElement : event.relatedTarget;
  18108. },
  18109. movementX: function(event) {
  18110. if ("movementX" in event) return event.movementX;
  18111. event !== lastMouseEvent && (lastMouseEvent && "mousemove" === event.type ? (lastMovementX = event.screenX - lastMouseEvent.screenX, lastMovementY = event.screenY - lastMouseEvent.screenY) : lastMovementY = lastMovementX = 0, lastMouseEvent = event);
  18112. return lastMovementX;
  18113. },
  18114. movementY: function(event) {
  18115. return "movementY" in event ? event.movementY : lastMovementY;
  18116. }
  18117. }), SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface), DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }), SyntheticDragEvent = createSyntheticEvent(DragEventInterface), FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }), SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface), AnimationEventInterface = assign({}, EventInterface, {
  18118. animationName: 0,
  18119. elapsedTime: 0,
  18120. pseudoElement: 0
  18121. }), SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface), ClipboardEventInterface = assign({}, EventInterface, {
  18122. clipboardData: function(event) {
  18123. return "clipboardData" in event ? event.clipboardData : window.clipboardData;
  18124. }
  18125. }), SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface), CompositionEventInterface = assign({}, EventInterface, { data: 0 }), SyntheticCompositionEvent = createSyntheticEvent(
  18126. CompositionEventInterface
  18127. ), SyntheticInputEvent = SyntheticCompositionEvent, normalizeKey = {
  18128. Esc: "Escape",
  18129. Spacebar: " ",
  18130. Left: "ArrowLeft",
  18131. Up: "ArrowUp",
  18132. Right: "ArrowRight",
  18133. Down: "ArrowDown",
  18134. Del: "Delete",
  18135. Win: "OS",
  18136. Menu: "ContextMenu",
  18137. Apps: "ContextMenu",
  18138. Scroll: "ScrollLock",
  18139. MozPrintableKey: "Unidentified"
  18140. }, translateToKey = {
  18141. 8: "Backspace",
  18142. 9: "Tab",
  18143. 12: "Clear",
  18144. 13: "Enter",
  18145. 16: "Shift",
  18146. 17: "Control",
  18147. 18: "Alt",
  18148. 19: "Pause",
  18149. 20: "CapsLock",
  18150. 27: "Escape",
  18151. 32: " ",
  18152. 33: "PageUp",
  18153. 34: "PageDown",
  18154. 35: "End",
  18155. 36: "Home",
  18156. 37: "ArrowLeft",
  18157. 38: "ArrowUp",
  18158. 39: "ArrowRight",
  18159. 40: "ArrowDown",
  18160. 45: "Insert",
  18161. 46: "Delete",
  18162. 112: "F1",
  18163. 113: "F2",
  18164. 114: "F3",
  18165. 115: "F4",
  18166. 116: "F5",
  18167. 117: "F6",
  18168. 118: "F7",
  18169. 119: "F8",
  18170. 120: "F9",
  18171. 121: "F10",
  18172. 122: "F11",
  18173. 123: "F12",
  18174. 144: "NumLock",
  18175. 145: "ScrollLock",
  18176. 224: "Meta"
  18177. }, modifierKeyToProp = {
  18178. Alt: "altKey",
  18179. Control: "ctrlKey",
  18180. Meta: "metaKey",
  18181. Shift: "shiftKey"
  18182. }, KeyboardEventInterface = assign({}, UIEventInterface, {
  18183. key: function(nativeEvent) {
  18184. if (nativeEvent.key) {
  18185. var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
  18186. if ("Unidentified" !== key) return key;
  18187. }
  18188. return "keypress" === nativeEvent.type ? (nativeEvent = getEventCharCode(nativeEvent), 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent)) : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : "";
  18189. },
  18190. code: 0,
  18191. location: 0,
  18192. ctrlKey: 0,
  18193. shiftKey: 0,
  18194. altKey: 0,
  18195. metaKey: 0,
  18196. repeat: 0,
  18197. locale: 0,
  18198. getModifierState: getEventModifierState,
  18199. charCode: function(event) {
  18200. return "keypress" === event.type ? getEventCharCode(event) : 0;
  18201. },
  18202. keyCode: function(event) {
  18203. return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
  18204. },
  18205. which: function(event) {
  18206. return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
  18207. }
  18208. }), SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface), PointerEventInterface = assign({}, MouseEventInterface, {
  18209. pointerId: 0,
  18210. width: 0,
  18211. height: 0,
  18212. pressure: 0,
  18213. tangentialPressure: 0,
  18214. tiltX: 0,
  18215. tiltY: 0,
  18216. twist: 0,
  18217. pointerType: 0,
  18218. isPrimary: 0
  18219. }), SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface), TouchEventInterface = assign({}, UIEventInterface, {
  18220. touches: 0,
  18221. targetTouches: 0,
  18222. changedTouches: 0,
  18223. altKey: 0,
  18224. metaKey: 0,
  18225. ctrlKey: 0,
  18226. shiftKey: 0,
  18227. getModifierState: getEventModifierState
  18228. }), SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface), TransitionEventInterface = assign({}, EventInterface, {
  18229. propertyName: 0,
  18230. elapsedTime: 0,
  18231. pseudoElement: 0
  18232. }), SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface), WheelEventInterface = assign({}, MouseEventInterface, {
  18233. deltaX: function(event) {
  18234. return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
  18235. },
  18236. deltaY: function(event) {
  18237. return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
  18238. },
  18239. deltaZ: 0,
  18240. deltaMode: 0
  18241. }), SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface), ToggleEventInterface = assign({}, EventInterface, {
  18242. newState: 0,
  18243. oldState: 0
  18244. }), SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface), END_KEYCODES = [9, 13, 27, 32], START_KEYCODE = 229, canUseCompositionEvent = canUseDOM && "CompositionEvent" in window, documentMode = null;
  18245. canUseDOM && "documentMode" in document && (documentMode = document.documentMode);
  18246. var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode, useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && 8 < documentMode && 11 >= documentMode), SPACEBAR_CODE = 32, SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE), hasSpaceKeypress = false, isComposing = false, supportedInputTypes = {
  18247. color: true,
  18248. date: true,
  18249. datetime: true,
  18250. "datetime-local": true,
  18251. email: true,
  18252. month: true,
  18253. number: true,
  18254. password: true,
  18255. range: true,
  18256. search: true,
  18257. tel: true,
  18258. text: true,
  18259. time: true,
  18260. url: true,
  18261. week: true
  18262. }, activeElement$1 = null, activeElementInst$1 = null, isInputEventSupported = false;
  18263. canUseDOM && (isInputEventSupported = isEventSupported("input") && (!document.documentMode || 9 < document.documentMode));
  18264. var objectIs = "function" === typeof Object.is ? Object.is : is, skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = false, vendorPrefixes = {
  18265. animationend: makePrefixMap("Animation", "AnimationEnd"),
  18266. animationiteration: makePrefixMap("Animation", "AnimationIteration"),
  18267. animationstart: makePrefixMap("Animation", "AnimationStart"),
  18268. transitionrun: makePrefixMap("Transition", "TransitionRun"),
  18269. transitionstart: makePrefixMap("Transition", "TransitionStart"),
  18270. transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
  18271. transitionend: makePrefixMap("Transition", "TransitionEnd")
  18272. }, prefixedEventNames = {}, style = {};
  18273. canUseDOM && (style = document.createElement("div").style, "AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation, delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition);
  18274. var ANIMATION_END = getVendorPrefixedEventName("animationend"), ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"), ANIMATION_START = getVendorPrefixedEventName("animationstart"), TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"), TRANSITION_START = getVendorPrefixedEventName("transitionstart"), TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"), TRANSITION_END = getVendorPrefixedEventName("transitionend"), topLevelEventsToReactNames = /* @__PURE__ */ new Map(), simpleEventPluginEvents = "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(
  18275. " "
  18276. );
  18277. simpleEventPluginEvents.push("scrollEnd");
  18278. var lastResetTime = 0;
  18279. if ("object" === typeof performance && "function" === typeof performance.now) {
  18280. var localPerformance = performance;
  18281. var getCurrentTime = function() {
  18282. return localPerformance.now();
  18283. };
  18284. } else {
  18285. var localDate = Date;
  18286. getCurrentTime = function() {
  18287. return localDate.now();
  18288. };
  18289. }
  18290. var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
  18291. if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
  18292. var event = new window.ErrorEvent("error", {
  18293. bubbles: true,
  18294. cancelable: true,
  18295. message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
  18296. error
  18297. });
  18298. if (!window.dispatchEvent(event)) return;
  18299. } else if ("object" === typeof process && "function" === typeof process.emit) {
  18300. process.emit("uncaughtException", error);
  18301. return;
  18302. }
  18303. console.error(error);
  18304. }, OMITTED_PROP_ERROR = "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.", EMPTY_ARRAY = 0, COMPLEX_ARRAY = 1, PRIMITIVE_ARRAY = 2, ENTRIES_ARRAY = 3, REMOVED = "– ", ADDED = "+ ", UNCHANGED = "  ", supportsUserTiming = "undefined" !== typeof console && "function" === typeof console.timeStamp && "undefined" !== typeof performance && "function" === typeof performance.measure, COMPONENTS_TRACK = "Components ⚛", LANES_TRACK_GROUP = "Scheduler ⚛", currentTrack = "Blocking", alreadyWarnedForDeepEquality = false, reusableComponentDevToolDetails = {
  18305. color: "primary",
  18306. properties: null,
  18307. tooltipText: "",
  18308. track: COMPONENTS_TRACK
  18309. }, reusableComponentOptions = {
  18310. start: -0,
  18311. end: -0,
  18312. detail: { devtools: reusableComponentDevToolDetails }
  18313. }, resuableChangedPropsEntry = ["Changed Props", ""], DEEP_EQUALITY_WARNING = "This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.", reusableDeeplyEqualPropsEntry = ["Changed Props", DEEP_EQUALITY_WARNING], OffscreenVisible = 1, OffscreenPassiveEffectsConnected = 2, concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0, emptyContextObject = {};
  18314. Object.freeze(emptyContextObject);
  18315. var resolveFamily = null, failedBoundaries = null, NoMode = 0, ConcurrentMode = 1, ProfileMode = 2, StrictLegacyMode = 8, StrictEffectsMode = 16, SuspenseyImagesMode = 32;
  18316. var hasBadMapPolyfill = false;
  18317. try {
  18318. var nonExtensibleObject = Object.preventExtensions({});
  18319. /* @__PURE__ */ new Map([[nonExtensibleObject, null]]);
  18320. /* @__PURE__ */ new Set([nonExtensibleObject]);
  18321. } catch (e$3) {
  18322. hasBadMapPolyfill = true;
  18323. }
  18324. var CapturedStacks = /* @__PURE__ */ new WeakMap(), forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = "", hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = false, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, hydrationErrors = null, rootOrSingletonContext = false, HydrationMismatchException = Error(
  18325. "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
  18326. ), valueCursor = createCursor(null);
  18327. var rendererCursorDEV = createCursor(null);
  18328. var rendererSigil = {};
  18329. var currentlyRenderingFiber$1 = null, lastContextDependency = null, isDisallowedContextReadInDEV = false, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
  18330. var listeners = [], signal = this.signal = {
  18331. aborted: false,
  18332. addEventListener: function(type, listener) {
  18333. listeners.push(listener);
  18334. }
  18335. };
  18336. this.abort = function() {
  18337. signal.aborted = true;
  18338. listeners.forEach(function(listener) {
  18339. return listener();
  18340. });
  18341. };
  18342. }, scheduleCallback$2 = Scheduler.unstable_scheduleCallback, NormalPriority = Scheduler.unstable_NormalPriority, CacheContext = {
  18343. $$typeof: REACT_CONTEXT_TYPE,
  18344. Consumer: null,
  18345. Provider: null,
  18346. _currentValue: null,
  18347. _currentValue2: null,
  18348. _threadCount: 0,
  18349. _currentRenderer: null,
  18350. _currentRenderer2: null
  18351. }, now = Scheduler.unstable_now, createTask = console.createTask ? console.createTask : function() {
  18352. return null;
  18353. }, SPAWNED_UPDATE = 1, PINGED_UPDATE = 2, renderStartTime = -0, commitStartTime = -0, commitEndTime = -0, commitErrors = null, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, componentEffectStartTime = -1.1, componentEffectEndTime = -1.1, componentEffectErrors = null, componentEffectSpawnedUpdate = false, blockingClampTime = -0, blockingUpdateTime = -1.1, blockingUpdateTask = null, blockingUpdateType = 0, blockingUpdateMethodName = null, blockingUpdateComponentName = null, blockingEventTime = -1.1, blockingEventType = null, blockingEventRepeatTime = -1.1, blockingSuspendedTime = -1.1, transitionClampTime = -0, transitionStartTime = -1.1, transitionUpdateTime = -1.1, transitionUpdateType = 0, transitionUpdateTask = null, transitionUpdateMethodName = null, transitionUpdateComponentName = null, transitionEventTime = -1.1, transitionEventType = null, transitionEventRepeatTime = -1.1, transitionSuspendedTime = -1.1, retryClampTime = -0, idleClampTime = -0, animatingLanes = 0, animatingTask = null, yieldReason = 0, yieldStartTime = -1.1, currentUpdateIsNested = false, nestedUpdateScheduled = false, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, prevOnStartTransitionFinish = ReactSharedInternals.S;
  18354. ReactSharedInternals.S = function(transition, returnValue) {
  18355. globalMostRecentTransitionTime = now$1();
  18356. if ("object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then) {
  18357. if (0 > transitionStartTime && 0 > transitionUpdateTime) {
  18358. transitionStartTime = now();
  18359. var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
  18360. if (newEventTime !== transitionEventRepeatTime || newEventType !== transitionEventType)
  18361. transitionEventRepeatTime = -1.1;
  18362. transitionEventTime = newEventTime;
  18363. transitionEventType = newEventType;
  18364. }
  18365. entangleAsyncAction(transition, returnValue);
  18366. }
  18367. null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue);
  18368. };
  18369. var resumedCache = createCursor(null), ReactStrictModeWarnings = {
  18370. recordUnsafeLifecycleWarnings: function() {
  18371. },
  18372. flushPendingUnsafeLifecycleWarnings: function() {
  18373. },
  18374. recordLegacyContextWarning: function() {
  18375. },
  18376. flushLegacyContextWarning: function() {
  18377. },
  18378. discardPendingWarnings: function() {
  18379. }
  18380. }, pendingComponentWillMountWarnings = [], pendingUNSAFE_ComponentWillMountWarnings = [], pendingComponentWillReceivePropsWarnings = [], pendingUNSAFE_ComponentWillReceivePropsWarnings = [], pendingComponentWillUpdateWarnings = [], pendingUNSAFE_ComponentWillUpdateWarnings = [], didWarnAboutUnsafeLifecycles = /* @__PURE__ */ new Set();
  18381. ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
  18382. didWarnAboutUnsafeLifecycles.has(fiber.type) || ("function" === typeof instance.componentWillMount && true !== instance.componentWillMount.__suppressDeprecationWarning && pendingComponentWillMountWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillMount && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), "function" === typeof instance.componentWillReceiveProps && true !== instance.componentWillReceiveProps.__suppressDeprecationWarning && pendingComponentWillReceivePropsWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillReceiveProps && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), "function" === typeof instance.componentWillUpdate && true !== instance.componentWillUpdate.__suppressDeprecationWarning && pendingComponentWillUpdateWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillUpdate && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
  18383. };
  18384. ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
  18385. var componentWillMountUniqueNames = /* @__PURE__ */ new Set();
  18386. 0 < pendingComponentWillMountWarnings.length && (pendingComponentWillMountWarnings.forEach(function(fiber) {
  18387. componentWillMountUniqueNames.add(
  18388. getComponentNameFromFiber(fiber) || "Component"
  18389. );
  18390. didWarnAboutUnsafeLifecycles.add(fiber.type);
  18391. }), pendingComponentWillMountWarnings = []);
  18392. var UNSAFE_componentWillMountUniqueNames = /* @__PURE__ */ new Set();
  18393. 0 < pendingUNSAFE_ComponentWillMountWarnings.length && (pendingUNSAFE_ComponentWillMountWarnings.forEach(function(fiber) {
  18394. UNSAFE_componentWillMountUniqueNames.add(
  18395. getComponentNameFromFiber(fiber) || "Component"
  18396. );
  18397. didWarnAboutUnsafeLifecycles.add(fiber.type);
  18398. }), pendingUNSAFE_ComponentWillMountWarnings = []);
  18399. var componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
  18400. 0 < pendingComponentWillReceivePropsWarnings.length && (pendingComponentWillReceivePropsWarnings.forEach(function(fiber) {
  18401. componentWillReceivePropsUniqueNames.add(
  18402. getComponentNameFromFiber(fiber) || "Component"
  18403. );
  18404. didWarnAboutUnsafeLifecycles.add(fiber.type);
  18405. }), pendingComponentWillReceivePropsWarnings = []);
  18406. var UNSAFE_componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
  18407. 0 < pendingUNSAFE_ComponentWillReceivePropsWarnings.length && (pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(
  18408. function(fiber) {
  18409. UNSAFE_componentWillReceivePropsUniqueNames.add(
  18410. getComponentNameFromFiber(fiber) || "Component"
  18411. );
  18412. didWarnAboutUnsafeLifecycles.add(fiber.type);
  18413. }
  18414. ), pendingUNSAFE_ComponentWillReceivePropsWarnings = []);
  18415. var componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
  18416. 0 < pendingComponentWillUpdateWarnings.length && (pendingComponentWillUpdateWarnings.forEach(function(fiber) {
  18417. componentWillUpdateUniqueNames.add(
  18418. getComponentNameFromFiber(fiber) || "Component"
  18419. );
  18420. didWarnAboutUnsafeLifecycles.add(fiber.type);
  18421. }), pendingComponentWillUpdateWarnings = []);
  18422. var UNSAFE_componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
  18423. 0 < pendingUNSAFE_ComponentWillUpdateWarnings.length && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
  18424. UNSAFE_componentWillUpdateUniqueNames.add(
  18425. getComponentNameFromFiber(fiber) || "Component"
  18426. );
  18427. didWarnAboutUnsafeLifecycles.add(fiber.type);
  18428. }), pendingUNSAFE_ComponentWillUpdateWarnings = []);
  18429. if (0 < UNSAFE_componentWillMountUniqueNames.size) {
  18430. var sortedNames = setToSortedString(
  18431. UNSAFE_componentWillMountUniqueNames
  18432. );
  18433. console.error(
  18434. "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",
  18435. sortedNames
  18436. );
  18437. }
  18438. 0 < UNSAFE_componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
  18439. UNSAFE_componentWillReceivePropsUniqueNames
  18440. ), console.error(
  18441. "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s",
  18442. sortedNames
  18443. ));
  18444. 0 < UNSAFE_componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(
  18445. UNSAFE_componentWillUpdateUniqueNames
  18446. ), console.error(
  18447. "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",
  18448. sortedNames
  18449. ));
  18450. 0 < componentWillMountUniqueNames.size && (sortedNames = setToSortedString(componentWillMountUniqueNames), console.warn(
  18451. "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
  18452. sortedNames
  18453. ));
  18454. 0 < componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
  18455. componentWillReceivePropsUniqueNames
  18456. ), console.warn(
  18457. "componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
  18458. sortedNames
  18459. ));
  18460. 0 < componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(componentWillUpdateUniqueNames), console.warn(
  18461. "componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
  18462. sortedNames
  18463. ));
  18464. };
  18465. var pendingLegacyContextWarning = /* @__PURE__ */ new Map(), didWarnAboutLegacyContext = /* @__PURE__ */ new Set();
  18466. ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber, instance) {
  18467. var strictRoot = null;
  18468. for (var node = fiber; null !== node; )
  18469. node.mode & StrictLegacyMode && (strictRoot = node), node = node.return;
  18470. null === strictRoot ? console.error(
  18471. "Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."
  18472. ) : !didWarnAboutLegacyContext.has(fiber.type) && (node = pendingLegacyContextWarning.get(strictRoot), null != fiber.type.contextTypes || null != fiber.type.childContextTypes || null !== instance && "function" === typeof instance.getChildContext) && (void 0 === node && (node = [], pendingLegacyContextWarning.set(strictRoot, node)), node.push(fiber));
  18473. };
  18474. ReactStrictModeWarnings.flushLegacyContextWarning = function() {
  18475. pendingLegacyContextWarning.forEach(function(fiberArray) {
  18476. if (0 !== fiberArray.length) {
  18477. var firstFiber = fiberArray[0], uniqueNames = /* @__PURE__ */ new Set();
  18478. fiberArray.forEach(function(fiber) {
  18479. uniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
  18480. didWarnAboutLegacyContext.add(fiber.type);
  18481. });
  18482. var sortedNames = setToSortedString(uniqueNames);
  18483. runWithFiberInDEV(firstFiber, function() {
  18484. console.error(
  18485. "Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
  18486. sortedNames
  18487. );
  18488. });
  18489. }
  18490. });
  18491. };
  18492. ReactStrictModeWarnings.discardPendingWarnings = function() {
  18493. pendingComponentWillMountWarnings = [];
  18494. pendingUNSAFE_ComponentWillMountWarnings = [];
  18495. pendingComponentWillReceivePropsWarnings = [];
  18496. pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
  18497. pendingComponentWillUpdateWarnings = [];
  18498. pendingUNSAFE_ComponentWillUpdateWarnings = [];
  18499. pendingLegacyContextWarning = /* @__PURE__ */ new Map();
  18500. };
  18501. var callComponent = {
  18502. react_stack_bottom_frame: function(Component, props, secondArg) {
  18503. var wasRendering = isRendering;
  18504. isRendering = true;
  18505. try {
  18506. return Component(props, secondArg);
  18507. } finally {
  18508. isRendering = wasRendering;
  18509. }
  18510. }
  18511. }, callComponentInDEV = callComponent.react_stack_bottom_frame.bind(callComponent), callRender = {
  18512. react_stack_bottom_frame: function(instance) {
  18513. var wasRendering = isRendering;
  18514. isRendering = true;
  18515. try {
  18516. return instance.render();
  18517. } finally {
  18518. isRendering = wasRendering;
  18519. }
  18520. }
  18521. }, callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender), callComponentDidMount = {
  18522. react_stack_bottom_frame: function(finishedWork, instance) {
  18523. try {
  18524. instance.componentDidMount();
  18525. } catch (error) {
  18526. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  18527. }
  18528. }
  18529. }, callComponentDidMountInDEV = callComponentDidMount.react_stack_bottom_frame.bind(
  18530. callComponentDidMount
  18531. ), callComponentDidUpdate = {
  18532. react_stack_bottom_frame: function(finishedWork, instance, prevProps, prevState, snapshot) {
  18533. try {
  18534. instance.componentDidUpdate(prevProps, prevState, snapshot);
  18535. } catch (error) {
  18536. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  18537. }
  18538. }
  18539. }, callComponentDidUpdateInDEV = callComponentDidUpdate.react_stack_bottom_frame.bind(
  18540. callComponentDidUpdate
  18541. ), callComponentDidCatch = {
  18542. react_stack_bottom_frame: function(instance, errorInfo) {
  18543. var stack = errorInfo.stack;
  18544. instance.componentDidCatch(errorInfo.value, {
  18545. componentStack: null !== stack ? stack : ""
  18546. });
  18547. }
  18548. }, callComponentDidCatchInDEV = callComponentDidCatch.react_stack_bottom_frame.bind(
  18549. callComponentDidCatch
  18550. ), callComponentWillUnmount = {
  18551. react_stack_bottom_frame: function(current2, nearestMountedAncestor, instance) {
  18552. try {
  18553. instance.componentWillUnmount();
  18554. } catch (error) {
  18555. captureCommitPhaseError(current2, nearestMountedAncestor, error);
  18556. }
  18557. }
  18558. }, callComponentWillUnmountInDEV = callComponentWillUnmount.react_stack_bottom_frame.bind(
  18559. callComponentWillUnmount
  18560. ), callCreate = {
  18561. react_stack_bottom_frame: function(effect) {
  18562. var create = effect.create;
  18563. effect = effect.inst;
  18564. create = create();
  18565. return effect.destroy = create;
  18566. }
  18567. }, callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate), callDestroy = {
  18568. react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
  18569. try {
  18570. destroy();
  18571. } catch (error) {
  18572. captureCommitPhaseError(current2, nearestMountedAncestor, error);
  18573. }
  18574. }
  18575. }, callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy), callLazyInit = {
  18576. react_stack_bottom_frame: function(lazy) {
  18577. var init = lazy._init;
  18578. return init(lazy._payload);
  18579. }
  18580. }, callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit), SuspenseException = Error(
  18581. "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
  18582. ), SuspenseyCommitException = Error(
  18583. "Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
  18584. ), SuspenseActionException = Error(
  18585. "Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."
  18586. ), noopSuspenseyCommitThenable = {
  18587. then: function() {
  18588. console.error(
  18589. 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.'
  18590. );
  18591. }
  18592. }, suspendedThenable = null, needsToResetSuspendedThenableDEV = false, thenableState$1 = null, thenableIndexCounter$1 = 0, currentDebugInfo = null, didWarnAboutMaps;
  18593. var didWarnAboutGenerators = didWarnAboutMaps = false;
  18594. var ownerHasKeyUseWarning = {};
  18595. var ownerHasFunctionTypeWarning = {};
  18596. var ownerHasSymbolTypeWarning = {};
  18597. warnForMissingKey = function(returnFiber, workInProgress2, child) {
  18598. if (null !== child && "object" === typeof child && child._store && (!child._store.validated && null == child.key || 2 === child._store.validated)) {
  18599. if ("object" !== typeof child._store)
  18600. throw Error(
  18601. "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
  18602. );
  18603. child._store.validated = 1;
  18604. var componentName2 = getComponentNameFromFiber(returnFiber), componentKey = componentName2 || "null";
  18605. if (!ownerHasKeyUseWarning[componentKey]) {
  18606. ownerHasKeyUseWarning[componentKey] = true;
  18607. child = child._owner;
  18608. returnFiber = returnFiber._debugOwner;
  18609. var currentComponentErrorInfo = "";
  18610. returnFiber && "number" === typeof returnFiber.tag && (componentKey = getComponentNameFromFiber(returnFiber)) && (currentComponentErrorInfo = "\n\nCheck the render method of `" + componentKey + "`.");
  18611. currentComponentErrorInfo || componentName2 && (currentComponentErrorInfo = "\n\nCheck the top-level render call using <" + componentName2 + ">.");
  18612. var childOwnerAppendix = "";
  18613. null != child && returnFiber !== child && (componentName2 = null, "number" === typeof child.tag ? componentName2 = getComponentNameFromFiber(child) : "string" === typeof child.name && (componentName2 = child.name), componentName2 && (childOwnerAppendix = " It was passed a child from " + componentName2 + "."));
  18614. runWithFiberInDEV(workInProgress2, function() {
  18615. console.error(
  18616. 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
  18617. currentComponentErrorInfo,
  18618. childOwnerAppendix
  18619. );
  18620. });
  18621. }
  18622. }
  18623. };
  18624. var reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), UpdateState = 0, ReplaceState = 1, ForceUpdate = 2, CaptureUpdate = 3, hasForceUpdate = false;
  18625. var didWarnUpdateInsideUpdate = false;
  18626. var currentlyProcessingQueue = null;
  18627. var didReadFromEntangledAsyncAction = false, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), suspenseHandlerStackCursor = createCursor(null), shellBoundary = null, SubtreeSuspenseContextMask = 1, ForceSuspenseFallback = 2, suspenseStackCursor = createCursor(0), NoFlags = 0, HasEffect = 1, Insertion = 2, Layout = 4, Passive = 8, didWarnUncachedGetSnapshot;
  18628. var didWarnAboutMismatchedHooksForComponent = /* @__PURE__ */ new Set();
  18629. var didWarnAboutUseWrappedInTryCatch = /* @__PURE__ */ new Set();
  18630. var didWarnAboutAsyncClientComponent = /* @__PURE__ */ new Set();
  18631. var didWarnAboutUseFormState = /* @__PURE__ */ new Set();
  18632. var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter = 0, thenableState = null, globalClientIdCounter = 0, RE_RENDER_LIMIT = 25, currentHookNameInDev = null, hookTypesDev = null, hookTypesUpdateIndexDev = -1, ignorePreviousDependencies = false, ContextOnlyDispatcher = {
  18633. readContext,
  18634. use,
  18635. useCallback: throwInvalidHookError,
  18636. useContext: throwInvalidHookError,
  18637. useEffect: throwInvalidHookError,
  18638. useImperativeHandle: throwInvalidHookError,
  18639. useLayoutEffect: throwInvalidHookError,
  18640. useInsertionEffect: throwInvalidHookError,
  18641. useMemo: throwInvalidHookError,
  18642. useReducer: throwInvalidHookError,
  18643. useRef: throwInvalidHookError,
  18644. useState: throwInvalidHookError,
  18645. useDebugValue: throwInvalidHookError,
  18646. useDeferredValue: throwInvalidHookError,
  18647. useTransition: throwInvalidHookError,
  18648. useSyncExternalStore: throwInvalidHookError,
  18649. useId: throwInvalidHookError,
  18650. useHostTransitionStatus: throwInvalidHookError,
  18651. useFormState: throwInvalidHookError,
  18652. useActionState: throwInvalidHookError,
  18653. useOptimistic: throwInvalidHookError,
  18654. useMemoCache: throwInvalidHookError,
  18655. useCacheRefresh: throwInvalidHookError
  18656. };
  18657. ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
  18658. var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, HooksDispatcherOnRerenderInDEV = null, InvalidNestedHooksDispatcherOnMountInDEV = null, InvalidNestedHooksDispatcherOnUpdateInDEV = null, InvalidNestedHooksDispatcherOnRerenderInDEV = null;
  18659. HooksDispatcherOnMountInDEV = {
  18660. readContext: function(context) {
  18661. return readContext(context);
  18662. },
  18663. use,
  18664. useCallback: function(callback, deps) {
  18665. currentHookNameInDev = "useCallback";
  18666. mountHookTypesDev();
  18667. checkDepsAreArrayDev(deps);
  18668. return mountCallback(callback, deps);
  18669. },
  18670. useContext: function(context) {
  18671. currentHookNameInDev = "useContext";
  18672. mountHookTypesDev();
  18673. return readContext(context);
  18674. },
  18675. useEffect: function(create, deps) {
  18676. currentHookNameInDev = "useEffect";
  18677. mountHookTypesDev();
  18678. checkDepsAreArrayDev(deps);
  18679. return mountEffect(create, deps);
  18680. },
  18681. useImperativeHandle: function(ref, create, deps) {
  18682. currentHookNameInDev = "useImperativeHandle";
  18683. mountHookTypesDev();
  18684. checkDepsAreArrayDev(deps);
  18685. return mountImperativeHandle(ref, create, deps);
  18686. },
  18687. useInsertionEffect: function(create, deps) {
  18688. currentHookNameInDev = "useInsertionEffect";
  18689. mountHookTypesDev();
  18690. checkDepsAreArrayDev(deps);
  18691. mountEffectImpl(4, Insertion, create, deps);
  18692. },
  18693. useLayoutEffect: function(create, deps) {
  18694. currentHookNameInDev = "useLayoutEffect";
  18695. mountHookTypesDev();
  18696. checkDepsAreArrayDev(deps);
  18697. return mountLayoutEffect(create, deps);
  18698. },
  18699. useMemo: function(create, deps) {
  18700. currentHookNameInDev = "useMemo";
  18701. mountHookTypesDev();
  18702. checkDepsAreArrayDev(deps);
  18703. var prevDispatcher = ReactSharedInternals.H;
  18704. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  18705. try {
  18706. return mountMemo(create, deps);
  18707. } finally {
  18708. ReactSharedInternals.H = prevDispatcher;
  18709. }
  18710. },
  18711. useReducer: function(reducer, initialArg, init) {
  18712. currentHookNameInDev = "useReducer";
  18713. mountHookTypesDev();
  18714. var prevDispatcher = ReactSharedInternals.H;
  18715. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  18716. try {
  18717. return mountReducer(reducer, initialArg, init);
  18718. } finally {
  18719. ReactSharedInternals.H = prevDispatcher;
  18720. }
  18721. },
  18722. useRef: function(initialValue) {
  18723. currentHookNameInDev = "useRef";
  18724. mountHookTypesDev();
  18725. return mountRef(initialValue);
  18726. },
  18727. useState: function(initialState) {
  18728. currentHookNameInDev = "useState";
  18729. mountHookTypesDev();
  18730. var prevDispatcher = ReactSharedInternals.H;
  18731. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  18732. try {
  18733. return mountState(initialState);
  18734. } finally {
  18735. ReactSharedInternals.H = prevDispatcher;
  18736. }
  18737. },
  18738. useDebugValue: function() {
  18739. currentHookNameInDev = "useDebugValue";
  18740. mountHookTypesDev();
  18741. },
  18742. useDeferredValue: function(value, initialValue) {
  18743. currentHookNameInDev = "useDeferredValue";
  18744. mountHookTypesDev();
  18745. return mountDeferredValue(value, initialValue);
  18746. },
  18747. useTransition: function() {
  18748. currentHookNameInDev = "useTransition";
  18749. mountHookTypesDev();
  18750. return mountTransition();
  18751. },
  18752. useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
  18753. currentHookNameInDev = "useSyncExternalStore";
  18754. mountHookTypesDev();
  18755. return mountSyncExternalStore(
  18756. subscribe,
  18757. getSnapshot,
  18758. getServerSnapshot
  18759. );
  18760. },
  18761. useId: function() {
  18762. currentHookNameInDev = "useId";
  18763. mountHookTypesDev();
  18764. return mountId();
  18765. },
  18766. useFormState: function(action, initialState) {
  18767. currentHookNameInDev = "useFormState";
  18768. mountHookTypesDev();
  18769. warnOnUseFormStateInDev();
  18770. return mountActionState(action, initialState);
  18771. },
  18772. useActionState: function(action, initialState) {
  18773. currentHookNameInDev = "useActionState";
  18774. mountHookTypesDev();
  18775. return mountActionState(action, initialState);
  18776. },
  18777. useOptimistic: function(passthrough) {
  18778. currentHookNameInDev = "useOptimistic";
  18779. mountHookTypesDev();
  18780. return mountOptimistic(passthrough);
  18781. },
  18782. useHostTransitionStatus,
  18783. useMemoCache,
  18784. useCacheRefresh: function() {
  18785. currentHookNameInDev = "useCacheRefresh";
  18786. mountHookTypesDev();
  18787. return mountRefresh();
  18788. },
  18789. useEffectEvent: function(callback) {
  18790. currentHookNameInDev = "useEffectEvent";
  18791. mountHookTypesDev();
  18792. return mountEvent(callback);
  18793. }
  18794. };
  18795. HooksDispatcherOnMountWithHookTypesInDEV = {
  18796. readContext: function(context) {
  18797. return readContext(context);
  18798. },
  18799. use,
  18800. useCallback: function(callback, deps) {
  18801. currentHookNameInDev = "useCallback";
  18802. updateHookTypesDev();
  18803. return mountCallback(callback, deps);
  18804. },
  18805. useContext: function(context) {
  18806. currentHookNameInDev = "useContext";
  18807. updateHookTypesDev();
  18808. return readContext(context);
  18809. },
  18810. useEffect: function(create, deps) {
  18811. currentHookNameInDev = "useEffect";
  18812. updateHookTypesDev();
  18813. return mountEffect(create, deps);
  18814. },
  18815. useImperativeHandle: function(ref, create, deps) {
  18816. currentHookNameInDev = "useImperativeHandle";
  18817. updateHookTypesDev();
  18818. return mountImperativeHandle(ref, create, deps);
  18819. },
  18820. useInsertionEffect: function(create, deps) {
  18821. currentHookNameInDev = "useInsertionEffect";
  18822. updateHookTypesDev();
  18823. mountEffectImpl(4, Insertion, create, deps);
  18824. },
  18825. useLayoutEffect: function(create, deps) {
  18826. currentHookNameInDev = "useLayoutEffect";
  18827. updateHookTypesDev();
  18828. return mountLayoutEffect(create, deps);
  18829. },
  18830. useMemo: function(create, deps) {
  18831. currentHookNameInDev = "useMemo";
  18832. updateHookTypesDev();
  18833. var prevDispatcher = ReactSharedInternals.H;
  18834. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  18835. try {
  18836. return mountMemo(create, deps);
  18837. } finally {
  18838. ReactSharedInternals.H = prevDispatcher;
  18839. }
  18840. },
  18841. useReducer: function(reducer, initialArg, init) {
  18842. currentHookNameInDev = "useReducer";
  18843. updateHookTypesDev();
  18844. var prevDispatcher = ReactSharedInternals.H;
  18845. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  18846. try {
  18847. return mountReducer(reducer, initialArg, init);
  18848. } finally {
  18849. ReactSharedInternals.H = prevDispatcher;
  18850. }
  18851. },
  18852. useRef: function(initialValue) {
  18853. currentHookNameInDev = "useRef";
  18854. updateHookTypesDev();
  18855. return mountRef(initialValue);
  18856. },
  18857. useState: function(initialState) {
  18858. currentHookNameInDev = "useState";
  18859. updateHookTypesDev();
  18860. var prevDispatcher = ReactSharedInternals.H;
  18861. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  18862. try {
  18863. return mountState(initialState);
  18864. } finally {
  18865. ReactSharedInternals.H = prevDispatcher;
  18866. }
  18867. },
  18868. useDebugValue: function() {
  18869. currentHookNameInDev = "useDebugValue";
  18870. updateHookTypesDev();
  18871. },
  18872. useDeferredValue: function(value, initialValue) {
  18873. currentHookNameInDev = "useDeferredValue";
  18874. updateHookTypesDev();
  18875. return mountDeferredValue(value, initialValue);
  18876. },
  18877. useTransition: function() {
  18878. currentHookNameInDev = "useTransition";
  18879. updateHookTypesDev();
  18880. return mountTransition();
  18881. },
  18882. useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
  18883. currentHookNameInDev = "useSyncExternalStore";
  18884. updateHookTypesDev();
  18885. return mountSyncExternalStore(
  18886. subscribe,
  18887. getSnapshot,
  18888. getServerSnapshot
  18889. );
  18890. },
  18891. useId: function() {
  18892. currentHookNameInDev = "useId";
  18893. updateHookTypesDev();
  18894. return mountId();
  18895. },
  18896. useActionState: function(action, initialState) {
  18897. currentHookNameInDev = "useActionState";
  18898. updateHookTypesDev();
  18899. return mountActionState(action, initialState);
  18900. },
  18901. useFormState: function(action, initialState) {
  18902. currentHookNameInDev = "useFormState";
  18903. updateHookTypesDev();
  18904. warnOnUseFormStateInDev();
  18905. return mountActionState(action, initialState);
  18906. },
  18907. useOptimistic: function(passthrough) {
  18908. currentHookNameInDev = "useOptimistic";
  18909. updateHookTypesDev();
  18910. return mountOptimistic(passthrough);
  18911. },
  18912. useHostTransitionStatus,
  18913. useMemoCache,
  18914. useCacheRefresh: function() {
  18915. currentHookNameInDev = "useCacheRefresh";
  18916. updateHookTypesDev();
  18917. return mountRefresh();
  18918. },
  18919. useEffectEvent: function(callback) {
  18920. currentHookNameInDev = "useEffectEvent";
  18921. updateHookTypesDev();
  18922. return mountEvent(callback);
  18923. }
  18924. };
  18925. HooksDispatcherOnUpdateInDEV = {
  18926. readContext: function(context) {
  18927. return readContext(context);
  18928. },
  18929. use,
  18930. useCallback: function(callback, deps) {
  18931. currentHookNameInDev = "useCallback";
  18932. updateHookTypesDev();
  18933. return updateCallback(callback, deps);
  18934. },
  18935. useContext: function(context) {
  18936. currentHookNameInDev = "useContext";
  18937. updateHookTypesDev();
  18938. return readContext(context);
  18939. },
  18940. useEffect: function(create, deps) {
  18941. currentHookNameInDev = "useEffect";
  18942. updateHookTypesDev();
  18943. updateEffectImpl(2048, Passive, create, deps);
  18944. },
  18945. useImperativeHandle: function(ref, create, deps) {
  18946. currentHookNameInDev = "useImperativeHandle";
  18947. updateHookTypesDev();
  18948. return updateImperativeHandle(ref, create, deps);
  18949. },
  18950. useInsertionEffect: function(create, deps) {
  18951. currentHookNameInDev = "useInsertionEffect";
  18952. updateHookTypesDev();
  18953. return updateEffectImpl(4, Insertion, create, deps);
  18954. },
  18955. useLayoutEffect: function(create, deps) {
  18956. currentHookNameInDev = "useLayoutEffect";
  18957. updateHookTypesDev();
  18958. return updateEffectImpl(4, Layout, create, deps);
  18959. },
  18960. useMemo: function(create, deps) {
  18961. currentHookNameInDev = "useMemo";
  18962. updateHookTypesDev();
  18963. var prevDispatcher = ReactSharedInternals.H;
  18964. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  18965. try {
  18966. return updateMemo(create, deps);
  18967. } finally {
  18968. ReactSharedInternals.H = prevDispatcher;
  18969. }
  18970. },
  18971. useReducer: function(reducer, initialArg, init) {
  18972. currentHookNameInDev = "useReducer";
  18973. updateHookTypesDev();
  18974. var prevDispatcher = ReactSharedInternals.H;
  18975. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  18976. try {
  18977. return updateReducer(reducer, initialArg, init);
  18978. } finally {
  18979. ReactSharedInternals.H = prevDispatcher;
  18980. }
  18981. },
  18982. useRef: function() {
  18983. currentHookNameInDev = "useRef";
  18984. updateHookTypesDev();
  18985. return updateWorkInProgressHook().memoizedState;
  18986. },
  18987. useState: function() {
  18988. currentHookNameInDev = "useState";
  18989. updateHookTypesDev();
  18990. var prevDispatcher = ReactSharedInternals.H;
  18991. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  18992. try {
  18993. return updateReducer(basicStateReducer);
  18994. } finally {
  18995. ReactSharedInternals.H = prevDispatcher;
  18996. }
  18997. },
  18998. useDebugValue: function() {
  18999. currentHookNameInDev = "useDebugValue";
  19000. updateHookTypesDev();
  19001. },
  19002. useDeferredValue: function(value, initialValue) {
  19003. currentHookNameInDev = "useDeferredValue";
  19004. updateHookTypesDev();
  19005. return updateDeferredValue(value, initialValue);
  19006. },
  19007. useTransition: function() {
  19008. currentHookNameInDev = "useTransition";
  19009. updateHookTypesDev();
  19010. return updateTransition();
  19011. },
  19012. useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
  19013. currentHookNameInDev = "useSyncExternalStore";
  19014. updateHookTypesDev();
  19015. return updateSyncExternalStore(
  19016. subscribe,
  19017. getSnapshot,
  19018. getServerSnapshot
  19019. );
  19020. },
  19021. useId: function() {
  19022. currentHookNameInDev = "useId";
  19023. updateHookTypesDev();
  19024. return updateWorkInProgressHook().memoizedState;
  19025. },
  19026. useFormState: function(action) {
  19027. currentHookNameInDev = "useFormState";
  19028. updateHookTypesDev();
  19029. warnOnUseFormStateInDev();
  19030. return updateActionState(action);
  19031. },
  19032. useActionState: function(action) {
  19033. currentHookNameInDev = "useActionState";
  19034. updateHookTypesDev();
  19035. return updateActionState(action);
  19036. },
  19037. useOptimistic: function(passthrough, reducer) {
  19038. currentHookNameInDev = "useOptimistic";
  19039. updateHookTypesDev();
  19040. return updateOptimistic(passthrough, reducer);
  19041. },
  19042. useHostTransitionStatus,
  19043. useMemoCache,
  19044. useCacheRefresh: function() {
  19045. currentHookNameInDev = "useCacheRefresh";
  19046. updateHookTypesDev();
  19047. return updateWorkInProgressHook().memoizedState;
  19048. },
  19049. useEffectEvent: function(callback) {
  19050. currentHookNameInDev = "useEffectEvent";
  19051. updateHookTypesDev();
  19052. return updateEvent(callback);
  19053. }
  19054. };
  19055. HooksDispatcherOnRerenderInDEV = {
  19056. readContext: function(context) {
  19057. return readContext(context);
  19058. },
  19059. use,
  19060. useCallback: function(callback, deps) {
  19061. currentHookNameInDev = "useCallback";
  19062. updateHookTypesDev();
  19063. return updateCallback(callback, deps);
  19064. },
  19065. useContext: function(context) {
  19066. currentHookNameInDev = "useContext";
  19067. updateHookTypesDev();
  19068. return readContext(context);
  19069. },
  19070. useEffect: function(create, deps) {
  19071. currentHookNameInDev = "useEffect";
  19072. updateHookTypesDev();
  19073. updateEffectImpl(2048, Passive, create, deps);
  19074. },
  19075. useImperativeHandle: function(ref, create, deps) {
  19076. currentHookNameInDev = "useImperativeHandle";
  19077. updateHookTypesDev();
  19078. return updateImperativeHandle(ref, create, deps);
  19079. },
  19080. useInsertionEffect: function(create, deps) {
  19081. currentHookNameInDev = "useInsertionEffect";
  19082. updateHookTypesDev();
  19083. return updateEffectImpl(4, Insertion, create, deps);
  19084. },
  19085. useLayoutEffect: function(create, deps) {
  19086. currentHookNameInDev = "useLayoutEffect";
  19087. updateHookTypesDev();
  19088. return updateEffectImpl(4, Layout, create, deps);
  19089. },
  19090. useMemo: function(create, deps) {
  19091. currentHookNameInDev = "useMemo";
  19092. updateHookTypesDev();
  19093. var prevDispatcher = ReactSharedInternals.H;
  19094. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
  19095. try {
  19096. return updateMemo(create, deps);
  19097. } finally {
  19098. ReactSharedInternals.H = prevDispatcher;
  19099. }
  19100. },
  19101. useReducer: function(reducer, initialArg, init) {
  19102. currentHookNameInDev = "useReducer";
  19103. updateHookTypesDev();
  19104. var prevDispatcher = ReactSharedInternals.H;
  19105. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
  19106. try {
  19107. return rerenderReducer(reducer, initialArg, init);
  19108. } finally {
  19109. ReactSharedInternals.H = prevDispatcher;
  19110. }
  19111. },
  19112. useRef: function() {
  19113. currentHookNameInDev = "useRef";
  19114. updateHookTypesDev();
  19115. return updateWorkInProgressHook().memoizedState;
  19116. },
  19117. useState: function() {
  19118. currentHookNameInDev = "useState";
  19119. updateHookTypesDev();
  19120. var prevDispatcher = ReactSharedInternals.H;
  19121. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
  19122. try {
  19123. return rerenderReducer(basicStateReducer);
  19124. } finally {
  19125. ReactSharedInternals.H = prevDispatcher;
  19126. }
  19127. },
  19128. useDebugValue: function() {
  19129. currentHookNameInDev = "useDebugValue";
  19130. updateHookTypesDev();
  19131. },
  19132. useDeferredValue: function(value, initialValue) {
  19133. currentHookNameInDev = "useDeferredValue";
  19134. updateHookTypesDev();
  19135. return rerenderDeferredValue(value, initialValue);
  19136. },
  19137. useTransition: function() {
  19138. currentHookNameInDev = "useTransition";
  19139. updateHookTypesDev();
  19140. return rerenderTransition();
  19141. },
  19142. useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
  19143. currentHookNameInDev = "useSyncExternalStore";
  19144. updateHookTypesDev();
  19145. return updateSyncExternalStore(
  19146. subscribe,
  19147. getSnapshot,
  19148. getServerSnapshot
  19149. );
  19150. },
  19151. useId: function() {
  19152. currentHookNameInDev = "useId";
  19153. updateHookTypesDev();
  19154. return updateWorkInProgressHook().memoizedState;
  19155. },
  19156. useFormState: function(action) {
  19157. currentHookNameInDev = "useFormState";
  19158. updateHookTypesDev();
  19159. warnOnUseFormStateInDev();
  19160. return rerenderActionState(action);
  19161. },
  19162. useActionState: function(action) {
  19163. currentHookNameInDev = "useActionState";
  19164. updateHookTypesDev();
  19165. return rerenderActionState(action);
  19166. },
  19167. useOptimistic: function(passthrough, reducer) {
  19168. currentHookNameInDev = "useOptimistic";
  19169. updateHookTypesDev();
  19170. return rerenderOptimistic(passthrough, reducer);
  19171. },
  19172. useHostTransitionStatus,
  19173. useMemoCache,
  19174. useCacheRefresh: function() {
  19175. currentHookNameInDev = "useCacheRefresh";
  19176. updateHookTypesDev();
  19177. return updateWorkInProgressHook().memoizedState;
  19178. },
  19179. useEffectEvent: function(callback) {
  19180. currentHookNameInDev = "useEffectEvent";
  19181. updateHookTypesDev();
  19182. return updateEvent(callback);
  19183. }
  19184. };
  19185. InvalidNestedHooksDispatcherOnMountInDEV = {
  19186. readContext: function(context) {
  19187. warnInvalidContextAccess();
  19188. return readContext(context);
  19189. },
  19190. use: function(usable) {
  19191. warnInvalidHookAccess();
  19192. return use(usable);
  19193. },
  19194. useCallback: function(callback, deps) {
  19195. currentHookNameInDev = "useCallback";
  19196. warnInvalidHookAccess();
  19197. mountHookTypesDev();
  19198. return mountCallback(callback, deps);
  19199. },
  19200. useContext: function(context) {
  19201. currentHookNameInDev = "useContext";
  19202. warnInvalidHookAccess();
  19203. mountHookTypesDev();
  19204. return readContext(context);
  19205. },
  19206. useEffect: function(create, deps) {
  19207. currentHookNameInDev = "useEffect";
  19208. warnInvalidHookAccess();
  19209. mountHookTypesDev();
  19210. return mountEffect(create, deps);
  19211. },
  19212. useImperativeHandle: function(ref, create, deps) {
  19213. currentHookNameInDev = "useImperativeHandle";
  19214. warnInvalidHookAccess();
  19215. mountHookTypesDev();
  19216. return mountImperativeHandle(ref, create, deps);
  19217. },
  19218. useInsertionEffect: function(create, deps) {
  19219. currentHookNameInDev = "useInsertionEffect";
  19220. warnInvalidHookAccess();
  19221. mountHookTypesDev();
  19222. mountEffectImpl(4, Insertion, create, deps);
  19223. },
  19224. useLayoutEffect: function(create, deps) {
  19225. currentHookNameInDev = "useLayoutEffect";
  19226. warnInvalidHookAccess();
  19227. mountHookTypesDev();
  19228. return mountLayoutEffect(create, deps);
  19229. },
  19230. useMemo: function(create, deps) {
  19231. currentHookNameInDev = "useMemo";
  19232. warnInvalidHookAccess();
  19233. mountHookTypesDev();
  19234. var prevDispatcher = ReactSharedInternals.H;
  19235. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  19236. try {
  19237. return mountMemo(create, deps);
  19238. } finally {
  19239. ReactSharedInternals.H = prevDispatcher;
  19240. }
  19241. },
  19242. useReducer: function(reducer, initialArg, init) {
  19243. currentHookNameInDev = "useReducer";
  19244. warnInvalidHookAccess();
  19245. mountHookTypesDev();
  19246. var prevDispatcher = ReactSharedInternals.H;
  19247. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  19248. try {
  19249. return mountReducer(reducer, initialArg, init);
  19250. } finally {
  19251. ReactSharedInternals.H = prevDispatcher;
  19252. }
  19253. },
  19254. useRef: function(initialValue) {
  19255. currentHookNameInDev = "useRef";
  19256. warnInvalidHookAccess();
  19257. mountHookTypesDev();
  19258. return mountRef(initialValue);
  19259. },
  19260. useState: function(initialState) {
  19261. currentHookNameInDev = "useState";
  19262. warnInvalidHookAccess();
  19263. mountHookTypesDev();
  19264. var prevDispatcher = ReactSharedInternals.H;
  19265. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  19266. try {
  19267. return mountState(initialState);
  19268. } finally {
  19269. ReactSharedInternals.H = prevDispatcher;
  19270. }
  19271. },
  19272. useDebugValue: function() {
  19273. currentHookNameInDev = "useDebugValue";
  19274. warnInvalidHookAccess();
  19275. mountHookTypesDev();
  19276. },
  19277. useDeferredValue: function(value, initialValue) {
  19278. currentHookNameInDev = "useDeferredValue";
  19279. warnInvalidHookAccess();
  19280. mountHookTypesDev();
  19281. return mountDeferredValue(value, initialValue);
  19282. },
  19283. useTransition: function() {
  19284. currentHookNameInDev = "useTransition";
  19285. warnInvalidHookAccess();
  19286. mountHookTypesDev();
  19287. return mountTransition();
  19288. },
  19289. useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
  19290. currentHookNameInDev = "useSyncExternalStore";
  19291. warnInvalidHookAccess();
  19292. mountHookTypesDev();
  19293. return mountSyncExternalStore(
  19294. subscribe,
  19295. getSnapshot,
  19296. getServerSnapshot
  19297. );
  19298. },
  19299. useId: function() {
  19300. currentHookNameInDev = "useId";
  19301. warnInvalidHookAccess();
  19302. mountHookTypesDev();
  19303. return mountId();
  19304. },
  19305. useFormState: function(action, initialState) {
  19306. currentHookNameInDev = "useFormState";
  19307. warnInvalidHookAccess();
  19308. mountHookTypesDev();
  19309. return mountActionState(action, initialState);
  19310. },
  19311. useActionState: function(action, initialState) {
  19312. currentHookNameInDev = "useActionState";
  19313. warnInvalidHookAccess();
  19314. mountHookTypesDev();
  19315. return mountActionState(action, initialState);
  19316. },
  19317. useOptimistic: function(passthrough) {
  19318. currentHookNameInDev = "useOptimistic";
  19319. warnInvalidHookAccess();
  19320. mountHookTypesDev();
  19321. return mountOptimistic(passthrough);
  19322. },
  19323. useMemoCache: function(size) {
  19324. warnInvalidHookAccess();
  19325. return useMemoCache(size);
  19326. },
  19327. useHostTransitionStatus,
  19328. useCacheRefresh: function() {
  19329. currentHookNameInDev = "useCacheRefresh";
  19330. mountHookTypesDev();
  19331. return mountRefresh();
  19332. },
  19333. useEffectEvent: function(callback) {
  19334. currentHookNameInDev = "useEffectEvent";
  19335. warnInvalidHookAccess();
  19336. mountHookTypesDev();
  19337. return mountEvent(callback);
  19338. }
  19339. };
  19340. InvalidNestedHooksDispatcherOnUpdateInDEV = {
  19341. readContext: function(context) {
  19342. warnInvalidContextAccess();
  19343. return readContext(context);
  19344. },
  19345. use: function(usable) {
  19346. warnInvalidHookAccess();
  19347. return use(usable);
  19348. },
  19349. useCallback: function(callback, deps) {
  19350. currentHookNameInDev = "useCallback";
  19351. warnInvalidHookAccess();
  19352. updateHookTypesDev();
  19353. return updateCallback(callback, deps);
  19354. },
  19355. useContext: function(context) {
  19356. currentHookNameInDev = "useContext";
  19357. warnInvalidHookAccess();
  19358. updateHookTypesDev();
  19359. return readContext(context);
  19360. },
  19361. useEffect: function(create, deps) {
  19362. currentHookNameInDev = "useEffect";
  19363. warnInvalidHookAccess();
  19364. updateHookTypesDev();
  19365. updateEffectImpl(2048, Passive, create, deps);
  19366. },
  19367. useImperativeHandle: function(ref, create, deps) {
  19368. currentHookNameInDev = "useImperativeHandle";
  19369. warnInvalidHookAccess();
  19370. updateHookTypesDev();
  19371. return updateImperativeHandle(ref, create, deps);
  19372. },
  19373. useInsertionEffect: function(create, deps) {
  19374. currentHookNameInDev = "useInsertionEffect";
  19375. warnInvalidHookAccess();
  19376. updateHookTypesDev();
  19377. return updateEffectImpl(4, Insertion, create, deps);
  19378. },
  19379. useLayoutEffect: function(create, deps) {
  19380. currentHookNameInDev = "useLayoutEffect";
  19381. warnInvalidHookAccess();
  19382. updateHookTypesDev();
  19383. return updateEffectImpl(4, Layout, create, deps);
  19384. },
  19385. useMemo: function(create, deps) {
  19386. currentHookNameInDev = "useMemo";
  19387. warnInvalidHookAccess();
  19388. updateHookTypesDev();
  19389. var prevDispatcher = ReactSharedInternals.H;
  19390. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  19391. try {
  19392. return updateMemo(create, deps);
  19393. } finally {
  19394. ReactSharedInternals.H = prevDispatcher;
  19395. }
  19396. },
  19397. useReducer: function(reducer, initialArg, init) {
  19398. currentHookNameInDev = "useReducer";
  19399. warnInvalidHookAccess();
  19400. updateHookTypesDev();
  19401. var prevDispatcher = ReactSharedInternals.H;
  19402. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  19403. try {
  19404. return updateReducer(reducer, initialArg, init);
  19405. } finally {
  19406. ReactSharedInternals.H = prevDispatcher;
  19407. }
  19408. },
  19409. useRef: function() {
  19410. currentHookNameInDev = "useRef";
  19411. warnInvalidHookAccess();
  19412. updateHookTypesDev();
  19413. return updateWorkInProgressHook().memoizedState;
  19414. },
  19415. useState: function() {
  19416. currentHookNameInDev = "useState";
  19417. warnInvalidHookAccess();
  19418. updateHookTypesDev();
  19419. var prevDispatcher = ReactSharedInternals.H;
  19420. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  19421. try {
  19422. return updateReducer(basicStateReducer);
  19423. } finally {
  19424. ReactSharedInternals.H = prevDispatcher;
  19425. }
  19426. },
  19427. useDebugValue: function() {
  19428. currentHookNameInDev = "useDebugValue";
  19429. warnInvalidHookAccess();
  19430. updateHookTypesDev();
  19431. },
  19432. useDeferredValue: function(value, initialValue) {
  19433. currentHookNameInDev = "useDeferredValue";
  19434. warnInvalidHookAccess();
  19435. updateHookTypesDev();
  19436. return updateDeferredValue(value, initialValue);
  19437. },
  19438. useTransition: function() {
  19439. currentHookNameInDev = "useTransition";
  19440. warnInvalidHookAccess();
  19441. updateHookTypesDev();
  19442. return updateTransition();
  19443. },
  19444. useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
  19445. currentHookNameInDev = "useSyncExternalStore";
  19446. warnInvalidHookAccess();
  19447. updateHookTypesDev();
  19448. return updateSyncExternalStore(
  19449. subscribe,
  19450. getSnapshot,
  19451. getServerSnapshot
  19452. );
  19453. },
  19454. useId: function() {
  19455. currentHookNameInDev = "useId";
  19456. warnInvalidHookAccess();
  19457. updateHookTypesDev();
  19458. return updateWorkInProgressHook().memoizedState;
  19459. },
  19460. useFormState: function(action) {
  19461. currentHookNameInDev = "useFormState";
  19462. warnInvalidHookAccess();
  19463. updateHookTypesDev();
  19464. return updateActionState(action);
  19465. },
  19466. useActionState: function(action) {
  19467. currentHookNameInDev = "useActionState";
  19468. warnInvalidHookAccess();
  19469. updateHookTypesDev();
  19470. return updateActionState(action);
  19471. },
  19472. useOptimistic: function(passthrough, reducer) {
  19473. currentHookNameInDev = "useOptimistic";
  19474. warnInvalidHookAccess();
  19475. updateHookTypesDev();
  19476. return updateOptimistic(passthrough, reducer);
  19477. },
  19478. useMemoCache: function(size) {
  19479. warnInvalidHookAccess();
  19480. return useMemoCache(size);
  19481. },
  19482. useHostTransitionStatus,
  19483. useCacheRefresh: function() {
  19484. currentHookNameInDev = "useCacheRefresh";
  19485. updateHookTypesDev();
  19486. return updateWorkInProgressHook().memoizedState;
  19487. },
  19488. useEffectEvent: function(callback) {
  19489. currentHookNameInDev = "useEffectEvent";
  19490. warnInvalidHookAccess();
  19491. updateHookTypesDev();
  19492. return updateEvent(callback);
  19493. }
  19494. };
  19495. InvalidNestedHooksDispatcherOnRerenderInDEV = {
  19496. readContext: function(context) {
  19497. warnInvalidContextAccess();
  19498. return readContext(context);
  19499. },
  19500. use: function(usable) {
  19501. warnInvalidHookAccess();
  19502. return use(usable);
  19503. },
  19504. useCallback: function(callback, deps) {
  19505. currentHookNameInDev = "useCallback";
  19506. warnInvalidHookAccess();
  19507. updateHookTypesDev();
  19508. return updateCallback(callback, deps);
  19509. },
  19510. useContext: function(context) {
  19511. currentHookNameInDev = "useContext";
  19512. warnInvalidHookAccess();
  19513. updateHookTypesDev();
  19514. return readContext(context);
  19515. },
  19516. useEffect: function(create, deps) {
  19517. currentHookNameInDev = "useEffect";
  19518. warnInvalidHookAccess();
  19519. updateHookTypesDev();
  19520. updateEffectImpl(2048, Passive, create, deps);
  19521. },
  19522. useImperativeHandle: function(ref, create, deps) {
  19523. currentHookNameInDev = "useImperativeHandle";
  19524. warnInvalidHookAccess();
  19525. updateHookTypesDev();
  19526. return updateImperativeHandle(ref, create, deps);
  19527. },
  19528. useInsertionEffect: function(create, deps) {
  19529. currentHookNameInDev = "useInsertionEffect";
  19530. warnInvalidHookAccess();
  19531. updateHookTypesDev();
  19532. return updateEffectImpl(4, Insertion, create, deps);
  19533. },
  19534. useLayoutEffect: function(create, deps) {
  19535. currentHookNameInDev = "useLayoutEffect";
  19536. warnInvalidHookAccess();
  19537. updateHookTypesDev();
  19538. return updateEffectImpl(4, Layout, create, deps);
  19539. },
  19540. useMemo: function(create, deps) {
  19541. currentHookNameInDev = "useMemo";
  19542. warnInvalidHookAccess();
  19543. updateHookTypesDev();
  19544. var prevDispatcher = ReactSharedInternals.H;
  19545. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  19546. try {
  19547. return updateMemo(create, deps);
  19548. } finally {
  19549. ReactSharedInternals.H = prevDispatcher;
  19550. }
  19551. },
  19552. useReducer: function(reducer, initialArg, init) {
  19553. currentHookNameInDev = "useReducer";
  19554. warnInvalidHookAccess();
  19555. updateHookTypesDev();
  19556. var prevDispatcher = ReactSharedInternals.H;
  19557. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  19558. try {
  19559. return rerenderReducer(reducer, initialArg, init);
  19560. } finally {
  19561. ReactSharedInternals.H = prevDispatcher;
  19562. }
  19563. },
  19564. useRef: function() {
  19565. currentHookNameInDev = "useRef";
  19566. warnInvalidHookAccess();
  19567. updateHookTypesDev();
  19568. return updateWorkInProgressHook().memoizedState;
  19569. },
  19570. useState: function() {
  19571. currentHookNameInDev = "useState";
  19572. warnInvalidHookAccess();
  19573. updateHookTypesDev();
  19574. var prevDispatcher = ReactSharedInternals.H;
  19575. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  19576. try {
  19577. return rerenderReducer(basicStateReducer);
  19578. } finally {
  19579. ReactSharedInternals.H = prevDispatcher;
  19580. }
  19581. },
  19582. useDebugValue: function() {
  19583. currentHookNameInDev = "useDebugValue";
  19584. warnInvalidHookAccess();
  19585. updateHookTypesDev();
  19586. },
  19587. useDeferredValue: function(value, initialValue) {
  19588. currentHookNameInDev = "useDeferredValue";
  19589. warnInvalidHookAccess();
  19590. updateHookTypesDev();
  19591. return rerenderDeferredValue(value, initialValue);
  19592. },
  19593. useTransition: function() {
  19594. currentHookNameInDev = "useTransition";
  19595. warnInvalidHookAccess();
  19596. updateHookTypesDev();
  19597. return rerenderTransition();
  19598. },
  19599. useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
  19600. currentHookNameInDev = "useSyncExternalStore";
  19601. warnInvalidHookAccess();
  19602. updateHookTypesDev();
  19603. return updateSyncExternalStore(
  19604. subscribe,
  19605. getSnapshot,
  19606. getServerSnapshot
  19607. );
  19608. },
  19609. useId: function() {
  19610. currentHookNameInDev = "useId";
  19611. warnInvalidHookAccess();
  19612. updateHookTypesDev();
  19613. return updateWorkInProgressHook().memoizedState;
  19614. },
  19615. useFormState: function(action) {
  19616. currentHookNameInDev = "useFormState";
  19617. warnInvalidHookAccess();
  19618. updateHookTypesDev();
  19619. return rerenderActionState(action);
  19620. },
  19621. useActionState: function(action) {
  19622. currentHookNameInDev = "useActionState";
  19623. warnInvalidHookAccess();
  19624. updateHookTypesDev();
  19625. return rerenderActionState(action);
  19626. },
  19627. useOptimistic: function(passthrough, reducer) {
  19628. currentHookNameInDev = "useOptimistic";
  19629. warnInvalidHookAccess();
  19630. updateHookTypesDev();
  19631. return rerenderOptimistic(passthrough, reducer);
  19632. },
  19633. useMemoCache: function(size) {
  19634. warnInvalidHookAccess();
  19635. return useMemoCache(size);
  19636. },
  19637. useHostTransitionStatus,
  19638. useCacheRefresh: function() {
  19639. currentHookNameInDev = "useCacheRefresh";
  19640. updateHookTypesDev();
  19641. return updateWorkInProgressHook().memoizedState;
  19642. },
  19643. useEffectEvent: function(callback) {
  19644. currentHookNameInDev = "useEffectEvent";
  19645. warnInvalidHookAccess();
  19646. updateHookTypesDev();
  19647. return updateEvent(callback);
  19648. }
  19649. };
  19650. var fakeInternalInstance = {};
  19651. var didWarnAboutStateAssignmentForComponent = /* @__PURE__ */ new Set();
  19652. var didWarnAboutUninitializedState = /* @__PURE__ */ new Set();
  19653. var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = /* @__PURE__ */ new Set();
  19654. var didWarnAboutLegacyLifecyclesAndDerivedState = /* @__PURE__ */ new Set();
  19655. var didWarnAboutDirectlyAssigningPropsToState = /* @__PURE__ */ new Set();
  19656. var didWarnAboutUndefinedDerivedState = /* @__PURE__ */ new Set();
  19657. var didWarnAboutContextTypes$1 = /* @__PURE__ */ new Set();
  19658. var didWarnAboutChildContextTypes = /* @__PURE__ */ new Set();
  19659. var didWarnAboutInvalidateContextType = /* @__PURE__ */ new Set();
  19660. var didWarnOnInvalidCallback = /* @__PURE__ */ new Set();
  19661. Object.freeze(fakeInternalInstance);
  19662. var classComponentUpdater = {
  19663. enqueueSetState: function(inst, payload, callback) {
  19664. inst = inst._reactInternals;
  19665. var lane = requestUpdateLane(inst), update = createUpdate(lane);
  19666. update.payload = payload;
  19667. void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
  19668. payload = enqueueUpdate(inst, update, lane);
  19669. null !== payload && (startUpdateTimerByLane(lane, "this.setState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
  19670. },
  19671. enqueueReplaceState: function(inst, payload, callback) {
  19672. inst = inst._reactInternals;
  19673. var lane = requestUpdateLane(inst), update = createUpdate(lane);
  19674. update.tag = ReplaceState;
  19675. update.payload = payload;
  19676. void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
  19677. payload = enqueueUpdate(inst, update, lane);
  19678. null !== payload && (startUpdateTimerByLane(lane, "this.replaceState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
  19679. },
  19680. enqueueForceUpdate: function(inst, callback) {
  19681. inst = inst._reactInternals;
  19682. var lane = requestUpdateLane(inst), update = createUpdate(lane);
  19683. update.tag = ForceUpdate;
  19684. void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
  19685. callback = enqueueUpdate(inst, update, lane);
  19686. null !== callback && (startUpdateTimerByLane(lane, "this.forceUpdate()", inst), scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
  19687. }
  19688. }, componentName = null, errorBoundaryName = null, SelectiveHydrationException = Error(
  19689. "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
  19690. ), didReceiveUpdate = false;
  19691. var didWarnAboutBadClass = {};
  19692. var didWarnAboutContextTypeOnFunctionComponent = {};
  19693. var didWarnAboutContextTypes = {};
  19694. var didWarnAboutGetDerivedStateOnFunctionComponent = {};
  19695. var didWarnAboutReassigningProps = false;
  19696. var didWarnAboutRevealOrder = {};
  19697. var didWarnAboutTailOptions = {};
  19698. var SUSPENDED_MARKER = {
  19699. dehydrated: null,
  19700. treeContext: null,
  19701. retryLane: 0,
  19702. hydrationErrors: null
  19703. }, hasWarnedAboutUsingNoValuePropOnContextProvider = false, didWarnAboutUndefinedSnapshotBeforeUpdate = null;
  19704. didWarnAboutUndefinedSnapshotBeforeUpdate = /* @__PURE__ */ new Set();
  19705. var offscreenSubtreeIsHidden = false, offscreenSubtreeWasHidden = false, needsFormReset = false, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, inProgressLanes = null, inProgressRoot = null, hostParent = null, hostParentIsContainer = false, currentHoistableRoot = null, inHydratedSubtree = false, suspenseyCommitFlag = 8192, DefaultAsyncDispatcher = {
  19706. getCacheForType: function(resourceType) {
  19707. var cache = readContext(CacheContext), cacheForType = cache.data.get(resourceType);
  19708. void 0 === cacheForType && (cacheForType = resourceType(), cache.data.set(resourceType, cacheForType));
  19709. return cacheForType;
  19710. },
  19711. cacheSignal: function() {
  19712. return readContext(CacheContext).controller.signal;
  19713. },
  19714. getOwner: function() {
  19715. return current;
  19716. }
  19717. };
  19718. if ("function" === typeof Symbol && Symbol.for) {
  19719. var symbolFor = Symbol.for;
  19720. symbolFor("selector.component");
  19721. symbolFor("selector.has_pseudo_class");
  19722. symbolFor("selector.role");
  19723. symbolFor("selector.test_id");
  19724. symbolFor("selector.text");
  19725. }
  19726. var commitHooks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, RenderContext = 2, CommitContext = 4, RootInProgress = 0, RootFatalErrored = 1, RootErrored = 2, RootSuspended = 3, RootSuspendedWithDelay = 4, RootSuspendedAtTheShell = 6, RootCompleted = 5, executionContext = NoContext, workInProgressRoot = null, workInProgress = null, workInProgressRootRenderLanes = 0, NotSuspended = 0, SuspendedOnError = 1, SuspendedOnData = 2, SuspendedOnImmediate = 3, SuspendedOnInstance = 4, SuspendedOnInstanceAndReadyToContinue = 5, SuspendedOnDeprecatedThrowPromise = 6, SuspendedAndReadyToContinue = 7, SuspendedOnHydration = 8, SuspendedOnAction = 9, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, workInProgressRootDidSkipSuspendedSiblings = false, workInProgressRootIsPrerendering = false, workInProgressRootDidAttachPingListener = false, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = false, globalMostRecentFallbackTime = 0, globalMostRecentTransitionTime = 0, FALLBACK_THROTTLE_MS = 300, workInProgressRootRenderTargetTime = Infinity, RENDER_TIMEOUT_MS = 500, workInProgressTransitions = null, workInProgressUpdateTask = null, legacyErrorBoundariesThatAlreadyFailed = null, IMMEDIATE_COMMIT = 0, ABORTED_VIEW_TRANSITION_COMMIT = 1, DELAYED_PASSIVE_COMMIT = 2, ANIMATION_STARTED_COMMIT = 3, NO_PENDING_EFFECTS = 0, PENDING_MUTATION_PHASE = 1, PENDING_LAYOUT_PHASE = 2, PENDING_AFTER_MUTATION_PHASE = 3, PENDING_SPAWNED_WORK = 4, PENDING_PASSIVE_PHASE = 5, pendingEffectsStatus = 0, pendingEffectsRoot = null, pendingFinishedWork = null, pendingEffectsLanes = 0, pendingEffectsRemainingLanes = 0, pendingEffectsRenderEndTime = -0, pendingPassiveTransitions = null, pendingRecoverableErrors = null, pendingSuspendedCommitReason = null, pendingDelayedCommitReason = IMMEDIATE_COMMIT, pendingSuspendedViewTransitionReason = null, NESTED_UPDATE_LIMIT = 50, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = false, didScheduleUpdateDuringPassiveEffects = false, NESTED_PASSIVE_UPDATE_LIMIT = 50, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = false, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = false;
  19727. var didWarnAboutUpdateInRenderForAnotherComponent = /* @__PURE__ */ new Set();
  19728. var fakeActCallbackNode$1 = {}, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = false, didScheduleMicrotask_act = false, mightHavePendingSyncWork = false, isFlushingWork = false, currentEventTransitionLane = 0, fakeActCallbackNode = {};
  19729. (function() {
  19730. for (var i = 0; i < simpleEventPluginEvents.length; i++) {
  19731. var eventName = simpleEventPluginEvents[i], domEventName = eventName.toLowerCase();
  19732. eventName = eventName[0].toUpperCase() + eventName.slice(1);
  19733. registerSimpleEvent(domEventName, "on" + eventName);
  19734. }
  19735. registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
  19736. registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
  19737. registerSimpleEvent(ANIMATION_START, "onAnimationStart");
  19738. registerSimpleEvent("dblclick", "onDoubleClick");
  19739. registerSimpleEvent("focusin", "onFocus");
  19740. registerSimpleEvent("focusout", "onBlur");
  19741. registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
  19742. registerSimpleEvent(TRANSITION_START, "onTransitionStart");
  19743. registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
  19744. registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
  19745. })();
  19746. registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
  19747. registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
  19748. registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
  19749. registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
  19750. registerTwoPhaseEvent(
  19751. "onChange",
  19752. "change click focusin focusout input keydown keyup selectionchange".split(
  19753. " "
  19754. )
  19755. );
  19756. registerTwoPhaseEvent(
  19757. "onSelect",
  19758. "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
  19759. " "
  19760. )
  19761. );
  19762. registerTwoPhaseEvent("onBeforeInput", [
  19763. "compositionend",
  19764. "keypress",
  19765. "textInput",
  19766. "paste"
  19767. ]);
  19768. registerTwoPhaseEvent(
  19769. "onCompositionEnd",
  19770. "compositionend focusout keydown keypress keyup mousedown".split(" ")
  19771. );
  19772. registerTwoPhaseEvent(
  19773. "onCompositionStart",
  19774. "compositionstart focusout keydown keypress keyup mousedown".split(" ")
  19775. );
  19776. registerTwoPhaseEvent(
  19777. "onCompositionUpdate",
  19778. "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
  19779. );
  19780. var mediaEventTypes = "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(
  19781. " "
  19782. ), nonDelegatedEvents = new Set(
  19783. "beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mediaEventTypes)
  19784. ), listeningMarker = "_reactListening" + Math.random().toString(36).slice(2), didWarnControlledToUncontrolled = false, didWarnUncontrolledToControlled = false, didWarnFormActionType = false, didWarnFormActionName = false, didWarnFormActionTarget = false, didWarnFormActionMethod = false, didWarnPopoverTargetObject = false;
  19785. var didWarnForNewBooleanPropsWithEmptyValue = {};
  19786. var NORMALIZE_NEWLINES_REGEX = /\r\n?/g, NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g, xlinkNamespace = "http://www.w3.org/1999/xlink", xmlNamespace = "http://www.w3.org/XML/1998/namespace", EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", ACTIVITY_START_DATA = "&", ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", SUSPENSE_QUEUED_START_DATA = "$~", SUSPENSE_FALLBACK_START_DATA = "$!", PREAMBLE_CONTRIBUTION_HTML = "html", PREAMBLE_CONTRIBUTION_BODY = "body", PREAMBLE_CONTRIBUTION_HEAD = "head", FORM_STATE_IS_MATCHING = "F!", FORM_STATE_IS_NOT_MATCHING = "F", DOCUMENT_READY_STATE_LOADING = "loading", STYLE = "style", HostContextNamespaceNone = 0, HostContextNamespaceSvg = 1, HostContextNamespaceMath = 2, eventsEnabled = null, selectionInformation = null, warnedUnknownTags = { dialog: true, webview: true }, currentPopstateTransitionEvent = null, schedulerEvent = void 0, scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0, cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0, noTimeout = -1, localPromise = "function" === typeof Promise ? Promise : void 0, scheduleMicrotask = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof localPromise ? function(callback) {
  19787. return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
  19788. } : scheduleTimeout, previousHydratableOnEnteringScopedSingleton = null, NotLoaded = 0, Loaded = 1, Errored = 2, Settled = 3, Inserted = 4, preloadPropsMap = /* @__PURE__ */ new Map(), preconnectsSet = /* @__PURE__ */ new Set(), previousDispatcher = ReactDOMSharedInternals.d;
  19789. ReactDOMSharedInternals.d = {
  19790. f: function() {
  19791. var previousWasRendering = previousDispatcher.f(), wasRendering = flushSyncWork$1();
  19792. return previousWasRendering || wasRendering;
  19793. },
  19794. r: function(form) {
  19795. var formInst = getInstanceFromNode(form);
  19796. null !== formInst && 5 === formInst.tag && "form" === formInst.type ? requestFormReset$1(formInst) : previousDispatcher.r(form);
  19797. },
  19798. D: function(href) {
  19799. previousDispatcher.D(href);
  19800. preconnectAs("dns-prefetch", href, null);
  19801. },
  19802. C: function(href, crossOrigin) {
  19803. previousDispatcher.C(href, crossOrigin);
  19804. preconnectAs("preconnect", href, crossOrigin);
  19805. },
  19806. L: function(href, as, options) {
  19807. previousDispatcher.L(href, as, options);
  19808. var ownerDocument = globalDocument;
  19809. if (ownerDocument && href && as) {
  19810. var preloadSelector = 'link[rel="preload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"]';
  19811. "image" === as ? options && options.imageSrcSet ? (preloadSelector += '[imagesrcset="' + escapeSelectorAttributeValueInsideDoubleQuotes(
  19812. options.imageSrcSet
  19813. ) + '"]', "string" === typeof options.imageSizes && (preloadSelector += '[imagesizes="' + escapeSelectorAttributeValueInsideDoubleQuotes(
  19814. options.imageSizes
  19815. ) + '"]')) : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]' : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]';
  19816. var key = preloadSelector;
  19817. switch (as) {
  19818. case "style":
  19819. key = getStyleKey(href);
  19820. break;
  19821. case "script":
  19822. key = getScriptKey(href);
  19823. }
  19824. preloadPropsMap.has(key) || (href = assign(
  19825. {
  19826. rel: "preload",
  19827. href: "image" === as && options && options.imageSrcSet ? void 0 : href,
  19828. as
  19829. },
  19830. options
  19831. ), preloadPropsMap.set(key, href), null !== ownerDocument.querySelector(preloadSelector) || "style" === as && ownerDocument.querySelector(
  19832. getStylesheetSelectorFromKey(key)
  19833. ) || "script" === as && ownerDocument.querySelector(getScriptSelectorFromKey(key)) || (as = ownerDocument.createElement("link"), setInitialProperties(as, "link", href), markNodeAsHoistable(as), ownerDocument.head.appendChild(as)));
  19834. }
  19835. },
  19836. m: function(href, options) {
  19837. previousDispatcher.m(href, options);
  19838. var ownerDocument = globalDocument;
  19839. if (ownerDocument && href) {
  19840. var as = options && "string" === typeof options.as ? options.as : "script", preloadSelector = 'link[rel="modulepreload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"][href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]', key = preloadSelector;
  19841. switch (as) {
  19842. case "audioworklet":
  19843. case "paintworklet":
  19844. case "serviceworker":
  19845. case "sharedworker":
  19846. case "worker":
  19847. case "script":
  19848. key = getScriptKey(href);
  19849. }
  19850. if (!preloadPropsMap.has(key) && (href = assign({ rel: "modulepreload", href }, options), preloadPropsMap.set(key, href), null === ownerDocument.querySelector(preloadSelector))) {
  19851. switch (as) {
  19852. case "audioworklet":
  19853. case "paintworklet":
  19854. case "serviceworker":
  19855. case "sharedworker":
  19856. case "worker":
  19857. case "script":
  19858. if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
  19859. return;
  19860. }
  19861. as = ownerDocument.createElement("link");
  19862. setInitialProperties(as, "link", href);
  19863. markNodeAsHoistable(as);
  19864. ownerDocument.head.appendChild(as);
  19865. }
  19866. }
  19867. },
  19868. X: function(src, options) {
  19869. previousDispatcher.X(src, options);
  19870. var ownerDocument = globalDocument;
  19871. if (ownerDocument && src) {
  19872. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
  19873. resource || (resource = ownerDocument.querySelector(
  19874. getScriptSelectorFromKey(key)
  19875. ), resource || (src = assign({ src, async: true }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
  19876. type: "script",
  19877. instance: resource,
  19878. count: 1,
  19879. state: null
  19880. }, scripts.set(key, resource));
  19881. }
  19882. },
  19883. S: function(href, precedence, options) {
  19884. previousDispatcher.S(href, precedence, options);
  19885. var ownerDocument = globalDocument;
  19886. if (ownerDocument && href) {
  19887. var styles = getResourcesFromRoot(ownerDocument).hoistableStyles, key = getStyleKey(href);
  19888. precedence = precedence || "default";
  19889. var resource = styles.get(key);
  19890. if (!resource) {
  19891. var state = { loading: NotLoaded, preload: null };
  19892. if (resource = ownerDocument.querySelector(
  19893. getStylesheetSelectorFromKey(key)
  19894. ))
  19895. state.loading = Loaded | Inserted;
  19896. else {
  19897. href = assign(
  19898. {
  19899. rel: "stylesheet",
  19900. href,
  19901. "data-precedence": precedence
  19902. },
  19903. options
  19904. );
  19905. (options = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(href, options);
  19906. var link = resource = ownerDocument.createElement("link");
  19907. markNodeAsHoistable(link);
  19908. setInitialProperties(link, "link", href);
  19909. link._p = new Promise(function(resolve, reject) {
  19910. link.onload = resolve;
  19911. link.onerror = reject;
  19912. });
  19913. link.addEventListener("load", function() {
  19914. state.loading |= Loaded;
  19915. });
  19916. link.addEventListener("error", function() {
  19917. state.loading |= Errored;
  19918. });
  19919. state.loading |= Inserted;
  19920. insertStylesheet(resource, precedence, ownerDocument);
  19921. }
  19922. resource = {
  19923. type: "stylesheet",
  19924. instance: resource,
  19925. count: 1,
  19926. state
  19927. };
  19928. styles.set(key, resource);
  19929. }
  19930. }
  19931. },
  19932. M: function(src, options) {
  19933. previousDispatcher.M(src, options);
  19934. var ownerDocument = globalDocument;
  19935. if (ownerDocument && src) {
  19936. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
  19937. resource || (resource = ownerDocument.querySelector(
  19938. getScriptSelectorFromKey(key)
  19939. ), resource || (src = assign({ src, async: true, type: "module" }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
  19940. type: "script",
  19941. instance: resource,
  19942. count: 1,
  19943. state: null
  19944. }, scripts.set(key, resource));
  19945. }
  19946. }
  19947. };
  19948. var globalDocument = "undefined" === typeof document ? null : document, tagCaches = null, SUSPENSEY_STYLESHEET_TIMEOUT = 6e4, SUSPENSEY_IMAGE_TIMEOUT = 800, SUSPENSEY_IMAGE_TIME_ESTIMATE = 500, estimatedBytesWithinLimit = 0, LAST_PRECEDENCE = null, precedencesByRoot = null, NotPendingTransition = NotPending, HostTransitionContext = {
  19949. $$typeof: REACT_CONTEXT_TYPE,
  19950. Provider: null,
  19951. Consumer: null,
  19952. _currentValue: NotPendingTransition,
  19953. _currentValue2: NotPendingTransition,
  19954. _threadCount: 0
  19955. }, badgeFormat = "%c%s%c", badgeStyle = "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", resetStyle = "", pad = " ", bind = Function.prototype.bind;
  19956. var didWarnAboutNestedUpdates = false;
  19957. var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
  19958. overrideHookState = function(fiber, id, path, value) {
  19959. id = findHook(fiber, id);
  19960. null !== id && (path = copyWithSetImpl(id.memoizedState, path, 0, value), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
  19961. };
  19962. overrideHookStateDeletePath = function(fiber, id, path) {
  19963. id = findHook(fiber, id);
  19964. null !== id && (path = copyWithDeleteImpl(id.memoizedState, path, 0), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
  19965. };
  19966. overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
  19967. id = findHook(fiber, id);
  19968. null !== id && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
  19969. };
  19970. overrideProps = function(fiber, path, value) {
  19971. fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path, 0, value);
  19972. fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
  19973. path = enqueueConcurrentRenderForLane(fiber, 2);
  19974. null !== path && scheduleUpdateOnFiber(path, fiber, 2);
  19975. };
  19976. overridePropsDeletePath = function(fiber, path) {
  19977. fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path, 0);
  19978. fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
  19979. path = enqueueConcurrentRenderForLane(fiber, 2);
  19980. null !== path && scheduleUpdateOnFiber(path, fiber, 2);
  19981. };
  19982. overridePropsRenamePath = function(fiber, oldPath, newPath) {
  19983. fiber.pendingProps = copyWithRename(
  19984. fiber.memoizedProps,
  19985. oldPath,
  19986. newPath
  19987. );
  19988. fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
  19989. oldPath = enqueueConcurrentRenderForLane(fiber, 2);
  19990. null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2);
  19991. };
  19992. scheduleUpdate = function(fiber) {
  19993. var root2 = enqueueConcurrentRenderForLane(fiber, 2);
  19994. null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
  19995. };
  19996. scheduleRetry = function(fiber) {
  19997. var lane = claimNextRetryLane(), root2 = enqueueConcurrentRenderForLane(fiber, lane);
  19998. null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
  19999. };
  20000. setErrorHandler = function(newShouldErrorImpl) {
  20001. shouldErrorImpl = newShouldErrorImpl;
  20002. };
  20003. setSuspenseHandler = function(newShouldSuspendImpl) {
  20004. shouldSuspendImpl = newShouldSuspendImpl;
  20005. };
  20006. var _enabled = true, return_targetInst = null, hasScheduledReplayAttempt = false, queuedFocus = null, queuedDrag = null, queuedMouse = null, queuedPointers = /* @__PURE__ */ new Map(), queuedPointerCaptures = /* @__PURE__ */ new Map(), queuedExplicitHydrationTargets = [], discreteReplayableEvents = "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(
  20007. " "
  20008. ), lastScheduledReplayQueue = null;
  20009. ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(children) {
  20010. var root2 = this._internalRoot;
  20011. if (null === root2) throw Error("Cannot update an unmounted root.");
  20012. var args = arguments;
  20013. "function" === typeof args[1] ? console.error(
  20014. "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
  20015. ) : isValidContainer(args[1]) ? console.error(
  20016. "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."
  20017. ) : "undefined" !== typeof args[1] && console.error(
  20018. "You passed a second argument to root.render(...) but it only accepts one argument."
  20019. );
  20020. args = children;
  20021. var current2 = root2.current, lane = requestUpdateLane(current2);
  20022. updateContainerImpl(current2, lane, args, root2, null, null);
  20023. };
  20024. ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function() {
  20025. var args = arguments;
  20026. "function" === typeof args[0] && console.error(
  20027. "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
  20028. );
  20029. args = this._internalRoot;
  20030. if (null !== args) {
  20031. this._internalRoot = null;
  20032. var container = args.containerInfo;
  20033. (executionContext & (RenderContext | CommitContext)) !== NoContext && console.error(
  20034. "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."
  20035. );
  20036. updateContainerImpl(args.current, 2, null, args, null, null);
  20037. flushSyncWork$1();
  20038. container[internalContainerInstanceKey] = null;
  20039. }
  20040. };
  20041. ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function(target) {
  20042. if (target) {
  20043. var updatePriority = resolveUpdatePriority();
  20044. target = { blockedOn: null, target, priority: updatePriority };
  20045. for (var i = 0; i < queuedExplicitHydrationTargets.length && 0 !== updatePriority && updatePriority < queuedExplicitHydrationTargets[i].priority; i++) ;
  20046. queuedExplicitHydrationTargets.splice(i, 0, target);
  20047. 0 === i && attemptExplicitHydrationTarget(target);
  20048. }
  20049. };
  20050. (function() {
  20051. var isomorphicReactPackageVersion = React.version;
  20052. if ("19.2.4" !== isomorphicReactPackageVersion)
  20053. throw Error(
  20054. 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.4\nLearn more: https://react.dev/warnings/version-mismatch")
  20055. );
  20056. })();
  20057. "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
  20058. "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"
  20059. );
  20060. ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
  20061. var fiber = componentOrElement._reactInternals;
  20062. if (void 0 === fiber) {
  20063. if ("function" === typeof componentOrElement.render)
  20064. throw Error("Unable to find node on an unmounted component.");
  20065. componentOrElement = Object.keys(componentOrElement).join(",");
  20066. throw Error(
  20067. "Argument appears to not be a ReactComponent. Keys: " + componentOrElement
  20068. );
  20069. }
  20070. componentOrElement = findCurrentFiberUsingSlowPath(fiber);
  20071. componentOrElement = null !== componentOrElement ? findCurrentHostFiberImpl(componentOrElement) : null;
  20072. componentOrElement = null === componentOrElement ? null : componentOrElement.stateNode;
  20073. return componentOrElement;
  20074. };
  20075. if (!(function() {
  20076. var internals = {
  20077. bundleType: 1,
  20078. version: "19.2.4",
  20079. rendererPackageName: "react-dom",
  20080. currentDispatcherRef: ReactSharedInternals,
  20081. reconcilerVersion: "19.2.4"
  20082. };
  20083. internals.overrideHookState = overrideHookState;
  20084. internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
  20085. internals.overrideHookStateRenamePath = overrideHookStateRenamePath;
  20086. internals.overrideProps = overrideProps;
  20087. internals.overridePropsDeletePath = overridePropsDeletePath;
  20088. internals.overridePropsRenamePath = overridePropsRenamePath;
  20089. internals.scheduleUpdate = scheduleUpdate;
  20090. internals.scheduleRetry = scheduleRetry;
  20091. internals.setErrorHandler = setErrorHandler;
  20092. internals.setSuspenseHandler = setSuspenseHandler;
  20093. internals.scheduleRefresh = scheduleRefresh;
  20094. internals.scheduleRoot = scheduleRoot;
  20095. internals.setRefreshHandler = setRefreshHandler;
  20096. internals.getCurrentFiber = getCurrentFiberForDevTools;
  20097. return injectInternals(internals);
  20098. })() && canUseDOM && window.top === window.self && (-1 < navigator.userAgent.indexOf("Chrome") && -1 === navigator.userAgent.indexOf("Edge") || -1 < navigator.userAgent.indexOf("Firefox"))) {
  20099. var protocol = window.location.protocol;
  20100. /^(https?|file):$/.test(protocol) && console.info(
  20101. "%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools" + ("file:" === protocol ? "\nYou might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq" : ""),
  20102. "font-weight:bold"
  20103. );
  20104. }
  20105. exports.createRoot = function(container, options) {
  20106. if (!isValidContainer(container))
  20107. throw Error("Target container is not a DOM element.");
  20108. warnIfReactDOMContainerInDEV(container);
  20109. var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError;
  20110. null !== options && void 0 !== options && (options.hydrate ? console.warn(
  20111. "hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."
  20112. ) : "object" === typeof options && null !== options && options.$$typeof === REACT_ELEMENT_TYPE && console.error(
  20113. "You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"
  20114. ), true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError));
  20115. options = createFiberRoot(
  20116. container,
  20117. 1,
  20118. false,
  20119. null,
  20120. null,
  20121. isStrictMode,
  20122. identifierPrefix,
  20123. null,
  20124. onUncaughtError,
  20125. onCaughtError,
  20126. onRecoverableError,
  20127. defaultOnDefaultTransitionIndicator
  20128. );
  20129. container[internalContainerInstanceKey] = options.current;
  20130. listenToAllSupportedEvents(container);
  20131. return new ReactDOMRoot(options);
  20132. };
  20133. exports.hydrateRoot = function(container, initialChildren, options) {
  20134. if (!isValidContainer(container))
  20135. throw Error("Target container is not a DOM element.");
  20136. warnIfReactDOMContainerInDEV(container);
  20137. void 0 === initialChildren && console.error(
  20138. "Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)"
  20139. );
  20140. var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError, formState = null;
  20141. null !== options && void 0 !== options && (true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError), void 0 !== options.formState && (formState = options.formState));
  20142. initialChildren = createFiberRoot(
  20143. container,
  20144. 1,
  20145. true,
  20146. initialChildren,
  20147. null != options ? options : null,
  20148. isStrictMode,
  20149. identifierPrefix,
  20150. formState,
  20151. onUncaughtError,
  20152. onCaughtError,
  20153. onRecoverableError,
  20154. defaultOnDefaultTransitionIndicator
  20155. );
  20156. initialChildren.context = getContextForSubtree(null);
  20157. options = initialChildren.current;
  20158. isStrictMode = requestUpdateLane(options);
  20159. isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
  20160. identifierPrefix = createUpdate(isStrictMode);
  20161. identifierPrefix.callback = null;
  20162. enqueueUpdate(options, identifierPrefix, isStrictMode);
  20163. startUpdateTimerByLane(isStrictMode, "hydrateRoot()", null);
  20164. options = isStrictMode;
  20165. initialChildren.current.lanes = options;
  20166. markRootUpdated$1(initialChildren, options);
  20167. ensureRootIsScheduled(initialChildren);
  20168. container[internalContainerInstanceKey] = initialChildren.current;
  20169. listenToAllSupportedEvents(container);
  20170. return new ReactDOMHydrationRoot(initialChildren);
  20171. };
  20172. exports.version = "19.2.4";
  20173. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  20174. })();
  20175. }
  20176. });
  20177. // node_modules/react-dom/client.js
  20178. var require_client = __commonJS({
  20179. "node_modules/react-dom/client.js"(exports, module) {
  20180. if (false) {
  20181. checkDCE();
  20182. module.exports = null;
  20183. } else {
  20184. module.exports = require_react_dom_client_development();
  20185. }
  20186. }
  20187. });
  20188. export default require_client();
  20189. /*! Bundled license information:
  20190. scheduler/cjs/scheduler.development.js:
  20191. (**
  20192. * @license React
  20193. * scheduler.development.js
  20194. *
  20195. * Copyright (c) Meta Platforms, Inc. and affiliates.
  20196. *
  20197. * This source code is licensed under the MIT license found in the
  20198. * LICENSE file in the root directory of this source tree.
  20199. *)
  20200. react-dom/cjs/react-dom-client.development.js:
  20201. (**
  20202. * @license React
  20203. * react-dom-client.development.js
  20204. *
  20205. * Copyright (c) Meta Platforms, Inc. and affiliates.
  20206. *
  20207. * This source code is licensed under the MIT license found in the
  20208. * LICENSE file in the root directory of this source tree.
  20209. *)
  20210. */
  20211. //# sourceMappingURL=react-dom_client.js.map