react-dom-server.browser.production.js 262 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410
  1. /**
  2. * @license React
  3. * react-dom-server.browser.production.js
  4. *
  5. * Copyright (c) Meta Platforms, Inc. and affiliates.
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE file in the root directory of this source tree.
  9. */
  10. /*
  11. JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)
  12. Copyright (c) 2011 Gary Court
  13. Permission is hereby granted, free of charge, to any person obtaining a copy
  14. of this software and associated documentation files (the "Software"), to deal
  15. in the Software without restriction, including without limitation the rights
  16. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  17. copies of the Software, and to permit persons to whom the Software is
  18. furnished to do so, subject to the following conditions:
  19. The above copyright notice and this permission notice shall be included in
  20. all copies or substantial portions of the Software.
  21. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  22. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  24. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  26. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  27. SOFTWARE.
  28. */
  29. "use strict";
  30. var React = require("react"),
  31. ReactDOM = require("react-dom");
  32. function formatProdErrorMessage(code) {
  33. var url = "https://react.dev/errors/" + code;
  34. if (1 < arguments.length) {
  35. url += "?args[]=" + encodeURIComponent(arguments[1]);
  36. for (var i = 2; i < arguments.length; i++)
  37. url += "&args[]=" + encodeURIComponent(arguments[i]);
  38. }
  39. return (
  40. "Minified React error #" +
  41. code +
  42. "; visit " +
  43. url +
  44. " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
  45. );
  46. }
  47. var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  48. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  49. REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
  50. REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
  51. REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
  52. REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
  53. REACT_CONTEXT_TYPE = Symbol.for("react.context"),
  54. REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
  55. REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
  56. REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
  57. REACT_MEMO_TYPE = Symbol.for("react.memo"),
  58. REACT_LAZY_TYPE = Symbol.for("react.lazy"),
  59. REACT_SCOPE_TYPE = Symbol.for("react.scope"),
  60. REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
  61. REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
  62. REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
  63. REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
  64. MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
  65. function getIteratorFn(maybeIterable) {
  66. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  67. maybeIterable =
  68. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  69. maybeIterable["@@iterator"];
  70. return "function" === typeof maybeIterable ? maybeIterable : null;
  71. }
  72. var isArrayImpl = Array.isArray;
  73. function murmurhash3_32_gc(key, seed) {
  74. var remainder = key.length & 3;
  75. var bytes = key.length - remainder;
  76. var h1 = seed;
  77. for (seed = 0; seed < bytes; ) {
  78. var k1 =
  79. (key.charCodeAt(seed) & 255) |
  80. ((key.charCodeAt(++seed) & 255) << 8) |
  81. ((key.charCodeAt(++seed) & 255) << 16) |
  82. ((key.charCodeAt(++seed) & 255) << 24);
  83. ++seed;
  84. k1 =
  85. (3432918353 * (k1 & 65535) +
  86. (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &
  87. 4294967295;
  88. k1 = (k1 << 15) | (k1 >>> 17);
  89. k1 =
  90. (461845907 * (k1 & 65535) + (((461845907 * (k1 >>> 16)) & 65535) << 16)) &
  91. 4294967295;
  92. h1 ^= k1;
  93. h1 = (h1 << 13) | (h1 >>> 19);
  94. h1 = (5 * (h1 & 65535) + (((5 * (h1 >>> 16)) & 65535) << 16)) & 4294967295;
  95. h1 = (h1 & 65535) + 27492 + ((((h1 >>> 16) + 58964) & 65535) << 16);
  96. }
  97. k1 = 0;
  98. switch (remainder) {
  99. case 3:
  100. k1 ^= (key.charCodeAt(seed + 2) & 255) << 16;
  101. case 2:
  102. k1 ^= (key.charCodeAt(seed + 1) & 255) << 8;
  103. case 1:
  104. (k1 ^= key.charCodeAt(seed) & 255),
  105. (k1 =
  106. (3432918353 * (k1 & 65535) +
  107. (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &
  108. 4294967295),
  109. (k1 = (k1 << 15) | (k1 >>> 17)),
  110. (h1 ^=
  111. (461845907 * (k1 & 65535) +
  112. (((461845907 * (k1 >>> 16)) & 65535) << 16)) &
  113. 4294967295);
  114. }
  115. h1 ^= key.length;
  116. h1 ^= h1 >>> 16;
  117. h1 =
  118. (2246822507 * (h1 & 65535) + (((2246822507 * (h1 >>> 16)) & 65535) << 16)) &
  119. 4294967295;
  120. h1 ^= h1 >>> 13;
  121. h1 =
  122. (3266489909 * (h1 & 65535) + (((3266489909 * (h1 >>> 16)) & 65535) << 16)) &
  123. 4294967295;
  124. return (h1 ^ (h1 >>> 16)) >>> 0;
  125. }
  126. var channel = new MessageChannel(),
  127. taskQueue = [];
  128. channel.port1.onmessage = function () {
  129. var task = taskQueue.shift();
  130. task && task();
  131. };
  132. function scheduleWork(callback) {
  133. taskQueue.push(callback);
  134. channel.port2.postMessage(null);
  135. }
  136. function handleErrorInNextTick(error) {
  137. setTimeout(function () {
  138. throw error;
  139. });
  140. }
  141. var LocalPromise = Promise,
  142. scheduleMicrotask =
  143. "function" === typeof queueMicrotask
  144. ? queueMicrotask
  145. : function (callback) {
  146. LocalPromise.resolve(null)
  147. .then(callback)
  148. .catch(handleErrorInNextTick);
  149. },
  150. currentView = null,
  151. writtenBytes = 0;
  152. function writeChunk(destination, chunk) {
  153. if (0 !== chunk.byteLength)
  154. if (2048 < chunk.byteLength)
  155. 0 < writtenBytes &&
  156. (destination.enqueue(
  157. new Uint8Array(currentView.buffer, 0, writtenBytes)
  158. ),
  159. (currentView = new Uint8Array(2048)),
  160. (writtenBytes = 0)),
  161. destination.enqueue(chunk);
  162. else {
  163. var allowableBytes = currentView.length - writtenBytes;
  164. allowableBytes < chunk.byteLength &&
  165. (0 === allowableBytes
  166. ? destination.enqueue(currentView)
  167. : (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
  168. destination.enqueue(currentView),
  169. (chunk = chunk.subarray(allowableBytes))),
  170. (currentView = new Uint8Array(2048)),
  171. (writtenBytes = 0));
  172. currentView.set(chunk, writtenBytes);
  173. writtenBytes += chunk.byteLength;
  174. }
  175. }
  176. function writeChunkAndReturn(destination, chunk) {
  177. writeChunk(destination, chunk);
  178. return !0;
  179. }
  180. function completeWriting(destination) {
  181. currentView &&
  182. 0 < writtenBytes &&
  183. (destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)),
  184. (currentView = null),
  185. (writtenBytes = 0));
  186. }
  187. var textEncoder = new TextEncoder();
  188. function stringToChunk(content) {
  189. return textEncoder.encode(content);
  190. }
  191. function stringToPrecomputedChunk(content) {
  192. return textEncoder.encode(content);
  193. }
  194. function byteLengthOfChunk(chunk) {
  195. return chunk.byteLength;
  196. }
  197. function closeWithError(destination, error) {
  198. "function" === typeof destination.error
  199. ? destination.error(error)
  200. : destination.close();
  201. }
  202. var assign = Object.assign,
  203. hasOwnProperty = Object.prototype.hasOwnProperty,
  204. VALID_ATTRIBUTE_NAME_REGEX = RegExp(
  205. "^[: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]*$"
  206. ),
  207. illegalAttributeNameCache = {},
  208. validatedAttributeNameCache = {};
  209. function isAttributeNameSafe(attributeName) {
  210. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
  211. return !0;
  212. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
  213. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
  214. return (validatedAttributeNameCache[attributeName] = !0);
  215. illegalAttributeNameCache[attributeName] = !0;
  216. return !1;
  217. }
  218. var unitlessNumbers = new Set(
  219. "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(
  220. " "
  221. )
  222. ),
  223. aliases = new Map([
  224. ["acceptCharset", "accept-charset"],
  225. ["htmlFor", "for"],
  226. ["httpEquiv", "http-equiv"],
  227. ["crossOrigin", "crossorigin"],
  228. ["accentHeight", "accent-height"],
  229. ["alignmentBaseline", "alignment-baseline"],
  230. ["arabicForm", "arabic-form"],
  231. ["baselineShift", "baseline-shift"],
  232. ["capHeight", "cap-height"],
  233. ["clipPath", "clip-path"],
  234. ["clipRule", "clip-rule"],
  235. ["colorInterpolation", "color-interpolation"],
  236. ["colorInterpolationFilters", "color-interpolation-filters"],
  237. ["colorProfile", "color-profile"],
  238. ["colorRendering", "color-rendering"],
  239. ["dominantBaseline", "dominant-baseline"],
  240. ["enableBackground", "enable-background"],
  241. ["fillOpacity", "fill-opacity"],
  242. ["fillRule", "fill-rule"],
  243. ["floodColor", "flood-color"],
  244. ["floodOpacity", "flood-opacity"],
  245. ["fontFamily", "font-family"],
  246. ["fontSize", "font-size"],
  247. ["fontSizeAdjust", "font-size-adjust"],
  248. ["fontStretch", "font-stretch"],
  249. ["fontStyle", "font-style"],
  250. ["fontVariant", "font-variant"],
  251. ["fontWeight", "font-weight"],
  252. ["glyphName", "glyph-name"],
  253. ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
  254. ["glyphOrientationVertical", "glyph-orientation-vertical"],
  255. ["horizAdvX", "horiz-adv-x"],
  256. ["horizOriginX", "horiz-origin-x"],
  257. ["imageRendering", "image-rendering"],
  258. ["letterSpacing", "letter-spacing"],
  259. ["lightingColor", "lighting-color"],
  260. ["markerEnd", "marker-end"],
  261. ["markerMid", "marker-mid"],
  262. ["markerStart", "marker-start"],
  263. ["overlinePosition", "overline-position"],
  264. ["overlineThickness", "overline-thickness"],
  265. ["paintOrder", "paint-order"],
  266. ["panose-1", "panose-1"],
  267. ["pointerEvents", "pointer-events"],
  268. ["renderingIntent", "rendering-intent"],
  269. ["shapeRendering", "shape-rendering"],
  270. ["stopColor", "stop-color"],
  271. ["stopOpacity", "stop-opacity"],
  272. ["strikethroughPosition", "strikethrough-position"],
  273. ["strikethroughThickness", "strikethrough-thickness"],
  274. ["strokeDasharray", "stroke-dasharray"],
  275. ["strokeDashoffset", "stroke-dashoffset"],
  276. ["strokeLinecap", "stroke-linecap"],
  277. ["strokeLinejoin", "stroke-linejoin"],
  278. ["strokeMiterlimit", "stroke-miterlimit"],
  279. ["strokeOpacity", "stroke-opacity"],
  280. ["strokeWidth", "stroke-width"],
  281. ["textAnchor", "text-anchor"],
  282. ["textDecoration", "text-decoration"],
  283. ["textRendering", "text-rendering"],
  284. ["transformOrigin", "transform-origin"],
  285. ["underlinePosition", "underline-position"],
  286. ["underlineThickness", "underline-thickness"],
  287. ["unicodeBidi", "unicode-bidi"],
  288. ["unicodeRange", "unicode-range"],
  289. ["unitsPerEm", "units-per-em"],
  290. ["vAlphabetic", "v-alphabetic"],
  291. ["vHanging", "v-hanging"],
  292. ["vIdeographic", "v-ideographic"],
  293. ["vMathematical", "v-mathematical"],
  294. ["vectorEffect", "vector-effect"],
  295. ["vertAdvY", "vert-adv-y"],
  296. ["vertOriginX", "vert-origin-x"],
  297. ["vertOriginY", "vert-origin-y"],
  298. ["wordSpacing", "word-spacing"],
  299. ["writingMode", "writing-mode"],
  300. ["xmlnsXlink", "xmlns:xlink"],
  301. ["xHeight", "x-height"]
  302. ]),
  303. matchHtmlRegExp = /["'&<>]/;
  304. function escapeTextForBrowser(text) {
  305. if (
  306. "boolean" === typeof text ||
  307. "number" === typeof text ||
  308. "bigint" === typeof text
  309. )
  310. return "" + text;
  311. text = "" + text;
  312. var match = matchHtmlRegExp.exec(text);
  313. if (match) {
  314. var html = "",
  315. index,
  316. lastIndex = 0;
  317. for (index = match.index; index < text.length; index++) {
  318. switch (text.charCodeAt(index)) {
  319. case 34:
  320. match = "&quot;";
  321. break;
  322. case 38:
  323. match = "&amp;";
  324. break;
  325. case 39:
  326. match = "&#x27;";
  327. break;
  328. case 60:
  329. match = "&lt;";
  330. break;
  331. case 62:
  332. match = "&gt;";
  333. break;
  334. default:
  335. continue;
  336. }
  337. lastIndex !== index && (html += text.slice(lastIndex, index));
  338. lastIndex = index + 1;
  339. html += match;
  340. }
  341. text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;
  342. }
  343. return text;
  344. }
  345. var uppercasePattern = /([A-Z])/g,
  346. msPattern = /^ms-/,
  347. isJavaScriptProtocol =
  348. /^[\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;
  349. function sanitizeURL(url) {
  350. return isJavaScriptProtocol.test("" + url)
  351. ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
  352. : url;
  353. }
  354. var ReactSharedInternals =
  355. React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  356. ReactDOMSharedInternals =
  357. ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  358. sharedNotPendingObject = {
  359. pending: !1,
  360. data: null,
  361. method: null,
  362. action: null
  363. },
  364. previousDispatcher = ReactDOMSharedInternals.d;
  365. ReactDOMSharedInternals.d = {
  366. f: previousDispatcher.f,
  367. r: previousDispatcher.r,
  368. D: prefetchDNS,
  369. C: preconnect,
  370. L: preload,
  371. m: preloadModule,
  372. X: preinitScript,
  373. S: preinitStyle,
  374. M: preinitModuleScript
  375. };
  376. var PRELOAD_NO_CREDS = [],
  377. currentlyFlushingRenderState = null;
  378. stringToPrecomputedChunk('"></template>');
  379. var startInlineScript = stringToPrecomputedChunk("<script"),
  380. endInlineScript = stringToPrecomputedChunk("\x3c/script>"),
  381. startScriptSrc = stringToPrecomputedChunk('<script src="'),
  382. startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'),
  383. scriptNonce = stringToPrecomputedChunk(' nonce="'),
  384. scriptIntegirty = stringToPrecomputedChunk(' integrity="'),
  385. scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin="'),
  386. endAsyncScript = stringToPrecomputedChunk(' async="">\x3c/script>'),
  387. startInlineStyle = stringToPrecomputedChunk("<style"),
  388. scriptRegex = /(<\/|<)(s)(cript)/gi;
  389. function scriptReplacer(match, prefix, s, suffix) {
  390. return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
  391. }
  392. var importMapScriptStart = stringToPrecomputedChunk(
  393. '<script type="importmap">'
  394. ),
  395. importMapScriptEnd = stringToPrecomputedChunk("\x3c/script>");
  396. function createRenderState(
  397. resumableState,
  398. nonce,
  399. externalRuntimeConfig,
  400. importMap,
  401. onHeaders,
  402. maxHeadersLength
  403. ) {
  404. externalRuntimeConfig =
  405. "string" === typeof nonce ? nonce : nonce && nonce.script;
  406. var inlineScriptWithNonce =
  407. void 0 === externalRuntimeConfig
  408. ? startInlineScript
  409. : stringToPrecomputedChunk(
  410. '<script nonce="' +
  411. escapeTextForBrowser(externalRuntimeConfig) +
  412. '"'
  413. ),
  414. nonceStyle = "string" === typeof nonce ? void 0 : nonce && nonce.style,
  415. inlineStyleWithNonce =
  416. void 0 === nonceStyle
  417. ? startInlineStyle
  418. : stringToPrecomputedChunk(
  419. '<style nonce="' + escapeTextForBrowser(nonceStyle) + '"'
  420. ),
  421. idPrefix = resumableState.idPrefix,
  422. bootstrapChunks = [],
  423. bootstrapScriptContent = resumableState.bootstrapScriptContent,
  424. bootstrapScripts = resumableState.bootstrapScripts,
  425. bootstrapModules = resumableState.bootstrapModules;
  426. void 0 !== bootstrapScriptContent &&
  427. (bootstrapChunks.push(inlineScriptWithNonce),
  428. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  429. bootstrapChunks.push(
  430. endOfStartTag,
  431. stringToChunk(
  432. ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer)
  433. ),
  434. endInlineScript
  435. ));
  436. bootstrapScriptContent = [];
  437. void 0 !== importMap &&
  438. (bootstrapScriptContent.push(importMapScriptStart),
  439. bootstrapScriptContent.push(
  440. stringToChunk(
  441. ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
  442. )
  443. ),
  444. bootstrapScriptContent.push(importMapScriptEnd));
  445. importMap = onHeaders
  446. ? {
  447. preconnects: "",
  448. fontPreloads: "",
  449. highImagePreloads: "",
  450. remainingCapacity:
  451. 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
  452. }
  453. : null;
  454. onHeaders = {
  455. placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
  456. segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
  457. boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
  458. startInlineScript: inlineScriptWithNonce,
  459. startInlineStyle: inlineStyleWithNonce,
  460. preamble: createPreambleState(),
  461. externalRuntimeScript: null,
  462. bootstrapChunks: bootstrapChunks,
  463. importMapChunks: bootstrapScriptContent,
  464. onHeaders: onHeaders,
  465. headers: importMap,
  466. resets: {
  467. font: {},
  468. dns: {},
  469. connect: { default: {}, anonymous: {}, credentials: {} },
  470. image: {},
  471. style: {}
  472. },
  473. charsetChunks: [],
  474. viewportChunks: [],
  475. hoistableChunks: [],
  476. preconnects: new Set(),
  477. fontPreloads: new Set(),
  478. highImagePreloads: new Set(),
  479. styles: new Map(),
  480. bootstrapScripts: new Set(),
  481. scripts: new Set(),
  482. bulkPreloads: new Set(),
  483. preloads: {
  484. images: new Map(),
  485. stylesheets: new Map(),
  486. scripts: new Map(),
  487. moduleScripts: new Map()
  488. },
  489. nonce: { script: externalRuntimeConfig, style: nonceStyle },
  490. hoistableState: null,
  491. stylesToHoist: !1
  492. };
  493. if (void 0 !== bootstrapScripts)
  494. for (importMap = 0; importMap < bootstrapScripts.length; importMap++)
  495. (idPrefix = bootstrapScripts[importMap]),
  496. (nonceStyle = inlineScriptWithNonce = void 0),
  497. (inlineStyleWithNonce = {
  498. rel: "preload",
  499. as: "script",
  500. fetchPriority: "low",
  501. nonce: nonce
  502. }),
  503. "string" === typeof idPrefix
  504. ? (inlineStyleWithNonce.href = maxHeadersLength = idPrefix)
  505. : ((inlineStyleWithNonce.href = maxHeadersLength = idPrefix.src),
  506. (inlineStyleWithNonce.integrity = nonceStyle =
  507. "string" === typeof idPrefix.integrity
  508. ? idPrefix.integrity
  509. : void 0),
  510. (inlineStyleWithNonce.crossOrigin = inlineScriptWithNonce =
  511. "string" === typeof idPrefix || null == idPrefix.crossOrigin
  512. ? void 0
  513. : "use-credentials" === idPrefix.crossOrigin
  514. ? "use-credentials"
  515. : "")),
  516. (idPrefix = resumableState),
  517. (bootstrapScriptContent = maxHeadersLength),
  518. (idPrefix.scriptResources[bootstrapScriptContent] = null),
  519. (idPrefix.moduleScriptResources[bootstrapScriptContent] = null),
  520. (idPrefix = []),
  521. pushLinkImpl(idPrefix, inlineStyleWithNonce),
  522. onHeaders.bootstrapScripts.add(idPrefix),
  523. bootstrapChunks.push(
  524. startScriptSrc,
  525. stringToChunk(escapeTextForBrowser(maxHeadersLength)),
  526. attributeEnd
  527. ),
  528. externalRuntimeConfig &&
  529. bootstrapChunks.push(
  530. scriptNonce,
  531. stringToChunk(escapeTextForBrowser(externalRuntimeConfig)),
  532. attributeEnd
  533. ),
  534. "string" === typeof nonceStyle &&
  535. bootstrapChunks.push(
  536. scriptIntegirty,
  537. stringToChunk(escapeTextForBrowser(nonceStyle)),
  538. attributeEnd
  539. ),
  540. "string" === typeof inlineScriptWithNonce &&
  541. bootstrapChunks.push(
  542. scriptCrossOrigin,
  543. stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
  544. attributeEnd
  545. ),
  546. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  547. bootstrapChunks.push(endAsyncScript);
  548. if (void 0 !== bootstrapModules)
  549. for (nonce = 0; nonce < bootstrapModules.length; nonce++)
  550. (nonceStyle = bootstrapModules[nonce]),
  551. (maxHeadersLength = importMap = void 0),
  552. (inlineScriptWithNonce = {
  553. rel: "modulepreload",
  554. fetchPriority: "low",
  555. nonce: externalRuntimeConfig
  556. }),
  557. "string" === typeof nonceStyle
  558. ? (inlineScriptWithNonce.href = bootstrapScripts = nonceStyle)
  559. : ((inlineScriptWithNonce.href = bootstrapScripts = nonceStyle.src),
  560. (inlineScriptWithNonce.integrity = maxHeadersLength =
  561. "string" === typeof nonceStyle.integrity
  562. ? nonceStyle.integrity
  563. : void 0),
  564. (inlineScriptWithNonce.crossOrigin = importMap =
  565. "string" === typeof nonceStyle || null == nonceStyle.crossOrigin
  566. ? void 0
  567. : "use-credentials" === nonceStyle.crossOrigin
  568. ? "use-credentials"
  569. : "")),
  570. (nonceStyle = resumableState),
  571. (inlineStyleWithNonce = bootstrapScripts),
  572. (nonceStyle.scriptResources[inlineStyleWithNonce] = null),
  573. (nonceStyle.moduleScriptResources[inlineStyleWithNonce] = null),
  574. (nonceStyle = []),
  575. pushLinkImpl(nonceStyle, inlineScriptWithNonce),
  576. onHeaders.bootstrapScripts.add(nonceStyle),
  577. bootstrapChunks.push(
  578. startModuleSrc,
  579. stringToChunk(escapeTextForBrowser(bootstrapScripts)),
  580. attributeEnd
  581. ),
  582. externalRuntimeConfig &&
  583. bootstrapChunks.push(
  584. scriptNonce,
  585. stringToChunk(escapeTextForBrowser(externalRuntimeConfig)),
  586. attributeEnd
  587. ),
  588. "string" === typeof maxHeadersLength &&
  589. bootstrapChunks.push(
  590. scriptIntegirty,
  591. stringToChunk(escapeTextForBrowser(maxHeadersLength)),
  592. attributeEnd
  593. ),
  594. "string" === typeof importMap &&
  595. bootstrapChunks.push(
  596. scriptCrossOrigin,
  597. stringToChunk(escapeTextForBrowser(importMap)),
  598. attributeEnd
  599. ),
  600. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  601. bootstrapChunks.push(endAsyncScript);
  602. return onHeaders;
  603. }
  604. function createResumableState(
  605. identifierPrefix,
  606. externalRuntimeConfig,
  607. bootstrapScriptContent,
  608. bootstrapScripts,
  609. bootstrapModules
  610. ) {
  611. return {
  612. idPrefix: void 0 === identifierPrefix ? "" : identifierPrefix,
  613. nextFormID: 0,
  614. streamingFormat: 0,
  615. bootstrapScriptContent: bootstrapScriptContent,
  616. bootstrapScripts: bootstrapScripts,
  617. bootstrapModules: bootstrapModules,
  618. instructions: 0,
  619. hasBody: !1,
  620. hasHtml: !1,
  621. unknownResources: {},
  622. dnsResources: {},
  623. connectResources: { default: {}, anonymous: {}, credentials: {} },
  624. imageResources: {},
  625. styleResources: {},
  626. scriptResources: {},
  627. moduleUnknownResources: {},
  628. moduleScriptResources: {}
  629. };
  630. }
  631. function createPreambleState() {
  632. return { htmlChunks: null, headChunks: null, bodyChunks: null };
  633. }
  634. function createFormatContext(
  635. insertionMode,
  636. selectedValue,
  637. tagScope,
  638. viewTransition
  639. ) {
  640. return {
  641. insertionMode: insertionMode,
  642. selectedValue: selectedValue,
  643. tagScope: tagScope,
  644. viewTransition: viewTransition
  645. };
  646. }
  647. function createRootFormatContext(namespaceURI) {
  648. return createFormatContext(
  649. "http://www.w3.org/2000/svg" === namespaceURI
  650. ? 4
  651. : "http://www.w3.org/1998/Math/MathML" === namespaceURI
  652. ? 5
  653. : 0,
  654. null,
  655. 0,
  656. null
  657. );
  658. }
  659. function getChildFormatContext(parentContext, type, props) {
  660. var subtreeScope = parentContext.tagScope & -25;
  661. switch (type) {
  662. case "noscript":
  663. return createFormatContext(2, null, subtreeScope | 1, null);
  664. case "select":
  665. return createFormatContext(
  666. 2,
  667. null != props.value ? props.value : props.defaultValue,
  668. subtreeScope,
  669. null
  670. );
  671. case "svg":
  672. return createFormatContext(4, null, subtreeScope, null);
  673. case "picture":
  674. return createFormatContext(2, null, subtreeScope | 2, null);
  675. case "math":
  676. return createFormatContext(5, null, subtreeScope, null);
  677. case "foreignObject":
  678. return createFormatContext(2, null, subtreeScope, null);
  679. case "table":
  680. return createFormatContext(6, null, subtreeScope, null);
  681. case "thead":
  682. case "tbody":
  683. case "tfoot":
  684. return createFormatContext(7, null, subtreeScope, null);
  685. case "colgroup":
  686. return createFormatContext(9, null, subtreeScope, null);
  687. case "tr":
  688. return createFormatContext(8, null, subtreeScope, null);
  689. case "head":
  690. if (2 > parentContext.insertionMode)
  691. return createFormatContext(3, null, subtreeScope, null);
  692. break;
  693. case "html":
  694. if (0 === parentContext.insertionMode)
  695. return createFormatContext(1, null, subtreeScope, null);
  696. }
  697. return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
  698. ? createFormatContext(2, null, subtreeScope, null)
  699. : parentContext.tagScope !== subtreeScope
  700. ? createFormatContext(
  701. parentContext.insertionMode,
  702. parentContext.selectedValue,
  703. subtreeScope,
  704. null
  705. )
  706. : parentContext;
  707. }
  708. function getSuspenseViewTransition(parentViewTransition) {
  709. return null === parentViewTransition
  710. ? null
  711. : {
  712. update: parentViewTransition.update,
  713. enter: "none",
  714. exit: "none",
  715. share: parentViewTransition.update,
  716. name: parentViewTransition.autoName,
  717. autoName: parentViewTransition.autoName,
  718. nameIdx: 0
  719. };
  720. }
  721. function getSuspenseFallbackFormatContext(resumableState, parentContext) {
  722. parentContext.tagScope & 32 && (resumableState.instructions |= 128);
  723. return createFormatContext(
  724. parentContext.insertionMode,
  725. parentContext.selectedValue,
  726. parentContext.tagScope | 12,
  727. getSuspenseViewTransition(parentContext.viewTransition)
  728. );
  729. }
  730. function getSuspenseContentFormatContext(resumableState, parentContext) {
  731. resumableState = getSuspenseViewTransition(parentContext.viewTransition);
  732. var subtreeScope = parentContext.tagScope | 16;
  733. null !== resumableState &&
  734. "none" !== resumableState.share &&
  735. (subtreeScope |= 64);
  736. return createFormatContext(
  737. parentContext.insertionMode,
  738. parentContext.selectedValue,
  739. subtreeScope,
  740. resumableState
  741. );
  742. }
  743. var textSeparator = stringToPrecomputedChunk("\x3c!-- --\x3e");
  744. function pushTextInstance(target, text, renderState, textEmbedded) {
  745. if ("" === text) return textEmbedded;
  746. textEmbedded && target.push(textSeparator);
  747. target.push(stringToChunk(escapeTextForBrowser(text)));
  748. return !0;
  749. }
  750. var styleNameCache = new Map(),
  751. styleAttributeStart = stringToPrecomputedChunk(' style="'),
  752. styleAssign = stringToPrecomputedChunk(":"),
  753. styleSeparator = stringToPrecomputedChunk(";");
  754. function pushStyleAttribute(target, style) {
  755. if ("object" !== typeof style) throw Error(formatProdErrorMessage(62));
  756. var isFirst = !0,
  757. styleName;
  758. for (styleName in style)
  759. if (hasOwnProperty.call(style, styleName)) {
  760. var styleValue = style[styleName];
  761. if (
  762. null != styleValue &&
  763. "boolean" !== typeof styleValue &&
  764. "" !== styleValue
  765. ) {
  766. if (0 === styleName.indexOf("--")) {
  767. var nameChunk = stringToChunk(escapeTextForBrowser(styleName));
  768. styleValue = stringToChunk(
  769. escapeTextForBrowser(("" + styleValue).trim())
  770. );
  771. } else
  772. (nameChunk = styleNameCache.get(styleName)),
  773. void 0 === nameChunk &&
  774. ((nameChunk = stringToPrecomputedChunk(
  775. escapeTextForBrowser(
  776. styleName
  777. .replace(uppercasePattern, "-$1")
  778. .toLowerCase()
  779. .replace(msPattern, "-ms-")
  780. )
  781. )),
  782. styleNameCache.set(styleName, nameChunk)),
  783. (styleValue =
  784. "number" === typeof styleValue
  785. ? 0 === styleValue || unitlessNumbers.has(styleName)
  786. ? stringToChunk("" + styleValue)
  787. : stringToChunk(styleValue + "px")
  788. : stringToChunk(
  789. escapeTextForBrowser(("" + styleValue).trim())
  790. ));
  791. isFirst
  792. ? ((isFirst = !1),
  793. target.push(
  794. styleAttributeStart,
  795. nameChunk,
  796. styleAssign,
  797. styleValue
  798. ))
  799. : target.push(styleSeparator, nameChunk, styleAssign, styleValue);
  800. }
  801. }
  802. isFirst || target.push(attributeEnd);
  803. }
  804. var attributeSeparator = stringToPrecomputedChunk(" "),
  805. attributeAssign = stringToPrecomputedChunk('="'),
  806. attributeEnd = stringToPrecomputedChunk('"'),
  807. attributeEmptyString = stringToPrecomputedChunk('=""');
  808. function pushBooleanAttribute(target, name, value) {
  809. value &&
  810. "function" !== typeof value &&
  811. "symbol" !== typeof value &&
  812. target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);
  813. }
  814. function pushStringAttribute(target, name, value) {
  815. "function" !== typeof value &&
  816. "symbol" !== typeof value &&
  817. "boolean" !== typeof value &&
  818. target.push(
  819. attributeSeparator,
  820. stringToChunk(name),
  821. attributeAssign,
  822. stringToChunk(escapeTextForBrowser(value)),
  823. attributeEnd
  824. );
  825. }
  826. var actionJavaScriptURL = stringToPrecomputedChunk(
  827. escapeTextForBrowser(
  828. "javascript:throw new Error('React form unexpectedly submitted.')"
  829. )
  830. ),
  831. startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"');
  832. function pushAdditionalFormField(value, key) {
  833. this.push(startHiddenInputChunk);
  834. validateAdditionalFormField(value);
  835. pushStringAttribute(this, "name", key);
  836. pushStringAttribute(this, "value", value);
  837. this.push(endOfStartTagSelfClosing);
  838. }
  839. function validateAdditionalFormField(value) {
  840. if ("string" !== typeof value) throw Error(formatProdErrorMessage(480));
  841. }
  842. function getCustomFormFields(resumableState, formAction) {
  843. if ("function" === typeof formAction.$$FORM_ACTION) {
  844. var id = resumableState.nextFormID++;
  845. resumableState = resumableState.idPrefix + id;
  846. try {
  847. var customFields = formAction.$$FORM_ACTION(resumableState);
  848. if (customFields) {
  849. var formData = customFields.data;
  850. null != formData && formData.forEach(validateAdditionalFormField);
  851. }
  852. return customFields;
  853. } catch (x) {
  854. if ("object" === typeof x && null !== x && "function" === typeof x.then)
  855. throw x;
  856. }
  857. }
  858. return null;
  859. }
  860. function pushFormActionAttribute(
  861. target,
  862. resumableState,
  863. renderState,
  864. formAction,
  865. formEncType,
  866. formMethod,
  867. formTarget,
  868. name
  869. ) {
  870. var formData = null;
  871. if ("function" === typeof formAction) {
  872. var customFields = getCustomFormFields(resumableState, formAction);
  873. null !== customFields
  874. ? ((name = customFields.name),
  875. (formAction = customFields.action || ""),
  876. (formEncType = customFields.encType),
  877. (formMethod = customFields.method),
  878. (formTarget = customFields.target),
  879. (formData = customFields.data))
  880. : (target.push(
  881. attributeSeparator,
  882. stringToChunk("formAction"),
  883. attributeAssign,
  884. actionJavaScriptURL,
  885. attributeEnd
  886. ),
  887. (formTarget = formMethod = formEncType = formAction = name = null),
  888. injectFormReplayingRuntime(resumableState, renderState));
  889. }
  890. null != name && pushAttribute(target, "name", name);
  891. null != formAction && pushAttribute(target, "formAction", formAction);
  892. null != formEncType && pushAttribute(target, "formEncType", formEncType);
  893. null != formMethod && pushAttribute(target, "formMethod", formMethod);
  894. null != formTarget && pushAttribute(target, "formTarget", formTarget);
  895. return formData;
  896. }
  897. function pushAttribute(target, name, value) {
  898. switch (name) {
  899. case "className":
  900. pushStringAttribute(target, "class", value);
  901. break;
  902. case "tabIndex":
  903. pushStringAttribute(target, "tabindex", value);
  904. break;
  905. case "dir":
  906. case "role":
  907. case "viewBox":
  908. case "width":
  909. case "height":
  910. pushStringAttribute(target, name, value);
  911. break;
  912. case "style":
  913. pushStyleAttribute(target, value);
  914. break;
  915. case "src":
  916. case "href":
  917. if ("" === value) break;
  918. case "action":
  919. case "formAction":
  920. if (
  921. null == value ||
  922. "function" === typeof value ||
  923. "symbol" === typeof value ||
  924. "boolean" === typeof value
  925. )
  926. break;
  927. value = sanitizeURL("" + value);
  928. target.push(
  929. attributeSeparator,
  930. stringToChunk(name),
  931. attributeAssign,
  932. stringToChunk(escapeTextForBrowser(value)),
  933. attributeEnd
  934. );
  935. break;
  936. case "defaultValue":
  937. case "defaultChecked":
  938. case "innerHTML":
  939. case "suppressContentEditableWarning":
  940. case "suppressHydrationWarning":
  941. case "ref":
  942. break;
  943. case "autoFocus":
  944. case "multiple":
  945. case "muted":
  946. pushBooleanAttribute(target, name.toLowerCase(), value);
  947. break;
  948. case "xlinkHref":
  949. if (
  950. "function" === typeof value ||
  951. "symbol" === typeof value ||
  952. "boolean" === typeof value
  953. )
  954. break;
  955. value = sanitizeURL("" + value);
  956. target.push(
  957. attributeSeparator,
  958. stringToChunk("xlink:href"),
  959. attributeAssign,
  960. stringToChunk(escapeTextForBrowser(value)),
  961. attributeEnd
  962. );
  963. break;
  964. case "contentEditable":
  965. case "spellCheck":
  966. case "draggable":
  967. case "value":
  968. case "autoReverse":
  969. case "externalResourcesRequired":
  970. case "focusable":
  971. case "preserveAlpha":
  972. "function" !== typeof value &&
  973. "symbol" !== typeof value &&
  974. target.push(
  975. attributeSeparator,
  976. stringToChunk(name),
  977. attributeAssign,
  978. stringToChunk(escapeTextForBrowser(value)),
  979. attributeEnd
  980. );
  981. break;
  982. case "inert":
  983. case "allowFullScreen":
  984. case "async":
  985. case "autoPlay":
  986. case "controls":
  987. case "default":
  988. case "defer":
  989. case "disabled":
  990. case "disablePictureInPicture":
  991. case "disableRemotePlayback":
  992. case "formNoValidate":
  993. case "hidden":
  994. case "loop":
  995. case "noModule":
  996. case "noValidate":
  997. case "open":
  998. case "playsInline":
  999. case "readOnly":
  1000. case "required":
  1001. case "reversed":
  1002. case "scoped":
  1003. case "seamless":
  1004. case "itemScope":
  1005. value &&
  1006. "function" !== typeof value &&
  1007. "symbol" !== typeof value &&
  1008. target.push(
  1009. attributeSeparator,
  1010. stringToChunk(name),
  1011. attributeEmptyString
  1012. );
  1013. break;
  1014. case "capture":
  1015. case "download":
  1016. !0 === value
  1017. ? target.push(
  1018. attributeSeparator,
  1019. stringToChunk(name),
  1020. attributeEmptyString
  1021. )
  1022. : !1 !== value &&
  1023. "function" !== typeof value &&
  1024. "symbol" !== typeof value &&
  1025. target.push(
  1026. attributeSeparator,
  1027. stringToChunk(name),
  1028. attributeAssign,
  1029. stringToChunk(escapeTextForBrowser(value)),
  1030. attributeEnd
  1031. );
  1032. break;
  1033. case "cols":
  1034. case "rows":
  1035. case "size":
  1036. case "span":
  1037. "function" !== typeof value &&
  1038. "symbol" !== typeof value &&
  1039. !isNaN(value) &&
  1040. 1 <= value &&
  1041. target.push(
  1042. attributeSeparator,
  1043. stringToChunk(name),
  1044. attributeAssign,
  1045. stringToChunk(escapeTextForBrowser(value)),
  1046. attributeEnd
  1047. );
  1048. break;
  1049. case "rowSpan":
  1050. case "start":
  1051. "function" === typeof value ||
  1052. "symbol" === typeof value ||
  1053. isNaN(value) ||
  1054. target.push(
  1055. attributeSeparator,
  1056. stringToChunk(name),
  1057. attributeAssign,
  1058. stringToChunk(escapeTextForBrowser(value)),
  1059. attributeEnd
  1060. );
  1061. break;
  1062. case "xlinkActuate":
  1063. pushStringAttribute(target, "xlink:actuate", value);
  1064. break;
  1065. case "xlinkArcrole":
  1066. pushStringAttribute(target, "xlink:arcrole", value);
  1067. break;
  1068. case "xlinkRole":
  1069. pushStringAttribute(target, "xlink:role", value);
  1070. break;
  1071. case "xlinkShow":
  1072. pushStringAttribute(target, "xlink:show", value);
  1073. break;
  1074. case "xlinkTitle":
  1075. pushStringAttribute(target, "xlink:title", value);
  1076. break;
  1077. case "xlinkType":
  1078. pushStringAttribute(target, "xlink:type", value);
  1079. break;
  1080. case "xmlBase":
  1081. pushStringAttribute(target, "xml:base", value);
  1082. break;
  1083. case "xmlLang":
  1084. pushStringAttribute(target, "xml:lang", value);
  1085. break;
  1086. case "xmlSpace":
  1087. pushStringAttribute(target, "xml:space", value);
  1088. break;
  1089. default:
  1090. if (
  1091. !(2 < name.length) ||
  1092. ("o" !== name[0] && "O" !== name[0]) ||
  1093. ("n" !== name[1] && "N" !== name[1])
  1094. )
  1095. if (((name = aliases.get(name) || name), isAttributeNameSafe(name))) {
  1096. switch (typeof value) {
  1097. case "function":
  1098. case "symbol":
  1099. return;
  1100. case "boolean":
  1101. var prefix$8 = name.toLowerCase().slice(0, 5);
  1102. if ("data-" !== prefix$8 && "aria-" !== prefix$8) return;
  1103. }
  1104. target.push(
  1105. attributeSeparator,
  1106. stringToChunk(name),
  1107. attributeAssign,
  1108. stringToChunk(escapeTextForBrowser(value)),
  1109. attributeEnd
  1110. );
  1111. }
  1112. }
  1113. }
  1114. var endOfStartTag = stringToPrecomputedChunk(">"),
  1115. endOfStartTagSelfClosing = stringToPrecomputedChunk("/>");
  1116. function pushInnerHTML(target, innerHTML, children) {
  1117. if (null != innerHTML) {
  1118. if (null != children) throw Error(formatProdErrorMessage(60));
  1119. if ("object" !== typeof innerHTML || !("__html" in innerHTML))
  1120. throw Error(formatProdErrorMessage(61));
  1121. innerHTML = innerHTML.__html;
  1122. null !== innerHTML &&
  1123. void 0 !== innerHTML &&
  1124. target.push(stringToChunk("" + innerHTML));
  1125. }
  1126. }
  1127. function flattenOptionChildren(children) {
  1128. var content = "";
  1129. React.Children.forEach(children, function (child) {
  1130. null != child && (content += child);
  1131. });
  1132. return content;
  1133. }
  1134. var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'),
  1135. formReplayingRuntimeScript = stringToPrecomputedChunk(
  1136. '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))}});'
  1137. );
  1138. function injectFormReplayingRuntime(resumableState, renderState) {
  1139. if (0 === (resumableState.instructions & 16)) {
  1140. resumableState.instructions |= 16;
  1141. var preamble = renderState.preamble,
  1142. bootstrapChunks = renderState.bootstrapChunks;
  1143. (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
  1144. ? (bootstrapChunks.push(renderState.startInlineScript),
  1145. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  1146. bootstrapChunks.push(
  1147. endOfStartTag,
  1148. formReplayingRuntimeScript,
  1149. endInlineScript
  1150. ))
  1151. : bootstrapChunks.unshift(
  1152. renderState.startInlineScript,
  1153. endOfStartTag,
  1154. formReplayingRuntimeScript,
  1155. endInlineScript
  1156. );
  1157. }
  1158. }
  1159. var formStateMarkerIsMatching = stringToPrecomputedChunk("\x3c!--F!--\x3e"),
  1160. formStateMarkerIsNotMatching = stringToPrecomputedChunk("\x3c!--F--\x3e");
  1161. function pushLinkImpl(target, props) {
  1162. target.push(startChunkForTag("link"));
  1163. for (var propKey in props)
  1164. if (hasOwnProperty.call(props, propKey)) {
  1165. var propValue = props[propKey];
  1166. if (null != propValue)
  1167. switch (propKey) {
  1168. case "children":
  1169. case "dangerouslySetInnerHTML":
  1170. throw Error(formatProdErrorMessage(399, "link"));
  1171. default:
  1172. pushAttribute(target, propKey, propValue);
  1173. }
  1174. }
  1175. target.push(endOfStartTagSelfClosing);
  1176. return null;
  1177. }
  1178. var styleRegex = /(<\/|<)(s)(tyle)/gi;
  1179. function styleReplacer(match, prefix, s, suffix) {
  1180. return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix;
  1181. }
  1182. function pushSelfClosing(target, props, tag) {
  1183. target.push(startChunkForTag(tag));
  1184. for (var propKey in props)
  1185. if (hasOwnProperty.call(props, propKey)) {
  1186. var propValue = props[propKey];
  1187. if (null != propValue)
  1188. switch (propKey) {
  1189. case "children":
  1190. case "dangerouslySetInnerHTML":
  1191. throw Error(formatProdErrorMessage(399, tag));
  1192. default:
  1193. pushAttribute(target, propKey, propValue);
  1194. }
  1195. }
  1196. target.push(endOfStartTagSelfClosing);
  1197. return null;
  1198. }
  1199. function pushTitleImpl(target, props) {
  1200. target.push(startChunkForTag("title"));
  1201. var children = null,
  1202. innerHTML = null,
  1203. propKey;
  1204. for (propKey in props)
  1205. if (hasOwnProperty.call(props, propKey)) {
  1206. var propValue = props[propKey];
  1207. if (null != propValue)
  1208. switch (propKey) {
  1209. case "children":
  1210. children = propValue;
  1211. break;
  1212. case "dangerouslySetInnerHTML":
  1213. innerHTML = propValue;
  1214. break;
  1215. default:
  1216. pushAttribute(target, propKey, propValue);
  1217. }
  1218. }
  1219. target.push(endOfStartTag);
  1220. props = Array.isArray(children)
  1221. ? 2 > children.length
  1222. ? children[0]
  1223. : null
  1224. : children;
  1225. "function" !== typeof props &&
  1226. "symbol" !== typeof props &&
  1227. null !== props &&
  1228. void 0 !== props &&
  1229. target.push(stringToChunk(escapeTextForBrowser("" + props)));
  1230. pushInnerHTML(target, innerHTML, children);
  1231. target.push(endChunkForTag("title"));
  1232. return null;
  1233. }
  1234. var headPreambleContributionChunk =
  1235. stringToPrecomputedChunk("\x3c!--head--\x3e"),
  1236. bodyPreambleContributionChunk = stringToPrecomputedChunk("\x3c!--body--\x3e"),
  1237. htmlPreambleContributionChunk = stringToPrecomputedChunk("\x3c!--html--\x3e");
  1238. function pushScriptImpl(target, props) {
  1239. target.push(startChunkForTag("script"));
  1240. var children = null,
  1241. innerHTML = null,
  1242. propKey;
  1243. for (propKey in props)
  1244. if (hasOwnProperty.call(props, propKey)) {
  1245. var propValue = props[propKey];
  1246. if (null != propValue)
  1247. switch (propKey) {
  1248. case "children":
  1249. children = propValue;
  1250. break;
  1251. case "dangerouslySetInnerHTML":
  1252. innerHTML = propValue;
  1253. break;
  1254. default:
  1255. pushAttribute(target, propKey, propValue);
  1256. }
  1257. }
  1258. target.push(endOfStartTag);
  1259. pushInnerHTML(target, innerHTML, children);
  1260. "string" === typeof children &&
  1261. target.push(
  1262. stringToChunk(("" + children).replace(scriptRegex, scriptReplacer))
  1263. );
  1264. target.push(endChunkForTag("script"));
  1265. return null;
  1266. }
  1267. function pushStartSingletonElement(target, props, tag) {
  1268. target.push(startChunkForTag(tag));
  1269. var innerHTML = (tag = null),
  1270. propKey;
  1271. for (propKey in props)
  1272. if (hasOwnProperty.call(props, propKey)) {
  1273. var propValue = props[propKey];
  1274. if (null != propValue)
  1275. switch (propKey) {
  1276. case "children":
  1277. tag = propValue;
  1278. break;
  1279. case "dangerouslySetInnerHTML":
  1280. innerHTML = propValue;
  1281. break;
  1282. default:
  1283. pushAttribute(target, propKey, propValue);
  1284. }
  1285. }
  1286. target.push(endOfStartTag);
  1287. pushInnerHTML(target, innerHTML, tag);
  1288. return tag;
  1289. }
  1290. function pushStartGenericElement(target, props, tag) {
  1291. target.push(startChunkForTag(tag));
  1292. var innerHTML = (tag = null),
  1293. propKey;
  1294. for (propKey in props)
  1295. if (hasOwnProperty.call(props, propKey)) {
  1296. var propValue = props[propKey];
  1297. if (null != propValue)
  1298. switch (propKey) {
  1299. case "children":
  1300. tag = propValue;
  1301. break;
  1302. case "dangerouslySetInnerHTML":
  1303. innerHTML = propValue;
  1304. break;
  1305. default:
  1306. pushAttribute(target, propKey, propValue);
  1307. }
  1308. }
  1309. target.push(endOfStartTag);
  1310. pushInnerHTML(target, innerHTML, tag);
  1311. return "string" === typeof tag
  1312. ? (target.push(stringToChunk(escapeTextForBrowser(tag))), null)
  1313. : tag;
  1314. }
  1315. var leadingNewline = stringToPrecomputedChunk("\n"),
  1316. VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
  1317. validatedTagCache = new Map();
  1318. function startChunkForTag(tag) {
  1319. var tagStartChunk = validatedTagCache.get(tag);
  1320. if (void 0 === tagStartChunk) {
  1321. if (!VALID_TAG_REGEX.test(tag))
  1322. throw Error(formatProdErrorMessage(65, tag));
  1323. tagStartChunk = stringToPrecomputedChunk("<" + tag);
  1324. validatedTagCache.set(tag, tagStartChunk);
  1325. }
  1326. return tagStartChunk;
  1327. }
  1328. var doctypeChunk = stringToPrecomputedChunk("<!DOCTYPE html>");
  1329. function pushStartInstance(
  1330. target$jscomp$0,
  1331. type,
  1332. props,
  1333. resumableState,
  1334. renderState,
  1335. preambleState,
  1336. hoistableState,
  1337. formatContext,
  1338. textEmbedded
  1339. ) {
  1340. switch (type) {
  1341. case "div":
  1342. case "span":
  1343. case "svg":
  1344. case "path":
  1345. break;
  1346. case "a":
  1347. target$jscomp$0.push(startChunkForTag("a"));
  1348. var children = null,
  1349. innerHTML = null,
  1350. propKey;
  1351. for (propKey in props)
  1352. if (hasOwnProperty.call(props, propKey)) {
  1353. var propValue = props[propKey];
  1354. if (null != propValue)
  1355. switch (propKey) {
  1356. case "children":
  1357. children = propValue;
  1358. break;
  1359. case "dangerouslySetInnerHTML":
  1360. innerHTML = propValue;
  1361. break;
  1362. case "href":
  1363. "" === propValue
  1364. ? pushStringAttribute(target$jscomp$0, "href", "")
  1365. : pushAttribute(target$jscomp$0, propKey, propValue);
  1366. break;
  1367. default:
  1368. pushAttribute(target$jscomp$0, propKey, propValue);
  1369. }
  1370. }
  1371. target$jscomp$0.push(endOfStartTag);
  1372. pushInnerHTML(target$jscomp$0, innerHTML, children);
  1373. if ("string" === typeof children) {
  1374. target$jscomp$0.push(stringToChunk(escapeTextForBrowser(children)));
  1375. var JSCompiler_inline_result = null;
  1376. } else JSCompiler_inline_result = children;
  1377. return JSCompiler_inline_result;
  1378. case "g":
  1379. case "p":
  1380. case "li":
  1381. break;
  1382. case "select":
  1383. target$jscomp$0.push(startChunkForTag("select"));
  1384. var children$jscomp$0 = null,
  1385. innerHTML$jscomp$0 = null,
  1386. propKey$jscomp$0;
  1387. for (propKey$jscomp$0 in props)
  1388. if (hasOwnProperty.call(props, propKey$jscomp$0)) {
  1389. var propValue$jscomp$0 = props[propKey$jscomp$0];
  1390. if (null != propValue$jscomp$0)
  1391. switch (propKey$jscomp$0) {
  1392. case "children":
  1393. children$jscomp$0 = propValue$jscomp$0;
  1394. break;
  1395. case "dangerouslySetInnerHTML":
  1396. innerHTML$jscomp$0 = propValue$jscomp$0;
  1397. break;
  1398. case "defaultValue":
  1399. case "value":
  1400. break;
  1401. default:
  1402. pushAttribute(
  1403. target$jscomp$0,
  1404. propKey$jscomp$0,
  1405. propValue$jscomp$0
  1406. );
  1407. }
  1408. }
  1409. target$jscomp$0.push(endOfStartTag);
  1410. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
  1411. return children$jscomp$0;
  1412. case "option":
  1413. var selectedValue = formatContext.selectedValue;
  1414. target$jscomp$0.push(startChunkForTag("option"));
  1415. var children$jscomp$1 = null,
  1416. value = null,
  1417. selected = null,
  1418. innerHTML$jscomp$1 = null,
  1419. propKey$jscomp$1;
  1420. for (propKey$jscomp$1 in props)
  1421. if (hasOwnProperty.call(props, propKey$jscomp$1)) {
  1422. var propValue$jscomp$1 = props[propKey$jscomp$1];
  1423. if (null != propValue$jscomp$1)
  1424. switch (propKey$jscomp$1) {
  1425. case "children":
  1426. children$jscomp$1 = propValue$jscomp$1;
  1427. break;
  1428. case "selected":
  1429. selected = propValue$jscomp$1;
  1430. break;
  1431. case "dangerouslySetInnerHTML":
  1432. innerHTML$jscomp$1 = propValue$jscomp$1;
  1433. break;
  1434. case "value":
  1435. value = propValue$jscomp$1;
  1436. default:
  1437. pushAttribute(
  1438. target$jscomp$0,
  1439. propKey$jscomp$1,
  1440. propValue$jscomp$1
  1441. );
  1442. }
  1443. }
  1444. if (null != selectedValue) {
  1445. var stringValue =
  1446. null !== value
  1447. ? "" + value
  1448. : flattenOptionChildren(children$jscomp$1);
  1449. if (isArrayImpl(selectedValue))
  1450. for (var i = 0; i < selectedValue.length; i++) {
  1451. if ("" + selectedValue[i] === stringValue) {
  1452. target$jscomp$0.push(selectedMarkerAttribute);
  1453. break;
  1454. }
  1455. }
  1456. else
  1457. "" + selectedValue === stringValue &&
  1458. target$jscomp$0.push(selectedMarkerAttribute);
  1459. } else selected && target$jscomp$0.push(selectedMarkerAttribute);
  1460. target$jscomp$0.push(endOfStartTag);
  1461. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);
  1462. return children$jscomp$1;
  1463. case "textarea":
  1464. target$jscomp$0.push(startChunkForTag("textarea"));
  1465. var value$jscomp$0 = null,
  1466. defaultValue = null,
  1467. children$jscomp$2 = null,
  1468. propKey$jscomp$2;
  1469. for (propKey$jscomp$2 in props)
  1470. if (hasOwnProperty.call(props, propKey$jscomp$2)) {
  1471. var propValue$jscomp$2 = props[propKey$jscomp$2];
  1472. if (null != propValue$jscomp$2)
  1473. switch (propKey$jscomp$2) {
  1474. case "children":
  1475. children$jscomp$2 = propValue$jscomp$2;
  1476. break;
  1477. case "value":
  1478. value$jscomp$0 = propValue$jscomp$2;
  1479. break;
  1480. case "defaultValue":
  1481. defaultValue = propValue$jscomp$2;
  1482. break;
  1483. case "dangerouslySetInnerHTML":
  1484. throw Error(formatProdErrorMessage(91));
  1485. default:
  1486. pushAttribute(
  1487. target$jscomp$0,
  1488. propKey$jscomp$2,
  1489. propValue$jscomp$2
  1490. );
  1491. }
  1492. }
  1493. null === value$jscomp$0 &&
  1494. null !== defaultValue &&
  1495. (value$jscomp$0 = defaultValue);
  1496. target$jscomp$0.push(endOfStartTag);
  1497. if (null != children$jscomp$2) {
  1498. if (null != value$jscomp$0) throw Error(formatProdErrorMessage(92));
  1499. if (isArrayImpl(children$jscomp$2)) {
  1500. if (1 < children$jscomp$2.length)
  1501. throw Error(formatProdErrorMessage(93));
  1502. value$jscomp$0 = "" + children$jscomp$2[0];
  1503. }
  1504. value$jscomp$0 = "" + children$jscomp$2;
  1505. }
  1506. "string" === typeof value$jscomp$0 &&
  1507. "\n" === value$jscomp$0[0] &&
  1508. target$jscomp$0.push(leadingNewline);
  1509. null !== value$jscomp$0 &&
  1510. target$jscomp$0.push(
  1511. stringToChunk(escapeTextForBrowser("" + value$jscomp$0))
  1512. );
  1513. return null;
  1514. case "input":
  1515. target$jscomp$0.push(startChunkForTag("input"));
  1516. var name = null,
  1517. formAction = null,
  1518. formEncType = null,
  1519. formMethod = null,
  1520. formTarget = null,
  1521. value$jscomp$1 = null,
  1522. defaultValue$jscomp$0 = null,
  1523. checked = null,
  1524. defaultChecked = null,
  1525. propKey$jscomp$3;
  1526. for (propKey$jscomp$3 in props)
  1527. if (hasOwnProperty.call(props, propKey$jscomp$3)) {
  1528. var propValue$jscomp$3 = props[propKey$jscomp$3];
  1529. if (null != propValue$jscomp$3)
  1530. switch (propKey$jscomp$3) {
  1531. case "children":
  1532. case "dangerouslySetInnerHTML":
  1533. throw Error(formatProdErrorMessage(399, "input"));
  1534. case "name":
  1535. name = propValue$jscomp$3;
  1536. break;
  1537. case "formAction":
  1538. formAction = propValue$jscomp$3;
  1539. break;
  1540. case "formEncType":
  1541. formEncType = propValue$jscomp$3;
  1542. break;
  1543. case "formMethod":
  1544. formMethod = propValue$jscomp$3;
  1545. break;
  1546. case "formTarget":
  1547. formTarget = propValue$jscomp$3;
  1548. break;
  1549. case "defaultChecked":
  1550. defaultChecked = propValue$jscomp$3;
  1551. break;
  1552. case "defaultValue":
  1553. defaultValue$jscomp$0 = propValue$jscomp$3;
  1554. break;
  1555. case "checked":
  1556. checked = propValue$jscomp$3;
  1557. break;
  1558. case "value":
  1559. value$jscomp$1 = propValue$jscomp$3;
  1560. break;
  1561. default:
  1562. pushAttribute(
  1563. target$jscomp$0,
  1564. propKey$jscomp$3,
  1565. propValue$jscomp$3
  1566. );
  1567. }
  1568. }
  1569. var formData = pushFormActionAttribute(
  1570. target$jscomp$0,
  1571. resumableState,
  1572. renderState,
  1573. formAction,
  1574. formEncType,
  1575. formMethod,
  1576. formTarget,
  1577. name
  1578. );
  1579. null !== checked
  1580. ? pushBooleanAttribute(target$jscomp$0, "checked", checked)
  1581. : null !== defaultChecked &&
  1582. pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked);
  1583. null !== value$jscomp$1
  1584. ? pushAttribute(target$jscomp$0, "value", value$jscomp$1)
  1585. : null !== defaultValue$jscomp$0 &&
  1586. pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
  1587. target$jscomp$0.push(endOfStartTagSelfClosing);
  1588. null != formData &&
  1589. formData.forEach(pushAdditionalFormField, target$jscomp$0);
  1590. return null;
  1591. case "button":
  1592. target$jscomp$0.push(startChunkForTag("button"));
  1593. var children$jscomp$3 = null,
  1594. innerHTML$jscomp$2 = null,
  1595. name$jscomp$0 = null,
  1596. formAction$jscomp$0 = null,
  1597. formEncType$jscomp$0 = null,
  1598. formMethod$jscomp$0 = null,
  1599. formTarget$jscomp$0 = null,
  1600. propKey$jscomp$4;
  1601. for (propKey$jscomp$4 in props)
  1602. if (hasOwnProperty.call(props, propKey$jscomp$4)) {
  1603. var propValue$jscomp$4 = props[propKey$jscomp$4];
  1604. if (null != propValue$jscomp$4)
  1605. switch (propKey$jscomp$4) {
  1606. case "children":
  1607. children$jscomp$3 = propValue$jscomp$4;
  1608. break;
  1609. case "dangerouslySetInnerHTML":
  1610. innerHTML$jscomp$2 = propValue$jscomp$4;
  1611. break;
  1612. case "name":
  1613. name$jscomp$0 = propValue$jscomp$4;
  1614. break;
  1615. case "formAction":
  1616. formAction$jscomp$0 = propValue$jscomp$4;
  1617. break;
  1618. case "formEncType":
  1619. formEncType$jscomp$0 = propValue$jscomp$4;
  1620. break;
  1621. case "formMethod":
  1622. formMethod$jscomp$0 = propValue$jscomp$4;
  1623. break;
  1624. case "formTarget":
  1625. formTarget$jscomp$0 = propValue$jscomp$4;
  1626. break;
  1627. default:
  1628. pushAttribute(
  1629. target$jscomp$0,
  1630. propKey$jscomp$4,
  1631. propValue$jscomp$4
  1632. );
  1633. }
  1634. }
  1635. var formData$jscomp$0 = pushFormActionAttribute(
  1636. target$jscomp$0,
  1637. resumableState,
  1638. renderState,
  1639. formAction$jscomp$0,
  1640. formEncType$jscomp$0,
  1641. formMethod$jscomp$0,
  1642. formTarget$jscomp$0,
  1643. name$jscomp$0
  1644. );
  1645. target$jscomp$0.push(endOfStartTag);
  1646. null != formData$jscomp$0 &&
  1647. formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
  1648. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);
  1649. if ("string" === typeof children$jscomp$3) {
  1650. target$jscomp$0.push(
  1651. stringToChunk(escapeTextForBrowser(children$jscomp$3))
  1652. );
  1653. var JSCompiler_inline_result$jscomp$0 = null;
  1654. } else JSCompiler_inline_result$jscomp$0 = children$jscomp$3;
  1655. return JSCompiler_inline_result$jscomp$0;
  1656. case "form":
  1657. target$jscomp$0.push(startChunkForTag("form"));
  1658. var children$jscomp$4 = null,
  1659. innerHTML$jscomp$3 = null,
  1660. formAction$jscomp$1 = null,
  1661. formEncType$jscomp$1 = null,
  1662. formMethod$jscomp$1 = null,
  1663. formTarget$jscomp$1 = null,
  1664. propKey$jscomp$5;
  1665. for (propKey$jscomp$5 in props)
  1666. if (hasOwnProperty.call(props, propKey$jscomp$5)) {
  1667. var propValue$jscomp$5 = props[propKey$jscomp$5];
  1668. if (null != propValue$jscomp$5)
  1669. switch (propKey$jscomp$5) {
  1670. case "children":
  1671. children$jscomp$4 = propValue$jscomp$5;
  1672. break;
  1673. case "dangerouslySetInnerHTML":
  1674. innerHTML$jscomp$3 = propValue$jscomp$5;
  1675. break;
  1676. case "action":
  1677. formAction$jscomp$1 = propValue$jscomp$5;
  1678. break;
  1679. case "encType":
  1680. formEncType$jscomp$1 = propValue$jscomp$5;
  1681. break;
  1682. case "method":
  1683. formMethod$jscomp$1 = propValue$jscomp$5;
  1684. break;
  1685. case "target":
  1686. formTarget$jscomp$1 = propValue$jscomp$5;
  1687. break;
  1688. default:
  1689. pushAttribute(
  1690. target$jscomp$0,
  1691. propKey$jscomp$5,
  1692. propValue$jscomp$5
  1693. );
  1694. }
  1695. }
  1696. var formData$jscomp$1 = null,
  1697. formActionName = null;
  1698. if ("function" === typeof formAction$jscomp$1) {
  1699. var customFields = getCustomFormFields(
  1700. resumableState,
  1701. formAction$jscomp$1
  1702. );
  1703. null !== customFields
  1704. ? ((formAction$jscomp$1 = customFields.action || ""),
  1705. (formEncType$jscomp$1 = customFields.encType),
  1706. (formMethod$jscomp$1 = customFields.method),
  1707. (formTarget$jscomp$1 = customFields.target),
  1708. (formData$jscomp$1 = customFields.data),
  1709. (formActionName = customFields.name))
  1710. : (target$jscomp$0.push(
  1711. attributeSeparator,
  1712. stringToChunk("action"),
  1713. attributeAssign,
  1714. actionJavaScriptURL,
  1715. attributeEnd
  1716. ),
  1717. (formTarget$jscomp$1 =
  1718. formMethod$jscomp$1 =
  1719. formEncType$jscomp$1 =
  1720. formAction$jscomp$1 =
  1721. null),
  1722. injectFormReplayingRuntime(resumableState, renderState));
  1723. }
  1724. null != formAction$jscomp$1 &&
  1725. pushAttribute(target$jscomp$0, "action", formAction$jscomp$1);
  1726. null != formEncType$jscomp$1 &&
  1727. pushAttribute(target$jscomp$0, "encType", formEncType$jscomp$1);
  1728. null != formMethod$jscomp$1 &&
  1729. pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
  1730. null != formTarget$jscomp$1 &&
  1731. pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
  1732. target$jscomp$0.push(endOfStartTag);
  1733. null !== formActionName &&
  1734. (target$jscomp$0.push(startHiddenInputChunk),
  1735. pushStringAttribute(target$jscomp$0, "name", formActionName),
  1736. target$jscomp$0.push(endOfStartTagSelfClosing),
  1737. null != formData$jscomp$1 &&
  1738. formData$jscomp$1.forEach(pushAdditionalFormField, target$jscomp$0));
  1739. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);
  1740. if ("string" === typeof children$jscomp$4) {
  1741. target$jscomp$0.push(
  1742. stringToChunk(escapeTextForBrowser(children$jscomp$4))
  1743. );
  1744. var JSCompiler_inline_result$jscomp$1 = null;
  1745. } else JSCompiler_inline_result$jscomp$1 = children$jscomp$4;
  1746. return JSCompiler_inline_result$jscomp$1;
  1747. case "menuitem":
  1748. target$jscomp$0.push(startChunkForTag("menuitem"));
  1749. for (var propKey$jscomp$6 in props)
  1750. if (hasOwnProperty.call(props, propKey$jscomp$6)) {
  1751. var propValue$jscomp$6 = props[propKey$jscomp$6];
  1752. if (null != propValue$jscomp$6)
  1753. switch (propKey$jscomp$6) {
  1754. case "children":
  1755. case "dangerouslySetInnerHTML":
  1756. throw Error(formatProdErrorMessage(400));
  1757. default:
  1758. pushAttribute(
  1759. target$jscomp$0,
  1760. propKey$jscomp$6,
  1761. propValue$jscomp$6
  1762. );
  1763. }
  1764. }
  1765. target$jscomp$0.push(endOfStartTag);
  1766. return null;
  1767. case "object":
  1768. target$jscomp$0.push(startChunkForTag("object"));
  1769. var children$jscomp$5 = null,
  1770. innerHTML$jscomp$4 = null,
  1771. propKey$jscomp$7;
  1772. for (propKey$jscomp$7 in props)
  1773. if (hasOwnProperty.call(props, propKey$jscomp$7)) {
  1774. var propValue$jscomp$7 = props[propKey$jscomp$7];
  1775. if (null != propValue$jscomp$7)
  1776. switch (propKey$jscomp$7) {
  1777. case "children":
  1778. children$jscomp$5 = propValue$jscomp$7;
  1779. break;
  1780. case "dangerouslySetInnerHTML":
  1781. innerHTML$jscomp$4 = propValue$jscomp$7;
  1782. break;
  1783. case "data":
  1784. var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
  1785. if ("" === sanitizedValue) break;
  1786. target$jscomp$0.push(
  1787. attributeSeparator,
  1788. stringToChunk("data"),
  1789. attributeAssign,
  1790. stringToChunk(escapeTextForBrowser(sanitizedValue)),
  1791. attributeEnd
  1792. );
  1793. break;
  1794. default:
  1795. pushAttribute(
  1796. target$jscomp$0,
  1797. propKey$jscomp$7,
  1798. propValue$jscomp$7
  1799. );
  1800. }
  1801. }
  1802. target$jscomp$0.push(endOfStartTag);
  1803. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
  1804. if ("string" === typeof children$jscomp$5) {
  1805. target$jscomp$0.push(
  1806. stringToChunk(escapeTextForBrowser(children$jscomp$5))
  1807. );
  1808. var JSCompiler_inline_result$jscomp$2 = null;
  1809. } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
  1810. return JSCompiler_inline_result$jscomp$2;
  1811. case "title":
  1812. var noscriptTagInScope = formatContext.tagScope & 1,
  1813. isFallback = formatContext.tagScope & 4;
  1814. if (
  1815. 4 === formatContext.insertionMode ||
  1816. noscriptTagInScope ||
  1817. null != props.itemProp
  1818. )
  1819. var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
  1820. target$jscomp$0,
  1821. props
  1822. );
  1823. else
  1824. isFallback
  1825. ? (JSCompiler_inline_result$jscomp$3 = null)
  1826. : (pushTitleImpl(renderState.hoistableChunks, props),
  1827. (JSCompiler_inline_result$jscomp$3 = void 0));
  1828. return JSCompiler_inline_result$jscomp$3;
  1829. case "link":
  1830. var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,
  1831. isFallback$jscomp$0 = formatContext.tagScope & 4,
  1832. rel = props.rel,
  1833. href = props.href,
  1834. precedence = props.precedence;
  1835. if (
  1836. 4 === formatContext.insertionMode ||
  1837. noscriptTagInScope$jscomp$0 ||
  1838. null != props.itemProp ||
  1839. "string" !== typeof rel ||
  1840. "string" !== typeof href ||
  1841. "" === href
  1842. ) {
  1843. pushLinkImpl(target$jscomp$0, props);
  1844. var JSCompiler_inline_result$jscomp$4 = null;
  1845. } else if ("stylesheet" === props.rel)
  1846. if (
  1847. "string" !== typeof precedence ||
  1848. null != props.disabled ||
  1849. props.onLoad ||
  1850. props.onError
  1851. )
  1852. JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
  1853. target$jscomp$0,
  1854. props
  1855. );
  1856. else {
  1857. var styleQueue = renderState.styles.get(precedence),
  1858. resourceState = resumableState.styleResources.hasOwnProperty(href)
  1859. ? resumableState.styleResources[href]
  1860. : void 0;
  1861. if (null !== resourceState) {
  1862. resumableState.styleResources[href] = null;
  1863. styleQueue ||
  1864. ((styleQueue = {
  1865. precedence: stringToChunk(escapeTextForBrowser(precedence)),
  1866. rules: [],
  1867. hrefs: [],
  1868. sheets: new Map()
  1869. }),
  1870. renderState.styles.set(precedence, styleQueue));
  1871. var resource = {
  1872. state: 0,
  1873. props: assign({}, props, {
  1874. "data-precedence": props.precedence,
  1875. precedence: null
  1876. })
  1877. };
  1878. if (resourceState) {
  1879. 2 === resourceState.length &&
  1880. adoptPreloadCredentials(resource.props, resourceState);
  1881. var preloadResource = renderState.preloads.stylesheets.get(href);
  1882. preloadResource && 0 < preloadResource.length
  1883. ? (preloadResource.length = 0)
  1884. : (resource.state = 1);
  1885. }
  1886. styleQueue.sheets.set(href, resource);
  1887. hoistableState && hoistableState.stylesheets.add(resource);
  1888. } else if (styleQueue) {
  1889. var resource$9 = styleQueue.sheets.get(href);
  1890. resource$9 &&
  1891. hoistableState &&
  1892. hoistableState.stylesheets.add(resource$9);
  1893. }
  1894. textEmbedded && target$jscomp$0.push(textSeparator);
  1895. JSCompiler_inline_result$jscomp$4 = null;
  1896. }
  1897. else
  1898. props.onLoad || props.onError
  1899. ? (JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
  1900. target$jscomp$0,
  1901. props
  1902. ))
  1903. : (textEmbedded && target$jscomp$0.push(textSeparator),
  1904. (JSCompiler_inline_result$jscomp$4 = isFallback$jscomp$0
  1905. ? null
  1906. : pushLinkImpl(renderState.hoistableChunks, props)));
  1907. return JSCompiler_inline_result$jscomp$4;
  1908. case "script":
  1909. var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,
  1910. asyncProp = props.async;
  1911. if (
  1912. "string" !== typeof props.src ||
  1913. !props.src ||
  1914. !asyncProp ||
  1915. "function" === typeof asyncProp ||
  1916. "symbol" === typeof asyncProp ||
  1917. props.onLoad ||
  1918. props.onError ||
  1919. 4 === formatContext.insertionMode ||
  1920. noscriptTagInScope$jscomp$1 ||
  1921. null != props.itemProp
  1922. )
  1923. var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
  1924. target$jscomp$0,
  1925. props
  1926. );
  1927. else {
  1928. var key = props.src;
  1929. if ("module" === props.type) {
  1930. var resources = resumableState.moduleScriptResources;
  1931. var preloads = renderState.preloads.moduleScripts;
  1932. } else
  1933. (resources = resumableState.scriptResources),
  1934. (preloads = renderState.preloads.scripts);
  1935. var resourceState$jscomp$0 = resources.hasOwnProperty(key)
  1936. ? resources[key]
  1937. : void 0;
  1938. if (null !== resourceState$jscomp$0) {
  1939. resources[key] = null;
  1940. var scriptProps = props;
  1941. if (resourceState$jscomp$0) {
  1942. 2 === resourceState$jscomp$0.length &&
  1943. ((scriptProps = assign({}, props)),
  1944. adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));
  1945. var preloadResource$jscomp$0 = preloads.get(key);
  1946. preloadResource$jscomp$0 && (preloadResource$jscomp$0.length = 0);
  1947. }
  1948. var resource$jscomp$0 = [];
  1949. renderState.scripts.add(resource$jscomp$0);
  1950. pushScriptImpl(resource$jscomp$0, scriptProps);
  1951. }
  1952. textEmbedded && target$jscomp$0.push(textSeparator);
  1953. JSCompiler_inline_result$jscomp$5 = null;
  1954. }
  1955. return JSCompiler_inline_result$jscomp$5;
  1956. case "style":
  1957. var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1,
  1958. precedence$jscomp$0 = props.precedence,
  1959. href$jscomp$0 = props.href,
  1960. nonce = props.nonce;
  1961. if (
  1962. 4 === formatContext.insertionMode ||
  1963. noscriptTagInScope$jscomp$2 ||
  1964. null != props.itemProp ||
  1965. "string" !== typeof precedence$jscomp$0 ||
  1966. "string" !== typeof href$jscomp$0 ||
  1967. "" === href$jscomp$0
  1968. ) {
  1969. target$jscomp$0.push(startChunkForTag("style"));
  1970. var children$jscomp$6 = null,
  1971. innerHTML$jscomp$5 = null,
  1972. propKey$jscomp$8;
  1973. for (propKey$jscomp$8 in props)
  1974. if (hasOwnProperty.call(props, propKey$jscomp$8)) {
  1975. var propValue$jscomp$8 = props[propKey$jscomp$8];
  1976. if (null != propValue$jscomp$8)
  1977. switch (propKey$jscomp$8) {
  1978. case "children":
  1979. children$jscomp$6 = propValue$jscomp$8;
  1980. break;
  1981. case "dangerouslySetInnerHTML":
  1982. innerHTML$jscomp$5 = propValue$jscomp$8;
  1983. break;
  1984. default:
  1985. pushAttribute(
  1986. target$jscomp$0,
  1987. propKey$jscomp$8,
  1988. propValue$jscomp$8
  1989. );
  1990. }
  1991. }
  1992. target$jscomp$0.push(endOfStartTag);
  1993. var child = Array.isArray(children$jscomp$6)
  1994. ? 2 > children$jscomp$6.length
  1995. ? children$jscomp$6[0]
  1996. : null
  1997. : children$jscomp$6;
  1998. "function" !== typeof child &&
  1999. "symbol" !== typeof child &&
  2000. null !== child &&
  2001. void 0 !== child &&
  2002. target$jscomp$0.push(
  2003. stringToChunk(("" + child).replace(styleRegex, styleReplacer))
  2004. );
  2005. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$6);
  2006. target$jscomp$0.push(endChunkForTag("style"));
  2007. var JSCompiler_inline_result$jscomp$6 = null;
  2008. } else {
  2009. var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
  2010. if (
  2011. null !==
  2012. (resumableState.styleResources.hasOwnProperty(href$jscomp$0)
  2013. ? resumableState.styleResources[href$jscomp$0]
  2014. : void 0)
  2015. ) {
  2016. resumableState.styleResources[href$jscomp$0] = null;
  2017. styleQueue$jscomp$0 ||
  2018. ((styleQueue$jscomp$0 = {
  2019. precedence: stringToChunk(
  2020. escapeTextForBrowser(precedence$jscomp$0)
  2021. ),
  2022. rules: [],
  2023. hrefs: [],
  2024. sheets: new Map()
  2025. }),
  2026. renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
  2027. var nonceStyle = renderState.nonce.style;
  2028. if (!nonceStyle || nonceStyle === nonce) {
  2029. styleQueue$jscomp$0.hrefs.push(
  2030. stringToChunk(escapeTextForBrowser(href$jscomp$0))
  2031. );
  2032. var target = styleQueue$jscomp$0.rules,
  2033. children$jscomp$7 = null,
  2034. innerHTML$jscomp$6 = null,
  2035. propKey$jscomp$9;
  2036. for (propKey$jscomp$9 in props)
  2037. if (hasOwnProperty.call(props, propKey$jscomp$9)) {
  2038. var propValue$jscomp$9 = props[propKey$jscomp$9];
  2039. if (null != propValue$jscomp$9)
  2040. switch (propKey$jscomp$9) {
  2041. case "children":
  2042. children$jscomp$7 = propValue$jscomp$9;
  2043. break;
  2044. case "dangerouslySetInnerHTML":
  2045. innerHTML$jscomp$6 = propValue$jscomp$9;
  2046. }
  2047. }
  2048. var child$jscomp$0 = Array.isArray(children$jscomp$7)
  2049. ? 2 > children$jscomp$7.length
  2050. ? children$jscomp$7[0]
  2051. : null
  2052. : children$jscomp$7;
  2053. "function" !== typeof child$jscomp$0 &&
  2054. "symbol" !== typeof child$jscomp$0 &&
  2055. null !== child$jscomp$0 &&
  2056. void 0 !== child$jscomp$0 &&
  2057. target.push(
  2058. stringToChunk(
  2059. ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
  2060. )
  2061. );
  2062. pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$7);
  2063. }
  2064. }
  2065. styleQueue$jscomp$0 &&
  2066. hoistableState &&
  2067. hoistableState.styles.add(styleQueue$jscomp$0);
  2068. textEmbedded && target$jscomp$0.push(textSeparator);
  2069. JSCompiler_inline_result$jscomp$6 = void 0;
  2070. }
  2071. return JSCompiler_inline_result$jscomp$6;
  2072. case "meta":
  2073. var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,
  2074. isFallback$jscomp$1 = formatContext.tagScope & 4;
  2075. if (
  2076. 4 === formatContext.insertionMode ||
  2077. noscriptTagInScope$jscomp$3 ||
  2078. null != props.itemProp
  2079. )
  2080. var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
  2081. target$jscomp$0,
  2082. props,
  2083. "meta"
  2084. );
  2085. else
  2086. textEmbedded && target$jscomp$0.push(textSeparator),
  2087. (JSCompiler_inline_result$jscomp$7 = isFallback$jscomp$1
  2088. ? null
  2089. : "string" === typeof props.charSet
  2090. ? pushSelfClosing(renderState.charsetChunks, props, "meta")
  2091. : "viewport" === props.name
  2092. ? pushSelfClosing(renderState.viewportChunks, props, "meta")
  2093. : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
  2094. return JSCompiler_inline_result$jscomp$7;
  2095. case "listing":
  2096. case "pre":
  2097. target$jscomp$0.push(startChunkForTag(type));
  2098. var children$jscomp$8 = null,
  2099. innerHTML$jscomp$7 = null,
  2100. propKey$jscomp$10;
  2101. for (propKey$jscomp$10 in props)
  2102. if (hasOwnProperty.call(props, propKey$jscomp$10)) {
  2103. var propValue$jscomp$10 = props[propKey$jscomp$10];
  2104. if (null != propValue$jscomp$10)
  2105. switch (propKey$jscomp$10) {
  2106. case "children":
  2107. children$jscomp$8 = propValue$jscomp$10;
  2108. break;
  2109. case "dangerouslySetInnerHTML":
  2110. innerHTML$jscomp$7 = propValue$jscomp$10;
  2111. break;
  2112. default:
  2113. pushAttribute(
  2114. target$jscomp$0,
  2115. propKey$jscomp$10,
  2116. propValue$jscomp$10
  2117. );
  2118. }
  2119. }
  2120. target$jscomp$0.push(endOfStartTag);
  2121. if (null != innerHTML$jscomp$7) {
  2122. if (null != children$jscomp$8) throw Error(formatProdErrorMessage(60));
  2123. if (
  2124. "object" !== typeof innerHTML$jscomp$7 ||
  2125. !("__html" in innerHTML$jscomp$7)
  2126. )
  2127. throw Error(formatProdErrorMessage(61));
  2128. var html = innerHTML$jscomp$7.__html;
  2129. null !== html &&
  2130. void 0 !== html &&
  2131. ("string" === typeof html && 0 < html.length && "\n" === html[0]
  2132. ? target$jscomp$0.push(leadingNewline, stringToChunk(html))
  2133. : target$jscomp$0.push(stringToChunk("" + html)));
  2134. }
  2135. "string" === typeof children$jscomp$8 &&
  2136. "\n" === children$jscomp$8[0] &&
  2137. target$jscomp$0.push(leadingNewline);
  2138. return children$jscomp$8;
  2139. case "img":
  2140. var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,
  2141. src = props.src,
  2142. srcSet = props.srcSet;
  2143. if (
  2144. !(
  2145. "lazy" === props.loading ||
  2146. (!src && !srcSet) ||
  2147. ("string" !== typeof src && null != src) ||
  2148. ("string" !== typeof srcSet && null != srcSet) ||
  2149. "low" === props.fetchPriority ||
  2150. pictureOrNoScriptTagInScope
  2151. ) &&
  2152. ("string" !== typeof src ||
  2153. ":" !== src[4] ||
  2154. ("d" !== src[0] && "D" !== src[0]) ||
  2155. ("a" !== src[1] && "A" !== src[1]) ||
  2156. ("t" !== src[2] && "T" !== src[2]) ||
  2157. ("a" !== src[3] && "A" !== src[3])) &&
  2158. ("string" !== typeof srcSet ||
  2159. ":" !== srcSet[4] ||
  2160. ("d" !== srcSet[0] && "D" !== srcSet[0]) ||
  2161. ("a" !== srcSet[1] && "A" !== srcSet[1]) ||
  2162. ("t" !== srcSet[2] && "T" !== srcSet[2]) ||
  2163. ("a" !== srcSet[3] && "A" !== srcSet[3]))
  2164. ) {
  2165. null !== hoistableState &&
  2166. formatContext.tagScope & 64 &&
  2167. (hoistableState.suspenseyImages = !0);
  2168. var sizes = "string" === typeof props.sizes ? props.sizes : void 0,
  2169. key$jscomp$0 = srcSet ? srcSet + "\n" + (sizes || "") : src,
  2170. promotablePreloads = renderState.preloads.images,
  2171. resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);
  2172. if (resource$jscomp$1) {
  2173. if (
  2174. "high" === props.fetchPriority ||
  2175. 10 > renderState.highImagePreloads.size
  2176. )
  2177. promotablePreloads.delete(key$jscomp$0),
  2178. renderState.highImagePreloads.add(resource$jscomp$1);
  2179. } else if (
  2180. !resumableState.imageResources.hasOwnProperty(key$jscomp$0)
  2181. ) {
  2182. resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
  2183. var input = props.crossOrigin;
  2184. var JSCompiler_inline_result$jscomp$8 =
  2185. "string" === typeof input
  2186. ? "use-credentials" === input
  2187. ? input
  2188. : ""
  2189. : void 0;
  2190. var headers = renderState.headers,
  2191. header;
  2192. headers &&
  2193. 0 < headers.remainingCapacity &&
  2194. "string" !== typeof props.srcSet &&
  2195. ("high" === props.fetchPriority ||
  2196. 500 > headers.highImagePreloads.length) &&
  2197. ((header = getPreloadAsHeader(src, "image", {
  2198. imageSrcSet: props.srcSet,
  2199. imageSizes: props.sizes,
  2200. crossOrigin: JSCompiler_inline_result$jscomp$8,
  2201. integrity: props.integrity,
  2202. nonce: props.nonce,
  2203. type: props.type,
  2204. fetchPriority: props.fetchPriority,
  2205. referrerPolicy: props.refererPolicy
  2206. })),
  2207. 0 <= (headers.remainingCapacity -= header.length + 2))
  2208. ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
  2209. headers.highImagePreloads && (headers.highImagePreloads += ", "),
  2210. (headers.highImagePreloads += header))
  2211. : ((resource$jscomp$1 = []),
  2212. pushLinkImpl(resource$jscomp$1, {
  2213. rel: "preload",
  2214. as: "image",
  2215. href: srcSet ? void 0 : src,
  2216. imageSrcSet: srcSet,
  2217. imageSizes: sizes,
  2218. crossOrigin: JSCompiler_inline_result$jscomp$8,
  2219. integrity: props.integrity,
  2220. type: props.type,
  2221. fetchPriority: props.fetchPriority,
  2222. referrerPolicy: props.referrerPolicy
  2223. }),
  2224. "high" === props.fetchPriority ||
  2225. 10 > renderState.highImagePreloads.size
  2226. ? renderState.highImagePreloads.add(resource$jscomp$1)
  2227. : (renderState.bulkPreloads.add(resource$jscomp$1),
  2228. promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
  2229. }
  2230. }
  2231. return pushSelfClosing(target$jscomp$0, props, "img");
  2232. case "base":
  2233. case "area":
  2234. case "br":
  2235. case "col":
  2236. case "embed":
  2237. case "hr":
  2238. case "keygen":
  2239. case "param":
  2240. case "source":
  2241. case "track":
  2242. case "wbr":
  2243. return pushSelfClosing(target$jscomp$0, props, type);
  2244. case "annotation-xml":
  2245. case "color-profile":
  2246. case "font-face":
  2247. case "font-face-src":
  2248. case "font-face-uri":
  2249. case "font-face-format":
  2250. case "font-face-name":
  2251. case "missing-glyph":
  2252. break;
  2253. case "head":
  2254. if (2 > formatContext.insertionMode) {
  2255. var preamble = preambleState || renderState.preamble;
  2256. if (preamble.headChunks)
  2257. throw Error(formatProdErrorMessage(545, "`<head>`"));
  2258. null !== preambleState &&
  2259. target$jscomp$0.push(headPreambleContributionChunk);
  2260. preamble.headChunks = [];
  2261. var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
  2262. preamble.headChunks,
  2263. props,
  2264. "head"
  2265. );
  2266. } else
  2267. JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
  2268. target$jscomp$0,
  2269. props,
  2270. "head"
  2271. );
  2272. return JSCompiler_inline_result$jscomp$9;
  2273. case "body":
  2274. if (2 > formatContext.insertionMode) {
  2275. var preamble$jscomp$0 = preambleState || renderState.preamble;
  2276. if (preamble$jscomp$0.bodyChunks)
  2277. throw Error(formatProdErrorMessage(545, "`<body>`"));
  2278. null !== preambleState &&
  2279. target$jscomp$0.push(bodyPreambleContributionChunk);
  2280. preamble$jscomp$0.bodyChunks = [];
  2281. var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
  2282. preamble$jscomp$0.bodyChunks,
  2283. props,
  2284. "body"
  2285. );
  2286. } else
  2287. JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
  2288. target$jscomp$0,
  2289. props,
  2290. "body"
  2291. );
  2292. return JSCompiler_inline_result$jscomp$10;
  2293. case "html":
  2294. if (0 === formatContext.insertionMode) {
  2295. var preamble$jscomp$1 = preambleState || renderState.preamble;
  2296. if (preamble$jscomp$1.htmlChunks)
  2297. throw Error(formatProdErrorMessage(545, "`<html>`"));
  2298. null !== preambleState &&
  2299. target$jscomp$0.push(htmlPreambleContributionChunk);
  2300. preamble$jscomp$1.htmlChunks = [doctypeChunk];
  2301. var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
  2302. preamble$jscomp$1.htmlChunks,
  2303. props,
  2304. "html"
  2305. );
  2306. } else
  2307. JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
  2308. target$jscomp$0,
  2309. props,
  2310. "html"
  2311. );
  2312. return JSCompiler_inline_result$jscomp$11;
  2313. default:
  2314. if (-1 !== type.indexOf("-")) {
  2315. target$jscomp$0.push(startChunkForTag(type));
  2316. var children$jscomp$9 = null,
  2317. innerHTML$jscomp$8 = null,
  2318. propKey$jscomp$11;
  2319. for (propKey$jscomp$11 in props)
  2320. if (hasOwnProperty.call(props, propKey$jscomp$11)) {
  2321. var propValue$jscomp$11 = props[propKey$jscomp$11];
  2322. if (null != propValue$jscomp$11) {
  2323. var attributeName = propKey$jscomp$11;
  2324. switch (propKey$jscomp$11) {
  2325. case "children":
  2326. children$jscomp$9 = propValue$jscomp$11;
  2327. break;
  2328. case "dangerouslySetInnerHTML":
  2329. innerHTML$jscomp$8 = propValue$jscomp$11;
  2330. break;
  2331. case "style":
  2332. pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
  2333. break;
  2334. case "suppressContentEditableWarning":
  2335. case "suppressHydrationWarning":
  2336. case "ref":
  2337. break;
  2338. case "className":
  2339. attributeName = "class";
  2340. default:
  2341. if (
  2342. isAttributeNameSafe(propKey$jscomp$11) &&
  2343. "function" !== typeof propValue$jscomp$11 &&
  2344. "symbol" !== typeof propValue$jscomp$11 &&
  2345. !1 !== propValue$jscomp$11
  2346. ) {
  2347. if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
  2348. else if ("object" === typeof propValue$jscomp$11) continue;
  2349. target$jscomp$0.push(
  2350. attributeSeparator,
  2351. stringToChunk(attributeName),
  2352. attributeAssign,
  2353. stringToChunk(escapeTextForBrowser(propValue$jscomp$11)),
  2354. attributeEnd
  2355. );
  2356. }
  2357. }
  2358. }
  2359. }
  2360. target$jscomp$0.push(endOfStartTag);
  2361. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
  2362. return children$jscomp$9;
  2363. }
  2364. }
  2365. return pushStartGenericElement(target$jscomp$0, props, type);
  2366. }
  2367. var endTagCache = new Map();
  2368. function endChunkForTag(tag) {
  2369. var chunk = endTagCache.get(tag);
  2370. void 0 === chunk &&
  2371. ((chunk = stringToPrecomputedChunk("</" + tag + ">")),
  2372. endTagCache.set(tag, chunk));
  2373. return chunk;
  2374. }
  2375. function hoistPreambleState(renderState, preambleState) {
  2376. renderState = renderState.preamble;
  2377. null === renderState.htmlChunks &&
  2378. preambleState.htmlChunks &&
  2379. (renderState.htmlChunks = preambleState.htmlChunks);
  2380. null === renderState.headChunks &&
  2381. preambleState.headChunks &&
  2382. (renderState.headChunks = preambleState.headChunks);
  2383. null === renderState.bodyChunks &&
  2384. preambleState.bodyChunks &&
  2385. (renderState.bodyChunks = preambleState.bodyChunks);
  2386. }
  2387. function writeBootstrap(destination, renderState) {
  2388. renderState = renderState.bootstrapChunks;
  2389. for (var i = 0; i < renderState.length - 1; i++)
  2390. writeChunk(destination, renderState[i]);
  2391. return i < renderState.length
  2392. ? ((i = renderState[i]),
  2393. (renderState.length = 0),
  2394. writeChunkAndReturn(destination, i))
  2395. : !0;
  2396. }
  2397. var shellTimeRuntimeScript = stringToPrecomputedChunk(
  2398. "requestAnimationFrame(function(){$RT=performance.now()});"
  2399. ),
  2400. placeholder1 = stringToPrecomputedChunk('<template id="'),
  2401. placeholder2 = stringToPrecomputedChunk('"></template>'),
  2402. startActivityBoundary = stringToPrecomputedChunk("\x3c!--&--\x3e"),
  2403. endActivityBoundary = stringToPrecomputedChunk("\x3c!--/&--\x3e"),
  2404. startCompletedSuspenseBoundary = stringToPrecomputedChunk("\x3c!--$--\x3e"),
  2405. startPendingSuspenseBoundary1 = stringToPrecomputedChunk(
  2406. '\x3c!--$?--\x3e<template id="'
  2407. ),
  2408. startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'),
  2409. startClientRenderedSuspenseBoundary =
  2410. stringToPrecomputedChunk("\x3c!--$!--\x3e"),
  2411. endSuspenseBoundary = stringToPrecomputedChunk("\x3c!--/$--\x3e"),
  2412. clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk("<template"),
  2413. clientRenderedSuspenseBoundaryErrorAttrInterstitial =
  2414. stringToPrecomputedChunk('"'),
  2415. clientRenderedSuspenseBoundaryError1A =
  2416. stringToPrecomputedChunk(' data-dgst="');
  2417. stringToPrecomputedChunk(' data-msg="');
  2418. stringToPrecomputedChunk(' data-stck="');
  2419. stringToPrecomputedChunk(' data-cstck="');
  2420. var clientRenderedSuspenseBoundaryError2 =
  2421. stringToPrecomputedChunk("></template>");
  2422. function writeStartPendingSuspenseBoundary(destination, renderState, id) {
  2423. writeChunk(destination, startPendingSuspenseBoundary1);
  2424. if (null === id) throw Error(formatProdErrorMessage(395));
  2425. writeChunk(destination, renderState.boundaryPrefix);
  2426. writeChunk(destination, stringToChunk(id.toString(16)));
  2427. return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);
  2428. }
  2429. var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'),
  2430. startSegmentHTML2 = stringToPrecomputedChunk('">'),
  2431. endSegmentHTML = stringToPrecomputedChunk("</div>"),
  2432. startSegmentSVG = stringToPrecomputedChunk(
  2433. '<svg aria-hidden="true" style="display:none" id="'
  2434. ),
  2435. startSegmentSVG2 = stringToPrecomputedChunk('">'),
  2436. endSegmentSVG = stringToPrecomputedChunk("</svg>"),
  2437. startSegmentMathML = stringToPrecomputedChunk(
  2438. '<math aria-hidden="true" style="display:none" id="'
  2439. ),
  2440. startSegmentMathML2 = stringToPrecomputedChunk('">'),
  2441. endSegmentMathML = stringToPrecomputedChunk("</math>"),
  2442. startSegmentTable = stringToPrecomputedChunk('<table hidden id="'),
  2443. startSegmentTable2 = stringToPrecomputedChunk('">'),
  2444. endSegmentTable = stringToPrecomputedChunk("</table>"),
  2445. startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'),
  2446. startSegmentTableBody2 = stringToPrecomputedChunk('">'),
  2447. endSegmentTableBody = stringToPrecomputedChunk("</tbody></table>"),
  2448. startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'),
  2449. startSegmentTableRow2 = stringToPrecomputedChunk('">'),
  2450. endSegmentTableRow = stringToPrecomputedChunk("</tr></table>"),
  2451. startSegmentColGroup = stringToPrecomputedChunk(
  2452. '<table hidden><colgroup id="'
  2453. ),
  2454. startSegmentColGroup2 = stringToPrecomputedChunk('">'),
  2455. endSegmentColGroup = stringToPrecomputedChunk("</colgroup></table>");
  2456. function writeStartSegment(destination, renderState, formatContext, id) {
  2457. switch (formatContext.insertionMode) {
  2458. case 0:
  2459. case 1:
  2460. case 3:
  2461. case 2:
  2462. return (
  2463. writeChunk(destination, startSegmentHTML),
  2464. writeChunk(destination, renderState.segmentPrefix),
  2465. writeChunk(destination, stringToChunk(id.toString(16))),
  2466. writeChunkAndReturn(destination, startSegmentHTML2)
  2467. );
  2468. case 4:
  2469. return (
  2470. writeChunk(destination, startSegmentSVG),
  2471. writeChunk(destination, renderState.segmentPrefix),
  2472. writeChunk(destination, stringToChunk(id.toString(16))),
  2473. writeChunkAndReturn(destination, startSegmentSVG2)
  2474. );
  2475. case 5:
  2476. return (
  2477. writeChunk(destination, startSegmentMathML),
  2478. writeChunk(destination, renderState.segmentPrefix),
  2479. writeChunk(destination, stringToChunk(id.toString(16))),
  2480. writeChunkAndReturn(destination, startSegmentMathML2)
  2481. );
  2482. case 6:
  2483. return (
  2484. writeChunk(destination, startSegmentTable),
  2485. writeChunk(destination, renderState.segmentPrefix),
  2486. writeChunk(destination, stringToChunk(id.toString(16))),
  2487. writeChunkAndReturn(destination, startSegmentTable2)
  2488. );
  2489. case 7:
  2490. return (
  2491. writeChunk(destination, startSegmentTableBody),
  2492. writeChunk(destination, renderState.segmentPrefix),
  2493. writeChunk(destination, stringToChunk(id.toString(16))),
  2494. writeChunkAndReturn(destination, startSegmentTableBody2)
  2495. );
  2496. case 8:
  2497. return (
  2498. writeChunk(destination, startSegmentTableRow),
  2499. writeChunk(destination, renderState.segmentPrefix),
  2500. writeChunk(destination, stringToChunk(id.toString(16))),
  2501. writeChunkAndReturn(destination, startSegmentTableRow2)
  2502. );
  2503. case 9:
  2504. return (
  2505. writeChunk(destination, startSegmentColGroup),
  2506. writeChunk(destination, renderState.segmentPrefix),
  2507. writeChunk(destination, stringToChunk(id.toString(16))),
  2508. writeChunkAndReturn(destination, startSegmentColGroup2)
  2509. );
  2510. default:
  2511. throw Error(formatProdErrorMessage(397));
  2512. }
  2513. }
  2514. function writeEndSegment(destination, formatContext) {
  2515. switch (formatContext.insertionMode) {
  2516. case 0:
  2517. case 1:
  2518. case 3:
  2519. case 2:
  2520. return writeChunkAndReturn(destination, endSegmentHTML);
  2521. case 4:
  2522. return writeChunkAndReturn(destination, endSegmentSVG);
  2523. case 5:
  2524. return writeChunkAndReturn(destination, endSegmentMathML);
  2525. case 6:
  2526. return writeChunkAndReturn(destination, endSegmentTable);
  2527. case 7:
  2528. return writeChunkAndReturn(destination, endSegmentTableBody);
  2529. case 8:
  2530. return writeChunkAndReturn(destination, endSegmentTableRow);
  2531. case 9:
  2532. return writeChunkAndReturn(destination, endSegmentColGroup);
  2533. default:
  2534. throw Error(formatProdErrorMessage(397));
  2535. }
  2536. }
  2537. var completeSegmentScript1Full = stringToPrecomputedChunk(
  2538. '$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("'
  2539. ),
  2540. completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'),
  2541. completeSegmentScript2 = stringToPrecomputedChunk('","'),
  2542. completeSegmentScriptEnd = stringToPrecomputedChunk('")\x3c/script>');
  2543. stringToPrecomputedChunk('<template data-rsi="" data-sid="');
  2544. stringToPrecomputedChunk('" data-pid="');
  2545. var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(
  2546. '$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)};'
  2547. );
  2548. stringToChunk(
  2549. '$RV=function(A,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),"auto"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+K++ +"_"),b.viewTransitionName=a,B=!0)}var B=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll("[vt-share]"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute("vt-name"),c)}var u=[];for(h=0;h<g.length;h+=2){var C=g[h],x=C.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){c=C;for(f=0;c;){if(8===c.nodeType){var r=c.data;if("/$"===r)if(0===f)break;else f--;else"$"!==r&&"$?"!==r&&"$~"!==r&&"$!"!==r||f++}else if(1===c.nodeType){d=c;var D=d.getAttribute("vt-name"),y=m.get(D);k(d,y?"vt-share":"vt-exit");y&&(k(y,"vt-share"),m.set(D,null));var E=d.querySelectorAll("[vt-share]");for(d=0;d<E.length;d++){var F=E[d],G=F.getAttribute("vt-name"),\nH=m.get(G);H&&(k(F,"vt-share"),k(H,"vt-share"),m.set(G,null))}}c=c.nextSibling}for(var I=g[h+1],t=I.firstElementChild;t;)null!==m.get(t.getAttribute("vt-name"))&&k(t,"vt-enter"),t=t.nextElementSibling;c=x;do for(var n=c.firstElementChild;n;){var J=n.getAttribute("vt-update");J&&"none"!==J&&!l.includes(n)&&k(n,"vt-update");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&"none"!==c.getAttribute("vt-update"));u.push.apply(u,I.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(B){var z=\ndocument.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener("load",q);w.g.addEventListener("error",q)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=\nperformance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===b.getAttribute("style")&&b.removeAttribute("style")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,$RV);'
  2550. );
  2551. var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
  2552. completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
  2553. '$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("'
  2554. ),
  2555. completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'),
  2556. completeBoundaryScript2 = stringToPrecomputedChunk('","'),
  2557. completeBoundaryScript3a = stringToPrecomputedChunk('",'),
  2558. completeBoundaryScript3b = stringToPrecomputedChunk('"'),
  2559. completeBoundaryScriptEnd = stringToPrecomputedChunk(")\x3c/script>");
  2560. stringToPrecomputedChunk('<template data-rci="" data-bid="');
  2561. stringToPrecomputedChunk('<template data-rri="" data-bid="');
  2562. stringToPrecomputedChunk('" data-sid="');
  2563. stringToPrecomputedChunk('" data-sty="');
  2564. var clientRenderScriptFunctionOnly = stringToPrecomputedChunk(
  2565. '$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())};'
  2566. ),
  2567. clientRenderScript1Full = stringToPrecomputedChunk(
  2568. '$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("'
  2569. ),
  2570. clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'),
  2571. clientRenderScript1A = stringToPrecomputedChunk('"'),
  2572. clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(","),
  2573. clientRenderScriptEnd = stringToPrecomputedChunk(")\x3c/script>");
  2574. stringToPrecomputedChunk('<template data-rxi="" data-bid="');
  2575. stringToPrecomputedChunk('" data-dgst="');
  2576. stringToPrecomputedChunk('" data-msg="');
  2577. stringToPrecomputedChunk('" data-stck="');
  2578. stringToPrecomputedChunk('" data-cstck="');
  2579. var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
  2580. function escapeJSStringsForInstructionScripts(input) {
  2581. return JSON.stringify(input).replace(
  2582. regexForJSStringsInInstructionScripts,
  2583. function (match) {
  2584. switch (match) {
  2585. case "<":
  2586. return "\\u003c";
  2587. case "\u2028":
  2588. return "\\u2028";
  2589. case "\u2029":
  2590. return "\\u2029";
  2591. default:
  2592. throw Error(
  2593. "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"
  2594. );
  2595. }
  2596. }
  2597. );
  2598. }
  2599. var regexForJSStringsInScripts = /[&><\u2028\u2029]/g;
  2600. function escapeJSObjectForInstructionScripts(input) {
  2601. return JSON.stringify(input).replace(
  2602. regexForJSStringsInScripts,
  2603. function (match) {
  2604. switch (match) {
  2605. case "&":
  2606. return "\\u0026";
  2607. case ">":
  2608. return "\\u003e";
  2609. case "<":
  2610. return "\\u003c";
  2611. case "\u2028":
  2612. return "\\u2028";
  2613. case "\u2029":
  2614. return "\\u2029";
  2615. default:
  2616. throw Error(
  2617. "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"
  2618. );
  2619. }
  2620. }
  2621. );
  2622. }
  2623. var lateStyleTagResourceOpen1 = stringToPrecomputedChunk(
  2624. ' media="not all" data-precedence="'
  2625. ),
  2626. lateStyleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'),
  2627. lateStyleTagResourceOpen3 = stringToPrecomputedChunk('">'),
  2628. lateStyleTagTemplateClose = stringToPrecomputedChunk("</style>"),
  2629. currentlyRenderingBoundaryHasStylesToHoist = !1,
  2630. destinationHasCapacity = !0;
  2631. function flushStyleTagsLateForBoundary(styleQueue) {
  2632. var rules = styleQueue.rules,
  2633. hrefs = styleQueue.hrefs,
  2634. i = 0;
  2635. if (hrefs.length) {
  2636. writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
  2637. writeChunk(this, lateStyleTagResourceOpen1);
  2638. writeChunk(this, styleQueue.precedence);
  2639. for (writeChunk(this, lateStyleTagResourceOpen2); i < hrefs.length - 1; i++)
  2640. writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);
  2641. writeChunk(this, hrefs[i]);
  2642. writeChunk(this, lateStyleTagResourceOpen3);
  2643. for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);
  2644. destinationHasCapacity = writeChunkAndReturn(
  2645. this,
  2646. lateStyleTagTemplateClose
  2647. );
  2648. currentlyRenderingBoundaryHasStylesToHoist = !0;
  2649. rules.length = 0;
  2650. hrefs.length = 0;
  2651. }
  2652. }
  2653. function hasStylesToHoist(stylesheet) {
  2654. return 2 !== stylesheet.state
  2655. ? (currentlyRenderingBoundaryHasStylesToHoist = !0)
  2656. : !1;
  2657. }
  2658. function writeHoistablesForBoundary(destination, hoistableState, renderState) {
  2659. currentlyRenderingBoundaryHasStylesToHoist = !1;
  2660. destinationHasCapacity = !0;
  2661. currentlyFlushingRenderState = renderState;
  2662. hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
  2663. currentlyFlushingRenderState = null;
  2664. hoistableState.stylesheets.forEach(hasStylesToHoist);
  2665. currentlyRenderingBoundaryHasStylesToHoist &&
  2666. (renderState.stylesToHoist = !0);
  2667. return destinationHasCapacity;
  2668. }
  2669. function flushResource(resource) {
  2670. for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);
  2671. resource.length = 0;
  2672. }
  2673. var stylesheetFlushingQueue = [];
  2674. function flushStyleInPreamble(stylesheet) {
  2675. pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);
  2676. for (var i = 0; i < stylesheetFlushingQueue.length; i++)
  2677. writeChunk(this, stylesheetFlushingQueue[i]);
  2678. stylesheetFlushingQueue.length = 0;
  2679. stylesheet.state = 2;
  2680. }
  2681. var styleTagResourceOpen1 = stringToPrecomputedChunk(' data-precedence="'),
  2682. styleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'),
  2683. spaceSeparator = stringToPrecomputedChunk(" "),
  2684. styleTagResourceOpen3 = stringToPrecomputedChunk('">'),
  2685. styleTagResourceClose = stringToPrecomputedChunk("</style>");
  2686. function flushStylesInPreamble(styleQueue) {
  2687. var hasStylesheets = 0 < styleQueue.sheets.size;
  2688. styleQueue.sheets.forEach(flushStyleInPreamble, this);
  2689. styleQueue.sheets.clear();
  2690. var rules = styleQueue.rules,
  2691. hrefs = styleQueue.hrefs;
  2692. if (!hasStylesheets || hrefs.length) {
  2693. writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
  2694. writeChunk(this, styleTagResourceOpen1);
  2695. writeChunk(this, styleQueue.precedence);
  2696. styleQueue = 0;
  2697. if (hrefs.length) {
  2698. for (
  2699. writeChunk(this, styleTagResourceOpen2);
  2700. styleQueue < hrefs.length - 1;
  2701. styleQueue++
  2702. )
  2703. writeChunk(this, hrefs[styleQueue]), writeChunk(this, spaceSeparator);
  2704. writeChunk(this, hrefs[styleQueue]);
  2705. }
  2706. writeChunk(this, styleTagResourceOpen3);
  2707. for (styleQueue = 0; styleQueue < rules.length; styleQueue++)
  2708. writeChunk(this, rules[styleQueue]);
  2709. writeChunk(this, styleTagResourceClose);
  2710. rules.length = 0;
  2711. hrefs.length = 0;
  2712. }
  2713. }
  2714. function preloadLateStyle(stylesheet) {
  2715. if (0 === stylesheet.state) {
  2716. stylesheet.state = 1;
  2717. var props = stylesheet.props;
  2718. pushLinkImpl(stylesheetFlushingQueue, {
  2719. rel: "preload",
  2720. as: "style",
  2721. href: stylesheet.props.href,
  2722. crossOrigin: props.crossOrigin,
  2723. fetchPriority: props.fetchPriority,
  2724. integrity: props.integrity,
  2725. media: props.media,
  2726. hrefLang: props.hrefLang,
  2727. referrerPolicy: props.referrerPolicy
  2728. });
  2729. for (
  2730. stylesheet = 0;
  2731. stylesheet < stylesheetFlushingQueue.length;
  2732. stylesheet++
  2733. )
  2734. writeChunk(this, stylesheetFlushingQueue[stylesheet]);
  2735. stylesheetFlushingQueue.length = 0;
  2736. }
  2737. }
  2738. function preloadLateStyles(styleQueue) {
  2739. styleQueue.sheets.forEach(preloadLateStyle, this);
  2740. styleQueue.sheets.clear();
  2741. }
  2742. stringToPrecomputedChunk('<link rel="expect" href="#');
  2743. stringToPrecomputedChunk('" blocking="render"/>');
  2744. var completedShellIdAttributeStart = stringToPrecomputedChunk(' id="');
  2745. function pushCompletedShellIdAttribute(target, resumableState) {
  2746. 0 === (resumableState.instructions & 32) &&
  2747. ((resumableState.instructions |= 32),
  2748. target.push(
  2749. completedShellIdAttributeStart,
  2750. stringToChunk(escapeTextForBrowser("_" + resumableState.idPrefix + "R_")),
  2751. attributeEnd
  2752. ));
  2753. }
  2754. var arrayFirstOpenBracket = stringToPrecomputedChunk("["),
  2755. arraySubsequentOpenBracket = stringToPrecomputedChunk(",["),
  2756. arrayInterstitial = stringToPrecomputedChunk(","),
  2757. arrayCloseBracket = stringToPrecomputedChunk("]");
  2758. function writeStyleResourceDependenciesInJS(destination, hoistableState) {
  2759. writeChunk(destination, arrayFirstOpenBracket);
  2760. var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
  2761. hoistableState.stylesheets.forEach(function (resource) {
  2762. if (2 !== resource.state)
  2763. if (3 === resource.state)
  2764. writeChunk(destination, nextArrayOpenBrackChunk),
  2765. writeChunk(
  2766. destination,
  2767. stringToChunk(
  2768. escapeJSObjectForInstructionScripts("" + resource.props.href)
  2769. )
  2770. ),
  2771. writeChunk(destination, arrayCloseBracket),
  2772. (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);
  2773. else {
  2774. writeChunk(destination, nextArrayOpenBrackChunk);
  2775. var precedence = resource.props["data-precedence"],
  2776. props = resource.props,
  2777. coercedHref = sanitizeURL("" + resource.props.href);
  2778. writeChunk(
  2779. destination,
  2780. stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))
  2781. );
  2782. precedence = "" + precedence;
  2783. writeChunk(destination, arrayInterstitial);
  2784. writeChunk(
  2785. destination,
  2786. stringToChunk(escapeJSObjectForInstructionScripts(precedence))
  2787. );
  2788. for (var propKey in props)
  2789. if (
  2790. hasOwnProperty.call(props, propKey) &&
  2791. ((precedence = props[propKey]), null != precedence)
  2792. )
  2793. switch (propKey) {
  2794. case "href":
  2795. case "rel":
  2796. case "precedence":
  2797. case "data-precedence":
  2798. break;
  2799. case "children":
  2800. case "dangerouslySetInnerHTML":
  2801. throw Error(formatProdErrorMessage(399, "link"));
  2802. default:
  2803. writeStyleResourceAttributeInJS(
  2804. destination,
  2805. propKey,
  2806. precedence
  2807. );
  2808. }
  2809. writeChunk(destination, arrayCloseBracket);
  2810. nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
  2811. resource.state = 3;
  2812. }
  2813. });
  2814. writeChunk(destination, arrayCloseBracket);
  2815. }
  2816. function writeStyleResourceAttributeInJS(destination, name, value) {
  2817. var attributeName = name.toLowerCase();
  2818. switch (typeof value) {
  2819. case "function":
  2820. case "symbol":
  2821. return;
  2822. }
  2823. switch (name) {
  2824. case "innerHTML":
  2825. case "dangerouslySetInnerHTML":
  2826. case "suppressContentEditableWarning":
  2827. case "suppressHydrationWarning":
  2828. case "style":
  2829. case "ref":
  2830. return;
  2831. case "className":
  2832. attributeName = "class";
  2833. name = "" + value;
  2834. break;
  2835. case "hidden":
  2836. if (!1 === value) return;
  2837. name = "";
  2838. break;
  2839. case "src":
  2840. case "href":
  2841. value = sanitizeURL(value);
  2842. name = "" + value;
  2843. break;
  2844. default:
  2845. if (
  2846. (2 < name.length &&
  2847. ("o" === name[0] || "O" === name[0]) &&
  2848. ("n" === name[1] || "N" === name[1])) ||
  2849. !isAttributeNameSafe(name)
  2850. )
  2851. return;
  2852. name = "" + value;
  2853. }
  2854. writeChunk(destination, arrayInterstitial);
  2855. writeChunk(
  2856. destination,
  2857. stringToChunk(escapeJSObjectForInstructionScripts(attributeName))
  2858. );
  2859. writeChunk(destination, arrayInterstitial);
  2860. writeChunk(
  2861. destination,
  2862. stringToChunk(escapeJSObjectForInstructionScripts(name))
  2863. );
  2864. }
  2865. function createHoistableState() {
  2866. return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };
  2867. }
  2868. function prefetchDNS(href) {
  2869. var request = currentRequest ? currentRequest : null;
  2870. if (request) {
  2871. var resumableState = request.resumableState,
  2872. renderState = request.renderState;
  2873. if ("string" === typeof href && href) {
  2874. if (!resumableState.dnsResources.hasOwnProperty(href)) {
  2875. resumableState.dnsResources[href] = null;
  2876. resumableState = renderState.headers;
  2877. var header, JSCompiler_temp;
  2878. if (
  2879. (JSCompiler_temp =
  2880. resumableState && 0 < resumableState.remainingCapacity)
  2881. )
  2882. JSCompiler_temp =
  2883. ((header =
  2884. "<" +
  2885. ("" + href).replace(
  2886. regexForHrefInLinkHeaderURLContext,
  2887. escapeHrefForLinkHeaderURLContextReplacer
  2888. ) +
  2889. ">; rel=dns-prefetch"),
  2890. 0 <= (resumableState.remainingCapacity -= header.length + 2));
  2891. JSCompiler_temp
  2892. ? ((renderState.resets.dns[href] = null),
  2893. resumableState.preconnects && (resumableState.preconnects += ", "),
  2894. (resumableState.preconnects += header))
  2895. : ((header = []),
  2896. pushLinkImpl(header, { href: href, rel: "dns-prefetch" }),
  2897. renderState.preconnects.add(header));
  2898. }
  2899. enqueueFlush(request);
  2900. }
  2901. } else previousDispatcher.D(href);
  2902. }
  2903. function preconnect(href, crossOrigin) {
  2904. var request = currentRequest ? currentRequest : null;
  2905. if (request) {
  2906. var resumableState = request.resumableState,
  2907. renderState = request.renderState;
  2908. if ("string" === typeof href && href) {
  2909. var bucket =
  2910. "use-credentials" === crossOrigin
  2911. ? "credentials"
  2912. : "string" === typeof crossOrigin
  2913. ? "anonymous"
  2914. : "default";
  2915. if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
  2916. resumableState.connectResources[bucket][href] = null;
  2917. resumableState = renderState.headers;
  2918. var header, JSCompiler_temp;
  2919. if (
  2920. (JSCompiler_temp =
  2921. resumableState && 0 < resumableState.remainingCapacity)
  2922. ) {
  2923. JSCompiler_temp =
  2924. "<" +
  2925. ("" + href).replace(
  2926. regexForHrefInLinkHeaderURLContext,
  2927. escapeHrefForLinkHeaderURLContextReplacer
  2928. ) +
  2929. ">; rel=preconnect";
  2930. if ("string" === typeof crossOrigin) {
  2931. var escapedCrossOrigin = ("" + crossOrigin).replace(
  2932. regexForLinkHeaderQuotedParamValueContext,
  2933. escapeStringForLinkHeaderQuotedParamValueContextReplacer
  2934. );
  2935. JSCompiler_temp += '; crossorigin="' + escapedCrossOrigin + '"';
  2936. }
  2937. JSCompiler_temp =
  2938. ((header = JSCompiler_temp),
  2939. 0 <= (resumableState.remainingCapacity -= header.length + 2));
  2940. }
  2941. JSCompiler_temp
  2942. ? ((renderState.resets.connect[bucket][href] = null),
  2943. resumableState.preconnects && (resumableState.preconnects += ", "),
  2944. (resumableState.preconnects += header))
  2945. : ((bucket = []),
  2946. pushLinkImpl(bucket, {
  2947. rel: "preconnect",
  2948. href: href,
  2949. crossOrigin: crossOrigin
  2950. }),
  2951. renderState.preconnects.add(bucket));
  2952. }
  2953. enqueueFlush(request);
  2954. }
  2955. } else previousDispatcher.C(href, crossOrigin);
  2956. }
  2957. function preload(href, as, options) {
  2958. var request = currentRequest ? currentRequest : null;
  2959. if (request) {
  2960. var resumableState = request.resumableState,
  2961. renderState = request.renderState;
  2962. if (as && href) {
  2963. switch (as) {
  2964. case "image":
  2965. if (options) {
  2966. var imageSrcSet = options.imageSrcSet;
  2967. var imageSizes = options.imageSizes;
  2968. var fetchPriority = options.fetchPriority;
  2969. }
  2970. var key = imageSrcSet
  2971. ? imageSrcSet + "\n" + (imageSizes || "")
  2972. : href;
  2973. if (resumableState.imageResources.hasOwnProperty(key)) return;
  2974. resumableState.imageResources[key] = PRELOAD_NO_CREDS;
  2975. resumableState = renderState.headers;
  2976. var header;
  2977. resumableState &&
  2978. 0 < resumableState.remainingCapacity &&
  2979. "string" !== typeof imageSrcSet &&
  2980. "high" === fetchPriority &&
  2981. ((header = getPreloadAsHeader(href, as, options)),
  2982. 0 <= (resumableState.remainingCapacity -= header.length + 2))
  2983. ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
  2984. resumableState.highImagePreloads &&
  2985. (resumableState.highImagePreloads += ", "),
  2986. (resumableState.highImagePreloads += header))
  2987. : ((resumableState = []),
  2988. pushLinkImpl(
  2989. resumableState,
  2990. assign(
  2991. { rel: "preload", href: imageSrcSet ? void 0 : href, as: as },
  2992. options
  2993. )
  2994. ),
  2995. "high" === fetchPriority
  2996. ? renderState.highImagePreloads.add(resumableState)
  2997. : (renderState.bulkPreloads.add(resumableState),
  2998. renderState.preloads.images.set(key, resumableState)));
  2999. break;
  3000. case "style":
  3001. if (resumableState.styleResources.hasOwnProperty(href)) return;
  3002. imageSrcSet = [];
  3003. pushLinkImpl(
  3004. imageSrcSet,
  3005. assign({ rel: "preload", href: href, as: as }, options)
  3006. );
  3007. resumableState.styleResources[href] =
  3008. !options ||
  3009. ("string" !== typeof options.crossOrigin &&
  3010. "string" !== typeof options.integrity)
  3011. ? PRELOAD_NO_CREDS
  3012. : [options.crossOrigin, options.integrity];
  3013. renderState.preloads.stylesheets.set(href, imageSrcSet);
  3014. renderState.bulkPreloads.add(imageSrcSet);
  3015. break;
  3016. case "script":
  3017. if (resumableState.scriptResources.hasOwnProperty(href)) return;
  3018. imageSrcSet = [];
  3019. renderState.preloads.scripts.set(href, imageSrcSet);
  3020. renderState.bulkPreloads.add(imageSrcSet);
  3021. pushLinkImpl(
  3022. imageSrcSet,
  3023. assign({ rel: "preload", href: href, as: as }, options)
  3024. );
  3025. resumableState.scriptResources[href] =
  3026. !options ||
  3027. ("string" !== typeof options.crossOrigin &&
  3028. "string" !== typeof options.integrity)
  3029. ? PRELOAD_NO_CREDS
  3030. : [options.crossOrigin, options.integrity];
  3031. break;
  3032. default:
  3033. if (resumableState.unknownResources.hasOwnProperty(as)) {
  3034. if (
  3035. ((imageSrcSet = resumableState.unknownResources[as]),
  3036. imageSrcSet.hasOwnProperty(href))
  3037. )
  3038. return;
  3039. } else
  3040. (imageSrcSet = {}),
  3041. (resumableState.unknownResources[as] = imageSrcSet);
  3042. imageSrcSet[href] = PRELOAD_NO_CREDS;
  3043. if (
  3044. (resumableState = renderState.headers) &&
  3045. 0 < resumableState.remainingCapacity &&
  3046. "font" === as &&
  3047. ((key = getPreloadAsHeader(href, as, options)),
  3048. 0 <= (resumableState.remainingCapacity -= key.length + 2))
  3049. )
  3050. (renderState.resets.font[href] = PRELOAD_NO_CREDS),
  3051. resumableState.fontPreloads &&
  3052. (resumableState.fontPreloads += ", "),
  3053. (resumableState.fontPreloads += key);
  3054. else
  3055. switch (
  3056. ((resumableState = []),
  3057. (href = assign({ rel: "preload", href: href, as: as }, options)),
  3058. pushLinkImpl(resumableState, href),
  3059. as)
  3060. ) {
  3061. case "font":
  3062. renderState.fontPreloads.add(resumableState);
  3063. break;
  3064. default:
  3065. renderState.bulkPreloads.add(resumableState);
  3066. }
  3067. }
  3068. enqueueFlush(request);
  3069. }
  3070. } else previousDispatcher.L(href, as, options);
  3071. }
  3072. function preloadModule(href, options) {
  3073. var request = currentRequest ? currentRequest : null;
  3074. if (request) {
  3075. var resumableState = request.resumableState,
  3076. renderState = request.renderState;
  3077. if (href) {
  3078. var as =
  3079. options && "string" === typeof options.as ? options.as : "script";
  3080. switch (as) {
  3081. case "script":
  3082. if (resumableState.moduleScriptResources.hasOwnProperty(href)) return;
  3083. as = [];
  3084. resumableState.moduleScriptResources[href] =
  3085. !options ||
  3086. ("string" !== typeof options.crossOrigin &&
  3087. "string" !== typeof options.integrity)
  3088. ? PRELOAD_NO_CREDS
  3089. : [options.crossOrigin, options.integrity];
  3090. renderState.preloads.moduleScripts.set(href, as);
  3091. break;
  3092. default:
  3093. if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {
  3094. var resources = resumableState.unknownResources[as];
  3095. if (resources.hasOwnProperty(href)) return;
  3096. } else
  3097. (resources = {}),
  3098. (resumableState.moduleUnknownResources[as] = resources);
  3099. as = [];
  3100. resources[href] = PRELOAD_NO_CREDS;
  3101. }
  3102. pushLinkImpl(as, assign({ rel: "modulepreload", href: href }, options));
  3103. renderState.bulkPreloads.add(as);
  3104. enqueueFlush(request);
  3105. }
  3106. } else previousDispatcher.m(href, options);
  3107. }
  3108. function preinitStyle(href, precedence, options) {
  3109. var request = currentRequest ? currentRequest : null;
  3110. if (request) {
  3111. var resumableState = request.resumableState,
  3112. renderState = request.renderState;
  3113. if (href) {
  3114. precedence = precedence || "default";
  3115. var styleQueue = renderState.styles.get(precedence),
  3116. resourceState = resumableState.styleResources.hasOwnProperty(href)
  3117. ? resumableState.styleResources[href]
  3118. : void 0;
  3119. null !== resourceState &&
  3120. ((resumableState.styleResources[href] = null),
  3121. styleQueue ||
  3122. ((styleQueue = {
  3123. precedence: stringToChunk(escapeTextForBrowser(precedence)),
  3124. rules: [],
  3125. hrefs: [],
  3126. sheets: new Map()
  3127. }),
  3128. renderState.styles.set(precedence, styleQueue)),
  3129. (precedence = {
  3130. state: 0,
  3131. props: assign(
  3132. { rel: "stylesheet", href: href, "data-precedence": precedence },
  3133. options
  3134. )
  3135. }),
  3136. resourceState &&
  3137. (2 === resourceState.length &&
  3138. adoptPreloadCredentials(precedence.props, resourceState),
  3139. (renderState = renderState.preloads.stylesheets.get(href)) &&
  3140. 0 < renderState.length
  3141. ? (renderState.length = 0)
  3142. : (precedence.state = 1)),
  3143. styleQueue.sheets.set(href, precedence),
  3144. enqueueFlush(request));
  3145. }
  3146. } else previousDispatcher.S(href, precedence, options);
  3147. }
  3148. function preinitScript(src, options) {
  3149. var request = currentRequest ? currentRequest : null;
  3150. if (request) {
  3151. var resumableState = request.resumableState,
  3152. renderState = request.renderState;
  3153. if (src) {
  3154. var resourceState = resumableState.scriptResources.hasOwnProperty(src)
  3155. ? resumableState.scriptResources[src]
  3156. : void 0;
  3157. null !== resourceState &&
  3158. ((resumableState.scriptResources[src] = null),
  3159. (options = assign({ src: src, async: !0 }, options)),
  3160. resourceState &&
  3161. (2 === resourceState.length &&
  3162. adoptPreloadCredentials(options, resourceState),
  3163. (src = renderState.preloads.scripts.get(src))) &&
  3164. (src.length = 0),
  3165. (src = []),
  3166. renderState.scripts.add(src),
  3167. pushScriptImpl(src, options),
  3168. enqueueFlush(request));
  3169. }
  3170. } else previousDispatcher.X(src, options);
  3171. }
  3172. function preinitModuleScript(src, options) {
  3173. var request = currentRequest ? currentRequest : null;
  3174. if (request) {
  3175. var resumableState = request.resumableState,
  3176. renderState = request.renderState;
  3177. if (src) {
  3178. var resourceState = resumableState.moduleScriptResources.hasOwnProperty(
  3179. src
  3180. )
  3181. ? resumableState.moduleScriptResources[src]
  3182. : void 0;
  3183. null !== resourceState &&
  3184. ((resumableState.moduleScriptResources[src] = null),
  3185. (options = assign({ src: src, type: "module", async: !0 }, options)),
  3186. resourceState &&
  3187. (2 === resourceState.length &&
  3188. adoptPreloadCredentials(options, resourceState),
  3189. (src = renderState.preloads.moduleScripts.get(src))) &&
  3190. (src.length = 0),
  3191. (src = []),
  3192. renderState.scripts.add(src),
  3193. pushScriptImpl(src, options),
  3194. enqueueFlush(request));
  3195. }
  3196. } else previousDispatcher.M(src, options);
  3197. }
  3198. function adoptPreloadCredentials(target, preloadState) {
  3199. null == target.crossOrigin && (target.crossOrigin = preloadState[0]);
  3200. null == target.integrity && (target.integrity = preloadState[1]);
  3201. }
  3202. function getPreloadAsHeader(href, as, params) {
  3203. href = ("" + href).replace(
  3204. regexForHrefInLinkHeaderURLContext,
  3205. escapeHrefForLinkHeaderURLContextReplacer
  3206. );
  3207. as = ("" + as).replace(
  3208. regexForLinkHeaderQuotedParamValueContext,
  3209. escapeStringForLinkHeaderQuotedParamValueContextReplacer
  3210. );
  3211. as = "<" + href + '>; rel=preload; as="' + as + '"';
  3212. for (var paramName in params)
  3213. hasOwnProperty.call(params, paramName) &&
  3214. ((href = params[paramName]),
  3215. "string" === typeof href &&
  3216. (as +=
  3217. "; " +
  3218. paramName.toLowerCase() +
  3219. '="' +
  3220. ("" + href).replace(
  3221. regexForLinkHeaderQuotedParamValueContext,
  3222. escapeStringForLinkHeaderQuotedParamValueContextReplacer
  3223. ) +
  3224. '"'));
  3225. return as;
  3226. }
  3227. var regexForHrefInLinkHeaderURLContext = /[<>\r\n]/g;
  3228. function escapeHrefForLinkHeaderURLContextReplacer(match) {
  3229. switch (match) {
  3230. case "<":
  3231. return "%3C";
  3232. case ">":
  3233. return "%3E";
  3234. case "\n":
  3235. return "%0A";
  3236. case "\r":
  3237. return "%0D";
  3238. default:
  3239. throw Error(
  3240. "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"
  3241. );
  3242. }
  3243. }
  3244. var regexForLinkHeaderQuotedParamValueContext = /["';,\r\n]/g;
  3245. function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {
  3246. switch (match) {
  3247. case '"':
  3248. return "%22";
  3249. case "'":
  3250. return "%27";
  3251. case ";":
  3252. return "%3B";
  3253. case ",":
  3254. return "%2C";
  3255. case "\n":
  3256. return "%0A";
  3257. case "\r":
  3258. return "%0D";
  3259. default:
  3260. throw Error(
  3261. "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"
  3262. );
  3263. }
  3264. }
  3265. function hoistStyleQueueDependency(styleQueue) {
  3266. this.styles.add(styleQueue);
  3267. }
  3268. function hoistStylesheetDependency(stylesheet) {
  3269. this.stylesheets.add(stylesheet);
  3270. }
  3271. function hoistHoistables(parentState, childState) {
  3272. childState.styles.forEach(hoistStyleQueueDependency, parentState);
  3273. childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
  3274. childState.suspenseyImages && (parentState.suspenseyImages = !0);
  3275. }
  3276. function hasSuspenseyContent(hoistableState) {
  3277. return 0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages;
  3278. }
  3279. var bind = Function.prototype.bind,
  3280. REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
  3281. function getComponentNameFromType(type) {
  3282. if (null == type) return null;
  3283. if ("function" === typeof type)
  3284. return type.$$typeof === REACT_CLIENT_REFERENCE
  3285. ? null
  3286. : type.displayName || type.name || null;
  3287. if ("string" === typeof type) return type;
  3288. switch (type) {
  3289. case REACT_FRAGMENT_TYPE:
  3290. return "Fragment";
  3291. case REACT_PROFILER_TYPE:
  3292. return "Profiler";
  3293. case REACT_STRICT_MODE_TYPE:
  3294. return "StrictMode";
  3295. case REACT_SUSPENSE_TYPE:
  3296. return "Suspense";
  3297. case REACT_SUSPENSE_LIST_TYPE:
  3298. return "SuspenseList";
  3299. case REACT_ACTIVITY_TYPE:
  3300. return "Activity";
  3301. }
  3302. if ("object" === typeof type)
  3303. switch (type.$$typeof) {
  3304. case REACT_PORTAL_TYPE:
  3305. return "Portal";
  3306. case REACT_CONTEXT_TYPE:
  3307. return type.displayName || "Context";
  3308. case REACT_CONSUMER_TYPE:
  3309. return (type._context.displayName || "Context") + ".Consumer";
  3310. case REACT_FORWARD_REF_TYPE:
  3311. var innerType = type.render;
  3312. type = type.displayName;
  3313. type ||
  3314. ((type = innerType.displayName || innerType.name || ""),
  3315. (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
  3316. return type;
  3317. case REACT_MEMO_TYPE:
  3318. return (
  3319. (innerType = type.displayName || null),
  3320. null !== innerType
  3321. ? innerType
  3322. : getComponentNameFromType(type.type) || "Memo"
  3323. );
  3324. case REACT_LAZY_TYPE:
  3325. innerType = type._payload;
  3326. type = type._init;
  3327. try {
  3328. return getComponentNameFromType(type(innerType));
  3329. } catch (x) {}
  3330. }
  3331. return null;
  3332. }
  3333. var emptyContextObject = {},
  3334. currentActiveSnapshot = null;
  3335. function popToNearestCommonAncestor(prev, next) {
  3336. if (prev !== next) {
  3337. prev.context._currentValue = prev.parentValue;
  3338. prev = prev.parent;
  3339. var parentNext = next.parent;
  3340. if (null === prev) {
  3341. if (null !== parentNext) throw Error(formatProdErrorMessage(401));
  3342. } else {
  3343. if (null === parentNext) throw Error(formatProdErrorMessage(401));
  3344. popToNearestCommonAncestor(prev, parentNext);
  3345. }
  3346. next.context._currentValue = next.value;
  3347. }
  3348. }
  3349. function popAllPrevious(prev) {
  3350. prev.context._currentValue = prev.parentValue;
  3351. prev = prev.parent;
  3352. null !== prev && popAllPrevious(prev);
  3353. }
  3354. function pushAllNext(next) {
  3355. var parentNext = next.parent;
  3356. null !== parentNext && pushAllNext(parentNext);
  3357. next.context._currentValue = next.value;
  3358. }
  3359. function popPreviousToCommonLevel(prev, next) {
  3360. prev.context._currentValue = prev.parentValue;
  3361. prev = prev.parent;
  3362. if (null === prev) throw Error(formatProdErrorMessage(402));
  3363. prev.depth === next.depth
  3364. ? popToNearestCommonAncestor(prev, next)
  3365. : popPreviousToCommonLevel(prev, next);
  3366. }
  3367. function popNextToCommonLevel(prev, next) {
  3368. var parentNext = next.parent;
  3369. if (null === parentNext) throw Error(formatProdErrorMessage(402));
  3370. prev.depth === parentNext.depth
  3371. ? popToNearestCommonAncestor(prev, parentNext)
  3372. : popNextToCommonLevel(prev, parentNext);
  3373. next.context._currentValue = next.value;
  3374. }
  3375. function switchContext(newSnapshot) {
  3376. var prev = currentActiveSnapshot;
  3377. prev !== newSnapshot &&
  3378. (null === prev
  3379. ? pushAllNext(newSnapshot)
  3380. : null === newSnapshot
  3381. ? popAllPrevious(prev)
  3382. : prev.depth === newSnapshot.depth
  3383. ? popToNearestCommonAncestor(prev, newSnapshot)
  3384. : prev.depth > newSnapshot.depth
  3385. ? popPreviousToCommonLevel(prev, newSnapshot)
  3386. : popNextToCommonLevel(prev, newSnapshot),
  3387. (currentActiveSnapshot = newSnapshot));
  3388. }
  3389. var classComponentUpdater = {
  3390. enqueueSetState: function (inst, payload) {
  3391. inst = inst._reactInternals;
  3392. null !== inst.queue && inst.queue.push(payload);
  3393. },
  3394. enqueueReplaceState: function (inst, payload) {
  3395. inst = inst._reactInternals;
  3396. inst.replace = !0;
  3397. inst.queue = [payload];
  3398. },
  3399. enqueueForceUpdate: function () {}
  3400. },
  3401. emptyTreeContext = { id: 1, overflow: "" };
  3402. function pushTreeContext(baseContext, totalChildren, index) {
  3403. var baseIdWithLeadingBit = baseContext.id;
  3404. baseContext = baseContext.overflow;
  3405. var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
  3406. baseIdWithLeadingBit &= ~(1 << baseLength);
  3407. index += 1;
  3408. var length = 32 - clz32(totalChildren) + baseLength;
  3409. if (30 < length) {
  3410. var numberOfOverflowBits = baseLength - (baseLength % 5);
  3411. length = (
  3412. baseIdWithLeadingBit &
  3413. ((1 << numberOfOverflowBits) - 1)
  3414. ).toString(32);
  3415. baseIdWithLeadingBit >>= numberOfOverflowBits;
  3416. baseLength -= numberOfOverflowBits;
  3417. return {
  3418. id:
  3419. (1 << (32 - clz32(totalChildren) + baseLength)) |
  3420. (index << baseLength) |
  3421. baseIdWithLeadingBit,
  3422. overflow: length + baseContext
  3423. };
  3424. }
  3425. return {
  3426. id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,
  3427. overflow: baseContext
  3428. };
  3429. }
  3430. var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
  3431. log = Math.log,
  3432. LN2 = Math.LN2;
  3433. function clz32Fallback(x) {
  3434. x >>>= 0;
  3435. return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
  3436. }
  3437. function noop() {}
  3438. var SuspenseException = Error(formatProdErrorMessage(460));
  3439. function trackUsedThenable(thenableState, thenable, index) {
  3440. index = thenableState[index];
  3441. void 0 === index
  3442. ? thenableState.push(thenable)
  3443. : index !== thenable && (thenable.then(noop, noop), (thenable = index));
  3444. switch (thenable.status) {
  3445. case "fulfilled":
  3446. return thenable.value;
  3447. case "rejected":
  3448. throw thenable.reason;
  3449. default:
  3450. "string" === typeof thenable.status
  3451. ? thenable.then(noop, noop)
  3452. : ((thenableState = thenable),
  3453. (thenableState.status = "pending"),
  3454. thenableState.then(
  3455. function (fulfilledValue) {
  3456. if ("pending" === thenable.status) {
  3457. var fulfilledThenable = thenable;
  3458. fulfilledThenable.status = "fulfilled";
  3459. fulfilledThenable.value = fulfilledValue;
  3460. }
  3461. },
  3462. function (error) {
  3463. if ("pending" === thenable.status) {
  3464. var rejectedThenable = thenable;
  3465. rejectedThenable.status = "rejected";
  3466. rejectedThenable.reason = error;
  3467. }
  3468. }
  3469. ));
  3470. switch (thenable.status) {
  3471. case "fulfilled":
  3472. return thenable.value;
  3473. case "rejected":
  3474. throw thenable.reason;
  3475. }
  3476. suspendedThenable = thenable;
  3477. throw SuspenseException;
  3478. }
  3479. }
  3480. var suspendedThenable = null;
  3481. function getSuspendedThenable() {
  3482. if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));
  3483. var thenable = suspendedThenable;
  3484. suspendedThenable = null;
  3485. return thenable;
  3486. }
  3487. function is(x, y) {
  3488. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  3489. }
  3490. var objectIs = "function" === typeof Object.is ? Object.is : is,
  3491. currentlyRenderingComponent = null,
  3492. currentlyRenderingTask = null,
  3493. currentlyRenderingRequest = null,
  3494. currentlyRenderingKeyPath = null,
  3495. firstWorkInProgressHook = null,
  3496. workInProgressHook = null,
  3497. isReRender = !1,
  3498. didScheduleRenderPhaseUpdate = !1,
  3499. localIdCounter = 0,
  3500. actionStateCounter = 0,
  3501. actionStateMatchingIndex = -1,
  3502. thenableIndexCounter = 0,
  3503. thenableState = null,
  3504. renderPhaseUpdates = null,
  3505. numberOfReRenders = 0;
  3506. function resolveCurrentlyRenderingComponent() {
  3507. if (null === currentlyRenderingComponent)
  3508. throw Error(formatProdErrorMessage(321));
  3509. return currentlyRenderingComponent;
  3510. }
  3511. function createHook() {
  3512. if (0 < numberOfReRenders) throw Error(formatProdErrorMessage(312));
  3513. return { memoizedState: null, queue: null, next: null };
  3514. }
  3515. function createWorkInProgressHook() {
  3516. null === workInProgressHook
  3517. ? null === firstWorkInProgressHook
  3518. ? ((isReRender = !1),
  3519. (firstWorkInProgressHook = workInProgressHook = createHook()))
  3520. : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
  3521. : null === workInProgressHook.next
  3522. ? ((isReRender = !1),
  3523. (workInProgressHook = workInProgressHook.next = createHook()))
  3524. : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
  3525. return workInProgressHook;
  3526. }
  3527. function getThenableStateAfterSuspending() {
  3528. var state = thenableState;
  3529. thenableState = null;
  3530. return state;
  3531. }
  3532. function resetHooksState() {
  3533. currentlyRenderingKeyPath =
  3534. currentlyRenderingRequest =
  3535. currentlyRenderingTask =
  3536. currentlyRenderingComponent =
  3537. null;
  3538. didScheduleRenderPhaseUpdate = !1;
  3539. firstWorkInProgressHook = null;
  3540. numberOfReRenders = 0;
  3541. workInProgressHook = renderPhaseUpdates = null;
  3542. }
  3543. function basicStateReducer(state, action) {
  3544. return "function" === typeof action ? action(state) : action;
  3545. }
  3546. function useReducer(reducer, initialArg, init) {
  3547. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  3548. workInProgressHook = createWorkInProgressHook();
  3549. if (isReRender) {
  3550. var queue = workInProgressHook.queue;
  3551. initialArg = queue.dispatch;
  3552. if (
  3553. null !== renderPhaseUpdates &&
  3554. ((init = renderPhaseUpdates.get(queue)), void 0 !== init)
  3555. ) {
  3556. renderPhaseUpdates.delete(queue);
  3557. queue = workInProgressHook.memoizedState;
  3558. do (queue = reducer(queue, init.action)), (init = init.next);
  3559. while (null !== init);
  3560. workInProgressHook.memoizedState = queue;
  3561. return [queue, initialArg];
  3562. }
  3563. return [workInProgressHook.memoizedState, initialArg];
  3564. }
  3565. reducer =
  3566. reducer === basicStateReducer
  3567. ? "function" === typeof initialArg
  3568. ? initialArg()
  3569. : initialArg
  3570. : void 0 !== init
  3571. ? init(initialArg)
  3572. : initialArg;
  3573. workInProgressHook.memoizedState = reducer;
  3574. reducer = workInProgressHook.queue = { last: null, dispatch: null };
  3575. reducer = reducer.dispatch = dispatchAction.bind(
  3576. null,
  3577. currentlyRenderingComponent,
  3578. reducer
  3579. );
  3580. return [workInProgressHook.memoizedState, reducer];
  3581. }
  3582. function useMemo(nextCreate, deps) {
  3583. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  3584. workInProgressHook = createWorkInProgressHook();
  3585. deps = void 0 === deps ? null : deps;
  3586. if (null !== workInProgressHook) {
  3587. var prevState = workInProgressHook.memoizedState;
  3588. if (null !== prevState && null !== deps) {
  3589. var prevDeps = prevState[1];
  3590. a: if (null === prevDeps) prevDeps = !1;
  3591. else {
  3592. for (var i = 0; i < prevDeps.length && i < deps.length; i++)
  3593. if (!objectIs(deps[i], prevDeps[i])) {
  3594. prevDeps = !1;
  3595. break a;
  3596. }
  3597. prevDeps = !0;
  3598. }
  3599. if (prevDeps) return prevState[0];
  3600. }
  3601. }
  3602. nextCreate = nextCreate();
  3603. workInProgressHook.memoizedState = [nextCreate, deps];
  3604. return nextCreate;
  3605. }
  3606. function dispatchAction(componentIdentity, queue, action) {
  3607. if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));
  3608. if (componentIdentity === currentlyRenderingComponent)
  3609. if (
  3610. ((didScheduleRenderPhaseUpdate = !0),
  3611. (componentIdentity = { action: action, next: null }),
  3612. null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),
  3613. (action = renderPhaseUpdates.get(queue)),
  3614. void 0 === action)
  3615. )
  3616. renderPhaseUpdates.set(queue, componentIdentity);
  3617. else {
  3618. for (queue = action; null !== queue.next; ) queue = queue.next;
  3619. queue.next = componentIdentity;
  3620. }
  3621. }
  3622. function throwOnUseEffectEventCall() {
  3623. throw Error(formatProdErrorMessage(440));
  3624. }
  3625. function unsupportedStartTransition() {
  3626. throw Error(formatProdErrorMessage(394));
  3627. }
  3628. function unsupportedSetOptimisticState() {
  3629. throw Error(formatProdErrorMessage(479));
  3630. }
  3631. function useActionState(action, initialState, permalink) {
  3632. resolveCurrentlyRenderingComponent();
  3633. var actionStateHookIndex = actionStateCounter++,
  3634. request = currentlyRenderingRequest;
  3635. if ("function" === typeof action.$$FORM_ACTION) {
  3636. var nextPostbackStateKey = null,
  3637. componentKeyPath = currentlyRenderingKeyPath;
  3638. request = request.formState;
  3639. var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;
  3640. if (null !== request && "function" === typeof isSignatureEqual) {
  3641. var postbackKey = request[1];
  3642. isSignatureEqual.call(action, request[2], request[3]) &&
  3643. ((nextPostbackStateKey =
  3644. void 0 !== permalink
  3645. ? "p" + permalink
  3646. : "k" +
  3647. murmurhash3_32_gc(
  3648. JSON.stringify([componentKeyPath, null, actionStateHookIndex]),
  3649. 0
  3650. )),
  3651. postbackKey === nextPostbackStateKey &&
  3652. ((actionStateMatchingIndex = actionStateHookIndex),
  3653. (initialState = request[0])));
  3654. }
  3655. var boundAction = action.bind(null, initialState);
  3656. action = function (payload) {
  3657. boundAction(payload);
  3658. };
  3659. "function" === typeof boundAction.$$FORM_ACTION &&
  3660. (action.$$FORM_ACTION = function (prefix) {
  3661. prefix = boundAction.$$FORM_ACTION(prefix);
  3662. void 0 !== permalink &&
  3663. ((permalink += ""), (prefix.action = permalink));
  3664. var formData = prefix.data;
  3665. formData &&
  3666. (null === nextPostbackStateKey &&
  3667. (nextPostbackStateKey =
  3668. void 0 !== permalink
  3669. ? "p" + permalink
  3670. : "k" +
  3671. murmurhash3_32_gc(
  3672. JSON.stringify([
  3673. componentKeyPath,
  3674. null,
  3675. actionStateHookIndex
  3676. ]),
  3677. 0
  3678. )),
  3679. formData.append("$ACTION_KEY", nextPostbackStateKey));
  3680. return prefix;
  3681. });
  3682. return [initialState, action, !1];
  3683. }
  3684. var boundAction$22 = action.bind(null, initialState);
  3685. return [
  3686. initialState,
  3687. function (payload) {
  3688. boundAction$22(payload);
  3689. },
  3690. !1
  3691. ];
  3692. }
  3693. function unwrapThenable(thenable) {
  3694. var index = thenableIndexCounter;
  3695. thenableIndexCounter += 1;
  3696. null === thenableState && (thenableState = []);
  3697. return trackUsedThenable(thenableState, thenable, index);
  3698. }
  3699. function unsupportedRefresh() {
  3700. throw Error(formatProdErrorMessage(393));
  3701. }
  3702. var HooksDispatcher = {
  3703. readContext: function (context) {
  3704. return context._currentValue;
  3705. },
  3706. use: function (usable) {
  3707. if (null !== usable && "object" === typeof usable) {
  3708. if ("function" === typeof usable.then) return unwrapThenable(usable);
  3709. if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
  3710. }
  3711. throw Error(formatProdErrorMessage(438, String(usable)));
  3712. },
  3713. useContext: function (context) {
  3714. resolveCurrentlyRenderingComponent();
  3715. return context._currentValue;
  3716. },
  3717. useMemo: useMemo,
  3718. useReducer: useReducer,
  3719. useRef: function (initialValue) {
  3720. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  3721. workInProgressHook = createWorkInProgressHook();
  3722. var previousRef = workInProgressHook.memoizedState;
  3723. return null === previousRef
  3724. ? ((initialValue = { current: initialValue }),
  3725. (workInProgressHook.memoizedState = initialValue))
  3726. : previousRef;
  3727. },
  3728. useState: function (initialState) {
  3729. return useReducer(basicStateReducer, initialState);
  3730. },
  3731. useInsertionEffect: noop,
  3732. useLayoutEffect: noop,
  3733. useCallback: function (callback, deps) {
  3734. return useMemo(function () {
  3735. return callback;
  3736. }, deps);
  3737. },
  3738. useImperativeHandle: noop,
  3739. useEffect: noop,
  3740. useDebugValue: noop,
  3741. useDeferredValue: function (value, initialValue) {
  3742. resolveCurrentlyRenderingComponent();
  3743. return void 0 !== initialValue ? initialValue : value;
  3744. },
  3745. useTransition: function () {
  3746. resolveCurrentlyRenderingComponent();
  3747. return [!1, unsupportedStartTransition];
  3748. },
  3749. useId: function () {
  3750. var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
  3751. var overflow = JSCompiler_inline_result.overflow;
  3752. JSCompiler_inline_result = JSCompiler_inline_result.id;
  3753. JSCompiler_inline_result =
  3754. (
  3755. JSCompiler_inline_result &
  3756. ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
  3757. ).toString(32) + overflow;
  3758. var resumableState = currentResumableState;
  3759. if (null === resumableState) throw Error(formatProdErrorMessage(404));
  3760. overflow = localIdCounter++;
  3761. JSCompiler_inline_result =
  3762. "_" + resumableState.idPrefix + "R_" + JSCompiler_inline_result;
  3763. 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
  3764. return JSCompiler_inline_result + "_";
  3765. },
  3766. useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
  3767. if (void 0 === getServerSnapshot)
  3768. throw Error(formatProdErrorMessage(407));
  3769. return getServerSnapshot();
  3770. },
  3771. useOptimistic: function (passthrough) {
  3772. resolveCurrentlyRenderingComponent();
  3773. return [passthrough, unsupportedSetOptimisticState];
  3774. },
  3775. useActionState: useActionState,
  3776. useFormState: useActionState,
  3777. useHostTransitionStatus: function () {
  3778. resolveCurrentlyRenderingComponent();
  3779. return sharedNotPendingObject;
  3780. },
  3781. useMemoCache: function (size) {
  3782. for (var data = Array(size), i = 0; i < size; i++)
  3783. data[i] = REACT_MEMO_CACHE_SENTINEL;
  3784. return data;
  3785. },
  3786. useCacheRefresh: function () {
  3787. return unsupportedRefresh;
  3788. },
  3789. useEffectEvent: function () {
  3790. return throwOnUseEffectEventCall;
  3791. }
  3792. },
  3793. currentResumableState = null,
  3794. DefaultAsyncDispatcher = {
  3795. getCacheForType: function () {
  3796. throw Error(formatProdErrorMessage(248));
  3797. },
  3798. cacheSignal: function () {
  3799. throw Error(formatProdErrorMessage(248));
  3800. }
  3801. },
  3802. prefix,
  3803. suffix;
  3804. function describeBuiltInComponentFrame(name) {
  3805. if (void 0 === prefix)
  3806. try {
  3807. throw Error();
  3808. } catch (x) {
  3809. var match = x.stack.trim().match(/\n( *(at )?)/);
  3810. prefix = (match && match[1]) || "";
  3811. suffix =
  3812. -1 < x.stack.indexOf("\n at")
  3813. ? " (<anonymous>)"
  3814. : -1 < x.stack.indexOf("@")
  3815. ? "@unknown:0:0"
  3816. : "";
  3817. }
  3818. return "\n" + prefix + name + suffix;
  3819. }
  3820. var reentry = !1;
  3821. function describeNativeComponentFrame(fn, construct) {
  3822. if (!fn || reentry) return "";
  3823. reentry = !0;
  3824. var previousPrepareStackTrace = Error.prepareStackTrace;
  3825. Error.prepareStackTrace = void 0;
  3826. try {
  3827. var RunInRootFrame = {
  3828. DetermineComponentFrameRoot: function () {
  3829. try {
  3830. if (construct) {
  3831. var Fake = function () {
  3832. throw Error();
  3833. };
  3834. Object.defineProperty(Fake.prototype, "props", {
  3835. set: function () {
  3836. throw Error();
  3837. }
  3838. });
  3839. if ("object" === typeof Reflect && Reflect.construct) {
  3840. try {
  3841. Reflect.construct(Fake, []);
  3842. } catch (x) {
  3843. var control = x;
  3844. }
  3845. Reflect.construct(fn, [], Fake);
  3846. } else {
  3847. try {
  3848. Fake.call();
  3849. } catch (x$24) {
  3850. control = x$24;
  3851. }
  3852. fn.call(Fake.prototype);
  3853. }
  3854. } else {
  3855. try {
  3856. throw Error();
  3857. } catch (x$25) {
  3858. control = x$25;
  3859. }
  3860. (Fake = fn()) &&
  3861. "function" === typeof Fake.catch &&
  3862. Fake.catch(function () {});
  3863. }
  3864. } catch (sample) {
  3865. if (sample && control && "string" === typeof sample.stack)
  3866. return [sample.stack, control.stack];
  3867. }
  3868. return [null, null];
  3869. }
  3870. };
  3871. RunInRootFrame.DetermineComponentFrameRoot.displayName =
  3872. "DetermineComponentFrameRoot";
  3873. var namePropDescriptor = Object.getOwnPropertyDescriptor(
  3874. RunInRootFrame.DetermineComponentFrameRoot,
  3875. "name"
  3876. );
  3877. namePropDescriptor &&
  3878. namePropDescriptor.configurable &&
  3879. Object.defineProperty(
  3880. RunInRootFrame.DetermineComponentFrameRoot,
  3881. "name",
  3882. { value: "DetermineComponentFrameRoot" }
  3883. );
  3884. var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
  3885. sampleStack = _RunInRootFrame$Deter[0],
  3886. controlStack = _RunInRootFrame$Deter[1];
  3887. if (sampleStack && controlStack) {
  3888. var sampleLines = sampleStack.split("\n"),
  3889. controlLines = controlStack.split("\n");
  3890. for (
  3891. namePropDescriptor = RunInRootFrame = 0;
  3892. RunInRootFrame < sampleLines.length &&
  3893. !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
  3894. )
  3895. RunInRootFrame++;
  3896. for (
  3897. ;
  3898. namePropDescriptor < controlLines.length &&
  3899. !controlLines[namePropDescriptor].includes(
  3900. "DetermineComponentFrameRoot"
  3901. );
  3902. )
  3903. namePropDescriptor++;
  3904. if (
  3905. RunInRootFrame === sampleLines.length ||
  3906. namePropDescriptor === controlLines.length
  3907. )
  3908. for (
  3909. RunInRootFrame = sampleLines.length - 1,
  3910. namePropDescriptor = controlLines.length - 1;
  3911. 1 <= RunInRootFrame &&
  3912. 0 <= namePropDescriptor &&
  3913. sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
  3914. )
  3915. namePropDescriptor--;
  3916. for (
  3917. ;
  3918. 1 <= RunInRootFrame && 0 <= namePropDescriptor;
  3919. RunInRootFrame--, namePropDescriptor--
  3920. )
  3921. if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
  3922. if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
  3923. do
  3924. if (
  3925. (RunInRootFrame--,
  3926. namePropDescriptor--,
  3927. 0 > namePropDescriptor ||
  3928. sampleLines[RunInRootFrame] !==
  3929. controlLines[namePropDescriptor])
  3930. ) {
  3931. var frame =
  3932. "\n" +
  3933. sampleLines[RunInRootFrame].replace(" at new ", " at ");
  3934. fn.displayName &&
  3935. frame.includes("<anonymous>") &&
  3936. (frame = frame.replace("<anonymous>", fn.displayName));
  3937. return frame;
  3938. }
  3939. while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
  3940. }
  3941. break;
  3942. }
  3943. }
  3944. } finally {
  3945. (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
  3946. }
  3947. return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
  3948. ? describeBuiltInComponentFrame(previousPrepareStackTrace)
  3949. : "";
  3950. }
  3951. function describeComponentStackByType(type) {
  3952. if ("string" === typeof type) return describeBuiltInComponentFrame(type);
  3953. if ("function" === typeof type)
  3954. return type.prototype && type.prototype.isReactComponent
  3955. ? describeNativeComponentFrame(type, !0)
  3956. : describeNativeComponentFrame(type, !1);
  3957. if ("object" === typeof type && null !== type) {
  3958. switch (type.$$typeof) {
  3959. case REACT_FORWARD_REF_TYPE:
  3960. return describeNativeComponentFrame(type.render, !1);
  3961. case REACT_MEMO_TYPE:
  3962. return describeNativeComponentFrame(type.type, !1);
  3963. case REACT_LAZY_TYPE:
  3964. var lazyComponent = type,
  3965. payload = lazyComponent._payload;
  3966. lazyComponent = lazyComponent._init;
  3967. try {
  3968. type = lazyComponent(payload);
  3969. } catch (x) {
  3970. return describeBuiltInComponentFrame("Lazy");
  3971. }
  3972. return describeComponentStackByType(type);
  3973. }
  3974. if ("string" === typeof type.name) {
  3975. a: {
  3976. payload = type.name;
  3977. lazyComponent = type.env;
  3978. var location = type.debugLocation;
  3979. if (
  3980. null != location &&
  3981. ((type = Error.prepareStackTrace),
  3982. (Error.prepareStackTrace = void 0),
  3983. (location = location.stack),
  3984. (Error.prepareStackTrace = type),
  3985. location.startsWith("Error: react-stack-top-frame\n") &&
  3986. (location = location.slice(29)),
  3987. (type = location.indexOf("\n")),
  3988. -1 !== type && (location = location.slice(type + 1)),
  3989. (type = location.indexOf("react_stack_bottom_frame")),
  3990. -1 !== type && (type = location.lastIndexOf("\n", type)),
  3991. (type = -1 !== type ? (location = location.slice(0, type)) : ""),
  3992. (location = type.lastIndexOf("\n")),
  3993. (type = -1 === location ? type : type.slice(location + 1)),
  3994. -1 !== type.indexOf(payload))
  3995. ) {
  3996. payload = "\n" + type;
  3997. break a;
  3998. }
  3999. payload = describeBuiltInComponentFrame(
  4000. payload + (lazyComponent ? " [" + lazyComponent + "]" : "")
  4001. );
  4002. }
  4003. return payload;
  4004. }
  4005. }
  4006. switch (type) {
  4007. case REACT_SUSPENSE_LIST_TYPE:
  4008. return describeBuiltInComponentFrame("SuspenseList");
  4009. case REACT_SUSPENSE_TYPE:
  4010. return describeBuiltInComponentFrame("Suspense");
  4011. }
  4012. return "";
  4013. }
  4014. function isEligibleForOutlining(request, boundary) {
  4015. return (
  4016. (500 < boundary.byteSize || hasSuspenseyContent(boundary.contentState)) &&
  4017. null === boundary.contentPreamble
  4018. );
  4019. }
  4020. function defaultErrorHandler(error) {
  4021. if (
  4022. "object" === typeof error &&
  4023. null !== error &&
  4024. "string" === typeof error.environmentName
  4025. ) {
  4026. var JSCompiler_inline_result = error.environmentName;
  4027. error = [error].slice(0);
  4028. "string" === typeof error[0]
  4029. ? error.splice(
  4030. 0,
  4031. 1,
  4032. "%c%s%c " + error[0],
  4033. "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",
  4034. " " + JSCompiler_inline_result + " ",
  4035. ""
  4036. )
  4037. : error.splice(
  4038. 0,
  4039. 0,
  4040. "%c%s%c",
  4041. "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",
  4042. " " + JSCompiler_inline_result + " ",
  4043. ""
  4044. );
  4045. error.unshift(console);
  4046. JSCompiler_inline_result = bind.apply(console.error, error);
  4047. JSCompiler_inline_result();
  4048. } else console.error(error);
  4049. return null;
  4050. }
  4051. function RequestInstance(
  4052. resumableState,
  4053. renderState,
  4054. rootFormatContext,
  4055. progressiveChunkSize,
  4056. onError,
  4057. onAllReady,
  4058. onShellReady,
  4059. onShellError,
  4060. onFatalError,
  4061. onPostpone,
  4062. formState
  4063. ) {
  4064. var abortSet = new Set();
  4065. this.destination = null;
  4066. this.flushScheduled = !1;
  4067. this.resumableState = resumableState;
  4068. this.renderState = renderState;
  4069. this.rootFormatContext = rootFormatContext;
  4070. this.progressiveChunkSize =
  4071. void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
  4072. this.status = 10;
  4073. this.fatalError = null;
  4074. this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
  4075. this.completedPreambleSegments = this.completedRootSegment = null;
  4076. this.byteSize = 0;
  4077. this.abortableTasks = abortSet;
  4078. this.pingedTasks = [];
  4079. this.clientRenderedBoundaries = [];
  4080. this.completedBoundaries = [];
  4081. this.partialBoundaries = [];
  4082. this.trackedPostpones = null;
  4083. this.onError = void 0 === onError ? defaultErrorHandler : onError;
  4084. this.onPostpone = void 0 === onPostpone ? noop : onPostpone;
  4085. this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
  4086. this.onShellReady = void 0 === onShellReady ? noop : onShellReady;
  4087. this.onShellError = void 0 === onShellError ? noop : onShellError;
  4088. this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
  4089. this.formState = void 0 === formState ? null : formState;
  4090. }
  4091. function createRequest(
  4092. children,
  4093. resumableState,
  4094. renderState,
  4095. rootFormatContext,
  4096. progressiveChunkSize,
  4097. onError,
  4098. onAllReady,
  4099. onShellReady,
  4100. onShellError,
  4101. onFatalError,
  4102. onPostpone,
  4103. formState
  4104. ) {
  4105. resumableState = new RequestInstance(
  4106. resumableState,
  4107. renderState,
  4108. rootFormatContext,
  4109. progressiveChunkSize,
  4110. onError,
  4111. onAllReady,
  4112. onShellReady,
  4113. onShellError,
  4114. onFatalError,
  4115. onPostpone,
  4116. formState
  4117. );
  4118. renderState = createPendingSegment(
  4119. resumableState,
  4120. 0,
  4121. null,
  4122. rootFormatContext,
  4123. !1,
  4124. !1
  4125. );
  4126. renderState.parentFlushed = !0;
  4127. children = createRenderTask(
  4128. resumableState,
  4129. null,
  4130. children,
  4131. -1,
  4132. null,
  4133. renderState,
  4134. null,
  4135. null,
  4136. resumableState.abortableTasks,
  4137. null,
  4138. rootFormatContext,
  4139. null,
  4140. emptyTreeContext,
  4141. null,
  4142. null
  4143. );
  4144. pushComponentStack(children);
  4145. resumableState.pingedTasks.push(children);
  4146. return resumableState;
  4147. }
  4148. function createPrerenderRequest(
  4149. children,
  4150. resumableState,
  4151. renderState,
  4152. rootFormatContext,
  4153. progressiveChunkSize,
  4154. onError,
  4155. onAllReady,
  4156. onShellReady,
  4157. onShellError,
  4158. onFatalError,
  4159. onPostpone
  4160. ) {
  4161. children = createRequest(
  4162. children,
  4163. resumableState,
  4164. renderState,
  4165. rootFormatContext,
  4166. progressiveChunkSize,
  4167. onError,
  4168. onAllReady,
  4169. onShellReady,
  4170. onShellError,
  4171. onFatalError,
  4172. onPostpone,
  4173. void 0
  4174. );
  4175. children.trackedPostpones = {
  4176. workingMap: new Map(),
  4177. rootNodes: [],
  4178. rootSlots: null
  4179. };
  4180. return children;
  4181. }
  4182. function resumeRequest(
  4183. children,
  4184. postponedState,
  4185. renderState,
  4186. onError,
  4187. onAllReady,
  4188. onShellReady,
  4189. onShellError,
  4190. onFatalError,
  4191. onPostpone
  4192. ) {
  4193. renderState = new RequestInstance(
  4194. postponedState.resumableState,
  4195. renderState,
  4196. postponedState.rootFormatContext,
  4197. postponedState.progressiveChunkSize,
  4198. onError,
  4199. onAllReady,
  4200. onShellReady,
  4201. onShellError,
  4202. onFatalError,
  4203. onPostpone,
  4204. null
  4205. );
  4206. renderState.nextSegmentId = postponedState.nextSegmentId;
  4207. if ("number" === typeof postponedState.replaySlots)
  4208. return (
  4209. (onError = createPendingSegment(
  4210. renderState,
  4211. 0,
  4212. null,
  4213. postponedState.rootFormatContext,
  4214. !1,
  4215. !1
  4216. )),
  4217. (onError.parentFlushed = !0),
  4218. (children = createRenderTask(
  4219. renderState,
  4220. null,
  4221. children,
  4222. -1,
  4223. null,
  4224. onError,
  4225. null,
  4226. null,
  4227. renderState.abortableTasks,
  4228. null,
  4229. postponedState.rootFormatContext,
  4230. null,
  4231. emptyTreeContext,
  4232. null,
  4233. null
  4234. )),
  4235. pushComponentStack(children),
  4236. renderState.pingedTasks.push(children),
  4237. renderState
  4238. );
  4239. children = createReplayTask(
  4240. renderState,
  4241. null,
  4242. {
  4243. nodes: postponedState.replayNodes,
  4244. slots: postponedState.replaySlots,
  4245. pendingTasks: 0
  4246. },
  4247. children,
  4248. -1,
  4249. null,
  4250. null,
  4251. renderState.abortableTasks,
  4252. null,
  4253. postponedState.rootFormatContext,
  4254. null,
  4255. emptyTreeContext,
  4256. null,
  4257. null
  4258. );
  4259. pushComponentStack(children);
  4260. renderState.pingedTasks.push(children);
  4261. return renderState;
  4262. }
  4263. function resumeAndPrerenderRequest(
  4264. children,
  4265. postponedState,
  4266. renderState,
  4267. onError,
  4268. onAllReady,
  4269. onShellReady,
  4270. onShellError,
  4271. onFatalError,
  4272. onPostpone
  4273. ) {
  4274. children = resumeRequest(
  4275. children,
  4276. postponedState,
  4277. renderState,
  4278. onError,
  4279. onAllReady,
  4280. onShellReady,
  4281. onShellError,
  4282. onFatalError,
  4283. onPostpone
  4284. );
  4285. children.trackedPostpones = {
  4286. workingMap: new Map(),
  4287. rootNodes: [],
  4288. rootSlots: null
  4289. };
  4290. return children;
  4291. }
  4292. var currentRequest = null;
  4293. function pingTask(request, task) {
  4294. request.pingedTasks.push(task);
  4295. 1 === request.pingedTasks.length &&
  4296. ((request.flushScheduled = null !== request.destination),
  4297. null !== request.trackedPostpones || 10 === request.status
  4298. ? scheduleMicrotask(function () {
  4299. return performWork(request);
  4300. })
  4301. : scheduleWork(function () {
  4302. return performWork(request);
  4303. }));
  4304. }
  4305. function createSuspenseBoundary(
  4306. request,
  4307. row,
  4308. fallbackAbortableTasks,
  4309. contentPreamble,
  4310. fallbackPreamble
  4311. ) {
  4312. fallbackAbortableTasks = {
  4313. status: 0,
  4314. rootSegmentID: -1,
  4315. parentFlushed: !1,
  4316. pendingTasks: 0,
  4317. row: row,
  4318. completedSegments: [],
  4319. byteSize: 0,
  4320. fallbackAbortableTasks: fallbackAbortableTasks,
  4321. errorDigest: null,
  4322. contentState: createHoistableState(),
  4323. fallbackState: createHoistableState(),
  4324. contentPreamble: contentPreamble,
  4325. fallbackPreamble: fallbackPreamble,
  4326. trackedContentKeyPath: null,
  4327. trackedFallbackNode: null
  4328. };
  4329. null !== row &&
  4330. (row.pendingTasks++,
  4331. (contentPreamble = row.boundaries),
  4332. null !== contentPreamble &&
  4333. (request.allPendingTasks++,
  4334. fallbackAbortableTasks.pendingTasks++,
  4335. contentPreamble.push(fallbackAbortableTasks)),
  4336. (request = row.inheritedHoistables),
  4337. null !== request &&
  4338. hoistHoistables(fallbackAbortableTasks.contentState, request));
  4339. return fallbackAbortableTasks;
  4340. }
  4341. function createRenderTask(
  4342. request,
  4343. thenableState,
  4344. node,
  4345. childIndex,
  4346. blockedBoundary,
  4347. blockedSegment,
  4348. blockedPreamble,
  4349. hoistableState,
  4350. abortSet,
  4351. keyPath,
  4352. formatContext,
  4353. context,
  4354. treeContext,
  4355. row,
  4356. componentStack
  4357. ) {
  4358. request.allPendingTasks++;
  4359. null === blockedBoundary
  4360. ? request.pendingRootTasks++
  4361. : blockedBoundary.pendingTasks++;
  4362. null !== row && row.pendingTasks++;
  4363. var task = {
  4364. replay: null,
  4365. node: node,
  4366. childIndex: childIndex,
  4367. ping: function () {
  4368. return pingTask(request, task);
  4369. },
  4370. blockedBoundary: blockedBoundary,
  4371. blockedSegment: blockedSegment,
  4372. blockedPreamble: blockedPreamble,
  4373. hoistableState: hoistableState,
  4374. abortSet: abortSet,
  4375. keyPath: keyPath,
  4376. formatContext: formatContext,
  4377. context: context,
  4378. treeContext: treeContext,
  4379. row: row,
  4380. componentStack: componentStack,
  4381. thenableState: thenableState
  4382. };
  4383. abortSet.add(task);
  4384. return task;
  4385. }
  4386. function createReplayTask(
  4387. request,
  4388. thenableState,
  4389. replay,
  4390. node,
  4391. childIndex,
  4392. blockedBoundary,
  4393. hoistableState,
  4394. abortSet,
  4395. keyPath,
  4396. formatContext,
  4397. context,
  4398. treeContext,
  4399. row,
  4400. componentStack
  4401. ) {
  4402. request.allPendingTasks++;
  4403. null === blockedBoundary
  4404. ? request.pendingRootTasks++
  4405. : blockedBoundary.pendingTasks++;
  4406. null !== row && row.pendingTasks++;
  4407. replay.pendingTasks++;
  4408. var task = {
  4409. replay: replay,
  4410. node: node,
  4411. childIndex: childIndex,
  4412. ping: function () {
  4413. return pingTask(request, task);
  4414. },
  4415. blockedBoundary: blockedBoundary,
  4416. blockedSegment: null,
  4417. blockedPreamble: null,
  4418. hoistableState: hoistableState,
  4419. abortSet: abortSet,
  4420. keyPath: keyPath,
  4421. formatContext: formatContext,
  4422. context: context,
  4423. treeContext: treeContext,
  4424. row: row,
  4425. componentStack: componentStack,
  4426. thenableState: thenableState
  4427. };
  4428. abortSet.add(task);
  4429. return task;
  4430. }
  4431. function createPendingSegment(
  4432. request,
  4433. index,
  4434. boundary,
  4435. parentFormatContext,
  4436. lastPushedText,
  4437. textEmbedded
  4438. ) {
  4439. return {
  4440. status: 0,
  4441. parentFlushed: !1,
  4442. id: -1,
  4443. index: index,
  4444. chunks: [],
  4445. children: [],
  4446. preambleChildren: [],
  4447. parentFormatContext: parentFormatContext,
  4448. boundary: boundary,
  4449. lastPushedText: lastPushedText,
  4450. textEmbedded: textEmbedded
  4451. };
  4452. }
  4453. function pushComponentStack(task) {
  4454. var node = task.node;
  4455. if ("object" === typeof node && null !== node)
  4456. switch (node.$$typeof) {
  4457. case REACT_ELEMENT_TYPE:
  4458. task.componentStack = { parent: task.componentStack, type: node.type };
  4459. }
  4460. }
  4461. function replaceSuspenseComponentStackWithSuspenseFallbackStack(
  4462. componentStack
  4463. ) {
  4464. return null === componentStack
  4465. ? null
  4466. : { parent: componentStack.parent, type: "Suspense Fallback" };
  4467. }
  4468. function getThrownInfo(node$jscomp$0) {
  4469. var errorInfo = {};
  4470. node$jscomp$0 &&
  4471. Object.defineProperty(errorInfo, "componentStack", {
  4472. configurable: !0,
  4473. enumerable: !0,
  4474. get: function () {
  4475. try {
  4476. var info = "",
  4477. node = node$jscomp$0;
  4478. do
  4479. (info += describeComponentStackByType(node.type)),
  4480. (node = node.parent);
  4481. while (node);
  4482. var JSCompiler_inline_result = info;
  4483. } catch (x) {
  4484. JSCompiler_inline_result =
  4485. "\nError generating stack: " + x.message + "\n" + x.stack;
  4486. }
  4487. Object.defineProperty(errorInfo, "componentStack", {
  4488. value: JSCompiler_inline_result
  4489. });
  4490. return JSCompiler_inline_result;
  4491. }
  4492. });
  4493. return errorInfo;
  4494. }
  4495. function logRecoverableError(request, error, errorInfo) {
  4496. request = request.onError;
  4497. error = request(error, errorInfo);
  4498. if (null == error || "string" === typeof error) return error;
  4499. }
  4500. function fatalError(request, error) {
  4501. var onShellError = request.onShellError,
  4502. onFatalError = request.onFatalError;
  4503. onShellError(error);
  4504. onFatalError(error);
  4505. null !== request.destination
  4506. ? ((request.status = 14), closeWithError(request.destination, error))
  4507. : ((request.status = 13), (request.fatalError = error));
  4508. }
  4509. function finishSuspenseListRow(request, row) {
  4510. unblockSuspenseListRow(request, row.next, row.hoistables);
  4511. }
  4512. function unblockSuspenseListRow(request, unblockedRow, inheritedHoistables) {
  4513. for (; null !== unblockedRow; ) {
  4514. null !== inheritedHoistables &&
  4515. (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),
  4516. (unblockedRow.inheritedHoistables = inheritedHoistables));
  4517. var unblockedBoundaries = unblockedRow.boundaries;
  4518. if (null !== unblockedBoundaries) {
  4519. unblockedRow.boundaries = null;
  4520. for (var i = 0; i < unblockedBoundaries.length; i++) {
  4521. var unblockedBoundary = unblockedBoundaries[i];
  4522. null !== inheritedHoistables &&
  4523. hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
  4524. finishedTask(request, unblockedBoundary, null, null);
  4525. }
  4526. }
  4527. unblockedRow.pendingTasks--;
  4528. if (0 < unblockedRow.pendingTasks) break;
  4529. inheritedHoistables = unblockedRow.hoistables;
  4530. unblockedRow = unblockedRow.next;
  4531. }
  4532. }
  4533. function tryToResolveTogetherRow(request, togetherRow) {
  4534. var boundaries = togetherRow.boundaries;
  4535. if (null !== boundaries && togetherRow.pendingTasks === boundaries.length) {
  4536. for (var allCompleteAndInlinable = !0, i = 0; i < boundaries.length; i++) {
  4537. var rowBoundary = boundaries[i];
  4538. if (
  4539. 1 !== rowBoundary.pendingTasks ||
  4540. rowBoundary.parentFlushed ||
  4541. isEligibleForOutlining(request, rowBoundary)
  4542. ) {
  4543. allCompleteAndInlinable = !1;
  4544. break;
  4545. }
  4546. }
  4547. allCompleteAndInlinable &&
  4548. unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);
  4549. }
  4550. }
  4551. function createSuspenseListRow(previousRow) {
  4552. var newRow = {
  4553. pendingTasks: 1,
  4554. boundaries: null,
  4555. hoistables: createHoistableState(),
  4556. inheritedHoistables: null,
  4557. together: !1,
  4558. next: null
  4559. };
  4560. null !== previousRow &&
  4561. 0 < previousRow.pendingTasks &&
  4562. (newRow.pendingTasks++,
  4563. (newRow.boundaries = []),
  4564. (previousRow.next = newRow));
  4565. return newRow;
  4566. }
  4567. function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
  4568. var prevKeyPath = task.keyPath,
  4569. prevTreeContext = task.treeContext,
  4570. prevRow = task.row;
  4571. task.keyPath = keyPath;
  4572. keyPath = rows.length;
  4573. var previousSuspenseListRow = null;
  4574. if (null !== task.replay) {
  4575. var resumeSlots = task.replay.slots;
  4576. if (null !== resumeSlots && "object" === typeof resumeSlots)
  4577. for (var n = 0; n < keyPath; n++) {
  4578. var i =
  4579. "backwards" !== revealOrder &&
  4580. "unstable_legacy-backwards" !== revealOrder
  4581. ? n
  4582. : keyPath - 1 - n,
  4583. node = rows[i];
  4584. task.row = previousSuspenseListRow = createSuspenseListRow(
  4585. previousSuspenseListRow
  4586. );
  4587. task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
  4588. var resumeSegmentID = resumeSlots[i];
  4589. "number" === typeof resumeSegmentID
  4590. ? (resumeNode(request, task, resumeSegmentID, node, i),
  4591. delete resumeSlots[i])
  4592. : renderNode(request, task, node, i);
  4593. 0 === --previousSuspenseListRow.pendingTasks &&
  4594. finishSuspenseListRow(request, previousSuspenseListRow);
  4595. }
  4596. else
  4597. for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)
  4598. (n =
  4599. "backwards" !== revealOrder &&
  4600. "unstable_legacy-backwards" !== revealOrder
  4601. ? resumeSlots
  4602. : keyPath - 1 - resumeSlots),
  4603. (i = rows[n]),
  4604. (task.row = previousSuspenseListRow =
  4605. createSuspenseListRow(previousSuspenseListRow)),
  4606. (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),
  4607. renderNode(request, task, i, n),
  4608. 0 === --previousSuspenseListRow.pendingTasks &&
  4609. finishSuspenseListRow(request, previousSuspenseListRow);
  4610. } else if (
  4611. "backwards" !== revealOrder &&
  4612. "unstable_legacy-backwards" !== revealOrder
  4613. )
  4614. for (revealOrder = 0; revealOrder < keyPath; revealOrder++)
  4615. (resumeSlots = rows[revealOrder]),
  4616. (task.row = previousSuspenseListRow =
  4617. createSuspenseListRow(previousSuspenseListRow)),
  4618. (task.treeContext = pushTreeContext(
  4619. prevTreeContext,
  4620. keyPath,
  4621. revealOrder
  4622. )),
  4623. renderNode(request, task, resumeSlots, revealOrder),
  4624. 0 === --previousSuspenseListRow.pendingTasks &&
  4625. finishSuspenseListRow(request, previousSuspenseListRow);
  4626. else {
  4627. revealOrder = task.blockedSegment;
  4628. resumeSlots = revealOrder.children.length;
  4629. n = revealOrder.chunks.length;
  4630. for (i = keyPath - 1; 0 <= i; i--) {
  4631. node = rows[i];
  4632. task.row = previousSuspenseListRow = createSuspenseListRow(
  4633. previousSuspenseListRow
  4634. );
  4635. task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
  4636. resumeSegmentID = createPendingSegment(
  4637. request,
  4638. n,
  4639. null,
  4640. task.formatContext,
  4641. 0 === i ? revealOrder.lastPushedText : !0,
  4642. !0
  4643. );
  4644. revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
  4645. task.blockedSegment = resumeSegmentID;
  4646. try {
  4647. renderNode(request, task, node, i),
  4648. resumeSegmentID.lastPushedText &&
  4649. resumeSegmentID.textEmbedded &&
  4650. resumeSegmentID.chunks.push(textSeparator),
  4651. (resumeSegmentID.status = 1),
  4652. finishedSegment(request, task.blockedBoundary, resumeSegmentID),
  4653. 0 === --previousSuspenseListRow.pendingTasks &&
  4654. finishSuspenseListRow(request, previousSuspenseListRow);
  4655. } catch (thrownValue) {
  4656. throw (
  4657. ((resumeSegmentID.status = 12 === request.status ? 3 : 4),
  4658. thrownValue)
  4659. );
  4660. }
  4661. }
  4662. task.blockedSegment = revealOrder;
  4663. revealOrder.lastPushedText = !1;
  4664. }
  4665. null !== prevRow &&
  4666. null !== previousSuspenseListRow &&
  4667. 0 < previousSuspenseListRow.pendingTasks &&
  4668. (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
  4669. task.treeContext = prevTreeContext;
  4670. task.row = prevRow;
  4671. task.keyPath = prevKeyPath;
  4672. }
  4673. function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
  4674. var prevThenableState = task.thenableState;
  4675. task.thenableState = null;
  4676. currentlyRenderingComponent = {};
  4677. currentlyRenderingTask = task;
  4678. currentlyRenderingRequest = request;
  4679. currentlyRenderingKeyPath = keyPath;
  4680. actionStateCounter = localIdCounter = 0;
  4681. actionStateMatchingIndex = -1;
  4682. thenableIndexCounter = 0;
  4683. thenableState = prevThenableState;
  4684. for (request = Component(props, secondArg); didScheduleRenderPhaseUpdate; )
  4685. (didScheduleRenderPhaseUpdate = !1),
  4686. (actionStateCounter = localIdCounter = 0),
  4687. (actionStateMatchingIndex = -1),
  4688. (thenableIndexCounter = 0),
  4689. (numberOfReRenders += 1),
  4690. (workInProgressHook = null),
  4691. (request = Component(props, secondArg));
  4692. resetHooksState();
  4693. return request;
  4694. }
  4695. function finishFunctionComponent(
  4696. request,
  4697. task,
  4698. keyPath,
  4699. children,
  4700. hasId,
  4701. actionStateCount,
  4702. actionStateMatchingIndex
  4703. ) {
  4704. var didEmitActionStateMarkers = !1;
  4705. if (0 !== actionStateCount && null !== request.formState) {
  4706. var segment = task.blockedSegment;
  4707. if (null !== segment) {
  4708. didEmitActionStateMarkers = !0;
  4709. segment = segment.chunks;
  4710. for (var i = 0; i < actionStateCount; i++)
  4711. i === actionStateMatchingIndex
  4712. ? segment.push(formStateMarkerIsMatching)
  4713. : segment.push(formStateMarkerIsNotMatching);
  4714. }
  4715. }
  4716. actionStateCount = task.keyPath;
  4717. task.keyPath = keyPath;
  4718. hasId
  4719. ? ((keyPath = task.treeContext),
  4720. (task.treeContext = pushTreeContext(keyPath, 1, 0)),
  4721. renderNode(request, task, children, -1),
  4722. (task.treeContext = keyPath))
  4723. : didEmitActionStateMarkers
  4724. ? renderNode(request, task, children, -1)
  4725. : renderNodeDestructive(request, task, children, -1);
  4726. task.keyPath = actionStateCount;
  4727. }
  4728. function renderElement(request, task, keyPath, type, props, ref) {
  4729. if ("function" === typeof type)
  4730. if (type.prototype && type.prototype.isReactComponent) {
  4731. var newProps = props;
  4732. if ("ref" in props) {
  4733. newProps = {};
  4734. for (var propName in props)
  4735. "ref" !== propName && (newProps[propName] = props[propName]);
  4736. }
  4737. var defaultProps = type.defaultProps;
  4738. if (defaultProps) {
  4739. newProps === props && (newProps = assign({}, newProps, props));
  4740. for (var propName$44 in defaultProps)
  4741. void 0 === newProps[propName$44] &&
  4742. (newProps[propName$44] = defaultProps[propName$44]);
  4743. }
  4744. props = newProps;
  4745. newProps = emptyContextObject;
  4746. defaultProps = type.contextType;
  4747. "object" === typeof defaultProps &&
  4748. null !== defaultProps &&
  4749. (newProps = defaultProps._currentValue);
  4750. newProps = new type(props, newProps);
  4751. var initialState = void 0 !== newProps.state ? newProps.state : null;
  4752. newProps.updater = classComponentUpdater;
  4753. newProps.props = props;
  4754. newProps.state = initialState;
  4755. defaultProps = { queue: [], replace: !1 };
  4756. newProps._reactInternals = defaultProps;
  4757. ref = type.contextType;
  4758. newProps.context =
  4759. "object" === typeof ref && null !== ref
  4760. ? ref._currentValue
  4761. : emptyContextObject;
  4762. ref = type.getDerivedStateFromProps;
  4763. "function" === typeof ref &&
  4764. ((ref = ref(props, initialState)),
  4765. (initialState =
  4766. null === ref || void 0 === ref
  4767. ? initialState
  4768. : assign({}, initialState, ref)),
  4769. (newProps.state = initialState));
  4770. if (
  4771. "function" !== typeof type.getDerivedStateFromProps &&
  4772. "function" !== typeof newProps.getSnapshotBeforeUpdate &&
  4773. ("function" === typeof newProps.UNSAFE_componentWillMount ||
  4774. "function" === typeof newProps.componentWillMount)
  4775. )
  4776. if (
  4777. ((type = newProps.state),
  4778. "function" === typeof newProps.componentWillMount &&
  4779. newProps.componentWillMount(),
  4780. "function" === typeof newProps.UNSAFE_componentWillMount &&
  4781. newProps.UNSAFE_componentWillMount(),
  4782. type !== newProps.state &&
  4783. classComponentUpdater.enqueueReplaceState(
  4784. newProps,
  4785. newProps.state,
  4786. null
  4787. ),
  4788. null !== defaultProps.queue && 0 < defaultProps.queue.length)
  4789. )
  4790. if (
  4791. ((type = defaultProps.queue),
  4792. (ref = defaultProps.replace),
  4793. (defaultProps.queue = null),
  4794. (defaultProps.replace = !1),
  4795. ref && 1 === type.length)
  4796. )
  4797. newProps.state = type[0];
  4798. else {
  4799. defaultProps = ref ? type[0] : newProps.state;
  4800. initialState = !0;
  4801. for (ref = ref ? 1 : 0; ref < type.length; ref++)
  4802. (propName$44 = type[ref]),
  4803. (propName$44 =
  4804. "function" === typeof propName$44
  4805. ? propName$44.call(newProps, defaultProps, props, void 0)
  4806. : propName$44),
  4807. null != propName$44 &&
  4808. (initialState
  4809. ? ((initialState = !1),
  4810. (defaultProps = assign({}, defaultProps, propName$44)))
  4811. : assign(defaultProps, propName$44));
  4812. newProps.state = defaultProps;
  4813. }
  4814. else defaultProps.queue = null;
  4815. type = newProps.render();
  4816. if (12 === request.status) throw null;
  4817. props = task.keyPath;
  4818. task.keyPath = keyPath;
  4819. renderNodeDestructive(request, task, type, -1);
  4820. task.keyPath = props;
  4821. } else {
  4822. type = renderWithHooks(request, task, keyPath, type, props, void 0);
  4823. if (12 === request.status) throw null;
  4824. finishFunctionComponent(
  4825. request,
  4826. task,
  4827. keyPath,
  4828. type,
  4829. 0 !== localIdCounter,
  4830. actionStateCounter,
  4831. actionStateMatchingIndex
  4832. );
  4833. }
  4834. else if ("string" === typeof type)
  4835. if (((newProps = task.blockedSegment), null === newProps))
  4836. (newProps = props.children),
  4837. (defaultProps = task.formatContext),
  4838. (initialState = task.keyPath),
  4839. (task.formatContext = getChildFormatContext(defaultProps, type, props)),
  4840. (task.keyPath = keyPath),
  4841. renderNode(request, task, newProps, -1),
  4842. (task.formatContext = defaultProps),
  4843. (task.keyPath = initialState);
  4844. else {
  4845. initialState = pushStartInstance(
  4846. newProps.chunks,
  4847. type,
  4848. props,
  4849. request.resumableState,
  4850. request.renderState,
  4851. task.blockedPreamble,
  4852. task.hoistableState,
  4853. task.formatContext,
  4854. newProps.lastPushedText
  4855. );
  4856. newProps.lastPushedText = !1;
  4857. defaultProps = task.formatContext;
  4858. ref = task.keyPath;
  4859. task.keyPath = keyPath;
  4860. if (
  4861. 3 ===
  4862. (task.formatContext = getChildFormatContext(defaultProps, type, props))
  4863. .insertionMode
  4864. ) {
  4865. keyPath = createPendingSegment(
  4866. request,
  4867. 0,
  4868. null,
  4869. task.formatContext,
  4870. !1,
  4871. !1
  4872. );
  4873. newProps.preambleChildren.push(keyPath);
  4874. task.blockedSegment = keyPath;
  4875. try {
  4876. (keyPath.status = 6),
  4877. renderNode(request, task, initialState, -1),
  4878. keyPath.lastPushedText &&
  4879. keyPath.textEmbedded &&
  4880. keyPath.chunks.push(textSeparator),
  4881. (keyPath.status = 1),
  4882. finishedSegment(request, task.blockedBoundary, keyPath);
  4883. } finally {
  4884. task.blockedSegment = newProps;
  4885. }
  4886. } else renderNode(request, task, initialState, -1);
  4887. task.formatContext = defaultProps;
  4888. task.keyPath = ref;
  4889. a: {
  4890. task = newProps.chunks;
  4891. request = request.resumableState;
  4892. switch (type) {
  4893. case "title":
  4894. case "style":
  4895. case "script":
  4896. case "area":
  4897. case "base":
  4898. case "br":
  4899. case "col":
  4900. case "embed":
  4901. case "hr":
  4902. case "img":
  4903. case "input":
  4904. case "keygen":
  4905. case "link":
  4906. case "meta":
  4907. case "param":
  4908. case "source":
  4909. case "track":
  4910. case "wbr":
  4911. break a;
  4912. case "body":
  4913. if (1 >= defaultProps.insertionMode) {
  4914. request.hasBody = !0;
  4915. break a;
  4916. }
  4917. break;
  4918. case "html":
  4919. if (0 === defaultProps.insertionMode) {
  4920. request.hasHtml = !0;
  4921. break a;
  4922. }
  4923. break;
  4924. case "head":
  4925. if (1 >= defaultProps.insertionMode) break a;
  4926. }
  4927. task.push(endChunkForTag(type));
  4928. }
  4929. newProps.lastPushedText = !1;
  4930. }
  4931. else {
  4932. switch (type) {
  4933. case REACT_LEGACY_HIDDEN_TYPE:
  4934. case REACT_STRICT_MODE_TYPE:
  4935. case REACT_PROFILER_TYPE:
  4936. case REACT_FRAGMENT_TYPE:
  4937. type = task.keyPath;
  4938. task.keyPath = keyPath;
  4939. renderNodeDestructive(request, task, props.children, -1);
  4940. task.keyPath = type;
  4941. return;
  4942. case REACT_ACTIVITY_TYPE:
  4943. type = task.blockedSegment;
  4944. null === type
  4945. ? "hidden" !== props.mode &&
  4946. ((type = task.keyPath),
  4947. (task.keyPath = keyPath),
  4948. renderNode(request, task, props.children, -1),
  4949. (task.keyPath = type))
  4950. : "hidden" !== props.mode &&
  4951. (type.chunks.push(startActivityBoundary),
  4952. (type.lastPushedText = !1),
  4953. (newProps = task.keyPath),
  4954. (task.keyPath = keyPath),
  4955. renderNode(request, task, props.children, -1),
  4956. (task.keyPath = newProps),
  4957. type.chunks.push(endActivityBoundary),
  4958. (type.lastPushedText = !1));
  4959. return;
  4960. case REACT_SUSPENSE_LIST_TYPE:
  4961. a: {
  4962. type = props.children;
  4963. props = props.revealOrder;
  4964. if (
  4965. "forwards" === props ||
  4966. "backwards" === props ||
  4967. "unstable_legacy-backwards" === props
  4968. ) {
  4969. if (isArrayImpl(type)) {
  4970. renderSuspenseListRows(request, task, keyPath, type, props);
  4971. break a;
  4972. }
  4973. if ((newProps = getIteratorFn(type)))
  4974. if ((newProps = newProps.call(type))) {
  4975. defaultProps = newProps.next();
  4976. if (!defaultProps.done) {
  4977. do defaultProps = newProps.next();
  4978. while (!defaultProps.done);
  4979. renderSuspenseListRows(request, task, keyPath, type, props);
  4980. }
  4981. break a;
  4982. }
  4983. }
  4984. "together" === props
  4985. ? ((props = task.keyPath),
  4986. (newProps = task.row),
  4987. (defaultProps = task.row = createSuspenseListRow(null)),
  4988. (defaultProps.boundaries = []),
  4989. (defaultProps.together = !0),
  4990. (task.keyPath = keyPath),
  4991. renderNodeDestructive(request, task, type, -1),
  4992. 0 === --defaultProps.pendingTasks &&
  4993. finishSuspenseListRow(request, defaultProps),
  4994. (task.keyPath = props),
  4995. (task.row = newProps),
  4996. null !== newProps &&
  4997. 0 < defaultProps.pendingTasks &&
  4998. (newProps.pendingTasks++, (defaultProps.next = newProps)))
  4999. : ((props = task.keyPath),
  5000. (task.keyPath = keyPath),
  5001. renderNodeDestructive(request, task, type, -1),
  5002. (task.keyPath = props));
  5003. }
  5004. return;
  5005. case REACT_VIEW_TRANSITION_TYPE:
  5006. case REACT_SCOPE_TYPE:
  5007. throw Error(formatProdErrorMessage(343));
  5008. case REACT_SUSPENSE_TYPE:
  5009. a: if (null !== task.replay) {
  5010. type = task.keyPath;
  5011. newProps = task.formatContext;
  5012. defaultProps = task.row;
  5013. task.keyPath = keyPath;
  5014. task.formatContext = getSuspenseContentFormatContext(
  5015. request.resumableState,
  5016. newProps
  5017. );
  5018. task.row = null;
  5019. keyPath = props.children;
  5020. try {
  5021. renderNode(request, task, keyPath, -1);
  5022. } finally {
  5023. (task.keyPath = type),
  5024. (task.formatContext = newProps),
  5025. (task.row = defaultProps);
  5026. }
  5027. } else {
  5028. type = task.keyPath;
  5029. ref = task.formatContext;
  5030. var prevRow = task.row;
  5031. propName$44 = task.blockedBoundary;
  5032. propName = task.blockedPreamble;
  5033. var parentHoistableState = task.hoistableState,
  5034. parentSegment = task.blockedSegment,
  5035. fallback = props.fallback;
  5036. props = props.children;
  5037. var fallbackAbortSet = new Set();
  5038. var newBoundary =
  5039. 2 > task.formatContext.insertionMode
  5040. ? createSuspenseBoundary(
  5041. request,
  5042. task.row,
  5043. fallbackAbortSet,
  5044. createPreambleState(),
  5045. createPreambleState()
  5046. )
  5047. : createSuspenseBoundary(
  5048. request,
  5049. task.row,
  5050. fallbackAbortSet,
  5051. null,
  5052. null
  5053. );
  5054. null !== request.trackedPostpones &&
  5055. (newBoundary.trackedContentKeyPath = keyPath);
  5056. var boundarySegment = createPendingSegment(
  5057. request,
  5058. parentSegment.chunks.length,
  5059. newBoundary,
  5060. task.formatContext,
  5061. !1,
  5062. !1
  5063. );
  5064. parentSegment.children.push(boundarySegment);
  5065. parentSegment.lastPushedText = !1;
  5066. var contentRootSegment = createPendingSegment(
  5067. request,
  5068. 0,
  5069. null,
  5070. task.formatContext,
  5071. !1,
  5072. !1
  5073. );
  5074. contentRootSegment.parentFlushed = !0;
  5075. if (null !== request.trackedPostpones) {
  5076. newProps = task.componentStack;
  5077. defaultProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
  5078. initialState = [defaultProps[1], defaultProps[2], [], null];
  5079. request.trackedPostpones.workingMap.set(defaultProps, initialState);
  5080. newBoundary.trackedFallbackNode = initialState;
  5081. task.blockedSegment = boundarySegment;
  5082. task.blockedPreamble = newBoundary.fallbackPreamble;
  5083. task.keyPath = defaultProps;
  5084. task.formatContext = getSuspenseFallbackFormatContext(
  5085. request.resumableState,
  5086. ref
  5087. );
  5088. task.componentStack =
  5089. replaceSuspenseComponentStackWithSuspenseFallbackStack(newProps);
  5090. boundarySegment.status = 6;
  5091. try {
  5092. renderNode(request, task, fallback, -1),
  5093. boundarySegment.lastPushedText &&
  5094. boundarySegment.textEmbedded &&
  5095. boundarySegment.chunks.push(textSeparator),
  5096. (boundarySegment.status = 1),
  5097. finishedSegment(request, propName$44, boundarySegment);
  5098. } catch (thrownValue) {
  5099. throw (
  5100. ((boundarySegment.status = 12 === request.status ? 3 : 4),
  5101. thrownValue)
  5102. );
  5103. } finally {
  5104. (task.blockedSegment = parentSegment),
  5105. (task.blockedPreamble = propName),
  5106. (task.keyPath = type),
  5107. (task.formatContext = ref);
  5108. }
  5109. task = createRenderTask(
  5110. request,
  5111. null,
  5112. props,
  5113. -1,
  5114. newBoundary,
  5115. contentRootSegment,
  5116. newBoundary.contentPreamble,
  5117. newBoundary.contentState,
  5118. task.abortSet,
  5119. keyPath,
  5120. getSuspenseContentFormatContext(
  5121. request.resumableState,
  5122. task.formatContext
  5123. ),
  5124. task.context,
  5125. task.treeContext,
  5126. null,
  5127. newProps
  5128. );
  5129. pushComponentStack(task);
  5130. request.pingedTasks.push(task);
  5131. } else {
  5132. task.blockedBoundary = newBoundary;
  5133. task.blockedPreamble = newBoundary.contentPreamble;
  5134. task.hoistableState = newBoundary.contentState;
  5135. task.blockedSegment = contentRootSegment;
  5136. task.keyPath = keyPath;
  5137. task.formatContext = getSuspenseContentFormatContext(
  5138. request.resumableState,
  5139. ref
  5140. );
  5141. task.row = null;
  5142. contentRootSegment.status = 6;
  5143. try {
  5144. if (
  5145. (renderNode(request, task, props, -1),
  5146. contentRootSegment.lastPushedText &&
  5147. contentRootSegment.textEmbedded &&
  5148. contentRootSegment.chunks.push(textSeparator),
  5149. (contentRootSegment.status = 1),
  5150. finishedSegment(request, newBoundary, contentRootSegment),
  5151. queueCompletedSegment(newBoundary, contentRootSegment),
  5152. 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
  5153. ) {
  5154. if (
  5155. ((newBoundary.status = 1),
  5156. !isEligibleForOutlining(request, newBoundary))
  5157. ) {
  5158. null !== prevRow &&
  5159. 0 === --prevRow.pendingTasks &&
  5160. finishSuspenseListRow(request, prevRow);
  5161. 0 === request.pendingRootTasks &&
  5162. task.blockedPreamble &&
  5163. preparePreamble(request);
  5164. break a;
  5165. }
  5166. } else
  5167. null !== prevRow &&
  5168. prevRow.together &&
  5169. tryToResolveTogetherRow(request, prevRow);
  5170. } catch (thrownValue$31) {
  5171. (newBoundary.status = 4),
  5172. 12 === request.status
  5173. ? ((contentRootSegment.status = 3),
  5174. (newProps = request.fatalError))
  5175. : ((contentRootSegment.status = 4),
  5176. (newProps = thrownValue$31)),
  5177. (defaultProps = getThrownInfo(task.componentStack)),
  5178. (initialState = logRecoverableError(
  5179. request,
  5180. newProps,
  5181. defaultProps
  5182. )),
  5183. (newBoundary.errorDigest = initialState),
  5184. untrackBoundary(request, newBoundary);
  5185. } finally {
  5186. (task.blockedBoundary = propName$44),
  5187. (task.blockedPreamble = propName),
  5188. (task.hoistableState = parentHoistableState),
  5189. (task.blockedSegment = parentSegment),
  5190. (task.keyPath = type),
  5191. (task.formatContext = ref),
  5192. (task.row = prevRow);
  5193. }
  5194. task = createRenderTask(
  5195. request,
  5196. null,
  5197. fallback,
  5198. -1,
  5199. propName$44,
  5200. boundarySegment,
  5201. newBoundary.fallbackPreamble,
  5202. newBoundary.fallbackState,
  5203. fallbackAbortSet,
  5204. [keyPath[0], "Suspense Fallback", keyPath[2]],
  5205. getSuspenseFallbackFormatContext(
  5206. request.resumableState,
  5207. task.formatContext
  5208. ),
  5209. task.context,
  5210. task.treeContext,
  5211. task.row,
  5212. replaceSuspenseComponentStackWithSuspenseFallbackStack(
  5213. task.componentStack
  5214. )
  5215. );
  5216. pushComponentStack(task);
  5217. request.pingedTasks.push(task);
  5218. }
  5219. }
  5220. return;
  5221. }
  5222. if ("object" === typeof type && null !== type)
  5223. switch (type.$$typeof) {
  5224. case REACT_FORWARD_REF_TYPE:
  5225. if ("ref" in props)
  5226. for (parentSegment in ((newProps = {}), props))
  5227. "ref" !== parentSegment &&
  5228. (newProps[parentSegment] = props[parentSegment]);
  5229. else newProps = props;
  5230. type = renderWithHooks(
  5231. request,
  5232. task,
  5233. keyPath,
  5234. type.render,
  5235. newProps,
  5236. ref
  5237. );
  5238. finishFunctionComponent(
  5239. request,
  5240. task,
  5241. keyPath,
  5242. type,
  5243. 0 !== localIdCounter,
  5244. actionStateCounter,
  5245. actionStateMatchingIndex
  5246. );
  5247. return;
  5248. case REACT_MEMO_TYPE:
  5249. renderElement(request, task, keyPath, type.type, props, ref);
  5250. return;
  5251. case REACT_CONTEXT_TYPE:
  5252. defaultProps = props.children;
  5253. newProps = task.keyPath;
  5254. props = props.value;
  5255. initialState = type._currentValue;
  5256. type._currentValue = props;
  5257. ref = currentActiveSnapshot;
  5258. currentActiveSnapshot = type = {
  5259. parent: ref,
  5260. depth: null === ref ? 0 : ref.depth + 1,
  5261. context: type,
  5262. parentValue: initialState,
  5263. value: props
  5264. };
  5265. task.context = type;
  5266. task.keyPath = keyPath;
  5267. renderNodeDestructive(request, task, defaultProps, -1);
  5268. request = currentActiveSnapshot;
  5269. if (null === request) throw Error(formatProdErrorMessage(403));
  5270. request.context._currentValue = request.parentValue;
  5271. request = currentActiveSnapshot = request.parent;
  5272. task.context = request;
  5273. task.keyPath = newProps;
  5274. return;
  5275. case REACT_CONSUMER_TYPE:
  5276. props = props.children;
  5277. type = props(type._context._currentValue);
  5278. props = task.keyPath;
  5279. task.keyPath = keyPath;
  5280. renderNodeDestructive(request, task, type, -1);
  5281. task.keyPath = props;
  5282. return;
  5283. case REACT_LAZY_TYPE:
  5284. newProps = type._init;
  5285. type = newProps(type._payload);
  5286. if (12 === request.status) throw null;
  5287. renderElement(request, task, keyPath, type, props, ref);
  5288. return;
  5289. }
  5290. throw Error(
  5291. formatProdErrorMessage(130, null == type ? type : typeof type, "")
  5292. );
  5293. }
  5294. }
  5295. function resumeNode(request, task, segmentId, node, childIndex) {
  5296. var prevReplay = task.replay,
  5297. blockedBoundary = task.blockedBoundary,
  5298. resumedSegment = createPendingSegment(
  5299. request,
  5300. 0,
  5301. null,
  5302. task.formatContext,
  5303. !1,
  5304. !1
  5305. );
  5306. resumedSegment.id = segmentId;
  5307. resumedSegment.parentFlushed = !0;
  5308. try {
  5309. (task.replay = null),
  5310. (task.blockedSegment = resumedSegment),
  5311. renderNode(request, task, node, childIndex),
  5312. (resumedSegment.status = 1),
  5313. finishedSegment(request, blockedBoundary, resumedSegment),
  5314. null === blockedBoundary
  5315. ? (request.completedRootSegment = resumedSegment)
  5316. : (queueCompletedSegment(blockedBoundary, resumedSegment),
  5317. blockedBoundary.parentFlushed &&
  5318. request.partialBoundaries.push(blockedBoundary));
  5319. } finally {
  5320. (task.replay = prevReplay), (task.blockedSegment = null);
  5321. }
  5322. }
  5323. function renderNodeDestructive(request, task, node, childIndex) {
  5324. null !== task.replay && "number" === typeof task.replay.slots
  5325. ? resumeNode(request, task, task.replay.slots, node, childIndex)
  5326. : ((task.node = node),
  5327. (task.childIndex = childIndex),
  5328. (node = task.componentStack),
  5329. pushComponentStack(task),
  5330. retryNode(request, task),
  5331. (task.componentStack = node));
  5332. }
  5333. function retryNode(request, task) {
  5334. var node = task.node,
  5335. childIndex = task.childIndex;
  5336. if (null !== node) {
  5337. if ("object" === typeof node) {
  5338. switch (node.$$typeof) {
  5339. case REACT_ELEMENT_TYPE:
  5340. var type = node.type,
  5341. key = node.key,
  5342. props = node.props;
  5343. node = props.ref;
  5344. var ref = void 0 !== node ? node : null,
  5345. name = getComponentNameFromType(type),
  5346. keyOrIndex =
  5347. null == key ? (-1 === childIndex ? 0 : childIndex) : key;
  5348. key = [task.keyPath, name, keyOrIndex];
  5349. if (null !== task.replay)
  5350. a: {
  5351. var replay = task.replay;
  5352. childIndex = replay.nodes;
  5353. for (node = 0; node < childIndex.length; node++) {
  5354. var node$jscomp$0 = childIndex[node];
  5355. if (keyOrIndex === node$jscomp$0[1]) {
  5356. if (4 === node$jscomp$0.length) {
  5357. if (null !== name && name !== node$jscomp$0[0])
  5358. throw Error(
  5359. formatProdErrorMessage(490, node$jscomp$0[0], name)
  5360. );
  5361. var childNodes = node$jscomp$0[2];
  5362. name = node$jscomp$0[3];
  5363. keyOrIndex = task.node;
  5364. task.replay = {
  5365. nodes: childNodes,
  5366. slots: name,
  5367. pendingTasks: 1
  5368. };
  5369. try {
  5370. renderElement(request, task, key, type, props, ref);
  5371. if (
  5372. 1 === task.replay.pendingTasks &&
  5373. 0 < task.replay.nodes.length
  5374. )
  5375. throw Error(formatProdErrorMessage(488));
  5376. task.replay.pendingTasks--;
  5377. } catch (x) {
  5378. if (
  5379. "object" === typeof x &&
  5380. null !== x &&
  5381. (x === SuspenseException ||
  5382. "function" === typeof x.then)
  5383. )
  5384. throw (
  5385. (task.node === keyOrIndex
  5386. ? (task.replay = replay)
  5387. : childIndex.splice(node, 1),
  5388. x)
  5389. );
  5390. task.replay.pendingTasks--;
  5391. props = getThrownInfo(task.componentStack);
  5392. key = request;
  5393. request = task.blockedBoundary;
  5394. type = x;
  5395. props = logRecoverableError(key, type, props);
  5396. abortRemainingReplayNodes(
  5397. key,
  5398. request,
  5399. childNodes,
  5400. name,
  5401. type,
  5402. props
  5403. );
  5404. }
  5405. task.replay = replay;
  5406. } else {
  5407. if (type !== REACT_SUSPENSE_TYPE)
  5408. throw Error(
  5409. formatProdErrorMessage(
  5410. 490,
  5411. "Suspense",
  5412. getComponentNameFromType(type) || "Unknown"
  5413. )
  5414. );
  5415. b: {
  5416. replay = void 0;
  5417. type = node$jscomp$0[5];
  5418. ref = node$jscomp$0[2];
  5419. name = node$jscomp$0[3];
  5420. keyOrIndex =
  5421. null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
  5422. node$jscomp$0 =
  5423. null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
  5424. var prevKeyPath = task.keyPath,
  5425. prevContext = task.formatContext,
  5426. prevRow = task.row,
  5427. previousReplaySet = task.replay,
  5428. parentBoundary = task.blockedBoundary,
  5429. parentHoistableState = task.hoistableState,
  5430. content = props.children,
  5431. fallback = props.fallback,
  5432. fallbackAbortSet = new Set();
  5433. props =
  5434. 2 > task.formatContext.insertionMode
  5435. ? createSuspenseBoundary(
  5436. request,
  5437. task.row,
  5438. fallbackAbortSet,
  5439. createPreambleState(),
  5440. createPreambleState()
  5441. )
  5442. : createSuspenseBoundary(
  5443. request,
  5444. task.row,
  5445. fallbackAbortSet,
  5446. null,
  5447. null
  5448. );
  5449. props.parentFlushed = !0;
  5450. props.rootSegmentID = type;
  5451. task.blockedBoundary = props;
  5452. task.hoistableState = props.contentState;
  5453. task.keyPath = key;
  5454. task.formatContext = getSuspenseContentFormatContext(
  5455. request.resumableState,
  5456. prevContext
  5457. );
  5458. task.row = null;
  5459. task.replay = {
  5460. nodes: ref,
  5461. slots: name,
  5462. pendingTasks: 1
  5463. };
  5464. try {
  5465. renderNode(request, task, content, -1);
  5466. if (
  5467. 1 === task.replay.pendingTasks &&
  5468. 0 < task.replay.nodes.length
  5469. )
  5470. throw Error(formatProdErrorMessage(488));
  5471. task.replay.pendingTasks--;
  5472. if (0 === props.pendingTasks && 0 === props.status) {
  5473. props.status = 1;
  5474. request.completedBoundaries.push(props);
  5475. break b;
  5476. }
  5477. } catch (error) {
  5478. (props.status = 4),
  5479. (childNodes = getThrownInfo(task.componentStack)),
  5480. (replay = logRecoverableError(
  5481. request,
  5482. error,
  5483. childNodes
  5484. )),
  5485. (props.errorDigest = replay),
  5486. task.replay.pendingTasks--,
  5487. request.clientRenderedBoundaries.push(props);
  5488. } finally {
  5489. (task.blockedBoundary = parentBoundary),
  5490. (task.hoistableState = parentHoistableState),
  5491. (task.replay = previousReplaySet),
  5492. (task.keyPath = prevKeyPath),
  5493. (task.formatContext = prevContext),
  5494. (task.row = prevRow);
  5495. }
  5496. childNodes = createReplayTask(
  5497. request,
  5498. null,
  5499. {
  5500. nodes: keyOrIndex,
  5501. slots: node$jscomp$0,
  5502. pendingTasks: 0
  5503. },
  5504. fallback,
  5505. -1,
  5506. parentBoundary,
  5507. props.fallbackState,
  5508. fallbackAbortSet,
  5509. [key[0], "Suspense Fallback", key[2]],
  5510. getSuspenseFallbackFormatContext(
  5511. request.resumableState,
  5512. task.formatContext
  5513. ),
  5514. task.context,
  5515. task.treeContext,
  5516. task.row,
  5517. replaceSuspenseComponentStackWithSuspenseFallbackStack(
  5518. task.componentStack
  5519. )
  5520. );
  5521. pushComponentStack(childNodes);
  5522. request.pingedTasks.push(childNodes);
  5523. }
  5524. }
  5525. childIndex.splice(node, 1);
  5526. break a;
  5527. }
  5528. }
  5529. }
  5530. else renderElement(request, task, key, type, props, ref);
  5531. return;
  5532. case REACT_PORTAL_TYPE:
  5533. throw Error(formatProdErrorMessage(257));
  5534. case REACT_LAZY_TYPE:
  5535. childNodes = node._init;
  5536. node = childNodes(node._payload);
  5537. if (12 === request.status) throw null;
  5538. renderNodeDestructive(request, task, node, childIndex);
  5539. return;
  5540. }
  5541. if (isArrayImpl(node)) {
  5542. renderChildrenArray(request, task, node, childIndex);
  5543. return;
  5544. }
  5545. if ((childNodes = getIteratorFn(node)))
  5546. if ((childNodes = childNodes.call(node))) {
  5547. node = childNodes.next();
  5548. if (!node.done) {
  5549. props = [];
  5550. do props.push(node.value), (node = childNodes.next());
  5551. while (!node.done);
  5552. renderChildrenArray(request, task, props, childIndex);
  5553. }
  5554. return;
  5555. }
  5556. if ("function" === typeof node.then)
  5557. return (
  5558. (task.thenableState = null),
  5559. renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
  5560. );
  5561. if (node.$$typeof === REACT_CONTEXT_TYPE)
  5562. return renderNodeDestructive(
  5563. request,
  5564. task,
  5565. node._currentValue,
  5566. childIndex
  5567. );
  5568. childIndex = Object.prototype.toString.call(node);
  5569. throw Error(
  5570. formatProdErrorMessage(
  5571. 31,
  5572. "[object Object]" === childIndex
  5573. ? "object with keys {" + Object.keys(node).join(", ") + "}"
  5574. : childIndex
  5575. )
  5576. );
  5577. }
  5578. if ("string" === typeof node)
  5579. (childIndex = task.blockedSegment),
  5580. null !== childIndex &&
  5581. (childIndex.lastPushedText = pushTextInstance(
  5582. childIndex.chunks,
  5583. node,
  5584. request.renderState,
  5585. childIndex.lastPushedText
  5586. ));
  5587. else if ("number" === typeof node || "bigint" === typeof node)
  5588. (childIndex = task.blockedSegment),
  5589. null !== childIndex &&
  5590. (childIndex.lastPushedText = pushTextInstance(
  5591. childIndex.chunks,
  5592. "" + node,
  5593. request.renderState,
  5594. childIndex.lastPushedText
  5595. ));
  5596. }
  5597. }
  5598. function renderChildrenArray(request, task, children, childIndex) {
  5599. var prevKeyPath = task.keyPath;
  5600. if (
  5601. -1 !== childIndex &&
  5602. ((task.keyPath = [task.keyPath, "Fragment", childIndex]),
  5603. null !== task.replay)
  5604. ) {
  5605. for (
  5606. var replay = task.replay, replayNodes = replay.nodes, j = 0;
  5607. j < replayNodes.length;
  5608. j++
  5609. ) {
  5610. var node = replayNodes[j];
  5611. if (node[1] === childIndex) {
  5612. childIndex = node[2];
  5613. node = node[3];
  5614. task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
  5615. try {
  5616. renderChildrenArray(request, task, children, -1);
  5617. if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
  5618. throw Error(formatProdErrorMessage(488));
  5619. task.replay.pendingTasks--;
  5620. } catch (x) {
  5621. if (
  5622. "object" === typeof x &&
  5623. null !== x &&
  5624. (x === SuspenseException || "function" === typeof x.then)
  5625. )
  5626. throw x;
  5627. task.replay.pendingTasks--;
  5628. children = getThrownInfo(task.componentStack);
  5629. var boundary = task.blockedBoundary,
  5630. error = x;
  5631. children = logRecoverableError(request, error, children);
  5632. abortRemainingReplayNodes(
  5633. request,
  5634. boundary,
  5635. childIndex,
  5636. node,
  5637. error,
  5638. children
  5639. );
  5640. }
  5641. task.replay = replay;
  5642. replayNodes.splice(j, 1);
  5643. break;
  5644. }
  5645. }
  5646. task.keyPath = prevKeyPath;
  5647. return;
  5648. }
  5649. replay = task.treeContext;
  5650. replayNodes = children.length;
  5651. if (
  5652. null !== task.replay &&
  5653. ((j = task.replay.slots), null !== j && "object" === typeof j)
  5654. ) {
  5655. for (childIndex = 0; childIndex < replayNodes; childIndex++)
  5656. (node = children[childIndex]),
  5657. (task.treeContext = pushTreeContext(replay, replayNodes, childIndex)),
  5658. (boundary = j[childIndex]),
  5659. "number" === typeof boundary
  5660. ? (resumeNode(request, task, boundary, node, childIndex),
  5661. delete j[childIndex])
  5662. : renderNode(request, task, node, childIndex);
  5663. task.treeContext = replay;
  5664. task.keyPath = prevKeyPath;
  5665. return;
  5666. }
  5667. for (j = 0; j < replayNodes; j++)
  5668. (childIndex = children[j]),
  5669. (task.treeContext = pushTreeContext(replay, replayNodes, j)),
  5670. renderNode(request, task, childIndex, j);
  5671. task.treeContext = replay;
  5672. task.keyPath = prevKeyPath;
  5673. }
  5674. function trackPostponedBoundary(request, trackedPostpones, boundary) {
  5675. boundary.status = 5;
  5676. boundary.rootSegmentID = request.nextSegmentId++;
  5677. request = boundary.trackedContentKeyPath;
  5678. if (null === request) throw Error(formatProdErrorMessage(486));
  5679. var fallbackReplayNode = boundary.trackedFallbackNode,
  5680. children = [],
  5681. boundaryNode = trackedPostpones.workingMap.get(request);
  5682. if (void 0 === boundaryNode)
  5683. return (
  5684. (boundary = [
  5685. request[1],
  5686. request[2],
  5687. children,
  5688. null,
  5689. fallbackReplayNode,
  5690. boundary.rootSegmentID
  5691. ]),
  5692. trackedPostpones.workingMap.set(request, boundary),
  5693. addToReplayParent(boundary, request[0], trackedPostpones),
  5694. boundary
  5695. );
  5696. boundaryNode[4] = fallbackReplayNode;
  5697. boundaryNode[5] = boundary.rootSegmentID;
  5698. return boundaryNode;
  5699. }
  5700. function trackPostpone(request, trackedPostpones, task, segment) {
  5701. segment.status = 5;
  5702. var keyPath = task.keyPath,
  5703. boundary = task.blockedBoundary;
  5704. if (null === boundary)
  5705. (segment.id = request.nextSegmentId++),
  5706. (trackedPostpones.rootSlots = segment.id),
  5707. null !== request.completedRootSegment &&
  5708. (request.completedRootSegment.status = 5);
  5709. else {
  5710. if (null !== boundary && 0 === boundary.status) {
  5711. var boundaryNode = trackPostponedBoundary(
  5712. request,
  5713. trackedPostpones,
  5714. boundary
  5715. );
  5716. if (
  5717. boundary.trackedContentKeyPath === keyPath &&
  5718. -1 === task.childIndex
  5719. ) {
  5720. -1 === segment.id &&
  5721. (segment.id = segment.parentFlushed
  5722. ? boundary.rootSegmentID
  5723. : request.nextSegmentId++);
  5724. boundaryNode[3] = segment.id;
  5725. return;
  5726. }
  5727. }
  5728. -1 === segment.id &&
  5729. (segment.id =
  5730. segment.parentFlushed && null !== boundary
  5731. ? boundary.rootSegmentID
  5732. : request.nextSegmentId++);
  5733. if (-1 === task.childIndex)
  5734. null === keyPath
  5735. ? (trackedPostpones.rootSlots = segment.id)
  5736. : ((task = trackedPostpones.workingMap.get(keyPath)),
  5737. void 0 === task
  5738. ? ((task = [keyPath[1], keyPath[2], [], segment.id]),
  5739. addToReplayParent(task, keyPath[0], trackedPostpones))
  5740. : (task[3] = segment.id));
  5741. else {
  5742. if (null === keyPath)
  5743. if (((request = trackedPostpones.rootSlots), null === request))
  5744. request = trackedPostpones.rootSlots = {};
  5745. else {
  5746. if ("number" === typeof request)
  5747. throw Error(formatProdErrorMessage(491));
  5748. }
  5749. else if (
  5750. ((boundary = trackedPostpones.workingMap),
  5751. (boundaryNode = boundary.get(keyPath)),
  5752. void 0 === boundaryNode)
  5753. )
  5754. (request = {}),
  5755. (boundaryNode = [keyPath[1], keyPath[2], [], request]),
  5756. boundary.set(keyPath, boundaryNode),
  5757. addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);
  5758. else if (((request = boundaryNode[3]), null === request))
  5759. request = boundaryNode[3] = {};
  5760. else if ("number" === typeof request)
  5761. throw Error(formatProdErrorMessage(491));
  5762. request[task.childIndex] = segment.id;
  5763. }
  5764. }
  5765. }
  5766. function untrackBoundary(request, boundary) {
  5767. request = request.trackedPostpones;
  5768. null !== request &&
  5769. ((boundary = boundary.trackedContentKeyPath),
  5770. null !== boundary &&
  5771. ((boundary = request.workingMap.get(boundary)),
  5772. void 0 !== boundary &&
  5773. ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
  5774. }
  5775. function spawnNewSuspendedReplayTask(request, task, thenableState) {
  5776. return createReplayTask(
  5777. request,
  5778. thenableState,
  5779. task.replay,
  5780. task.node,
  5781. task.childIndex,
  5782. task.blockedBoundary,
  5783. task.hoistableState,
  5784. task.abortSet,
  5785. task.keyPath,
  5786. task.formatContext,
  5787. task.context,
  5788. task.treeContext,
  5789. task.row,
  5790. task.componentStack
  5791. );
  5792. }
  5793. function spawnNewSuspendedRenderTask(request, task, thenableState) {
  5794. var segment = task.blockedSegment,
  5795. newSegment = createPendingSegment(
  5796. request,
  5797. segment.chunks.length,
  5798. null,
  5799. task.formatContext,
  5800. segment.lastPushedText,
  5801. !0
  5802. );
  5803. segment.children.push(newSegment);
  5804. segment.lastPushedText = !1;
  5805. return createRenderTask(
  5806. request,
  5807. thenableState,
  5808. task.node,
  5809. task.childIndex,
  5810. task.blockedBoundary,
  5811. newSegment,
  5812. task.blockedPreamble,
  5813. task.hoistableState,
  5814. task.abortSet,
  5815. task.keyPath,
  5816. task.formatContext,
  5817. task.context,
  5818. task.treeContext,
  5819. task.row,
  5820. task.componentStack
  5821. );
  5822. }
  5823. function renderNode(request, task, node, childIndex) {
  5824. var previousFormatContext = task.formatContext,
  5825. previousContext = task.context,
  5826. previousKeyPath = task.keyPath,
  5827. previousTreeContext = task.treeContext,
  5828. previousComponentStack = task.componentStack,
  5829. segment = task.blockedSegment;
  5830. if (null === segment) {
  5831. segment = task.replay;
  5832. try {
  5833. return renderNodeDestructive(request, task, node, childIndex);
  5834. } catch (thrownValue) {
  5835. if (
  5836. (resetHooksState(),
  5837. (node =
  5838. thrownValue === SuspenseException
  5839. ? getSuspendedThenable()
  5840. : thrownValue),
  5841. 12 !== request.status && "object" === typeof node && null !== node)
  5842. ) {
  5843. if ("function" === typeof node.then) {
  5844. childIndex =
  5845. thrownValue === SuspenseException
  5846. ? getThenableStateAfterSuspending()
  5847. : null;
  5848. request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
  5849. node.then(request, request);
  5850. task.formatContext = previousFormatContext;
  5851. task.context = previousContext;
  5852. task.keyPath = previousKeyPath;
  5853. task.treeContext = previousTreeContext;
  5854. task.componentStack = previousComponentStack;
  5855. task.replay = segment;
  5856. switchContext(previousContext);
  5857. return;
  5858. }
  5859. if ("Maximum call stack size exceeded" === node.message) {
  5860. node =
  5861. thrownValue === SuspenseException
  5862. ? getThenableStateAfterSuspending()
  5863. : null;
  5864. node = spawnNewSuspendedReplayTask(request, task, node);
  5865. request.pingedTasks.push(node);
  5866. task.formatContext = previousFormatContext;
  5867. task.context = previousContext;
  5868. task.keyPath = previousKeyPath;
  5869. task.treeContext = previousTreeContext;
  5870. task.componentStack = previousComponentStack;
  5871. task.replay = segment;
  5872. switchContext(previousContext);
  5873. return;
  5874. }
  5875. }
  5876. }
  5877. } else {
  5878. var childrenLength = segment.children.length,
  5879. chunkLength = segment.chunks.length;
  5880. try {
  5881. return renderNodeDestructive(request, task, node, childIndex);
  5882. } catch (thrownValue$63) {
  5883. if (
  5884. (resetHooksState(),
  5885. (segment.children.length = childrenLength),
  5886. (segment.chunks.length = chunkLength),
  5887. (node =
  5888. thrownValue$63 === SuspenseException
  5889. ? getSuspendedThenable()
  5890. : thrownValue$63),
  5891. 12 !== request.status && "object" === typeof node && null !== node)
  5892. ) {
  5893. if ("function" === typeof node.then) {
  5894. segment = node;
  5895. node =
  5896. thrownValue$63 === SuspenseException
  5897. ? getThenableStateAfterSuspending()
  5898. : null;
  5899. request = spawnNewSuspendedRenderTask(request, task, node).ping;
  5900. segment.then(request, request);
  5901. task.formatContext = previousFormatContext;
  5902. task.context = previousContext;
  5903. task.keyPath = previousKeyPath;
  5904. task.treeContext = previousTreeContext;
  5905. task.componentStack = previousComponentStack;
  5906. switchContext(previousContext);
  5907. return;
  5908. }
  5909. if ("Maximum call stack size exceeded" === node.message) {
  5910. segment =
  5911. thrownValue$63 === SuspenseException
  5912. ? getThenableStateAfterSuspending()
  5913. : null;
  5914. segment = spawnNewSuspendedRenderTask(request, task, segment);
  5915. request.pingedTasks.push(segment);
  5916. task.formatContext = previousFormatContext;
  5917. task.context = previousContext;
  5918. task.keyPath = previousKeyPath;
  5919. task.treeContext = previousTreeContext;
  5920. task.componentStack = previousComponentStack;
  5921. switchContext(previousContext);
  5922. return;
  5923. }
  5924. }
  5925. }
  5926. }
  5927. task.formatContext = previousFormatContext;
  5928. task.context = previousContext;
  5929. task.keyPath = previousKeyPath;
  5930. task.treeContext = previousTreeContext;
  5931. switchContext(previousContext);
  5932. throw node;
  5933. }
  5934. function abortTaskSoft(task) {
  5935. var boundary = task.blockedBoundary,
  5936. segment = task.blockedSegment;
  5937. null !== segment &&
  5938. ((segment.status = 3), finishedTask(this, boundary, task.row, segment));
  5939. }
  5940. function abortRemainingReplayNodes(
  5941. request$jscomp$0,
  5942. boundary,
  5943. nodes,
  5944. slots,
  5945. error,
  5946. errorDigest$jscomp$0
  5947. ) {
  5948. for (var i = 0; i < nodes.length; i++) {
  5949. var node = nodes[i];
  5950. if (4 === node.length)
  5951. abortRemainingReplayNodes(
  5952. request$jscomp$0,
  5953. boundary,
  5954. node[2],
  5955. node[3],
  5956. error,
  5957. errorDigest$jscomp$0
  5958. );
  5959. else {
  5960. node = node[5];
  5961. var request = request$jscomp$0,
  5962. errorDigest = errorDigest$jscomp$0,
  5963. resumedBoundary = createSuspenseBoundary(
  5964. request,
  5965. null,
  5966. new Set(),
  5967. null,
  5968. null
  5969. );
  5970. resumedBoundary.parentFlushed = !0;
  5971. resumedBoundary.rootSegmentID = node;
  5972. resumedBoundary.status = 4;
  5973. resumedBoundary.errorDigest = errorDigest;
  5974. resumedBoundary.parentFlushed &&
  5975. request.clientRenderedBoundaries.push(resumedBoundary);
  5976. }
  5977. }
  5978. nodes.length = 0;
  5979. if (null !== slots) {
  5980. if (null === boundary) throw Error(formatProdErrorMessage(487));
  5981. 4 !== boundary.status &&
  5982. ((boundary.status = 4),
  5983. (boundary.errorDigest = errorDigest$jscomp$0),
  5984. boundary.parentFlushed &&
  5985. request$jscomp$0.clientRenderedBoundaries.push(boundary));
  5986. if ("object" === typeof slots) for (var index in slots) delete slots[index];
  5987. }
  5988. }
  5989. function abortTask(task, request, error) {
  5990. var boundary = task.blockedBoundary,
  5991. segment = task.blockedSegment;
  5992. if (null !== segment) {
  5993. if (6 === segment.status) return;
  5994. segment.status = 3;
  5995. }
  5996. var errorInfo = getThrownInfo(task.componentStack);
  5997. if (null === boundary) {
  5998. if (13 !== request.status && 14 !== request.status) {
  5999. boundary = task.replay;
  6000. if (null === boundary) {
  6001. null !== request.trackedPostpones && null !== segment
  6002. ? ((boundary = request.trackedPostpones),
  6003. logRecoverableError(request, error, errorInfo),
  6004. trackPostpone(request, boundary, task, segment),
  6005. finishedTask(request, null, task.row, segment))
  6006. : (logRecoverableError(request, error, errorInfo),
  6007. fatalError(request, error));
  6008. return;
  6009. }
  6010. boundary.pendingTasks--;
  6011. 0 === boundary.pendingTasks &&
  6012. 0 < boundary.nodes.length &&
  6013. ((segment = logRecoverableError(request, error, errorInfo)),
  6014. abortRemainingReplayNodes(
  6015. request,
  6016. null,
  6017. boundary.nodes,
  6018. boundary.slots,
  6019. error,
  6020. segment
  6021. ));
  6022. request.pendingRootTasks--;
  6023. 0 === request.pendingRootTasks && completeShell(request);
  6024. }
  6025. } else {
  6026. var trackedPostpones$64 = request.trackedPostpones;
  6027. if (4 !== boundary.status) {
  6028. if (null !== trackedPostpones$64 && null !== segment)
  6029. return (
  6030. logRecoverableError(request, error, errorInfo),
  6031. trackPostpone(request, trackedPostpones$64, task, segment),
  6032. boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
  6033. return abortTask(fallbackTask, request, error);
  6034. }),
  6035. boundary.fallbackAbortableTasks.clear(),
  6036. finishedTask(request, boundary, task.row, segment)
  6037. );
  6038. boundary.status = 4;
  6039. segment = logRecoverableError(request, error, errorInfo);
  6040. boundary.status = 4;
  6041. boundary.errorDigest = segment;
  6042. untrackBoundary(request, boundary);
  6043. boundary.parentFlushed && request.clientRenderedBoundaries.push(boundary);
  6044. }
  6045. boundary.pendingTasks--;
  6046. segment = boundary.row;
  6047. null !== segment &&
  6048. 0 === --segment.pendingTasks &&
  6049. finishSuspenseListRow(request, segment);
  6050. boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
  6051. return abortTask(fallbackTask, request, error);
  6052. });
  6053. boundary.fallbackAbortableTasks.clear();
  6054. }
  6055. task = task.row;
  6056. null !== task &&
  6057. 0 === --task.pendingTasks &&
  6058. finishSuspenseListRow(request, task);
  6059. request.allPendingTasks--;
  6060. 0 === request.allPendingTasks && completeAll(request);
  6061. }
  6062. function safelyEmitEarlyPreloads(request, shellComplete) {
  6063. try {
  6064. var renderState = request.renderState,
  6065. onHeaders = renderState.onHeaders;
  6066. if (onHeaders) {
  6067. var headers = renderState.headers;
  6068. if (headers) {
  6069. renderState.headers = null;
  6070. var linkHeader = headers.preconnects;
  6071. headers.fontPreloads &&
  6072. (linkHeader && (linkHeader += ", "),
  6073. (linkHeader += headers.fontPreloads));
  6074. headers.highImagePreloads &&
  6075. (linkHeader && (linkHeader += ", "),
  6076. (linkHeader += headers.highImagePreloads));
  6077. if (!shellComplete) {
  6078. var queueIter = renderState.styles.values(),
  6079. queueStep = queueIter.next();
  6080. b: for (
  6081. ;
  6082. 0 < headers.remainingCapacity && !queueStep.done;
  6083. queueStep = queueIter.next()
  6084. )
  6085. for (
  6086. var sheetIter = queueStep.value.sheets.values(),
  6087. sheetStep = sheetIter.next();
  6088. 0 < headers.remainingCapacity && !sheetStep.done;
  6089. sheetStep = sheetIter.next()
  6090. ) {
  6091. var sheet = sheetStep.value,
  6092. props = sheet.props,
  6093. key = props.href,
  6094. props$jscomp$0 = sheet.props,
  6095. header = getPreloadAsHeader(props$jscomp$0.href, "style", {
  6096. crossOrigin: props$jscomp$0.crossOrigin,
  6097. integrity: props$jscomp$0.integrity,
  6098. nonce: props$jscomp$0.nonce,
  6099. type: props$jscomp$0.type,
  6100. fetchPriority: props$jscomp$0.fetchPriority,
  6101. referrerPolicy: props$jscomp$0.referrerPolicy,
  6102. media: props$jscomp$0.media
  6103. });
  6104. if (0 <= (headers.remainingCapacity -= header.length + 2))
  6105. (renderState.resets.style[key] = PRELOAD_NO_CREDS),
  6106. linkHeader && (linkHeader += ", "),
  6107. (linkHeader += header),
  6108. (renderState.resets.style[key] =
  6109. "string" === typeof props.crossOrigin ||
  6110. "string" === typeof props.integrity
  6111. ? [props.crossOrigin, props.integrity]
  6112. : PRELOAD_NO_CREDS);
  6113. else break b;
  6114. }
  6115. }
  6116. linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});
  6117. }
  6118. }
  6119. } catch (error) {
  6120. logRecoverableError(request, error, {});
  6121. }
  6122. }
  6123. function completeShell(request) {
  6124. null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
  6125. null === request.trackedPostpones && preparePreamble(request);
  6126. request.onShellError = noop;
  6127. request = request.onShellReady;
  6128. request();
  6129. }
  6130. function completeAll(request) {
  6131. safelyEmitEarlyPreloads(
  6132. request,
  6133. null === request.trackedPostpones
  6134. ? !0
  6135. : null === request.completedRootSegment ||
  6136. 5 !== request.completedRootSegment.status
  6137. );
  6138. preparePreamble(request);
  6139. request = request.onAllReady;
  6140. request();
  6141. }
  6142. function queueCompletedSegment(boundary, segment) {
  6143. if (
  6144. 0 === segment.chunks.length &&
  6145. 1 === segment.children.length &&
  6146. null === segment.children[0].boundary &&
  6147. -1 === segment.children[0].id
  6148. ) {
  6149. var childSegment = segment.children[0];
  6150. childSegment.id = segment.id;
  6151. childSegment.parentFlushed = !0;
  6152. (1 !== childSegment.status &&
  6153. 3 !== childSegment.status &&
  6154. 4 !== childSegment.status) ||
  6155. queueCompletedSegment(boundary, childSegment);
  6156. } else boundary.completedSegments.push(segment);
  6157. }
  6158. function finishedSegment(request, boundary, segment) {
  6159. if (null !== byteLengthOfChunk) {
  6160. segment = segment.chunks;
  6161. for (var segmentByteSize = 0, i = 0; i < segment.length; i++)
  6162. segmentByteSize += segment[i].byteLength;
  6163. null === boundary
  6164. ? (request.byteSize += segmentByteSize)
  6165. : (boundary.byteSize += segmentByteSize);
  6166. }
  6167. }
  6168. function finishedTask(request, boundary, row, segment) {
  6169. null !== row &&
  6170. (0 === --row.pendingTasks
  6171. ? finishSuspenseListRow(request, row)
  6172. : row.together && tryToResolveTogetherRow(request, row));
  6173. request.allPendingTasks--;
  6174. if (null === boundary) {
  6175. if (null !== segment && segment.parentFlushed) {
  6176. if (null !== request.completedRootSegment)
  6177. throw Error(formatProdErrorMessage(389));
  6178. request.completedRootSegment = segment;
  6179. }
  6180. request.pendingRootTasks--;
  6181. 0 === request.pendingRootTasks && completeShell(request);
  6182. } else if ((boundary.pendingTasks--, 4 !== boundary.status))
  6183. if (0 === boundary.pendingTasks)
  6184. if (
  6185. (0 === boundary.status && (boundary.status = 1),
  6186. null !== segment &&
  6187. segment.parentFlushed &&
  6188. (1 === segment.status || 3 === segment.status) &&
  6189. queueCompletedSegment(boundary, segment),
  6190. boundary.parentFlushed && request.completedBoundaries.push(boundary),
  6191. 1 === boundary.status)
  6192. )
  6193. (row = boundary.row),
  6194. null !== row &&
  6195. hoistHoistables(row.hoistables, boundary.contentState),
  6196. isEligibleForOutlining(request, boundary) ||
  6197. (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
  6198. boundary.fallbackAbortableTasks.clear(),
  6199. null !== row &&
  6200. 0 === --row.pendingTasks &&
  6201. finishSuspenseListRow(request, row)),
  6202. 0 === request.pendingRootTasks &&
  6203. null === request.trackedPostpones &&
  6204. null !== boundary.contentPreamble &&
  6205. preparePreamble(request);
  6206. else {
  6207. if (
  6208. 5 === boundary.status &&
  6209. ((boundary = boundary.row), null !== boundary)
  6210. ) {
  6211. if (null !== request.trackedPostpones) {
  6212. row = request.trackedPostpones;
  6213. var postponedRow = boundary.next;
  6214. if (
  6215. null !== postponedRow &&
  6216. ((segment = postponedRow.boundaries), null !== segment)
  6217. )
  6218. for (
  6219. postponedRow.boundaries = null, postponedRow = 0;
  6220. postponedRow < segment.length;
  6221. postponedRow++
  6222. ) {
  6223. var postponedBoundary = segment[postponedRow];
  6224. trackPostponedBoundary(request, row, postponedBoundary);
  6225. finishedTask(request, postponedBoundary, null, null);
  6226. }
  6227. }
  6228. 0 === --boundary.pendingTasks &&
  6229. finishSuspenseListRow(request, boundary);
  6230. }
  6231. }
  6232. else
  6233. null === segment ||
  6234. !segment.parentFlushed ||
  6235. (1 !== segment.status && 3 !== segment.status) ||
  6236. (queueCompletedSegment(boundary, segment),
  6237. 1 === boundary.completedSegments.length &&
  6238. boundary.parentFlushed &&
  6239. request.partialBoundaries.push(boundary)),
  6240. (boundary = boundary.row),
  6241. null !== boundary &&
  6242. boundary.together &&
  6243. tryToResolveTogetherRow(request, boundary);
  6244. 0 === request.allPendingTasks && completeAll(request);
  6245. }
  6246. function performWork(request$jscomp$2) {
  6247. if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
  6248. var prevContext = currentActiveSnapshot,
  6249. prevDispatcher = ReactSharedInternals.H;
  6250. ReactSharedInternals.H = HooksDispatcher;
  6251. var prevAsyncDispatcher = ReactSharedInternals.A;
  6252. ReactSharedInternals.A = DefaultAsyncDispatcher;
  6253. var prevRequest = currentRequest;
  6254. currentRequest = request$jscomp$2;
  6255. var prevResumableState = currentResumableState;
  6256. currentResumableState = request$jscomp$2.resumableState;
  6257. try {
  6258. var pingedTasks = request$jscomp$2.pingedTasks,
  6259. i;
  6260. for (i = 0; i < pingedTasks.length; i++) {
  6261. var task = pingedTasks[i],
  6262. request = request$jscomp$2,
  6263. segment = task.blockedSegment;
  6264. if (null === segment) {
  6265. var request$jscomp$0 = request;
  6266. if (0 !== task.replay.pendingTasks) {
  6267. switchContext(task.context);
  6268. try {
  6269. "number" === typeof task.replay.slots
  6270. ? resumeNode(
  6271. request$jscomp$0,
  6272. task,
  6273. task.replay.slots,
  6274. task.node,
  6275. task.childIndex
  6276. )
  6277. : retryNode(request$jscomp$0, task);
  6278. if (
  6279. 1 === task.replay.pendingTasks &&
  6280. 0 < task.replay.nodes.length
  6281. )
  6282. throw Error(formatProdErrorMessage(488));
  6283. task.replay.pendingTasks--;
  6284. task.abortSet.delete(task);
  6285. finishedTask(
  6286. request$jscomp$0,
  6287. task.blockedBoundary,
  6288. task.row,
  6289. null
  6290. );
  6291. } catch (thrownValue) {
  6292. resetHooksState();
  6293. var x =
  6294. thrownValue === SuspenseException
  6295. ? getSuspendedThenable()
  6296. : thrownValue;
  6297. if (
  6298. "object" === typeof x &&
  6299. null !== x &&
  6300. "function" === typeof x.then
  6301. ) {
  6302. var ping = task.ping;
  6303. x.then(ping, ping);
  6304. task.thenableState =
  6305. thrownValue === SuspenseException
  6306. ? getThenableStateAfterSuspending()
  6307. : null;
  6308. } else {
  6309. task.replay.pendingTasks--;
  6310. task.abortSet.delete(task);
  6311. var errorInfo = getThrownInfo(task.componentStack);
  6312. request = void 0;
  6313. var request$jscomp$1 = request$jscomp$0,
  6314. boundary = task.blockedBoundary,
  6315. error$jscomp$0 =
  6316. 12 === request$jscomp$0.status
  6317. ? request$jscomp$0.fatalError
  6318. : x,
  6319. replayNodes = task.replay.nodes,
  6320. resumeSlots = task.replay.slots;
  6321. request = logRecoverableError(
  6322. request$jscomp$1,
  6323. error$jscomp$0,
  6324. errorInfo
  6325. );
  6326. abortRemainingReplayNodes(
  6327. request$jscomp$1,
  6328. boundary,
  6329. replayNodes,
  6330. resumeSlots,
  6331. error$jscomp$0,
  6332. request
  6333. );
  6334. request$jscomp$0.pendingRootTasks--;
  6335. 0 === request$jscomp$0.pendingRootTasks &&
  6336. completeShell(request$jscomp$0);
  6337. request$jscomp$0.allPendingTasks--;
  6338. 0 === request$jscomp$0.allPendingTasks &&
  6339. completeAll(request$jscomp$0);
  6340. }
  6341. } finally {
  6342. }
  6343. }
  6344. } else if (
  6345. ((request$jscomp$0 = void 0),
  6346. (request$jscomp$1 = segment),
  6347. 0 === request$jscomp$1.status)
  6348. ) {
  6349. request$jscomp$1.status = 6;
  6350. switchContext(task.context);
  6351. var childrenLength = request$jscomp$1.children.length,
  6352. chunkLength = request$jscomp$1.chunks.length;
  6353. try {
  6354. retryNode(request, task),
  6355. request$jscomp$1.lastPushedText &&
  6356. request$jscomp$1.textEmbedded &&
  6357. request$jscomp$1.chunks.push(textSeparator),
  6358. task.abortSet.delete(task),
  6359. (request$jscomp$1.status = 1),
  6360. finishedSegment(request, task.blockedBoundary, request$jscomp$1),
  6361. finishedTask(
  6362. request,
  6363. task.blockedBoundary,
  6364. task.row,
  6365. request$jscomp$1
  6366. );
  6367. } catch (thrownValue) {
  6368. resetHooksState();
  6369. request$jscomp$1.children.length = childrenLength;
  6370. request$jscomp$1.chunks.length = chunkLength;
  6371. var x$jscomp$0 =
  6372. thrownValue === SuspenseException
  6373. ? getSuspendedThenable()
  6374. : 12 === request.status
  6375. ? request.fatalError
  6376. : thrownValue;
  6377. if (12 === request.status && null !== request.trackedPostpones) {
  6378. var trackedPostpones = request.trackedPostpones,
  6379. thrownInfo = getThrownInfo(task.componentStack);
  6380. task.abortSet.delete(task);
  6381. logRecoverableError(request, x$jscomp$0, thrownInfo);
  6382. trackPostpone(request, trackedPostpones, task, request$jscomp$1);
  6383. finishedTask(
  6384. request,
  6385. task.blockedBoundary,
  6386. task.row,
  6387. request$jscomp$1
  6388. );
  6389. } else if (
  6390. "object" === typeof x$jscomp$0 &&
  6391. null !== x$jscomp$0 &&
  6392. "function" === typeof x$jscomp$0.then
  6393. ) {
  6394. request$jscomp$1.status = 0;
  6395. task.thenableState =
  6396. thrownValue === SuspenseException
  6397. ? getThenableStateAfterSuspending()
  6398. : null;
  6399. var ping$jscomp$0 = task.ping;
  6400. x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
  6401. } else {
  6402. var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
  6403. task.abortSet.delete(task);
  6404. request$jscomp$1.status = 4;
  6405. var boundary$jscomp$0 = task.blockedBoundary,
  6406. row = task.row;
  6407. null !== row &&
  6408. 0 === --row.pendingTasks &&
  6409. finishSuspenseListRow(request, row);
  6410. request.allPendingTasks--;
  6411. request$jscomp$0 = logRecoverableError(
  6412. request,
  6413. x$jscomp$0,
  6414. errorInfo$jscomp$0
  6415. );
  6416. if (null === boundary$jscomp$0) fatalError(request, x$jscomp$0);
  6417. else if (
  6418. (boundary$jscomp$0.pendingTasks--,
  6419. 4 !== boundary$jscomp$0.status)
  6420. ) {
  6421. boundary$jscomp$0.status = 4;
  6422. boundary$jscomp$0.errorDigest = request$jscomp$0;
  6423. untrackBoundary(request, boundary$jscomp$0);
  6424. var boundaryRow = boundary$jscomp$0.row;
  6425. null !== boundaryRow &&
  6426. 0 === --boundaryRow.pendingTasks &&
  6427. finishSuspenseListRow(request, boundaryRow);
  6428. boundary$jscomp$0.parentFlushed &&
  6429. request.clientRenderedBoundaries.push(boundary$jscomp$0);
  6430. 0 === request.pendingRootTasks &&
  6431. null === request.trackedPostpones &&
  6432. null !== boundary$jscomp$0.contentPreamble &&
  6433. preparePreamble(request);
  6434. }
  6435. 0 === request.allPendingTasks && completeAll(request);
  6436. }
  6437. } finally {
  6438. }
  6439. }
  6440. }
  6441. pingedTasks.splice(0, i);
  6442. null !== request$jscomp$2.destination &&
  6443. flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
  6444. } catch (error) {
  6445. logRecoverableError(request$jscomp$2, error, {}),
  6446. fatalError(request$jscomp$2, error);
  6447. } finally {
  6448. (currentResumableState = prevResumableState),
  6449. (ReactSharedInternals.H = prevDispatcher),
  6450. (ReactSharedInternals.A = prevAsyncDispatcher),
  6451. prevDispatcher === HooksDispatcher && switchContext(prevContext),
  6452. (currentRequest = prevRequest);
  6453. }
  6454. }
  6455. }
  6456. function preparePreambleFromSubtree(
  6457. request,
  6458. segment,
  6459. collectedPreambleSegments
  6460. ) {
  6461. segment.preambleChildren.length &&
  6462. collectedPreambleSegments.push(segment.preambleChildren);
  6463. for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)
  6464. pendingPreambles =
  6465. preparePreambleFromSegment(
  6466. request,
  6467. segment.children[i],
  6468. collectedPreambleSegments
  6469. ) || pendingPreambles;
  6470. return pendingPreambles;
  6471. }
  6472. function preparePreambleFromSegment(
  6473. request,
  6474. segment,
  6475. collectedPreambleSegments
  6476. ) {
  6477. var boundary = segment.boundary;
  6478. if (null === boundary)
  6479. return preparePreambleFromSubtree(
  6480. request,
  6481. segment,
  6482. collectedPreambleSegments
  6483. );
  6484. var preamble = boundary.contentPreamble,
  6485. fallbackPreamble = boundary.fallbackPreamble;
  6486. if (null === preamble || null === fallbackPreamble) return !1;
  6487. switch (boundary.status) {
  6488. case 1:
  6489. hoistPreambleState(request.renderState, preamble);
  6490. request.byteSize += boundary.byteSize;
  6491. segment = boundary.completedSegments[0];
  6492. if (!segment) throw Error(formatProdErrorMessage(391));
  6493. return preparePreambleFromSubtree(
  6494. request,
  6495. segment,
  6496. collectedPreambleSegments
  6497. );
  6498. case 5:
  6499. if (null !== request.trackedPostpones) return !0;
  6500. case 4:
  6501. if (1 === segment.status)
  6502. return (
  6503. hoistPreambleState(request.renderState, fallbackPreamble),
  6504. preparePreambleFromSubtree(
  6505. request,
  6506. segment,
  6507. collectedPreambleSegments
  6508. )
  6509. );
  6510. default:
  6511. return !0;
  6512. }
  6513. }
  6514. function preparePreamble(request) {
  6515. if (
  6516. request.completedRootSegment &&
  6517. null === request.completedPreambleSegments
  6518. ) {
  6519. var collectedPreambleSegments = [],
  6520. originalRequestByteSize = request.byteSize,
  6521. hasPendingPreambles = preparePreambleFromSegment(
  6522. request,
  6523. request.completedRootSegment,
  6524. collectedPreambleSegments
  6525. ),
  6526. preamble = request.renderState.preamble;
  6527. !1 === hasPendingPreambles || (preamble.headChunks && preamble.bodyChunks)
  6528. ? (request.completedPreambleSegments = collectedPreambleSegments)
  6529. : (request.byteSize = originalRequestByteSize);
  6530. }
  6531. }
  6532. function flushSubtree(request, destination, segment, hoistableState) {
  6533. segment.parentFlushed = !0;
  6534. switch (segment.status) {
  6535. case 0:
  6536. segment.id = request.nextSegmentId++;
  6537. case 5:
  6538. return (
  6539. (hoistableState = segment.id),
  6540. (segment.lastPushedText = !1),
  6541. (segment.textEmbedded = !1),
  6542. (request = request.renderState),
  6543. writeChunk(destination, placeholder1),
  6544. writeChunk(destination, request.placeholderPrefix),
  6545. (request = stringToChunk(hoistableState.toString(16))),
  6546. writeChunk(destination, request),
  6547. writeChunkAndReturn(destination, placeholder2)
  6548. );
  6549. case 1:
  6550. segment.status = 2;
  6551. var r = !0,
  6552. chunks = segment.chunks,
  6553. chunkIdx = 0;
  6554. segment = segment.children;
  6555. for (var childIdx = 0; childIdx < segment.length; childIdx++) {
  6556. for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)
  6557. writeChunk(destination, chunks[chunkIdx]);
  6558. r = flushSegment(request, destination, r, hoistableState);
  6559. }
  6560. for (; chunkIdx < chunks.length - 1; chunkIdx++)
  6561. writeChunk(destination, chunks[chunkIdx]);
  6562. chunkIdx < chunks.length &&
  6563. (r = writeChunkAndReturn(destination, chunks[chunkIdx]));
  6564. return r;
  6565. case 3:
  6566. return !0;
  6567. default:
  6568. throw Error(formatProdErrorMessage(390));
  6569. }
  6570. }
  6571. var flushedByteSize = 0;
  6572. function flushSegment(request, destination, segment, hoistableState) {
  6573. var boundary = segment.boundary;
  6574. if (null === boundary)
  6575. return flushSubtree(request, destination, segment, hoistableState);
  6576. boundary.parentFlushed = !0;
  6577. if (4 === boundary.status) {
  6578. var row = boundary.row;
  6579. null !== row &&
  6580. 0 === --row.pendingTasks &&
  6581. finishSuspenseListRow(request, row);
  6582. boundary = boundary.errorDigest;
  6583. writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
  6584. writeChunk(destination, clientRenderedSuspenseBoundaryError1);
  6585. boundary &&
  6586. (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
  6587. writeChunk(destination, stringToChunk(escapeTextForBrowser(boundary))),
  6588. writeChunk(
  6589. destination,
  6590. clientRenderedSuspenseBoundaryErrorAttrInterstitial
  6591. ));
  6592. writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);
  6593. flushSubtree(request, destination, segment, hoistableState);
  6594. } else if (1 !== boundary.status)
  6595. 0 === boundary.status && (boundary.rootSegmentID = request.nextSegmentId++),
  6596. 0 < boundary.completedSegments.length &&
  6597. request.partialBoundaries.push(boundary),
  6598. writeStartPendingSuspenseBoundary(
  6599. destination,
  6600. request.renderState,
  6601. boundary.rootSegmentID
  6602. ),
  6603. hoistableState && hoistHoistables(hoistableState, boundary.fallbackState),
  6604. flushSubtree(request, destination, segment, hoistableState);
  6605. else if (
  6606. !flushingPartialBoundaries &&
  6607. isEligibleForOutlining(request, boundary) &&
  6608. (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||
  6609. hasSuspenseyContent(boundary.contentState))
  6610. )
  6611. (boundary.rootSegmentID = request.nextSegmentId++),
  6612. request.completedBoundaries.push(boundary),
  6613. writeStartPendingSuspenseBoundary(
  6614. destination,
  6615. request.renderState,
  6616. boundary.rootSegmentID
  6617. ),
  6618. flushSubtree(request, destination, segment, hoistableState);
  6619. else {
  6620. flushedByteSize += boundary.byteSize;
  6621. hoistableState && hoistHoistables(hoistableState, boundary.contentState);
  6622. segment = boundary.row;
  6623. null !== segment &&
  6624. isEligibleForOutlining(request, boundary) &&
  6625. 0 === --segment.pendingTasks &&
  6626. finishSuspenseListRow(request, segment);
  6627. writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
  6628. segment = boundary.completedSegments;
  6629. if (1 !== segment.length) throw Error(formatProdErrorMessage(391));
  6630. flushSegment(request, destination, segment[0], hoistableState);
  6631. }
  6632. return writeChunkAndReturn(destination, endSuspenseBoundary);
  6633. }
  6634. function flushSegmentContainer(request, destination, segment, hoistableState) {
  6635. writeStartSegment(
  6636. destination,
  6637. request.renderState,
  6638. segment.parentFormatContext,
  6639. segment.id
  6640. );
  6641. flushSegment(request, destination, segment, hoistableState);
  6642. return writeEndSegment(destination, segment.parentFormatContext);
  6643. }
  6644. function flushCompletedBoundary(request, destination, boundary) {
  6645. flushedByteSize = boundary.byteSize;
  6646. for (
  6647. var completedSegments = boundary.completedSegments, i = 0;
  6648. i < completedSegments.length;
  6649. i++
  6650. )
  6651. flushPartiallyCompletedSegment(
  6652. request,
  6653. destination,
  6654. boundary,
  6655. completedSegments[i]
  6656. );
  6657. completedSegments.length = 0;
  6658. completedSegments = boundary.row;
  6659. null !== completedSegments &&
  6660. isEligibleForOutlining(request, boundary) &&
  6661. 0 === --completedSegments.pendingTasks &&
  6662. finishSuspenseListRow(request, completedSegments);
  6663. writeHoistablesForBoundary(
  6664. destination,
  6665. boundary.contentState,
  6666. request.renderState
  6667. );
  6668. completedSegments = request.resumableState;
  6669. request = request.renderState;
  6670. i = boundary.rootSegmentID;
  6671. boundary = boundary.contentState;
  6672. var requiresStyleInsertion = request.stylesToHoist;
  6673. request.stylesToHoist = !1;
  6674. writeChunk(destination, request.startInlineScript);
  6675. writeChunk(destination, endOfStartTag);
  6676. requiresStyleInsertion
  6677. ? (0 === (completedSegments.instructions & 4) &&
  6678. ((completedSegments.instructions |= 4),
  6679. writeChunk(destination, clientRenderScriptFunctionOnly)),
  6680. 0 === (completedSegments.instructions & 2) &&
  6681. ((completedSegments.instructions |= 2),
  6682. writeChunk(destination, completeBoundaryScriptFunctionOnly)),
  6683. 0 === (completedSegments.instructions & 8)
  6684. ? ((completedSegments.instructions |= 8),
  6685. writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
  6686. : writeChunk(destination, completeBoundaryWithStylesScript1Partial))
  6687. : (0 === (completedSegments.instructions & 2) &&
  6688. ((completedSegments.instructions |= 2),
  6689. writeChunk(destination, completeBoundaryScriptFunctionOnly)),
  6690. writeChunk(destination, completeBoundaryScript1Partial));
  6691. completedSegments = stringToChunk(i.toString(16));
  6692. writeChunk(destination, request.boundaryPrefix);
  6693. writeChunk(destination, completedSegments);
  6694. writeChunk(destination, completeBoundaryScript2);
  6695. writeChunk(destination, request.segmentPrefix);
  6696. writeChunk(destination, completedSegments);
  6697. requiresStyleInsertion
  6698. ? (writeChunk(destination, completeBoundaryScript3a),
  6699. writeStyleResourceDependenciesInJS(destination, boundary))
  6700. : writeChunk(destination, completeBoundaryScript3b);
  6701. boundary = writeChunkAndReturn(destination, completeBoundaryScriptEnd);
  6702. return writeBootstrap(destination, request) && boundary;
  6703. }
  6704. function flushPartiallyCompletedSegment(
  6705. request,
  6706. destination,
  6707. boundary,
  6708. segment
  6709. ) {
  6710. if (2 === segment.status) return !0;
  6711. var hoistableState = boundary.contentState,
  6712. segmentID = segment.id;
  6713. if (-1 === segmentID) {
  6714. if (-1 === (segment.id = boundary.rootSegmentID))
  6715. throw Error(formatProdErrorMessage(392));
  6716. return flushSegmentContainer(request, destination, segment, hoistableState);
  6717. }
  6718. if (segmentID === boundary.rootSegmentID)
  6719. return flushSegmentContainer(request, destination, segment, hoistableState);
  6720. flushSegmentContainer(request, destination, segment, hoistableState);
  6721. boundary = request.resumableState;
  6722. request = request.renderState;
  6723. writeChunk(destination, request.startInlineScript);
  6724. writeChunk(destination, endOfStartTag);
  6725. 0 === (boundary.instructions & 1)
  6726. ? ((boundary.instructions |= 1),
  6727. writeChunk(destination, completeSegmentScript1Full))
  6728. : writeChunk(destination, completeSegmentScript1Partial);
  6729. writeChunk(destination, request.segmentPrefix);
  6730. segmentID = stringToChunk(segmentID.toString(16));
  6731. writeChunk(destination, segmentID);
  6732. writeChunk(destination, completeSegmentScript2);
  6733. writeChunk(destination, request.placeholderPrefix);
  6734. writeChunk(destination, segmentID);
  6735. destination = writeChunkAndReturn(destination, completeSegmentScriptEnd);
  6736. return destination;
  6737. }
  6738. var flushingPartialBoundaries = !1;
  6739. function flushCompletedQueues(request, destination) {
  6740. currentView = new Uint8Array(2048);
  6741. writtenBytes = 0;
  6742. try {
  6743. if (!(0 < request.pendingRootTasks)) {
  6744. var i,
  6745. completedRootSegment = request.completedRootSegment;
  6746. if (null !== completedRootSegment) {
  6747. if (5 === completedRootSegment.status) return;
  6748. var completedPreambleSegments = request.completedPreambleSegments;
  6749. if (null === completedPreambleSegments) return;
  6750. flushedByteSize = request.byteSize;
  6751. var resumableState = request.resumableState,
  6752. renderState = request.renderState,
  6753. preamble = renderState.preamble,
  6754. htmlChunks = preamble.htmlChunks,
  6755. headChunks = preamble.headChunks,
  6756. i$jscomp$0;
  6757. if (htmlChunks) {
  6758. for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
  6759. writeChunk(destination, htmlChunks[i$jscomp$0]);
  6760. if (headChunks)
  6761. for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
  6762. writeChunk(destination, headChunks[i$jscomp$0]);
  6763. else
  6764. writeChunk(destination, startChunkForTag("head")),
  6765. writeChunk(destination, endOfStartTag);
  6766. } else if (headChunks)
  6767. for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
  6768. writeChunk(destination, headChunks[i$jscomp$0]);
  6769. var charsetChunks = renderState.charsetChunks;
  6770. for (i$jscomp$0 = 0; i$jscomp$0 < charsetChunks.length; i$jscomp$0++)
  6771. writeChunk(destination, charsetChunks[i$jscomp$0]);
  6772. charsetChunks.length = 0;
  6773. renderState.preconnects.forEach(flushResource, destination);
  6774. renderState.preconnects.clear();
  6775. var viewportChunks = renderState.viewportChunks;
  6776. for (i$jscomp$0 = 0; i$jscomp$0 < viewportChunks.length; i$jscomp$0++)
  6777. writeChunk(destination, viewportChunks[i$jscomp$0]);
  6778. viewportChunks.length = 0;
  6779. renderState.fontPreloads.forEach(flushResource, destination);
  6780. renderState.fontPreloads.clear();
  6781. renderState.highImagePreloads.forEach(flushResource, destination);
  6782. renderState.highImagePreloads.clear();
  6783. currentlyFlushingRenderState = renderState;
  6784. renderState.styles.forEach(flushStylesInPreamble, destination);
  6785. currentlyFlushingRenderState = null;
  6786. var importMapChunks = renderState.importMapChunks;
  6787. for (i$jscomp$0 = 0; i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
  6788. writeChunk(destination, importMapChunks[i$jscomp$0]);
  6789. importMapChunks.length = 0;
  6790. renderState.bootstrapScripts.forEach(flushResource, destination);
  6791. renderState.scripts.forEach(flushResource, destination);
  6792. renderState.scripts.clear();
  6793. renderState.bulkPreloads.forEach(flushResource, destination);
  6794. renderState.bulkPreloads.clear();
  6795. htmlChunks || headChunks || (resumableState.instructions |= 32);
  6796. var hoistableChunks = renderState.hoistableChunks;
  6797. for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
  6798. writeChunk(destination, hoistableChunks[i$jscomp$0]);
  6799. for (
  6800. resumableState = hoistableChunks.length = 0;
  6801. resumableState < completedPreambleSegments.length;
  6802. resumableState++
  6803. ) {
  6804. var segments = completedPreambleSegments[resumableState];
  6805. for (renderState = 0; renderState < segments.length; renderState++)
  6806. flushSegment(request, destination, segments[renderState], null);
  6807. }
  6808. var preamble$jscomp$0 = request.renderState.preamble,
  6809. headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
  6810. (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&
  6811. writeChunk(destination, endChunkForTag("head"));
  6812. var bodyChunks = preamble$jscomp$0.bodyChunks;
  6813. if (bodyChunks)
  6814. for (
  6815. completedPreambleSegments = 0;
  6816. completedPreambleSegments < bodyChunks.length;
  6817. completedPreambleSegments++
  6818. )
  6819. writeChunk(destination, bodyChunks[completedPreambleSegments]);
  6820. flushSegment(request, destination, completedRootSegment, null);
  6821. request.completedRootSegment = null;
  6822. var renderState$jscomp$0 = request.renderState;
  6823. if (
  6824. 0 !== request.allPendingTasks ||
  6825. 0 !== request.clientRenderedBoundaries.length ||
  6826. 0 !== request.completedBoundaries.length ||
  6827. (null !== request.trackedPostpones &&
  6828. (0 !== request.trackedPostpones.rootNodes.length ||
  6829. null !== request.trackedPostpones.rootSlots))
  6830. ) {
  6831. var resumableState$jscomp$0 = request.resumableState;
  6832. if (0 === (resumableState$jscomp$0.instructions & 64)) {
  6833. resumableState$jscomp$0.instructions |= 64;
  6834. writeChunk(destination, renderState$jscomp$0.startInlineScript);
  6835. if (0 === (resumableState$jscomp$0.instructions & 32)) {
  6836. resumableState$jscomp$0.instructions |= 32;
  6837. var shellId = "_" + resumableState$jscomp$0.idPrefix + "R_";
  6838. writeChunk(destination, completedShellIdAttributeStart);
  6839. writeChunk(
  6840. destination,
  6841. stringToChunk(escapeTextForBrowser(shellId))
  6842. );
  6843. writeChunk(destination, attributeEnd);
  6844. }
  6845. writeChunk(destination, endOfStartTag);
  6846. writeChunk(destination, shellTimeRuntimeScript);
  6847. writeChunkAndReturn(destination, endInlineScript);
  6848. }
  6849. }
  6850. writeBootstrap(destination, renderState$jscomp$0);
  6851. }
  6852. var renderState$jscomp$1 = request.renderState;
  6853. completedRootSegment = 0;
  6854. var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
  6855. for (
  6856. completedRootSegment = 0;
  6857. completedRootSegment < viewportChunks$jscomp$0.length;
  6858. completedRootSegment++
  6859. )
  6860. writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
  6861. viewportChunks$jscomp$0.length = 0;
  6862. renderState$jscomp$1.preconnects.forEach(flushResource, destination);
  6863. renderState$jscomp$1.preconnects.clear();
  6864. renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
  6865. renderState$jscomp$1.fontPreloads.clear();
  6866. renderState$jscomp$1.highImagePreloads.forEach(
  6867. flushResource,
  6868. destination
  6869. );
  6870. renderState$jscomp$1.highImagePreloads.clear();
  6871. renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
  6872. renderState$jscomp$1.scripts.forEach(flushResource, destination);
  6873. renderState$jscomp$1.scripts.clear();
  6874. renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
  6875. renderState$jscomp$1.bulkPreloads.clear();
  6876. var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
  6877. for (
  6878. completedRootSegment = 0;
  6879. completedRootSegment < hoistableChunks$jscomp$0.length;
  6880. completedRootSegment++
  6881. )
  6882. writeChunk(destination, hoistableChunks$jscomp$0[completedRootSegment]);
  6883. hoistableChunks$jscomp$0.length = 0;
  6884. var clientRenderedBoundaries = request.clientRenderedBoundaries;
  6885. for (i = 0; i < clientRenderedBoundaries.length; i++) {
  6886. var boundary = clientRenderedBoundaries[i];
  6887. renderState$jscomp$1 = destination;
  6888. var resumableState$jscomp$1 = request.resumableState,
  6889. renderState$jscomp$2 = request.renderState,
  6890. id = boundary.rootSegmentID,
  6891. errorDigest = boundary.errorDigest;
  6892. writeChunk(
  6893. renderState$jscomp$1,
  6894. renderState$jscomp$2.startInlineScript
  6895. );
  6896. writeChunk(renderState$jscomp$1, endOfStartTag);
  6897. 0 === (resumableState$jscomp$1.instructions & 4)
  6898. ? ((resumableState$jscomp$1.instructions |= 4),
  6899. writeChunk(renderState$jscomp$1, clientRenderScript1Full))
  6900. : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
  6901. writeChunk(renderState$jscomp$1, renderState$jscomp$2.boundaryPrefix);
  6902. writeChunk(renderState$jscomp$1, stringToChunk(id.toString(16)));
  6903. writeChunk(renderState$jscomp$1, clientRenderScript1A);
  6904. errorDigest &&
  6905. (writeChunk(
  6906. renderState$jscomp$1,
  6907. clientRenderErrorScriptArgInterstitial
  6908. ),
  6909. writeChunk(
  6910. renderState$jscomp$1,
  6911. stringToChunk(
  6912. escapeJSStringsForInstructionScripts(errorDigest || "")
  6913. )
  6914. ));
  6915. var JSCompiler_inline_result = writeChunkAndReturn(
  6916. renderState$jscomp$1,
  6917. clientRenderScriptEnd
  6918. );
  6919. if (!JSCompiler_inline_result) {
  6920. request.destination = null;
  6921. i++;
  6922. clientRenderedBoundaries.splice(0, i);
  6923. return;
  6924. }
  6925. }
  6926. clientRenderedBoundaries.splice(0, i);
  6927. var completedBoundaries = request.completedBoundaries;
  6928. for (i = 0; i < completedBoundaries.length; i++)
  6929. if (
  6930. !flushCompletedBoundary(request, destination, completedBoundaries[i])
  6931. ) {
  6932. request.destination = null;
  6933. i++;
  6934. completedBoundaries.splice(0, i);
  6935. return;
  6936. }
  6937. completedBoundaries.splice(0, i);
  6938. completeWriting(destination);
  6939. currentView = new Uint8Array(2048);
  6940. writtenBytes = 0;
  6941. flushingPartialBoundaries = !0;
  6942. var partialBoundaries = request.partialBoundaries;
  6943. for (i = 0; i < partialBoundaries.length; i++) {
  6944. var boundary$70 = partialBoundaries[i];
  6945. a: {
  6946. clientRenderedBoundaries = request;
  6947. boundary = destination;
  6948. flushedByteSize = boundary$70.byteSize;
  6949. var completedSegments = boundary$70.completedSegments;
  6950. for (
  6951. JSCompiler_inline_result = 0;
  6952. JSCompiler_inline_result < completedSegments.length;
  6953. JSCompiler_inline_result++
  6954. )
  6955. if (
  6956. !flushPartiallyCompletedSegment(
  6957. clientRenderedBoundaries,
  6958. boundary,
  6959. boundary$70,
  6960. completedSegments[JSCompiler_inline_result]
  6961. )
  6962. ) {
  6963. JSCompiler_inline_result++;
  6964. completedSegments.splice(0, JSCompiler_inline_result);
  6965. var JSCompiler_inline_result$jscomp$0 = !1;
  6966. break a;
  6967. }
  6968. completedSegments.splice(0, JSCompiler_inline_result);
  6969. var row = boundary$70.row;
  6970. null !== row &&
  6971. row.together &&
  6972. 1 === boundary$70.pendingTasks &&
  6973. (1 === row.pendingTasks
  6974. ? unblockSuspenseListRow(
  6975. clientRenderedBoundaries,
  6976. row,
  6977. row.hoistables
  6978. )
  6979. : row.pendingTasks--);
  6980. JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
  6981. boundary,
  6982. boundary$70.contentState,
  6983. clientRenderedBoundaries.renderState
  6984. );
  6985. }
  6986. if (!JSCompiler_inline_result$jscomp$0) {
  6987. request.destination = null;
  6988. i++;
  6989. partialBoundaries.splice(0, i);
  6990. return;
  6991. }
  6992. }
  6993. partialBoundaries.splice(0, i);
  6994. flushingPartialBoundaries = !1;
  6995. var largeBoundaries = request.completedBoundaries;
  6996. for (i = 0; i < largeBoundaries.length; i++)
  6997. if (!flushCompletedBoundary(request, destination, largeBoundaries[i])) {
  6998. request.destination = null;
  6999. i++;
  7000. largeBoundaries.splice(0, i);
  7001. return;
  7002. }
  7003. largeBoundaries.splice(0, i);
  7004. }
  7005. } finally {
  7006. (flushingPartialBoundaries = !1),
  7007. 0 === request.allPendingTasks &&
  7008. 0 === request.clientRenderedBoundaries.length &&
  7009. 0 === request.completedBoundaries.length
  7010. ? ((request.flushScheduled = !1),
  7011. (i = request.resumableState),
  7012. i.hasBody && writeChunk(destination, endChunkForTag("body")),
  7013. i.hasHtml && writeChunk(destination, endChunkForTag("html")),
  7014. completeWriting(destination),
  7015. (request.status = 14),
  7016. destination.close(),
  7017. (request.destination = null))
  7018. : completeWriting(destination);
  7019. }
  7020. }
  7021. function startWork(request) {
  7022. request.flushScheduled = null !== request.destination;
  7023. scheduleMicrotask(function () {
  7024. return performWork(request);
  7025. });
  7026. scheduleWork(function () {
  7027. 10 === request.status && (request.status = 11);
  7028. null === request.trackedPostpones &&
  7029. safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
  7030. });
  7031. }
  7032. function enqueueFlush(request) {
  7033. !1 === request.flushScheduled &&
  7034. 0 === request.pingedTasks.length &&
  7035. null !== request.destination &&
  7036. ((request.flushScheduled = !0),
  7037. scheduleWork(function () {
  7038. var destination = request.destination;
  7039. destination
  7040. ? flushCompletedQueues(request, destination)
  7041. : (request.flushScheduled = !1);
  7042. }));
  7043. }
  7044. function startFlowing(request, destination) {
  7045. if (13 === request.status)
  7046. (request.status = 14), closeWithError(destination, request.fatalError);
  7047. else if (14 !== request.status && null === request.destination) {
  7048. request.destination = destination;
  7049. try {
  7050. flushCompletedQueues(request, destination);
  7051. } catch (error) {
  7052. logRecoverableError(request, error, {}), fatalError(request, error);
  7053. }
  7054. }
  7055. }
  7056. function abort(request, reason) {
  7057. if (11 === request.status || 10 === request.status) request.status = 12;
  7058. try {
  7059. var abortableTasks = request.abortableTasks;
  7060. if (0 < abortableTasks.size) {
  7061. var error =
  7062. void 0 === reason
  7063. ? Error(formatProdErrorMessage(432))
  7064. : "object" === typeof reason &&
  7065. null !== reason &&
  7066. "function" === typeof reason.then
  7067. ? Error(formatProdErrorMessage(530))
  7068. : reason;
  7069. request.fatalError = error;
  7070. abortableTasks.forEach(function (task) {
  7071. return abortTask(task, request, error);
  7072. });
  7073. abortableTasks.clear();
  7074. }
  7075. null !== request.destination &&
  7076. flushCompletedQueues(request, request.destination);
  7077. } catch (error$72) {
  7078. logRecoverableError(request, error$72, {}), fatalError(request, error$72);
  7079. }
  7080. }
  7081. function addToReplayParent(node, parentKeyPath, trackedPostpones) {
  7082. if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);
  7083. else {
  7084. var workingMap = trackedPostpones.workingMap,
  7085. parentNode = workingMap.get(parentKeyPath);
  7086. void 0 === parentNode &&
  7087. ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),
  7088. workingMap.set(parentKeyPath, parentNode),
  7089. addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));
  7090. parentNode[2].push(node);
  7091. }
  7092. }
  7093. function getPostponedState(request) {
  7094. var trackedPostpones = request.trackedPostpones;
  7095. if (
  7096. null === trackedPostpones ||
  7097. (0 === trackedPostpones.rootNodes.length &&
  7098. null === trackedPostpones.rootSlots)
  7099. )
  7100. return (request.trackedPostpones = null);
  7101. if (
  7102. null === request.completedRootSegment ||
  7103. (5 !== request.completedRootSegment.status &&
  7104. null !== request.completedPreambleSegments)
  7105. ) {
  7106. var nextSegmentId = request.nextSegmentId;
  7107. var replaySlots = trackedPostpones.rootSlots;
  7108. var resumableState = request.resumableState;
  7109. resumableState.bootstrapScriptContent = void 0;
  7110. resumableState.bootstrapScripts = void 0;
  7111. resumableState.bootstrapModules = void 0;
  7112. } else {
  7113. nextSegmentId = 0;
  7114. replaySlots = -1;
  7115. resumableState = request.resumableState;
  7116. var renderState = request.renderState;
  7117. resumableState.nextFormID = 0;
  7118. resumableState.hasBody = !1;
  7119. resumableState.hasHtml = !1;
  7120. resumableState.unknownResources = { font: renderState.resets.font };
  7121. resumableState.dnsResources = renderState.resets.dns;
  7122. resumableState.connectResources = renderState.resets.connect;
  7123. resumableState.imageResources = renderState.resets.image;
  7124. resumableState.styleResources = renderState.resets.style;
  7125. resumableState.scriptResources = {};
  7126. resumableState.moduleUnknownResources = {};
  7127. resumableState.moduleScriptResources = {};
  7128. resumableState.instructions = 0;
  7129. }
  7130. return {
  7131. nextSegmentId: nextSegmentId,
  7132. rootFormatContext: request.rootFormatContext,
  7133. progressiveChunkSize: request.progressiveChunkSize,
  7134. resumableState: request.resumableState,
  7135. replayNodes: trackedPostpones.rootNodes,
  7136. replaySlots: replaySlots
  7137. };
  7138. }
  7139. function ensureCorrectIsomorphicReactVersion() {
  7140. var isomorphicReactPackageVersion = React.version;
  7141. if ("19.2.4" !== isomorphicReactPackageVersion)
  7142. throw Error(
  7143. formatProdErrorMessage(
  7144. 527,
  7145. isomorphicReactPackageVersion,
  7146. "19.2.4"
  7147. )
  7148. );
  7149. }
  7150. ensureCorrectIsomorphicReactVersion();
  7151. ensureCorrectIsomorphicReactVersion();
  7152. exports.prerender = function (children, options) {
  7153. return new Promise(function (resolve, reject) {
  7154. var onHeaders = options ? options.onHeaders : void 0,
  7155. onHeadersImpl;
  7156. onHeaders &&
  7157. (onHeadersImpl = function (headersDescriptor) {
  7158. onHeaders(new Headers(headersDescriptor));
  7159. });
  7160. var resources = createResumableState(
  7161. options ? options.identifierPrefix : void 0,
  7162. options ? options.unstable_externalRuntimeSrc : void 0,
  7163. options ? options.bootstrapScriptContent : void 0,
  7164. options ? options.bootstrapScripts : void 0,
  7165. options ? options.bootstrapModules : void 0
  7166. ),
  7167. request = createPrerenderRequest(
  7168. children,
  7169. resources,
  7170. createRenderState(
  7171. resources,
  7172. void 0,
  7173. options ? options.unstable_externalRuntimeSrc : void 0,
  7174. options ? options.importMap : void 0,
  7175. onHeadersImpl,
  7176. options ? options.maxHeadersLength : void 0
  7177. ),
  7178. createRootFormatContext(options ? options.namespaceURI : void 0),
  7179. options ? options.progressiveChunkSize : void 0,
  7180. options ? options.onError : void 0,
  7181. function () {
  7182. var stream = new ReadableStream(
  7183. {
  7184. type: "bytes",
  7185. pull: function (controller) {
  7186. startFlowing(request, controller);
  7187. },
  7188. cancel: function (reason) {
  7189. request.destination = null;
  7190. abort(request, reason);
  7191. }
  7192. },
  7193. { highWaterMark: 0 }
  7194. );
  7195. stream = { postponed: getPostponedState(request), prelude: stream };
  7196. resolve(stream);
  7197. },
  7198. void 0,
  7199. void 0,
  7200. reject,
  7201. options ? options.onPostpone : void 0
  7202. );
  7203. if (options && options.signal) {
  7204. var signal = options.signal;
  7205. if (signal.aborted) abort(request, signal.reason);
  7206. else {
  7207. var listener = function () {
  7208. abort(request, signal.reason);
  7209. signal.removeEventListener("abort", listener);
  7210. };
  7211. signal.addEventListener("abort", listener);
  7212. }
  7213. }
  7214. startWork(request);
  7215. });
  7216. };
  7217. exports.renderToReadableStream = function (children, options) {
  7218. return new Promise(function (resolve, reject) {
  7219. var onFatalError,
  7220. onAllReady,
  7221. allReady = new Promise(function (res, rej) {
  7222. onAllReady = res;
  7223. onFatalError = rej;
  7224. }),
  7225. onHeaders = options ? options.onHeaders : void 0,
  7226. onHeadersImpl;
  7227. onHeaders &&
  7228. (onHeadersImpl = function (headersDescriptor) {
  7229. onHeaders(new Headers(headersDescriptor));
  7230. });
  7231. var resumableState = createResumableState(
  7232. options ? options.identifierPrefix : void 0,
  7233. options ? options.unstable_externalRuntimeSrc : void 0,
  7234. options ? options.bootstrapScriptContent : void 0,
  7235. options ? options.bootstrapScripts : void 0,
  7236. options ? options.bootstrapModules : void 0
  7237. ),
  7238. request = createRequest(
  7239. children,
  7240. resumableState,
  7241. createRenderState(
  7242. resumableState,
  7243. options ? options.nonce : void 0,
  7244. options ? options.unstable_externalRuntimeSrc : void 0,
  7245. options ? options.importMap : void 0,
  7246. onHeadersImpl,
  7247. options ? options.maxHeadersLength : void 0
  7248. ),
  7249. createRootFormatContext(options ? options.namespaceURI : void 0),
  7250. options ? options.progressiveChunkSize : void 0,
  7251. options ? options.onError : void 0,
  7252. onAllReady,
  7253. function () {
  7254. var stream = new ReadableStream(
  7255. {
  7256. type: "bytes",
  7257. pull: function (controller) {
  7258. startFlowing(request, controller);
  7259. },
  7260. cancel: function (reason) {
  7261. request.destination = null;
  7262. abort(request, reason);
  7263. }
  7264. },
  7265. { highWaterMark: 0 }
  7266. );
  7267. stream.allReady = allReady;
  7268. resolve(stream);
  7269. },
  7270. function (error) {
  7271. allReady.catch(function () {});
  7272. reject(error);
  7273. },
  7274. onFatalError,
  7275. options ? options.onPostpone : void 0,
  7276. options ? options.formState : void 0
  7277. );
  7278. if (options && options.signal) {
  7279. var signal = options.signal;
  7280. if (signal.aborted) abort(request, signal.reason);
  7281. else {
  7282. var listener = function () {
  7283. abort(request, signal.reason);
  7284. signal.removeEventListener("abort", listener);
  7285. };
  7286. signal.addEventListener("abort", listener);
  7287. }
  7288. }
  7289. startWork(request);
  7290. });
  7291. };
  7292. exports.resume = function (children, postponedState, options) {
  7293. return new Promise(function (resolve, reject) {
  7294. var onFatalError,
  7295. onAllReady,
  7296. allReady = new Promise(function (res, rej) {
  7297. onAllReady = res;
  7298. onFatalError = rej;
  7299. }),
  7300. request = resumeRequest(
  7301. children,
  7302. postponedState,
  7303. createRenderState(
  7304. postponedState.resumableState,
  7305. options ? options.nonce : void 0,
  7306. void 0,
  7307. void 0,
  7308. void 0,
  7309. void 0
  7310. ),
  7311. options ? options.onError : void 0,
  7312. onAllReady,
  7313. function () {
  7314. var stream = new ReadableStream(
  7315. {
  7316. type: "bytes",
  7317. pull: function (controller) {
  7318. startFlowing(request, controller);
  7319. },
  7320. cancel: function (reason) {
  7321. request.destination = null;
  7322. abort(request, reason);
  7323. }
  7324. },
  7325. { highWaterMark: 0 }
  7326. );
  7327. stream.allReady = allReady;
  7328. resolve(stream);
  7329. },
  7330. function (error) {
  7331. allReady.catch(function () {});
  7332. reject(error);
  7333. },
  7334. onFatalError,
  7335. options ? options.onPostpone : void 0
  7336. );
  7337. if (options && options.signal) {
  7338. var signal = options.signal;
  7339. if (signal.aborted) abort(request, signal.reason);
  7340. else {
  7341. var listener = function () {
  7342. abort(request, signal.reason);
  7343. signal.removeEventListener("abort", listener);
  7344. };
  7345. signal.addEventListener("abort", listener);
  7346. }
  7347. }
  7348. startWork(request);
  7349. });
  7350. };
  7351. exports.resumeAndPrerender = function (children, postponedState, options) {
  7352. return new Promise(function (resolve, reject) {
  7353. var request = resumeAndPrerenderRequest(
  7354. children,
  7355. postponedState,
  7356. createRenderState(
  7357. postponedState.resumableState,
  7358. void 0,
  7359. void 0,
  7360. void 0,
  7361. void 0,
  7362. void 0
  7363. ),
  7364. options ? options.onError : void 0,
  7365. function () {
  7366. var stream = new ReadableStream(
  7367. {
  7368. type: "bytes",
  7369. pull: function (controller) {
  7370. startFlowing(request, controller);
  7371. },
  7372. cancel: function (reason) {
  7373. request.destination = null;
  7374. abort(request, reason);
  7375. }
  7376. },
  7377. { highWaterMark: 0 }
  7378. );
  7379. stream = { postponed: getPostponedState(request), prelude: stream };
  7380. resolve(stream);
  7381. },
  7382. void 0,
  7383. void 0,
  7384. reject,
  7385. options ? options.onPostpone : void 0
  7386. );
  7387. if (options && options.signal) {
  7388. var signal = options.signal;
  7389. if (signal.aborted) abort(request, signal.reason);
  7390. else {
  7391. var listener = function () {
  7392. abort(request, signal.reason);
  7393. signal.removeEventListener("abort", listener);
  7394. };
  7395. signal.addEventListener("abort", listener);
  7396. }
  7397. }
  7398. startWork(request);
  7399. });
  7400. };
  7401. exports.version = "19.2.4";