react-dom-server.bun.development.js 346 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605
  1. /**
  2. * @license React
  3. * react-dom-server.bun.development.js
  4. *
  5. * Copyright (c) Meta Platforms, Inc. and affiliates.
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE file in the root directory of this source tree.
  9. */
  10. "use strict";
  11. var React = require("react"),
  12. ReactDOM = require("react-dom"),
  13. REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  14. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  15. REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
  16. REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
  17. REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
  18. REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
  19. REACT_CONTEXT_TYPE = Symbol.for("react.context"),
  20. REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
  21. REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
  22. REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
  23. REACT_MEMO_TYPE = Symbol.for("react.memo"),
  24. REACT_LAZY_TYPE = Symbol.for("react.lazy"),
  25. REACT_SCOPE_TYPE = Symbol.for("react.scope"),
  26. REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
  27. REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
  28. REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
  29. REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
  30. MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
  31. function getIteratorFn(maybeIterable) {
  32. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  33. maybeIterable =
  34. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  35. maybeIterable["@@iterator"];
  36. return "function" === typeof maybeIterable ? maybeIterable : null;
  37. }
  38. var isArrayImpl = Array.isArray,
  39. jsxPropsParents = new WeakMap(),
  40. jsxChildrenParents = new WeakMap();
  41. function objectName(object) {
  42. object = Object.prototype.toString.call(object);
  43. return object.slice(8, object.length - 1);
  44. }
  45. function describeKeyForErrorMessage(key) {
  46. var encodedKey = JSON.stringify(key);
  47. return '"' + key + '"' === encodedKey ? key : encodedKey;
  48. }
  49. function describeValueForErrorMessage(value) {
  50. switch (typeof value) {
  51. case "string":
  52. return JSON.stringify(
  53. 10 >= value.length ? value : value.slice(0, 10) + "..."
  54. );
  55. case "object":
  56. if (isArrayImpl(value)) return "[...]";
  57. if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)
  58. return "client";
  59. value = objectName(value);
  60. return "Object" === value ? "{...}" : value;
  61. case "function":
  62. return value.$$typeof === CLIENT_REFERENCE_TAG
  63. ? "client"
  64. : (value = value.displayName || value.name)
  65. ? "function " + value
  66. : "function";
  67. default:
  68. return String(value);
  69. }
  70. }
  71. function describeElementType(type) {
  72. if ("string" === typeof type) return type;
  73. switch (type) {
  74. case REACT_SUSPENSE_TYPE:
  75. return "Suspense";
  76. case REACT_SUSPENSE_LIST_TYPE:
  77. return "SuspenseList";
  78. }
  79. if ("object" === typeof type)
  80. switch (type.$$typeof) {
  81. case REACT_FORWARD_REF_TYPE:
  82. return describeElementType(type.render);
  83. case REACT_MEMO_TYPE:
  84. return describeElementType(type.type);
  85. case REACT_LAZY_TYPE:
  86. var payload = type._payload;
  87. type = type._init;
  88. try {
  89. return describeElementType(type(payload));
  90. } catch (x) {}
  91. }
  92. return "";
  93. }
  94. var CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference");
  95. function describeObjectForErrorMessage(objectOrArray, expandedName) {
  96. var objKind = objectName(objectOrArray);
  97. if ("Object" !== objKind && "Array" !== objKind) return objKind;
  98. var start = -1,
  99. length = 0;
  100. if (isArrayImpl(objectOrArray))
  101. if (jsxChildrenParents.has(objectOrArray)) {
  102. var type = jsxChildrenParents.get(objectOrArray);
  103. objKind = "<" + describeElementType(type) + ">";
  104. for (var i = 0; i < objectOrArray.length; i++) {
  105. var value = objectOrArray[i];
  106. value =
  107. "string" === typeof value
  108. ? value
  109. : "object" === typeof value && null !== value
  110. ? "{" + describeObjectForErrorMessage(value) + "}"
  111. : "{" + describeValueForErrorMessage(value) + "}";
  112. "" + i === expandedName
  113. ? ((start = objKind.length),
  114. (length = value.length),
  115. (objKind += value))
  116. : (objKind =
  117. 15 > value.length && 40 > objKind.length + value.length
  118. ? objKind + value
  119. : objKind + "{...}");
  120. }
  121. objKind += "</" + describeElementType(type) + ">";
  122. } else {
  123. objKind = "[";
  124. for (type = 0; type < objectOrArray.length; type++)
  125. 0 < type && (objKind += ", "),
  126. (i = objectOrArray[type]),
  127. (i =
  128. "object" === typeof i && null !== i
  129. ? describeObjectForErrorMessage(i)
  130. : describeValueForErrorMessage(i)),
  131. "" + type === expandedName
  132. ? ((start = objKind.length), (length = i.length), (objKind += i))
  133. : (objKind =
  134. 10 > i.length && 40 > objKind.length + i.length
  135. ? objKind + i
  136. : objKind + "...");
  137. objKind += "]";
  138. }
  139. else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)
  140. objKind = "<" + describeElementType(objectOrArray.type) + "/>";
  141. else {
  142. if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client";
  143. if (jsxPropsParents.has(objectOrArray)) {
  144. objKind = jsxPropsParents.get(objectOrArray);
  145. objKind = "<" + (describeElementType(objKind) || "...");
  146. type = Object.keys(objectOrArray);
  147. for (i = 0; i < type.length; i++) {
  148. objKind += " ";
  149. value = type[i];
  150. objKind += describeKeyForErrorMessage(value) + "=";
  151. var _value2 = objectOrArray[value];
  152. var _substr2 =
  153. value === expandedName &&
  154. "object" === typeof _value2 &&
  155. null !== _value2
  156. ? describeObjectForErrorMessage(_value2)
  157. : describeValueForErrorMessage(_value2);
  158. "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}");
  159. value === expandedName
  160. ? ((start = objKind.length),
  161. (length = _substr2.length),
  162. (objKind += _substr2))
  163. : (objKind =
  164. 10 > _substr2.length && 40 > objKind.length + _substr2.length
  165. ? objKind + _substr2
  166. : objKind + "...");
  167. }
  168. objKind += ">";
  169. } else {
  170. objKind = "{";
  171. type = Object.keys(objectOrArray);
  172. for (i = 0; i < type.length; i++)
  173. 0 < i && (objKind += ", "),
  174. (value = type[i]),
  175. (objKind += describeKeyForErrorMessage(value) + ": "),
  176. (_value2 = objectOrArray[value]),
  177. (_value2 =
  178. "object" === typeof _value2 && null !== _value2
  179. ? describeObjectForErrorMessage(_value2)
  180. : describeValueForErrorMessage(_value2)),
  181. value === expandedName
  182. ? ((start = objKind.length),
  183. (length = _value2.length),
  184. (objKind += _value2))
  185. : (objKind =
  186. 10 > _value2.length && 40 > objKind.length + _value2.length
  187. ? objKind + _value2
  188. : objKind + "...");
  189. objKind += "}";
  190. }
  191. }
  192. return void 0 === expandedName
  193. ? objKind
  194. : -1 < start && 0 < length
  195. ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)),
  196. "\n " + objKind + "\n " + objectOrArray)
  197. : "\n " + objKind;
  198. }
  199. var scheduleMicrotask = queueMicrotask;
  200. function flushBuffered(destination) {
  201. "function" === typeof destination.flush && destination.flush();
  202. }
  203. function writeChunk(destination, chunk) {
  204. 0 !== chunk.length && destination.write(chunk);
  205. }
  206. function byteLengthOfChunk(chunk) {
  207. return Buffer.byteLength(chunk, "utf8");
  208. }
  209. function closeWithError(destination, error) {
  210. "function" === typeof destination.error
  211. ? destination.error(error)
  212. : destination.close();
  213. }
  214. var assign = Object.assign;
  215. function typeName(value) {
  216. return (
  217. ("function" === typeof Symbol &&
  218. Symbol.toStringTag &&
  219. value[Symbol.toStringTag]) ||
  220. value.constructor.name ||
  221. "Object"
  222. );
  223. }
  224. function willCoercionThrow(value) {
  225. try {
  226. return testStringCoercion(value), !1;
  227. } catch (e) {
  228. return !0;
  229. }
  230. }
  231. function testStringCoercion(value) {
  232. return "" + value;
  233. }
  234. function checkAttributeStringCoercion(value, attributeName) {
  235. if (willCoercionThrow(value))
  236. return (
  237. console.error(
  238. "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
  239. attributeName,
  240. typeName(value)
  241. ),
  242. testStringCoercion(value)
  243. );
  244. }
  245. function checkCSSPropertyStringCoercion(value, propName) {
  246. if (willCoercionThrow(value))
  247. return (
  248. console.error(
  249. "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
  250. propName,
  251. typeName(value)
  252. ),
  253. testStringCoercion(value)
  254. );
  255. }
  256. function checkHtmlStringCoercion(value) {
  257. if (willCoercionThrow(value))
  258. return (
  259. console.error(
  260. "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",
  261. typeName(value)
  262. ),
  263. testStringCoercion(value)
  264. );
  265. }
  266. var hasOwnProperty = Object.prototype.hasOwnProperty,
  267. VALID_ATTRIBUTE_NAME_REGEX = RegExp(
  268. "^[: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]*$"
  269. ),
  270. illegalAttributeNameCache = {},
  271. validatedAttributeNameCache = {};
  272. function isAttributeNameSafe(attributeName) {
  273. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
  274. return !0;
  275. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
  276. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
  277. return (validatedAttributeNameCache[attributeName] = !0);
  278. illegalAttributeNameCache[attributeName] = !0;
  279. console.error("Invalid attribute name: `%s`", attributeName);
  280. return !1;
  281. }
  282. var unitlessNumbers = new Set(
  283. "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(
  284. " "
  285. )
  286. ),
  287. aliases = new Map([
  288. ["acceptCharset", "accept-charset"],
  289. ["htmlFor", "for"],
  290. ["httpEquiv", "http-equiv"],
  291. ["crossOrigin", "crossorigin"],
  292. ["accentHeight", "accent-height"],
  293. ["alignmentBaseline", "alignment-baseline"],
  294. ["arabicForm", "arabic-form"],
  295. ["baselineShift", "baseline-shift"],
  296. ["capHeight", "cap-height"],
  297. ["clipPath", "clip-path"],
  298. ["clipRule", "clip-rule"],
  299. ["colorInterpolation", "color-interpolation"],
  300. ["colorInterpolationFilters", "color-interpolation-filters"],
  301. ["colorProfile", "color-profile"],
  302. ["colorRendering", "color-rendering"],
  303. ["dominantBaseline", "dominant-baseline"],
  304. ["enableBackground", "enable-background"],
  305. ["fillOpacity", "fill-opacity"],
  306. ["fillRule", "fill-rule"],
  307. ["floodColor", "flood-color"],
  308. ["floodOpacity", "flood-opacity"],
  309. ["fontFamily", "font-family"],
  310. ["fontSize", "font-size"],
  311. ["fontSizeAdjust", "font-size-adjust"],
  312. ["fontStretch", "font-stretch"],
  313. ["fontStyle", "font-style"],
  314. ["fontVariant", "font-variant"],
  315. ["fontWeight", "font-weight"],
  316. ["glyphName", "glyph-name"],
  317. ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
  318. ["glyphOrientationVertical", "glyph-orientation-vertical"],
  319. ["horizAdvX", "horiz-adv-x"],
  320. ["horizOriginX", "horiz-origin-x"],
  321. ["imageRendering", "image-rendering"],
  322. ["letterSpacing", "letter-spacing"],
  323. ["lightingColor", "lighting-color"],
  324. ["markerEnd", "marker-end"],
  325. ["markerMid", "marker-mid"],
  326. ["markerStart", "marker-start"],
  327. ["overlinePosition", "overline-position"],
  328. ["overlineThickness", "overline-thickness"],
  329. ["paintOrder", "paint-order"],
  330. ["panose-1", "panose-1"],
  331. ["pointerEvents", "pointer-events"],
  332. ["renderingIntent", "rendering-intent"],
  333. ["shapeRendering", "shape-rendering"],
  334. ["stopColor", "stop-color"],
  335. ["stopOpacity", "stop-opacity"],
  336. ["strikethroughPosition", "strikethrough-position"],
  337. ["strikethroughThickness", "strikethrough-thickness"],
  338. ["strokeDasharray", "stroke-dasharray"],
  339. ["strokeDashoffset", "stroke-dashoffset"],
  340. ["strokeLinecap", "stroke-linecap"],
  341. ["strokeLinejoin", "stroke-linejoin"],
  342. ["strokeMiterlimit", "stroke-miterlimit"],
  343. ["strokeOpacity", "stroke-opacity"],
  344. ["strokeWidth", "stroke-width"],
  345. ["textAnchor", "text-anchor"],
  346. ["textDecoration", "text-decoration"],
  347. ["textRendering", "text-rendering"],
  348. ["transformOrigin", "transform-origin"],
  349. ["underlinePosition", "underline-position"],
  350. ["underlineThickness", "underline-thickness"],
  351. ["unicodeBidi", "unicode-bidi"],
  352. ["unicodeRange", "unicode-range"],
  353. ["unitsPerEm", "units-per-em"],
  354. ["vAlphabetic", "v-alphabetic"],
  355. ["vHanging", "v-hanging"],
  356. ["vIdeographic", "v-ideographic"],
  357. ["vMathematical", "v-mathematical"],
  358. ["vectorEffect", "vector-effect"],
  359. ["vertAdvY", "vert-adv-y"],
  360. ["vertOriginX", "vert-origin-x"],
  361. ["vertOriginY", "vert-origin-y"],
  362. ["wordSpacing", "word-spacing"],
  363. ["writingMode", "writing-mode"],
  364. ["xmlnsXlink", "xmlns:xlink"],
  365. ["xHeight", "x-height"]
  366. ]),
  367. hasReadOnlyValue = {
  368. button: !0,
  369. checkbox: !0,
  370. image: !0,
  371. hidden: !0,
  372. radio: !0,
  373. reset: !0,
  374. submit: !0
  375. };
  376. function checkControlledValueProps(tagName, props) {
  377. hasReadOnlyValue[props.type] ||
  378. props.onChange ||
  379. props.onInput ||
  380. props.readOnly ||
  381. props.disabled ||
  382. null == props.value ||
  383. ("select" === tagName
  384. ? console.error(
  385. "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`."
  386. )
  387. : console.error(
  388. "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`."
  389. ));
  390. props.onChange ||
  391. props.readOnly ||
  392. props.disabled ||
  393. null == props.checked ||
  394. console.error(
  395. "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`."
  396. );
  397. }
  398. var ariaProperties = {
  399. "aria-current": 0,
  400. "aria-description": 0,
  401. "aria-details": 0,
  402. "aria-disabled": 0,
  403. "aria-hidden": 0,
  404. "aria-invalid": 0,
  405. "aria-keyshortcuts": 0,
  406. "aria-label": 0,
  407. "aria-roledescription": 0,
  408. "aria-autocomplete": 0,
  409. "aria-checked": 0,
  410. "aria-expanded": 0,
  411. "aria-haspopup": 0,
  412. "aria-level": 0,
  413. "aria-modal": 0,
  414. "aria-multiline": 0,
  415. "aria-multiselectable": 0,
  416. "aria-orientation": 0,
  417. "aria-placeholder": 0,
  418. "aria-pressed": 0,
  419. "aria-readonly": 0,
  420. "aria-required": 0,
  421. "aria-selected": 0,
  422. "aria-sort": 0,
  423. "aria-valuemax": 0,
  424. "aria-valuemin": 0,
  425. "aria-valuenow": 0,
  426. "aria-valuetext": 0,
  427. "aria-atomic": 0,
  428. "aria-busy": 0,
  429. "aria-live": 0,
  430. "aria-relevant": 0,
  431. "aria-dropeffect": 0,
  432. "aria-grabbed": 0,
  433. "aria-activedescendant": 0,
  434. "aria-colcount": 0,
  435. "aria-colindex": 0,
  436. "aria-colspan": 0,
  437. "aria-controls": 0,
  438. "aria-describedby": 0,
  439. "aria-errormessage": 0,
  440. "aria-flowto": 0,
  441. "aria-labelledby": 0,
  442. "aria-owns": 0,
  443. "aria-posinset": 0,
  444. "aria-rowcount": 0,
  445. "aria-rowindex": 0,
  446. "aria-rowspan": 0,
  447. "aria-setsize": 0,
  448. "aria-braillelabel": 0,
  449. "aria-brailleroledescription": 0,
  450. "aria-colindextext": 0,
  451. "aria-rowindextext": 0
  452. },
  453. warnedProperties$1 = {},
  454. rARIA$1 = RegExp(
  455. "^(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]*$"
  456. ),
  457. rARIACamel$1 = RegExp(
  458. "^(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]*$"
  459. );
  460. function validateProperty$1(tagName, name) {
  461. if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name])
  462. return !0;
  463. if (rARIACamel$1.test(name)) {
  464. tagName = "aria-" + name.slice(4).toLowerCase();
  465. tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
  466. if (null == tagName)
  467. return (
  468. console.error(
  469. "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
  470. name
  471. ),
  472. (warnedProperties$1[name] = !0)
  473. );
  474. if (name !== tagName)
  475. return (
  476. console.error(
  477. "Invalid ARIA attribute `%s`. Did you mean `%s`?",
  478. name,
  479. tagName
  480. ),
  481. (warnedProperties$1[name] = !0)
  482. );
  483. }
  484. if (rARIA$1.test(name)) {
  485. tagName = name.toLowerCase();
  486. tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
  487. if (null == tagName) return (warnedProperties$1[name] = !0), !1;
  488. name !== tagName &&
  489. (console.error(
  490. "Unknown ARIA attribute `%s`. Did you mean `%s`?",
  491. name,
  492. tagName
  493. ),
  494. (warnedProperties$1[name] = !0));
  495. }
  496. return !0;
  497. }
  498. function validateProperties$2(type, props) {
  499. var invalidProps = [],
  500. key;
  501. for (key in props) validateProperty$1(type, key) || invalidProps.push(key);
  502. props = invalidProps
  503. .map(function (prop) {
  504. return "`" + prop + "`";
  505. })
  506. .join(", ");
  507. 1 === invalidProps.length
  508. ? console.error(
  509. "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
  510. props,
  511. type
  512. )
  513. : 1 < invalidProps.length &&
  514. console.error(
  515. "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
  516. props,
  517. type
  518. );
  519. }
  520. var didWarnValueNull = !1,
  521. possibleStandardNames = {
  522. accept: "accept",
  523. acceptcharset: "acceptCharset",
  524. "accept-charset": "acceptCharset",
  525. accesskey: "accessKey",
  526. action: "action",
  527. allowfullscreen: "allowFullScreen",
  528. alt: "alt",
  529. as: "as",
  530. async: "async",
  531. autocapitalize: "autoCapitalize",
  532. autocomplete: "autoComplete",
  533. autocorrect: "autoCorrect",
  534. autofocus: "autoFocus",
  535. autoplay: "autoPlay",
  536. autosave: "autoSave",
  537. capture: "capture",
  538. cellpadding: "cellPadding",
  539. cellspacing: "cellSpacing",
  540. challenge: "challenge",
  541. charset: "charSet",
  542. checked: "checked",
  543. children: "children",
  544. cite: "cite",
  545. class: "className",
  546. classid: "classID",
  547. classname: "className",
  548. cols: "cols",
  549. colspan: "colSpan",
  550. content: "content",
  551. contenteditable: "contentEditable",
  552. contextmenu: "contextMenu",
  553. controls: "controls",
  554. controlslist: "controlsList",
  555. coords: "coords",
  556. crossorigin: "crossOrigin",
  557. dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
  558. data: "data",
  559. datetime: "dateTime",
  560. default: "default",
  561. defaultchecked: "defaultChecked",
  562. defaultvalue: "defaultValue",
  563. defer: "defer",
  564. dir: "dir",
  565. disabled: "disabled",
  566. disablepictureinpicture: "disablePictureInPicture",
  567. disableremoteplayback: "disableRemotePlayback",
  568. download: "download",
  569. draggable: "draggable",
  570. enctype: "encType",
  571. enterkeyhint: "enterKeyHint",
  572. fetchpriority: "fetchPriority",
  573. for: "htmlFor",
  574. form: "form",
  575. formmethod: "formMethod",
  576. formaction: "formAction",
  577. formenctype: "formEncType",
  578. formnovalidate: "formNoValidate",
  579. formtarget: "formTarget",
  580. frameborder: "frameBorder",
  581. headers: "headers",
  582. height: "height",
  583. hidden: "hidden",
  584. high: "high",
  585. href: "href",
  586. hreflang: "hrefLang",
  587. htmlfor: "htmlFor",
  588. httpequiv: "httpEquiv",
  589. "http-equiv": "httpEquiv",
  590. icon: "icon",
  591. id: "id",
  592. imagesizes: "imageSizes",
  593. imagesrcset: "imageSrcSet",
  594. inert: "inert",
  595. innerhtml: "innerHTML",
  596. inputmode: "inputMode",
  597. integrity: "integrity",
  598. is: "is",
  599. itemid: "itemID",
  600. itemprop: "itemProp",
  601. itemref: "itemRef",
  602. itemscope: "itemScope",
  603. itemtype: "itemType",
  604. keyparams: "keyParams",
  605. keytype: "keyType",
  606. kind: "kind",
  607. label: "label",
  608. lang: "lang",
  609. list: "list",
  610. loop: "loop",
  611. low: "low",
  612. manifest: "manifest",
  613. marginwidth: "marginWidth",
  614. marginheight: "marginHeight",
  615. max: "max",
  616. maxlength: "maxLength",
  617. media: "media",
  618. mediagroup: "mediaGroup",
  619. method: "method",
  620. min: "min",
  621. minlength: "minLength",
  622. multiple: "multiple",
  623. muted: "muted",
  624. name: "name",
  625. nomodule: "noModule",
  626. nonce: "nonce",
  627. novalidate: "noValidate",
  628. open: "open",
  629. optimum: "optimum",
  630. pattern: "pattern",
  631. placeholder: "placeholder",
  632. playsinline: "playsInline",
  633. poster: "poster",
  634. preload: "preload",
  635. profile: "profile",
  636. radiogroup: "radioGroup",
  637. readonly: "readOnly",
  638. referrerpolicy: "referrerPolicy",
  639. rel: "rel",
  640. required: "required",
  641. reversed: "reversed",
  642. role: "role",
  643. rows: "rows",
  644. rowspan: "rowSpan",
  645. sandbox: "sandbox",
  646. scope: "scope",
  647. scoped: "scoped",
  648. scrolling: "scrolling",
  649. seamless: "seamless",
  650. selected: "selected",
  651. shape: "shape",
  652. size: "size",
  653. sizes: "sizes",
  654. span: "span",
  655. spellcheck: "spellCheck",
  656. src: "src",
  657. srcdoc: "srcDoc",
  658. srclang: "srcLang",
  659. srcset: "srcSet",
  660. start: "start",
  661. step: "step",
  662. style: "style",
  663. summary: "summary",
  664. tabindex: "tabIndex",
  665. target: "target",
  666. title: "title",
  667. type: "type",
  668. usemap: "useMap",
  669. value: "value",
  670. width: "width",
  671. wmode: "wmode",
  672. wrap: "wrap",
  673. about: "about",
  674. accentheight: "accentHeight",
  675. "accent-height": "accentHeight",
  676. accumulate: "accumulate",
  677. additive: "additive",
  678. alignmentbaseline: "alignmentBaseline",
  679. "alignment-baseline": "alignmentBaseline",
  680. allowreorder: "allowReorder",
  681. alphabetic: "alphabetic",
  682. amplitude: "amplitude",
  683. arabicform: "arabicForm",
  684. "arabic-form": "arabicForm",
  685. ascent: "ascent",
  686. attributename: "attributeName",
  687. attributetype: "attributeType",
  688. autoreverse: "autoReverse",
  689. azimuth: "azimuth",
  690. basefrequency: "baseFrequency",
  691. baselineshift: "baselineShift",
  692. "baseline-shift": "baselineShift",
  693. baseprofile: "baseProfile",
  694. bbox: "bbox",
  695. begin: "begin",
  696. bias: "bias",
  697. by: "by",
  698. calcmode: "calcMode",
  699. capheight: "capHeight",
  700. "cap-height": "capHeight",
  701. clip: "clip",
  702. clippath: "clipPath",
  703. "clip-path": "clipPath",
  704. clippathunits: "clipPathUnits",
  705. cliprule: "clipRule",
  706. "clip-rule": "clipRule",
  707. color: "color",
  708. colorinterpolation: "colorInterpolation",
  709. "color-interpolation": "colorInterpolation",
  710. colorinterpolationfilters: "colorInterpolationFilters",
  711. "color-interpolation-filters": "colorInterpolationFilters",
  712. colorprofile: "colorProfile",
  713. "color-profile": "colorProfile",
  714. colorrendering: "colorRendering",
  715. "color-rendering": "colorRendering",
  716. contentscripttype: "contentScriptType",
  717. contentstyletype: "contentStyleType",
  718. cursor: "cursor",
  719. cx: "cx",
  720. cy: "cy",
  721. d: "d",
  722. datatype: "datatype",
  723. decelerate: "decelerate",
  724. descent: "descent",
  725. diffuseconstant: "diffuseConstant",
  726. direction: "direction",
  727. display: "display",
  728. divisor: "divisor",
  729. dominantbaseline: "dominantBaseline",
  730. "dominant-baseline": "dominantBaseline",
  731. dur: "dur",
  732. dx: "dx",
  733. dy: "dy",
  734. edgemode: "edgeMode",
  735. elevation: "elevation",
  736. enablebackground: "enableBackground",
  737. "enable-background": "enableBackground",
  738. end: "end",
  739. exponent: "exponent",
  740. externalresourcesrequired: "externalResourcesRequired",
  741. fill: "fill",
  742. fillopacity: "fillOpacity",
  743. "fill-opacity": "fillOpacity",
  744. fillrule: "fillRule",
  745. "fill-rule": "fillRule",
  746. filter: "filter",
  747. filterres: "filterRes",
  748. filterunits: "filterUnits",
  749. floodopacity: "floodOpacity",
  750. "flood-opacity": "floodOpacity",
  751. floodcolor: "floodColor",
  752. "flood-color": "floodColor",
  753. focusable: "focusable",
  754. fontfamily: "fontFamily",
  755. "font-family": "fontFamily",
  756. fontsize: "fontSize",
  757. "font-size": "fontSize",
  758. fontsizeadjust: "fontSizeAdjust",
  759. "font-size-adjust": "fontSizeAdjust",
  760. fontstretch: "fontStretch",
  761. "font-stretch": "fontStretch",
  762. fontstyle: "fontStyle",
  763. "font-style": "fontStyle",
  764. fontvariant: "fontVariant",
  765. "font-variant": "fontVariant",
  766. fontweight: "fontWeight",
  767. "font-weight": "fontWeight",
  768. format: "format",
  769. from: "from",
  770. fx: "fx",
  771. fy: "fy",
  772. g1: "g1",
  773. g2: "g2",
  774. glyphname: "glyphName",
  775. "glyph-name": "glyphName",
  776. glyphorientationhorizontal: "glyphOrientationHorizontal",
  777. "glyph-orientation-horizontal": "glyphOrientationHorizontal",
  778. glyphorientationvertical: "glyphOrientationVertical",
  779. "glyph-orientation-vertical": "glyphOrientationVertical",
  780. glyphref: "glyphRef",
  781. gradienttransform: "gradientTransform",
  782. gradientunits: "gradientUnits",
  783. hanging: "hanging",
  784. horizadvx: "horizAdvX",
  785. "horiz-adv-x": "horizAdvX",
  786. horizoriginx: "horizOriginX",
  787. "horiz-origin-x": "horizOriginX",
  788. ideographic: "ideographic",
  789. imagerendering: "imageRendering",
  790. "image-rendering": "imageRendering",
  791. in2: "in2",
  792. in: "in",
  793. inlist: "inlist",
  794. intercept: "intercept",
  795. k1: "k1",
  796. k2: "k2",
  797. k3: "k3",
  798. k4: "k4",
  799. k: "k",
  800. kernelmatrix: "kernelMatrix",
  801. kernelunitlength: "kernelUnitLength",
  802. kerning: "kerning",
  803. keypoints: "keyPoints",
  804. keysplines: "keySplines",
  805. keytimes: "keyTimes",
  806. lengthadjust: "lengthAdjust",
  807. letterspacing: "letterSpacing",
  808. "letter-spacing": "letterSpacing",
  809. lightingcolor: "lightingColor",
  810. "lighting-color": "lightingColor",
  811. limitingconeangle: "limitingConeAngle",
  812. local: "local",
  813. markerend: "markerEnd",
  814. "marker-end": "markerEnd",
  815. markerheight: "markerHeight",
  816. markermid: "markerMid",
  817. "marker-mid": "markerMid",
  818. markerstart: "markerStart",
  819. "marker-start": "markerStart",
  820. markerunits: "markerUnits",
  821. markerwidth: "markerWidth",
  822. mask: "mask",
  823. maskcontentunits: "maskContentUnits",
  824. maskunits: "maskUnits",
  825. mathematical: "mathematical",
  826. mode: "mode",
  827. numoctaves: "numOctaves",
  828. offset: "offset",
  829. opacity: "opacity",
  830. operator: "operator",
  831. order: "order",
  832. orient: "orient",
  833. orientation: "orientation",
  834. origin: "origin",
  835. overflow: "overflow",
  836. overlineposition: "overlinePosition",
  837. "overline-position": "overlinePosition",
  838. overlinethickness: "overlineThickness",
  839. "overline-thickness": "overlineThickness",
  840. paintorder: "paintOrder",
  841. "paint-order": "paintOrder",
  842. panose1: "panose1",
  843. "panose-1": "panose1",
  844. pathlength: "pathLength",
  845. patterncontentunits: "patternContentUnits",
  846. patterntransform: "patternTransform",
  847. patternunits: "patternUnits",
  848. pointerevents: "pointerEvents",
  849. "pointer-events": "pointerEvents",
  850. points: "points",
  851. pointsatx: "pointsAtX",
  852. pointsaty: "pointsAtY",
  853. pointsatz: "pointsAtZ",
  854. popover: "popover",
  855. popovertarget: "popoverTarget",
  856. popovertargetaction: "popoverTargetAction",
  857. prefix: "prefix",
  858. preservealpha: "preserveAlpha",
  859. preserveaspectratio: "preserveAspectRatio",
  860. primitiveunits: "primitiveUnits",
  861. property: "property",
  862. r: "r",
  863. radius: "radius",
  864. refx: "refX",
  865. refy: "refY",
  866. renderingintent: "renderingIntent",
  867. "rendering-intent": "renderingIntent",
  868. repeatcount: "repeatCount",
  869. repeatdur: "repeatDur",
  870. requiredextensions: "requiredExtensions",
  871. requiredfeatures: "requiredFeatures",
  872. resource: "resource",
  873. restart: "restart",
  874. result: "result",
  875. results: "results",
  876. rotate: "rotate",
  877. rx: "rx",
  878. ry: "ry",
  879. scale: "scale",
  880. security: "security",
  881. seed: "seed",
  882. shaperendering: "shapeRendering",
  883. "shape-rendering": "shapeRendering",
  884. slope: "slope",
  885. spacing: "spacing",
  886. specularconstant: "specularConstant",
  887. specularexponent: "specularExponent",
  888. speed: "speed",
  889. spreadmethod: "spreadMethod",
  890. startoffset: "startOffset",
  891. stddeviation: "stdDeviation",
  892. stemh: "stemh",
  893. stemv: "stemv",
  894. stitchtiles: "stitchTiles",
  895. stopcolor: "stopColor",
  896. "stop-color": "stopColor",
  897. stopopacity: "stopOpacity",
  898. "stop-opacity": "stopOpacity",
  899. strikethroughposition: "strikethroughPosition",
  900. "strikethrough-position": "strikethroughPosition",
  901. strikethroughthickness: "strikethroughThickness",
  902. "strikethrough-thickness": "strikethroughThickness",
  903. string: "string",
  904. stroke: "stroke",
  905. strokedasharray: "strokeDasharray",
  906. "stroke-dasharray": "strokeDasharray",
  907. strokedashoffset: "strokeDashoffset",
  908. "stroke-dashoffset": "strokeDashoffset",
  909. strokelinecap: "strokeLinecap",
  910. "stroke-linecap": "strokeLinecap",
  911. strokelinejoin: "strokeLinejoin",
  912. "stroke-linejoin": "strokeLinejoin",
  913. strokemiterlimit: "strokeMiterlimit",
  914. "stroke-miterlimit": "strokeMiterlimit",
  915. strokewidth: "strokeWidth",
  916. "stroke-width": "strokeWidth",
  917. strokeopacity: "strokeOpacity",
  918. "stroke-opacity": "strokeOpacity",
  919. suppresscontenteditablewarning: "suppressContentEditableWarning",
  920. suppresshydrationwarning: "suppressHydrationWarning",
  921. surfacescale: "surfaceScale",
  922. systemlanguage: "systemLanguage",
  923. tablevalues: "tableValues",
  924. targetx: "targetX",
  925. targety: "targetY",
  926. textanchor: "textAnchor",
  927. "text-anchor": "textAnchor",
  928. textdecoration: "textDecoration",
  929. "text-decoration": "textDecoration",
  930. textlength: "textLength",
  931. textrendering: "textRendering",
  932. "text-rendering": "textRendering",
  933. to: "to",
  934. transform: "transform",
  935. transformorigin: "transformOrigin",
  936. "transform-origin": "transformOrigin",
  937. typeof: "typeof",
  938. u1: "u1",
  939. u2: "u2",
  940. underlineposition: "underlinePosition",
  941. "underline-position": "underlinePosition",
  942. underlinethickness: "underlineThickness",
  943. "underline-thickness": "underlineThickness",
  944. unicode: "unicode",
  945. unicodebidi: "unicodeBidi",
  946. "unicode-bidi": "unicodeBidi",
  947. unicoderange: "unicodeRange",
  948. "unicode-range": "unicodeRange",
  949. unitsperem: "unitsPerEm",
  950. "units-per-em": "unitsPerEm",
  951. unselectable: "unselectable",
  952. valphabetic: "vAlphabetic",
  953. "v-alphabetic": "vAlphabetic",
  954. values: "values",
  955. vectoreffect: "vectorEffect",
  956. "vector-effect": "vectorEffect",
  957. version: "version",
  958. vertadvy: "vertAdvY",
  959. "vert-adv-y": "vertAdvY",
  960. vertoriginx: "vertOriginX",
  961. "vert-origin-x": "vertOriginX",
  962. vertoriginy: "vertOriginY",
  963. "vert-origin-y": "vertOriginY",
  964. vhanging: "vHanging",
  965. "v-hanging": "vHanging",
  966. videographic: "vIdeographic",
  967. "v-ideographic": "vIdeographic",
  968. viewbox: "viewBox",
  969. viewtarget: "viewTarget",
  970. visibility: "visibility",
  971. vmathematical: "vMathematical",
  972. "v-mathematical": "vMathematical",
  973. vocab: "vocab",
  974. widths: "widths",
  975. wordspacing: "wordSpacing",
  976. "word-spacing": "wordSpacing",
  977. writingmode: "writingMode",
  978. "writing-mode": "writingMode",
  979. x1: "x1",
  980. x2: "x2",
  981. x: "x",
  982. xchannelselector: "xChannelSelector",
  983. xheight: "xHeight",
  984. "x-height": "xHeight",
  985. xlinkactuate: "xlinkActuate",
  986. "xlink:actuate": "xlinkActuate",
  987. xlinkarcrole: "xlinkArcrole",
  988. "xlink:arcrole": "xlinkArcrole",
  989. xlinkhref: "xlinkHref",
  990. "xlink:href": "xlinkHref",
  991. xlinkrole: "xlinkRole",
  992. "xlink:role": "xlinkRole",
  993. xlinkshow: "xlinkShow",
  994. "xlink:show": "xlinkShow",
  995. xlinktitle: "xlinkTitle",
  996. "xlink:title": "xlinkTitle",
  997. xlinktype: "xlinkType",
  998. "xlink:type": "xlinkType",
  999. xmlbase: "xmlBase",
  1000. "xml:base": "xmlBase",
  1001. xmllang: "xmlLang",
  1002. "xml:lang": "xmlLang",
  1003. xmlns: "xmlns",
  1004. "xml:space": "xmlSpace",
  1005. xmlnsxlink: "xmlnsXlink",
  1006. "xmlns:xlink": "xmlnsXlink",
  1007. xmlspace: "xmlSpace",
  1008. y1: "y1",
  1009. y2: "y2",
  1010. y: "y",
  1011. ychannelselector: "yChannelSelector",
  1012. z: "z",
  1013. zoomandpan: "zoomAndPan"
  1014. },
  1015. warnedProperties = {},
  1016. EVENT_NAME_REGEX = /^on./,
  1017. INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/,
  1018. rARIA = RegExp(
  1019. "^(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]*$"
  1020. ),
  1021. rARIACamel = RegExp(
  1022. "^(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]*$"
  1023. );
  1024. function validateProperty(tagName, name, value, eventRegistry) {
  1025. if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])
  1026. return !0;
  1027. var lowerCasedName = name.toLowerCase();
  1028. if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName)
  1029. return (
  1030. console.error(
  1031. "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."
  1032. ),
  1033. (warnedProperties[name] = !0)
  1034. );
  1035. if (
  1036. "function" === typeof value &&
  1037. (("form" === tagName && "action" === name) ||
  1038. ("input" === tagName && "formAction" === name) ||
  1039. ("button" === tagName && "formAction" === name))
  1040. )
  1041. return !0;
  1042. if (null != eventRegistry) {
  1043. tagName = eventRegistry.possibleRegistrationNames;
  1044. if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))
  1045. return !0;
  1046. eventRegistry = tagName.hasOwnProperty(lowerCasedName)
  1047. ? tagName[lowerCasedName]
  1048. : null;
  1049. if (null != eventRegistry)
  1050. return (
  1051. console.error(
  1052. "Invalid event handler property `%s`. Did you mean `%s`?",
  1053. name,
  1054. eventRegistry
  1055. ),
  1056. (warnedProperties[name] = !0)
  1057. );
  1058. if (EVENT_NAME_REGEX.test(name))
  1059. return (
  1060. console.error(
  1061. "Unknown event handler property `%s`. It will be ignored.",
  1062. name
  1063. ),
  1064. (warnedProperties[name] = !0)
  1065. );
  1066. } else if (EVENT_NAME_REGEX.test(name))
  1067. return (
  1068. INVALID_EVENT_NAME_REGEX.test(name) &&
  1069. console.error(
  1070. "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
  1071. name
  1072. ),
  1073. (warnedProperties[name] = !0)
  1074. );
  1075. if (rARIA.test(name) || rARIACamel.test(name)) return !0;
  1076. if ("innerhtml" === lowerCasedName)
  1077. return (
  1078. console.error(
  1079. "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
  1080. ),
  1081. (warnedProperties[name] = !0)
  1082. );
  1083. if ("aria" === lowerCasedName)
  1084. return (
  1085. console.error(
  1086. "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
  1087. ),
  1088. (warnedProperties[name] = !0)
  1089. );
  1090. if (
  1091. "is" === lowerCasedName &&
  1092. null !== value &&
  1093. void 0 !== value &&
  1094. "string" !== typeof value
  1095. )
  1096. return (
  1097. console.error(
  1098. "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
  1099. typeof value
  1100. ),
  1101. (warnedProperties[name] = !0)
  1102. );
  1103. if ("number" === typeof value && isNaN(value))
  1104. return (
  1105. console.error(
  1106. "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
  1107. name
  1108. ),
  1109. (warnedProperties[name] = !0)
  1110. );
  1111. if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
  1112. if (
  1113. ((lowerCasedName = possibleStandardNames[lowerCasedName]),
  1114. lowerCasedName !== name)
  1115. )
  1116. return (
  1117. console.error(
  1118. "Invalid DOM property `%s`. Did you mean `%s`?",
  1119. name,
  1120. lowerCasedName
  1121. ),
  1122. (warnedProperties[name] = !0)
  1123. );
  1124. } else if (name !== lowerCasedName)
  1125. return (
  1126. console.error(
  1127. "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.",
  1128. name,
  1129. lowerCasedName
  1130. ),
  1131. (warnedProperties[name] = !0)
  1132. );
  1133. switch (name) {
  1134. case "dangerouslySetInnerHTML":
  1135. case "children":
  1136. case "style":
  1137. case "suppressContentEditableWarning":
  1138. case "suppressHydrationWarning":
  1139. case "defaultValue":
  1140. case "defaultChecked":
  1141. case "innerHTML":
  1142. case "ref":
  1143. return !0;
  1144. case "innerText":
  1145. case "textContent":
  1146. return !0;
  1147. }
  1148. switch (typeof value) {
  1149. case "boolean":
  1150. switch (name) {
  1151. case "autoFocus":
  1152. case "checked":
  1153. case "multiple":
  1154. case "muted":
  1155. case "selected":
  1156. case "contentEditable":
  1157. case "spellCheck":
  1158. case "draggable":
  1159. case "value":
  1160. case "autoReverse":
  1161. case "externalResourcesRequired":
  1162. case "focusable":
  1163. case "preserveAlpha":
  1164. case "allowFullScreen":
  1165. case "async":
  1166. case "autoPlay":
  1167. case "controls":
  1168. case "default":
  1169. case "defer":
  1170. case "disabled":
  1171. case "disablePictureInPicture":
  1172. case "disableRemotePlayback":
  1173. case "formNoValidate":
  1174. case "hidden":
  1175. case "loop":
  1176. case "noModule":
  1177. case "noValidate":
  1178. case "open":
  1179. case "playsInline":
  1180. case "readOnly":
  1181. case "required":
  1182. case "reversed":
  1183. case "scoped":
  1184. case "seamless":
  1185. case "itemScope":
  1186. case "capture":
  1187. case "download":
  1188. case "inert":
  1189. return !0;
  1190. default:
  1191. lowerCasedName = name.toLowerCase().slice(0, 5);
  1192. if ("data-" === lowerCasedName || "aria-" === lowerCasedName)
  1193. return !0;
  1194. value
  1195. ? console.error(
  1196. '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()}.',
  1197. value,
  1198. name,
  1199. name,
  1200. value,
  1201. name
  1202. )
  1203. : console.error(
  1204. '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.',
  1205. value,
  1206. name,
  1207. name,
  1208. value,
  1209. name,
  1210. name,
  1211. name
  1212. );
  1213. return (warnedProperties[name] = !0);
  1214. }
  1215. case "function":
  1216. case "symbol":
  1217. return (warnedProperties[name] = !0), !1;
  1218. case "string":
  1219. if ("false" === value || "true" === value) {
  1220. switch (name) {
  1221. case "checked":
  1222. case "selected":
  1223. case "multiple":
  1224. case "muted":
  1225. case "allowFullScreen":
  1226. case "async":
  1227. case "autoPlay":
  1228. case "controls":
  1229. case "default":
  1230. case "defer":
  1231. case "disabled":
  1232. case "disablePictureInPicture":
  1233. case "disableRemotePlayback":
  1234. case "formNoValidate":
  1235. case "hidden":
  1236. case "loop":
  1237. case "noModule":
  1238. case "noValidate":
  1239. case "open":
  1240. case "playsInline":
  1241. case "readOnly":
  1242. case "required":
  1243. case "reversed":
  1244. case "scoped":
  1245. case "seamless":
  1246. case "itemScope":
  1247. case "inert":
  1248. break;
  1249. default:
  1250. return !0;
  1251. }
  1252. console.error(
  1253. "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
  1254. value,
  1255. name,
  1256. "false" === value
  1257. ? "The browser will interpret it as a truthy value."
  1258. : 'Although this works, it will not work as expected if you pass the string "false".',
  1259. name,
  1260. value
  1261. );
  1262. warnedProperties[name] = !0;
  1263. }
  1264. }
  1265. return !0;
  1266. }
  1267. function warnUnknownProperties(type, props, eventRegistry) {
  1268. var unknownProps = [],
  1269. key;
  1270. for (key in props)
  1271. validateProperty(type, key, props[key], eventRegistry) ||
  1272. unknownProps.push(key);
  1273. props = unknownProps
  1274. .map(function (prop) {
  1275. return "`" + prop + "`";
  1276. })
  1277. .join(", ");
  1278. 1 === unknownProps.length
  1279. ? console.error(
  1280. "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 ",
  1281. props,
  1282. type
  1283. )
  1284. : 1 < unknownProps.length &&
  1285. console.error(
  1286. "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 ",
  1287. props,
  1288. type
  1289. );
  1290. }
  1291. var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/,
  1292. msPattern$1 = /^-ms-/,
  1293. hyphenPattern = /-(.)/g,
  1294. badStyleValueWithSemicolonPattern = /;\s*$/,
  1295. warnedStyleNames = {},
  1296. warnedStyleValues = {},
  1297. warnedForNaNValue = !1,
  1298. warnedForInfinityValue = !1;
  1299. function camelize(string) {
  1300. return string.replace(hyphenPattern, function (_, character) {
  1301. return character.toUpperCase();
  1302. });
  1303. }
  1304. var matchHtmlRegExp = /["'&<>]/;
  1305. function escapeTextForBrowser(text) {
  1306. if (
  1307. "boolean" === typeof text ||
  1308. "number" === typeof text ||
  1309. "bigint" === typeof text
  1310. )
  1311. return "" + text;
  1312. checkHtmlStringCoercion(text);
  1313. text = "" + text;
  1314. var match = matchHtmlRegExp.exec(text);
  1315. if (match) {
  1316. var html = "",
  1317. index,
  1318. lastIndex = 0;
  1319. for (index = match.index; index < text.length; index++) {
  1320. switch (text.charCodeAt(index)) {
  1321. case 34:
  1322. match = "&quot;";
  1323. break;
  1324. case 38:
  1325. match = "&amp;";
  1326. break;
  1327. case 39:
  1328. match = "&#x27;";
  1329. break;
  1330. case 60:
  1331. match = "&lt;";
  1332. break;
  1333. case 62:
  1334. match = "&gt;";
  1335. break;
  1336. default:
  1337. continue;
  1338. }
  1339. lastIndex !== index && (html += text.slice(lastIndex, index));
  1340. lastIndex = index + 1;
  1341. html += match;
  1342. }
  1343. text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;
  1344. }
  1345. return text;
  1346. }
  1347. var uppercasePattern = /([A-Z])/g,
  1348. msPattern = /^ms-/,
  1349. isJavaScriptProtocol =
  1350. /^[\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;
  1351. function sanitizeURL(url) {
  1352. return isJavaScriptProtocol.test("" + url)
  1353. ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
  1354. : url;
  1355. }
  1356. var ReactSharedInternals =
  1357. React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  1358. ReactDOMSharedInternals =
  1359. ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  1360. NotPending = Object.freeze({
  1361. pending: !1,
  1362. data: null,
  1363. method: null,
  1364. action: null
  1365. }),
  1366. previousDispatcher = ReactDOMSharedInternals.d;
  1367. ReactDOMSharedInternals.d = {
  1368. f: previousDispatcher.f,
  1369. r: previousDispatcher.r,
  1370. D: prefetchDNS,
  1371. C: preconnect,
  1372. L: preload,
  1373. m: preloadModule,
  1374. X: preinitScript,
  1375. S: preinitStyle,
  1376. M: preinitModuleScript
  1377. };
  1378. var NothingSent = 0,
  1379. SentCompleteSegmentFunction = 1,
  1380. SentCompleteBoundaryFunction = 2,
  1381. SentClientRenderFunction = 4,
  1382. SentStyleInsertionFunction = 8,
  1383. SentCompletedShellId = 32,
  1384. SentMarkShellTime = 64,
  1385. EXISTS = null,
  1386. PRELOAD_NO_CREDS = [];
  1387. Object.freeze(PRELOAD_NO_CREDS);
  1388. var currentlyFlushingRenderState = null,
  1389. endInlineScript = "\x3c/script>";
  1390. function escapeEntireInlineScriptContent(scriptText) {
  1391. checkHtmlStringCoercion(scriptText);
  1392. return ("" + scriptText).replace(scriptRegex, scriptReplacer);
  1393. }
  1394. var scriptRegex = /(<\/|<)(s)(cript)/gi;
  1395. function scriptReplacer(match, prefix, s, suffix) {
  1396. return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
  1397. }
  1398. var didWarnForNewBooleanPropsWithEmptyValue;
  1399. didWarnForNewBooleanPropsWithEmptyValue = {};
  1400. function createRenderState(
  1401. resumableState,
  1402. nonce,
  1403. externalRuntimeConfig,
  1404. importMap,
  1405. onHeaders,
  1406. maxHeadersLength
  1407. ) {
  1408. externalRuntimeConfig =
  1409. "string" === typeof nonce ? nonce : nonce && nonce.script;
  1410. var inlineScriptWithNonce =
  1411. void 0 === externalRuntimeConfig
  1412. ? "<script"
  1413. : '<script nonce="' + escapeTextForBrowser(externalRuntimeConfig) + '"',
  1414. nonceStyle = "string" === typeof nonce ? void 0 : nonce && nonce.style,
  1415. inlineStyleWithNonce =
  1416. void 0 === nonceStyle
  1417. ? "<style"
  1418. : '<style nonce="' + escapeTextForBrowser(nonceStyle) + '"',
  1419. idPrefix = resumableState.idPrefix,
  1420. bootstrapChunks = [],
  1421. bootstrapScriptContent = resumableState.bootstrapScriptContent,
  1422. bootstrapScripts = resumableState.bootstrapScripts,
  1423. bootstrapModules = resumableState.bootstrapModules;
  1424. void 0 !== bootstrapScriptContent &&
  1425. (bootstrapChunks.push(inlineScriptWithNonce),
  1426. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  1427. bootstrapChunks.push(
  1428. endOfStartTag,
  1429. escapeEntireInlineScriptContent(bootstrapScriptContent),
  1430. endInlineScript
  1431. ));
  1432. bootstrapScriptContent = [];
  1433. void 0 !== importMap &&
  1434. (bootstrapScriptContent.push('<script type="importmap">'),
  1435. bootstrapScriptContent.push(
  1436. escapeEntireInlineScriptContent(JSON.stringify(importMap))
  1437. ),
  1438. bootstrapScriptContent.push("\x3c/script>"));
  1439. onHeaders &&
  1440. "number" === typeof maxHeadersLength &&
  1441. 0 >= maxHeadersLength &&
  1442. console.error(
  1443. "React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.",
  1444. 0 === maxHeadersLength ? "zero" : maxHeadersLength
  1445. );
  1446. importMap = onHeaders
  1447. ? {
  1448. preconnects: "",
  1449. fontPreloads: "",
  1450. highImagePreloads: "",
  1451. remainingCapacity:
  1452. 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
  1453. }
  1454. : null;
  1455. onHeaders = {
  1456. placeholderPrefix: idPrefix + "P:",
  1457. segmentPrefix: idPrefix + "S:",
  1458. boundaryPrefix: idPrefix + "B:",
  1459. startInlineScript: inlineScriptWithNonce,
  1460. startInlineStyle: inlineStyleWithNonce,
  1461. preamble: createPreambleState(),
  1462. externalRuntimeScript: null,
  1463. bootstrapChunks: bootstrapChunks,
  1464. importMapChunks: bootstrapScriptContent,
  1465. onHeaders: onHeaders,
  1466. headers: importMap,
  1467. resets: {
  1468. font: {},
  1469. dns: {},
  1470. connect: { default: {}, anonymous: {}, credentials: {} },
  1471. image: {},
  1472. style: {}
  1473. },
  1474. charsetChunks: [],
  1475. viewportChunks: [],
  1476. hoistableChunks: [],
  1477. preconnects: new Set(),
  1478. fontPreloads: new Set(),
  1479. highImagePreloads: new Set(),
  1480. styles: new Map(),
  1481. bootstrapScripts: new Set(),
  1482. scripts: new Set(),
  1483. bulkPreloads: new Set(),
  1484. preloads: {
  1485. images: new Map(),
  1486. stylesheets: new Map(),
  1487. scripts: new Map(),
  1488. moduleScripts: new Map()
  1489. },
  1490. nonce: { script: externalRuntimeConfig, style: nonceStyle },
  1491. hoistableState: null,
  1492. stylesToHoist: !1
  1493. };
  1494. if (void 0 !== bootstrapScripts)
  1495. for (importMap = 0; importMap < bootstrapScripts.length; importMap++)
  1496. (maxHeadersLength = bootstrapScripts[importMap]),
  1497. (inlineStyleWithNonce = nonceStyle = void 0),
  1498. (idPrefix = {
  1499. rel: "preload",
  1500. as: "script",
  1501. fetchPriority: "low",
  1502. nonce: nonce
  1503. }),
  1504. "string" === typeof maxHeadersLength
  1505. ? (idPrefix.href = inlineScriptWithNonce = maxHeadersLength)
  1506. : ((idPrefix.href = inlineScriptWithNonce = maxHeadersLength.src),
  1507. (idPrefix.integrity = inlineStyleWithNonce =
  1508. "string" === typeof maxHeadersLength.integrity
  1509. ? maxHeadersLength.integrity
  1510. : void 0),
  1511. (idPrefix.crossOrigin = nonceStyle =
  1512. "string" === typeof maxHeadersLength ||
  1513. null == maxHeadersLength.crossOrigin
  1514. ? void 0
  1515. : "use-credentials" === maxHeadersLength.crossOrigin
  1516. ? "use-credentials"
  1517. : "")),
  1518. preloadBootstrapScriptOrModule(
  1519. resumableState,
  1520. onHeaders,
  1521. inlineScriptWithNonce,
  1522. idPrefix
  1523. ),
  1524. bootstrapChunks.push(
  1525. '<script src="',
  1526. escapeTextForBrowser(inlineScriptWithNonce),
  1527. attributeEnd
  1528. ),
  1529. externalRuntimeConfig &&
  1530. bootstrapChunks.push(
  1531. ' nonce="',
  1532. escapeTextForBrowser(externalRuntimeConfig),
  1533. attributeEnd
  1534. ),
  1535. "string" === typeof inlineStyleWithNonce &&
  1536. bootstrapChunks.push(
  1537. ' integrity="',
  1538. escapeTextForBrowser(inlineStyleWithNonce),
  1539. attributeEnd
  1540. ),
  1541. "string" === typeof nonceStyle &&
  1542. bootstrapChunks.push(
  1543. ' crossorigin="',
  1544. escapeTextForBrowser(nonceStyle),
  1545. attributeEnd
  1546. ),
  1547. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  1548. bootstrapChunks.push(' async="">\x3c/script>');
  1549. if (void 0 !== bootstrapModules)
  1550. for (nonce = 0; nonce < bootstrapModules.length; nonce++)
  1551. (bootstrapScripts = bootstrapModules[nonce]),
  1552. (inlineScriptWithNonce = maxHeadersLength = void 0),
  1553. (nonceStyle = {
  1554. rel: "modulepreload",
  1555. fetchPriority: "low",
  1556. nonce: externalRuntimeConfig
  1557. }),
  1558. "string" === typeof bootstrapScripts
  1559. ? (nonceStyle.href = importMap = bootstrapScripts)
  1560. : ((nonceStyle.href = importMap = bootstrapScripts.src),
  1561. (nonceStyle.integrity = inlineScriptWithNonce =
  1562. "string" === typeof bootstrapScripts.integrity
  1563. ? bootstrapScripts.integrity
  1564. : void 0),
  1565. (nonceStyle.crossOrigin = maxHeadersLength =
  1566. "string" === typeof bootstrapScripts ||
  1567. null == bootstrapScripts.crossOrigin
  1568. ? void 0
  1569. : "use-credentials" === bootstrapScripts.crossOrigin
  1570. ? "use-credentials"
  1571. : "")),
  1572. preloadBootstrapScriptOrModule(
  1573. resumableState,
  1574. onHeaders,
  1575. importMap,
  1576. nonceStyle
  1577. ),
  1578. bootstrapChunks.push(
  1579. '<script type="module" src="',
  1580. escapeTextForBrowser(importMap),
  1581. attributeEnd
  1582. ),
  1583. externalRuntimeConfig &&
  1584. bootstrapChunks.push(
  1585. ' nonce="',
  1586. escapeTextForBrowser(externalRuntimeConfig),
  1587. attributeEnd
  1588. ),
  1589. "string" === typeof inlineScriptWithNonce &&
  1590. bootstrapChunks.push(
  1591. ' integrity="',
  1592. escapeTextForBrowser(inlineScriptWithNonce),
  1593. attributeEnd
  1594. ),
  1595. "string" === typeof maxHeadersLength &&
  1596. bootstrapChunks.push(
  1597. ' crossorigin="',
  1598. escapeTextForBrowser(maxHeadersLength),
  1599. attributeEnd
  1600. ),
  1601. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  1602. bootstrapChunks.push(' async="">\x3c/script>');
  1603. return onHeaders;
  1604. }
  1605. function createResumableState(
  1606. identifierPrefix,
  1607. externalRuntimeConfig,
  1608. bootstrapScriptContent,
  1609. bootstrapScripts,
  1610. bootstrapModules
  1611. ) {
  1612. return {
  1613. idPrefix: void 0 === identifierPrefix ? "" : identifierPrefix,
  1614. nextFormID: 0,
  1615. streamingFormat: 0,
  1616. bootstrapScriptContent: bootstrapScriptContent,
  1617. bootstrapScripts: bootstrapScripts,
  1618. bootstrapModules: bootstrapModules,
  1619. instructions: NothingSent,
  1620. hasBody: !1,
  1621. hasHtml: !1,
  1622. unknownResources: {},
  1623. dnsResources: {},
  1624. connectResources: { default: {}, anonymous: {}, credentials: {} },
  1625. imageResources: {},
  1626. styleResources: {},
  1627. scriptResources: {},
  1628. moduleUnknownResources: {},
  1629. moduleScriptResources: {}
  1630. };
  1631. }
  1632. function createPreambleState() {
  1633. return { htmlChunks: null, headChunks: null, bodyChunks: null };
  1634. }
  1635. var ROOT_HTML_MODE = 0,
  1636. HTML_HTML_MODE = 1,
  1637. HTML_MODE = 2,
  1638. HTML_HEAD_MODE = 3,
  1639. SVG_MODE = 4,
  1640. MATHML_MODE = 5,
  1641. HTML_TABLE_MODE = 6,
  1642. HTML_TABLE_BODY_MODE = 7,
  1643. HTML_TABLE_ROW_MODE = 8,
  1644. HTML_COLGROUP_MODE = 9;
  1645. function createFormatContext(
  1646. insertionMode,
  1647. selectedValue,
  1648. tagScope,
  1649. viewTransition
  1650. ) {
  1651. return {
  1652. insertionMode: insertionMode,
  1653. selectedValue: selectedValue,
  1654. tagScope: tagScope,
  1655. viewTransition: viewTransition
  1656. };
  1657. }
  1658. function createRootFormatContext(namespaceURI) {
  1659. return createFormatContext(
  1660. "http://www.w3.org/2000/svg" === namespaceURI
  1661. ? SVG_MODE
  1662. : "http://www.w3.org/1998/Math/MathML" === namespaceURI
  1663. ? MATHML_MODE
  1664. : ROOT_HTML_MODE,
  1665. null,
  1666. 0,
  1667. null
  1668. );
  1669. }
  1670. function getChildFormatContext(parentContext, type, props) {
  1671. var subtreeScope = parentContext.tagScope & -25;
  1672. switch (type) {
  1673. case "noscript":
  1674. return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);
  1675. case "select":
  1676. return createFormatContext(
  1677. HTML_MODE,
  1678. null != props.value ? props.value : props.defaultValue,
  1679. subtreeScope,
  1680. null
  1681. );
  1682. case "svg":
  1683. return createFormatContext(SVG_MODE, null, subtreeScope, null);
  1684. case "picture":
  1685. return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);
  1686. case "math":
  1687. return createFormatContext(MATHML_MODE, null, subtreeScope, null);
  1688. case "foreignObject":
  1689. return createFormatContext(HTML_MODE, null, subtreeScope, null);
  1690. case "table":
  1691. return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);
  1692. case "thead":
  1693. case "tbody":
  1694. case "tfoot":
  1695. return createFormatContext(
  1696. HTML_TABLE_BODY_MODE,
  1697. null,
  1698. subtreeScope,
  1699. null
  1700. );
  1701. case "colgroup":
  1702. return createFormatContext(HTML_COLGROUP_MODE, null, subtreeScope, null);
  1703. case "tr":
  1704. return createFormatContext(HTML_TABLE_ROW_MODE, null, subtreeScope, null);
  1705. case "head":
  1706. if (parentContext.insertionMode < HTML_MODE)
  1707. return createFormatContext(HTML_HEAD_MODE, null, subtreeScope, null);
  1708. break;
  1709. case "html":
  1710. if (parentContext.insertionMode === ROOT_HTML_MODE)
  1711. return createFormatContext(HTML_HTML_MODE, null, subtreeScope, null);
  1712. }
  1713. return parentContext.insertionMode >= HTML_TABLE_MODE ||
  1714. parentContext.insertionMode < HTML_MODE
  1715. ? createFormatContext(HTML_MODE, null, subtreeScope, null)
  1716. : parentContext.tagScope !== subtreeScope
  1717. ? createFormatContext(
  1718. parentContext.insertionMode,
  1719. parentContext.selectedValue,
  1720. subtreeScope,
  1721. null
  1722. )
  1723. : parentContext;
  1724. }
  1725. function getSuspenseViewTransition(parentViewTransition) {
  1726. return null === parentViewTransition
  1727. ? null
  1728. : {
  1729. update: parentViewTransition.update,
  1730. enter: "none",
  1731. exit: "none",
  1732. share: parentViewTransition.update,
  1733. name: parentViewTransition.autoName,
  1734. autoName: parentViewTransition.autoName,
  1735. nameIdx: 0
  1736. };
  1737. }
  1738. function getSuspenseFallbackFormatContext(resumableState, parentContext) {
  1739. parentContext.tagScope & 32 && (resumableState.instructions |= 128);
  1740. return createFormatContext(
  1741. parentContext.insertionMode,
  1742. parentContext.selectedValue,
  1743. parentContext.tagScope | 12,
  1744. getSuspenseViewTransition(parentContext.viewTransition)
  1745. );
  1746. }
  1747. function getSuspenseContentFormatContext(resumableState, parentContext) {
  1748. resumableState = getSuspenseViewTransition(parentContext.viewTransition);
  1749. var subtreeScope = parentContext.tagScope | 16;
  1750. null !== resumableState &&
  1751. "none" !== resumableState.share &&
  1752. (subtreeScope |= 64);
  1753. return createFormatContext(
  1754. parentContext.insertionMode,
  1755. parentContext.selectedValue,
  1756. subtreeScope,
  1757. resumableState
  1758. );
  1759. }
  1760. function pushTextInstance(target, text, renderState, textEmbedded) {
  1761. if ("" === text) return textEmbedded;
  1762. textEmbedded && target.push("\x3c!-- --\x3e");
  1763. target.push(escapeTextForBrowser(text));
  1764. return !0;
  1765. }
  1766. function pushSegmentFinale(target, renderState, lastPushedText, textEmbedded) {
  1767. lastPushedText && textEmbedded && target.push("\x3c!-- --\x3e");
  1768. }
  1769. var styleNameCache = new Map(),
  1770. styleAttributeStart = ' style="',
  1771. styleAssign = ":",
  1772. styleSeparator = ";";
  1773. function pushStyleAttribute(target, style) {
  1774. if ("object" !== typeof style)
  1775. throw Error(
  1776. "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
  1777. );
  1778. var isFirst = !0,
  1779. styleName;
  1780. for (styleName in style)
  1781. if (hasOwnProperty.call(style, styleName)) {
  1782. var styleValue = style[styleName];
  1783. if (
  1784. null != styleValue &&
  1785. "boolean" !== typeof styleValue &&
  1786. "" !== styleValue
  1787. ) {
  1788. if (0 === styleName.indexOf("--")) {
  1789. var nameChunk = escapeTextForBrowser(styleName);
  1790. checkCSSPropertyStringCoercion(styleValue, styleName);
  1791. styleValue = escapeTextForBrowser(("" + styleValue).trim());
  1792. } else {
  1793. nameChunk = styleName;
  1794. var value = styleValue;
  1795. if (-1 < nameChunk.indexOf("-")) {
  1796. var name = nameChunk;
  1797. (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) ||
  1798. ((warnedStyleNames[name] = !0),
  1799. console.error(
  1800. "Unsupported style property %s. Did you mean %s?",
  1801. name,
  1802. camelize(name.replace(msPattern$1, "ms-"))
  1803. ));
  1804. } else if (badVendoredStyleNamePattern.test(nameChunk))
  1805. (name = nameChunk),
  1806. (warnedStyleNames.hasOwnProperty(name) &&
  1807. warnedStyleNames[name]) ||
  1808. ((warnedStyleNames[name] = !0),
  1809. console.error(
  1810. "Unsupported vendor-prefixed style property %s. Did you mean %s?",
  1811. name,
  1812. name.charAt(0).toUpperCase() + name.slice(1)
  1813. ));
  1814. else if (badStyleValueWithSemicolonPattern.test(value)) {
  1815. name = nameChunk;
  1816. var value$jscomp$0 = value;
  1817. (warnedStyleValues.hasOwnProperty(value$jscomp$0) &&
  1818. warnedStyleValues[value$jscomp$0]) ||
  1819. ((warnedStyleValues[value$jscomp$0] = !0),
  1820. console.error(
  1821. 'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',
  1822. name,
  1823. value$jscomp$0.replace(badStyleValueWithSemicolonPattern, "")
  1824. ));
  1825. }
  1826. "number" === typeof value &&
  1827. (isNaN(value)
  1828. ? warnedForNaNValue ||
  1829. ((warnedForNaNValue = !0),
  1830. console.error(
  1831. "`NaN` is an invalid value for the `%s` css style property.",
  1832. nameChunk
  1833. ))
  1834. : isFinite(value) ||
  1835. warnedForInfinityValue ||
  1836. ((warnedForInfinityValue = !0),
  1837. console.error(
  1838. "`Infinity` is an invalid value for the `%s` css style property.",
  1839. nameChunk
  1840. )));
  1841. nameChunk = styleName;
  1842. value = styleNameCache.get(nameChunk);
  1843. void 0 !== value
  1844. ? (nameChunk = value)
  1845. : ((value = escapeTextForBrowser(
  1846. nameChunk
  1847. .replace(uppercasePattern, "-$1")
  1848. .toLowerCase()
  1849. .replace(msPattern, "-ms-")
  1850. )),
  1851. styleNameCache.set(nameChunk, value),
  1852. (nameChunk = value));
  1853. "number" === typeof styleValue
  1854. ? (styleValue =
  1855. 0 === styleValue || unitlessNumbers.has(styleName)
  1856. ? "" + styleValue
  1857. : styleValue + "px")
  1858. : (checkCSSPropertyStringCoercion(styleValue, styleName),
  1859. (styleValue = escapeTextForBrowser(("" + styleValue).trim())));
  1860. }
  1861. isFirst
  1862. ? ((isFirst = !1),
  1863. target.push(
  1864. styleAttributeStart,
  1865. nameChunk,
  1866. styleAssign,
  1867. styleValue
  1868. ))
  1869. : target.push(styleSeparator, nameChunk, styleAssign, styleValue);
  1870. }
  1871. }
  1872. isFirst || target.push(attributeEnd);
  1873. }
  1874. var attributeSeparator = " ",
  1875. attributeAssign = '="',
  1876. attributeEnd = '"',
  1877. attributeEmptyString = '=""';
  1878. function pushBooleanAttribute(target, name, value) {
  1879. value &&
  1880. "function" !== typeof value &&
  1881. "symbol" !== typeof value &&
  1882. target.push(attributeSeparator, name, attributeEmptyString);
  1883. }
  1884. function pushStringAttribute(target, name, value) {
  1885. "function" !== typeof value &&
  1886. "symbol" !== typeof value &&
  1887. "boolean" !== typeof value &&
  1888. target.push(
  1889. attributeSeparator,
  1890. name,
  1891. attributeAssign,
  1892. escapeTextForBrowser(value),
  1893. attributeEnd
  1894. );
  1895. }
  1896. var actionJavaScriptURL = escapeTextForBrowser(
  1897. "javascript:throw new Error('React form unexpectedly submitted.')"
  1898. );
  1899. function pushAdditionalFormField(value, key) {
  1900. this.push('<input type="hidden"');
  1901. validateAdditionalFormField(value);
  1902. pushStringAttribute(this, "name", key);
  1903. pushStringAttribute(this, "value", value);
  1904. this.push(endOfStartTagSelfClosing);
  1905. }
  1906. function validateAdditionalFormField(value) {
  1907. if ("string" !== typeof value)
  1908. throw Error(
  1909. "File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration."
  1910. );
  1911. }
  1912. function getCustomFormFields(resumableState, formAction) {
  1913. if ("function" === typeof formAction.$$FORM_ACTION) {
  1914. var id = resumableState.nextFormID++;
  1915. resumableState = resumableState.idPrefix + id;
  1916. try {
  1917. var customFields = formAction.$$FORM_ACTION(resumableState);
  1918. if (customFields) {
  1919. var formData = customFields.data;
  1920. null != formData && formData.forEach(validateAdditionalFormField);
  1921. }
  1922. return customFields;
  1923. } catch (x) {
  1924. if ("object" === typeof x && null !== x && "function" === typeof x.then)
  1925. throw x;
  1926. console.error(
  1927. "Failed to serialize an action for progressive enhancement:\n%s",
  1928. x
  1929. );
  1930. }
  1931. }
  1932. return null;
  1933. }
  1934. function pushFormActionAttribute(
  1935. target,
  1936. resumableState,
  1937. renderState,
  1938. formAction,
  1939. formEncType,
  1940. formMethod,
  1941. formTarget,
  1942. name
  1943. ) {
  1944. var formData = null;
  1945. if ("function" === typeof formAction) {
  1946. null === name ||
  1947. didWarnFormActionName ||
  1948. ((didWarnFormActionName = !0),
  1949. console.error(
  1950. '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.'
  1951. ));
  1952. (null === formEncType && null === formMethod) ||
  1953. didWarnFormActionMethod ||
  1954. ((didWarnFormActionMethod = !0),
  1955. console.error(
  1956. "Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."
  1957. ));
  1958. null === formTarget ||
  1959. didWarnFormActionTarget ||
  1960. ((didWarnFormActionTarget = !0),
  1961. console.error(
  1962. "Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
  1963. ));
  1964. var customFields = getCustomFormFields(resumableState, formAction);
  1965. null !== customFields
  1966. ? ((name = customFields.name),
  1967. (formAction = customFields.action || ""),
  1968. (formEncType = customFields.encType),
  1969. (formMethod = customFields.method),
  1970. (formTarget = customFields.target),
  1971. (formData = customFields.data))
  1972. : (target.push(
  1973. attributeSeparator,
  1974. "formAction",
  1975. attributeAssign,
  1976. actionJavaScriptURL,
  1977. attributeEnd
  1978. ),
  1979. (formTarget = formMethod = formEncType = formAction = name = null),
  1980. injectFormReplayingRuntime(resumableState, renderState));
  1981. }
  1982. null != name && pushAttribute(target, "name", name);
  1983. null != formAction && pushAttribute(target, "formAction", formAction);
  1984. null != formEncType && pushAttribute(target, "formEncType", formEncType);
  1985. null != formMethod && pushAttribute(target, "formMethod", formMethod);
  1986. null != formTarget && pushAttribute(target, "formTarget", formTarget);
  1987. return formData;
  1988. }
  1989. function pushAttribute(target, name, value) {
  1990. switch (name) {
  1991. case "className":
  1992. pushStringAttribute(target, "class", value);
  1993. break;
  1994. case "tabIndex":
  1995. pushStringAttribute(target, "tabindex", value);
  1996. break;
  1997. case "dir":
  1998. case "role":
  1999. case "viewBox":
  2000. case "width":
  2001. case "height":
  2002. pushStringAttribute(target, name, value);
  2003. break;
  2004. case "style":
  2005. pushStyleAttribute(target, value);
  2006. break;
  2007. case "src":
  2008. case "href":
  2009. if ("" === value) {
  2010. "src" === name
  2011. ? console.error(
  2012. '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.',
  2013. name,
  2014. name
  2015. )
  2016. : console.error(
  2017. '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.',
  2018. name,
  2019. name
  2020. );
  2021. break;
  2022. }
  2023. case "action":
  2024. case "formAction":
  2025. if (
  2026. null == value ||
  2027. "function" === typeof value ||
  2028. "symbol" === typeof value ||
  2029. "boolean" === typeof value
  2030. )
  2031. break;
  2032. checkAttributeStringCoercion(value, name);
  2033. value = sanitizeURL("" + value);
  2034. target.push(
  2035. attributeSeparator,
  2036. name,
  2037. attributeAssign,
  2038. escapeTextForBrowser(value),
  2039. attributeEnd
  2040. );
  2041. break;
  2042. case "defaultValue":
  2043. case "defaultChecked":
  2044. case "innerHTML":
  2045. case "suppressContentEditableWarning":
  2046. case "suppressHydrationWarning":
  2047. case "ref":
  2048. break;
  2049. case "autoFocus":
  2050. case "multiple":
  2051. case "muted":
  2052. pushBooleanAttribute(target, name.toLowerCase(), value);
  2053. break;
  2054. case "xlinkHref":
  2055. if (
  2056. "function" === typeof value ||
  2057. "symbol" === typeof value ||
  2058. "boolean" === typeof value
  2059. )
  2060. break;
  2061. checkAttributeStringCoercion(value, name);
  2062. value = sanitizeURL("" + value);
  2063. target.push(
  2064. attributeSeparator,
  2065. "xlink:href",
  2066. attributeAssign,
  2067. escapeTextForBrowser(value),
  2068. attributeEnd
  2069. );
  2070. break;
  2071. case "contentEditable":
  2072. case "spellCheck":
  2073. case "draggable":
  2074. case "value":
  2075. case "autoReverse":
  2076. case "externalResourcesRequired":
  2077. case "focusable":
  2078. case "preserveAlpha":
  2079. "function" !== typeof value &&
  2080. "symbol" !== typeof value &&
  2081. target.push(
  2082. attributeSeparator,
  2083. name,
  2084. attributeAssign,
  2085. escapeTextForBrowser(value),
  2086. attributeEnd
  2087. );
  2088. break;
  2089. case "inert":
  2090. "" !== value ||
  2091. didWarnForNewBooleanPropsWithEmptyValue[name] ||
  2092. ((didWarnForNewBooleanPropsWithEmptyValue[name] = !0),
  2093. console.error(
  2094. "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.",
  2095. name
  2096. ));
  2097. case "allowFullScreen":
  2098. case "async":
  2099. case "autoPlay":
  2100. case "controls":
  2101. case "default":
  2102. case "defer":
  2103. case "disabled":
  2104. case "disablePictureInPicture":
  2105. case "disableRemotePlayback":
  2106. case "formNoValidate":
  2107. case "hidden":
  2108. case "loop":
  2109. case "noModule":
  2110. case "noValidate":
  2111. case "open":
  2112. case "playsInline":
  2113. case "readOnly":
  2114. case "required":
  2115. case "reversed":
  2116. case "scoped":
  2117. case "seamless":
  2118. case "itemScope":
  2119. value &&
  2120. "function" !== typeof value &&
  2121. "symbol" !== typeof value &&
  2122. target.push(attributeSeparator, name, attributeEmptyString);
  2123. break;
  2124. case "capture":
  2125. case "download":
  2126. !0 === value
  2127. ? target.push(attributeSeparator, name, attributeEmptyString)
  2128. : !1 !== value &&
  2129. "function" !== typeof value &&
  2130. "symbol" !== typeof value &&
  2131. target.push(
  2132. attributeSeparator,
  2133. name,
  2134. attributeAssign,
  2135. escapeTextForBrowser(value),
  2136. attributeEnd
  2137. );
  2138. break;
  2139. case "cols":
  2140. case "rows":
  2141. case "size":
  2142. case "span":
  2143. "function" !== typeof value &&
  2144. "symbol" !== typeof value &&
  2145. !isNaN(value) &&
  2146. 1 <= value &&
  2147. target.push(
  2148. attributeSeparator,
  2149. name,
  2150. attributeAssign,
  2151. escapeTextForBrowser(value),
  2152. attributeEnd
  2153. );
  2154. break;
  2155. case "rowSpan":
  2156. case "start":
  2157. "function" === typeof value ||
  2158. "symbol" === typeof value ||
  2159. isNaN(value) ||
  2160. target.push(
  2161. attributeSeparator,
  2162. name,
  2163. attributeAssign,
  2164. escapeTextForBrowser(value),
  2165. attributeEnd
  2166. );
  2167. break;
  2168. case "xlinkActuate":
  2169. pushStringAttribute(target, "xlink:actuate", value);
  2170. break;
  2171. case "xlinkArcrole":
  2172. pushStringAttribute(target, "xlink:arcrole", value);
  2173. break;
  2174. case "xlinkRole":
  2175. pushStringAttribute(target, "xlink:role", value);
  2176. break;
  2177. case "xlinkShow":
  2178. pushStringAttribute(target, "xlink:show", value);
  2179. break;
  2180. case "xlinkTitle":
  2181. pushStringAttribute(target, "xlink:title", value);
  2182. break;
  2183. case "xlinkType":
  2184. pushStringAttribute(target, "xlink:type", value);
  2185. break;
  2186. case "xmlBase":
  2187. pushStringAttribute(target, "xml:base", value);
  2188. break;
  2189. case "xmlLang":
  2190. pushStringAttribute(target, "xml:lang", value);
  2191. break;
  2192. case "xmlSpace":
  2193. pushStringAttribute(target, "xml:space", value);
  2194. break;
  2195. default:
  2196. if (
  2197. !(2 < name.length) ||
  2198. ("o" !== name[0] && "O" !== name[0]) ||
  2199. ("n" !== name[1] && "N" !== name[1])
  2200. )
  2201. if (((name = aliases.get(name) || name), isAttributeNameSafe(name))) {
  2202. switch (typeof value) {
  2203. case "function":
  2204. case "symbol":
  2205. return;
  2206. case "boolean":
  2207. var prefix = name.toLowerCase().slice(0, 5);
  2208. if ("data-" !== prefix && "aria-" !== prefix) return;
  2209. }
  2210. target.push(
  2211. attributeSeparator,
  2212. name,
  2213. attributeAssign,
  2214. escapeTextForBrowser(value),
  2215. attributeEnd
  2216. );
  2217. }
  2218. }
  2219. }
  2220. var endOfStartTag = ">",
  2221. endOfStartTagSelfClosing = "/>";
  2222. function pushInnerHTML(target, innerHTML, children) {
  2223. if (null != innerHTML) {
  2224. if (null != children)
  2225. throw Error(
  2226. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  2227. );
  2228. if ("object" !== typeof innerHTML || !("__html" in innerHTML))
  2229. throw Error(
  2230. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  2231. );
  2232. innerHTML = innerHTML.__html;
  2233. null !== innerHTML &&
  2234. void 0 !== innerHTML &&
  2235. (checkHtmlStringCoercion(innerHTML), target.push("" + innerHTML));
  2236. }
  2237. }
  2238. var didWarnDefaultInputValue = !1,
  2239. didWarnDefaultChecked = !1,
  2240. didWarnDefaultSelectValue = !1,
  2241. didWarnDefaultTextareaValue = !1,
  2242. didWarnInvalidOptionChildren = !1,
  2243. didWarnInvalidOptionInnerHTML = !1,
  2244. didWarnSelectedSetOnOption = !1,
  2245. didWarnFormActionType = !1,
  2246. didWarnFormActionName = !1,
  2247. didWarnFormActionTarget = !1,
  2248. didWarnFormActionMethod = !1;
  2249. function checkSelectProp(props, propName) {
  2250. var value = props[propName];
  2251. null != value &&
  2252. ((value = isArrayImpl(value)),
  2253. props.multiple && !value
  2254. ? console.error(
  2255. "The `%s` prop supplied to <select> must be an array if `multiple` is true.",
  2256. propName
  2257. )
  2258. : !props.multiple &&
  2259. value &&
  2260. console.error(
  2261. "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",
  2262. propName
  2263. ));
  2264. }
  2265. function flattenOptionChildren(children) {
  2266. var content = "";
  2267. React.Children.forEach(children, function (child) {
  2268. null != child &&
  2269. ((content += child),
  2270. didWarnInvalidOptionChildren ||
  2271. "string" === typeof child ||
  2272. "number" === typeof child ||
  2273. "bigint" === typeof child ||
  2274. ((didWarnInvalidOptionChildren = !0),
  2275. console.error(
  2276. "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
  2277. )));
  2278. });
  2279. return content;
  2280. }
  2281. var formReplayingRuntimeScript =
  2282. 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});';
  2283. function injectFormReplayingRuntime(resumableState, renderState) {
  2284. if ((resumableState.instructions & 16) === NothingSent) {
  2285. resumableState.instructions |= 16;
  2286. var preamble = renderState.preamble,
  2287. bootstrapChunks = renderState.bootstrapChunks;
  2288. (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
  2289. ? (bootstrapChunks.push(renderState.startInlineScript),
  2290. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  2291. bootstrapChunks.push(
  2292. endOfStartTag,
  2293. formReplayingRuntimeScript,
  2294. endInlineScript
  2295. ))
  2296. : bootstrapChunks.unshift(
  2297. renderState.startInlineScript,
  2298. endOfStartTag,
  2299. formReplayingRuntimeScript,
  2300. endInlineScript
  2301. );
  2302. }
  2303. }
  2304. function pushLinkImpl(target, props) {
  2305. target.push(startChunkForTag("link"));
  2306. for (var propKey in props)
  2307. if (hasOwnProperty.call(props, propKey)) {
  2308. var propValue = props[propKey];
  2309. if (null != propValue)
  2310. switch (propKey) {
  2311. case "children":
  2312. case "dangerouslySetInnerHTML":
  2313. throw Error(
  2314. "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  2315. );
  2316. default:
  2317. pushAttribute(target, propKey, propValue);
  2318. }
  2319. }
  2320. target.push(endOfStartTagSelfClosing);
  2321. return null;
  2322. }
  2323. function escapeStyleTextContent(styleText) {
  2324. checkHtmlStringCoercion(styleText);
  2325. return ("" + styleText).replace(styleRegex, styleReplacer);
  2326. }
  2327. var styleRegex = /(<\/|<)(s)(tyle)/gi;
  2328. function styleReplacer(match, prefix, s, suffix) {
  2329. return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix;
  2330. }
  2331. function pushSelfClosing(target, props, tag) {
  2332. target.push(startChunkForTag(tag));
  2333. for (var propKey in props)
  2334. if (hasOwnProperty.call(props, propKey)) {
  2335. var propValue = props[propKey];
  2336. if (null != propValue)
  2337. switch (propKey) {
  2338. case "children":
  2339. case "dangerouslySetInnerHTML":
  2340. throw Error(
  2341. tag +
  2342. " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  2343. );
  2344. default:
  2345. pushAttribute(target, propKey, propValue);
  2346. }
  2347. }
  2348. target.push(endOfStartTagSelfClosing);
  2349. return null;
  2350. }
  2351. function pushTitleImpl(target, props) {
  2352. target.push(startChunkForTag("title"));
  2353. var children = null,
  2354. innerHTML = null,
  2355. propKey;
  2356. for (propKey in props)
  2357. if (hasOwnProperty.call(props, propKey)) {
  2358. var propValue = props[propKey];
  2359. if (null != propValue)
  2360. switch (propKey) {
  2361. case "children":
  2362. children = propValue;
  2363. break;
  2364. case "dangerouslySetInnerHTML":
  2365. innerHTML = propValue;
  2366. break;
  2367. default:
  2368. pushAttribute(target, propKey, propValue);
  2369. }
  2370. }
  2371. target.push(endOfStartTag);
  2372. props = Array.isArray(children)
  2373. ? 2 > children.length
  2374. ? children[0]
  2375. : null
  2376. : children;
  2377. "function" !== typeof props &&
  2378. "symbol" !== typeof props &&
  2379. null !== props &&
  2380. void 0 !== props &&
  2381. target.push(escapeTextForBrowser("" + props));
  2382. pushInnerHTML(target, innerHTML, children);
  2383. target.push(endChunkForTag("title"));
  2384. return null;
  2385. }
  2386. function pushScriptImpl(target, props) {
  2387. target.push(startChunkForTag("script"));
  2388. var children = null,
  2389. innerHTML = null,
  2390. propKey;
  2391. for (propKey in props)
  2392. if (hasOwnProperty.call(props, propKey)) {
  2393. var propValue = props[propKey];
  2394. if (null != propValue)
  2395. switch (propKey) {
  2396. case "children":
  2397. children = propValue;
  2398. break;
  2399. case "dangerouslySetInnerHTML":
  2400. innerHTML = propValue;
  2401. break;
  2402. default:
  2403. pushAttribute(target, propKey, propValue);
  2404. }
  2405. }
  2406. target.push(endOfStartTag);
  2407. null != children &&
  2408. "string" !== typeof children &&
  2409. ((props =
  2410. "number" === typeof children
  2411. ? "a number for children"
  2412. : Array.isArray(children)
  2413. ? "an array for children"
  2414. : "something unexpected for children"),
  2415. console.error(
  2416. "A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.",
  2417. props
  2418. ));
  2419. pushInnerHTML(target, innerHTML, children);
  2420. "string" === typeof children &&
  2421. target.push(escapeEntireInlineScriptContent(children));
  2422. target.push(endChunkForTag("script"));
  2423. return null;
  2424. }
  2425. function pushStartSingletonElement(target, props, tag) {
  2426. target.push(startChunkForTag(tag));
  2427. var innerHTML = (tag = null),
  2428. propKey;
  2429. for (propKey in props)
  2430. if (hasOwnProperty.call(props, propKey)) {
  2431. var propValue = props[propKey];
  2432. if (null != propValue)
  2433. switch (propKey) {
  2434. case "children":
  2435. tag = propValue;
  2436. break;
  2437. case "dangerouslySetInnerHTML":
  2438. innerHTML = propValue;
  2439. break;
  2440. default:
  2441. pushAttribute(target, propKey, propValue);
  2442. }
  2443. }
  2444. target.push(endOfStartTag);
  2445. pushInnerHTML(target, innerHTML, tag);
  2446. return tag;
  2447. }
  2448. function pushStartGenericElement(target, props, tag) {
  2449. target.push(startChunkForTag(tag));
  2450. var innerHTML = (tag = null),
  2451. propKey;
  2452. for (propKey in props)
  2453. if (hasOwnProperty.call(props, propKey)) {
  2454. var propValue = props[propKey];
  2455. if (null != propValue)
  2456. switch (propKey) {
  2457. case "children":
  2458. tag = propValue;
  2459. break;
  2460. case "dangerouslySetInnerHTML":
  2461. innerHTML = propValue;
  2462. break;
  2463. default:
  2464. pushAttribute(target, propKey, propValue);
  2465. }
  2466. }
  2467. target.push(endOfStartTag);
  2468. pushInnerHTML(target, innerHTML, tag);
  2469. return "string" === typeof tag
  2470. ? (target.push(escapeTextForBrowser(tag)), null)
  2471. : tag;
  2472. }
  2473. var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
  2474. validatedTagCache = new Map();
  2475. function startChunkForTag(tag) {
  2476. var tagStartChunk = validatedTagCache.get(tag);
  2477. if (void 0 === tagStartChunk) {
  2478. if (!VALID_TAG_REGEX.test(tag)) throw Error("Invalid tag: " + tag);
  2479. tagStartChunk = "<" + tag;
  2480. validatedTagCache.set(tag, tagStartChunk);
  2481. }
  2482. return tagStartChunk;
  2483. }
  2484. function pushStartInstance(
  2485. target$jscomp$0,
  2486. type,
  2487. props,
  2488. resumableState,
  2489. renderState,
  2490. preambleState,
  2491. hoistableState,
  2492. formatContext,
  2493. textEmbedded
  2494. ) {
  2495. validateProperties$2(type, props);
  2496. ("input" !== type && "textarea" !== type && "select" !== type) ||
  2497. null == props ||
  2498. null !== props.value ||
  2499. didWarnValueNull ||
  2500. ((didWarnValueNull = !0),
  2501. "select" === type && props.multiple
  2502. ? console.error(
  2503. "`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.",
  2504. type
  2505. )
  2506. : console.error(
  2507. "`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
  2508. type
  2509. ));
  2510. b: if (-1 === type.indexOf("-")) var JSCompiler_inline_result = !1;
  2511. else
  2512. switch (type) {
  2513. case "annotation-xml":
  2514. case "color-profile":
  2515. case "font-face":
  2516. case "font-face-src":
  2517. case "font-face-uri":
  2518. case "font-face-format":
  2519. case "font-face-name":
  2520. case "missing-glyph":
  2521. JSCompiler_inline_result = !1;
  2522. break b;
  2523. default:
  2524. JSCompiler_inline_result = !0;
  2525. }
  2526. JSCompiler_inline_result ||
  2527. "string" === typeof props.is ||
  2528. warnUnknownProperties(type, props, null);
  2529. !props.suppressContentEditableWarning &&
  2530. props.contentEditable &&
  2531. null != props.children &&
  2532. console.error(
  2533. "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."
  2534. );
  2535. formatContext.insertionMode !== SVG_MODE &&
  2536. formatContext.insertionMode !== MATHML_MODE &&
  2537. -1 === type.indexOf("-") &&
  2538. type.toLowerCase() !== type &&
  2539. console.error(
  2540. "<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
  2541. type
  2542. );
  2543. switch (type) {
  2544. case "div":
  2545. case "span":
  2546. case "svg":
  2547. case "path":
  2548. break;
  2549. case "a":
  2550. target$jscomp$0.push(startChunkForTag("a"));
  2551. var children = null,
  2552. innerHTML = null,
  2553. propKey;
  2554. for (propKey in props)
  2555. if (hasOwnProperty.call(props, propKey)) {
  2556. var propValue = props[propKey];
  2557. if (null != propValue)
  2558. switch (propKey) {
  2559. case "children":
  2560. children = propValue;
  2561. break;
  2562. case "dangerouslySetInnerHTML":
  2563. innerHTML = propValue;
  2564. break;
  2565. case "href":
  2566. "" === propValue
  2567. ? pushStringAttribute(target$jscomp$0, "href", "")
  2568. : pushAttribute(target$jscomp$0, propKey, propValue);
  2569. break;
  2570. default:
  2571. pushAttribute(target$jscomp$0, propKey, propValue);
  2572. }
  2573. }
  2574. target$jscomp$0.push(endOfStartTag);
  2575. pushInnerHTML(target$jscomp$0, innerHTML, children);
  2576. if ("string" === typeof children) {
  2577. target$jscomp$0.push(escapeTextForBrowser(children));
  2578. var JSCompiler_inline_result$jscomp$0 = null;
  2579. } else JSCompiler_inline_result$jscomp$0 = children;
  2580. return JSCompiler_inline_result$jscomp$0;
  2581. case "g":
  2582. case "p":
  2583. case "li":
  2584. break;
  2585. case "select":
  2586. checkControlledValueProps("select", props);
  2587. checkSelectProp(props, "value");
  2588. checkSelectProp(props, "defaultValue");
  2589. void 0 === props.value ||
  2590. void 0 === props.defaultValue ||
  2591. didWarnDefaultSelectValue ||
  2592. (console.error(
  2593. "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"
  2594. ),
  2595. (didWarnDefaultSelectValue = !0));
  2596. target$jscomp$0.push(startChunkForTag("select"));
  2597. var children$jscomp$0 = null,
  2598. innerHTML$jscomp$0 = null,
  2599. propKey$jscomp$0;
  2600. for (propKey$jscomp$0 in props)
  2601. if (hasOwnProperty.call(props, propKey$jscomp$0)) {
  2602. var propValue$jscomp$0 = props[propKey$jscomp$0];
  2603. if (null != propValue$jscomp$0)
  2604. switch (propKey$jscomp$0) {
  2605. case "children":
  2606. children$jscomp$0 = propValue$jscomp$0;
  2607. break;
  2608. case "dangerouslySetInnerHTML":
  2609. innerHTML$jscomp$0 = propValue$jscomp$0;
  2610. break;
  2611. case "defaultValue":
  2612. case "value":
  2613. break;
  2614. default:
  2615. pushAttribute(
  2616. target$jscomp$0,
  2617. propKey$jscomp$0,
  2618. propValue$jscomp$0
  2619. );
  2620. }
  2621. }
  2622. target$jscomp$0.push(endOfStartTag);
  2623. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
  2624. return children$jscomp$0;
  2625. case "option":
  2626. var selectedValue = formatContext.selectedValue;
  2627. target$jscomp$0.push(startChunkForTag("option"));
  2628. var children$jscomp$1 = null,
  2629. value = null,
  2630. selected = null,
  2631. innerHTML$jscomp$1 = null,
  2632. propKey$jscomp$1;
  2633. for (propKey$jscomp$1 in props)
  2634. if (hasOwnProperty.call(props, propKey$jscomp$1)) {
  2635. var propValue$jscomp$1 = props[propKey$jscomp$1];
  2636. if (null != propValue$jscomp$1)
  2637. switch (propKey$jscomp$1) {
  2638. case "children":
  2639. children$jscomp$1 = propValue$jscomp$1;
  2640. break;
  2641. case "selected":
  2642. selected = propValue$jscomp$1;
  2643. didWarnSelectedSetOnOption ||
  2644. (console.error(
  2645. "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
  2646. ),
  2647. (didWarnSelectedSetOnOption = !0));
  2648. break;
  2649. case "dangerouslySetInnerHTML":
  2650. innerHTML$jscomp$1 = propValue$jscomp$1;
  2651. break;
  2652. case "value":
  2653. value = propValue$jscomp$1;
  2654. default:
  2655. pushAttribute(
  2656. target$jscomp$0,
  2657. propKey$jscomp$1,
  2658. propValue$jscomp$1
  2659. );
  2660. }
  2661. }
  2662. if (null != selectedValue) {
  2663. if (null !== value) {
  2664. checkAttributeStringCoercion(value, "value");
  2665. var stringValue = "" + value;
  2666. } else
  2667. null === innerHTML$jscomp$1 ||
  2668. didWarnInvalidOptionInnerHTML ||
  2669. ((didWarnInvalidOptionInnerHTML = !0),
  2670. console.error(
  2671. "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
  2672. )),
  2673. (stringValue = flattenOptionChildren(children$jscomp$1));
  2674. if (isArrayImpl(selectedValue))
  2675. for (var i = 0; i < selectedValue.length; i++) {
  2676. if (
  2677. (checkAttributeStringCoercion(selectedValue[i], "value"),
  2678. "" + selectedValue[i] === stringValue)
  2679. ) {
  2680. target$jscomp$0.push(' selected=""');
  2681. break;
  2682. }
  2683. }
  2684. else
  2685. checkAttributeStringCoercion(selectedValue, "select.value"),
  2686. "" + selectedValue === stringValue &&
  2687. target$jscomp$0.push(' selected=""');
  2688. } else selected && target$jscomp$0.push(' selected=""');
  2689. target$jscomp$0.push(endOfStartTag);
  2690. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);
  2691. return children$jscomp$1;
  2692. case "textarea":
  2693. checkControlledValueProps("textarea", props);
  2694. void 0 === props.value ||
  2695. void 0 === props.defaultValue ||
  2696. didWarnDefaultTextareaValue ||
  2697. (console.error(
  2698. "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"
  2699. ),
  2700. (didWarnDefaultTextareaValue = !0));
  2701. target$jscomp$0.push(startChunkForTag("textarea"));
  2702. var value$jscomp$0 = null,
  2703. defaultValue = null,
  2704. children$jscomp$2 = null,
  2705. propKey$jscomp$2;
  2706. for (propKey$jscomp$2 in props)
  2707. if (hasOwnProperty.call(props, propKey$jscomp$2)) {
  2708. var propValue$jscomp$2 = props[propKey$jscomp$2];
  2709. if (null != propValue$jscomp$2)
  2710. switch (propKey$jscomp$2) {
  2711. case "children":
  2712. children$jscomp$2 = propValue$jscomp$2;
  2713. break;
  2714. case "value":
  2715. value$jscomp$0 = propValue$jscomp$2;
  2716. break;
  2717. case "defaultValue":
  2718. defaultValue = propValue$jscomp$2;
  2719. break;
  2720. case "dangerouslySetInnerHTML":
  2721. throw Error(
  2722. "`dangerouslySetInnerHTML` does not make sense on <textarea>."
  2723. );
  2724. default:
  2725. pushAttribute(
  2726. target$jscomp$0,
  2727. propKey$jscomp$2,
  2728. propValue$jscomp$2
  2729. );
  2730. }
  2731. }
  2732. null === value$jscomp$0 &&
  2733. null !== defaultValue &&
  2734. (value$jscomp$0 = defaultValue);
  2735. target$jscomp$0.push(endOfStartTag);
  2736. if (null != children$jscomp$2) {
  2737. console.error(
  2738. "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
  2739. );
  2740. if (null != value$jscomp$0)
  2741. throw Error(
  2742. "If you supply `defaultValue` on a <textarea>, do not pass children."
  2743. );
  2744. if (isArrayImpl(children$jscomp$2)) {
  2745. if (1 < children$jscomp$2.length)
  2746. throw Error("<textarea> can only have at most one child.");
  2747. checkHtmlStringCoercion(children$jscomp$2[0]);
  2748. value$jscomp$0 = "" + children$jscomp$2[0];
  2749. }
  2750. checkHtmlStringCoercion(children$jscomp$2);
  2751. value$jscomp$0 = "" + children$jscomp$2;
  2752. }
  2753. "string" === typeof value$jscomp$0 &&
  2754. "\n" === value$jscomp$0[0] &&
  2755. target$jscomp$0.push("\n");
  2756. null !== value$jscomp$0 &&
  2757. (checkAttributeStringCoercion(value$jscomp$0, "value"),
  2758. target$jscomp$0.push(escapeTextForBrowser("" + value$jscomp$0)));
  2759. return null;
  2760. case "input":
  2761. checkControlledValueProps("input", props);
  2762. target$jscomp$0.push(startChunkForTag("input"));
  2763. var name = null,
  2764. formAction = null,
  2765. formEncType = null,
  2766. formMethod = null,
  2767. formTarget = null,
  2768. value$jscomp$1 = null,
  2769. defaultValue$jscomp$0 = null,
  2770. checked = null,
  2771. defaultChecked = null,
  2772. propKey$jscomp$3;
  2773. for (propKey$jscomp$3 in props)
  2774. if (hasOwnProperty.call(props, propKey$jscomp$3)) {
  2775. var propValue$jscomp$3 = props[propKey$jscomp$3];
  2776. if (null != propValue$jscomp$3)
  2777. switch (propKey$jscomp$3) {
  2778. case "children":
  2779. case "dangerouslySetInnerHTML":
  2780. throw Error(
  2781. "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  2782. );
  2783. case "name":
  2784. name = propValue$jscomp$3;
  2785. break;
  2786. case "formAction":
  2787. formAction = propValue$jscomp$3;
  2788. break;
  2789. case "formEncType":
  2790. formEncType = propValue$jscomp$3;
  2791. break;
  2792. case "formMethod":
  2793. formMethod = propValue$jscomp$3;
  2794. break;
  2795. case "formTarget":
  2796. formTarget = propValue$jscomp$3;
  2797. break;
  2798. case "defaultChecked":
  2799. defaultChecked = propValue$jscomp$3;
  2800. break;
  2801. case "defaultValue":
  2802. defaultValue$jscomp$0 = propValue$jscomp$3;
  2803. break;
  2804. case "checked":
  2805. checked = propValue$jscomp$3;
  2806. break;
  2807. case "value":
  2808. value$jscomp$1 = propValue$jscomp$3;
  2809. break;
  2810. default:
  2811. pushAttribute(
  2812. target$jscomp$0,
  2813. propKey$jscomp$3,
  2814. propValue$jscomp$3
  2815. );
  2816. }
  2817. }
  2818. null === formAction ||
  2819. "image" === props.type ||
  2820. "submit" === props.type ||
  2821. didWarnFormActionType ||
  2822. ((didWarnFormActionType = !0),
  2823. console.error(
  2824. 'An input can only specify a formAction along with type="submit" or type="image".'
  2825. ));
  2826. var formData = pushFormActionAttribute(
  2827. target$jscomp$0,
  2828. resumableState,
  2829. renderState,
  2830. formAction,
  2831. formEncType,
  2832. formMethod,
  2833. formTarget,
  2834. name
  2835. );
  2836. null === checked ||
  2837. null === defaultChecked ||
  2838. didWarnDefaultChecked ||
  2839. (console.error(
  2840. "%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",
  2841. "A component",
  2842. props.type
  2843. ),
  2844. (didWarnDefaultChecked = !0));
  2845. null === value$jscomp$1 ||
  2846. null === defaultValue$jscomp$0 ||
  2847. didWarnDefaultInputValue ||
  2848. (console.error(
  2849. "%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",
  2850. "A component",
  2851. props.type
  2852. ),
  2853. (didWarnDefaultInputValue = !0));
  2854. null !== checked
  2855. ? pushBooleanAttribute(target$jscomp$0, "checked", checked)
  2856. : null !== defaultChecked &&
  2857. pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked);
  2858. null !== value$jscomp$1
  2859. ? pushAttribute(target$jscomp$0, "value", value$jscomp$1)
  2860. : null !== defaultValue$jscomp$0 &&
  2861. pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
  2862. target$jscomp$0.push(endOfStartTagSelfClosing);
  2863. null != formData &&
  2864. formData.forEach(pushAdditionalFormField, target$jscomp$0);
  2865. return null;
  2866. case "button":
  2867. target$jscomp$0.push(startChunkForTag("button"));
  2868. var children$jscomp$3 = null,
  2869. innerHTML$jscomp$2 = null,
  2870. name$jscomp$0 = null,
  2871. formAction$jscomp$0 = null,
  2872. formEncType$jscomp$0 = null,
  2873. formMethod$jscomp$0 = null,
  2874. formTarget$jscomp$0 = null,
  2875. propKey$jscomp$4;
  2876. for (propKey$jscomp$4 in props)
  2877. if (hasOwnProperty.call(props, propKey$jscomp$4)) {
  2878. var propValue$jscomp$4 = props[propKey$jscomp$4];
  2879. if (null != propValue$jscomp$4)
  2880. switch (propKey$jscomp$4) {
  2881. case "children":
  2882. children$jscomp$3 = propValue$jscomp$4;
  2883. break;
  2884. case "dangerouslySetInnerHTML":
  2885. innerHTML$jscomp$2 = propValue$jscomp$4;
  2886. break;
  2887. case "name":
  2888. name$jscomp$0 = propValue$jscomp$4;
  2889. break;
  2890. case "formAction":
  2891. formAction$jscomp$0 = propValue$jscomp$4;
  2892. break;
  2893. case "formEncType":
  2894. formEncType$jscomp$0 = propValue$jscomp$4;
  2895. break;
  2896. case "formMethod":
  2897. formMethod$jscomp$0 = propValue$jscomp$4;
  2898. break;
  2899. case "formTarget":
  2900. formTarget$jscomp$0 = propValue$jscomp$4;
  2901. break;
  2902. default:
  2903. pushAttribute(
  2904. target$jscomp$0,
  2905. propKey$jscomp$4,
  2906. propValue$jscomp$4
  2907. );
  2908. }
  2909. }
  2910. null === formAction$jscomp$0 ||
  2911. null == props.type ||
  2912. "submit" === props.type ||
  2913. didWarnFormActionType ||
  2914. ((didWarnFormActionType = !0),
  2915. console.error(
  2916. 'A button can only specify a formAction along with type="submit" or no type.'
  2917. ));
  2918. var formData$jscomp$0 = pushFormActionAttribute(
  2919. target$jscomp$0,
  2920. resumableState,
  2921. renderState,
  2922. formAction$jscomp$0,
  2923. formEncType$jscomp$0,
  2924. formMethod$jscomp$0,
  2925. formTarget$jscomp$0,
  2926. name$jscomp$0
  2927. );
  2928. target$jscomp$0.push(endOfStartTag);
  2929. null != formData$jscomp$0 &&
  2930. formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
  2931. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);
  2932. if ("string" === typeof children$jscomp$3) {
  2933. target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));
  2934. var JSCompiler_inline_result$jscomp$1 = null;
  2935. } else JSCompiler_inline_result$jscomp$1 = children$jscomp$3;
  2936. return JSCompiler_inline_result$jscomp$1;
  2937. case "form":
  2938. target$jscomp$0.push(startChunkForTag("form"));
  2939. var children$jscomp$4 = null,
  2940. innerHTML$jscomp$3 = null,
  2941. formAction$jscomp$1 = null,
  2942. formEncType$jscomp$1 = null,
  2943. formMethod$jscomp$1 = null,
  2944. formTarget$jscomp$1 = null,
  2945. propKey$jscomp$5;
  2946. for (propKey$jscomp$5 in props)
  2947. if (hasOwnProperty.call(props, propKey$jscomp$5)) {
  2948. var propValue$jscomp$5 = props[propKey$jscomp$5];
  2949. if (null != propValue$jscomp$5)
  2950. switch (propKey$jscomp$5) {
  2951. case "children":
  2952. children$jscomp$4 = propValue$jscomp$5;
  2953. break;
  2954. case "dangerouslySetInnerHTML":
  2955. innerHTML$jscomp$3 = propValue$jscomp$5;
  2956. break;
  2957. case "action":
  2958. formAction$jscomp$1 = propValue$jscomp$5;
  2959. break;
  2960. case "encType":
  2961. formEncType$jscomp$1 = propValue$jscomp$5;
  2962. break;
  2963. case "method":
  2964. formMethod$jscomp$1 = propValue$jscomp$5;
  2965. break;
  2966. case "target":
  2967. formTarget$jscomp$1 = propValue$jscomp$5;
  2968. break;
  2969. default:
  2970. pushAttribute(
  2971. target$jscomp$0,
  2972. propKey$jscomp$5,
  2973. propValue$jscomp$5
  2974. );
  2975. }
  2976. }
  2977. var formData$jscomp$1 = null,
  2978. formActionName = null;
  2979. if ("function" === typeof formAction$jscomp$1) {
  2980. (null === formEncType$jscomp$1 && null === formMethod$jscomp$1) ||
  2981. didWarnFormActionMethod ||
  2982. ((didWarnFormActionMethod = !0),
  2983. console.error(
  2984. "Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."
  2985. ));
  2986. null === formTarget$jscomp$1 ||
  2987. didWarnFormActionTarget ||
  2988. ((didWarnFormActionTarget = !0),
  2989. console.error(
  2990. "Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."
  2991. ));
  2992. var customFields = getCustomFormFields(
  2993. resumableState,
  2994. formAction$jscomp$1
  2995. );
  2996. null !== customFields
  2997. ? ((formAction$jscomp$1 = customFields.action || ""),
  2998. (formEncType$jscomp$1 = customFields.encType),
  2999. (formMethod$jscomp$1 = customFields.method),
  3000. (formTarget$jscomp$1 = customFields.target),
  3001. (formData$jscomp$1 = customFields.data),
  3002. (formActionName = customFields.name))
  3003. : (target$jscomp$0.push(
  3004. attributeSeparator,
  3005. "action",
  3006. attributeAssign,
  3007. actionJavaScriptURL,
  3008. attributeEnd
  3009. ),
  3010. (formTarget$jscomp$1 =
  3011. formMethod$jscomp$1 =
  3012. formEncType$jscomp$1 =
  3013. formAction$jscomp$1 =
  3014. null),
  3015. injectFormReplayingRuntime(resumableState, renderState));
  3016. }
  3017. null != formAction$jscomp$1 &&
  3018. pushAttribute(target$jscomp$0, "action", formAction$jscomp$1);
  3019. null != formEncType$jscomp$1 &&
  3020. pushAttribute(target$jscomp$0, "encType", formEncType$jscomp$1);
  3021. null != formMethod$jscomp$1 &&
  3022. pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
  3023. null != formTarget$jscomp$1 &&
  3024. pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
  3025. target$jscomp$0.push(endOfStartTag);
  3026. null !== formActionName &&
  3027. (target$jscomp$0.push('<input type="hidden"'),
  3028. pushStringAttribute(target$jscomp$0, "name", formActionName),
  3029. target$jscomp$0.push(endOfStartTagSelfClosing),
  3030. null != formData$jscomp$1 &&
  3031. formData$jscomp$1.forEach(pushAdditionalFormField, target$jscomp$0));
  3032. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);
  3033. if ("string" === typeof children$jscomp$4) {
  3034. target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));
  3035. var JSCompiler_inline_result$jscomp$2 = null;
  3036. } else JSCompiler_inline_result$jscomp$2 = children$jscomp$4;
  3037. return JSCompiler_inline_result$jscomp$2;
  3038. case "menuitem":
  3039. target$jscomp$0.push(startChunkForTag("menuitem"));
  3040. for (var propKey$jscomp$6 in props)
  3041. if (hasOwnProperty.call(props, propKey$jscomp$6)) {
  3042. var propValue$jscomp$6 = props[propKey$jscomp$6];
  3043. if (null != propValue$jscomp$6)
  3044. switch (propKey$jscomp$6) {
  3045. case "children":
  3046. case "dangerouslySetInnerHTML":
  3047. throw Error(
  3048. "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
  3049. );
  3050. default:
  3051. pushAttribute(
  3052. target$jscomp$0,
  3053. propKey$jscomp$6,
  3054. propValue$jscomp$6
  3055. );
  3056. }
  3057. }
  3058. target$jscomp$0.push(endOfStartTag);
  3059. return null;
  3060. case "object":
  3061. target$jscomp$0.push(startChunkForTag("object"));
  3062. var children$jscomp$5 = null,
  3063. innerHTML$jscomp$4 = null,
  3064. propKey$jscomp$7;
  3065. for (propKey$jscomp$7 in props)
  3066. if (hasOwnProperty.call(props, propKey$jscomp$7)) {
  3067. var propValue$jscomp$7 = props[propKey$jscomp$7];
  3068. if (null != propValue$jscomp$7)
  3069. switch (propKey$jscomp$7) {
  3070. case "children":
  3071. children$jscomp$5 = propValue$jscomp$7;
  3072. break;
  3073. case "dangerouslySetInnerHTML":
  3074. innerHTML$jscomp$4 = propValue$jscomp$7;
  3075. break;
  3076. case "data":
  3077. checkAttributeStringCoercion(propValue$jscomp$7, "data");
  3078. var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
  3079. if ("" === sanitizedValue) {
  3080. console.error(
  3081. '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.',
  3082. propKey$jscomp$7,
  3083. propKey$jscomp$7
  3084. );
  3085. break;
  3086. }
  3087. target$jscomp$0.push(
  3088. attributeSeparator,
  3089. "data",
  3090. attributeAssign,
  3091. escapeTextForBrowser(sanitizedValue),
  3092. attributeEnd
  3093. );
  3094. break;
  3095. default:
  3096. pushAttribute(
  3097. target$jscomp$0,
  3098. propKey$jscomp$7,
  3099. propValue$jscomp$7
  3100. );
  3101. }
  3102. }
  3103. target$jscomp$0.push(endOfStartTag);
  3104. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
  3105. if ("string" === typeof children$jscomp$5) {
  3106. target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));
  3107. var JSCompiler_inline_result$jscomp$3 = null;
  3108. } else JSCompiler_inline_result$jscomp$3 = children$jscomp$5;
  3109. return JSCompiler_inline_result$jscomp$3;
  3110. case "title":
  3111. var noscriptTagInScope = formatContext.tagScope & 1,
  3112. isFallback = formatContext.tagScope & 4;
  3113. if (hasOwnProperty.call(props, "children")) {
  3114. var children$jscomp$6 = props.children,
  3115. child = Array.isArray(children$jscomp$6)
  3116. ? 2 > children$jscomp$6.length
  3117. ? children$jscomp$6[0]
  3118. : null
  3119. : children$jscomp$6;
  3120. Array.isArray(children$jscomp$6) && 1 < children$jscomp$6.length
  3121. ? console.error(
  3122. "React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.",
  3123. children$jscomp$6.length
  3124. )
  3125. : "function" === typeof child || "symbol" === typeof child
  3126. ? console.error(
  3127. "React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.",
  3128. "function" === typeof child ? "a Function" : "a Sybmol"
  3129. )
  3130. : child &&
  3131. child.toString === {}.toString &&
  3132. (null != child.$$typeof
  3133. ? console.error(
  3134. "React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML."
  3135. )
  3136. : console.error(
  3137. "React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>."
  3138. ));
  3139. }
  3140. if (
  3141. formatContext.insertionMode === SVG_MODE ||
  3142. noscriptTagInScope ||
  3143. null != props.itemProp
  3144. )
  3145. var JSCompiler_inline_result$jscomp$4 = pushTitleImpl(
  3146. target$jscomp$0,
  3147. props
  3148. );
  3149. else
  3150. isFallback
  3151. ? (JSCompiler_inline_result$jscomp$4 = null)
  3152. : (pushTitleImpl(renderState.hoistableChunks, props),
  3153. (JSCompiler_inline_result$jscomp$4 = void 0));
  3154. return JSCompiler_inline_result$jscomp$4;
  3155. case "link":
  3156. var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,
  3157. isFallback$jscomp$0 = formatContext.tagScope & 4,
  3158. rel = props.rel,
  3159. href = props.href,
  3160. precedence = props.precedence;
  3161. if (
  3162. formatContext.insertionMode === SVG_MODE ||
  3163. noscriptTagInScope$jscomp$0 ||
  3164. null != props.itemProp ||
  3165. "string" !== typeof rel ||
  3166. "string" !== typeof href ||
  3167. "" === href
  3168. ) {
  3169. "stylesheet" === rel &&
  3170. "string" === typeof props.precedence &&
  3171. (("string" === typeof href && href) ||
  3172. console.error(
  3173. 'React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.',
  3174. null === href
  3175. ? "`null`"
  3176. : void 0 === href
  3177. ? "`undefined`"
  3178. : "" === href
  3179. ? "an empty string"
  3180. : 'something with type "' + typeof href + '"'
  3181. ));
  3182. pushLinkImpl(target$jscomp$0, props);
  3183. var JSCompiler_inline_result$jscomp$5 = null;
  3184. } else if ("stylesheet" === props.rel)
  3185. if (
  3186. "string" !== typeof precedence ||
  3187. null != props.disabled ||
  3188. props.onLoad ||
  3189. props.onError
  3190. ) {
  3191. if ("string" === typeof precedence)
  3192. if (null != props.disabled)
  3193. console.error(
  3194. 'React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active 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 `disabled` prop, otherwise remove the `precedence` prop.'
  3195. );
  3196. else if (props.onLoad || props.onError) {
  3197. var propDescription =
  3198. props.onLoad && props.onError
  3199. ? "`onLoad` and `onError` props"
  3200. : props.onLoad
  3201. ? "`onLoad` prop"
  3202. : "`onError` prop";
  3203. console.error(
  3204. 'React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %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.',
  3205. propDescription,
  3206. propDescription
  3207. );
  3208. }
  3209. JSCompiler_inline_result$jscomp$5 = pushLinkImpl(
  3210. target$jscomp$0,
  3211. props
  3212. );
  3213. } else {
  3214. var styleQueue = renderState.styles.get(precedence),
  3215. resourceState = resumableState.styleResources.hasOwnProperty(href)
  3216. ? resumableState.styleResources[href]
  3217. : void 0;
  3218. if (resourceState !== EXISTS) {
  3219. resumableState.styleResources[href] = EXISTS;
  3220. styleQueue ||
  3221. ((styleQueue = {
  3222. precedence: escapeTextForBrowser(precedence),
  3223. rules: [],
  3224. hrefs: [],
  3225. sheets: new Map()
  3226. }),
  3227. renderState.styles.set(precedence, styleQueue));
  3228. var resource = {
  3229. state: PENDING$1,
  3230. props: assign({}, props, {
  3231. "data-precedence": props.precedence,
  3232. precedence: null
  3233. })
  3234. };
  3235. if (resourceState) {
  3236. 2 === resourceState.length &&
  3237. adoptPreloadCredentials(resource.props, resourceState);
  3238. var preloadResource = renderState.preloads.stylesheets.get(href);
  3239. preloadResource && 0 < preloadResource.length
  3240. ? (preloadResource.length = 0)
  3241. : (resource.state = PRELOADED);
  3242. }
  3243. styleQueue.sheets.set(href, resource);
  3244. hoistableState && hoistableState.stylesheets.add(resource);
  3245. } else if (styleQueue) {
  3246. var _resource = styleQueue.sheets.get(href);
  3247. _resource &&
  3248. hoistableState &&
  3249. hoistableState.stylesheets.add(_resource);
  3250. }
  3251. textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
  3252. JSCompiler_inline_result$jscomp$5 = null;
  3253. }
  3254. else
  3255. props.onLoad || props.onError
  3256. ? (JSCompiler_inline_result$jscomp$5 = pushLinkImpl(
  3257. target$jscomp$0,
  3258. props
  3259. ))
  3260. : (textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
  3261. (JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0
  3262. ? null
  3263. : pushLinkImpl(renderState.hoistableChunks, props)));
  3264. return JSCompiler_inline_result$jscomp$5;
  3265. case "script":
  3266. var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,
  3267. asyncProp = props.async;
  3268. if (
  3269. "string" !== typeof props.src ||
  3270. !props.src ||
  3271. !asyncProp ||
  3272. "function" === typeof asyncProp ||
  3273. "symbol" === typeof asyncProp ||
  3274. props.onLoad ||
  3275. props.onError ||
  3276. formatContext.insertionMode === SVG_MODE ||
  3277. noscriptTagInScope$jscomp$1 ||
  3278. null != props.itemProp
  3279. )
  3280. var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(
  3281. target$jscomp$0,
  3282. props
  3283. );
  3284. else {
  3285. var key = props.src;
  3286. if ("module" === props.type) {
  3287. var resources = resumableState.moduleScriptResources;
  3288. var preloads = renderState.preloads.moduleScripts;
  3289. } else
  3290. (resources = resumableState.scriptResources),
  3291. (preloads = renderState.preloads.scripts);
  3292. var resourceState$jscomp$0 = resources.hasOwnProperty(key)
  3293. ? resources[key]
  3294. : void 0;
  3295. if (resourceState$jscomp$0 !== EXISTS) {
  3296. resources[key] = EXISTS;
  3297. var scriptProps = props;
  3298. if (resourceState$jscomp$0) {
  3299. 2 === resourceState$jscomp$0.length &&
  3300. ((scriptProps = assign({}, props)),
  3301. adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));
  3302. var preloadResource$jscomp$0 = preloads.get(key);
  3303. preloadResource$jscomp$0 && (preloadResource$jscomp$0.length = 0);
  3304. }
  3305. var resource$jscomp$0 = [];
  3306. renderState.scripts.add(resource$jscomp$0);
  3307. pushScriptImpl(resource$jscomp$0, scriptProps);
  3308. }
  3309. textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
  3310. JSCompiler_inline_result$jscomp$6 = null;
  3311. }
  3312. return JSCompiler_inline_result$jscomp$6;
  3313. case "style":
  3314. var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;
  3315. if (hasOwnProperty.call(props, "children")) {
  3316. var children$jscomp$7 = props.children,
  3317. child$jscomp$0 = Array.isArray(children$jscomp$7)
  3318. ? 2 > children$jscomp$7.length
  3319. ? children$jscomp$7[0]
  3320. : null
  3321. : children$jscomp$7;
  3322. ("function" === typeof child$jscomp$0 ||
  3323. "symbol" === typeof child$jscomp$0 ||
  3324. Array.isArray(child$jscomp$0)) &&
  3325. console.error(
  3326. "React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.",
  3327. "function" === typeof child$jscomp$0
  3328. ? "a Function"
  3329. : "symbol" === typeof child$jscomp$0
  3330. ? "a Sybmol"
  3331. : "an Array"
  3332. );
  3333. }
  3334. var precedence$jscomp$0 = props.precedence,
  3335. href$jscomp$0 = props.href,
  3336. nonce = props.nonce;
  3337. if (
  3338. formatContext.insertionMode === SVG_MODE ||
  3339. noscriptTagInScope$jscomp$2 ||
  3340. null != props.itemProp ||
  3341. "string" !== typeof precedence$jscomp$0 ||
  3342. "string" !== typeof href$jscomp$0 ||
  3343. "" === href$jscomp$0
  3344. ) {
  3345. target$jscomp$0.push(startChunkForTag("style"));
  3346. var children$jscomp$8 = null,
  3347. innerHTML$jscomp$5 = null,
  3348. propKey$jscomp$8;
  3349. for (propKey$jscomp$8 in props)
  3350. if (hasOwnProperty.call(props, propKey$jscomp$8)) {
  3351. var propValue$jscomp$8 = props[propKey$jscomp$8];
  3352. if (null != propValue$jscomp$8)
  3353. switch (propKey$jscomp$8) {
  3354. case "children":
  3355. children$jscomp$8 = propValue$jscomp$8;
  3356. break;
  3357. case "dangerouslySetInnerHTML":
  3358. innerHTML$jscomp$5 = propValue$jscomp$8;
  3359. break;
  3360. default:
  3361. pushAttribute(
  3362. target$jscomp$0,
  3363. propKey$jscomp$8,
  3364. propValue$jscomp$8
  3365. );
  3366. }
  3367. }
  3368. target$jscomp$0.push(endOfStartTag);
  3369. var child$jscomp$1 = Array.isArray(children$jscomp$8)
  3370. ? 2 > children$jscomp$8.length
  3371. ? children$jscomp$8[0]
  3372. : null
  3373. : children$jscomp$8;
  3374. "function" !== typeof child$jscomp$1 &&
  3375. "symbol" !== typeof child$jscomp$1 &&
  3376. null !== child$jscomp$1 &&
  3377. void 0 !== child$jscomp$1 &&
  3378. target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1));
  3379. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$8);
  3380. target$jscomp$0.push(endChunkForTag("style"));
  3381. var JSCompiler_inline_result$jscomp$7 = null;
  3382. } else {
  3383. href$jscomp$0.includes(" ") &&
  3384. console.error(
  3385. 'React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is "%s".',
  3386. href$jscomp$0
  3387. );
  3388. var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0),
  3389. resourceState$jscomp$1 = resumableState.styleResources.hasOwnProperty(
  3390. href$jscomp$0
  3391. )
  3392. ? resumableState.styleResources[href$jscomp$0]
  3393. : void 0;
  3394. if (resourceState$jscomp$1 !== EXISTS) {
  3395. resumableState.styleResources[href$jscomp$0] = EXISTS;
  3396. resourceState$jscomp$1 &&
  3397. console.error(
  3398. 'React encountered a hoistable style tag for the same href as a preload: "%s". When using a style tag to inline styles you should not also preload it as a stylsheet.',
  3399. href$jscomp$0
  3400. );
  3401. styleQueue$jscomp$0 ||
  3402. ((styleQueue$jscomp$0 = {
  3403. precedence: escapeTextForBrowser(precedence$jscomp$0),
  3404. rules: [],
  3405. hrefs: [],
  3406. sheets: new Map()
  3407. }),
  3408. renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
  3409. var nonceStyle = renderState.nonce.style;
  3410. if (nonceStyle && nonceStyle !== nonce)
  3411. console.error(
  3412. 'React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce "%s" that was included with this render.',
  3413. precedence$jscomp$0,
  3414. nonce,
  3415. nonceStyle
  3416. );
  3417. else {
  3418. !nonceStyle &&
  3419. nonce &&
  3420. console.error(
  3421. 'React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',
  3422. precedence$jscomp$0,
  3423. nonce
  3424. );
  3425. styleQueue$jscomp$0.hrefs.push(escapeTextForBrowser(href$jscomp$0));
  3426. var target = styleQueue$jscomp$0.rules,
  3427. children$jscomp$9 = null,
  3428. innerHTML$jscomp$6 = null,
  3429. propKey$jscomp$9;
  3430. for (propKey$jscomp$9 in props)
  3431. if (hasOwnProperty.call(props, propKey$jscomp$9)) {
  3432. var propValue$jscomp$9 = props[propKey$jscomp$9];
  3433. if (null != propValue$jscomp$9)
  3434. switch (propKey$jscomp$9) {
  3435. case "children":
  3436. children$jscomp$9 = propValue$jscomp$9;
  3437. break;
  3438. case "dangerouslySetInnerHTML":
  3439. innerHTML$jscomp$6 = propValue$jscomp$9;
  3440. }
  3441. }
  3442. var child$jscomp$2 = Array.isArray(children$jscomp$9)
  3443. ? 2 > children$jscomp$9.length
  3444. ? children$jscomp$9[0]
  3445. : null
  3446. : children$jscomp$9;
  3447. "function" !== typeof child$jscomp$2 &&
  3448. "symbol" !== typeof child$jscomp$2 &&
  3449. null !== child$jscomp$2 &&
  3450. void 0 !== child$jscomp$2 &&
  3451. target.push(escapeStyleTextContent(child$jscomp$2));
  3452. pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);
  3453. }
  3454. }
  3455. styleQueue$jscomp$0 &&
  3456. hoistableState &&
  3457. hoistableState.styles.add(styleQueue$jscomp$0);
  3458. textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
  3459. JSCompiler_inline_result$jscomp$7 = void 0;
  3460. }
  3461. return JSCompiler_inline_result$jscomp$7;
  3462. case "meta":
  3463. var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,
  3464. isFallback$jscomp$1 = formatContext.tagScope & 4;
  3465. if (
  3466. formatContext.insertionMode === SVG_MODE ||
  3467. noscriptTagInScope$jscomp$3 ||
  3468. null != props.itemProp
  3469. )
  3470. var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(
  3471. target$jscomp$0,
  3472. props,
  3473. "meta"
  3474. );
  3475. else
  3476. textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
  3477. (JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1
  3478. ? null
  3479. : "string" === typeof props.charSet
  3480. ? pushSelfClosing(renderState.charsetChunks, props, "meta")
  3481. : "viewport" === props.name
  3482. ? pushSelfClosing(renderState.viewportChunks, props, "meta")
  3483. : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
  3484. return JSCompiler_inline_result$jscomp$8;
  3485. case "listing":
  3486. case "pre":
  3487. target$jscomp$0.push(startChunkForTag(type));
  3488. var children$jscomp$10 = null,
  3489. innerHTML$jscomp$7 = null,
  3490. propKey$jscomp$10;
  3491. for (propKey$jscomp$10 in props)
  3492. if (hasOwnProperty.call(props, propKey$jscomp$10)) {
  3493. var propValue$jscomp$10 = props[propKey$jscomp$10];
  3494. if (null != propValue$jscomp$10)
  3495. switch (propKey$jscomp$10) {
  3496. case "children":
  3497. children$jscomp$10 = propValue$jscomp$10;
  3498. break;
  3499. case "dangerouslySetInnerHTML":
  3500. innerHTML$jscomp$7 = propValue$jscomp$10;
  3501. break;
  3502. default:
  3503. pushAttribute(
  3504. target$jscomp$0,
  3505. propKey$jscomp$10,
  3506. propValue$jscomp$10
  3507. );
  3508. }
  3509. }
  3510. target$jscomp$0.push(endOfStartTag);
  3511. if (null != innerHTML$jscomp$7) {
  3512. if (null != children$jscomp$10)
  3513. throw Error(
  3514. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  3515. );
  3516. if (
  3517. "object" !== typeof innerHTML$jscomp$7 ||
  3518. !("__html" in innerHTML$jscomp$7)
  3519. )
  3520. throw Error(
  3521. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  3522. );
  3523. var html = innerHTML$jscomp$7.__html;
  3524. null !== html &&
  3525. void 0 !== html &&
  3526. ("string" === typeof html && 0 < html.length && "\n" === html[0]
  3527. ? target$jscomp$0.push("\n", html)
  3528. : (checkHtmlStringCoercion(html), target$jscomp$0.push("" + html)));
  3529. }
  3530. "string" === typeof children$jscomp$10 &&
  3531. "\n" === children$jscomp$10[0] &&
  3532. target$jscomp$0.push("\n");
  3533. return children$jscomp$10;
  3534. case "img":
  3535. var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,
  3536. src = props.src,
  3537. srcSet = props.srcSet;
  3538. if (
  3539. !(
  3540. "lazy" === props.loading ||
  3541. (!src && !srcSet) ||
  3542. ("string" !== typeof src && null != src) ||
  3543. ("string" !== typeof srcSet && null != srcSet) ||
  3544. "low" === props.fetchPriority ||
  3545. pictureOrNoScriptTagInScope
  3546. ) &&
  3547. ("string" !== typeof src ||
  3548. ":" !== src[4] ||
  3549. ("d" !== src[0] && "D" !== src[0]) ||
  3550. ("a" !== src[1] && "A" !== src[1]) ||
  3551. ("t" !== src[2] && "T" !== src[2]) ||
  3552. ("a" !== src[3] && "A" !== src[3])) &&
  3553. ("string" !== typeof srcSet ||
  3554. ":" !== srcSet[4] ||
  3555. ("d" !== srcSet[0] && "D" !== srcSet[0]) ||
  3556. ("a" !== srcSet[1] && "A" !== srcSet[1]) ||
  3557. ("t" !== srcSet[2] && "T" !== srcSet[2]) ||
  3558. ("a" !== srcSet[3] && "A" !== srcSet[3]))
  3559. ) {
  3560. null !== hoistableState &&
  3561. formatContext.tagScope & 64 &&
  3562. (hoistableState.suspenseyImages = !0);
  3563. var sizes = "string" === typeof props.sizes ? props.sizes : void 0,
  3564. key$jscomp$0 = srcSet ? srcSet + "\n" + (sizes || "") : src,
  3565. promotablePreloads = renderState.preloads.images,
  3566. resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);
  3567. if (resource$jscomp$1) {
  3568. if (
  3569. "high" === props.fetchPriority ||
  3570. 10 > renderState.highImagePreloads.size
  3571. )
  3572. promotablePreloads.delete(key$jscomp$0),
  3573. renderState.highImagePreloads.add(resource$jscomp$1);
  3574. } else if (
  3575. !resumableState.imageResources.hasOwnProperty(key$jscomp$0)
  3576. ) {
  3577. resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
  3578. var input = props.crossOrigin;
  3579. var crossOrigin =
  3580. "string" === typeof input
  3581. ? "use-credentials" === input
  3582. ? input
  3583. : ""
  3584. : void 0;
  3585. var headers = renderState.headers,
  3586. header;
  3587. headers &&
  3588. 0 < headers.remainingCapacity &&
  3589. "string" !== typeof props.srcSet &&
  3590. ("high" === props.fetchPriority ||
  3591. 500 > headers.highImagePreloads.length) &&
  3592. ((header = getPreloadAsHeader(src, "image", {
  3593. imageSrcSet: props.srcSet,
  3594. imageSizes: props.sizes,
  3595. crossOrigin: crossOrigin,
  3596. integrity: props.integrity,
  3597. nonce: props.nonce,
  3598. type: props.type,
  3599. fetchPriority: props.fetchPriority,
  3600. referrerPolicy: props.refererPolicy
  3601. })),
  3602. 0 <= (headers.remainingCapacity -= header.length + 2))
  3603. ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
  3604. headers.highImagePreloads && (headers.highImagePreloads += ", "),
  3605. (headers.highImagePreloads += header))
  3606. : ((resource$jscomp$1 = []),
  3607. pushLinkImpl(resource$jscomp$1, {
  3608. rel: "preload",
  3609. as: "image",
  3610. href: srcSet ? void 0 : src,
  3611. imageSrcSet: srcSet,
  3612. imageSizes: sizes,
  3613. crossOrigin: crossOrigin,
  3614. integrity: props.integrity,
  3615. type: props.type,
  3616. fetchPriority: props.fetchPriority,
  3617. referrerPolicy: props.referrerPolicy
  3618. }),
  3619. "high" === props.fetchPriority ||
  3620. 10 > renderState.highImagePreloads.size
  3621. ? renderState.highImagePreloads.add(resource$jscomp$1)
  3622. : (renderState.bulkPreloads.add(resource$jscomp$1),
  3623. promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
  3624. }
  3625. }
  3626. return pushSelfClosing(target$jscomp$0, props, "img");
  3627. case "base":
  3628. case "area":
  3629. case "br":
  3630. case "col":
  3631. case "embed":
  3632. case "hr":
  3633. case "keygen":
  3634. case "param":
  3635. case "source":
  3636. case "track":
  3637. case "wbr":
  3638. return pushSelfClosing(target$jscomp$0, props, type);
  3639. case "annotation-xml":
  3640. case "color-profile":
  3641. case "font-face":
  3642. case "font-face-src":
  3643. case "font-face-uri":
  3644. case "font-face-format":
  3645. case "font-face-name":
  3646. case "missing-glyph":
  3647. break;
  3648. case "head":
  3649. if (formatContext.insertionMode < HTML_MODE) {
  3650. var preamble = preambleState || renderState.preamble;
  3651. if (preamble.headChunks)
  3652. throw Error("The `<head>` tag may only be rendered once.");
  3653. null !== preambleState && target$jscomp$0.push("\x3c!--head--\x3e");
  3654. preamble.headChunks = [];
  3655. var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
  3656. preamble.headChunks,
  3657. props,
  3658. "head"
  3659. );
  3660. } else
  3661. JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
  3662. target$jscomp$0,
  3663. props,
  3664. "head"
  3665. );
  3666. return JSCompiler_inline_result$jscomp$9;
  3667. case "body":
  3668. if (formatContext.insertionMode < HTML_MODE) {
  3669. var preamble$jscomp$0 = preambleState || renderState.preamble;
  3670. if (preamble$jscomp$0.bodyChunks)
  3671. throw Error("The `<body>` tag may only be rendered once.");
  3672. null !== preambleState && target$jscomp$0.push("\x3c!--body--\x3e");
  3673. preamble$jscomp$0.bodyChunks = [];
  3674. var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
  3675. preamble$jscomp$0.bodyChunks,
  3676. props,
  3677. "body"
  3678. );
  3679. } else
  3680. JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
  3681. target$jscomp$0,
  3682. props,
  3683. "body"
  3684. );
  3685. return JSCompiler_inline_result$jscomp$10;
  3686. case "html":
  3687. if (formatContext.insertionMode === ROOT_HTML_MODE) {
  3688. var preamble$jscomp$1 = preambleState || renderState.preamble;
  3689. if (preamble$jscomp$1.htmlChunks)
  3690. throw Error("The `<html>` tag may only be rendered once.");
  3691. null !== preambleState && target$jscomp$0.push("\x3c!--html--\x3e");
  3692. preamble$jscomp$1.htmlChunks = ["<!DOCTYPE html>"];
  3693. var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
  3694. preamble$jscomp$1.htmlChunks,
  3695. props,
  3696. "html"
  3697. );
  3698. } else
  3699. JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
  3700. target$jscomp$0,
  3701. props,
  3702. "html"
  3703. );
  3704. return JSCompiler_inline_result$jscomp$11;
  3705. default:
  3706. if (-1 !== type.indexOf("-")) {
  3707. target$jscomp$0.push(startChunkForTag(type));
  3708. var children$jscomp$11 = null,
  3709. innerHTML$jscomp$8 = null,
  3710. propKey$jscomp$11;
  3711. for (propKey$jscomp$11 in props)
  3712. if (hasOwnProperty.call(props, propKey$jscomp$11)) {
  3713. var propValue$jscomp$11 = props[propKey$jscomp$11];
  3714. if (null != propValue$jscomp$11) {
  3715. var attributeName = propKey$jscomp$11;
  3716. switch (propKey$jscomp$11) {
  3717. case "children":
  3718. children$jscomp$11 = propValue$jscomp$11;
  3719. break;
  3720. case "dangerouslySetInnerHTML":
  3721. innerHTML$jscomp$8 = propValue$jscomp$11;
  3722. break;
  3723. case "style":
  3724. pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
  3725. break;
  3726. case "suppressContentEditableWarning":
  3727. case "suppressHydrationWarning":
  3728. case "ref":
  3729. break;
  3730. case "className":
  3731. attributeName = "class";
  3732. default:
  3733. if (
  3734. isAttributeNameSafe(propKey$jscomp$11) &&
  3735. "function" !== typeof propValue$jscomp$11 &&
  3736. "symbol" !== typeof propValue$jscomp$11 &&
  3737. !1 !== propValue$jscomp$11
  3738. ) {
  3739. if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
  3740. else if ("object" === typeof propValue$jscomp$11) continue;
  3741. target$jscomp$0.push(
  3742. attributeSeparator,
  3743. attributeName,
  3744. attributeAssign,
  3745. escapeTextForBrowser(propValue$jscomp$11),
  3746. attributeEnd
  3747. );
  3748. }
  3749. }
  3750. }
  3751. }
  3752. target$jscomp$0.push(endOfStartTag);
  3753. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$11);
  3754. return children$jscomp$11;
  3755. }
  3756. }
  3757. return pushStartGenericElement(target$jscomp$0, props, type);
  3758. }
  3759. var endTagCache = new Map();
  3760. function endChunkForTag(tag) {
  3761. var chunk = endTagCache.get(tag);
  3762. void 0 === chunk && ((chunk = "</" + tag + ">"), endTagCache.set(tag, chunk));
  3763. return chunk;
  3764. }
  3765. function hoistPreambleState(renderState, preambleState) {
  3766. renderState = renderState.preamble;
  3767. null === renderState.htmlChunks &&
  3768. preambleState.htmlChunks &&
  3769. (renderState.htmlChunks = preambleState.htmlChunks);
  3770. null === renderState.headChunks &&
  3771. preambleState.headChunks &&
  3772. (renderState.headChunks = preambleState.headChunks);
  3773. null === renderState.bodyChunks &&
  3774. preambleState.bodyChunks &&
  3775. (renderState.bodyChunks = preambleState.bodyChunks);
  3776. }
  3777. function writeBootstrap(destination, renderState) {
  3778. renderState = renderState.bootstrapChunks;
  3779. for (var i = 0; i < renderState.length - 1; i++)
  3780. writeChunk(destination, renderState[i]);
  3781. return i < renderState.length
  3782. ? ((i = renderState[i]), (renderState.length = 0), !!destination.write(i))
  3783. : !0;
  3784. }
  3785. var shellTimeRuntimeScript =
  3786. "requestAnimationFrame(function(){$RT=performance.now()});",
  3787. placeholder1 = '<template id="',
  3788. placeholder2 = '"></template>',
  3789. startCompletedSuspenseBoundary = "\x3c!--$--\x3e",
  3790. startPendingSuspenseBoundary1 = '\x3c!--$?--\x3e<template id="',
  3791. startPendingSuspenseBoundary2 = '"></template>',
  3792. startClientRenderedSuspenseBoundary = "\x3c!--$!--\x3e",
  3793. endSuspenseBoundary = "\x3c!--/$--\x3e",
  3794. clientRenderedSuspenseBoundaryError1 = "<template",
  3795. clientRenderedSuspenseBoundaryErrorAttrInterstitial = '"',
  3796. clientRenderedSuspenseBoundaryError1A = ' data-dgst="',
  3797. clientRenderedSuspenseBoundaryError1B = ' data-msg="',
  3798. clientRenderedSuspenseBoundaryError1C = ' data-stck="',
  3799. clientRenderedSuspenseBoundaryError1D = ' data-cstck="',
  3800. clientRenderedSuspenseBoundaryError2 = "></template>";
  3801. function writeStartPendingSuspenseBoundary(destination, renderState, id) {
  3802. writeChunk(destination, startPendingSuspenseBoundary1);
  3803. if (null === id)
  3804. throw Error(
  3805. "An ID must have been assigned before we can complete the boundary."
  3806. );
  3807. writeChunk(destination, renderState.boundaryPrefix);
  3808. writeChunk(destination, id.toString(16));
  3809. return !!destination.write(startPendingSuspenseBoundary2);
  3810. }
  3811. var startSegmentHTML = '<div hidden id="',
  3812. startSegmentHTML2 = '">',
  3813. endSegmentHTML = "</div>",
  3814. startSegmentSVG = '<svg aria-hidden="true" style="display:none" id="',
  3815. startSegmentSVG2 = '">',
  3816. endSegmentSVG = "</svg>",
  3817. startSegmentMathML = '<math aria-hidden="true" style="display:none" id="',
  3818. startSegmentMathML2 = '">',
  3819. endSegmentMathML = "</math>",
  3820. startSegmentTable = '<table hidden id="',
  3821. startSegmentTable2 = '">',
  3822. endSegmentTable = "</table>",
  3823. startSegmentTableBody = '<table hidden><tbody id="',
  3824. startSegmentTableBody2 = '">',
  3825. endSegmentTableBody = "</tbody></table>",
  3826. startSegmentTableRow = '<table hidden><tr id="',
  3827. startSegmentTableRow2 = '">',
  3828. endSegmentTableRow = "</tr></table>",
  3829. startSegmentColGroup = '<table hidden><colgroup id="',
  3830. startSegmentColGroup2 = '">',
  3831. endSegmentColGroup = "</colgroup></table>";
  3832. function writeStartSegment(destination, renderState, formatContext, id) {
  3833. switch (formatContext.insertionMode) {
  3834. case ROOT_HTML_MODE:
  3835. case HTML_HTML_MODE:
  3836. case HTML_HEAD_MODE:
  3837. case HTML_MODE:
  3838. return (
  3839. writeChunk(destination, startSegmentHTML),
  3840. writeChunk(destination, renderState.segmentPrefix),
  3841. writeChunk(destination, id.toString(16)),
  3842. !!destination.write(startSegmentHTML2)
  3843. );
  3844. case SVG_MODE:
  3845. return (
  3846. writeChunk(destination, startSegmentSVG),
  3847. writeChunk(destination, renderState.segmentPrefix),
  3848. writeChunk(destination, id.toString(16)),
  3849. !!destination.write(startSegmentSVG2)
  3850. );
  3851. case MATHML_MODE:
  3852. return (
  3853. writeChunk(destination, startSegmentMathML),
  3854. writeChunk(destination, renderState.segmentPrefix),
  3855. writeChunk(destination, id.toString(16)),
  3856. !!destination.write(startSegmentMathML2)
  3857. );
  3858. case HTML_TABLE_MODE:
  3859. return (
  3860. writeChunk(destination, startSegmentTable),
  3861. writeChunk(destination, renderState.segmentPrefix),
  3862. writeChunk(destination, id.toString(16)),
  3863. !!destination.write(startSegmentTable2)
  3864. );
  3865. case HTML_TABLE_BODY_MODE:
  3866. return (
  3867. writeChunk(destination, startSegmentTableBody),
  3868. writeChunk(destination, renderState.segmentPrefix),
  3869. writeChunk(destination, id.toString(16)),
  3870. !!destination.write(startSegmentTableBody2)
  3871. );
  3872. case HTML_TABLE_ROW_MODE:
  3873. return (
  3874. writeChunk(destination, startSegmentTableRow),
  3875. writeChunk(destination, renderState.segmentPrefix),
  3876. writeChunk(destination, id.toString(16)),
  3877. !!destination.write(startSegmentTableRow2)
  3878. );
  3879. case HTML_COLGROUP_MODE:
  3880. return (
  3881. writeChunk(destination, startSegmentColGroup),
  3882. writeChunk(destination, renderState.segmentPrefix),
  3883. writeChunk(destination, id.toString(16)),
  3884. !!destination.write(startSegmentColGroup2)
  3885. );
  3886. default:
  3887. throw Error("Unknown insertion mode. This is a bug in React.");
  3888. }
  3889. }
  3890. function writeEndSegment(destination, formatContext) {
  3891. switch (formatContext.insertionMode) {
  3892. case ROOT_HTML_MODE:
  3893. case HTML_HTML_MODE:
  3894. case HTML_HEAD_MODE:
  3895. case HTML_MODE:
  3896. return !!destination.write(endSegmentHTML);
  3897. case SVG_MODE:
  3898. return !!destination.write(endSegmentSVG);
  3899. case MATHML_MODE:
  3900. return !!destination.write(endSegmentMathML);
  3901. case HTML_TABLE_MODE:
  3902. return !!destination.write(endSegmentTable);
  3903. case HTML_TABLE_BODY_MODE:
  3904. return !!destination.write(endSegmentTableBody);
  3905. case HTML_TABLE_ROW_MODE:
  3906. return !!destination.write(endSegmentTableRow);
  3907. case HTML_COLGROUP_MODE:
  3908. return !!destination.write(endSegmentColGroup);
  3909. default:
  3910. throw Error("Unknown insertion mode. This is a bug in React.");
  3911. }
  3912. }
  3913. var completeSegmentScript1Full =
  3914. '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("',
  3915. completeSegmentScript1Partial = '$RS("',
  3916. completeSegmentScript2 = '","',
  3917. completeSegmentScriptEnd = '")\x3c/script>',
  3918. completeBoundaryScriptFunctionOnly =
  3919. '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};',
  3920. completeBoundaryScript1Partial = '$RC("',
  3921. completeBoundaryWithStylesScript1FullPartial =
  3922. '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=\n"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\n"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("',
  3923. completeBoundaryWithStylesScript1Partial = '$RR("',
  3924. completeBoundaryScript2 = '","',
  3925. completeBoundaryScript3a = '",',
  3926. completeBoundaryScript3b = '"',
  3927. completeBoundaryScriptEnd = ")\x3c/script>",
  3928. clientRenderScriptFunctionOnly =
  3929. '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};',
  3930. clientRenderScript1Full =
  3931. '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("',
  3932. clientRenderScript1Partial = '$RX("',
  3933. clientRenderScript1A = '"',
  3934. clientRenderErrorScriptArgInterstitial = ",",
  3935. clientRenderScriptEnd = ")\x3c/script>",
  3936. regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
  3937. function escapeJSStringsForInstructionScripts(input) {
  3938. return JSON.stringify(input).replace(
  3939. regexForJSStringsInInstructionScripts,
  3940. function (match) {
  3941. switch (match) {
  3942. case "<":
  3943. return "\\u003c";
  3944. case "\u2028":
  3945. return "\\u2028";
  3946. case "\u2029":
  3947. return "\\u2029";
  3948. default:
  3949. throw Error(
  3950. "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  3951. );
  3952. }
  3953. }
  3954. );
  3955. }
  3956. var regexForJSStringsInScripts = /[&><\u2028\u2029]/g;
  3957. function escapeJSObjectForInstructionScripts(input) {
  3958. return JSON.stringify(input).replace(
  3959. regexForJSStringsInScripts,
  3960. function (match) {
  3961. switch (match) {
  3962. case "&":
  3963. return "\\u0026";
  3964. case ">":
  3965. return "\\u003e";
  3966. case "<":
  3967. return "\\u003c";
  3968. case "\u2028":
  3969. return "\\u2028";
  3970. case "\u2029":
  3971. return "\\u2029";
  3972. default:
  3973. throw Error(
  3974. "escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  3975. );
  3976. }
  3977. }
  3978. );
  3979. }
  3980. var lateStyleTagResourceOpen1 = ' media="not all" data-precedence="',
  3981. lateStyleTagResourceOpen2 = '" data-href="',
  3982. lateStyleTagResourceOpen3 = '">',
  3983. lateStyleTagTemplateClose = "</style>",
  3984. currentlyRenderingBoundaryHasStylesToHoist = !1,
  3985. destinationHasCapacity = !0;
  3986. function flushStyleTagsLateForBoundary(styleQueue) {
  3987. var rules = styleQueue.rules,
  3988. hrefs = styleQueue.hrefs;
  3989. 0 < rules.length &&
  3990. 0 === hrefs.length &&
  3991. console.error(
  3992. "React expected to have at least one href for an a hoistable style but found none. This is a bug in React."
  3993. );
  3994. var i = 0;
  3995. if (hrefs.length) {
  3996. writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
  3997. writeChunk(this, lateStyleTagResourceOpen1);
  3998. writeChunk(this, styleQueue.precedence);
  3999. for (writeChunk(this, lateStyleTagResourceOpen2); i < hrefs.length - 1; i++)
  4000. writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);
  4001. writeChunk(this, hrefs[i]);
  4002. writeChunk(this, lateStyleTagResourceOpen3);
  4003. for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);
  4004. destinationHasCapacity = !!this.write(lateStyleTagTemplateClose);
  4005. currentlyRenderingBoundaryHasStylesToHoist = !0;
  4006. rules.length = 0;
  4007. hrefs.length = 0;
  4008. }
  4009. }
  4010. function hasStylesToHoist(stylesheet) {
  4011. return stylesheet.state !== PREAMBLE
  4012. ? (currentlyRenderingBoundaryHasStylesToHoist = !0)
  4013. : !1;
  4014. }
  4015. function writeHoistablesForBoundary(destination, hoistableState, renderState) {
  4016. currentlyRenderingBoundaryHasStylesToHoist = !1;
  4017. destinationHasCapacity = !0;
  4018. currentlyFlushingRenderState = renderState;
  4019. hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
  4020. currentlyFlushingRenderState = null;
  4021. hoistableState.stylesheets.forEach(hasStylesToHoist);
  4022. currentlyRenderingBoundaryHasStylesToHoist &&
  4023. (renderState.stylesToHoist = !0);
  4024. return destinationHasCapacity;
  4025. }
  4026. function flushResource(resource) {
  4027. for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);
  4028. resource.length = 0;
  4029. }
  4030. var stylesheetFlushingQueue = [];
  4031. function flushStyleInPreamble(stylesheet) {
  4032. pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);
  4033. for (var i = 0; i < stylesheetFlushingQueue.length; i++)
  4034. writeChunk(this, stylesheetFlushingQueue[i]);
  4035. stylesheetFlushingQueue.length = 0;
  4036. stylesheet.state = PREAMBLE;
  4037. }
  4038. var styleTagResourceOpen1 = ' data-precedence="',
  4039. styleTagResourceOpen2 = '" data-href="',
  4040. spaceSeparator = " ",
  4041. styleTagResourceOpen3 = '">',
  4042. styleTagResourceClose = "</style>";
  4043. function flushStylesInPreamble(styleQueue) {
  4044. var hasStylesheets = 0 < styleQueue.sheets.size;
  4045. styleQueue.sheets.forEach(flushStyleInPreamble, this);
  4046. styleQueue.sheets.clear();
  4047. var rules = styleQueue.rules,
  4048. hrefs = styleQueue.hrefs;
  4049. if (!hasStylesheets || hrefs.length) {
  4050. writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
  4051. writeChunk(this, styleTagResourceOpen1);
  4052. writeChunk(this, styleQueue.precedence);
  4053. styleQueue = 0;
  4054. if (hrefs.length) {
  4055. for (
  4056. writeChunk(this, styleTagResourceOpen2);
  4057. styleQueue < hrefs.length - 1;
  4058. styleQueue++
  4059. )
  4060. writeChunk(this, hrefs[styleQueue]), writeChunk(this, spaceSeparator);
  4061. writeChunk(this, hrefs[styleQueue]);
  4062. }
  4063. writeChunk(this, styleTagResourceOpen3);
  4064. for (styleQueue = 0; styleQueue < rules.length; styleQueue++)
  4065. writeChunk(this, rules[styleQueue]);
  4066. writeChunk(this, styleTagResourceClose);
  4067. rules.length = 0;
  4068. hrefs.length = 0;
  4069. }
  4070. }
  4071. function preloadLateStyle(stylesheet) {
  4072. if (stylesheet.state === PENDING$1) {
  4073. stylesheet.state = PRELOADED;
  4074. var props = stylesheet.props;
  4075. pushLinkImpl(stylesheetFlushingQueue, {
  4076. rel: "preload",
  4077. as: "style",
  4078. href: stylesheet.props.href,
  4079. crossOrigin: props.crossOrigin,
  4080. fetchPriority: props.fetchPriority,
  4081. integrity: props.integrity,
  4082. media: props.media,
  4083. hrefLang: props.hrefLang,
  4084. referrerPolicy: props.referrerPolicy
  4085. });
  4086. for (
  4087. stylesheet = 0;
  4088. stylesheet < stylesheetFlushingQueue.length;
  4089. stylesheet++
  4090. )
  4091. writeChunk(this, stylesheetFlushingQueue[stylesheet]);
  4092. stylesheetFlushingQueue.length = 0;
  4093. }
  4094. }
  4095. function preloadLateStyles(styleQueue) {
  4096. styleQueue.sheets.forEach(preloadLateStyle, this);
  4097. styleQueue.sheets.clear();
  4098. }
  4099. var completedShellIdAttributeStart = ' id="';
  4100. function pushCompletedShellIdAttribute(target, resumableState) {
  4101. (resumableState.instructions & SentCompletedShellId) === NothingSent &&
  4102. ((resumableState.instructions |= SentCompletedShellId),
  4103. target.push(
  4104. completedShellIdAttributeStart,
  4105. escapeTextForBrowser("_" + resumableState.idPrefix + "R_"),
  4106. attributeEnd
  4107. ));
  4108. }
  4109. var arrayFirstOpenBracket = "[",
  4110. arraySubsequentOpenBracket = ",[",
  4111. arrayInterstitial = ",",
  4112. arrayCloseBracket = "]";
  4113. function writeStyleResourceDependenciesInJS(destination, hoistableState) {
  4114. writeChunk(destination, arrayFirstOpenBracket);
  4115. var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
  4116. hoistableState.stylesheets.forEach(function (resource) {
  4117. if (resource.state !== PREAMBLE)
  4118. if (resource.state === LATE)
  4119. writeChunk(destination, nextArrayOpenBrackChunk),
  4120. (resource = resource.props.href),
  4121. checkAttributeStringCoercion(resource, "href"),
  4122. writeChunk(
  4123. destination,
  4124. escapeJSObjectForInstructionScripts("" + resource)
  4125. ),
  4126. writeChunk(destination, arrayCloseBracket),
  4127. (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);
  4128. else {
  4129. writeChunk(destination, nextArrayOpenBrackChunk);
  4130. var precedence = resource.props["data-precedence"],
  4131. props = resource.props,
  4132. coercedHref = sanitizeURL("" + resource.props.href);
  4133. writeChunk(
  4134. destination,
  4135. escapeJSObjectForInstructionScripts(coercedHref)
  4136. );
  4137. checkAttributeStringCoercion(precedence, "precedence");
  4138. precedence = "" + precedence;
  4139. writeChunk(destination, arrayInterstitial);
  4140. writeChunk(
  4141. destination,
  4142. escapeJSObjectForInstructionScripts(precedence)
  4143. );
  4144. for (var propKey in props)
  4145. if (
  4146. hasOwnProperty.call(props, propKey) &&
  4147. ((precedence = props[propKey]), null != precedence)
  4148. )
  4149. switch (propKey) {
  4150. case "href":
  4151. case "rel":
  4152. case "precedence":
  4153. case "data-precedence":
  4154. break;
  4155. case "children":
  4156. case "dangerouslySetInnerHTML":
  4157. throw Error(
  4158. "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  4159. );
  4160. default:
  4161. writeStyleResourceAttributeInJS(
  4162. destination,
  4163. propKey,
  4164. precedence
  4165. );
  4166. }
  4167. writeChunk(destination, arrayCloseBracket);
  4168. nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
  4169. resource.state = LATE;
  4170. }
  4171. });
  4172. writeChunk(destination, arrayCloseBracket);
  4173. }
  4174. function writeStyleResourceAttributeInJS(destination, name, value) {
  4175. var attributeName = name.toLowerCase();
  4176. switch (typeof value) {
  4177. case "function":
  4178. case "symbol":
  4179. return;
  4180. }
  4181. switch (name) {
  4182. case "innerHTML":
  4183. case "dangerouslySetInnerHTML":
  4184. case "suppressContentEditableWarning":
  4185. case "suppressHydrationWarning":
  4186. case "style":
  4187. case "ref":
  4188. return;
  4189. case "className":
  4190. attributeName = "class";
  4191. checkAttributeStringCoercion(value, attributeName);
  4192. name = "" + value;
  4193. break;
  4194. case "hidden":
  4195. if (!1 === value) return;
  4196. name = "";
  4197. break;
  4198. case "src":
  4199. case "href":
  4200. value = sanitizeURL(value);
  4201. checkAttributeStringCoercion(value, attributeName);
  4202. name = "" + value;
  4203. break;
  4204. default:
  4205. if (
  4206. (2 < name.length &&
  4207. ("o" === name[0] || "O" === name[0]) &&
  4208. ("n" === name[1] || "N" === name[1])) ||
  4209. !isAttributeNameSafe(name)
  4210. )
  4211. return;
  4212. checkAttributeStringCoercion(value, attributeName);
  4213. name = "" + value;
  4214. }
  4215. writeChunk(destination, arrayInterstitial);
  4216. writeChunk(destination, escapeJSObjectForInstructionScripts(attributeName));
  4217. writeChunk(destination, arrayInterstitial);
  4218. writeChunk(destination, escapeJSObjectForInstructionScripts(name));
  4219. }
  4220. var PENDING$1 = 0,
  4221. PRELOADED = 1,
  4222. PREAMBLE = 2,
  4223. LATE = 3;
  4224. function createHoistableState() {
  4225. return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };
  4226. }
  4227. function prefetchDNS(href) {
  4228. var request = currentRequest ? currentRequest : null;
  4229. if (request) {
  4230. var resumableState = request.resumableState,
  4231. renderState = request.renderState;
  4232. if ("string" === typeof href && href) {
  4233. if (!resumableState.dnsResources.hasOwnProperty(href)) {
  4234. resumableState.dnsResources[href] = EXISTS;
  4235. resumableState = renderState.headers;
  4236. var header, JSCompiler_temp;
  4237. if (
  4238. (JSCompiler_temp =
  4239. resumableState && 0 < resumableState.remainingCapacity)
  4240. )
  4241. JSCompiler_temp =
  4242. ((header =
  4243. "<" +
  4244. escapeHrefForLinkHeaderURLContext(href) +
  4245. ">; rel=dns-prefetch"),
  4246. 0 <= (resumableState.remainingCapacity -= header.length + 2));
  4247. JSCompiler_temp
  4248. ? ((renderState.resets.dns[href] = EXISTS),
  4249. resumableState.preconnects && (resumableState.preconnects += ", "),
  4250. (resumableState.preconnects += header))
  4251. : ((header = []),
  4252. pushLinkImpl(header, { href: href, rel: "dns-prefetch" }),
  4253. renderState.preconnects.add(header));
  4254. }
  4255. enqueueFlush(request);
  4256. }
  4257. } else previousDispatcher.D(href);
  4258. }
  4259. function preconnect(href, crossOrigin) {
  4260. var request = currentRequest ? currentRequest : null;
  4261. if (request) {
  4262. var resumableState = request.resumableState,
  4263. renderState = request.renderState;
  4264. if ("string" === typeof href && href) {
  4265. var bucket =
  4266. "use-credentials" === crossOrigin
  4267. ? "credentials"
  4268. : "string" === typeof crossOrigin
  4269. ? "anonymous"
  4270. : "default";
  4271. if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
  4272. resumableState.connectResources[bucket][href] = EXISTS;
  4273. resumableState = renderState.headers;
  4274. var header, JSCompiler_temp;
  4275. if (
  4276. (JSCompiler_temp =
  4277. resumableState && 0 < resumableState.remainingCapacity)
  4278. ) {
  4279. JSCompiler_temp =
  4280. "<" + escapeHrefForLinkHeaderURLContext(href) + ">; rel=preconnect";
  4281. if ("string" === typeof crossOrigin) {
  4282. var escapedCrossOrigin =
  4283. escapeStringForLinkHeaderQuotedParamValueContext(
  4284. crossOrigin,
  4285. "crossOrigin"
  4286. );
  4287. JSCompiler_temp += '; crossorigin="' + escapedCrossOrigin + '"';
  4288. }
  4289. JSCompiler_temp =
  4290. ((header = JSCompiler_temp),
  4291. 0 <= (resumableState.remainingCapacity -= header.length + 2));
  4292. }
  4293. JSCompiler_temp
  4294. ? ((renderState.resets.connect[bucket][href] = EXISTS),
  4295. resumableState.preconnects && (resumableState.preconnects += ", "),
  4296. (resumableState.preconnects += header))
  4297. : ((bucket = []),
  4298. pushLinkImpl(bucket, {
  4299. rel: "preconnect",
  4300. href: href,
  4301. crossOrigin: crossOrigin
  4302. }),
  4303. renderState.preconnects.add(bucket));
  4304. }
  4305. enqueueFlush(request);
  4306. }
  4307. } else previousDispatcher.C(href, crossOrigin);
  4308. }
  4309. function preload(href, as, options) {
  4310. var request = currentRequest ? currentRequest : null;
  4311. if (request) {
  4312. var resumableState = request.resumableState,
  4313. renderState = request.renderState;
  4314. if (as && href) {
  4315. switch (as) {
  4316. case "image":
  4317. if (options) {
  4318. var imageSrcSet = options.imageSrcSet;
  4319. var imageSizes = options.imageSizes;
  4320. var fetchPriority = options.fetchPriority;
  4321. }
  4322. var key = imageSrcSet
  4323. ? imageSrcSet + "\n" + (imageSizes || "")
  4324. : href;
  4325. if (resumableState.imageResources.hasOwnProperty(key)) return;
  4326. resumableState.imageResources[key] = PRELOAD_NO_CREDS;
  4327. resumableState = renderState.headers;
  4328. var header;
  4329. resumableState &&
  4330. 0 < resumableState.remainingCapacity &&
  4331. "string" !== typeof imageSrcSet &&
  4332. "high" === fetchPriority &&
  4333. ((header = getPreloadAsHeader(href, as, options)),
  4334. 0 <= (resumableState.remainingCapacity -= header.length + 2))
  4335. ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
  4336. resumableState.highImagePreloads &&
  4337. (resumableState.highImagePreloads += ", "),
  4338. (resumableState.highImagePreloads += header))
  4339. : ((resumableState = []),
  4340. pushLinkImpl(
  4341. resumableState,
  4342. assign(
  4343. { rel: "preload", href: imageSrcSet ? void 0 : href, as: as },
  4344. options
  4345. )
  4346. ),
  4347. "high" === fetchPriority
  4348. ? renderState.highImagePreloads.add(resumableState)
  4349. : (renderState.bulkPreloads.add(resumableState),
  4350. renderState.preloads.images.set(key, resumableState)));
  4351. break;
  4352. case "style":
  4353. if (resumableState.styleResources.hasOwnProperty(href)) return;
  4354. imageSrcSet = [];
  4355. pushLinkImpl(
  4356. imageSrcSet,
  4357. assign({ rel: "preload", href: href, as: as }, options)
  4358. );
  4359. resumableState.styleResources[href] =
  4360. !options ||
  4361. ("string" !== typeof options.crossOrigin &&
  4362. "string" !== typeof options.integrity)
  4363. ? PRELOAD_NO_CREDS
  4364. : [options.crossOrigin, options.integrity];
  4365. renderState.preloads.stylesheets.set(href, imageSrcSet);
  4366. renderState.bulkPreloads.add(imageSrcSet);
  4367. break;
  4368. case "script":
  4369. if (resumableState.scriptResources.hasOwnProperty(href)) return;
  4370. imageSrcSet = [];
  4371. renderState.preloads.scripts.set(href, imageSrcSet);
  4372. renderState.bulkPreloads.add(imageSrcSet);
  4373. pushLinkImpl(
  4374. imageSrcSet,
  4375. assign({ rel: "preload", href: href, as: as }, options)
  4376. );
  4377. resumableState.scriptResources[href] =
  4378. !options ||
  4379. ("string" !== typeof options.crossOrigin &&
  4380. "string" !== typeof options.integrity)
  4381. ? PRELOAD_NO_CREDS
  4382. : [options.crossOrigin, options.integrity];
  4383. break;
  4384. default:
  4385. if (resumableState.unknownResources.hasOwnProperty(as)) {
  4386. if (
  4387. ((imageSrcSet = resumableState.unknownResources[as]),
  4388. imageSrcSet.hasOwnProperty(href))
  4389. )
  4390. return;
  4391. } else
  4392. (imageSrcSet = {}),
  4393. (resumableState.unknownResources[as] = imageSrcSet);
  4394. imageSrcSet[href] = PRELOAD_NO_CREDS;
  4395. if (
  4396. (resumableState = renderState.headers) &&
  4397. 0 < resumableState.remainingCapacity &&
  4398. "font" === as &&
  4399. ((key = getPreloadAsHeader(href, as, options)),
  4400. 0 <= (resumableState.remainingCapacity -= key.length + 2))
  4401. )
  4402. (renderState.resets.font[href] = PRELOAD_NO_CREDS),
  4403. resumableState.fontPreloads &&
  4404. (resumableState.fontPreloads += ", "),
  4405. (resumableState.fontPreloads += key);
  4406. else
  4407. switch (
  4408. ((resumableState = []),
  4409. (href = assign({ rel: "preload", href: href, as: as }, options)),
  4410. pushLinkImpl(resumableState, href),
  4411. as)
  4412. ) {
  4413. case "font":
  4414. renderState.fontPreloads.add(resumableState);
  4415. break;
  4416. default:
  4417. renderState.bulkPreloads.add(resumableState);
  4418. }
  4419. }
  4420. enqueueFlush(request);
  4421. }
  4422. } else previousDispatcher.L(href, as, options);
  4423. }
  4424. function preloadModule(href, options) {
  4425. var request = currentRequest ? currentRequest : null;
  4426. if (request) {
  4427. var resumableState = request.resumableState,
  4428. renderState = request.renderState;
  4429. if (href) {
  4430. var as =
  4431. options && "string" === typeof options.as ? options.as : "script";
  4432. switch (as) {
  4433. case "script":
  4434. if (resumableState.moduleScriptResources.hasOwnProperty(href)) return;
  4435. as = [];
  4436. resumableState.moduleScriptResources[href] =
  4437. !options ||
  4438. ("string" !== typeof options.crossOrigin &&
  4439. "string" !== typeof options.integrity)
  4440. ? PRELOAD_NO_CREDS
  4441. : [options.crossOrigin, options.integrity];
  4442. renderState.preloads.moduleScripts.set(href, as);
  4443. break;
  4444. default:
  4445. if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {
  4446. var resources = resumableState.unknownResources[as];
  4447. if (resources.hasOwnProperty(href)) return;
  4448. } else
  4449. (resources = {}),
  4450. (resumableState.moduleUnknownResources[as] = resources);
  4451. as = [];
  4452. resources[href] = PRELOAD_NO_CREDS;
  4453. }
  4454. pushLinkImpl(as, assign({ rel: "modulepreload", href: href }, options));
  4455. renderState.bulkPreloads.add(as);
  4456. enqueueFlush(request);
  4457. }
  4458. } else previousDispatcher.m(href, options);
  4459. }
  4460. function preinitStyle(href, precedence, options) {
  4461. var request = currentRequest ? currentRequest : null;
  4462. if (request) {
  4463. var resumableState = request.resumableState,
  4464. renderState = request.renderState;
  4465. if (href) {
  4466. precedence = precedence || "default";
  4467. var styleQueue = renderState.styles.get(precedence),
  4468. resourceState = resumableState.styleResources.hasOwnProperty(href)
  4469. ? resumableState.styleResources[href]
  4470. : void 0;
  4471. resourceState !== EXISTS &&
  4472. ((resumableState.styleResources[href] = EXISTS),
  4473. styleQueue ||
  4474. ((styleQueue = {
  4475. precedence: escapeTextForBrowser(precedence),
  4476. rules: [],
  4477. hrefs: [],
  4478. sheets: new Map()
  4479. }),
  4480. renderState.styles.set(precedence, styleQueue)),
  4481. (precedence = {
  4482. state: PENDING$1,
  4483. props: assign(
  4484. { rel: "stylesheet", href: href, "data-precedence": precedence },
  4485. options
  4486. )
  4487. }),
  4488. resourceState &&
  4489. (2 === resourceState.length &&
  4490. adoptPreloadCredentials(precedence.props, resourceState),
  4491. (renderState = renderState.preloads.stylesheets.get(href)) &&
  4492. 0 < renderState.length
  4493. ? (renderState.length = 0)
  4494. : (precedence.state = PRELOADED)),
  4495. styleQueue.sheets.set(href, precedence),
  4496. enqueueFlush(request));
  4497. }
  4498. } else previousDispatcher.S(href, precedence, options);
  4499. }
  4500. function preinitScript(src, options) {
  4501. var request = currentRequest ? currentRequest : null;
  4502. if (request) {
  4503. var resumableState = request.resumableState,
  4504. renderState = request.renderState;
  4505. if (src) {
  4506. var resourceState = resumableState.scriptResources.hasOwnProperty(src)
  4507. ? resumableState.scriptResources[src]
  4508. : void 0;
  4509. resourceState !== EXISTS &&
  4510. ((resumableState.scriptResources[src] = EXISTS),
  4511. (options = assign({ src: src, async: !0 }, options)),
  4512. resourceState &&
  4513. (2 === resourceState.length &&
  4514. adoptPreloadCredentials(options, resourceState),
  4515. (src = renderState.preloads.scripts.get(src))) &&
  4516. (src.length = 0),
  4517. (src = []),
  4518. renderState.scripts.add(src),
  4519. pushScriptImpl(src, options),
  4520. enqueueFlush(request));
  4521. }
  4522. } else previousDispatcher.X(src, options);
  4523. }
  4524. function preinitModuleScript(src, options) {
  4525. var request = currentRequest ? currentRequest : null;
  4526. if (request) {
  4527. var resumableState = request.resumableState,
  4528. renderState = request.renderState;
  4529. if (src) {
  4530. var resourceState = resumableState.moduleScriptResources.hasOwnProperty(
  4531. src
  4532. )
  4533. ? resumableState.moduleScriptResources[src]
  4534. : void 0;
  4535. resourceState !== EXISTS &&
  4536. ((resumableState.moduleScriptResources[src] = EXISTS),
  4537. (options = assign({ src: src, type: "module", async: !0 }, options)),
  4538. resourceState &&
  4539. (2 === resourceState.length &&
  4540. adoptPreloadCredentials(options, resourceState),
  4541. (src = renderState.preloads.moduleScripts.get(src))) &&
  4542. (src.length = 0),
  4543. (src = []),
  4544. renderState.scripts.add(src),
  4545. pushScriptImpl(src, options),
  4546. enqueueFlush(request));
  4547. }
  4548. } else previousDispatcher.M(src, options);
  4549. }
  4550. function preloadBootstrapScriptOrModule(
  4551. resumableState,
  4552. renderState,
  4553. href,
  4554. props
  4555. ) {
  4556. (resumableState.scriptResources.hasOwnProperty(href) ||
  4557. resumableState.moduleScriptResources.hasOwnProperty(href)) &&
  4558. console.error(
  4559. 'Internal React Error: React expected bootstrap script or module with src "%s" to not have been preloaded already. please file an issue',
  4560. href
  4561. );
  4562. resumableState.scriptResources[href] = EXISTS;
  4563. resumableState.moduleScriptResources[href] = EXISTS;
  4564. resumableState = [];
  4565. pushLinkImpl(resumableState, props);
  4566. renderState.bootstrapScripts.add(resumableState);
  4567. }
  4568. function adoptPreloadCredentials(target, preloadState) {
  4569. null == target.crossOrigin && (target.crossOrigin = preloadState[0]);
  4570. null == target.integrity && (target.integrity = preloadState[1]);
  4571. }
  4572. function getPreloadAsHeader(href, as, params) {
  4573. href = escapeHrefForLinkHeaderURLContext(href);
  4574. as = escapeStringForLinkHeaderQuotedParamValueContext(as, "as");
  4575. as = "<" + href + '>; rel=preload; as="' + as + '"';
  4576. for (var paramName in params)
  4577. hasOwnProperty.call(params, paramName) &&
  4578. ((href = params[paramName]),
  4579. "string" === typeof href &&
  4580. (as +=
  4581. "; " +
  4582. paramName.toLowerCase() +
  4583. '="' +
  4584. escapeStringForLinkHeaderQuotedParamValueContext(href, paramName) +
  4585. '"'));
  4586. return as;
  4587. }
  4588. var regexForHrefInLinkHeaderURLContext = /[<>\r\n]/g;
  4589. function escapeHrefForLinkHeaderURLContext(hrefInput) {
  4590. checkAttributeStringCoercion(hrefInput, "href");
  4591. return ("" + hrefInput).replace(
  4592. regexForHrefInLinkHeaderURLContext,
  4593. escapeHrefForLinkHeaderURLContextReplacer
  4594. );
  4595. }
  4596. function escapeHrefForLinkHeaderURLContextReplacer(match) {
  4597. switch (match) {
  4598. case "<":
  4599. return "%3C";
  4600. case ">":
  4601. return "%3E";
  4602. case "\n":
  4603. return "%0A";
  4604. case "\r":
  4605. return "%0D";
  4606. default:
  4607. throw Error(
  4608. "escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  4609. );
  4610. }
  4611. }
  4612. var regexForLinkHeaderQuotedParamValueContext = /["';,\r\n]/g;
  4613. function escapeStringForLinkHeaderQuotedParamValueContext(value, name) {
  4614. willCoercionThrow(value) &&
  4615. (console.error(
  4616. "The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.",
  4617. name,
  4618. typeName(value)
  4619. ),
  4620. testStringCoercion(value));
  4621. return ("" + value).replace(
  4622. regexForLinkHeaderQuotedParamValueContext,
  4623. escapeStringForLinkHeaderQuotedParamValueContextReplacer
  4624. );
  4625. }
  4626. function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {
  4627. switch (match) {
  4628. case '"':
  4629. return "%22";
  4630. case "'":
  4631. return "%27";
  4632. case ";":
  4633. return "%3B";
  4634. case ",":
  4635. return "%2C";
  4636. case "\n":
  4637. return "%0A";
  4638. case "\r":
  4639. return "%0D";
  4640. default:
  4641. throw Error(
  4642. "escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  4643. );
  4644. }
  4645. }
  4646. function hoistStyleQueueDependency(styleQueue) {
  4647. this.styles.add(styleQueue);
  4648. }
  4649. function hoistStylesheetDependency(stylesheet) {
  4650. this.stylesheets.add(stylesheet);
  4651. }
  4652. function hoistHoistables(parentState, childState) {
  4653. childState.styles.forEach(hoistStyleQueueDependency, parentState);
  4654. childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
  4655. childState.suspenseyImages && (parentState.suspenseyImages = !0);
  4656. }
  4657. function hasSuspenseyContent(hoistableState) {
  4658. return 0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages;
  4659. }
  4660. var bind = Function.prototype.bind,
  4661. REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
  4662. function getComponentNameFromType(type) {
  4663. if (null == type) return null;
  4664. if ("function" === typeof type)
  4665. return type.$$typeof === REACT_CLIENT_REFERENCE
  4666. ? null
  4667. : type.displayName || type.name || null;
  4668. if ("string" === typeof type) return type;
  4669. switch (type) {
  4670. case REACT_FRAGMENT_TYPE:
  4671. return "Fragment";
  4672. case REACT_PROFILER_TYPE:
  4673. return "Profiler";
  4674. case REACT_STRICT_MODE_TYPE:
  4675. return "StrictMode";
  4676. case REACT_SUSPENSE_TYPE:
  4677. return "Suspense";
  4678. case REACT_SUSPENSE_LIST_TYPE:
  4679. return "SuspenseList";
  4680. case REACT_ACTIVITY_TYPE:
  4681. return "Activity";
  4682. }
  4683. if ("object" === typeof type)
  4684. switch (
  4685. ("number" === typeof type.tag &&
  4686. console.error(
  4687. "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
  4688. ),
  4689. type.$$typeof)
  4690. ) {
  4691. case REACT_PORTAL_TYPE:
  4692. return "Portal";
  4693. case REACT_CONTEXT_TYPE:
  4694. return type.displayName || "Context";
  4695. case REACT_CONSUMER_TYPE:
  4696. return (type._context.displayName || "Context") + ".Consumer";
  4697. case REACT_FORWARD_REF_TYPE:
  4698. var innerType = type.render;
  4699. type = type.displayName;
  4700. type ||
  4701. ((type = innerType.displayName || innerType.name || ""),
  4702. (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
  4703. return type;
  4704. case REACT_MEMO_TYPE:
  4705. return (
  4706. (innerType = type.displayName || null),
  4707. null !== innerType
  4708. ? innerType
  4709. : getComponentNameFromType(type.type) || "Memo"
  4710. );
  4711. case REACT_LAZY_TYPE:
  4712. innerType = type._payload;
  4713. type = type._init;
  4714. try {
  4715. return getComponentNameFromType(type(innerType));
  4716. } catch (x) {}
  4717. }
  4718. return null;
  4719. }
  4720. var emptyContextObject = {};
  4721. Object.freeze(emptyContextObject);
  4722. var rendererSigil;
  4723. rendererSigil = {};
  4724. var currentActiveSnapshot = null;
  4725. function popToNearestCommonAncestor(prev, next) {
  4726. if (prev !== next) {
  4727. prev.context._currentValue = prev.parentValue;
  4728. prev = prev.parent;
  4729. var parentNext = next.parent;
  4730. if (null === prev) {
  4731. if (null !== parentNext)
  4732. throw Error(
  4733. "The stacks must reach the root at the same time. This is a bug in React."
  4734. );
  4735. } else {
  4736. if (null === parentNext)
  4737. throw Error(
  4738. "The stacks must reach the root at the same time. This is a bug in React."
  4739. );
  4740. popToNearestCommonAncestor(prev, parentNext);
  4741. }
  4742. next.context._currentValue = next.value;
  4743. }
  4744. }
  4745. function popAllPrevious(prev) {
  4746. prev.context._currentValue = prev.parentValue;
  4747. prev = prev.parent;
  4748. null !== prev && popAllPrevious(prev);
  4749. }
  4750. function pushAllNext(next) {
  4751. var parentNext = next.parent;
  4752. null !== parentNext && pushAllNext(parentNext);
  4753. next.context._currentValue = next.value;
  4754. }
  4755. function popPreviousToCommonLevel(prev, next) {
  4756. prev.context._currentValue = prev.parentValue;
  4757. prev = prev.parent;
  4758. if (null === prev)
  4759. throw Error(
  4760. "The depth must equal at least at zero before reaching the root. This is a bug in React."
  4761. );
  4762. prev.depth === next.depth
  4763. ? popToNearestCommonAncestor(prev, next)
  4764. : popPreviousToCommonLevel(prev, next);
  4765. }
  4766. function popNextToCommonLevel(prev, next) {
  4767. var parentNext = next.parent;
  4768. if (null === parentNext)
  4769. throw Error(
  4770. "The depth must equal at least at zero before reaching the root. This is a bug in React."
  4771. );
  4772. prev.depth === parentNext.depth
  4773. ? popToNearestCommonAncestor(prev, parentNext)
  4774. : popNextToCommonLevel(prev, parentNext);
  4775. next.context._currentValue = next.value;
  4776. }
  4777. function switchContext(newSnapshot) {
  4778. var prev = currentActiveSnapshot;
  4779. prev !== newSnapshot &&
  4780. (null === prev
  4781. ? pushAllNext(newSnapshot)
  4782. : null === newSnapshot
  4783. ? popAllPrevious(prev)
  4784. : prev.depth === newSnapshot.depth
  4785. ? popToNearestCommonAncestor(prev, newSnapshot)
  4786. : prev.depth > newSnapshot.depth
  4787. ? popPreviousToCommonLevel(prev, newSnapshot)
  4788. : popNextToCommonLevel(prev, newSnapshot),
  4789. (currentActiveSnapshot = newSnapshot));
  4790. }
  4791. var didWarnAboutNoopUpdateForComponent = {},
  4792. didWarnAboutDeprecatedWillMount = {},
  4793. didWarnAboutUninitializedState,
  4794. didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate,
  4795. didWarnAboutLegacyLifecyclesAndDerivedState,
  4796. didWarnAboutUndefinedDerivedState,
  4797. didWarnAboutDirectlyAssigningPropsToState,
  4798. didWarnAboutContextTypes$1,
  4799. didWarnAboutChildContextTypes,
  4800. didWarnAboutInvalidateContextType,
  4801. didWarnOnInvalidCallback;
  4802. didWarnAboutUninitializedState = new Set();
  4803. didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
  4804. didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
  4805. didWarnAboutDirectlyAssigningPropsToState = new Set();
  4806. didWarnAboutUndefinedDerivedState = new Set();
  4807. didWarnAboutContextTypes$1 = new Set();
  4808. didWarnAboutChildContextTypes = new Set();
  4809. didWarnAboutInvalidateContextType = new Set();
  4810. didWarnOnInvalidCallback = new Set();
  4811. function warnOnInvalidCallback(callback) {
  4812. if (null !== callback && "function" !== typeof callback) {
  4813. var key = String(callback);
  4814. didWarnOnInvalidCallback.has(key) ||
  4815. (didWarnOnInvalidCallback.add(key),
  4816. console.error(
  4817. "Expected the last optional `callback` argument to be a function. Instead received: %s.",
  4818. callback
  4819. ));
  4820. }
  4821. }
  4822. function warnNoop(publicInstance, callerName) {
  4823. publicInstance =
  4824. ((publicInstance = publicInstance.constructor) &&
  4825. getComponentNameFromType(publicInstance)) ||
  4826. "ReactClass";
  4827. var warningKey = publicInstance + "." + callerName;
  4828. didWarnAboutNoopUpdateForComponent[warningKey] ||
  4829. (console.error(
  4830. "Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.\n\nPlease check the code for the %s component.",
  4831. callerName,
  4832. publicInstance
  4833. ),
  4834. (didWarnAboutNoopUpdateForComponent[warningKey] = !0));
  4835. }
  4836. var classComponentUpdater = {
  4837. enqueueSetState: function (inst, payload, callback) {
  4838. var internals = inst._reactInternals;
  4839. null === internals.queue
  4840. ? warnNoop(inst, "setState")
  4841. : (internals.queue.push(payload),
  4842. void 0 !== callback &&
  4843. null !== callback &&
  4844. warnOnInvalidCallback(callback));
  4845. },
  4846. enqueueReplaceState: function (inst, payload, callback) {
  4847. inst = inst._reactInternals;
  4848. inst.replace = !0;
  4849. inst.queue = [payload];
  4850. void 0 !== callback &&
  4851. null !== callback &&
  4852. warnOnInvalidCallback(callback);
  4853. },
  4854. enqueueForceUpdate: function (inst, callback) {
  4855. null === inst._reactInternals.queue
  4856. ? warnNoop(inst, "forceUpdate")
  4857. : void 0 !== callback &&
  4858. null !== callback &&
  4859. warnOnInvalidCallback(callback);
  4860. }
  4861. },
  4862. emptyTreeContext = { id: 1, overflow: "" };
  4863. function pushTreeContext(baseContext, totalChildren, index) {
  4864. var baseIdWithLeadingBit = baseContext.id;
  4865. baseContext = baseContext.overflow;
  4866. var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
  4867. baseIdWithLeadingBit &= ~(1 << baseLength);
  4868. index += 1;
  4869. var length = 32 - clz32(totalChildren) + baseLength;
  4870. if (30 < length) {
  4871. var numberOfOverflowBits = baseLength - (baseLength % 5);
  4872. length = (
  4873. baseIdWithLeadingBit &
  4874. ((1 << numberOfOverflowBits) - 1)
  4875. ).toString(32);
  4876. baseIdWithLeadingBit >>= numberOfOverflowBits;
  4877. baseLength -= numberOfOverflowBits;
  4878. return {
  4879. id:
  4880. (1 << (32 - clz32(totalChildren) + baseLength)) |
  4881. (index << baseLength) |
  4882. baseIdWithLeadingBit,
  4883. overflow: length + baseContext
  4884. };
  4885. }
  4886. return {
  4887. id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,
  4888. overflow: baseContext
  4889. };
  4890. }
  4891. var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
  4892. log = Math.log,
  4893. LN2 = Math.LN2;
  4894. function clz32Fallback(x) {
  4895. x >>>= 0;
  4896. return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
  4897. }
  4898. function noop() {}
  4899. var SuspenseException = Error(
  4900. "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`."
  4901. );
  4902. function trackUsedThenable(thenableState, thenable, index) {
  4903. index = thenableState[index];
  4904. void 0 === index
  4905. ? thenableState.push(thenable)
  4906. : index !== thenable && (thenable.then(noop, noop), (thenable = index));
  4907. switch (thenable.status) {
  4908. case "fulfilled":
  4909. return thenable.value;
  4910. case "rejected":
  4911. throw thenable.reason;
  4912. default:
  4913. "string" === typeof thenable.status
  4914. ? thenable.then(noop, noop)
  4915. : ((thenableState = thenable),
  4916. (thenableState.status = "pending"),
  4917. thenableState.then(
  4918. function (fulfilledValue) {
  4919. if ("pending" === thenable.status) {
  4920. var fulfilledThenable = thenable;
  4921. fulfilledThenable.status = "fulfilled";
  4922. fulfilledThenable.value = fulfilledValue;
  4923. }
  4924. },
  4925. function (error) {
  4926. if ("pending" === thenable.status) {
  4927. var rejectedThenable = thenable;
  4928. rejectedThenable.status = "rejected";
  4929. rejectedThenable.reason = error;
  4930. }
  4931. }
  4932. ));
  4933. switch (thenable.status) {
  4934. case "fulfilled":
  4935. return thenable.value;
  4936. case "rejected":
  4937. throw thenable.reason;
  4938. }
  4939. suspendedThenable = thenable;
  4940. throw SuspenseException;
  4941. }
  4942. }
  4943. var suspendedThenable = null;
  4944. function getSuspendedThenable() {
  4945. if (null === suspendedThenable)
  4946. throw Error(
  4947. "Expected a suspended thenable. This is a bug in React. Please file an issue."
  4948. );
  4949. var thenable = suspendedThenable;
  4950. suspendedThenable = null;
  4951. return thenable;
  4952. }
  4953. function is(x, y) {
  4954. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  4955. }
  4956. var objectIs = "function" === typeof Object.is ? Object.is : is,
  4957. currentlyRenderingComponent = null,
  4958. currentlyRenderingTask = null,
  4959. currentlyRenderingRequest = null,
  4960. currentlyRenderingKeyPath = null,
  4961. firstWorkInProgressHook = null,
  4962. workInProgressHook = null,
  4963. isReRender = !1,
  4964. didScheduleRenderPhaseUpdate = !1,
  4965. localIdCounter = 0,
  4966. actionStateCounter = 0,
  4967. actionStateMatchingIndex = -1,
  4968. thenableIndexCounter = 0,
  4969. thenableState = null,
  4970. renderPhaseUpdates = null,
  4971. numberOfReRenders = 0,
  4972. isInHookUserCodeInDev = !1,
  4973. currentHookNameInDev;
  4974. function resolveCurrentlyRenderingComponent() {
  4975. if (null === currentlyRenderingComponent)
  4976. throw Error(
  4977. "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."
  4978. );
  4979. isInHookUserCodeInDev &&
  4980. console.error(
  4981. "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"
  4982. );
  4983. return currentlyRenderingComponent;
  4984. }
  4985. function createHook() {
  4986. if (0 < numberOfReRenders)
  4987. throw Error("Rendered more hooks than during the previous render");
  4988. return { memoizedState: null, queue: null, next: null };
  4989. }
  4990. function createWorkInProgressHook() {
  4991. null === workInProgressHook
  4992. ? null === firstWorkInProgressHook
  4993. ? ((isReRender = !1),
  4994. (firstWorkInProgressHook = workInProgressHook = createHook()))
  4995. : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
  4996. : null === workInProgressHook.next
  4997. ? ((isReRender = !1),
  4998. (workInProgressHook = workInProgressHook.next = createHook()))
  4999. : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
  5000. return workInProgressHook;
  5001. }
  5002. function getThenableStateAfterSuspending() {
  5003. var state = thenableState;
  5004. thenableState = null;
  5005. return state;
  5006. }
  5007. function resetHooksState() {
  5008. isInHookUserCodeInDev = !1;
  5009. currentlyRenderingKeyPath =
  5010. currentlyRenderingRequest =
  5011. currentlyRenderingTask =
  5012. currentlyRenderingComponent =
  5013. null;
  5014. didScheduleRenderPhaseUpdate = !1;
  5015. firstWorkInProgressHook = null;
  5016. numberOfReRenders = 0;
  5017. workInProgressHook = renderPhaseUpdates = null;
  5018. }
  5019. function readContext(context) {
  5020. isInHookUserCodeInDev &&
  5021. console.error(
  5022. "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()."
  5023. );
  5024. return context._currentValue;
  5025. }
  5026. function basicStateReducer(state, action) {
  5027. return "function" === typeof action ? action(state) : action;
  5028. }
  5029. function useReducer(reducer, initialArg, init) {
  5030. reducer !== basicStateReducer && (currentHookNameInDev = "useReducer");
  5031. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  5032. workInProgressHook = createWorkInProgressHook();
  5033. if (isReRender) {
  5034. init = workInProgressHook.queue;
  5035. initialArg = init.dispatch;
  5036. if (null !== renderPhaseUpdates) {
  5037. var firstRenderPhaseUpdate = renderPhaseUpdates.get(init);
  5038. if (void 0 !== firstRenderPhaseUpdate) {
  5039. renderPhaseUpdates.delete(init);
  5040. init = workInProgressHook.memoizedState;
  5041. do {
  5042. var action = firstRenderPhaseUpdate.action;
  5043. isInHookUserCodeInDev = !0;
  5044. init = reducer(init, action);
  5045. isInHookUserCodeInDev = !1;
  5046. firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;
  5047. } while (null !== firstRenderPhaseUpdate);
  5048. workInProgressHook.memoizedState = init;
  5049. return [init, initialArg];
  5050. }
  5051. }
  5052. return [workInProgressHook.memoizedState, initialArg];
  5053. }
  5054. isInHookUserCodeInDev = !0;
  5055. reducer =
  5056. reducer === basicStateReducer
  5057. ? "function" === typeof initialArg
  5058. ? initialArg()
  5059. : initialArg
  5060. : void 0 !== init
  5061. ? init(initialArg)
  5062. : initialArg;
  5063. isInHookUserCodeInDev = !1;
  5064. workInProgressHook.memoizedState = reducer;
  5065. reducer = workInProgressHook.queue = { last: null, dispatch: null };
  5066. reducer = reducer.dispatch = dispatchAction.bind(
  5067. null,
  5068. currentlyRenderingComponent,
  5069. reducer
  5070. );
  5071. return [workInProgressHook.memoizedState, reducer];
  5072. }
  5073. function useMemo(nextCreate, deps) {
  5074. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  5075. workInProgressHook = createWorkInProgressHook();
  5076. deps = void 0 === deps ? null : deps;
  5077. if (null !== workInProgressHook) {
  5078. var prevState = workInProgressHook.memoizedState;
  5079. if (null !== prevState && null !== deps) {
  5080. a: {
  5081. var JSCompiler_inline_result = prevState[1];
  5082. if (null === JSCompiler_inline_result)
  5083. console.error(
  5084. "%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.",
  5085. currentHookNameInDev
  5086. ),
  5087. (JSCompiler_inline_result = !1);
  5088. else {
  5089. deps.length !== JSCompiler_inline_result.length &&
  5090. console.error(
  5091. "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",
  5092. currentHookNameInDev,
  5093. "[" + deps.join(", ") + "]",
  5094. "[" + JSCompiler_inline_result.join(", ") + "]"
  5095. );
  5096. for (
  5097. var i = 0;
  5098. i < JSCompiler_inline_result.length && i < deps.length;
  5099. i++
  5100. )
  5101. if (!objectIs(deps[i], JSCompiler_inline_result[i])) {
  5102. JSCompiler_inline_result = !1;
  5103. break a;
  5104. }
  5105. JSCompiler_inline_result = !0;
  5106. }
  5107. }
  5108. if (JSCompiler_inline_result) return prevState[0];
  5109. }
  5110. }
  5111. isInHookUserCodeInDev = !0;
  5112. nextCreate = nextCreate();
  5113. isInHookUserCodeInDev = !1;
  5114. workInProgressHook.memoizedState = [nextCreate, deps];
  5115. return nextCreate;
  5116. }
  5117. function dispatchAction(componentIdentity, queue, action) {
  5118. if (25 <= numberOfReRenders)
  5119. throw Error(
  5120. "Too many re-renders. React limits the number of renders to prevent an infinite loop."
  5121. );
  5122. if (componentIdentity === currentlyRenderingComponent)
  5123. if (
  5124. ((didScheduleRenderPhaseUpdate = !0),
  5125. (componentIdentity = { action: action, next: null }),
  5126. null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),
  5127. (action = renderPhaseUpdates.get(queue)),
  5128. void 0 === action)
  5129. )
  5130. renderPhaseUpdates.set(queue, componentIdentity);
  5131. else {
  5132. for (queue = action; null !== queue.next; ) queue = queue.next;
  5133. queue.next = componentIdentity;
  5134. }
  5135. }
  5136. function throwOnUseEffectEventCall() {
  5137. throw Error(
  5138. "A function wrapped in useEffectEvent can't be called during rendering."
  5139. );
  5140. }
  5141. function unsupportedStartTransition() {
  5142. throw Error("startTransition cannot be called during server rendering.");
  5143. }
  5144. function unsupportedSetOptimisticState() {
  5145. throw Error("Cannot update optimistic state while rendering.");
  5146. }
  5147. function useActionState(action, initialState, permalink) {
  5148. resolveCurrentlyRenderingComponent();
  5149. var actionStateHookIndex = actionStateCounter++,
  5150. request = currentlyRenderingRequest;
  5151. if ("function" === typeof action.$$FORM_ACTION) {
  5152. var nextPostbackStateKey = null,
  5153. componentKeyPath = currentlyRenderingKeyPath;
  5154. request = request.formState;
  5155. var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;
  5156. if (null !== request && "function" === typeof isSignatureEqual) {
  5157. var postbackKey = request[1];
  5158. isSignatureEqual.call(action, request[2], request[3]) &&
  5159. ((nextPostbackStateKey =
  5160. void 0 !== permalink
  5161. ? "p" + permalink
  5162. : "k" +
  5163. Bun.hash(
  5164. JSON.stringify([componentKeyPath, null, actionStateHookIndex])
  5165. )),
  5166. postbackKey === nextPostbackStateKey &&
  5167. ((actionStateMatchingIndex = actionStateHookIndex),
  5168. (initialState = request[0])));
  5169. }
  5170. var boundAction = action.bind(null, initialState);
  5171. action = function (payload) {
  5172. boundAction(payload);
  5173. };
  5174. "function" === typeof boundAction.$$FORM_ACTION &&
  5175. (action.$$FORM_ACTION = function (prefix) {
  5176. prefix = boundAction.$$FORM_ACTION(prefix);
  5177. void 0 !== permalink &&
  5178. (checkAttributeStringCoercion(permalink, "target"),
  5179. (permalink += ""),
  5180. (prefix.action = permalink));
  5181. var formData = prefix.data;
  5182. formData &&
  5183. (null === nextPostbackStateKey &&
  5184. (nextPostbackStateKey =
  5185. void 0 !== permalink
  5186. ? "p" + permalink
  5187. : "k" +
  5188. Bun.hash(
  5189. JSON.stringify([
  5190. componentKeyPath,
  5191. null,
  5192. actionStateHookIndex
  5193. ])
  5194. )),
  5195. formData.append("$ACTION_KEY", nextPostbackStateKey));
  5196. return prefix;
  5197. });
  5198. return [initialState, action, !1];
  5199. }
  5200. var _boundAction = action.bind(null, initialState);
  5201. return [
  5202. initialState,
  5203. function (payload) {
  5204. _boundAction(payload);
  5205. },
  5206. !1
  5207. ];
  5208. }
  5209. function unwrapThenable(thenable) {
  5210. var index = thenableIndexCounter;
  5211. thenableIndexCounter += 1;
  5212. null === thenableState && (thenableState = []);
  5213. return trackUsedThenable(thenableState, thenable, index);
  5214. }
  5215. function unsupportedRefresh() {
  5216. throw Error("Cache cannot be refreshed during server rendering.");
  5217. }
  5218. var HooksDispatcher = {
  5219. readContext: readContext,
  5220. use: function (usable) {
  5221. if (null !== usable && "object" === typeof usable) {
  5222. if ("function" === typeof usable.then) return unwrapThenable(usable);
  5223. if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
  5224. }
  5225. throw Error("An unsupported type was passed to use(): " + String(usable));
  5226. },
  5227. useContext: function (context) {
  5228. currentHookNameInDev = "useContext";
  5229. resolveCurrentlyRenderingComponent();
  5230. return context._currentValue;
  5231. },
  5232. useMemo: useMemo,
  5233. useReducer: useReducer,
  5234. useRef: function (initialValue) {
  5235. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  5236. workInProgressHook = createWorkInProgressHook();
  5237. var previousRef = workInProgressHook.memoizedState;
  5238. return null === previousRef
  5239. ? ((initialValue = { current: initialValue }),
  5240. Object.seal(initialValue),
  5241. (workInProgressHook.memoizedState = initialValue))
  5242. : previousRef;
  5243. },
  5244. useState: function (initialState) {
  5245. currentHookNameInDev = "useState";
  5246. return useReducer(basicStateReducer, initialState);
  5247. },
  5248. useInsertionEffect: noop,
  5249. useLayoutEffect: noop,
  5250. useCallback: function (callback, deps) {
  5251. return useMemo(function () {
  5252. return callback;
  5253. }, deps);
  5254. },
  5255. useImperativeHandle: noop,
  5256. useEffect: noop,
  5257. useDebugValue: noop,
  5258. useDeferredValue: function (value, initialValue) {
  5259. resolveCurrentlyRenderingComponent();
  5260. return void 0 !== initialValue ? initialValue : value;
  5261. },
  5262. useTransition: function () {
  5263. resolveCurrentlyRenderingComponent();
  5264. return [!1, unsupportedStartTransition];
  5265. },
  5266. useId: function () {
  5267. var treeId = currentlyRenderingTask.treeContext;
  5268. var overflow = treeId.overflow;
  5269. treeId = treeId.id;
  5270. treeId =
  5271. (treeId & ~(1 << (32 - clz32(treeId) - 1))).toString(32) + overflow;
  5272. var resumableState = currentResumableState;
  5273. if (null === resumableState)
  5274. throw Error(
  5275. "Invalid hook call. Hooks can only be called inside of the body of a function component."
  5276. );
  5277. overflow = localIdCounter++;
  5278. treeId = "_" + resumableState.idPrefix + "R_" + treeId;
  5279. 0 < overflow && (treeId += "H" + overflow.toString(32));
  5280. return treeId + "_";
  5281. },
  5282. useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
  5283. if (void 0 === getServerSnapshot)
  5284. throw Error(
  5285. "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
  5286. );
  5287. return getServerSnapshot();
  5288. },
  5289. useOptimistic: function (passthrough) {
  5290. resolveCurrentlyRenderingComponent();
  5291. return [passthrough, unsupportedSetOptimisticState];
  5292. },
  5293. useActionState: useActionState,
  5294. useFormState: useActionState,
  5295. useHostTransitionStatus: function () {
  5296. resolveCurrentlyRenderingComponent();
  5297. return NotPending;
  5298. },
  5299. useMemoCache: function (size) {
  5300. for (var data = Array(size), i = 0; i < size; i++)
  5301. data[i] = REACT_MEMO_CACHE_SENTINEL;
  5302. return data;
  5303. },
  5304. useCacheRefresh: function () {
  5305. return unsupportedRefresh;
  5306. },
  5307. useEffectEvent: function () {
  5308. return throwOnUseEffectEventCall;
  5309. }
  5310. },
  5311. currentResumableState = null,
  5312. currentTaskInDEV = null,
  5313. DefaultAsyncDispatcher = {
  5314. getCacheForType: function () {
  5315. throw Error("Not implemented.");
  5316. },
  5317. cacheSignal: function () {
  5318. throw Error("Not implemented.");
  5319. },
  5320. getOwner: function () {
  5321. return null === currentTaskInDEV ? null : currentTaskInDEV.componentStack;
  5322. }
  5323. },
  5324. disabledDepth = 0,
  5325. prevLog,
  5326. prevInfo,
  5327. prevWarn,
  5328. prevError,
  5329. prevGroup,
  5330. prevGroupCollapsed,
  5331. prevGroupEnd;
  5332. function disabledLog() {}
  5333. disabledLog.__reactDisabledLog = !0;
  5334. function disableLogs() {
  5335. if (0 === disabledDepth) {
  5336. prevLog = console.log;
  5337. prevInfo = console.info;
  5338. prevWarn = console.warn;
  5339. prevError = console.error;
  5340. prevGroup = console.group;
  5341. prevGroupCollapsed = console.groupCollapsed;
  5342. prevGroupEnd = console.groupEnd;
  5343. var props = {
  5344. configurable: !0,
  5345. enumerable: !0,
  5346. value: disabledLog,
  5347. writable: !0
  5348. };
  5349. Object.defineProperties(console, {
  5350. info: props,
  5351. log: props,
  5352. warn: props,
  5353. error: props,
  5354. group: props,
  5355. groupCollapsed: props,
  5356. groupEnd: props
  5357. });
  5358. }
  5359. disabledDepth++;
  5360. }
  5361. function reenableLogs() {
  5362. disabledDepth--;
  5363. if (0 === disabledDepth) {
  5364. var props = { configurable: !0, enumerable: !0, writable: !0 };
  5365. Object.defineProperties(console, {
  5366. log: assign({}, props, { value: prevLog }),
  5367. info: assign({}, props, { value: prevInfo }),
  5368. warn: assign({}, props, { value: prevWarn }),
  5369. error: assign({}, props, { value: prevError }),
  5370. group: assign({}, props, { value: prevGroup }),
  5371. groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
  5372. groupEnd: assign({}, props, { value: prevGroupEnd })
  5373. });
  5374. }
  5375. 0 > disabledDepth &&
  5376. console.error(
  5377. "disabledDepth fell below zero. This is a bug in React. Please file an issue."
  5378. );
  5379. }
  5380. function formatOwnerStack(error) {
  5381. var prevPrepareStackTrace = Error.prepareStackTrace;
  5382. Error.prepareStackTrace = void 0;
  5383. error = error.stack;
  5384. Error.prepareStackTrace = prevPrepareStackTrace;
  5385. error.startsWith("Error: react-stack-top-frame\n") &&
  5386. (error = error.slice(29));
  5387. prevPrepareStackTrace = error.indexOf("\n");
  5388. -1 !== prevPrepareStackTrace &&
  5389. (error = error.slice(prevPrepareStackTrace + 1));
  5390. prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
  5391. -1 !== prevPrepareStackTrace &&
  5392. (prevPrepareStackTrace = error.lastIndexOf("\n", prevPrepareStackTrace));
  5393. if (-1 !== prevPrepareStackTrace)
  5394. error = error.slice(0, prevPrepareStackTrace);
  5395. else return "";
  5396. return error;
  5397. }
  5398. var prefix, suffix;
  5399. function describeBuiltInComponentFrame(name) {
  5400. if (void 0 === prefix)
  5401. try {
  5402. throw Error();
  5403. } catch (x) {
  5404. var match = x.stack.trim().match(/\n( *(at )?)/);
  5405. prefix = (match && match[1]) || "";
  5406. suffix =
  5407. -1 < x.stack.indexOf("\n at")
  5408. ? " (<anonymous>)"
  5409. : -1 < x.stack.indexOf("@")
  5410. ? "@unknown:0:0"
  5411. : "";
  5412. }
  5413. return "\n" + prefix + name + suffix;
  5414. }
  5415. var reentry = !1,
  5416. componentFrameCache;
  5417. componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
  5418. function describeNativeComponentFrame(fn, construct) {
  5419. if (!fn || reentry) return "";
  5420. var frame = componentFrameCache.get(fn);
  5421. if (void 0 !== frame) return frame;
  5422. reentry = !0;
  5423. frame = Error.prepareStackTrace;
  5424. Error.prepareStackTrace = void 0;
  5425. var previousDispatcher = null;
  5426. previousDispatcher = ReactSharedInternals.H;
  5427. ReactSharedInternals.H = null;
  5428. disableLogs();
  5429. try {
  5430. var RunInRootFrame = {
  5431. DetermineComponentFrameRoot: function () {
  5432. try {
  5433. if (construct) {
  5434. var Fake = function () {
  5435. throw Error();
  5436. };
  5437. Object.defineProperty(Fake.prototype, "props", {
  5438. set: function () {
  5439. throw Error();
  5440. }
  5441. });
  5442. if ("object" === typeof Reflect && Reflect.construct) {
  5443. try {
  5444. Reflect.construct(Fake, []);
  5445. } catch (x) {
  5446. var control = x;
  5447. }
  5448. Reflect.construct(fn, [], Fake);
  5449. } else {
  5450. try {
  5451. Fake.call();
  5452. } catch (x$0) {
  5453. control = x$0;
  5454. }
  5455. fn.call(Fake.prototype);
  5456. }
  5457. } else {
  5458. try {
  5459. throw Error();
  5460. } catch (x$1) {
  5461. control = x$1;
  5462. }
  5463. (Fake = fn()) &&
  5464. "function" === typeof Fake.catch &&
  5465. Fake.catch(function () {});
  5466. }
  5467. } catch (sample) {
  5468. if (sample && control && "string" === typeof sample.stack)
  5469. return [sample.stack, control.stack];
  5470. }
  5471. return [null, null];
  5472. }
  5473. };
  5474. RunInRootFrame.DetermineComponentFrameRoot.displayName =
  5475. "DetermineComponentFrameRoot";
  5476. var namePropDescriptor = Object.getOwnPropertyDescriptor(
  5477. RunInRootFrame.DetermineComponentFrameRoot,
  5478. "name"
  5479. );
  5480. namePropDescriptor &&
  5481. namePropDescriptor.configurable &&
  5482. Object.defineProperty(
  5483. RunInRootFrame.DetermineComponentFrameRoot,
  5484. "name",
  5485. { value: "DetermineComponentFrameRoot" }
  5486. );
  5487. var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
  5488. sampleStack = _RunInRootFrame$Deter[0],
  5489. controlStack = _RunInRootFrame$Deter[1];
  5490. if (sampleStack && controlStack) {
  5491. var sampleLines = sampleStack.split("\n"),
  5492. controlLines = controlStack.split("\n");
  5493. for (
  5494. _RunInRootFrame$Deter = namePropDescriptor = 0;
  5495. namePropDescriptor < sampleLines.length &&
  5496. !sampleLines[namePropDescriptor].includes(
  5497. "DetermineComponentFrameRoot"
  5498. );
  5499. )
  5500. namePropDescriptor++;
  5501. for (
  5502. ;
  5503. _RunInRootFrame$Deter < controlLines.length &&
  5504. !controlLines[_RunInRootFrame$Deter].includes(
  5505. "DetermineComponentFrameRoot"
  5506. );
  5507. )
  5508. _RunInRootFrame$Deter++;
  5509. if (
  5510. namePropDescriptor === sampleLines.length ||
  5511. _RunInRootFrame$Deter === controlLines.length
  5512. )
  5513. for (
  5514. namePropDescriptor = sampleLines.length - 1,
  5515. _RunInRootFrame$Deter = controlLines.length - 1;
  5516. 1 <= namePropDescriptor &&
  5517. 0 <= _RunInRootFrame$Deter &&
  5518. sampleLines[namePropDescriptor] !==
  5519. controlLines[_RunInRootFrame$Deter];
  5520. )
  5521. _RunInRootFrame$Deter--;
  5522. for (
  5523. ;
  5524. 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
  5525. namePropDescriptor--, _RunInRootFrame$Deter--
  5526. )
  5527. if (
  5528. sampleLines[namePropDescriptor] !==
  5529. controlLines[_RunInRootFrame$Deter]
  5530. ) {
  5531. if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
  5532. do
  5533. if (
  5534. (namePropDescriptor--,
  5535. _RunInRootFrame$Deter--,
  5536. 0 > _RunInRootFrame$Deter ||
  5537. sampleLines[namePropDescriptor] !==
  5538. controlLines[_RunInRootFrame$Deter])
  5539. ) {
  5540. var _frame =
  5541. "\n" +
  5542. sampleLines[namePropDescriptor].replace(" at new ", " at ");
  5543. fn.displayName &&
  5544. _frame.includes("<anonymous>") &&
  5545. (_frame = _frame.replace("<anonymous>", fn.displayName));
  5546. "function" === typeof fn && componentFrameCache.set(fn, _frame);
  5547. return _frame;
  5548. }
  5549. while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
  5550. }
  5551. break;
  5552. }
  5553. }
  5554. } finally {
  5555. (reentry = !1),
  5556. (ReactSharedInternals.H = previousDispatcher),
  5557. reenableLogs(),
  5558. (Error.prepareStackTrace = frame);
  5559. }
  5560. sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
  5561. ? describeBuiltInComponentFrame(sampleLines)
  5562. : "";
  5563. "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
  5564. return sampleLines;
  5565. }
  5566. function describeComponentStackByType(type) {
  5567. if ("string" === typeof type) return describeBuiltInComponentFrame(type);
  5568. if ("function" === typeof type)
  5569. return type.prototype && type.prototype.isReactComponent
  5570. ? describeNativeComponentFrame(type, !0)
  5571. : describeNativeComponentFrame(type, !1);
  5572. if ("object" === typeof type && null !== type) {
  5573. switch (type.$$typeof) {
  5574. case REACT_FORWARD_REF_TYPE:
  5575. return describeNativeComponentFrame(type.render, !1);
  5576. case REACT_MEMO_TYPE:
  5577. return describeNativeComponentFrame(type.type, !1);
  5578. case REACT_LAZY_TYPE:
  5579. var lazyComponent = type,
  5580. payload = lazyComponent._payload;
  5581. lazyComponent = lazyComponent._init;
  5582. try {
  5583. type = lazyComponent(payload);
  5584. } catch (x) {
  5585. return describeBuiltInComponentFrame("Lazy");
  5586. }
  5587. return describeComponentStackByType(type);
  5588. }
  5589. if ("string" === typeof type.name) {
  5590. a: {
  5591. payload = type.name;
  5592. lazyComponent = type.env;
  5593. type = type.debugLocation;
  5594. if (null != type) {
  5595. type = formatOwnerStack(type);
  5596. var idx = type.lastIndexOf("\n");
  5597. type = -1 === idx ? type : type.slice(idx + 1);
  5598. if (-1 !== type.indexOf(payload)) {
  5599. payload = "\n" + type;
  5600. break a;
  5601. }
  5602. }
  5603. payload = describeBuiltInComponentFrame(
  5604. payload + (lazyComponent ? " [" + lazyComponent + "]" : "")
  5605. );
  5606. }
  5607. return payload;
  5608. }
  5609. }
  5610. switch (type) {
  5611. case REACT_SUSPENSE_LIST_TYPE:
  5612. return describeBuiltInComponentFrame("SuspenseList");
  5613. case REACT_SUSPENSE_TYPE:
  5614. return describeBuiltInComponentFrame("Suspense");
  5615. }
  5616. return "";
  5617. }
  5618. var callComponent = {
  5619. react_stack_bottom_frame: function (Component, props, secondArg) {
  5620. return Component(props, secondArg);
  5621. }
  5622. },
  5623. callComponentInDEV =
  5624. callComponent.react_stack_bottom_frame.bind(callComponent),
  5625. callRender = {
  5626. react_stack_bottom_frame: function (instance) {
  5627. return instance.render();
  5628. }
  5629. },
  5630. callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),
  5631. callLazyInit = {
  5632. react_stack_bottom_frame: function (lazy) {
  5633. var init = lazy._init;
  5634. return init(lazy._payload);
  5635. }
  5636. },
  5637. callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit),
  5638. lastResetTime = 0,
  5639. getCurrentTime;
  5640. if ("object" === typeof performance && "function" === typeof performance.now) {
  5641. var localPerformance = performance;
  5642. getCurrentTime = function () {
  5643. return localPerformance.now();
  5644. };
  5645. } else {
  5646. var localDate = Date;
  5647. getCurrentTime = function () {
  5648. return localDate.now();
  5649. };
  5650. }
  5651. var CLIENT_RENDERED = 4,
  5652. PENDING = 0,
  5653. COMPLETED = 1,
  5654. FLUSHED = 2,
  5655. ABORTED = 3,
  5656. ERRORED = 4,
  5657. POSTPONED = 5,
  5658. CLOSED = 14;
  5659. function isEligibleForOutlining(request, boundary) {
  5660. return (
  5661. (500 < boundary.byteSize || hasSuspenseyContent(boundary.contentState)) &&
  5662. null === boundary.contentPreamble
  5663. );
  5664. }
  5665. function defaultErrorHandler(error) {
  5666. if (
  5667. "object" === typeof error &&
  5668. null !== error &&
  5669. "string" === typeof error.environmentName
  5670. ) {
  5671. var JSCompiler_inline_result = error.environmentName;
  5672. error = [error].slice(0);
  5673. "string" === typeof error[0]
  5674. ? error.splice(
  5675. 0,
  5676. 1,
  5677. "%c%s%c " + error[0],
  5678. "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",
  5679. " " + JSCompiler_inline_result + " ",
  5680. ""
  5681. )
  5682. : error.splice(
  5683. 0,
  5684. 0,
  5685. "%c%s%c",
  5686. "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",
  5687. " " + JSCompiler_inline_result + " ",
  5688. ""
  5689. );
  5690. error.unshift(console);
  5691. JSCompiler_inline_result = bind.apply(console.error, error);
  5692. JSCompiler_inline_result();
  5693. } else console.error(error);
  5694. return null;
  5695. }
  5696. function RequestInstance(
  5697. resumableState,
  5698. renderState,
  5699. rootFormatContext,
  5700. progressiveChunkSize,
  5701. onError,
  5702. onAllReady,
  5703. onShellReady,
  5704. onShellError,
  5705. onFatalError,
  5706. onPostpone,
  5707. formState
  5708. ) {
  5709. var abortSet = new Set();
  5710. this.destination = null;
  5711. this.flushScheduled = !1;
  5712. this.resumableState = resumableState;
  5713. this.renderState = renderState;
  5714. this.rootFormatContext = rootFormatContext;
  5715. this.progressiveChunkSize =
  5716. void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
  5717. this.status = 10;
  5718. this.fatalError = null;
  5719. this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
  5720. this.completedPreambleSegments = this.completedRootSegment = null;
  5721. this.byteSize = 0;
  5722. this.abortableTasks = abortSet;
  5723. this.pingedTasks = [];
  5724. this.clientRenderedBoundaries = [];
  5725. this.completedBoundaries = [];
  5726. this.partialBoundaries = [];
  5727. this.trackedPostpones = null;
  5728. this.onError = void 0 === onError ? defaultErrorHandler : onError;
  5729. this.onPostpone = void 0 === onPostpone ? noop : onPostpone;
  5730. this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
  5731. this.onShellReady = void 0 === onShellReady ? noop : onShellReady;
  5732. this.onShellError = void 0 === onShellError ? noop : onShellError;
  5733. this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
  5734. this.formState = void 0 === formState ? null : formState;
  5735. this.didWarnForKey = null;
  5736. }
  5737. function createRequest(
  5738. children,
  5739. resumableState,
  5740. renderState,
  5741. rootFormatContext,
  5742. progressiveChunkSize,
  5743. onError,
  5744. onAllReady,
  5745. onShellReady,
  5746. onShellError,
  5747. onFatalError,
  5748. onPostpone,
  5749. formState
  5750. ) {
  5751. var now = getCurrentTime();
  5752. 1e3 < now - lastResetTime &&
  5753. ((ReactSharedInternals.recentlyCreatedOwnerStacks = 0),
  5754. (lastResetTime = now));
  5755. resumableState = new RequestInstance(
  5756. resumableState,
  5757. renderState,
  5758. rootFormatContext,
  5759. progressiveChunkSize,
  5760. onError,
  5761. onAllReady,
  5762. onShellReady,
  5763. onShellError,
  5764. onFatalError,
  5765. onPostpone,
  5766. formState
  5767. );
  5768. renderState = createPendingSegment(
  5769. resumableState,
  5770. 0,
  5771. null,
  5772. rootFormatContext,
  5773. !1,
  5774. !1
  5775. );
  5776. renderState.parentFlushed = !0;
  5777. children = createRenderTask(
  5778. resumableState,
  5779. null,
  5780. children,
  5781. -1,
  5782. null,
  5783. renderState,
  5784. null,
  5785. null,
  5786. resumableState.abortableTasks,
  5787. null,
  5788. rootFormatContext,
  5789. null,
  5790. emptyTreeContext,
  5791. null,
  5792. null,
  5793. emptyContextObject,
  5794. null
  5795. );
  5796. pushComponentStack(children);
  5797. resumableState.pingedTasks.push(children);
  5798. return resumableState;
  5799. }
  5800. var currentRequest = null;
  5801. function pingTask(request, task) {
  5802. request.pingedTasks.push(task);
  5803. 1 === request.pingedTasks.length &&
  5804. ((request.flushScheduled = null !== request.destination),
  5805. null !== request.trackedPostpones || 10 === request.status
  5806. ? scheduleMicrotask(function () {
  5807. return performWork(request);
  5808. })
  5809. : setTimeout(function () {
  5810. return performWork(request);
  5811. }, 0));
  5812. }
  5813. function createSuspenseBoundary(
  5814. request,
  5815. row,
  5816. fallbackAbortableTasks,
  5817. contentPreamble,
  5818. fallbackPreamble
  5819. ) {
  5820. fallbackAbortableTasks = {
  5821. status: PENDING,
  5822. rootSegmentID: -1,
  5823. parentFlushed: !1,
  5824. pendingTasks: 0,
  5825. row: row,
  5826. completedSegments: [],
  5827. byteSize: 0,
  5828. fallbackAbortableTasks: fallbackAbortableTasks,
  5829. errorDigest: null,
  5830. contentState: createHoistableState(),
  5831. fallbackState: createHoistableState(),
  5832. contentPreamble: contentPreamble,
  5833. fallbackPreamble: fallbackPreamble,
  5834. trackedContentKeyPath: null,
  5835. trackedFallbackNode: null,
  5836. errorMessage: null,
  5837. errorStack: null,
  5838. errorComponentStack: null
  5839. };
  5840. null !== row &&
  5841. (row.pendingTasks++,
  5842. (contentPreamble = row.boundaries),
  5843. null !== contentPreamble &&
  5844. (request.allPendingTasks++,
  5845. fallbackAbortableTasks.pendingTasks++,
  5846. contentPreamble.push(fallbackAbortableTasks)),
  5847. (request = row.inheritedHoistables),
  5848. null !== request &&
  5849. hoistHoistables(fallbackAbortableTasks.contentState, request));
  5850. return fallbackAbortableTasks;
  5851. }
  5852. function createRenderTask(
  5853. request,
  5854. thenableState,
  5855. node,
  5856. childIndex,
  5857. blockedBoundary,
  5858. blockedSegment,
  5859. blockedPreamble,
  5860. hoistableState,
  5861. abortSet,
  5862. keyPath,
  5863. formatContext,
  5864. context,
  5865. treeContext,
  5866. row,
  5867. componentStack,
  5868. legacyContext,
  5869. debugTask
  5870. ) {
  5871. request.allPendingTasks++;
  5872. null === blockedBoundary
  5873. ? request.pendingRootTasks++
  5874. : blockedBoundary.pendingTasks++;
  5875. null !== row && row.pendingTasks++;
  5876. var task = {
  5877. replay: null,
  5878. node: node,
  5879. childIndex: childIndex,
  5880. ping: function () {
  5881. return pingTask(request, task);
  5882. },
  5883. blockedBoundary: blockedBoundary,
  5884. blockedSegment: blockedSegment,
  5885. blockedPreamble: blockedPreamble,
  5886. hoistableState: hoistableState,
  5887. abortSet: abortSet,
  5888. keyPath: keyPath,
  5889. formatContext: formatContext,
  5890. context: context,
  5891. treeContext: treeContext,
  5892. row: row,
  5893. componentStack: componentStack,
  5894. thenableState: thenableState
  5895. };
  5896. task.debugTask = debugTask;
  5897. abortSet.add(task);
  5898. return task;
  5899. }
  5900. function createReplayTask(
  5901. request,
  5902. thenableState,
  5903. replay,
  5904. node,
  5905. childIndex,
  5906. blockedBoundary,
  5907. hoistableState,
  5908. abortSet,
  5909. keyPath,
  5910. formatContext,
  5911. context,
  5912. treeContext,
  5913. row,
  5914. componentStack,
  5915. legacyContext,
  5916. debugTask
  5917. ) {
  5918. request.allPendingTasks++;
  5919. null === blockedBoundary
  5920. ? request.pendingRootTasks++
  5921. : blockedBoundary.pendingTasks++;
  5922. null !== row && row.pendingTasks++;
  5923. replay.pendingTasks++;
  5924. var task = {
  5925. replay: replay,
  5926. node: node,
  5927. childIndex: childIndex,
  5928. ping: function () {
  5929. return pingTask(request, task);
  5930. },
  5931. blockedBoundary: blockedBoundary,
  5932. blockedSegment: null,
  5933. blockedPreamble: null,
  5934. hoistableState: hoistableState,
  5935. abortSet: abortSet,
  5936. keyPath: keyPath,
  5937. formatContext: formatContext,
  5938. context: context,
  5939. treeContext: treeContext,
  5940. row: row,
  5941. componentStack: componentStack,
  5942. thenableState: thenableState
  5943. };
  5944. task.debugTask = debugTask;
  5945. abortSet.add(task);
  5946. return task;
  5947. }
  5948. function createPendingSegment(
  5949. request,
  5950. index,
  5951. boundary,
  5952. parentFormatContext,
  5953. lastPushedText,
  5954. textEmbedded
  5955. ) {
  5956. return {
  5957. status: PENDING,
  5958. parentFlushed: !1,
  5959. id: -1,
  5960. index: index,
  5961. chunks: [],
  5962. children: [],
  5963. preambleChildren: [],
  5964. parentFormatContext: parentFormatContext,
  5965. boundary: boundary,
  5966. lastPushedText: lastPushedText,
  5967. textEmbedded: textEmbedded
  5968. };
  5969. }
  5970. function getCurrentStackInDEV() {
  5971. if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)
  5972. return "";
  5973. var componentStack = currentTaskInDEV.componentStack;
  5974. try {
  5975. var info = "";
  5976. if ("string" === typeof componentStack.type)
  5977. info += describeBuiltInComponentFrame(componentStack.type);
  5978. else if ("function" === typeof componentStack.type) {
  5979. if (!componentStack.owner) {
  5980. var JSCompiler_temp_const = info,
  5981. fn = componentStack.type,
  5982. name = fn ? fn.displayName || fn.name : "";
  5983. var JSCompiler_inline_result = name
  5984. ? describeBuiltInComponentFrame(name)
  5985. : "";
  5986. info = JSCompiler_temp_const + JSCompiler_inline_result;
  5987. }
  5988. } else
  5989. componentStack.owner ||
  5990. (info += describeComponentStackByType(componentStack.type));
  5991. for (; componentStack; )
  5992. (JSCompiler_temp_const = null),
  5993. null != componentStack.debugStack
  5994. ? (JSCompiler_temp_const = formatOwnerStack(
  5995. componentStack.debugStack
  5996. ))
  5997. : ((JSCompiler_inline_result = componentStack),
  5998. null != JSCompiler_inline_result.stack &&
  5999. (JSCompiler_temp_const =
  6000. "string" !== typeof JSCompiler_inline_result.stack
  6001. ? (JSCompiler_inline_result.stack = formatOwnerStack(
  6002. JSCompiler_inline_result.stack
  6003. ))
  6004. : JSCompiler_inline_result.stack)),
  6005. (componentStack = componentStack.owner) &&
  6006. JSCompiler_temp_const &&
  6007. (info += "\n" + JSCompiler_temp_const);
  6008. var JSCompiler_inline_result$jscomp$0 = info;
  6009. } catch (x) {
  6010. JSCompiler_inline_result$jscomp$0 =
  6011. "\nError generating stack: " + x.message + "\n" + x.stack;
  6012. }
  6013. return JSCompiler_inline_result$jscomp$0;
  6014. }
  6015. function pushHaltedAwaitOnComponentStack(task, debugInfo) {
  6016. if (null != debugInfo)
  6017. for (var i = debugInfo.length - 1; 0 <= i; i--) {
  6018. var info = debugInfo[i];
  6019. if ("string" === typeof info.name) break;
  6020. if ("number" === typeof info.time) break;
  6021. if (null != info.awaited) {
  6022. var bestStack = null == info.debugStack ? info.awaited : info;
  6023. if (void 0 !== bestStack.debugStack) {
  6024. task.componentStack = {
  6025. parent: task.componentStack,
  6026. type: info,
  6027. owner: bestStack.owner,
  6028. stack: bestStack.debugStack
  6029. };
  6030. task.debugTask = bestStack.debugTask;
  6031. break;
  6032. }
  6033. }
  6034. }
  6035. }
  6036. function pushServerComponentStack(task, debugInfo) {
  6037. if (null != debugInfo)
  6038. for (var i = 0; i < debugInfo.length; i++) {
  6039. var componentInfo = debugInfo[i];
  6040. "string" === typeof componentInfo.name &&
  6041. void 0 !== componentInfo.debugStack &&
  6042. ((task.componentStack = {
  6043. parent: task.componentStack,
  6044. type: componentInfo,
  6045. owner: componentInfo.owner,
  6046. stack: componentInfo.debugStack
  6047. }),
  6048. (task.debugTask = componentInfo.debugTask));
  6049. }
  6050. }
  6051. function pushComponentStack(task) {
  6052. var node = task.node;
  6053. if ("object" === typeof node && null !== node)
  6054. switch (node.$$typeof) {
  6055. case REACT_ELEMENT_TYPE:
  6056. var type = node.type,
  6057. owner = node._owner,
  6058. stack = node._debugStack;
  6059. pushServerComponentStack(task, node._debugInfo);
  6060. task.debugTask = node._debugTask;
  6061. task.componentStack = {
  6062. parent: task.componentStack,
  6063. type: type,
  6064. owner: owner,
  6065. stack: stack
  6066. };
  6067. break;
  6068. case REACT_LAZY_TYPE:
  6069. pushServerComponentStack(task, node._debugInfo);
  6070. break;
  6071. default:
  6072. "function" === typeof node.then &&
  6073. pushServerComponentStack(task, node._debugInfo);
  6074. }
  6075. }
  6076. function replaceSuspenseComponentStackWithSuspenseFallbackStack(
  6077. componentStack
  6078. ) {
  6079. return null === componentStack
  6080. ? null
  6081. : {
  6082. parent: componentStack.parent,
  6083. type: "Suspense Fallback",
  6084. owner: componentStack.owner,
  6085. stack: componentStack.stack
  6086. };
  6087. }
  6088. function getThrownInfo(node$jscomp$0) {
  6089. var errorInfo = {};
  6090. node$jscomp$0 &&
  6091. Object.defineProperty(errorInfo, "componentStack", {
  6092. configurable: !0,
  6093. enumerable: !0,
  6094. get: function () {
  6095. try {
  6096. var info = "",
  6097. node = node$jscomp$0;
  6098. do
  6099. (info += describeComponentStackByType(node.type)),
  6100. (node = node.parent);
  6101. while (node);
  6102. var stack = info;
  6103. } catch (x) {
  6104. stack = "\nError generating stack: " + x.message + "\n" + x.stack;
  6105. }
  6106. Object.defineProperty(errorInfo, "componentStack", { value: stack });
  6107. return stack;
  6108. }
  6109. });
  6110. return errorInfo;
  6111. }
  6112. function encodeErrorForBoundary(
  6113. boundary,
  6114. digest,
  6115. error,
  6116. thrownInfo,
  6117. wasAborted
  6118. ) {
  6119. boundary.errorDigest = digest;
  6120. error instanceof Error
  6121. ? ((digest = String(error.message)), (error = String(error.stack)))
  6122. : ((digest =
  6123. "object" === typeof error && null !== error
  6124. ? describeObjectForErrorMessage(error)
  6125. : String(error)),
  6126. (error = null));
  6127. wasAborted = wasAborted
  6128. ? "Switched to client rendering because the server rendering aborted due to:\n\n"
  6129. : "Switched to client rendering because the server rendering errored:\n\n";
  6130. boundary.errorMessage = wasAborted + digest;
  6131. boundary.errorStack = null !== error ? wasAborted + error : null;
  6132. boundary.errorComponentStack = thrownInfo.componentStack;
  6133. }
  6134. function logRecoverableError(request, error, errorInfo, debugTask) {
  6135. request = request.onError;
  6136. error = debugTask
  6137. ? debugTask.run(request.bind(null, error, errorInfo))
  6138. : request(error, errorInfo);
  6139. if (null != error && "string" !== typeof error)
  6140. console.error(
  6141. 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
  6142. typeof error
  6143. );
  6144. else return error;
  6145. }
  6146. function fatalError(request, error, errorInfo, debugTask) {
  6147. errorInfo = request.onShellError;
  6148. var onFatalError = request.onFatalError;
  6149. debugTask
  6150. ? (debugTask.run(errorInfo.bind(null, error)),
  6151. debugTask.run(onFatalError.bind(null, error)))
  6152. : (errorInfo(error), onFatalError(error));
  6153. null !== request.destination
  6154. ? ((request.status = CLOSED), closeWithError(request.destination, error))
  6155. : ((request.status = 13), (request.fatalError = error));
  6156. }
  6157. function finishSuspenseListRow(request, row) {
  6158. unblockSuspenseListRow(request, row.next, row.hoistables);
  6159. }
  6160. function unblockSuspenseListRow(request, unblockedRow, inheritedHoistables) {
  6161. for (; null !== unblockedRow; ) {
  6162. null !== inheritedHoistables &&
  6163. (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),
  6164. (unblockedRow.inheritedHoistables = inheritedHoistables));
  6165. var unblockedBoundaries = unblockedRow.boundaries;
  6166. if (null !== unblockedBoundaries) {
  6167. unblockedRow.boundaries = null;
  6168. for (var i = 0; i < unblockedBoundaries.length; i++) {
  6169. var unblockedBoundary = unblockedBoundaries[i];
  6170. null !== inheritedHoistables &&
  6171. hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
  6172. finishedTask(request, unblockedBoundary, null, null);
  6173. }
  6174. }
  6175. unblockedRow.pendingTasks--;
  6176. if (0 < unblockedRow.pendingTasks) break;
  6177. inheritedHoistables = unblockedRow.hoistables;
  6178. unblockedRow = unblockedRow.next;
  6179. }
  6180. }
  6181. function tryToResolveTogetherRow(request, togetherRow) {
  6182. var boundaries = togetherRow.boundaries;
  6183. if (null !== boundaries && togetherRow.pendingTasks === boundaries.length) {
  6184. for (var allCompleteAndInlinable = !0, i = 0; i < boundaries.length; i++) {
  6185. var rowBoundary = boundaries[i];
  6186. if (
  6187. 1 !== rowBoundary.pendingTasks ||
  6188. rowBoundary.parentFlushed ||
  6189. isEligibleForOutlining(request, rowBoundary)
  6190. ) {
  6191. allCompleteAndInlinable = !1;
  6192. break;
  6193. }
  6194. }
  6195. allCompleteAndInlinable &&
  6196. unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);
  6197. }
  6198. }
  6199. function createSuspenseListRow(previousRow) {
  6200. var newRow = {
  6201. pendingTasks: 1,
  6202. boundaries: null,
  6203. hoistables: createHoistableState(),
  6204. inheritedHoistables: null,
  6205. together: !1,
  6206. next: null
  6207. };
  6208. null !== previousRow &&
  6209. 0 < previousRow.pendingTasks &&
  6210. (newRow.pendingTasks++,
  6211. (newRow.boundaries = []),
  6212. (previousRow.next = newRow));
  6213. return newRow;
  6214. }
  6215. function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
  6216. var prevKeyPath = task.keyPath,
  6217. prevTreeContext = task.treeContext,
  6218. prevRow = task.row,
  6219. previousComponentStack = task.componentStack;
  6220. var previousDebugTask = task.debugTask;
  6221. pushServerComponentStack(task, task.node.props.children._debugInfo);
  6222. task.keyPath = keyPath;
  6223. keyPath = rows.length;
  6224. var previousSuspenseListRow = null;
  6225. if (null !== task.replay) {
  6226. var resumeSlots = task.replay.slots;
  6227. if (null !== resumeSlots && "object" === typeof resumeSlots)
  6228. for (var n = 0; n < keyPath; n++) {
  6229. var i =
  6230. "backwards" !== revealOrder &&
  6231. "unstable_legacy-backwards" !== revealOrder
  6232. ? n
  6233. : keyPath - 1 - n,
  6234. node = rows[i];
  6235. task.row = previousSuspenseListRow = createSuspenseListRow(
  6236. previousSuspenseListRow
  6237. );
  6238. task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
  6239. var resumeSegmentID = resumeSlots[i];
  6240. "number" === typeof resumeSegmentID
  6241. ? (resumeNode(request, task, resumeSegmentID, node, i),
  6242. delete resumeSlots[i])
  6243. : renderNode(request, task, node, i);
  6244. 0 === --previousSuspenseListRow.pendingTasks &&
  6245. finishSuspenseListRow(request, previousSuspenseListRow);
  6246. }
  6247. else
  6248. for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)
  6249. (n =
  6250. "backwards" !== revealOrder &&
  6251. "unstable_legacy-backwards" !== revealOrder
  6252. ? resumeSlots
  6253. : keyPath - 1 - resumeSlots),
  6254. (i = rows[n]),
  6255. warnForMissingKey(request, task, i),
  6256. (task.row = previousSuspenseListRow =
  6257. createSuspenseListRow(previousSuspenseListRow)),
  6258. (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),
  6259. renderNode(request, task, i, n),
  6260. 0 === --previousSuspenseListRow.pendingTasks &&
  6261. finishSuspenseListRow(request, previousSuspenseListRow);
  6262. } else if (
  6263. "backwards" !== revealOrder &&
  6264. "unstable_legacy-backwards" !== revealOrder
  6265. )
  6266. for (revealOrder = 0; revealOrder < keyPath; revealOrder++)
  6267. (resumeSlots = rows[revealOrder]),
  6268. warnForMissingKey(request, task, resumeSlots),
  6269. (task.row = previousSuspenseListRow =
  6270. createSuspenseListRow(previousSuspenseListRow)),
  6271. (task.treeContext = pushTreeContext(
  6272. prevTreeContext,
  6273. keyPath,
  6274. revealOrder
  6275. )),
  6276. renderNode(request, task, resumeSlots, revealOrder),
  6277. 0 === --previousSuspenseListRow.pendingTasks &&
  6278. finishSuspenseListRow(request, previousSuspenseListRow);
  6279. else {
  6280. revealOrder = task.blockedSegment;
  6281. resumeSlots = revealOrder.children.length;
  6282. n = revealOrder.chunks.length;
  6283. for (i = keyPath - 1; 0 <= i; i--) {
  6284. node = rows[i];
  6285. task.row = previousSuspenseListRow = createSuspenseListRow(
  6286. previousSuspenseListRow
  6287. );
  6288. task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
  6289. resumeSegmentID = createPendingSegment(
  6290. request,
  6291. n,
  6292. null,
  6293. task.formatContext,
  6294. 0 === i ? revealOrder.lastPushedText : !0,
  6295. !0
  6296. );
  6297. revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
  6298. task.blockedSegment = resumeSegmentID;
  6299. warnForMissingKey(request, task, node);
  6300. try {
  6301. renderNode(request, task, node, i),
  6302. pushSegmentFinale(
  6303. resumeSegmentID.chunks,
  6304. request.renderState,
  6305. resumeSegmentID.lastPushedText,
  6306. resumeSegmentID.textEmbedded
  6307. ),
  6308. (resumeSegmentID.status = COMPLETED),
  6309. finishedSegment(request, task.blockedBoundary, resumeSegmentID),
  6310. 0 === --previousSuspenseListRow.pendingTasks &&
  6311. finishSuspenseListRow(request, previousSuspenseListRow);
  6312. } catch (thrownValue) {
  6313. throw (
  6314. ((resumeSegmentID.status = 12 === request.status ? ABORTED : ERRORED),
  6315. thrownValue)
  6316. );
  6317. }
  6318. }
  6319. task.blockedSegment = revealOrder;
  6320. revealOrder.lastPushedText = !1;
  6321. }
  6322. null !== prevRow &&
  6323. null !== previousSuspenseListRow &&
  6324. 0 < previousSuspenseListRow.pendingTasks &&
  6325. (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
  6326. task.treeContext = prevTreeContext;
  6327. task.row = prevRow;
  6328. task.keyPath = prevKeyPath;
  6329. task.componentStack = previousComponentStack;
  6330. task.debugTask = previousDebugTask;
  6331. }
  6332. function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
  6333. var prevThenableState = task.thenableState;
  6334. task.thenableState = null;
  6335. currentlyRenderingComponent = {};
  6336. currentlyRenderingTask = task;
  6337. currentlyRenderingRequest = request;
  6338. currentlyRenderingKeyPath = keyPath;
  6339. isInHookUserCodeInDev = !1;
  6340. actionStateCounter = localIdCounter = 0;
  6341. actionStateMatchingIndex = -1;
  6342. thenableIndexCounter = 0;
  6343. thenableState = prevThenableState;
  6344. for (
  6345. request = callComponentInDEV(Component, props, secondArg);
  6346. didScheduleRenderPhaseUpdate;
  6347. )
  6348. (didScheduleRenderPhaseUpdate = !1),
  6349. (actionStateCounter = localIdCounter = 0),
  6350. (actionStateMatchingIndex = -1),
  6351. (thenableIndexCounter = 0),
  6352. (numberOfReRenders += 1),
  6353. (workInProgressHook = null),
  6354. (request = Component(props, secondArg));
  6355. resetHooksState();
  6356. return request;
  6357. }
  6358. var didWarnAboutBadClass = {},
  6359. didWarnAboutContextTypes = {},
  6360. didWarnAboutContextTypeOnFunctionComponent = {},
  6361. didWarnAboutGetDerivedStateOnFunctionComponent = {},
  6362. didWarnAboutReassigningProps = !1,
  6363. didWarnAboutGenerators = !1,
  6364. didWarnAboutMaps = !1;
  6365. function finishFunctionComponent(
  6366. request,
  6367. task,
  6368. keyPath,
  6369. children,
  6370. hasId,
  6371. actionStateCount,
  6372. actionStateMatchingIndex
  6373. ) {
  6374. var didEmitActionStateMarkers = !1;
  6375. if (0 !== actionStateCount && null !== request.formState) {
  6376. var segment = task.blockedSegment;
  6377. if (null !== segment) {
  6378. didEmitActionStateMarkers = !0;
  6379. segment = segment.chunks;
  6380. for (var i = 0; i < actionStateCount; i++)
  6381. i === actionStateMatchingIndex
  6382. ? segment.push("\x3c!--F!--\x3e")
  6383. : segment.push("\x3c!--F--\x3e");
  6384. }
  6385. }
  6386. actionStateCount = task.keyPath;
  6387. task.keyPath = keyPath;
  6388. hasId
  6389. ? ((keyPath = task.treeContext),
  6390. (task.treeContext = pushTreeContext(keyPath, 1, 0)),
  6391. renderNode(request, task, children, -1),
  6392. (task.treeContext = keyPath))
  6393. : didEmitActionStateMarkers
  6394. ? renderNode(request, task, children, -1)
  6395. : renderNodeDestructive(request, task, children, -1);
  6396. task.keyPath = actionStateCount;
  6397. }
  6398. function renderElement(request, task, keyPath, type, props, ref) {
  6399. if ("function" === typeof type)
  6400. if (type.prototype && type.prototype.isReactComponent) {
  6401. var newProps = props;
  6402. if ("ref" in props) {
  6403. newProps = {};
  6404. for (var propName in props)
  6405. "ref" !== propName && (newProps[propName] = props[propName]);
  6406. }
  6407. var defaultProps = type.defaultProps;
  6408. if (defaultProps) {
  6409. newProps === props && (newProps = assign({}, newProps, props));
  6410. for (var _propName in defaultProps)
  6411. void 0 === newProps[_propName] &&
  6412. (newProps[_propName] = defaultProps[_propName]);
  6413. }
  6414. var resolvedProps = newProps;
  6415. var context = emptyContextObject,
  6416. contextType = type.contextType;
  6417. if (
  6418. "contextType" in type &&
  6419. null !== contextType &&
  6420. (void 0 === contextType ||
  6421. contextType.$$typeof !== REACT_CONTEXT_TYPE) &&
  6422. !didWarnAboutInvalidateContextType.has(type)
  6423. ) {
  6424. didWarnAboutInvalidateContextType.add(type);
  6425. var addendum =
  6426. void 0 === contextType
  6427. ? " 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."
  6428. : "object" !== typeof contextType
  6429. ? " However, it is set to a " + typeof contextType + "."
  6430. : contextType.$$typeof === REACT_CONSUMER_TYPE
  6431. ? " Did you accidentally pass the Context.Consumer instead?"
  6432. : " However, it is set to an object with keys {" +
  6433. Object.keys(contextType).join(", ") +
  6434. "}.";
  6435. console.error(
  6436. "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
  6437. getComponentNameFromType(type) || "Component",
  6438. addendum
  6439. );
  6440. }
  6441. "object" === typeof contextType &&
  6442. null !== contextType &&
  6443. (context = contextType._currentValue);
  6444. var instance = new type(resolvedProps, context);
  6445. if (
  6446. "function" === typeof type.getDerivedStateFromProps &&
  6447. (null === instance.state || void 0 === instance.state)
  6448. ) {
  6449. var componentName = getComponentNameFromType(type) || "Component";
  6450. didWarnAboutUninitializedState.has(componentName) ||
  6451. (didWarnAboutUninitializedState.add(componentName),
  6452. console.error(
  6453. "`%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.",
  6454. componentName,
  6455. null === instance.state ? "null" : "undefined",
  6456. componentName
  6457. ));
  6458. }
  6459. if (
  6460. "function" === typeof type.getDerivedStateFromProps ||
  6461. "function" === typeof instance.getSnapshotBeforeUpdate
  6462. ) {
  6463. var foundWillMountName = null,
  6464. foundWillReceivePropsName = null,
  6465. foundWillUpdateName = null;
  6466. "function" === typeof instance.componentWillMount &&
  6467. !0 !== instance.componentWillMount.__suppressDeprecationWarning
  6468. ? (foundWillMountName = "componentWillMount")
  6469. : "function" === typeof instance.UNSAFE_componentWillMount &&
  6470. (foundWillMountName = "UNSAFE_componentWillMount");
  6471. "function" === typeof instance.componentWillReceiveProps &&
  6472. !0 !== instance.componentWillReceiveProps.__suppressDeprecationWarning
  6473. ? (foundWillReceivePropsName = "componentWillReceiveProps")
  6474. : "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  6475. (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps");
  6476. "function" === typeof instance.componentWillUpdate &&
  6477. !0 !== instance.componentWillUpdate.__suppressDeprecationWarning
  6478. ? (foundWillUpdateName = "componentWillUpdate")
  6479. : "function" === typeof instance.UNSAFE_componentWillUpdate &&
  6480. (foundWillUpdateName = "UNSAFE_componentWillUpdate");
  6481. if (
  6482. null !== foundWillMountName ||
  6483. null !== foundWillReceivePropsName ||
  6484. null !== foundWillUpdateName
  6485. ) {
  6486. var _componentName = getComponentNameFromType(type) || "Component",
  6487. newApiName =
  6488. "function" === typeof type.getDerivedStateFromProps
  6489. ? "getDerivedStateFromProps()"
  6490. : "getSnapshotBeforeUpdate()";
  6491. didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) ||
  6492. (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName),
  6493. console.error(
  6494. "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",
  6495. _componentName,
  6496. newApiName,
  6497. null !== foundWillMountName ? "\n " + foundWillMountName : "",
  6498. null !== foundWillReceivePropsName
  6499. ? "\n " + foundWillReceivePropsName
  6500. : "",
  6501. null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
  6502. ));
  6503. }
  6504. }
  6505. var name = getComponentNameFromType(type) || "Component";
  6506. instance.render ||
  6507. (type.prototype && "function" === typeof type.prototype.render
  6508. ? console.error(
  6509. "No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
  6510. name
  6511. )
  6512. : console.error(
  6513. "No `render` method found on the %s instance: you may have forgotten to define `render`.",
  6514. name
  6515. ));
  6516. !instance.getInitialState ||
  6517. instance.getInitialState.isReactClassApproved ||
  6518. instance.state ||
  6519. console.error(
  6520. "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?",
  6521. name
  6522. );
  6523. instance.getDefaultProps &&
  6524. !instance.getDefaultProps.isReactClassApproved &&
  6525. console.error(
  6526. "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.",
  6527. name
  6528. );
  6529. instance.contextType &&
  6530. console.error(
  6531. "contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
  6532. name
  6533. );
  6534. type.childContextTypes &&
  6535. !didWarnAboutChildContextTypes.has(type) &&
  6536. (didWarnAboutChildContextTypes.add(type),
  6537. console.error(
  6538. "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
  6539. name
  6540. ));
  6541. type.contextTypes &&
  6542. !didWarnAboutContextTypes$1.has(type) &&
  6543. (didWarnAboutContextTypes$1.add(type),
  6544. console.error(
  6545. "%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)",
  6546. name
  6547. ));
  6548. "function" === typeof instance.componentShouldUpdate &&
  6549. console.error(
  6550. "%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.",
  6551. name
  6552. );
  6553. type.prototype &&
  6554. type.prototype.isPureReactComponent &&
  6555. "undefined" !== typeof instance.shouldComponentUpdate &&
  6556. console.error(
  6557. "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
  6558. getComponentNameFromType(type) || "A pure component"
  6559. );
  6560. "function" === typeof instance.componentDidUnmount &&
  6561. console.error(
  6562. "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
  6563. name
  6564. );
  6565. "function" === typeof instance.componentDidReceiveProps &&
  6566. console.error(
  6567. "%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().",
  6568. name
  6569. );
  6570. "function" === typeof instance.componentWillRecieveProps &&
  6571. console.error(
  6572. "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
  6573. name
  6574. );
  6575. "function" === typeof instance.UNSAFE_componentWillRecieveProps &&
  6576. console.error(
  6577. "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
  6578. name
  6579. );
  6580. var hasMutatedProps = instance.props !== resolvedProps;
  6581. void 0 !== instance.props &&
  6582. hasMutatedProps &&
  6583. console.error(
  6584. "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
  6585. name
  6586. );
  6587. instance.defaultProps &&
  6588. console.error(
  6589. "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
  6590. name,
  6591. name
  6592. );
  6593. "function" !== typeof instance.getSnapshotBeforeUpdate ||
  6594. "function" === typeof instance.componentDidUpdate ||
  6595. didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type) ||
  6596. (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type),
  6597. console.error(
  6598. "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
  6599. getComponentNameFromType(type)
  6600. ));
  6601. "function" === typeof instance.getDerivedStateFromProps &&
  6602. console.error(
  6603. "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
  6604. name
  6605. );
  6606. "function" === typeof instance.getDerivedStateFromError &&
  6607. console.error(
  6608. "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
  6609. name
  6610. );
  6611. "function" === typeof type.getSnapshotBeforeUpdate &&
  6612. console.error(
  6613. "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
  6614. name
  6615. );
  6616. var state = instance.state;
  6617. state &&
  6618. ("object" !== typeof state || isArrayImpl(state)) &&
  6619. console.error("%s.state: must be set to an object or null", name);
  6620. "function" === typeof instance.getChildContext &&
  6621. "object" !== typeof type.childContextTypes &&
  6622. console.error(
  6623. "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
  6624. name
  6625. );
  6626. var initialState = void 0 !== instance.state ? instance.state : null;
  6627. instance.updater = classComponentUpdater;
  6628. instance.props = resolvedProps;
  6629. instance.state = initialState;
  6630. var internalInstance = { queue: [], replace: !1 };
  6631. instance._reactInternals = internalInstance;
  6632. var contextType$jscomp$0 = type.contextType;
  6633. instance.context =
  6634. "object" === typeof contextType$jscomp$0 &&
  6635. null !== contextType$jscomp$0
  6636. ? contextType$jscomp$0._currentValue
  6637. : emptyContextObject;
  6638. if (instance.state === resolvedProps) {
  6639. var componentName$jscomp$0 =
  6640. getComponentNameFromType(type) || "Component";
  6641. didWarnAboutDirectlyAssigningPropsToState.has(componentName$jscomp$0) ||
  6642. (didWarnAboutDirectlyAssigningPropsToState.add(
  6643. componentName$jscomp$0
  6644. ),
  6645. console.error(
  6646. "%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.",
  6647. componentName$jscomp$0
  6648. ));
  6649. }
  6650. var getDerivedStateFromProps = type.getDerivedStateFromProps;
  6651. if ("function" === typeof getDerivedStateFromProps) {
  6652. var partialState = getDerivedStateFromProps(
  6653. resolvedProps,
  6654. initialState
  6655. );
  6656. if (void 0 === partialState) {
  6657. var componentName$jscomp$1 =
  6658. getComponentNameFromType(type) || "Component";
  6659. didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1) ||
  6660. (didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1),
  6661. console.error(
  6662. "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
  6663. componentName$jscomp$1
  6664. ));
  6665. }
  6666. var JSCompiler_inline_result =
  6667. null === partialState || void 0 === partialState
  6668. ? initialState
  6669. : assign({}, initialState, partialState);
  6670. instance.state = JSCompiler_inline_result;
  6671. }
  6672. if (
  6673. "function" !== typeof type.getDerivedStateFromProps &&
  6674. "function" !== typeof instance.getSnapshotBeforeUpdate &&
  6675. ("function" === typeof instance.UNSAFE_componentWillMount ||
  6676. "function" === typeof instance.componentWillMount)
  6677. ) {
  6678. var oldState = instance.state;
  6679. if ("function" === typeof instance.componentWillMount) {
  6680. if (!0 !== instance.componentWillMount.__suppressDeprecationWarning) {
  6681. var componentName$jscomp$2 =
  6682. getComponentNameFromType(type) || "Unknown";
  6683. didWarnAboutDeprecatedWillMount[componentName$jscomp$2] ||
  6684. (console.warn(
  6685. "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\n\nPlease update the following components: %s",
  6686. componentName$jscomp$2
  6687. ),
  6688. (didWarnAboutDeprecatedWillMount[componentName$jscomp$2] = !0));
  6689. }
  6690. instance.componentWillMount();
  6691. }
  6692. "function" === typeof instance.UNSAFE_componentWillMount &&
  6693. instance.UNSAFE_componentWillMount();
  6694. oldState !== instance.state &&
  6695. (console.error(
  6696. "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
  6697. getComponentNameFromType(type) || "Component"
  6698. ),
  6699. classComponentUpdater.enqueueReplaceState(
  6700. instance,
  6701. instance.state,
  6702. null
  6703. ));
  6704. if (
  6705. null !== internalInstance.queue &&
  6706. 0 < internalInstance.queue.length
  6707. ) {
  6708. var oldQueue = internalInstance.queue,
  6709. oldReplace = internalInstance.replace;
  6710. internalInstance.queue = null;
  6711. internalInstance.replace = !1;
  6712. if (oldReplace && 1 === oldQueue.length) instance.state = oldQueue[0];
  6713. else {
  6714. for (
  6715. var nextState = oldReplace ? oldQueue[0] : instance.state,
  6716. dontMutate = !0,
  6717. i = oldReplace ? 1 : 0;
  6718. i < oldQueue.length;
  6719. i++
  6720. ) {
  6721. var partial = oldQueue[i],
  6722. partialState$jscomp$0 =
  6723. "function" === typeof partial
  6724. ? partial.call(instance, nextState, resolvedProps, void 0)
  6725. : partial;
  6726. null != partialState$jscomp$0 &&
  6727. (dontMutate
  6728. ? ((dontMutate = !1),
  6729. (nextState = assign({}, nextState, partialState$jscomp$0)))
  6730. : assign(nextState, partialState$jscomp$0));
  6731. }
  6732. instance.state = nextState;
  6733. }
  6734. } else internalInstance.queue = null;
  6735. }
  6736. var nextChildren = callRenderInDEV(instance);
  6737. if (12 === request.status) throw null;
  6738. instance.props !== resolvedProps &&
  6739. (didWarnAboutReassigningProps ||
  6740. console.error(
  6741. "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
  6742. getComponentNameFromType(type) || "a component"
  6743. ),
  6744. (didWarnAboutReassigningProps = !0));
  6745. var prevKeyPath = task.keyPath;
  6746. task.keyPath = keyPath;
  6747. renderNodeDestructive(request, task, nextChildren, -1);
  6748. task.keyPath = prevKeyPath;
  6749. } else {
  6750. if (type.prototype && "function" === typeof type.prototype.render) {
  6751. var componentName$jscomp$3 =
  6752. getComponentNameFromType(type) || "Unknown";
  6753. didWarnAboutBadClass[componentName$jscomp$3] ||
  6754. (console.error(
  6755. "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.",
  6756. componentName$jscomp$3,
  6757. componentName$jscomp$3
  6758. ),
  6759. (didWarnAboutBadClass[componentName$jscomp$3] = !0));
  6760. }
  6761. var value = renderWithHooks(request, task, keyPath, type, props, void 0);
  6762. if (12 === request.status) throw null;
  6763. var hasId = 0 !== localIdCounter,
  6764. actionStateCount = actionStateCounter,
  6765. actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;
  6766. if (type.contextTypes) {
  6767. var _componentName$jscomp$0 =
  6768. getComponentNameFromType(type) || "Unknown";
  6769. didWarnAboutContextTypes[_componentName$jscomp$0] ||
  6770. ((didWarnAboutContextTypes[_componentName$jscomp$0] = !0),
  6771. console.error(
  6772. "%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)",
  6773. _componentName$jscomp$0
  6774. ));
  6775. }
  6776. type &&
  6777. type.childContextTypes &&
  6778. console.error(
  6779. "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
  6780. type.displayName || type.name || "Component"
  6781. );
  6782. if ("function" === typeof type.getDerivedStateFromProps) {
  6783. var componentName$jscomp$4 =
  6784. getComponentNameFromType(type) || "Unknown";
  6785. didWarnAboutGetDerivedStateOnFunctionComponent[
  6786. componentName$jscomp$4
  6787. ] ||
  6788. (console.error(
  6789. "%s: Function components do not support getDerivedStateFromProps.",
  6790. componentName$jscomp$4
  6791. ),
  6792. (didWarnAboutGetDerivedStateOnFunctionComponent[
  6793. componentName$jscomp$4
  6794. ] = !0));
  6795. }
  6796. if ("object" === typeof type.contextType && null !== type.contextType) {
  6797. var _componentName2 = getComponentNameFromType(type) || "Unknown";
  6798. didWarnAboutContextTypeOnFunctionComponent[_componentName2] ||
  6799. (console.error(
  6800. "%s: Function components do not support contextType.",
  6801. _componentName2
  6802. ),
  6803. (didWarnAboutContextTypeOnFunctionComponent[_componentName2] = !0));
  6804. }
  6805. finishFunctionComponent(
  6806. request,
  6807. task,
  6808. keyPath,
  6809. value,
  6810. hasId,
  6811. actionStateCount,
  6812. actionStateMatchingIndex$jscomp$0
  6813. );
  6814. }
  6815. else if ("string" === typeof type) {
  6816. var segment = task.blockedSegment;
  6817. if (null === segment) {
  6818. var children = props.children,
  6819. prevContext = task.formatContext,
  6820. prevKeyPath$jscomp$0 = task.keyPath;
  6821. task.formatContext = getChildFormatContext(prevContext, type, props);
  6822. task.keyPath = keyPath;
  6823. renderNode(request, task, children, -1);
  6824. task.formatContext = prevContext;
  6825. task.keyPath = prevKeyPath$jscomp$0;
  6826. } else {
  6827. var _children = pushStartInstance(
  6828. segment.chunks,
  6829. type,
  6830. props,
  6831. request.resumableState,
  6832. request.renderState,
  6833. task.blockedPreamble,
  6834. task.hoistableState,
  6835. task.formatContext,
  6836. segment.lastPushedText
  6837. );
  6838. segment.lastPushedText = !1;
  6839. var _prevContext2 = task.formatContext,
  6840. _prevKeyPath3 = task.keyPath;
  6841. task.keyPath = keyPath;
  6842. if (
  6843. (task.formatContext = getChildFormatContext(_prevContext2, type, props))
  6844. .insertionMode === HTML_HEAD_MODE
  6845. ) {
  6846. var preambleSegment = createPendingSegment(
  6847. request,
  6848. 0,
  6849. null,
  6850. task.formatContext,
  6851. !1,
  6852. !1
  6853. );
  6854. segment.preambleChildren.push(preambleSegment);
  6855. task.blockedSegment = preambleSegment;
  6856. try {
  6857. (preambleSegment.status = 6),
  6858. renderNode(request, task, _children, -1),
  6859. pushSegmentFinale(
  6860. preambleSegment.chunks,
  6861. request.renderState,
  6862. preambleSegment.lastPushedText,
  6863. preambleSegment.textEmbedded
  6864. ),
  6865. (preambleSegment.status = COMPLETED),
  6866. finishedSegment(request, task.blockedBoundary, preambleSegment);
  6867. } finally {
  6868. task.blockedSegment = segment;
  6869. }
  6870. } else renderNode(request, task, _children, -1);
  6871. task.formatContext = _prevContext2;
  6872. task.keyPath = _prevKeyPath3;
  6873. a: {
  6874. var target = segment.chunks,
  6875. resumableState = request.resumableState;
  6876. switch (type) {
  6877. case "title":
  6878. case "style":
  6879. case "script":
  6880. case "area":
  6881. case "base":
  6882. case "br":
  6883. case "col":
  6884. case "embed":
  6885. case "hr":
  6886. case "img":
  6887. case "input":
  6888. case "keygen":
  6889. case "link":
  6890. case "meta":
  6891. case "param":
  6892. case "source":
  6893. case "track":
  6894. case "wbr":
  6895. break a;
  6896. case "body":
  6897. if (_prevContext2.insertionMode <= HTML_HTML_MODE) {
  6898. resumableState.hasBody = !0;
  6899. break a;
  6900. }
  6901. break;
  6902. case "html":
  6903. if (_prevContext2.insertionMode === ROOT_HTML_MODE) {
  6904. resumableState.hasHtml = !0;
  6905. break a;
  6906. }
  6907. break;
  6908. case "head":
  6909. if (_prevContext2.insertionMode <= HTML_HTML_MODE) break a;
  6910. }
  6911. target.push(endChunkForTag(type));
  6912. }
  6913. segment.lastPushedText = !1;
  6914. }
  6915. } else {
  6916. switch (type) {
  6917. case REACT_LEGACY_HIDDEN_TYPE:
  6918. case REACT_STRICT_MODE_TYPE:
  6919. case REACT_PROFILER_TYPE:
  6920. case REACT_FRAGMENT_TYPE:
  6921. var prevKeyPath$jscomp$1 = task.keyPath;
  6922. task.keyPath = keyPath;
  6923. renderNodeDestructive(request, task, props.children, -1);
  6924. task.keyPath = prevKeyPath$jscomp$1;
  6925. return;
  6926. case REACT_ACTIVITY_TYPE:
  6927. var segment$jscomp$0 = task.blockedSegment;
  6928. if (null === segment$jscomp$0) {
  6929. if ("hidden" !== props.mode) {
  6930. var prevKeyPath$jscomp$2 = task.keyPath;
  6931. task.keyPath = keyPath;
  6932. renderNode(request, task, props.children, -1);
  6933. task.keyPath = prevKeyPath$jscomp$2;
  6934. }
  6935. } else if ("hidden" !== props.mode) {
  6936. segment$jscomp$0.chunks.push("\x3c!--&--\x3e");
  6937. segment$jscomp$0.lastPushedText = !1;
  6938. var _prevKeyPath4 = task.keyPath;
  6939. task.keyPath = keyPath;
  6940. renderNode(request, task, props.children, -1);
  6941. task.keyPath = _prevKeyPath4;
  6942. segment$jscomp$0.chunks.push("\x3c!--/&--\x3e");
  6943. segment$jscomp$0.lastPushedText = !1;
  6944. }
  6945. return;
  6946. case REACT_SUSPENSE_LIST_TYPE:
  6947. a: {
  6948. var children$jscomp$0 = props.children,
  6949. revealOrder = props.revealOrder;
  6950. if (
  6951. "forwards" === revealOrder ||
  6952. "backwards" === revealOrder ||
  6953. "unstable_legacy-backwards" === revealOrder
  6954. ) {
  6955. if (isArrayImpl(children$jscomp$0)) {
  6956. renderSuspenseListRows(
  6957. request,
  6958. task,
  6959. keyPath,
  6960. children$jscomp$0,
  6961. revealOrder
  6962. );
  6963. break a;
  6964. }
  6965. var iteratorFn = getIteratorFn(children$jscomp$0);
  6966. if (iteratorFn) {
  6967. var iterator = iteratorFn.call(children$jscomp$0);
  6968. if (iterator) {
  6969. validateIterable(
  6970. task,
  6971. children$jscomp$0,
  6972. -1,
  6973. iterator,
  6974. iteratorFn
  6975. );
  6976. var step = iterator.next();
  6977. if (!step.done) {
  6978. var rows = [];
  6979. do rows.push(step.value), (step = iterator.next());
  6980. while (!step.done);
  6981. renderSuspenseListRows(
  6982. request,
  6983. task,
  6984. keyPath,
  6985. children$jscomp$0,
  6986. revealOrder
  6987. );
  6988. }
  6989. break a;
  6990. }
  6991. }
  6992. }
  6993. if ("together" === revealOrder) {
  6994. var _prevKeyPath2 = task.keyPath,
  6995. prevRow = task.row,
  6996. newRow = (task.row = createSuspenseListRow(null));
  6997. newRow.boundaries = [];
  6998. newRow.together = !0;
  6999. task.keyPath = keyPath;
  7000. renderNodeDestructive(request, task, children$jscomp$0, -1);
  7001. 0 === --newRow.pendingTasks &&
  7002. finishSuspenseListRow(request, newRow);
  7003. task.keyPath = _prevKeyPath2;
  7004. task.row = prevRow;
  7005. null !== prevRow &&
  7006. 0 < newRow.pendingTasks &&
  7007. (prevRow.pendingTasks++, (newRow.next = prevRow));
  7008. } else {
  7009. var prevKeyPath$jscomp$3 = task.keyPath;
  7010. task.keyPath = keyPath;
  7011. renderNodeDestructive(request, task, children$jscomp$0, -1);
  7012. task.keyPath = prevKeyPath$jscomp$3;
  7013. }
  7014. }
  7015. return;
  7016. case REACT_VIEW_TRANSITION_TYPE:
  7017. case REACT_SCOPE_TYPE:
  7018. throw Error("ReactDOMServer does not yet support scope components.");
  7019. case REACT_SUSPENSE_TYPE:
  7020. a: if (null !== task.replay) {
  7021. var _prevKeyPath = task.keyPath,
  7022. _prevContext = task.formatContext,
  7023. _prevRow = task.row;
  7024. task.keyPath = keyPath;
  7025. task.formatContext = getSuspenseContentFormatContext(
  7026. request.resumableState,
  7027. _prevContext
  7028. );
  7029. task.row = null;
  7030. var _content = props.children;
  7031. try {
  7032. renderNode(request, task, _content, -1);
  7033. } finally {
  7034. (task.keyPath = _prevKeyPath),
  7035. (task.formatContext = _prevContext),
  7036. (task.row = _prevRow);
  7037. }
  7038. } else {
  7039. var prevKeyPath$jscomp$4 = task.keyPath,
  7040. prevContext$jscomp$0 = task.formatContext,
  7041. prevRow$jscomp$0 = task.row,
  7042. parentBoundary = task.blockedBoundary,
  7043. parentPreamble = task.blockedPreamble,
  7044. parentHoistableState = task.hoistableState,
  7045. parentSegment = task.blockedSegment,
  7046. fallback = props.fallback,
  7047. content = props.children,
  7048. fallbackAbortSet = new Set();
  7049. var newBoundary =
  7050. task.formatContext.insertionMode < HTML_MODE
  7051. ? createSuspenseBoundary(
  7052. request,
  7053. task.row,
  7054. fallbackAbortSet,
  7055. createPreambleState(),
  7056. createPreambleState()
  7057. )
  7058. : createSuspenseBoundary(
  7059. request,
  7060. task.row,
  7061. fallbackAbortSet,
  7062. null,
  7063. null
  7064. );
  7065. null !== request.trackedPostpones &&
  7066. (newBoundary.trackedContentKeyPath = keyPath);
  7067. var boundarySegment = createPendingSegment(
  7068. request,
  7069. parentSegment.chunks.length,
  7070. newBoundary,
  7071. task.formatContext,
  7072. !1,
  7073. !1
  7074. );
  7075. parentSegment.children.push(boundarySegment);
  7076. parentSegment.lastPushedText = !1;
  7077. var contentRootSegment = createPendingSegment(
  7078. request,
  7079. 0,
  7080. null,
  7081. task.formatContext,
  7082. !1,
  7083. !1
  7084. );
  7085. contentRootSegment.parentFlushed = !0;
  7086. if (null !== request.trackedPostpones) {
  7087. var suspenseComponentStack = task.componentStack,
  7088. fallbackKeyPath = [keyPath[0], "Suspense Fallback", keyPath[2]],
  7089. fallbackReplayNode = [
  7090. fallbackKeyPath[1],
  7091. fallbackKeyPath[2],
  7092. [],
  7093. null
  7094. ];
  7095. request.trackedPostpones.workingMap.set(
  7096. fallbackKeyPath,
  7097. fallbackReplayNode
  7098. );
  7099. newBoundary.trackedFallbackNode = fallbackReplayNode;
  7100. task.blockedSegment = boundarySegment;
  7101. task.blockedPreamble = newBoundary.fallbackPreamble;
  7102. task.keyPath = fallbackKeyPath;
  7103. task.formatContext = getSuspenseFallbackFormatContext(
  7104. request.resumableState,
  7105. prevContext$jscomp$0
  7106. );
  7107. task.componentStack =
  7108. replaceSuspenseComponentStackWithSuspenseFallbackStack(
  7109. suspenseComponentStack
  7110. );
  7111. boundarySegment.status = 6;
  7112. try {
  7113. renderNode(request, task, fallback, -1),
  7114. pushSegmentFinale(
  7115. boundarySegment.chunks,
  7116. request.renderState,
  7117. boundarySegment.lastPushedText,
  7118. boundarySegment.textEmbedded
  7119. ),
  7120. (boundarySegment.status = COMPLETED),
  7121. finishedSegment(request, parentBoundary, boundarySegment);
  7122. } catch (thrownValue) {
  7123. throw (
  7124. ((boundarySegment.status =
  7125. 12 === request.status ? ABORTED : ERRORED),
  7126. thrownValue)
  7127. );
  7128. } finally {
  7129. (task.blockedSegment = parentSegment),
  7130. (task.blockedPreamble = parentPreamble),
  7131. (task.keyPath = prevKeyPath$jscomp$4),
  7132. (task.formatContext = prevContext$jscomp$0);
  7133. }
  7134. var suspendedPrimaryTask = createRenderTask(
  7135. request,
  7136. null,
  7137. content,
  7138. -1,
  7139. newBoundary,
  7140. contentRootSegment,
  7141. newBoundary.contentPreamble,
  7142. newBoundary.contentState,
  7143. task.abortSet,
  7144. keyPath,
  7145. getSuspenseContentFormatContext(
  7146. request.resumableState,
  7147. task.formatContext
  7148. ),
  7149. task.context,
  7150. task.treeContext,
  7151. null,
  7152. suspenseComponentStack,
  7153. emptyContextObject,
  7154. task.debugTask
  7155. );
  7156. pushComponentStack(suspendedPrimaryTask);
  7157. request.pingedTasks.push(suspendedPrimaryTask);
  7158. } else {
  7159. task.blockedBoundary = newBoundary;
  7160. task.blockedPreamble = newBoundary.contentPreamble;
  7161. task.hoistableState = newBoundary.contentState;
  7162. task.blockedSegment = contentRootSegment;
  7163. task.keyPath = keyPath;
  7164. task.formatContext = getSuspenseContentFormatContext(
  7165. request.resumableState,
  7166. prevContext$jscomp$0
  7167. );
  7168. task.row = null;
  7169. contentRootSegment.status = 6;
  7170. try {
  7171. if (
  7172. (renderNode(request, task, content, -1),
  7173. pushSegmentFinale(
  7174. contentRootSegment.chunks,
  7175. request.renderState,
  7176. contentRootSegment.lastPushedText,
  7177. contentRootSegment.textEmbedded
  7178. ),
  7179. (contentRootSegment.status = COMPLETED),
  7180. finishedSegment(request, newBoundary, contentRootSegment),
  7181. queueCompletedSegment(newBoundary, contentRootSegment),
  7182. 0 === newBoundary.pendingTasks &&
  7183. newBoundary.status === PENDING)
  7184. ) {
  7185. if (
  7186. ((newBoundary.status = COMPLETED),
  7187. !isEligibleForOutlining(request, newBoundary))
  7188. ) {
  7189. null !== prevRow$jscomp$0 &&
  7190. 0 === --prevRow$jscomp$0.pendingTasks &&
  7191. finishSuspenseListRow(request, prevRow$jscomp$0);
  7192. 0 === request.pendingRootTasks &&
  7193. task.blockedPreamble &&
  7194. preparePreamble(request);
  7195. break a;
  7196. }
  7197. } else
  7198. null !== prevRow$jscomp$0 &&
  7199. prevRow$jscomp$0.together &&
  7200. tryToResolveTogetherRow(request, prevRow$jscomp$0);
  7201. } catch (thrownValue$2) {
  7202. newBoundary.status = CLIENT_RENDERED;
  7203. if (12 === request.status) {
  7204. contentRootSegment.status = ABORTED;
  7205. var error = request.fatalError;
  7206. } else
  7207. (contentRootSegment.status = ERRORED), (error = thrownValue$2);
  7208. var thrownInfo = getThrownInfo(task.componentStack);
  7209. var errorDigest = logRecoverableError(
  7210. request,
  7211. error,
  7212. thrownInfo,
  7213. task.debugTask
  7214. );
  7215. encodeErrorForBoundary(
  7216. newBoundary,
  7217. errorDigest,
  7218. error,
  7219. thrownInfo,
  7220. !1
  7221. );
  7222. untrackBoundary(request, newBoundary);
  7223. } finally {
  7224. (task.blockedBoundary = parentBoundary),
  7225. (task.blockedPreamble = parentPreamble),
  7226. (task.hoistableState = parentHoistableState),
  7227. (task.blockedSegment = parentSegment),
  7228. (task.keyPath = prevKeyPath$jscomp$4),
  7229. (task.formatContext = prevContext$jscomp$0),
  7230. (task.row = prevRow$jscomp$0);
  7231. }
  7232. var suspendedFallbackTask = createRenderTask(
  7233. request,
  7234. null,
  7235. fallback,
  7236. -1,
  7237. parentBoundary,
  7238. boundarySegment,
  7239. newBoundary.fallbackPreamble,
  7240. newBoundary.fallbackState,
  7241. fallbackAbortSet,
  7242. [keyPath[0], "Suspense Fallback", keyPath[2]],
  7243. getSuspenseFallbackFormatContext(
  7244. request.resumableState,
  7245. task.formatContext
  7246. ),
  7247. task.context,
  7248. task.treeContext,
  7249. task.row,
  7250. replaceSuspenseComponentStackWithSuspenseFallbackStack(
  7251. task.componentStack
  7252. ),
  7253. emptyContextObject,
  7254. task.debugTask
  7255. );
  7256. pushComponentStack(suspendedFallbackTask);
  7257. request.pingedTasks.push(suspendedFallbackTask);
  7258. }
  7259. }
  7260. return;
  7261. }
  7262. if ("object" === typeof type && null !== type)
  7263. switch (type.$$typeof) {
  7264. case REACT_FORWARD_REF_TYPE:
  7265. if ("ref" in props) {
  7266. var propsWithoutRef = {};
  7267. for (var key in props)
  7268. "ref" !== key && (propsWithoutRef[key] = props[key]);
  7269. } else propsWithoutRef = props;
  7270. var children$jscomp$1 = renderWithHooks(
  7271. request,
  7272. task,
  7273. keyPath,
  7274. type.render,
  7275. propsWithoutRef,
  7276. ref
  7277. );
  7278. finishFunctionComponent(
  7279. request,
  7280. task,
  7281. keyPath,
  7282. children$jscomp$1,
  7283. 0 !== localIdCounter,
  7284. actionStateCounter,
  7285. actionStateMatchingIndex
  7286. );
  7287. return;
  7288. case REACT_MEMO_TYPE:
  7289. renderElement(request, task, keyPath, type.type, props, ref);
  7290. return;
  7291. case REACT_CONTEXT_TYPE:
  7292. var value$jscomp$0 = props.value,
  7293. children$jscomp$2 = props.children;
  7294. var prevSnapshot = task.context;
  7295. var prevKeyPath$jscomp$5 = task.keyPath;
  7296. var prevValue = type._currentValue;
  7297. type._currentValue = value$jscomp$0;
  7298. void 0 !== type._currentRenderer &&
  7299. null !== type._currentRenderer &&
  7300. type._currentRenderer !== rendererSigil &&
  7301. console.error(
  7302. "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
  7303. );
  7304. type._currentRenderer = rendererSigil;
  7305. var prevNode = currentActiveSnapshot,
  7306. newNode = {
  7307. parent: prevNode,
  7308. depth: null === prevNode ? 0 : prevNode.depth + 1,
  7309. context: type,
  7310. parentValue: prevValue,
  7311. value: value$jscomp$0
  7312. };
  7313. currentActiveSnapshot = newNode;
  7314. task.context = newNode;
  7315. task.keyPath = keyPath;
  7316. renderNodeDestructive(request, task, children$jscomp$2, -1);
  7317. var prevSnapshot$jscomp$0 = currentActiveSnapshot;
  7318. if (null === prevSnapshot$jscomp$0)
  7319. throw Error(
  7320. "Tried to pop a Context at the root of the app. This is a bug in React."
  7321. );
  7322. prevSnapshot$jscomp$0.context !== type &&
  7323. console.error(
  7324. "The parent context is not the expected context. This is probably a bug in React."
  7325. );
  7326. prevSnapshot$jscomp$0.context._currentValue =
  7327. prevSnapshot$jscomp$0.parentValue;
  7328. void 0 !== type._currentRenderer &&
  7329. null !== type._currentRenderer &&
  7330. type._currentRenderer !== rendererSigil &&
  7331. console.error(
  7332. "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
  7333. );
  7334. type._currentRenderer = rendererSigil;
  7335. var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =
  7336. prevSnapshot$jscomp$0.parent);
  7337. task.context = JSCompiler_inline_result$jscomp$0;
  7338. task.keyPath = prevKeyPath$jscomp$5;
  7339. prevSnapshot !== task.context &&
  7340. console.error(
  7341. "Popping the context provider did not return back to the original snapshot. This is a bug in React."
  7342. );
  7343. return;
  7344. case REACT_CONSUMER_TYPE:
  7345. var context$jscomp$0 = type._context,
  7346. render = props.children;
  7347. "function" !== typeof render &&
  7348. console.error(
  7349. "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."
  7350. );
  7351. var newChildren = render(context$jscomp$0._currentValue),
  7352. prevKeyPath$jscomp$6 = task.keyPath;
  7353. task.keyPath = keyPath;
  7354. renderNodeDestructive(request, task, newChildren, -1);
  7355. task.keyPath = prevKeyPath$jscomp$6;
  7356. return;
  7357. case REACT_LAZY_TYPE:
  7358. var Component = callLazyInitInDEV(type);
  7359. if (12 === request.status) throw null;
  7360. renderElement(request, task, keyPath, Component, props, ref);
  7361. return;
  7362. }
  7363. var info = "";
  7364. if (
  7365. void 0 === type ||
  7366. ("object" === typeof type &&
  7367. null !== type &&
  7368. 0 === Object.keys(type).length)
  7369. )
  7370. info +=
  7371. " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
  7372. throw Error(
  7373. "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
  7374. ((null == type ? type : typeof type) + "." + info)
  7375. );
  7376. }
  7377. }
  7378. function resumeNode(request, task, segmentId, node, childIndex) {
  7379. var prevReplay = task.replay,
  7380. blockedBoundary = task.blockedBoundary,
  7381. resumedSegment = createPendingSegment(
  7382. request,
  7383. 0,
  7384. null,
  7385. task.formatContext,
  7386. !1,
  7387. !1
  7388. );
  7389. resumedSegment.id = segmentId;
  7390. resumedSegment.parentFlushed = !0;
  7391. try {
  7392. (task.replay = null),
  7393. (task.blockedSegment = resumedSegment),
  7394. renderNode(request, task, node, childIndex),
  7395. (resumedSegment.status = COMPLETED),
  7396. finishedSegment(request, blockedBoundary, resumedSegment),
  7397. null === blockedBoundary
  7398. ? (request.completedRootSegment = resumedSegment)
  7399. : (queueCompletedSegment(blockedBoundary, resumedSegment),
  7400. blockedBoundary.parentFlushed &&
  7401. request.partialBoundaries.push(blockedBoundary));
  7402. } finally {
  7403. (task.replay = prevReplay), (task.blockedSegment = null);
  7404. }
  7405. }
  7406. function replayElement(
  7407. request,
  7408. task,
  7409. keyPath,
  7410. name,
  7411. keyOrIndex,
  7412. childIndex,
  7413. type,
  7414. props,
  7415. ref,
  7416. replay
  7417. ) {
  7418. childIndex = replay.nodes;
  7419. for (var i = 0; i < childIndex.length; i++) {
  7420. var node = childIndex[i];
  7421. if (keyOrIndex === node[1]) {
  7422. if (4 === node.length) {
  7423. if (null !== name && name !== node[0])
  7424. throw Error(
  7425. "Expected the resume to render <" +
  7426. node[0] +
  7427. "> in this slot but instead it rendered <" +
  7428. name +
  7429. ">. The tree doesn't match so React will fallback to client rendering."
  7430. );
  7431. var childNodes = node[2];
  7432. name = node[3];
  7433. keyOrIndex = task.node;
  7434. task.replay = { nodes: childNodes, slots: name, pendingTasks: 1 };
  7435. try {
  7436. renderElement(request, task, keyPath, type, props, ref);
  7437. if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
  7438. throw Error(
  7439. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  7440. );
  7441. task.replay.pendingTasks--;
  7442. } catch (x) {
  7443. if (
  7444. "object" === typeof x &&
  7445. null !== x &&
  7446. (x === SuspenseException || "function" === typeof x.then)
  7447. )
  7448. throw (
  7449. (task.node === keyOrIndex
  7450. ? (task.replay = replay)
  7451. : childIndex.splice(i, 1),
  7452. x)
  7453. );
  7454. task.replay.pendingTasks--;
  7455. type = getThrownInfo(task.componentStack);
  7456. props = request;
  7457. request = task.blockedBoundary;
  7458. keyPath = x;
  7459. ref = name;
  7460. name = logRecoverableError(props, keyPath, type, task.debugTask);
  7461. abortRemainingReplayNodes(
  7462. props,
  7463. request,
  7464. childNodes,
  7465. ref,
  7466. keyPath,
  7467. name,
  7468. type,
  7469. !1
  7470. );
  7471. }
  7472. task.replay = replay;
  7473. } else {
  7474. if (type !== REACT_SUSPENSE_TYPE)
  7475. throw Error(
  7476. "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
  7477. (getComponentNameFromType(type) || "Unknown") +
  7478. ">. The tree doesn't match so React will fallback to client rendering."
  7479. );
  7480. a: {
  7481. replay = void 0;
  7482. name = node[5];
  7483. type = node[2];
  7484. ref = node[3];
  7485. keyOrIndex = null === node[4] ? [] : node[4][2];
  7486. node = null === node[4] ? null : node[4][3];
  7487. var prevKeyPath = task.keyPath,
  7488. prevContext = task.formatContext,
  7489. prevRow = task.row,
  7490. previousReplaySet = task.replay,
  7491. parentBoundary = task.blockedBoundary,
  7492. parentHoistableState = task.hoistableState,
  7493. content = props.children,
  7494. fallback = props.fallback,
  7495. fallbackAbortSet = new Set();
  7496. props =
  7497. task.formatContext.insertionMode < HTML_MODE
  7498. ? createSuspenseBoundary(
  7499. request,
  7500. task.row,
  7501. fallbackAbortSet,
  7502. createPreambleState(),
  7503. createPreambleState()
  7504. )
  7505. : createSuspenseBoundary(
  7506. request,
  7507. task.row,
  7508. fallbackAbortSet,
  7509. null,
  7510. null
  7511. );
  7512. props.parentFlushed = !0;
  7513. props.rootSegmentID = name;
  7514. task.blockedBoundary = props;
  7515. task.hoistableState = props.contentState;
  7516. task.keyPath = keyPath;
  7517. task.formatContext = getSuspenseContentFormatContext(
  7518. request.resumableState,
  7519. prevContext
  7520. );
  7521. task.row = null;
  7522. task.replay = { nodes: type, slots: ref, pendingTasks: 1 };
  7523. try {
  7524. renderNode(request, task, content, -1);
  7525. if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
  7526. throw Error(
  7527. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  7528. );
  7529. task.replay.pendingTasks--;
  7530. if (0 === props.pendingTasks && props.status === PENDING) {
  7531. props.status = COMPLETED;
  7532. request.completedBoundaries.push(props);
  7533. break a;
  7534. }
  7535. } catch (error) {
  7536. (props.status = CLIENT_RENDERED),
  7537. (childNodes = getThrownInfo(task.componentStack)),
  7538. (replay = logRecoverableError(
  7539. request,
  7540. error,
  7541. childNodes,
  7542. task.debugTask
  7543. )),
  7544. encodeErrorForBoundary(props, replay, error, childNodes, !1),
  7545. task.replay.pendingTasks--,
  7546. request.clientRenderedBoundaries.push(props);
  7547. } finally {
  7548. (task.blockedBoundary = parentBoundary),
  7549. (task.hoistableState = parentHoistableState),
  7550. (task.replay = previousReplaySet),
  7551. (task.keyPath = prevKeyPath),
  7552. (task.formatContext = prevContext),
  7553. (task.row = prevRow);
  7554. }
  7555. props = createReplayTask(
  7556. request,
  7557. null,
  7558. { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
  7559. fallback,
  7560. -1,
  7561. parentBoundary,
  7562. props.fallbackState,
  7563. fallbackAbortSet,
  7564. [keyPath[0], "Suspense Fallback", keyPath[2]],
  7565. getSuspenseFallbackFormatContext(
  7566. request.resumableState,
  7567. task.formatContext
  7568. ),
  7569. task.context,
  7570. task.treeContext,
  7571. task.row,
  7572. replaceSuspenseComponentStackWithSuspenseFallbackStack(
  7573. task.componentStack
  7574. ),
  7575. emptyContextObject,
  7576. task.debugTask
  7577. );
  7578. pushComponentStack(props);
  7579. request.pingedTasks.push(props);
  7580. }
  7581. }
  7582. childIndex.splice(i, 1);
  7583. break;
  7584. }
  7585. }
  7586. }
  7587. function validateIterable(task, iterable, childIndex, iterator, iteratorFn) {
  7588. if (iterator === iterable) {
  7589. if (
  7590. -1 !== childIndex ||
  7591. null === task.componentStack ||
  7592. "function" !== typeof task.componentStack.type ||
  7593. "[object GeneratorFunction]" !==
  7594. Object.prototype.toString.call(task.componentStack.type) ||
  7595. "[object Generator]" !== Object.prototype.toString.call(iterator)
  7596. )
  7597. didWarnAboutGenerators ||
  7598. console.error(
  7599. "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."
  7600. ),
  7601. (didWarnAboutGenerators = !0);
  7602. } else
  7603. iterable.entries !== iteratorFn ||
  7604. didWarnAboutMaps ||
  7605. (console.error(
  7606. "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
  7607. ),
  7608. (didWarnAboutMaps = !0));
  7609. }
  7610. function renderNodeDestructive(request, task, node, childIndex) {
  7611. null !== task.replay && "number" === typeof task.replay.slots
  7612. ? resumeNode(request, task, task.replay.slots, node, childIndex)
  7613. : ((task.node = node),
  7614. (task.childIndex = childIndex),
  7615. (node = task.componentStack),
  7616. (childIndex = task.debugTask),
  7617. pushComponentStack(task),
  7618. retryNode(request, task),
  7619. (task.componentStack = node),
  7620. (task.debugTask = childIndex));
  7621. }
  7622. function retryNode(request, task) {
  7623. var node = task.node,
  7624. childIndex = task.childIndex;
  7625. if (null !== node) {
  7626. if ("object" === typeof node) {
  7627. switch (node.$$typeof) {
  7628. case REACT_ELEMENT_TYPE:
  7629. var type = node.type,
  7630. key = node.key;
  7631. node = node.props;
  7632. var refProp = node.ref;
  7633. refProp = void 0 !== refProp ? refProp : null;
  7634. var debugTask = task.debugTask,
  7635. name = getComponentNameFromType(type);
  7636. key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;
  7637. var keyPath = [task.keyPath, name, key];
  7638. null !== task.replay
  7639. ? debugTask
  7640. ? debugTask.run(
  7641. replayElement.bind(
  7642. null,
  7643. request,
  7644. task,
  7645. keyPath,
  7646. name,
  7647. key,
  7648. childIndex,
  7649. type,
  7650. node,
  7651. refProp,
  7652. task.replay
  7653. )
  7654. )
  7655. : replayElement(
  7656. request,
  7657. task,
  7658. keyPath,
  7659. name,
  7660. key,
  7661. childIndex,
  7662. type,
  7663. node,
  7664. refProp,
  7665. task.replay
  7666. )
  7667. : debugTask
  7668. ? debugTask.run(
  7669. renderElement.bind(
  7670. null,
  7671. request,
  7672. task,
  7673. keyPath,
  7674. type,
  7675. node,
  7676. refProp
  7677. )
  7678. )
  7679. : renderElement(request, task, keyPath, type, node, refProp);
  7680. return;
  7681. case REACT_PORTAL_TYPE:
  7682. throw Error(
  7683. "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
  7684. );
  7685. case REACT_LAZY_TYPE:
  7686. type = callLazyInitInDEV(node);
  7687. if (12 === request.status) throw null;
  7688. renderNodeDestructive(request, task, type, childIndex);
  7689. return;
  7690. }
  7691. if (isArrayImpl(node)) {
  7692. renderChildrenArray(request, task, node, childIndex);
  7693. return;
  7694. }
  7695. if ((key = getIteratorFn(node)))
  7696. if ((type = key.call(node))) {
  7697. validateIterable(task, node, childIndex, type, key);
  7698. node = type.next();
  7699. if (!node.done) {
  7700. key = [];
  7701. do key.push(node.value), (node = type.next());
  7702. while (!node.done);
  7703. renderChildrenArray(request, task, key, childIndex);
  7704. }
  7705. return;
  7706. }
  7707. if ("function" === typeof node.then)
  7708. return (
  7709. (task.thenableState = null),
  7710. renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
  7711. );
  7712. if (node.$$typeof === REACT_CONTEXT_TYPE)
  7713. return renderNodeDestructive(
  7714. request,
  7715. task,
  7716. node._currentValue,
  7717. childIndex
  7718. );
  7719. request = Object.prototype.toString.call(node);
  7720. throw Error(
  7721. "Objects are not valid as a React child (found: " +
  7722. ("[object Object]" === request
  7723. ? "object with keys {" + Object.keys(node).join(", ") + "}"
  7724. : request) +
  7725. "). If you meant to render a collection of children, use an array instead."
  7726. );
  7727. }
  7728. "string" === typeof node
  7729. ? ((task = task.blockedSegment),
  7730. null !== task &&
  7731. (task.lastPushedText = pushTextInstance(
  7732. task.chunks,
  7733. node,
  7734. request.renderState,
  7735. task.lastPushedText
  7736. )))
  7737. : "number" === typeof node || "bigint" === typeof node
  7738. ? ((task = task.blockedSegment),
  7739. null !== task &&
  7740. (task.lastPushedText = pushTextInstance(
  7741. task.chunks,
  7742. "" + node,
  7743. request.renderState,
  7744. task.lastPushedText
  7745. )))
  7746. : ("function" === typeof node &&
  7747. ((request = node.displayName || node.name || "Component"),
  7748. console.error(
  7749. "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.",
  7750. request,
  7751. request
  7752. )),
  7753. "symbol" === typeof node &&
  7754. console.error(
  7755. "Symbols are not valid as a React child.\n %s",
  7756. String(node)
  7757. ));
  7758. }
  7759. }
  7760. function warnForMissingKey(request, task, child) {
  7761. if (
  7762. null !== child &&
  7763. "object" === typeof child &&
  7764. (child.$$typeof === REACT_ELEMENT_TYPE ||
  7765. child.$$typeof === REACT_PORTAL_TYPE) &&
  7766. child._store &&
  7767. ((!child._store.validated && null == child.key) ||
  7768. 2 === child._store.validated)
  7769. ) {
  7770. if ("object" !== typeof child._store)
  7771. throw Error(
  7772. "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
  7773. );
  7774. child._store.validated = 1;
  7775. var didWarnForKey = request.didWarnForKey;
  7776. null == didWarnForKey &&
  7777. (didWarnForKey = request.didWarnForKey = new WeakSet());
  7778. request = task.componentStack;
  7779. if (null !== request && !didWarnForKey.has(request)) {
  7780. didWarnForKey.add(request);
  7781. var componentName = getComponentNameFromType(child.type);
  7782. didWarnForKey = child._owner;
  7783. var parentOwner = request.owner;
  7784. request = "";
  7785. if (parentOwner && "undefined" !== typeof parentOwner.type) {
  7786. var name = getComponentNameFromType(parentOwner.type);
  7787. name && (request = "\n\nCheck the render method of `" + name + "`.");
  7788. }
  7789. request ||
  7790. (componentName &&
  7791. (request =
  7792. "\n\nCheck the top-level render call using <" +
  7793. componentName +
  7794. ">."));
  7795. componentName = "";
  7796. null != didWarnForKey &&
  7797. parentOwner !== didWarnForKey &&
  7798. ((parentOwner = null),
  7799. "undefined" !== typeof didWarnForKey.type
  7800. ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
  7801. : "string" === typeof didWarnForKey.name &&
  7802. (parentOwner = didWarnForKey.name),
  7803. parentOwner &&
  7804. (componentName = " It was passed a child from " + parentOwner + "."));
  7805. didWarnForKey = task.componentStack;
  7806. task.componentStack = {
  7807. parent: task.componentStack,
  7808. type: child.type,
  7809. owner: child._owner,
  7810. stack: child._debugStack
  7811. };
  7812. console.error(
  7813. 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
  7814. request,
  7815. componentName
  7816. );
  7817. task.componentStack = didWarnForKey;
  7818. }
  7819. }
  7820. }
  7821. function renderChildrenArray(request, task, children, childIndex) {
  7822. var prevKeyPath = task.keyPath,
  7823. previousComponentStack = task.componentStack;
  7824. var previousDebugTask = task.debugTask;
  7825. pushServerComponentStack(task, task.node._debugInfo);
  7826. if (
  7827. -1 !== childIndex &&
  7828. ((task.keyPath = [task.keyPath, "Fragment", childIndex]),
  7829. null !== task.replay)
  7830. ) {
  7831. for (
  7832. var replay = task.replay, replayNodes = replay.nodes, j = 0;
  7833. j < replayNodes.length;
  7834. j++
  7835. ) {
  7836. var node = replayNodes[j];
  7837. if (node[1] === childIndex) {
  7838. childIndex = node[2];
  7839. node = node[3];
  7840. task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
  7841. try {
  7842. renderChildrenArray(request, task, children, -1);
  7843. if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
  7844. throw Error(
  7845. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  7846. );
  7847. task.replay.pendingTasks--;
  7848. } catch (x) {
  7849. if (
  7850. "object" === typeof x &&
  7851. null !== x &&
  7852. (x === SuspenseException || "function" === typeof x.then)
  7853. )
  7854. throw x;
  7855. task.replay.pendingTasks--;
  7856. var thrownInfo = getThrownInfo(task.componentStack);
  7857. children = task.blockedBoundary;
  7858. var error = x,
  7859. resumeSlots = node;
  7860. node = logRecoverableError(
  7861. request,
  7862. error,
  7863. thrownInfo,
  7864. task.debugTask
  7865. );
  7866. abortRemainingReplayNodes(
  7867. request,
  7868. children,
  7869. childIndex,
  7870. resumeSlots,
  7871. error,
  7872. node,
  7873. thrownInfo,
  7874. !1
  7875. );
  7876. }
  7877. task.replay = replay;
  7878. replayNodes.splice(j, 1);
  7879. break;
  7880. }
  7881. }
  7882. task.keyPath = prevKeyPath;
  7883. task.componentStack = previousComponentStack;
  7884. task.debugTask = previousDebugTask;
  7885. return;
  7886. }
  7887. replay = task.treeContext;
  7888. replayNodes = children.length;
  7889. if (
  7890. null !== task.replay &&
  7891. ((j = task.replay.slots), null !== j && "object" === typeof j)
  7892. ) {
  7893. for (childIndex = 0; childIndex < replayNodes; childIndex++)
  7894. (node = children[childIndex]),
  7895. (task.treeContext = pushTreeContext(replay, replayNodes, childIndex)),
  7896. (error = j[childIndex]),
  7897. "number" === typeof error
  7898. ? (resumeNode(request, task, error, node, childIndex),
  7899. delete j[childIndex])
  7900. : renderNode(request, task, node, childIndex);
  7901. task.treeContext = replay;
  7902. task.keyPath = prevKeyPath;
  7903. task.componentStack = previousComponentStack;
  7904. task.debugTask = previousDebugTask;
  7905. return;
  7906. }
  7907. for (j = 0; j < replayNodes; j++)
  7908. (childIndex = children[j]),
  7909. warnForMissingKey(request, task, childIndex),
  7910. (task.treeContext = pushTreeContext(replay, replayNodes, j)),
  7911. renderNode(request, task, childIndex, j);
  7912. task.treeContext = replay;
  7913. task.keyPath = prevKeyPath;
  7914. task.componentStack = previousComponentStack;
  7915. task.debugTask = previousDebugTask;
  7916. }
  7917. function trackPostponedBoundary(request, trackedPostpones, boundary) {
  7918. boundary.status = POSTPONED;
  7919. boundary.rootSegmentID = request.nextSegmentId++;
  7920. request = boundary.trackedContentKeyPath;
  7921. if (null === request)
  7922. throw Error(
  7923. "It should not be possible to postpone at the root. This is a bug in React."
  7924. );
  7925. var fallbackReplayNode = boundary.trackedFallbackNode,
  7926. children = [],
  7927. boundaryNode = trackedPostpones.workingMap.get(request);
  7928. if (void 0 === boundaryNode)
  7929. return (
  7930. (boundary = [
  7931. request[1],
  7932. request[2],
  7933. children,
  7934. null,
  7935. fallbackReplayNode,
  7936. boundary.rootSegmentID
  7937. ]),
  7938. trackedPostpones.workingMap.set(request, boundary),
  7939. addToReplayParent(boundary, request[0], trackedPostpones),
  7940. boundary
  7941. );
  7942. boundaryNode[4] = fallbackReplayNode;
  7943. boundaryNode[5] = boundary.rootSegmentID;
  7944. return boundaryNode;
  7945. }
  7946. function trackPostpone(request, trackedPostpones, task, segment) {
  7947. segment.status = POSTPONED;
  7948. var keyPath = task.keyPath,
  7949. boundary = task.blockedBoundary;
  7950. if (null === boundary)
  7951. (segment.id = request.nextSegmentId++),
  7952. (trackedPostpones.rootSlots = segment.id),
  7953. null !== request.completedRootSegment &&
  7954. (request.completedRootSegment.status = POSTPONED);
  7955. else {
  7956. if (null !== boundary && boundary.status === PENDING) {
  7957. var boundaryNode = trackPostponedBoundary(
  7958. request,
  7959. trackedPostpones,
  7960. boundary
  7961. );
  7962. if (
  7963. boundary.trackedContentKeyPath === keyPath &&
  7964. -1 === task.childIndex
  7965. ) {
  7966. -1 === segment.id &&
  7967. (segment.id = segment.parentFlushed
  7968. ? boundary.rootSegmentID
  7969. : request.nextSegmentId++);
  7970. boundaryNode[3] = segment.id;
  7971. return;
  7972. }
  7973. }
  7974. -1 === segment.id &&
  7975. (segment.id =
  7976. segment.parentFlushed && null !== boundary
  7977. ? boundary.rootSegmentID
  7978. : request.nextSegmentId++);
  7979. if (-1 === task.childIndex)
  7980. null === keyPath
  7981. ? (trackedPostpones.rootSlots = segment.id)
  7982. : ((task = trackedPostpones.workingMap.get(keyPath)),
  7983. void 0 === task
  7984. ? ((task = [keyPath[1], keyPath[2], [], segment.id]),
  7985. addToReplayParent(task, keyPath[0], trackedPostpones))
  7986. : (task[3] = segment.id));
  7987. else {
  7988. if (null === keyPath)
  7989. if (((request = trackedPostpones.rootSlots), null === request))
  7990. request = trackedPostpones.rootSlots = {};
  7991. else {
  7992. if ("number" === typeof request)
  7993. throw Error(
  7994. "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React."
  7995. );
  7996. }
  7997. else if (
  7998. ((boundary = trackedPostpones.workingMap),
  7999. (boundaryNode = boundary.get(keyPath)),
  8000. void 0 === boundaryNode)
  8001. )
  8002. (request = {}),
  8003. (boundaryNode = [keyPath[1], keyPath[2], [], request]),
  8004. boundary.set(keyPath, boundaryNode),
  8005. addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);
  8006. else if (((request = boundaryNode[3]), null === request))
  8007. request = boundaryNode[3] = {};
  8008. else if ("number" === typeof request)
  8009. throw Error(
  8010. "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React."
  8011. );
  8012. request[task.childIndex] = segment.id;
  8013. }
  8014. }
  8015. }
  8016. function untrackBoundary(request, boundary) {
  8017. request = request.trackedPostpones;
  8018. null !== request &&
  8019. ((boundary = boundary.trackedContentKeyPath),
  8020. null !== boundary &&
  8021. ((boundary = request.workingMap.get(boundary)),
  8022. void 0 !== boundary &&
  8023. ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
  8024. }
  8025. function spawnNewSuspendedReplayTask(request, task, thenableState) {
  8026. return createReplayTask(
  8027. request,
  8028. thenableState,
  8029. task.replay,
  8030. task.node,
  8031. task.childIndex,
  8032. task.blockedBoundary,
  8033. task.hoistableState,
  8034. task.abortSet,
  8035. task.keyPath,
  8036. task.formatContext,
  8037. task.context,
  8038. task.treeContext,
  8039. task.row,
  8040. task.componentStack,
  8041. emptyContextObject,
  8042. task.debugTask
  8043. );
  8044. }
  8045. function spawnNewSuspendedRenderTask(request, task, thenableState) {
  8046. var segment = task.blockedSegment,
  8047. newSegment = createPendingSegment(
  8048. request,
  8049. segment.chunks.length,
  8050. null,
  8051. task.formatContext,
  8052. segment.lastPushedText,
  8053. !0
  8054. );
  8055. segment.children.push(newSegment);
  8056. segment.lastPushedText = !1;
  8057. return createRenderTask(
  8058. request,
  8059. thenableState,
  8060. task.node,
  8061. task.childIndex,
  8062. task.blockedBoundary,
  8063. newSegment,
  8064. task.blockedPreamble,
  8065. task.hoistableState,
  8066. task.abortSet,
  8067. task.keyPath,
  8068. task.formatContext,
  8069. task.context,
  8070. task.treeContext,
  8071. task.row,
  8072. task.componentStack,
  8073. emptyContextObject,
  8074. task.debugTask
  8075. );
  8076. }
  8077. function renderNode(request, task, node, childIndex) {
  8078. var previousFormatContext = task.formatContext,
  8079. previousContext = task.context,
  8080. previousKeyPath = task.keyPath,
  8081. previousTreeContext = task.treeContext,
  8082. previousComponentStack = task.componentStack,
  8083. previousDebugTask = task.debugTask,
  8084. segment = task.blockedSegment;
  8085. if (null === segment) {
  8086. segment = task.replay;
  8087. try {
  8088. return renderNodeDestructive(request, task, node, childIndex);
  8089. } catch (thrownValue) {
  8090. if (
  8091. (resetHooksState(),
  8092. (node =
  8093. thrownValue === SuspenseException
  8094. ? getSuspendedThenable()
  8095. : thrownValue),
  8096. 12 !== request.status && "object" === typeof node && null !== node)
  8097. ) {
  8098. if ("function" === typeof node.then) {
  8099. childIndex =
  8100. thrownValue === SuspenseException
  8101. ? getThenableStateAfterSuspending()
  8102. : null;
  8103. request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
  8104. node.then(request, request);
  8105. task.formatContext = previousFormatContext;
  8106. task.context = previousContext;
  8107. task.keyPath = previousKeyPath;
  8108. task.treeContext = previousTreeContext;
  8109. task.componentStack = previousComponentStack;
  8110. task.replay = segment;
  8111. task.debugTask = previousDebugTask;
  8112. switchContext(previousContext);
  8113. return;
  8114. }
  8115. if ("Maximum call stack size exceeded" === node.message) {
  8116. node =
  8117. thrownValue === SuspenseException
  8118. ? getThenableStateAfterSuspending()
  8119. : null;
  8120. node = spawnNewSuspendedReplayTask(request, task, node);
  8121. request.pingedTasks.push(node);
  8122. task.formatContext = previousFormatContext;
  8123. task.context = previousContext;
  8124. task.keyPath = previousKeyPath;
  8125. task.treeContext = previousTreeContext;
  8126. task.componentStack = previousComponentStack;
  8127. task.replay = segment;
  8128. task.debugTask = previousDebugTask;
  8129. switchContext(previousContext);
  8130. return;
  8131. }
  8132. }
  8133. }
  8134. } else {
  8135. var childrenLength = segment.children.length,
  8136. chunkLength = segment.chunks.length;
  8137. try {
  8138. return renderNodeDestructive(request, task, node, childIndex);
  8139. } catch (thrownValue$3) {
  8140. if (
  8141. (resetHooksState(),
  8142. (segment.children.length = childrenLength),
  8143. (segment.chunks.length = chunkLength),
  8144. (node =
  8145. thrownValue$3 === SuspenseException
  8146. ? getSuspendedThenable()
  8147. : thrownValue$3),
  8148. 12 !== request.status && "object" === typeof node && null !== node)
  8149. ) {
  8150. if ("function" === typeof node.then) {
  8151. segment = node;
  8152. node =
  8153. thrownValue$3 === SuspenseException
  8154. ? getThenableStateAfterSuspending()
  8155. : null;
  8156. request = spawnNewSuspendedRenderTask(request, task, node).ping;
  8157. segment.then(request, request);
  8158. task.formatContext = previousFormatContext;
  8159. task.context = previousContext;
  8160. task.keyPath = previousKeyPath;
  8161. task.treeContext = previousTreeContext;
  8162. task.componentStack = previousComponentStack;
  8163. task.debugTask = previousDebugTask;
  8164. switchContext(previousContext);
  8165. return;
  8166. }
  8167. if ("Maximum call stack size exceeded" === node.message) {
  8168. segment =
  8169. thrownValue$3 === SuspenseException
  8170. ? getThenableStateAfterSuspending()
  8171. : null;
  8172. segment = spawnNewSuspendedRenderTask(request, task, segment);
  8173. request.pingedTasks.push(segment);
  8174. task.formatContext = previousFormatContext;
  8175. task.context = previousContext;
  8176. task.keyPath = previousKeyPath;
  8177. task.treeContext = previousTreeContext;
  8178. task.componentStack = previousComponentStack;
  8179. task.debugTask = previousDebugTask;
  8180. switchContext(previousContext);
  8181. return;
  8182. }
  8183. }
  8184. }
  8185. }
  8186. task.formatContext = previousFormatContext;
  8187. task.context = previousContext;
  8188. task.keyPath = previousKeyPath;
  8189. task.treeContext = previousTreeContext;
  8190. switchContext(previousContext);
  8191. throw node;
  8192. }
  8193. function abortTaskSoft(task) {
  8194. var boundary = task.blockedBoundary,
  8195. segment = task.blockedSegment;
  8196. null !== segment &&
  8197. ((segment.status = ABORTED),
  8198. finishedTask(this, boundary, task.row, segment));
  8199. }
  8200. function abortRemainingReplayNodes(
  8201. request$jscomp$0,
  8202. boundary,
  8203. nodes,
  8204. slots,
  8205. error$jscomp$0,
  8206. errorDigest$jscomp$0,
  8207. errorInfo$jscomp$0,
  8208. aborted
  8209. ) {
  8210. for (var i = 0; i < nodes.length; i++) {
  8211. var node = nodes[i];
  8212. if (4 === node.length)
  8213. abortRemainingReplayNodes(
  8214. request$jscomp$0,
  8215. boundary,
  8216. node[2],
  8217. node[3],
  8218. error$jscomp$0,
  8219. errorDigest$jscomp$0,
  8220. errorInfo$jscomp$0,
  8221. aborted
  8222. );
  8223. else {
  8224. var request = request$jscomp$0;
  8225. node = node[5];
  8226. var error = error$jscomp$0,
  8227. errorDigest = errorDigest$jscomp$0,
  8228. errorInfo = errorInfo$jscomp$0,
  8229. wasAborted = aborted,
  8230. resumedBoundary = createSuspenseBoundary(
  8231. request,
  8232. null,
  8233. new Set(),
  8234. null,
  8235. null
  8236. );
  8237. resumedBoundary.parentFlushed = !0;
  8238. resumedBoundary.rootSegmentID = node;
  8239. resumedBoundary.status = CLIENT_RENDERED;
  8240. encodeErrorForBoundary(
  8241. resumedBoundary,
  8242. errorDigest,
  8243. error,
  8244. errorInfo,
  8245. wasAborted
  8246. );
  8247. resumedBoundary.parentFlushed &&
  8248. request.clientRenderedBoundaries.push(resumedBoundary);
  8249. }
  8250. }
  8251. nodes.length = 0;
  8252. if (null !== slots) {
  8253. if (null === boundary)
  8254. throw Error(
  8255. "We should not have any resumable nodes in the shell. This is a bug in React."
  8256. );
  8257. boundary.status !== CLIENT_RENDERED &&
  8258. ((boundary.status = CLIENT_RENDERED),
  8259. encodeErrorForBoundary(
  8260. boundary,
  8261. errorDigest$jscomp$0,
  8262. error$jscomp$0,
  8263. errorInfo$jscomp$0,
  8264. aborted
  8265. ),
  8266. boundary.parentFlushed &&
  8267. request$jscomp$0.clientRenderedBoundaries.push(boundary));
  8268. if ("object" === typeof slots) for (var index in slots) delete slots[index];
  8269. }
  8270. }
  8271. function abortTask(task, request, error) {
  8272. var boundary = task.blockedBoundary,
  8273. segment = task.blockedSegment;
  8274. if (null !== segment) {
  8275. if (6 === segment.status) return;
  8276. segment.status = ABORTED;
  8277. }
  8278. var errorInfo = getThrownInfo(task.componentStack),
  8279. node = task.node;
  8280. null !== node &&
  8281. "object" === typeof node &&
  8282. pushHaltedAwaitOnComponentStack(task, node._debugInfo);
  8283. if (null === boundary) {
  8284. if (13 !== request.status && request.status !== CLOSED) {
  8285. boundary = task.replay;
  8286. if (null === boundary) {
  8287. null !== request.trackedPostpones && null !== segment
  8288. ? ((boundary = request.trackedPostpones),
  8289. logRecoverableError(request, error, errorInfo, task.debugTask),
  8290. trackPostpone(request, boundary, task, segment),
  8291. finishedTask(request, null, task.row, segment))
  8292. : (logRecoverableError(request, error, errorInfo, task.debugTask),
  8293. fatalError(request, error, errorInfo, task.debugTask));
  8294. return;
  8295. }
  8296. boundary.pendingTasks--;
  8297. 0 === boundary.pendingTasks &&
  8298. 0 < boundary.nodes.length &&
  8299. ((segment = logRecoverableError(request, error, errorInfo, null)),
  8300. abortRemainingReplayNodes(
  8301. request,
  8302. null,
  8303. boundary.nodes,
  8304. boundary.slots,
  8305. error,
  8306. segment,
  8307. errorInfo,
  8308. !0
  8309. ));
  8310. request.pendingRootTasks--;
  8311. 0 === request.pendingRootTasks && completeShell(request);
  8312. }
  8313. } else {
  8314. node = request.trackedPostpones;
  8315. if (boundary.status !== CLIENT_RENDERED) {
  8316. if (null !== node && null !== segment)
  8317. return (
  8318. logRecoverableError(request, error, errorInfo, task.debugTask),
  8319. trackPostpone(request, node, task, segment),
  8320. boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
  8321. return abortTask(fallbackTask, request, error);
  8322. }),
  8323. boundary.fallbackAbortableTasks.clear(),
  8324. finishedTask(request, boundary, task.row, segment)
  8325. );
  8326. boundary.status = CLIENT_RENDERED;
  8327. segment = logRecoverableError(request, error, errorInfo, task.debugTask);
  8328. boundary.status = CLIENT_RENDERED;
  8329. encodeErrorForBoundary(boundary, segment, error, errorInfo, !0);
  8330. untrackBoundary(request, boundary);
  8331. boundary.parentFlushed && request.clientRenderedBoundaries.push(boundary);
  8332. }
  8333. boundary.pendingTasks--;
  8334. errorInfo = boundary.row;
  8335. null !== errorInfo &&
  8336. 0 === --errorInfo.pendingTasks &&
  8337. finishSuspenseListRow(request, errorInfo);
  8338. boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
  8339. return abortTask(fallbackTask, request, error);
  8340. });
  8341. boundary.fallbackAbortableTasks.clear();
  8342. }
  8343. task = task.row;
  8344. null !== task &&
  8345. 0 === --task.pendingTasks &&
  8346. finishSuspenseListRow(request, task);
  8347. request.allPendingTasks--;
  8348. 0 === request.allPendingTasks && completeAll(request);
  8349. }
  8350. function safelyEmitEarlyPreloads(request, shellComplete) {
  8351. try {
  8352. var renderState = request.renderState,
  8353. onHeaders = renderState.onHeaders;
  8354. if (onHeaders) {
  8355. var headers = renderState.headers;
  8356. if (headers) {
  8357. renderState.headers = null;
  8358. var linkHeader = headers.preconnects;
  8359. headers.fontPreloads &&
  8360. (linkHeader && (linkHeader += ", "),
  8361. (linkHeader += headers.fontPreloads));
  8362. headers.highImagePreloads &&
  8363. (linkHeader && (linkHeader += ", "),
  8364. (linkHeader += headers.highImagePreloads));
  8365. if (!shellComplete) {
  8366. var queueIter = renderState.styles.values(),
  8367. queueStep = queueIter.next();
  8368. b: for (
  8369. ;
  8370. 0 < headers.remainingCapacity && !queueStep.done;
  8371. queueStep = queueIter.next()
  8372. )
  8373. for (
  8374. var sheetIter = queueStep.value.sheets.values(),
  8375. sheetStep = sheetIter.next();
  8376. 0 < headers.remainingCapacity && !sheetStep.done;
  8377. sheetStep = sheetIter.next()
  8378. ) {
  8379. var sheet = sheetStep.value,
  8380. props = sheet.props,
  8381. key = props.href,
  8382. props$jscomp$0 = sheet.props;
  8383. var header = getPreloadAsHeader(props$jscomp$0.href, "style", {
  8384. crossOrigin: props$jscomp$0.crossOrigin,
  8385. integrity: props$jscomp$0.integrity,
  8386. nonce: props$jscomp$0.nonce,
  8387. type: props$jscomp$0.type,
  8388. fetchPriority: props$jscomp$0.fetchPriority,
  8389. referrerPolicy: props$jscomp$0.referrerPolicy,
  8390. media: props$jscomp$0.media
  8391. });
  8392. if (0 <= (headers.remainingCapacity -= header.length + 2))
  8393. (renderState.resets.style[key] = PRELOAD_NO_CREDS),
  8394. linkHeader && (linkHeader += ", "),
  8395. (linkHeader += header),
  8396. (renderState.resets.style[key] =
  8397. "string" === typeof props.crossOrigin ||
  8398. "string" === typeof props.integrity
  8399. ? [props.crossOrigin, props.integrity]
  8400. : PRELOAD_NO_CREDS);
  8401. else break b;
  8402. }
  8403. }
  8404. linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});
  8405. }
  8406. }
  8407. } catch (error) {
  8408. logRecoverableError(request, error, {}, null);
  8409. }
  8410. }
  8411. function completeShell(request) {
  8412. null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
  8413. null === request.trackedPostpones && preparePreamble(request);
  8414. request.onShellError = noop;
  8415. request = request.onShellReady;
  8416. request();
  8417. }
  8418. function completeAll(request) {
  8419. safelyEmitEarlyPreloads(
  8420. request,
  8421. null === request.trackedPostpones
  8422. ? !0
  8423. : null === request.completedRootSegment ||
  8424. request.completedRootSegment.status !== POSTPONED
  8425. );
  8426. preparePreamble(request);
  8427. request = request.onAllReady;
  8428. request();
  8429. }
  8430. function queueCompletedSegment(boundary, segment) {
  8431. if (
  8432. 0 === segment.chunks.length &&
  8433. 1 === segment.children.length &&
  8434. null === segment.children[0].boundary &&
  8435. -1 === segment.children[0].id
  8436. ) {
  8437. var childSegment = segment.children[0];
  8438. childSegment.id = segment.id;
  8439. childSegment.parentFlushed = !0;
  8440. (childSegment.status !== COMPLETED &&
  8441. childSegment.status !== ABORTED &&
  8442. childSegment.status !== ERRORED) ||
  8443. queueCompletedSegment(boundary, childSegment);
  8444. } else boundary.completedSegments.push(segment);
  8445. }
  8446. function finishedSegment(request, boundary, segment) {
  8447. if (null !== byteLengthOfChunk) {
  8448. segment = segment.chunks;
  8449. for (var segmentByteSize = 0, i = 0; i < segment.length; i++)
  8450. segmentByteSize += byteLengthOfChunk(segment[i]);
  8451. null === boundary
  8452. ? (request.byteSize += segmentByteSize)
  8453. : (boundary.byteSize += segmentByteSize);
  8454. }
  8455. }
  8456. function finishedTask(request, boundary, row, segment) {
  8457. null !== row &&
  8458. (0 === --row.pendingTasks
  8459. ? finishSuspenseListRow(request, row)
  8460. : row.together && tryToResolveTogetherRow(request, row));
  8461. request.allPendingTasks--;
  8462. if (null === boundary) {
  8463. if (null !== segment && segment.parentFlushed) {
  8464. if (null !== request.completedRootSegment)
  8465. throw Error(
  8466. "There can only be one root segment. This is a bug in React."
  8467. );
  8468. request.completedRootSegment = segment;
  8469. }
  8470. request.pendingRootTasks--;
  8471. 0 === request.pendingRootTasks && completeShell(request);
  8472. } else if ((boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED))
  8473. if (0 === boundary.pendingTasks)
  8474. if (
  8475. (boundary.status === PENDING && (boundary.status = COMPLETED),
  8476. null !== segment &&
  8477. segment.parentFlushed &&
  8478. (segment.status === COMPLETED || segment.status === ABORTED) &&
  8479. queueCompletedSegment(boundary, segment),
  8480. boundary.parentFlushed && request.completedBoundaries.push(boundary),
  8481. boundary.status === COMPLETED)
  8482. )
  8483. (row = boundary.row),
  8484. null !== row &&
  8485. hoistHoistables(row.hoistables, boundary.contentState),
  8486. isEligibleForOutlining(request, boundary) ||
  8487. (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
  8488. boundary.fallbackAbortableTasks.clear(),
  8489. null !== row &&
  8490. 0 === --row.pendingTasks &&
  8491. finishSuspenseListRow(request, row)),
  8492. 0 === request.pendingRootTasks &&
  8493. null === request.trackedPostpones &&
  8494. null !== boundary.contentPreamble &&
  8495. preparePreamble(request);
  8496. else {
  8497. if (
  8498. boundary.status === POSTPONED &&
  8499. ((boundary = boundary.row), null !== boundary)
  8500. ) {
  8501. if (null !== request.trackedPostpones) {
  8502. row = request.trackedPostpones;
  8503. var postponedRow = boundary.next;
  8504. if (
  8505. null !== postponedRow &&
  8506. ((segment = postponedRow.boundaries), null !== segment)
  8507. )
  8508. for (
  8509. postponedRow.boundaries = null, postponedRow = 0;
  8510. postponedRow < segment.length;
  8511. postponedRow++
  8512. ) {
  8513. var postponedBoundary = segment[postponedRow];
  8514. trackPostponedBoundary(request, row, postponedBoundary);
  8515. finishedTask(request, postponedBoundary, null, null);
  8516. }
  8517. }
  8518. 0 === --boundary.pendingTasks &&
  8519. finishSuspenseListRow(request, boundary);
  8520. }
  8521. }
  8522. else
  8523. null === segment ||
  8524. !segment.parentFlushed ||
  8525. (segment.status !== COMPLETED && segment.status !== ABORTED) ||
  8526. (queueCompletedSegment(boundary, segment),
  8527. 1 === boundary.completedSegments.length &&
  8528. boundary.parentFlushed &&
  8529. request.partialBoundaries.push(boundary)),
  8530. (boundary = boundary.row),
  8531. null !== boundary &&
  8532. boundary.together &&
  8533. tryToResolveTogetherRow(request, boundary);
  8534. 0 === request.allPendingTasks && completeAll(request);
  8535. }
  8536. function performWork(request$jscomp$2) {
  8537. if (request$jscomp$2.status !== CLOSED && 13 !== request$jscomp$2.status) {
  8538. var prevContext = currentActiveSnapshot,
  8539. prevDispatcher = ReactSharedInternals.H;
  8540. ReactSharedInternals.H = HooksDispatcher;
  8541. var prevAsyncDispatcher = ReactSharedInternals.A;
  8542. ReactSharedInternals.A = DefaultAsyncDispatcher;
  8543. var prevRequest = currentRequest;
  8544. currentRequest = request$jscomp$2;
  8545. var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
  8546. ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
  8547. var prevResumableState = currentResumableState;
  8548. currentResumableState = request$jscomp$2.resumableState;
  8549. try {
  8550. var pingedTasks = request$jscomp$2.pingedTasks,
  8551. i;
  8552. for (i = 0; i < pingedTasks.length; i++) {
  8553. var request = request$jscomp$2,
  8554. task = pingedTasks[i],
  8555. segment = task.blockedSegment;
  8556. if (null === segment) {
  8557. var prevTaskInDEV = void 0,
  8558. request$jscomp$0 = request;
  8559. request = task;
  8560. if (0 !== request.replay.pendingTasks) {
  8561. switchContext(request.context);
  8562. prevTaskInDEV = currentTaskInDEV;
  8563. currentTaskInDEV = request;
  8564. try {
  8565. "number" === typeof request.replay.slots
  8566. ? resumeNode(
  8567. request$jscomp$0,
  8568. request,
  8569. request.replay.slots,
  8570. request.node,
  8571. request.childIndex
  8572. )
  8573. : retryNode(request$jscomp$0, request);
  8574. if (
  8575. 1 === request.replay.pendingTasks &&
  8576. 0 < request.replay.nodes.length
  8577. )
  8578. throw Error(
  8579. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  8580. );
  8581. request.replay.pendingTasks--;
  8582. request.abortSet.delete(request);
  8583. finishedTask(
  8584. request$jscomp$0,
  8585. request.blockedBoundary,
  8586. request.row,
  8587. null
  8588. );
  8589. } catch (thrownValue) {
  8590. resetHooksState();
  8591. var x =
  8592. thrownValue === SuspenseException
  8593. ? getSuspendedThenable()
  8594. : thrownValue;
  8595. if (
  8596. "object" === typeof x &&
  8597. null !== x &&
  8598. "function" === typeof x.then
  8599. ) {
  8600. var ping = request.ping;
  8601. x.then(ping, ping);
  8602. request.thenableState =
  8603. thrownValue === SuspenseException
  8604. ? getThenableStateAfterSuspending()
  8605. : null;
  8606. } else {
  8607. request.replay.pendingTasks--;
  8608. request.abortSet.delete(request);
  8609. var errorInfo = getThrownInfo(request.componentStack),
  8610. errorDigest = void 0,
  8611. request$jscomp$1 = request$jscomp$0,
  8612. boundary = request.blockedBoundary,
  8613. error$jscomp$0 =
  8614. 12 === request$jscomp$0.status
  8615. ? request$jscomp$0.fatalError
  8616. : x,
  8617. errorInfo$jscomp$0 = errorInfo,
  8618. replayNodes = request.replay.nodes,
  8619. resumeSlots = request.replay.slots;
  8620. errorDigest = logRecoverableError(
  8621. request$jscomp$1,
  8622. error$jscomp$0,
  8623. errorInfo$jscomp$0,
  8624. request.debugTask
  8625. );
  8626. abortRemainingReplayNodes(
  8627. request$jscomp$1,
  8628. boundary,
  8629. replayNodes,
  8630. resumeSlots,
  8631. error$jscomp$0,
  8632. errorDigest,
  8633. errorInfo$jscomp$0,
  8634. !1
  8635. );
  8636. request$jscomp$0.pendingRootTasks--;
  8637. 0 === request$jscomp$0.pendingRootTasks &&
  8638. completeShell(request$jscomp$0);
  8639. request$jscomp$0.allPendingTasks--;
  8640. 0 === request$jscomp$0.allPendingTasks &&
  8641. completeAll(request$jscomp$0);
  8642. }
  8643. } finally {
  8644. currentTaskInDEV = prevTaskInDEV;
  8645. }
  8646. }
  8647. } else if (
  8648. ((request$jscomp$0 = prevTaskInDEV = void 0),
  8649. (errorDigest = task),
  8650. (request$jscomp$1 = segment),
  8651. request$jscomp$1.status === PENDING)
  8652. ) {
  8653. request$jscomp$1.status = 6;
  8654. switchContext(errorDigest.context);
  8655. request$jscomp$0 = currentTaskInDEV;
  8656. currentTaskInDEV = errorDigest;
  8657. var childrenLength = request$jscomp$1.children.length,
  8658. chunkLength = request$jscomp$1.chunks.length;
  8659. try {
  8660. retryNode(request, errorDigest),
  8661. pushSegmentFinale(
  8662. request$jscomp$1.chunks,
  8663. request.renderState,
  8664. request$jscomp$1.lastPushedText,
  8665. request$jscomp$1.textEmbedded
  8666. ),
  8667. errorDigest.abortSet.delete(errorDigest),
  8668. (request$jscomp$1.status = COMPLETED),
  8669. finishedSegment(
  8670. request,
  8671. errorDigest.blockedBoundary,
  8672. request$jscomp$1
  8673. ),
  8674. finishedTask(
  8675. request,
  8676. errorDigest.blockedBoundary,
  8677. errorDigest.row,
  8678. request$jscomp$1
  8679. );
  8680. } catch (thrownValue) {
  8681. resetHooksState();
  8682. request$jscomp$1.children.length = childrenLength;
  8683. request$jscomp$1.chunks.length = chunkLength;
  8684. var x$jscomp$0 =
  8685. thrownValue === SuspenseException
  8686. ? getSuspendedThenable()
  8687. : 12 === request.status
  8688. ? request.fatalError
  8689. : thrownValue;
  8690. if (12 === request.status && null !== request.trackedPostpones) {
  8691. var trackedPostpones = request.trackedPostpones,
  8692. thrownInfo = getThrownInfo(errorDigest.componentStack);
  8693. errorDigest.abortSet.delete(errorDigest);
  8694. logRecoverableError(
  8695. request,
  8696. x$jscomp$0,
  8697. thrownInfo,
  8698. errorDigest.debugTask
  8699. );
  8700. trackPostpone(
  8701. request,
  8702. trackedPostpones,
  8703. errorDigest,
  8704. request$jscomp$1
  8705. );
  8706. finishedTask(
  8707. request,
  8708. errorDigest.blockedBoundary,
  8709. errorDigest.row,
  8710. request$jscomp$1
  8711. );
  8712. } else if (
  8713. "object" === typeof x$jscomp$0 &&
  8714. null !== x$jscomp$0 &&
  8715. "function" === typeof x$jscomp$0.then
  8716. ) {
  8717. request$jscomp$1.status = PENDING;
  8718. errorDigest.thenableState =
  8719. thrownValue === SuspenseException
  8720. ? getThenableStateAfterSuspending()
  8721. : null;
  8722. var ping$jscomp$0 = errorDigest.ping;
  8723. x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
  8724. } else {
  8725. var errorInfo$jscomp$1 = getThrownInfo(
  8726. errorDigest.componentStack
  8727. );
  8728. errorDigest.abortSet.delete(errorDigest);
  8729. request$jscomp$1.status = ERRORED;
  8730. var boundary$jscomp$0 = errorDigest.blockedBoundary,
  8731. row = errorDigest.row,
  8732. debugTask = errorDigest.debugTask;
  8733. null !== row &&
  8734. 0 === --row.pendingTasks &&
  8735. finishSuspenseListRow(request, row);
  8736. request.allPendingTasks--;
  8737. prevTaskInDEV = logRecoverableError(
  8738. request,
  8739. x$jscomp$0,
  8740. errorInfo$jscomp$1,
  8741. debugTask
  8742. );
  8743. if (null === boundary$jscomp$0)
  8744. fatalError(request, x$jscomp$0, errorInfo$jscomp$1, debugTask);
  8745. else if (
  8746. (boundary$jscomp$0.pendingTasks--,
  8747. boundary$jscomp$0.status !== CLIENT_RENDERED)
  8748. ) {
  8749. boundary$jscomp$0.status = CLIENT_RENDERED;
  8750. encodeErrorForBoundary(
  8751. boundary$jscomp$0,
  8752. prevTaskInDEV,
  8753. x$jscomp$0,
  8754. errorInfo$jscomp$1,
  8755. !1
  8756. );
  8757. untrackBoundary(request, boundary$jscomp$0);
  8758. var boundaryRow = boundary$jscomp$0.row;
  8759. null !== boundaryRow &&
  8760. 0 === --boundaryRow.pendingTasks &&
  8761. finishSuspenseListRow(request, boundaryRow);
  8762. boundary$jscomp$0.parentFlushed &&
  8763. request.clientRenderedBoundaries.push(boundary$jscomp$0);
  8764. 0 === request.pendingRootTasks &&
  8765. null === request.trackedPostpones &&
  8766. null !== boundary$jscomp$0.contentPreamble &&
  8767. preparePreamble(request);
  8768. }
  8769. 0 === request.allPendingTasks && completeAll(request);
  8770. }
  8771. } finally {
  8772. currentTaskInDEV = request$jscomp$0;
  8773. }
  8774. }
  8775. }
  8776. pingedTasks.splice(0, i);
  8777. null !== request$jscomp$2.destination &&
  8778. flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
  8779. } catch (error) {
  8780. (pingedTasks = {}),
  8781. logRecoverableError(request$jscomp$2, error, pingedTasks, null),
  8782. fatalError(request$jscomp$2, error, pingedTasks, null);
  8783. } finally {
  8784. (currentResumableState = prevResumableState),
  8785. (ReactSharedInternals.H = prevDispatcher),
  8786. (ReactSharedInternals.A = prevAsyncDispatcher),
  8787. (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl),
  8788. prevDispatcher === HooksDispatcher && switchContext(prevContext),
  8789. (currentRequest = prevRequest);
  8790. }
  8791. }
  8792. }
  8793. function preparePreambleFromSubtree(
  8794. request,
  8795. segment,
  8796. collectedPreambleSegments
  8797. ) {
  8798. segment.preambleChildren.length &&
  8799. collectedPreambleSegments.push(segment.preambleChildren);
  8800. for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)
  8801. pendingPreambles =
  8802. preparePreambleFromSegment(
  8803. request,
  8804. segment.children[i],
  8805. collectedPreambleSegments
  8806. ) || pendingPreambles;
  8807. return pendingPreambles;
  8808. }
  8809. function preparePreambleFromSegment(
  8810. request,
  8811. segment,
  8812. collectedPreambleSegments
  8813. ) {
  8814. var boundary = segment.boundary;
  8815. if (null === boundary)
  8816. return preparePreambleFromSubtree(
  8817. request,
  8818. segment,
  8819. collectedPreambleSegments
  8820. );
  8821. var preamble = boundary.contentPreamble,
  8822. fallbackPreamble = boundary.fallbackPreamble;
  8823. if (null === preamble || null === fallbackPreamble) return !1;
  8824. switch (boundary.status) {
  8825. case COMPLETED:
  8826. hoistPreambleState(request.renderState, preamble);
  8827. request.byteSize += boundary.byteSize;
  8828. segment = boundary.completedSegments[0];
  8829. if (!segment)
  8830. throw Error(
  8831. "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
  8832. );
  8833. return preparePreambleFromSubtree(
  8834. request,
  8835. segment,
  8836. collectedPreambleSegments
  8837. );
  8838. case POSTPONED:
  8839. if (null !== request.trackedPostpones) return !0;
  8840. case CLIENT_RENDERED:
  8841. if (segment.status === COMPLETED)
  8842. return (
  8843. hoistPreambleState(request.renderState, fallbackPreamble),
  8844. preparePreambleFromSubtree(
  8845. request,
  8846. segment,
  8847. collectedPreambleSegments
  8848. )
  8849. );
  8850. default:
  8851. return !0;
  8852. }
  8853. }
  8854. function preparePreamble(request) {
  8855. if (
  8856. request.completedRootSegment &&
  8857. null === request.completedPreambleSegments
  8858. ) {
  8859. var collectedPreambleSegments = [],
  8860. originalRequestByteSize = request.byteSize,
  8861. hasPendingPreambles = preparePreambleFromSegment(
  8862. request,
  8863. request.completedRootSegment,
  8864. collectedPreambleSegments
  8865. ),
  8866. preamble = request.renderState.preamble;
  8867. !1 === hasPendingPreambles || (preamble.headChunks && preamble.bodyChunks)
  8868. ? (request.completedPreambleSegments = collectedPreambleSegments)
  8869. : (request.byteSize = originalRequestByteSize);
  8870. }
  8871. }
  8872. function flushSubtree(request, destination, segment, hoistableState) {
  8873. segment.parentFlushed = !0;
  8874. switch (segment.status) {
  8875. case PENDING:
  8876. segment.id = request.nextSegmentId++;
  8877. case POSTPONED:
  8878. return (
  8879. (hoistableState = segment.id),
  8880. (segment.lastPushedText = !1),
  8881. (segment.textEmbedded = !1),
  8882. (request = request.renderState),
  8883. writeChunk(destination, placeholder1),
  8884. writeChunk(destination, request.placeholderPrefix),
  8885. (request = hoistableState.toString(16)),
  8886. writeChunk(destination, request),
  8887. !!destination.write(placeholder2)
  8888. );
  8889. case COMPLETED:
  8890. segment.status = FLUSHED;
  8891. var r = !0,
  8892. chunks = segment.chunks,
  8893. chunkIdx = 0;
  8894. segment = segment.children;
  8895. for (var childIdx = 0; childIdx < segment.length; childIdx++) {
  8896. for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)
  8897. writeChunk(destination, chunks[chunkIdx]);
  8898. r = flushSegment(request, destination, r, hoistableState);
  8899. }
  8900. for (; chunkIdx < chunks.length - 1; chunkIdx++)
  8901. writeChunk(destination, chunks[chunkIdx]);
  8902. chunkIdx < chunks.length && (r = !!destination.write(chunks[chunkIdx]));
  8903. return r;
  8904. case ABORTED:
  8905. return !0;
  8906. default:
  8907. throw Error(
  8908. "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
  8909. );
  8910. }
  8911. }
  8912. var flushedByteSize = 0;
  8913. function flushSegment(request, destination, segment, hoistableState) {
  8914. var boundary = segment.boundary;
  8915. if (null === boundary)
  8916. return flushSubtree(request, destination, segment, hoistableState);
  8917. boundary.parentFlushed = !0;
  8918. if (boundary.status === CLIENT_RENDERED) {
  8919. var row = boundary.row;
  8920. null !== row &&
  8921. 0 === --row.pendingTasks &&
  8922. finishSuspenseListRow(request, row);
  8923. row = boundary.errorDigest;
  8924. var errorMessage = boundary.errorMessage,
  8925. errorStack = boundary.errorStack;
  8926. boundary = boundary.errorComponentStack;
  8927. destination.write(startClientRenderedSuspenseBoundary);
  8928. writeChunk(destination, clientRenderedSuspenseBoundaryError1);
  8929. row &&
  8930. (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
  8931. writeChunk(destination, escapeTextForBrowser(row)),
  8932. writeChunk(
  8933. destination,
  8934. clientRenderedSuspenseBoundaryErrorAttrInterstitial
  8935. ));
  8936. errorMessage &&
  8937. (writeChunk(destination, clientRenderedSuspenseBoundaryError1B),
  8938. writeChunk(destination, escapeTextForBrowser(errorMessage)),
  8939. writeChunk(
  8940. destination,
  8941. clientRenderedSuspenseBoundaryErrorAttrInterstitial
  8942. ));
  8943. errorStack &&
  8944. (writeChunk(destination, clientRenderedSuspenseBoundaryError1C),
  8945. writeChunk(destination, escapeTextForBrowser(errorStack)),
  8946. writeChunk(
  8947. destination,
  8948. clientRenderedSuspenseBoundaryErrorAttrInterstitial
  8949. ));
  8950. boundary &&
  8951. (writeChunk(destination, clientRenderedSuspenseBoundaryError1D),
  8952. writeChunk(destination, escapeTextForBrowser(boundary)),
  8953. writeChunk(
  8954. destination,
  8955. clientRenderedSuspenseBoundaryErrorAttrInterstitial
  8956. ));
  8957. destination.write(clientRenderedSuspenseBoundaryError2);
  8958. flushSubtree(request, destination, segment, hoistableState);
  8959. } else if (boundary.status !== COMPLETED)
  8960. boundary.status === PENDING &&
  8961. (boundary.rootSegmentID = request.nextSegmentId++),
  8962. 0 < boundary.completedSegments.length &&
  8963. request.partialBoundaries.push(boundary),
  8964. writeStartPendingSuspenseBoundary(
  8965. destination,
  8966. request.renderState,
  8967. boundary.rootSegmentID
  8968. ),
  8969. hoistableState && hoistHoistables(hoistableState, boundary.fallbackState),
  8970. flushSubtree(request, destination, segment, hoistableState);
  8971. else if (
  8972. !flushingPartialBoundaries &&
  8973. isEligibleForOutlining(request, boundary) &&
  8974. (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||
  8975. hasSuspenseyContent(boundary.contentState))
  8976. )
  8977. (boundary.rootSegmentID = request.nextSegmentId++),
  8978. request.completedBoundaries.push(boundary),
  8979. writeStartPendingSuspenseBoundary(
  8980. destination,
  8981. request.renderState,
  8982. boundary.rootSegmentID
  8983. ),
  8984. flushSubtree(request, destination, segment, hoistableState);
  8985. else {
  8986. flushedByteSize += boundary.byteSize;
  8987. hoistableState && hoistHoistables(hoistableState, boundary.contentState);
  8988. segment = boundary.row;
  8989. null !== segment &&
  8990. isEligibleForOutlining(request, boundary) &&
  8991. 0 === --segment.pendingTasks &&
  8992. finishSuspenseListRow(request, segment);
  8993. destination.write(startCompletedSuspenseBoundary);
  8994. segment = boundary.completedSegments;
  8995. if (1 !== segment.length)
  8996. throw Error(
  8997. "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
  8998. );
  8999. flushSegment(request, destination, segment[0], hoistableState);
  9000. }
  9001. return !!destination.write(endSuspenseBoundary);
  9002. }
  9003. function flushSegmentContainer(request, destination, segment, hoistableState) {
  9004. writeStartSegment(
  9005. destination,
  9006. request.renderState,
  9007. segment.parentFormatContext,
  9008. segment.id
  9009. );
  9010. flushSegment(request, destination, segment, hoistableState);
  9011. return writeEndSegment(destination, segment.parentFormatContext);
  9012. }
  9013. function flushCompletedBoundary(request, destination, boundary) {
  9014. flushedByteSize = boundary.byteSize;
  9015. for (
  9016. var completedSegments = boundary.completedSegments, i = 0;
  9017. i < completedSegments.length;
  9018. i++
  9019. )
  9020. flushPartiallyCompletedSegment(
  9021. request,
  9022. destination,
  9023. boundary,
  9024. completedSegments[i]
  9025. );
  9026. completedSegments.length = 0;
  9027. completedSegments = boundary.row;
  9028. null !== completedSegments &&
  9029. isEligibleForOutlining(request, boundary) &&
  9030. 0 === --completedSegments.pendingTasks &&
  9031. finishSuspenseListRow(request, completedSegments);
  9032. writeHoistablesForBoundary(
  9033. destination,
  9034. boundary.contentState,
  9035. request.renderState
  9036. );
  9037. completedSegments = request.resumableState;
  9038. request = request.renderState;
  9039. i = boundary.rootSegmentID;
  9040. boundary = boundary.contentState;
  9041. var requiresStyleInsertion = request.stylesToHoist;
  9042. request.stylesToHoist = !1;
  9043. writeChunk(destination, request.startInlineScript);
  9044. writeChunk(destination, endOfStartTag);
  9045. requiresStyleInsertion
  9046. ? ((completedSegments.instructions & SentClientRenderFunction) ===
  9047. NothingSent &&
  9048. ((completedSegments.instructions |= SentClientRenderFunction),
  9049. writeChunk(destination, clientRenderScriptFunctionOnly)),
  9050. (completedSegments.instructions & SentCompleteBoundaryFunction) ===
  9051. NothingSent &&
  9052. ((completedSegments.instructions |= SentCompleteBoundaryFunction),
  9053. writeChunk(destination, completeBoundaryScriptFunctionOnly)),
  9054. (completedSegments.instructions & SentStyleInsertionFunction) ===
  9055. NothingSent
  9056. ? ((completedSegments.instructions |= SentStyleInsertionFunction),
  9057. writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
  9058. : writeChunk(destination, completeBoundaryWithStylesScript1Partial))
  9059. : ((completedSegments.instructions & SentCompleteBoundaryFunction) ===
  9060. NothingSent &&
  9061. ((completedSegments.instructions |= SentCompleteBoundaryFunction),
  9062. writeChunk(destination, completeBoundaryScriptFunctionOnly)),
  9063. writeChunk(destination, completeBoundaryScript1Partial));
  9064. completedSegments = i.toString(16);
  9065. writeChunk(destination, request.boundaryPrefix);
  9066. writeChunk(destination, completedSegments);
  9067. writeChunk(destination, completeBoundaryScript2);
  9068. writeChunk(destination, request.segmentPrefix);
  9069. writeChunk(destination, completedSegments);
  9070. requiresStyleInsertion
  9071. ? (writeChunk(destination, completeBoundaryScript3a),
  9072. writeStyleResourceDependenciesInJS(destination, boundary))
  9073. : writeChunk(destination, completeBoundaryScript3b);
  9074. boundary = !!destination.write(completeBoundaryScriptEnd);
  9075. return writeBootstrap(destination, request) && boundary;
  9076. }
  9077. function flushPartiallyCompletedSegment(
  9078. request,
  9079. destination,
  9080. boundary,
  9081. segment
  9082. ) {
  9083. if (segment.status === FLUSHED) return !0;
  9084. var hoistableState = boundary.contentState,
  9085. segmentID = segment.id;
  9086. if (-1 === segmentID) {
  9087. if (-1 === (segment.id = boundary.rootSegmentID))
  9088. throw Error(
  9089. "A root segment ID must have been assigned by now. This is a bug in React."
  9090. );
  9091. return flushSegmentContainer(request, destination, segment, hoistableState);
  9092. }
  9093. if (segmentID === boundary.rootSegmentID)
  9094. return flushSegmentContainer(request, destination, segment, hoistableState);
  9095. flushSegmentContainer(request, destination, segment, hoistableState);
  9096. boundary = request.resumableState;
  9097. request = request.renderState;
  9098. writeChunk(destination, request.startInlineScript);
  9099. writeChunk(destination, endOfStartTag);
  9100. (boundary.instructions & SentCompleteSegmentFunction) === NothingSent
  9101. ? ((boundary.instructions |= SentCompleteSegmentFunction),
  9102. writeChunk(destination, completeSegmentScript1Full))
  9103. : writeChunk(destination, completeSegmentScript1Partial);
  9104. writeChunk(destination, request.segmentPrefix);
  9105. segmentID = segmentID.toString(16);
  9106. writeChunk(destination, segmentID);
  9107. writeChunk(destination, completeSegmentScript2);
  9108. writeChunk(destination, request.placeholderPrefix);
  9109. writeChunk(destination, segmentID);
  9110. destination = !!destination.write(completeSegmentScriptEnd);
  9111. return destination;
  9112. }
  9113. var flushingPartialBoundaries = !1;
  9114. function flushCompletedQueues(request, destination) {
  9115. try {
  9116. if (!(0 < request.pendingRootTasks)) {
  9117. var i,
  9118. completedRootSegment = request.completedRootSegment;
  9119. if (null !== completedRootSegment) {
  9120. if (completedRootSegment.status === POSTPONED) return;
  9121. var completedPreambleSegments = request.completedPreambleSegments;
  9122. if (null === completedPreambleSegments) return;
  9123. flushedByteSize = request.byteSize;
  9124. var resumableState = request.resumableState,
  9125. renderState = request.renderState,
  9126. preamble = renderState.preamble,
  9127. htmlChunks = preamble.htmlChunks,
  9128. headChunks = preamble.headChunks,
  9129. i$jscomp$0;
  9130. if (htmlChunks) {
  9131. for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
  9132. writeChunk(destination, htmlChunks[i$jscomp$0]);
  9133. if (headChunks)
  9134. for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
  9135. writeChunk(destination, headChunks[i$jscomp$0]);
  9136. else
  9137. writeChunk(destination, startChunkForTag("head")),
  9138. writeChunk(destination, endOfStartTag);
  9139. } else if (headChunks)
  9140. for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
  9141. writeChunk(destination, headChunks[i$jscomp$0]);
  9142. var charsetChunks = renderState.charsetChunks;
  9143. for (i$jscomp$0 = 0; i$jscomp$0 < charsetChunks.length; i$jscomp$0++)
  9144. writeChunk(destination, charsetChunks[i$jscomp$0]);
  9145. charsetChunks.length = 0;
  9146. renderState.preconnects.forEach(flushResource, destination);
  9147. renderState.preconnects.clear();
  9148. var viewportChunks = renderState.viewportChunks;
  9149. for (i$jscomp$0 = 0; i$jscomp$0 < viewportChunks.length; i$jscomp$0++)
  9150. writeChunk(destination, viewportChunks[i$jscomp$0]);
  9151. viewportChunks.length = 0;
  9152. renderState.fontPreloads.forEach(flushResource, destination);
  9153. renderState.fontPreloads.clear();
  9154. renderState.highImagePreloads.forEach(flushResource, destination);
  9155. renderState.highImagePreloads.clear();
  9156. currentlyFlushingRenderState = renderState;
  9157. renderState.styles.forEach(flushStylesInPreamble, destination);
  9158. currentlyFlushingRenderState = null;
  9159. var importMapChunks = renderState.importMapChunks;
  9160. for (i$jscomp$0 = 0; i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
  9161. writeChunk(destination, importMapChunks[i$jscomp$0]);
  9162. importMapChunks.length = 0;
  9163. renderState.bootstrapScripts.forEach(flushResource, destination);
  9164. renderState.scripts.forEach(flushResource, destination);
  9165. renderState.scripts.clear();
  9166. renderState.bulkPreloads.forEach(flushResource, destination);
  9167. renderState.bulkPreloads.clear();
  9168. htmlChunks ||
  9169. headChunks ||
  9170. (resumableState.instructions |= SentCompletedShellId);
  9171. var hoistableChunks = renderState.hoistableChunks;
  9172. for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
  9173. writeChunk(destination, hoistableChunks[i$jscomp$0]);
  9174. for (
  9175. resumableState = hoistableChunks.length = 0;
  9176. resumableState < completedPreambleSegments.length;
  9177. resumableState++
  9178. ) {
  9179. var segments = completedPreambleSegments[resumableState];
  9180. for (renderState = 0; renderState < segments.length; renderState++)
  9181. flushSegment(request, destination, segments[renderState], null);
  9182. }
  9183. var preamble$jscomp$0 = request.renderState.preamble,
  9184. headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
  9185. (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&
  9186. writeChunk(destination, endChunkForTag("head"));
  9187. var bodyChunks = preamble$jscomp$0.bodyChunks;
  9188. if (bodyChunks)
  9189. for (
  9190. completedPreambleSegments = 0;
  9191. completedPreambleSegments < bodyChunks.length;
  9192. completedPreambleSegments++
  9193. )
  9194. writeChunk(destination, bodyChunks[completedPreambleSegments]);
  9195. flushSegment(request, destination, completedRootSegment, null);
  9196. request.completedRootSegment = null;
  9197. var renderState$jscomp$0 = request.renderState;
  9198. if (
  9199. 0 !== request.allPendingTasks ||
  9200. 0 !== request.clientRenderedBoundaries.length ||
  9201. 0 !== request.completedBoundaries.length ||
  9202. (null !== request.trackedPostpones &&
  9203. (0 !== request.trackedPostpones.rootNodes.length ||
  9204. null !== request.trackedPostpones.rootSlots))
  9205. ) {
  9206. var resumableState$jscomp$0 = request.resumableState;
  9207. if (
  9208. (resumableState$jscomp$0.instructions & SentMarkShellTime) ===
  9209. NothingSent
  9210. ) {
  9211. resumableState$jscomp$0.instructions |= SentMarkShellTime;
  9212. writeChunk(destination, renderState$jscomp$0.startInlineScript);
  9213. if (
  9214. (resumableState$jscomp$0.instructions & SentCompletedShellId) ===
  9215. NothingSent
  9216. ) {
  9217. resumableState$jscomp$0.instructions |= SentCompletedShellId;
  9218. var shellId = "_" + resumableState$jscomp$0.idPrefix + "R_";
  9219. writeChunk(destination, completedShellIdAttributeStart);
  9220. writeChunk(destination, escapeTextForBrowser(shellId));
  9221. writeChunk(destination, attributeEnd);
  9222. }
  9223. writeChunk(destination, endOfStartTag);
  9224. writeChunk(destination, shellTimeRuntimeScript);
  9225. destination.write(endInlineScript);
  9226. }
  9227. }
  9228. writeBootstrap(destination, renderState$jscomp$0);
  9229. }
  9230. var renderState$jscomp$1 = request.renderState;
  9231. completedRootSegment = 0;
  9232. var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
  9233. for (
  9234. completedRootSegment = 0;
  9235. completedRootSegment < viewportChunks$jscomp$0.length;
  9236. completedRootSegment++
  9237. )
  9238. writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
  9239. viewportChunks$jscomp$0.length = 0;
  9240. renderState$jscomp$1.preconnects.forEach(flushResource, destination);
  9241. renderState$jscomp$1.preconnects.clear();
  9242. renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
  9243. renderState$jscomp$1.fontPreloads.clear();
  9244. renderState$jscomp$1.highImagePreloads.forEach(
  9245. flushResource,
  9246. destination
  9247. );
  9248. renderState$jscomp$1.highImagePreloads.clear();
  9249. renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
  9250. renderState$jscomp$1.scripts.forEach(flushResource, destination);
  9251. renderState$jscomp$1.scripts.clear();
  9252. renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
  9253. renderState$jscomp$1.bulkPreloads.clear();
  9254. var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
  9255. for (
  9256. completedRootSegment = 0;
  9257. completedRootSegment < hoistableChunks$jscomp$0.length;
  9258. completedRootSegment++
  9259. )
  9260. writeChunk(destination, hoistableChunks$jscomp$0[completedRootSegment]);
  9261. hoistableChunks$jscomp$0.length = 0;
  9262. var clientRenderedBoundaries = request.clientRenderedBoundaries;
  9263. for (i = 0; i < clientRenderedBoundaries.length; i++) {
  9264. var boundary = clientRenderedBoundaries[i];
  9265. renderState$jscomp$1 = destination;
  9266. var resumableState$jscomp$1 = request.resumableState,
  9267. renderState$jscomp$2 = request.renderState,
  9268. id = boundary.rootSegmentID,
  9269. errorDigest = boundary.errorDigest,
  9270. errorMessage = boundary.errorMessage,
  9271. errorStack = boundary.errorStack,
  9272. errorComponentStack = boundary.errorComponentStack;
  9273. writeChunk(
  9274. renderState$jscomp$1,
  9275. renderState$jscomp$2.startInlineScript
  9276. );
  9277. writeChunk(renderState$jscomp$1, endOfStartTag);
  9278. (resumableState$jscomp$1.instructions & SentClientRenderFunction) ===
  9279. NothingSent
  9280. ? ((resumableState$jscomp$1.instructions |= SentClientRenderFunction),
  9281. writeChunk(renderState$jscomp$1, clientRenderScript1Full))
  9282. : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
  9283. writeChunk(renderState$jscomp$1, renderState$jscomp$2.boundaryPrefix);
  9284. writeChunk(renderState$jscomp$1, id.toString(16));
  9285. writeChunk(renderState$jscomp$1, clientRenderScript1A);
  9286. if (errorDigest || errorMessage || errorStack || errorComponentStack)
  9287. writeChunk(
  9288. renderState$jscomp$1,
  9289. clientRenderErrorScriptArgInterstitial
  9290. ),
  9291. writeChunk(
  9292. renderState$jscomp$1,
  9293. escapeJSStringsForInstructionScripts(errorDigest || "")
  9294. );
  9295. if (errorMessage || errorStack || errorComponentStack)
  9296. writeChunk(
  9297. renderState$jscomp$1,
  9298. clientRenderErrorScriptArgInterstitial
  9299. ),
  9300. writeChunk(
  9301. renderState$jscomp$1,
  9302. escapeJSStringsForInstructionScripts(errorMessage || "")
  9303. );
  9304. if (errorStack || errorComponentStack)
  9305. writeChunk(
  9306. renderState$jscomp$1,
  9307. clientRenderErrorScriptArgInterstitial
  9308. ),
  9309. writeChunk(
  9310. renderState$jscomp$1,
  9311. escapeJSStringsForInstructionScripts(errorStack || "")
  9312. );
  9313. errorComponentStack &&
  9314. (writeChunk(
  9315. renderState$jscomp$1,
  9316. clientRenderErrorScriptArgInterstitial
  9317. ),
  9318. writeChunk(
  9319. renderState$jscomp$1,
  9320. escapeJSStringsForInstructionScripts(errorComponentStack)
  9321. ));
  9322. var JSCompiler_inline_result = !!renderState$jscomp$1.write(
  9323. clientRenderScriptEnd
  9324. );
  9325. if (!JSCompiler_inline_result) {
  9326. request.destination = null;
  9327. i++;
  9328. clientRenderedBoundaries.splice(0, i);
  9329. return;
  9330. }
  9331. }
  9332. clientRenderedBoundaries.splice(0, i);
  9333. var completedBoundaries = request.completedBoundaries;
  9334. for (i = 0; i < completedBoundaries.length; i++)
  9335. if (
  9336. !flushCompletedBoundary(request, destination, completedBoundaries[i])
  9337. ) {
  9338. request.destination = null;
  9339. i++;
  9340. completedBoundaries.splice(0, i);
  9341. return;
  9342. }
  9343. completedBoundaries.splice(0, i);
  9344. flushingPartialBoundaries = !0;
  9345. var partialBoundaries = request.partialBoundaries;
  9346. for (i = 0; i < partialBoundaries.length; i++) {
  9347. a: {
  9348. clientRenderedBoundaries = request;
  9349. boundary = destination;
  9350. var boundary$jscomp$0 = partialBoundaries[i];
  9351. flushedByteSize = boundary$jscomp$0.byteSize;
  9352. var completedSegments = boundary$jscomp$0.completedSegments;
  9353. for (
  9354. JSCompiler_inline_result = 0;
  9355. JSCompiler_inline_result < completedSegments.length;
  9356. JSCompiler_inline_result++
  9357. )
  9358. if (
  9359. !flushPartiallyCompletedSegment(
  9360. clientRenderedBoundaries,
  9361. boundary,
  9362. boundary$jscomp$0,
  9363. completedSegments[JSCompiler_inline_result]
  9364. )
  9365. ) {
  9366. JSCompiler_inline_result++;
  9367. completedSegments.splice(0, JSCompiler_inline_result);
  9368. var JSCompiler_inline_result$jscomp$0 = !1;
  9369. break a;
  9370. }
  9371. completedSegments.splice(0, JSCompiler_inline_result);
  9372. var row = boundary$jscomp$0.row;
  9373. null !== row &&
  9374. row.together &&
  9375. 1 === boundary$jscomp$0.pendingTasks &&
  9376. (1 === row.pendingTasks
  9377. ? unblockSuspenseListRow(
  9378. clientRenderedBoundaries,
  9379. row,
  9380. row.hoistables
  9381. )
  9382. : row.pendingTasks--);
  9383. JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
  9384. boundary,
  9385. boundary$jscomp$0.contentState,
  9386. clientRenderedBoundaries.renderState
  9387. );
  9388. }
  9389. if (!JSCompiler_inline_result$jscomp$0) {
  9390. request.destination = null;
  9391. i++;
  9392. partialBoundaries.splice(0, i);
  9393. return;
  9394. }
  9395. }
  9396. partialBoundaries.splice(0, i);
  9397. flushingPartialBoundaries = !1;
  9398. var largeBoundaries = request.completedBoundaries;
  9399. for (i = 0; i < largeBoundaries.length; i++)
  9400. if (!flushCompletedBoundary(request, destination, largeBoundaries[i])) {
  9401. request.destination = null;
  9402. i++;
  9403. largeBoundaries.splice(0, i);
  9404. return;
  9405. }
  9406. largeBoundaries.splice(0, i);
  9407. }
  9408. } finally {
  9409. (flushingPartialBoundaries = !1),
  9410. 0 === request.allPendingTasks &&
  9411. 0 === request.clientRenderedBoundaries.length &&
  9412. 0 === request.completedBoundaries.length
  9413. ? ((request.flushScheduled = !1),
  9414. (i = request.resumableState),
  9415. i.hasBody && writeChunk(destination, endChunkForTag("body")),
  9416. i.hasHtml && writeChunk(destination, endChunkForTag("html")),
  9417. flushBuffered(destination),
  9418. 0 !== request.abortableTasks.size &&
  9419. console.error(
  9420. "There was still abortable task at the root when we closed. This is a bug in React."
  9421. ),
  9422. (request.status = CLOSED),
  9423. destination.end(),
  9424. (request.destination = null))
  9425. : flushBuffered(destination);
  9426. }
  9427. }
  9428. function startWork(request) {
  9429. request.flushScheduled = null !== request.destination;
  9430. scheduleMicrotask(function () {
  9431. return performWork(request);
  9432. });
  9433. setTimeout(function () {
  9434. 10 === request.status && (request.status = 11);
  9435. null === request.trackedPostpones &&
  9436. safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
  9437. }, 0);
  9438. }
  9439. function enqueueFlush(request) {
  9440. !1 === request.flushScheduled &&
  9441. 0 === request.pingedTasks.length &&
  9442. null !== request.destination &&
  9443. ((request.flushScheduled = !0),
  9444. setTimeout(function () {
  9445. var destination = request.destination;
  9446. destination
  9447. ? flushCompletedQueues(request, destination)
  9448. : (request.flushScheduled = !1);
  9449. }, 0));
  9450. }
  9451. function abort(request, reason) {
  9452. if (11 === request.status || 10 === request.status) request.status = 12;
  9453. try {
  9454. var abortableTasks = request.abortableTasks;
  9455. if (0 < abortableTasks.size) {
  9456. var error =
  9457. void 0 === reason
  9458. ? Error("The render was aborted by the server without a reason.")
  9459. : "object" === typeof reason &&
  9460. null !== reason &&
  9461. "function" === typeof reason.then
  9462. ? Error("The render was aborted by the server with a promise.")
  9463. : reason;
  9464. request.fatalError = error;
  9465. abortableTasks.forEach(function (task) {
  9466. var prevTaskInDEV = currentTaskInDEV,
  9467. prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
  9468. currentTaskInDEV = task;
  9469. ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
  9470. try {
  9471. abortTask(task, request, error);
  9472. } finally {
  9473. (currentTaskInDEV = prevTaskInDEV),
  9474. (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl);
  9475. }
  9476. });
  9477. abortableTasks.clear();
  9478. }
  9479. null !== request.destination &&
  9480. flushCompletedQueues(request, request.destination);
  9481. } catch (error$4) {
  9482. (reason = {}),
  9483. logRecoverableError(request, error$4, reason, null),
  9484. fatalError(request, error$4, reason, null);
  9485. }
  9486. }
  9487. function addToReplayParent(node, parentKeyPath, trackedPostpones) {
  9488. if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);
  9489. else {
  9490. var workingMap = trackedPostpones.workingMap,
  9491. parentNode = workingMap.get(parentKeyPath);
  9492. void 0 === parentNode &&
  9493. ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),
  9494. workingMap.set(parentKeyPath, parentNode),
  9495. addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));
  9496. parentNode[2].push(node);
  9497. }
  9498. }
  9499. var isomorphicReactPackageVersion$jscomp$inline_766 = React.version;
  9500. if (
  9501. "19.2.4" !==
  9502. isomorphicReactPackageVersion$jscomp$inline_766
  9503. )
  9504. throw Error(
  9505. 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
  9506. (isomorphicReactPackageVersion$jscomp$inline_766 +
  9507. "\n - react-dom: 19.2.4\nLearn more: https://react.dev/warnings/version-mismatch")
  9508. );
  9509. exports.renderToReadableStream = function (children, options) {
  9510. return new Promise(function (resolve, reject) {
  9511. var onFatalError,
  9512. onAllReady,
  9513. allReady = new Promise(function (res, rej) {
  9514. onAllReady = res;
  9515. onFatalError = rej;
  9516. }),
  9517. onHeaders = options ? options.onHeaders : void 0,
  9518. onHeadersImpl;
  9519. onHeaders &&
  9520. (onHeadersImpl = function (headersDescriptor) {
  9521. onHeaders(new Headers(headersDescriptor));
  9522. });
  9523. var resumableState = createResumableState(
  9524. options ? options.identifierPrefix : void 0,
  9525. options ? options.unstable_externalRuntimeSrc : void 0,
  9526. options ? options.bootstrapScriptContent : void 0,
  9527. options ? options.bootstrapScripts : void 0,
  9528. options ? options.bootstrapModules : void 0
  9529. ),
  9530. request$jscomp$0 = createRequest(
  9531. children,
  9532. resumableState,
  9533. createRenderState(
  9534. resumableState,
  9535. options ? options.nonce : void 0,
  9536. options ? options.unstable_externalRuntimeSrc : void 0,
  9537. options ? options.importMap : void 0,
  9538. onHeadersImpl,
  9539. options ? options.maxHeadersLength : void 0
  9540. ),
  9541. createRootFormatContext(options ? options.namespaceURI : void 0),
  9542. options ? options.progressiveChunkSize : void 0,
  9543. options ? options.onError : void 0,
  9544. onAllReady,
  9545. function () {
  9546. var stream = new ReadableStream(
  9547. {
  9548. type: "direct",
  9549. pull: function (controller) {
  9550. var request = request$jscomp$0;
  9551. if (13 === request.status)
  9552. (request.status = CLOSED),
  9553. closeWithError(controller, request.fatalError);
  9554. else if (
  9555. request.status !== CLOSED &&
  9556. null === request.destination
  9557. ) {
  9558. request.destination = controller;
  9559. try {
  9560. flushCompletedQueues(request, controller);
  9561. } catch (error) {
  9562. (controller = {}),
  9563. logRecoverableError(request, error, controller, null),
  9564. fatalError(request, error, controller, null);
  9565. }
  9566. }
  9567. },
  9568. cancel: function (reason) {
  9569. request$jscomp$0.destination = null;
  9570. abort(request$jscomp$0, reason);
  9571. }
  9572. },
  9573. { highWaterMark: 2048 }
  9574. );
  9575. stream.allReady = allReady;
  9576. resolve(stream);
  9577. },
  9578. function (error) {
  9579. allReady.catch(function () {});
  9580. reject(error);
  9581. },
  9582. onFatalError,
  9583. options ? options.onPostpone : void 0,
  9584. options ? options.formState : void 0
  9585. );
  9586. if (options && options.signal) {
  9587. var signal = options.signal;
  9588. if (signal.aborted) abort(request$jscomp$0, signal.reason);
  9589. else {
  9590. var listener = function () {
  9591. abort(request$jscomp$0, signal.reason);
  9592. signal.removeEventListener("abort", listener);
  9593. };
  9594. signal.addEventListener("abort", listener);
  9595. }
  9596. }
  9597. startWork(request$jscomp$0);
  9598. });
  9599. };
  9600. exports.version = "19.2.4";