react-dom-server.bun.production.js 240 KB

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