vue.js 329 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437
  1. import "./chunk-CSAU5B4Q.js";
  2. // node_modules/@vue/shared/dist/shared.esm-bundler.js
  3. function makeMap(str, expectsLowerCase) {
  4. const set2 = new Set(str.split(","));
  5. return expectsLowerCase ? (val) => set2.has(val.toLowerCase()) : (val) => set2.has(val);
  6. }
  7. var EMPTY_OBJ = true ? Object.freeze({}) : {};
  8. var EMPTY_ARR = true ? Object.freeze([]) : [];
  9. var NOOP = () => {
  10. };
  11. var NO = () => false;
  12. var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
  13. (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
  14. var isModelListener = (key) => key.startsWith("onUpdate:");
  15. var extend = Object.assign;
  16. var remove = (arr, el) => {
  17. const i = arr.indexOf(el);
  18. if (i > -1) {
  19. arr.splice(i, 1);
  20. }
  21. };
  22. var hasOwnProperty = Object.prototype.hasOwnProperty;
  23. var hasOwn = (val, key) => hasOwnProperty.call(val, key);
  24. var isArray = Array.isArray;
  25. var isMap = (val) => toTypeString(val) === "[object Map]";
  26. var isSet = (val) => toTypeString(val) === "[object Set]";
  27. var isDate = (val) => toTypeString(val) === "[object Date]";
  28. var isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  29. var isFunction = (val) => typeof val === "function";
  30. var isString = (val) => typeof val === "string";
  31. var isSymbol = (val) => typeof val === "symbol";
  32. var isObject = (val) => val !== null && typeof val === "object";
  33. var isPromise = (val) => {
  34. return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
  35. };
  36. var objectToString = Object.prototype.toString;
  37. var toTypeString = (value) => objectToString.call(value);
  38. var toRawType = (value) => {
  39. return toTypeString(value).slice(8, -1);
  40. };
  41. var isPlainObject = (val) => toTypeString(val) === "[object Object]";
  42. var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  43. var isReservedProp = makeMap(
  44. // the leading comma is intentional so empty string "" is also included
  45. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  46. );
  47. var isBuiltInDirective = makeMap(
  48. "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
  49. );
  50. var cacheStringFunction = (fn) => {
  51. const cache = /* @__PURE__ */ Object.create(null);
  52. return (str) => {
  53. const hit = cache[str];
  54. return hit || (cache[str] = fn(str));
  55. };
  56. };
  57. var camelizeRE = /-(\w)/g;
  58. var camelize = cacheStringFunction((str) => {
  59. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  60. });
  61. var hyphenateRE = /\B([A-Z])/g;
  62. var hyphenate = cacheStringFunction(
  63. (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
  64. );
  65. var capitalize = cacheStringFunction((str) => {
  66. return str.charAt(0).toUpperCase() + str.slice(1);
  67. });
  68. var toHandlerKey = cacheStringFunction((str) => {
  69. const s = str ? `on${capitalize(str)}` : ``;
  70. return s;
  71. });
  72. var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  73. var invokeArrayFns = (fns, arg) => {
  74. for (let i = 0; i < fns.length; i++) {
  75. fns[i](arg);
  76. }
  77. };
  78. var def = (obj, key, value) => {
  79. Object.defineProperty(obj, key, {
  80. configurable: true,
  81. enumerable: false,
  82. value
  83. });
  84. };
  85. var looseToNumber = (val) => {
  86. const n = parseFloat(val);
  87. return isNaN(n) ? val : n;
  88. };
  89. var toNumber = (val) => {
  90. const n = isString(val) ? Number(val) : NaN;
  91. return isNaN(n) ? val : n;
  92. };
  93. var _globalThis;
  94. var getGlobalThis = () => {
  95. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  96. };
  97. var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error";
  98. var isGloballyAllowed = makeMap(GLOBALS_ALLOWED);
  99. function normalizeStyle(value) {
  100. if (isArray(value)) {
  101. const res = {};
  102. for (let i = 0; i < value.length; i++) {
  103. const item = value[i];
  104. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  105. if (normalized) {
  106. for (const key in normalized) {
  107. res[key] = normalized[key];
  108. }
  109. }
  110. }
  111. return res;
  112. } else if (isString(value) || isObject(value)) {
  113. return value;
  114. }
  115. }
  116. var listDelimiterRE = /;(?![^(]*\))/g;
  117. var propertyDelimiterRE = /:([^]+)/;
  118. var styleCommentRE = /\/\*[^]*?\*\//g;
  119. function parseStringStyle(cssText) {
  120. const ret = {};
  121. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  122. if (item) {
  123. const tmp = item.split(propertyDelimiterRE);
  124. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  125. }
  126. });
  127. return ret;
  128. }
  129. function stringifyStyle(styles) {
  130. let ret = "";
  131. if (!styles || isString(styles)) {
  132. return ret;
  133. }
  134. for (const key in styles) {
  135. const value = styles[key];
  136. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  137. if (isString(value) || typeof value === "number") {
  138. ret += `${normalizedKey}:${value};`;
  139. }
  140. }
  141. return ret;
  142. }
  143. function normalizeClass(value) {
  144. let res = "";
  145. if (isString(value)) {
  146. res = value;
  147. } else if (isArray(value)) {
  148. for (let i = 0; i < value.length; i++) {
  149. const normalized = normalizeClass(value[i]);
  150. if (normalized) {
  151. res += normalized + " ";
  152. }
  153. }
  154. } else if (isObject(value)) {
  155. for (const name in value) {
  156. if (value[name]) {
  157. res += name + " ";
  158. }
  159. }
  160. }
  161. return res.trim();
  162. }
  163. function normalizeProps(props) {
  164. if (!props)
  165. return null;
  166. let { class: klass, style } = props;
  167. if (klass && !isString(klass)) {
  168. props.class = normalizeClass(klass);
  169. }
  170. if (style) {
  171. props.style = normalizeStyle(style);
  172. }
  173. return props;
  174. }
  175. var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
  176. var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
  177. var MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
  178. var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
  179. var isHTMLTag = makeMap(HTML_TAGS);
  180. var isSVGTag = makeMap(SVG_TAGS);
  181. var isMathMLTag = makeMap(MATH_TAGS);
  182. var isVoidTag = makeMap(VOID_TAGS);
  183. var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  184. var isSpecialBooleanAttr = makeMap(specialBooleanAttrs);
  185. var isBooleanAttr = makeMap(
  186. specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
  187. );
  188. function includeBooleanAttr(value) {
  189. return !!value || value === "";
  190. }
  191. var isKnownHtmlAttr = makeMap(
  192. `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
  193. );
  194. var isKnownSvgAttr = makeMap(
  195. `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
  196. );
  197. function isRenderableAttrValue(value) {
  198. if (value == null) {
  199. return false;
  200. }
  201. const type = typeof value;
  202. return type === "string" || type === "number" || type === "boolean";
  203. }
  204. function looseCompareArrays(a, b) {
  205. if (a.length !== b.length)
  206. return false;
  207. let equal = true;
  208. for (let i = 0; equal && i < a.length; i++) {
  209. equal = looseEqual(a[i], b[i]);
  210. }
  211. return equal;
  212. }
  213. function looseEqual(a, b) {
  214. if (a === b)
  215. return true;
  216. let aValidType = isDate(a);
  217. let bValidType = isDate(b);
  218. if (aValidType || bValidType) {
  219. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  220. }
  221. aValidType = isSymbol(a);
  222. bValidType = isSymbol(b);
  223. if (aValidType || bValidType) {
  224. return a === b;
  225. }
  226. aValidType = isArray(a);
  227. bValidType = isArray(b);
  228. if (aValidType || bValidType) {
  229. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  230. }
  231. aValidType = isObject(a);
  232. bValidType = isObject(b);
  233. if (aValidType || bValidType) {
  234. if (!aValidType || !bValidType) {
  235. return false;
  236. }
  237. const aKeysCount = Object.keys(a).length;
  238. const bKeysCount = Object.keys(b).length;
  239. if (aKeysCount !== bKeysCount) {
  240. return false;
  241. }
  242. for (const key in a) {
  243. const aHasKey = a.hasOwnProperty(key);
  244. const bHasKey = b.hasOwnProperty(key);
  245. if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
  246. return false;
  247. }
  248. }
  249. }
  250. return String(a) === String(b);
  251. }
  252. function looseIndexOf(arr, val) {
  253. return arr.findIndex((item) => looseEqual(item, val));
  254. }
  255. var toDisplayString = (val) => {
  256. return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
  257. };
  258. var replacer = (_key, val) => {
  259. if (val && val.__v_isRef) {
  260. return replacer(_key, val.value);
  261. } else if (isMap(val)) {
  262. return {
  263. [`Map(${val.size})`]: [...val.entries()].reduce(
  264. (entries, [key, val2], i) => {
  265. entries[stringifySymbol(key, i) + " =>"] = val2;
  266. return entries;
  267. },
  268. {}
  269. )
  270. };
  271. } else if (isSet(val)) {
  272. return {
  273. [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
  274. };
  275. } else if (isSymbol(val)) {
  276. return stringifySymbol(val);
  277. } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  278. return String(val);
  279. }
  280. return val;
  281. };
  282. var stringifySymbol = (v, i = "") => {
  283. var _a;
  284. return (
  285. // Symbol.description in es2019+ so we need to cast here to pass
  286. // the lib: es2016 check
  287. isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
  288. );
  289. };
  290. // node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
  291. function warn(msg, ...args) {
  292. console.warn(`[Vue warn] ${msg}`, ...args);
  293. }
  294. var activeEffectScope;
  295. var EffectScope = class {
  296. constructor(detached = false) {
  297. this.detached = detached;
  298. this._active = true;
  299. this.effects = [];
  300. this.cleanups = [];
  301. this.parent = activeEffectScope;
  302. if (!detached && activeEffectScope) {
  303. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  304. this
  305. ) - 1;
  306. }
  307. }
  308. get active() {
  309. return this._active;
  310. }
  311. run(fn) {
  312. if (this._active) {
  313. const currentEffectScope = activeEffectScope;
  314. try {
  315. activeEffectScope = this;
  316. return fn();
  317. } finally {
  318. activeEffectScope = currentEffectScope;
  319. }
  320. } else if (true) {
  321. warn(`cannot run an inactive effect scope.`);
  322. }
  323. }
  324. /**
  325. * This should only be called on non-detached scopes
  326. * @internal
  327. */
  328. on() {
  329. activeEffectScope = this;
  330. }
  331. /**
  332. * This should only be called on non-detached scopes
  333. * @internal
  334. */
  335. off() {
  336. activeEffectScope = this.parent;
  337. }
  338. stop(fromParent) {
  339. if (this._active) {
  340. let i, l;
  341. for (i = 0, l = this.effects.length; i < l; i++) {
  342. this.effects[i].stop();
  343. }
  344. for (i = 0, l = this.cleanups.length; i < l; i++) {
  345. this.cleanups[i]();
  346. }
  347. if (this.scopes) {
  348. for (i = 0, l = this.scopes.length; i < l; i++) {
  349. this.scopes[i].stop(true);
  350. }
  351. }
  352. if (!this.detached && this.parent && !fromParent) {
  353. const last = this.parent.scopes.pop();
  354. if (last && last !== this) {
  355. this.parent.scopes[this.index] = last;
  356. last.index = this.index;
  357. }
  358. }
  359. this.parent = void 0;
  360. this._active = false;
  361. }
  362. }
  363. };
  364. function effectScope(detached) {
  365. return new EffectScope(detached);
  366. }
  367. function recordEffectScope(effect2, scope = activeEffectScope) {
  368. if (scope && scope.active) {
  369. scope.effects.push(effect2);
  370. }
  371. }
  372. function getCurrentScope() {
  373. return activeEffectScope;
  374. }
  375. function onScopeDispose(fn) {
  376. if (activeEffectScope) {
  377. activeEffectScope.cleanups.push(fn);
  378. } else if (true) {
  379. warn(
  380. `onScopeDispose() is called when there is no active effect scope to be associated with.`
  381. );
  382. }
  383. }
  384. var activeEffect;
  385. var ReactiveEffect = class {
  386. constructor(fn, trigger2, scheduler, scope) {
  387. this.fn = fn;
  388. this.trigger = trigger2;
  389. this.scheduler = scheduler;
  390. this.active = true;
  391. this.deps = [];
  392. this._dirtyLevel = 4;
  393. this._trackId = 0;
  394. this._runnings = 0;
  395. this._shouldSchedule = false;
  396. this._depsLength = 0;
  397. recordEffectScope(this, scope);
  398. }
  399. get dirty() {
  400. if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
  401. this._dirtyLevel = 1;
  402. pauseTracking();
  403. for (let i = 0; i < this._depsLength; i++) {
  404. const dep = this.deps[i];
  405. if (dep.computed) {
  406. triggerComputed(dep.computed);
  407. if (this._dirtyLevel >= 4) {
  408. break;
  409. }
  410. }
  411. }
  412. if (this._dirtyLevel === 1) {
  413. this._dirtyLevel = 0;
  414. }
  415. resetTracking();
  416. }
  417. return this._dirtyLevel >= 4;
  418. }
  419. set dirty(v) {
  420. this._dirtyLevel = v ? 4 : 0;
  421. }
  422. run() {
  423. this._dirtyLevel = 0;
  424. if (!this.active) {
  425. return this.fn();
  426. }
  427. let lastShouldTrack = shouldTrack;
  428. let lastEffect = activeEffect;
  429. try {
  430. shouldTrack = true;
  431. activeEffect = this;
  432. this._runnings++;
  433. preCleanupEffect(this);
  434. return this.fn();
  435. } finally {
  436. postCleanupEffect(this);
  437. this._runnings--;
  438. activeEffect = lastEffect;
  439. shouldTrack = lastShouldTrack;
  440. }
  441. }
  442. stop() {
  443. var _a;
  444. if (this.active) {
  445. preCleanupEffect(this);
  446. postCleanupEffect(this);
  447. (_a = this.onStop) == null ? void 0 : _a.call(this);
  448. this.active = false;
  449. }
  450. }
  451. };
  452. function triggerComputed(computed3) {
  453. return computed3.value;
  454. }
  455. function preCleanupEffect(effect2) {
  456. effect2._trackId++;
  457. effect2._depsLength = 0;
  458. }
  459. function postCleanupEffect(effect2) {
  460. if (effect2.deps.length > effect2._depsLength) {
  461. for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
  462. cleanupDepEffect(effect2.deps[i], effect2);
  463. }
  464. effect2.deps.length = effect2._depsLength;
  465. }
  466. }
  467. function cleanupDepEffect(dep, effect2) {
  468. const trackId = dep.get(effect2);
  469. if (trackId !== void 0 && effect2._trackId !== trackId) {
  470. dep.delete(effect2);
  471. if (dep.size === 0) {
  472. dep.cleanup();
  473. }
  474. }
  475. }
  476. function effect(fn, options) {
  477. if (fn.effect instanceof ReactiveEffect) {
  478. fn = fn.effect.fn;
  479. }
  480. const _effect = new ReactiveEffect(fn, NOOP, () => {
  481. if (_effect.dirty) {
  482. _effect.run();
  483. }
  484. });
  485. if (options) {
  486. extend(_effect, options);
  487. if (options.scope)
  488. recordEffectScope(_effect, options.scope);
  489. }
  490. if (!options || !options.lazy) {
  491. _effect.run();
  492. }
  493. const runner = _effect.run.bind(_effect);
  494. runner.effect = _effect;
  495. return runner;
  496. }
  497. function stop(runner) {
  498. runner.effect.stop();
  499. }
  500. var shouldTrack = true;
  501. var pauseScheduleStack = 0;
  502. var trackStack = [];
  503. function pauseTracking() {
  504. trackStack.push(shouldTrack);
  505. shouldTrack = false;
  506. }
  507. function resetTracking() {
  508. const last = trackStack.pop();
  509. shouldTrack = last === void 0 ? true : last;
  510. }
  511. function pauseScheduling() {
  512. pauseScheduleStack++;
  513. }
  514. function resetScheduling() {
  515. pauseScheduleStack--;
  516. while (!pauseScheduleStack && queueEffectSchedulers.length) {
  517. queueEffectSchedulers.shift()();
  518. }
  519. }
  520. function trackEffect(effect2, dep, debuggerEventExtraInfo) {
  521. var _a;
  522. if (dep.get(effect2) !== effect2._trackId) {
  523. dep.set(effect2, effect2._trackId);
  524. const oldDep = effect2.deps[effect2._depsLength];
  525. if (oldDep !== dep) {
  526. if (oldDep) {
  527. cleanupDepEffect(oldDep, effect2);
  528. }
  529. effect2.deps[effect2._depsLength++] = dep;
  530. } else {
  531. effect2._depsLength++;
  532. }
  533. if (true) {
  534. (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
  535. }
  536. }
  537. }
  538. var queueEffectSchedulers = [];
  539. function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
  540. var _a;
  541. pauseScheduling();
  542. for (const effect2 of dep.keys()) {
  543. let tracking;
  544. if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
  545. effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
  546. effect2._dirtyLevel = dirtyLevel;
  547. }
  548. if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
  549. if (true) {
  550. (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
  551. }
  552. effect2.trigger();
  553. if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
  554. effect2._shouldSchedule = false;
  555. if (effect2.scheduler) {
  556. queueEffectSchedulers.push(effect2.scheduler);
  557. }
  558. }
  559. }
  560. }
  561. resetScheduling();
  562. }
  563. var createDep = (cleanup, computed3) => {
  564. const dep = /* @__PURE__ */ new Map();
  565. dep.cleanup = cleanup;
  566. dep.computed = computed3;
  567. return dep;
  568. };
  569. var targetMap = /* @__PURE__ */ new WeakMap();
  570. var ITERATE_KEY = Symbol(true ? "iterate" : "");
  571. var MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : "");
  572. function track(target, type, key) {
  573. if (shouldTrack && activeEffect) {
  574. let depsMap = targetMap.get(target);
  575. if (!depsMap) {
  576. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  577. }
  578. let dep = depsMap.get(key);
  579. if (!dep) {
  580. depsMap.set(key, dep = createDep(() => depsMap.delete(key)));
  581. }
  582. trackEffect(
  583. activeEffect,
  584. dep,
  585. true ? {
  586. target,
  587. type,
  588. key
  589. } : void 0
  590. );
  591. }
  592. }
  593. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  594. const depsMap = targetMap.get(target);
  595. if (!depsMap) {
  596. return;
  597. }
  598. let deps = [];
  599. if (type === "clear") {
  600. deps = [...depsMap.values()];
  601. } else if (key === "length" && isArray(target)) {
  602. const newLength = Number(newValue);
  603. depsMap.forEach((dep, key2) => {
  604. if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
  605. deps.push(dep);
  606. }
  607. });
  608. } else {
  609. if (key !== void 0) {
  610. deps.push(depsMap.get(key));
  611. }
  612. switch (type) {
  613. case "add":
  614. if (!isArray(target)) {
  615. deps.push(depsMap.get(ITERATE_KEY));
  616. if (isMap(target)) {
  617. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  618. }
  619. } else if (isIntegerKey(key)) {
  620. deps.push(depsMap.get("length"));
  621. }
  622. break;
  623. case "delete":
  624. if (!isArray(target)) {
  625. deps.push(depsMap.get(ITERATE_KEY));
  626. if (isMap(target)) {
  627. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  628. }
  629. }
  630. break;
  631. case "set":
  632. if (isMap(target)) {
  633. deps.push(depsMap.get(ITERATE_KEY));
  634. }
  635. break;
  636. }
  637. }
  638. pauseScheduling();
  639. for (const dep of deps) {
  640. if (dep) {
  641. triggerEffects(
  642. dep,
  643. 4,
  644. true ? {
  645. target,
  646. type,
  647. key,
  648. newValue,
  649. oldValue,
  650. oldTarget
  651. } : void 0
  652. );
  653. }
  654. }
  655. resetScheduling();
  656. }
  657. function getDepFromReactive(object, key) {
  658. var _a;
  659. return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
  660. }
  661. var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
  662. var builtInSymbols = new Set(
  663. Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  664. );
  665. var arrayInstrumentations = createArrayInstrumentations();
  666. function createArrayInstrumentations() {
  667. const instrumentations = {};
  668. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  669. instrumentations[key] = function(...args) {
  670. const arr = toRaw(this);
  671. for (let i = 0, l = this.length; i < l; i++) {
  672. track(arr, "get", i + "");
  673. }
  674. const res = arr[key](...args);
  675. if (res === -1 || res === false) {
  676. return arr[key](...args.map(toRaw));
  677. } else {
  678. return res;
  679. }
  680. };
  681. });
  682. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  683. instrumentations[key] = function(...args) {
  684. pauseTracking();
  685. pauseScheduling();
  686. const res = toRaw(this)[key].apply(this, args);
  687. resetScheduling();
  688. resetTracking();
  689. return res;
  690. };
  691. });
  692. return instrumentations;
  693. }
  694. function hasOwnProperty2(key) {
  695. if (!isSymbol(key))
  696. key = String(key);
  697. const obj = toRaw(this);
  698. track(obj, "has", key);
  699. return obj.hasOwnProperty(key);
  700. }
  701. var BaseReactiveHandler = class {
  702. constructor(_isReadonly = false, _isShallow = false) {
  703. this._isReadonly = _isReadonly;
  704. this._isShallow = _isShallow;
  705. }
  706. get(target, key, receiver) {
  707. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  708. if (key === "__v_isReactive") {
  709. return !isReadonly2;
  710. } else if (key === "__v_isReadonly") {
  711. return isReadonly2;
  712. } else if (key === "__v_isShallow") {
  713. return isShallow2;
  714. } else if (key === "__v_raw") {
  715. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  716. // this means the reciever is a user proxy of the reactive proxy
  717. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  718. return target;
  719. }
  720. return;
  721. }
  722. const targetIsArray = isArray(target);
  723. if (!isReadonly2) {
  724. if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
  725. return Reflect.get(arrayInstrumentations, key, receiver);
  726. }
  727. if (key === "hasOwnProperty") {
  728. return hasOwnProperty2;
  729. }
  730. }
  731. const res = Reflect.get(target, key, receiver);
  732. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  733. return res;
  734. }
  735. if (!isReadonly2) {
  736. track(target, "get", key);
  737. }
  738. if (isShallow2) {
  739. return res;
  740. }
  741. if (isRef(res)) {
  742. return targetIsArray && isIntegerKey(key) ? res : res.value;
  743. }
  744. if (isObject(res)) {
  745. return isReadonly2 ? readonly(res) : reactive(res);
  746. }
  747. return res;
  748. }
  749. };
  750. var MutableReactiveHandler = class extends BaseReactiveHandler {
  751. constructor(isShallow2 = false) {
  752. super(false, isShallow2);
  753. }
  754. set(target, key, value, receiver) {
  755. let oldValue = target[key];
  756. if (!this._isShallow) {
  757. const isOldValueReadonly = isReadonly(oldValue);
  758. if (!isShallow(value) && !isReadonly(value)) {
  759. oldValue = toRaw(oldValue);
  760. value = toRaw(value);
  761. }
  762. if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
  763. if (isOldValueReadonly) {
  764. return false;
  765. } else {
  766. oldValue.value = value;
  767. return true;
  768. }
  769. }
  770. }
  771. const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  772. const result = Reflect.set(target, key, value, receiver);
  773. if (target === toRaw(receiver)) {
  774. if (!hadKey) {
  775. trigger(target, "add", key, value);
  776. } else if (hasChanged(value, oldValue)) {
  777. trigger(target, "set", key, value, oldValue);
  778. }
  779. }
  780. return result;
  781. }
  782. deleteProperty(target, key) {
  783. const hadKey = hasOwn(target, key);
  784. const oldValue = target[key];
  785. const result = Reflect.deleteProperty(target, key);
  786. if (result && hadKey) {
  787. trigger(target, "delete", key, void 0, oldValue);
  788. }
  789. return result;
  790. }
  791. has(target, key) {
  792. const result = Reflect.has(target, key);
  793. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  794. track(target, "has", key);
  795. }
  796. return result;
  797. }
  798. ownKeys(target) {
  799. track(
  800. target,
  801. "iterate",
  802. isArray(target) ? "length" : ITERATE_KEY
  803. );
  804. return Reflect.ownKeys(target);
  805. }
  806. };
  807. var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
  808. constructor(isShallow2 = false) {
  809. super(true, isShallow2);
  810. }
  811. set(target, key) {
  812. if (true) {
  813. warn(
  814. `Set operation on key "${String(key)}" failed: target is readonly.`,
  815. target
  816. );
  817. }
  818. return true;
  819. }
  820. deleteProperty(target, key) {
  821. if (true) {
  822. warn(
  823. `Delete operation on key "${String(key)}" failed: target is readonly.`,
  824. target
  825. );
  826. }
  827. return true;
  828. }
  829. };
  830. var mutableHandlers = new MutableReactiveHandler();
  831. var readonlyHandlers = new ReadonlyReactiveHandler();
  832. var shallowReactiveHandlers = new MutableReactiveHandler(
  833. true
  834. );
  835. var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true);
  836. var toShallow = (value) => value;
  837. var getProto = (v) => Reflect.getPrototypeOf(v);
  838. function get(target, key, isReadonly2 = false, isShallow2 = false) {
  839. target = target["__v_raw"];
  840. const rawTarget = toRaw(target);
  841. const rawKey = toRaw(key);
  842. if (!isReadonly2) {
  843. if (hasChanged(key, rawKey)) {
  844. track(rawTarget, "get", key);
  845. }
  846. track(rawTarget, "get", rawKey);
  847. }
  848. const { has: has2 } = getProto(rawTarget);
  849. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  850. if (has2.call(rawTarget, key)) {
  851. return wrap(target.get(key));
  852. } else if (has2.call(rawTarget, rawKey)) {
  853. return wrap(target.get(rawKey));
  854. } else if (target !== rawTarget) {
  855. target.get(key);
  856. }
  857. }
  858. function has(key, isReadonly2 = false) {
  859. const target = this["__v_raw"];
  860. const rawTarget = toRaw(target);
  861. const rawKey = toRaw(key);
  862. if (!isReadonly2) {
  863. if (hasChanged(key, rawKey)) {
  864. track(rawTarget, "has", key);
  865. }
  866. track(rawTarget, "has", rawKey);
  867. }
  868. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  869. }
  870. function size(target, isReadonly2 = false) {
  871. target = target["__v_raw"];
  872. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  873. return Reflect.get(target, "size", target);
  874. }
  875. function add(value) {
  876. value = toRaw(value);
  877. const target = toRaw(this);
  878. const proto = getProto(target);
  879. const hadKey = proto.has.call(target, value);
  880. if (!hadKey) {
  881. target.add(value);
  882. trigger(target, "add", value, value);
  883. }
  884. return this;
  885. }
  886. function set(key, value) {
  887. value = toRaw(value);
  888. const target = toRaw(this);
  889. const { has: has2, get: get2 } = getProto(target);
  890. let hadKey = has2.call(target, key);
  891. if (!hadKey) {
  892. key = toRaw(key);
  893. hadKey = has2.call(target, key);
  894. } else if (true) {
  895. checkIdentityKeys(target, has2, key);
  896. }
  897. const oldValue = get2.call(target, key);
  898. target.set(key, value);
  899. if (!hadKey) {
  900. trigger(target, "add", key, value);
  901. } else if (hasChanged(value, oldValue)) {
  902. trigger(target, "set", key, value, oldValue);
  903. }
  904. return this;
  905. }
  906. function deleteEntry(key) {
  907. const target = toRaw(this);
  908. const { has: has2, get: get2 } = getProto(target);
  909. let hadKey = has2.call(target, key);
  910. if (!hadKey) {
  911. key = toRaw(key);
  912. hadKey = has2.call(target, key);
  913. } else if (true) {
  914. checkIdentityKeys(target, has2, key);
  915. }
  916. const oldValue = get2 ? get2.call(target, key) : void 0;
  917. const result = target.delete(key);
  918. if (hadKey) {
  919. trigger(target, "delete", key, void 0, oldValue);
  920. }
  921. return result;
  922. }
  923. function clear() {
  924. const target = toRaw(this);
  925. const hadItems = target.size !== 0;
  926. const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
  927. const result = target.clear();
  928. if (hadItems) {
  929. trigger(target, "clear", void 0, void 0, oldTarget);
  930. }
  931. return result;
  932. }
  933. function createForEach(isReadonly2, isShallow2) {
  934. return function forEach(callback, thisArg) {
  935. const observed = this;
  936. const target = observed["__v_raw"];
  937. const rawTarget = toRaw(target);
  938. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  939. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  940. return target.forEach((value, key) => {
  941. return callback.call(thisArg, wrap(value), wrap(key), observed);
  942. });
  943. };
  944. }
  945. function createIterableMethod(method, isReadonly2, isShallow2) {
  946. return function(...args) {
  947. const target = this["__v_raw"];
  948. const rawTarget = toRaw(target);
  949. const targetIsMap = isMap(rawTarget);
  950. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  951. const isKeyOnly = method === "keys" && targetIsMap;
  952. const innerIterator = target[method](...args);
  953. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  954. !isReadonly2 && track(
  955. rawTarget,
  956. "iterate",
  957. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  958. );
  959. return {
  960. // iterator protocol
  961. next() {
  962. const { value, done } = innerIterator.next();
  963. return done ? { value, done } : {
  964. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  965. done
  966. };
  967. },
  968. // iterable protocol
  969. [Symbol.iterator]() {
  970. return this;
  971. }
  972. };
  973. };
  974. }
  975. function createReadonlyMethod(type) {
  976. return function(...args) {
  977. if (true) {
  978. const key = args[0] ? `on key "${args[0]}" ` : ``;
  979. warn(
  980. `${capitalize(type)} operation ${key}failed: target is readonly.`,
  981. toRaw(this)
  982. );
  983. }
  984. return type === "delete" ? false : type === "clear" ? void 0 : this;
  985. };
  986. }
  987. function createInstrumentations() {
  988. const mutableInstrumentations2 = {
  989. get(key) {
  990. return get(this, key);
  991. },
  992. get size() {
  993. return size(this);
  994. },
  995. has,
  996. add,
  997. set,
  998. delete: deleteEntry,
  999. clear,
  1000. forEach: createForEach(false, false)
  1001. };
  1002. const shallowInstrumentations2 = {
  1003. get(key) {
  1004. return get(this, key, false, true);
  1005. },
  1006. get size() {
  1007. return size(this);
  1008. },
  1009. has,
  1010. add,
  1011. set,
  1012. delete: deleteEntry,
  1013. clear,
  1014. forEach: createForEach(false, true)
  1015. };
  1016. const readonlyInstrumentations2 = {
  1017. get(key) {
  1018. return get(this, key, true);
  1019. },
  1020. get size() {
  1021. return size(this, true);
  1022. },
  1023. has(key) {
  1024. return has.call(this, key, true);
  1025. },
  1026. add: createReadonlyMethod("add"),
  1027. set: createReadonlyMethod("set"),
  1028. delete: createReadonlyMethod("delete"),
  1029. clear: createReadonlyMethod("clear"),
  1030. forEach: createForEach(true, false)
  1031. };
  1032. const shallowReadonlyInstrumentations2 = {
  1033. get(key) {
  1034. return get(this, key, true, true);
  1035. },
  1036. get size() {
  1037. return size(this, true);
  1038. },
  1039. has(key) {
  1040. return has.call(this, key, true);
  1041. },
  1042. add: createReadonlyMethod("add"),
  1043. set: createReadonlyMethod("set"),
  1044. delete: createReadonlyMethod("delete"),
  1045. clear: createReadonlyMethod("clear"),
  1046. forEach: createForEach(true, true)
  1047. };
  1048. const iteratorMethods = [
  1049. "keys",
  1050. "values",
  1051. "entries",
  1052. Symbol.iterator
  1053. ];
  1054. iteratorMethods.forEach((method) => {
  1055. mutableInstrumentations2[method] = createIterableMethod(method, false, false);
  1056. readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
  1057. shallowInstrumentations2[method] = createIterableMethod(method, false, true);
  1058. shallowReadonlyInstrumentations2[method] = createIterableMethod(
  1059. method,
  1060. true,
  1061. true
  1062. );
  1063. });
  1064. return [
  1065. mutableInstrumentations2,
  1066. readonlyInstrumentations2,
  1067. shallowInstrumentations2,
  1068. shallowReadonlyInstrumentations2
  1069. ];
  1070. }
  1071. var [
  1072. mutableInstrumentations,
  1073. readonlyInstrumentations,
  1074. shallowInstrumentations,
  1075. shallowReadonlyInstrumentations
  1076. ] = createInstrumentations();
  1077. function createInstrumentationGetter(isReadonly2, shallow) {
  1078. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  1079. return (target, key, receiver) => {
  1080. if (key === "__v_isReactive") {
  1081. return !isReadonly2;
  1082. } else if (key === "__v_isReadonly") {
  1083. return isReadonly2;
  1084. } else if (key === "__v_raw") {
  1085. return target;
  1086. }
  1087. return Reflect.get(
  1088. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  1089. key,
  1090. receiver
  1091. );
  1092. };
  1093. }
  1094. var mutableCollectionHandlers = {
  1095. get: createInstrumentationGetter(false, false)
  1096. };
  1097. var shallowCollectionHandlers = {
  1098. get: createInstrumentationGetter(false, true)
  1099. };
  1100. var readonlyCollectionHandlers = {
  1101. get: createInstrumentationGetter(true, false)
  1102. };
  1103. var shallowReadonlyCollectionHandlers = {
  1104. get: createInstrumentationGetter(true, true)
  1105. };
  1106. function checkIdentityKeys(target, has2, key) {
  1107. const rawKey = toRaw(key);
  1108. if (rawKey !== key && has2.call(target, rawKey)) {
  1109. const type = toRawType(target);
  1110. warn(
  1111. `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
  1112. );
  1113. }
  1114. }
  1115. var reactiveMap = /* @__PURE__ */ new WeakMap();
  1116. var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1117. var readonlyMap = /* @__PURE__ */ new WeakMap();
  1118. var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1119. function targetTypeMap(rawType) {
  1120. switch (rawType) {
  1121. case "Object":
  1122. case "Array":
  1123. return 1;
  1124. case "Map":
  1125. case "Set":
  1126. case "WeakMap":
  1127. case "WeakSet":
  1128. return 2;
  1129. default:
  1130. return 0;
  1131. }
  1132. }
  1133. function getTargetType(value) {
  1134. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  1135. }
  1136. function reactive(target) {
  1137. if (isReadonly(target)) {
  1138. return target;
  1139. }
  1140. return createReactiveObject(
  1141. target,
  1142. false,
  1143. mutableHandlers,
  1144. mutableCollectionHandlers,
  1145. reactiveMap
  1146. );
  1147. }
  1148. function shallowReactive(target) {
  1149. return createReactiveObject(
  1150. target,
  1151. false,
  1152. shallowReactiveHandlers,
  1153. shallowCollectionHandlers,
  1154. shallowReactiveMap
  1155. );
  1156. }
  1157. function readonly(target) {
  1158. return createReactiveObject(
  1159. target,
  1160. true,
  1161. readonlyHandlers,
  1162. readonlyCollectionHandlers,
  1163. readonlyMap
  1164. );
  1165. }
  1166. function shallowReadonly(target) {
  1167. return createReactiveObject(
  1168. target,
  1169. true,
  1170. shallowReadonlyHandlers,
  1171. shallowReadonlyCollectionHandlers,
  1172. shallowReadonlyMap
  1173. );
  1174. }
  1175. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  1176. if (!isObject(target)) {
  1177. if (true) {
  1178. warn(`value cannot be made reactive: ${String(target)}`);
  1179. }
  1180. return target;
  1181. }
  1182. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  1183. return target;
  1184. }
  1185. const existingProxy = proxyMap.get(target);
  1186. if (existingProxy) {
  1187. return existingProxy;
  1188. }
  1189. const targetType = getTargetType(target);
  1190. if (targetType === 0) {
  1191. return target;
  1192. }
  1193. const proxy = new Proxy(
  1194. target,
  1195. targetType === 2 ? collectionHandlers : baseHandlers
  1196. );
  1197. proxyMap.set(target, proxy);
  1198. return proxy;
  1199. }
  1200. function isReactive(value) {
  1201. if (isReadonly(value)) {
  1202. return isReactive(value["__v_raw"]);
  1203. }
  1204. return !!(value && value["__v_isReactive"]);
  1205. }
  1206. function isReadonly(value) {
  1207. return !!(value && value["__v_isReadonly"]);
  1208. }
  1209. function isShallow(value) {
  1210. return !!(value && value["__v_isShallow"]);
  1211. }
  1212. function isProxy(value) {
  1213. return value ? !!value["__v_raw"] : false;
  1214. }
  1215. function toRaw(observed) {
  1216. const raw = observed && observed["__v_raw"];
  1217. return raw ? toRaw(raw) : observed;
  1218. }
  1219. function markRaw(value) {
  1220. if (Object.isExtensible(value)) {
  1221. def(value, "__v_skip", true);
  1222. }
  1223. return value;
  1224. }
  1225. var toReactive = (value) => isObject(value) ? reactive(value) : value;
  1226. var toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1227. var COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;
  1228. var ComputedRefImpl = class {
  1229. constructor(getter, _setter, isReadonly2, isSSR) {
  1230. this.getter = getter;
  1231. this._setter = _setter;
  1232. this.dep = void 0;
  1233. this.__v_isRef = true;
  1234. this["__v_isReadonly"] = false;
  1235. this.effect = new ReactiveEffect(
  1236. () => getter(this._value),
  1237. () => triggerRefValue(
  1238. this,
  1239. this.effect._dirtyLevel === 2 ? 2 : 3
  1240. )
  1241. );
  1242. this.effect.computed = this;
  1243. this.effect.active = this._cacheable = !isSSR;
  1244. this["__v_isReadonly"] = isReadonly2;
  1245. }
  1246. get value() {
  1247. const self2 = toRaw(this);
  1248. if ((!self2._cacheable || self2.effect.dirty) && hasChanged(self2._value, self2._value = self2.effect.run())) {
  1249. triggerRefValue(self2, 4);
  1250. }
  1251. trackRefValue(self2);
  1252. if (self2.effect._dirtyLevel >= 2) {
  1253. if (this._warnRecursive) {
  1254. warn(COMPUTED_SIDE_EFFECT_WARN, `
  1255. getter: `, this.getter);
  1256. }
  1257. triggerRefValue(self2, 2);
  1258. }
  1259. return self2._value;
  1260. }
  1261. set value(newValue) {
  1262. this._setter(newValue);
  1263. }
  1264. // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
  1265. get _dirty() {
  1266. return this.effect.dirty;
  1267. }
  1268. set _dirty(v) {
  1269. this.effect.dirty = v;
  1270. }
  1271. // #endregion
  1272. };
  1273. function computed(getterOrOptions, debugOptions, isSSR = false) {
  1274. let getter;
  1275. let setter;
  1276. const onlyGetter = isFunction(getterOrOptions);
  1277. if (onlyGetter) {
  1278. getter = getterOrOptions;
  1279. setter = true ? () => {
  1280. warn("Write operation failed: computed value is readonly");
  1281. } : NOOP;
  1282. } else {
  1283. getter = getterOrOptions.get;
  1284. setter = getterOrOptions.set;
  1285. }
  1286. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  1287. if (debugOptions && !isSSR) {
  1288. cRef.effect.onTrack = debugOptions.onTrack;
  1289. cRef.effect.onTrigger = debugOptions.onTrigger;
  1290. }
  1291. return cRef;
  1292. }
  1293. function trackRefValue(ref2) {
  1294. var _a;
  1295. if (shouldTrack && activeEffect) {
  1296. ref2 = toRaw(ref2);
  1297. trackEffect(
  1298. activeEffect,
  1299. (_a = ref2.dep) != null ? _a : ref2.dep = createDep(
  1300. () => ref2.dep = void 0,
  1301. ref2 instanceof ComputedRefImpl ? ref2 : void 0
  1302. ),
  1303. true ? {
  1304. target: ref2,
  1305. type: "get",
  1306. key: "value"
  1307. } : void 0
  1308. );
  1309. }
  1310. }
  1311. function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
  1312. ref2 = toRaw(ref2);
  1313. const dep = ref2.dep;
  1314. if (dep) {
  1315. triggerEffects(
  1316. dep,
  1317. dirtyLevel,
  1318. true ? {
  1319. target: ref2,
  1320. type: "set",
  1321. key: "value",
  1322. newValue: newVal
  1323. } : void 0
  1324. );
  1325. }
  1326. }
  1327. function isRef(r) {
  1328. return !!(r && r.__v_isRef === true);
  1329. }
  1330. function ref(value) {
  1331. return createRef(value, false);
  1332. }
  1333. function shallowRef(value) {
  1334. return createRef(value, true);
  1335. }
  1336. function createRef(rawValue, shallow) {
  1337. if (isRef(rawValue)) {
  1338. return rawValue;
  1339. }
  1340. return new RefImpl(rawValue, shallow);
  1341. }
  1342. var RefImpl = class {
  1343. constructor(value, __v_isShallow) {
  1344. this.__v_isShallow = __v_isShallow;
  1345. this.dep = void 0;
  1346. this.__v_isRef = true;
  1347. this._rawValue = __v_isShallow ? value : toRaw(value);
  1348. this._value = __v_isShallow ? value : toReactive(value);
  1349. }
  1350. get value() {
  1351. trackRefValue(this);
  1352. return this._value;
  1353. }
  1354. set value(newVal) {
  1355. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  1356. newVal = useDirectValue ? newVal : toRaw(newVal);
  1357. if (hasChanged(newVal, this._rawValue)) {
  1358. this._rawValue = newVal;
  1359. this._value = useDirectValue ? newVal : toReactive(newVal);
  1360. triggerRefValue(this, 4, newVal);
  1361. }
  1362. }
  1363. };
  1364. function triggerRef(ref2) {
  1365. triggerRefValue(ref2, 4, true ? ref2.value : void 0);
  1366. }
  1367. function unref(ref2) {
  1368. return isRef(ref2) ? ref2.value : ref2;
  1369. }
  1370. function toValue(source) {
  1371. return isFunction(source) ? source() : unref(source);
  1372. }
  1373. var shallowUnwrapHandlers = {
  1374. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  1375. set: (target, key, value, receiver) => {
  1376. const oldValue = target[key];
  1377. if (isRef(oldValue) && !isRef(value)) {
  1378. oldValue.value = value;
  1379. return true;
  1380. } else {
  1381. return Reflect.set(target, key, value, receiver);
  1382. }
  1383. }
  1384. };
  1385. function proxyRefs(objectWithRefs) {
  1386. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1387. }
  1388. var CustomRefImpl = class {
  1389. constructor(factory) {
  1390. this.dep = void 0;
  1391. this.__v_isRef = true;
  1392. const { get: get2, set: set2 } = factory(
  1393. () => trackRefValue(this),
  1394. () => triggerRefValue(this)
  1395. );
  1396. this._get = get2;
  1397. this._set = set2;
  1398. }
  1399. get value() {
  1400. return this._get();
  1401. }
  1402. set value(newVal) {
  1403. this._set(newVal);
  1404. }
  1405. };
  1406. function customRef(factory) {
  1407. return new CustomRefImpl(factory);
  1408. }
  1409. function toRefs(object) {
  1410. if (!isProxy(object)) {
  1411. warn(`toRefs() expects a reactive object but received a plain one.`);
  1412. }
  1413. const ret = isArray(object) ? new Array(object.length) : {};
  1414. for (const key in object) {
  1415. ret[key] = propertyToRef(object, key);
  1416. }
  1417. return ret;
  1418. }
  1419. var ObjectRefImpl = class {
  1420. constructor(_object, _key, _defaultValue) {
  1421. this._object = _object;
  1422. this._key = _key;
  1423. this._defaultValue = _defaultValue;
  1424. this.__v_isRef = true;
  1425. }
  1426. get value() {
  1427. const val = this._object[this._key];
  1428. return val === void 0 ? this._defaultValue : val;
  1429. }
  1430. set value(newVal) {
  1431. this._object[this._key] = newVal;
  1432. }
  1433. get dep() {
  1434. return getDepFromReactive(toRaw(this._object), this._key);
  1435. }
  1436. };
  1437. var GetterRefImpl = class {
  1438. constructor(_getter) {
  1439. this._getter = _getter;
  1440. this.__v_isRef = true;
  1441. this.__v_isReadonly = true;
  1442. }
  1443. get value() {
  1444. return this._getter();
  1445. }
  1446. };
  1447. function toRef(source, key, defaultValue) {
  1448. if (isRef(source)) {
  1449. return source;
  1450. } else if (isFunction(source)) {
  1451. return new GetterRefImpl(source);
  1452. } else if (isObject(source) && arguments.length > 1) {
  1453. return propertyToRef(source, key, defaultValue);
  1454. } else {
  1455. return ref(source);
  1456. }
  1457. }
  1458. function propertyToRef(source, key, defaultValue) {
  1459. const val = source[key];
  1460. return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  1461. }
  1462. var TrackOpTypes = {
  1463. "GET": "get",
  1464. "HAS": "has",
  1465. "ITERATE": "iterate"
  1466. };
  1467. var TriggerOpTypes = {
  1468. "SET": "set",
  1469. "ADD": "add",
  1470. "DELETE": "delete",
  1471. "CLEAR": "clear"
  1472. };
  1473. // node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
  1474. var stack = [];
  1475. function pushWarningContext(vnode) {
  1476. stack.push(vnode);
  1477. }
  1478. function popWarningContext() {
  1479. stack.pop();
  1480. }
  1481. function warn$1(msg, ...args) {
  1482. pauseTracking();
  1483. const instance = stack.length ? stack[stack.length - 1].component : null;
  1484. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  1485. const trace = getComponentTrace();
  1486. if (appWarnHandler) {
  1487. callWithErrorHandling(
  1488. appWarnHandler,
  1489. instance,
  1490. 11,
  1491. [
  1492. msg + args.map((a) => {
  1493. var _a, _b;
  1494. return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
  1495. }).join(""),
  1496. instance && instance.proxy,
  1497. trace.map(
  1498. ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
  1499. ).join("\n"),
  1500. trace
  1501. ]
  1502. );
  1503. } else {
  1504. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  1505. if (trace.length && // avoid spamming console during tests
  1506. true) {
  1507. warnArgs.push(`
  1508. `, ...formatTrace(trace));
  1509. }
  1510. console.warn(...warnArgs);
  1511. }
  1512. resetTracking();
  1513. }
  1514. function getComponentTrace() {
  1515. let currentVNode = stack[stack.length - 1];
  1516. if (!currentVNode) {
  1517. return [];
  1518. }
  1519. const normalizedStack = [];
  1520. while (currentVNode) {
  1521. const last = normalizedStack[0];
  1522. if (last && last.vnode === currentVNode) {
  1523. last.recurseCount++;
  1524. } else {
  1525. normalizedStack.push({
  1526. vnode: currentVNode,
  1527. recurseCount: 0
  1528. });
  1529. }
  1530. const parentInstance = currentVNode.component && currentVNode.component.parent;
  1531. currentVNode = parentInstance && parentInstance.vnode;
  1532. }
  1533. return normalizedStack;
  1534. }
  1535. function formatTrace(trace) {
  1536. const logs = [];
  1537. trace.forEach((entry, i) => {
  1538. logs.push(...i === 0 ? [] : [`
  1539. `], ...formatTraceEntry(entry));
  1540. });
  1541. return logs;
  1542. }
  1543. function formatTraceEntry({ vnode, recurseCount }) {
  1544. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  1545. const isRoot = vnode.component ? vnode.component.parent == null : false;
  1546. const open = ` at <${formatComponentName(
  1547. vnode.component,
  1548. vnode.type,
  1549. isRoot
  1550. )}`;
  1551. const close = `>` + postfix;
  1552. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  1553. }
  1554. function formatProps(props) {
  1555. const res = [];
  1556. const keys = Object.keys(props);
  1557. keys.slice(0, 3).forEach((key) => {
  1558. res.push(...formatProp(key, props[key]));
  1559. });
  1560. if (keys.length > 3) {
  1561. res.push(` ...`);
  1562. }
  1563. return res;
  1564. }
  1565. function formatProp(key, value, raw) {
  1566. if (isString(value)) {
  1567. value = JSON.stringify(value);
  1568. return raw ? value : [`${key}=${value}`];
  1569. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  1570. return raw ? value : [`${key}=${value}`];
  1571. } else if (isRef(value)) {
  1572. value = formatProp(key, toRaw(value.value), true);
  1573. return raw ? value : [`${key}=Ref<`, value, `>`];
  1574. } else if (isFunction(value)) {
  1575. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  1576. } else {
  1577. value = toRaw(value);
  1578. return raw ? value : [`${key}=`, value];
  1579. }
  1580. }
  1581. function assertNumber(val, type) {
  1582. if (false)
  1583. return;
  1584. if (val === void 0) {
  1585. return;
  1586. } else if (typeof val !== "number") {
  1587. warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
  1588. } else if (isNaN(val)) {
  1589. warn$1(`${type} is NaN - the duration expression might be incorrect.`);
  1590. }
  1591. }
  1592. var ErrorCodes = {
  1593. "SETUP_FUNCTION": 0,
  1594. "0": "SETUP_FUNCTION",
  1595. "RENDER_FUNCTION": 1,
  1596. "1": "RENDER_FUNCTION",
  1597. "WATCH_GETTER": 2,
  1598. "2": "WATCH_GETTER",
  1599. "WATCH_CALLBACK": 3,
  1600. "3": "WATCH_CALLBACK",
  1601. "WATCH_CLEANUP": 4,
  1602. "4": "WATCH_CLEANUP",
  1603. "NATIVE_EVENT_HANDLER": 5,
  1604. "5": "NATIVE_EVENT_HANDLER",
  1605. "COMPONENT_EVENT_HANDLER": 6,
  1606. "6": "COMPONENT_EVENT_HANDLER",
  1607. "VNODE_HOOK": 7,
  1608. "7": "VNODE_HOOK",
  1609. "DIRECTIVE_HOOK": 8,
  1610. "8": "DIRECTIVE_HOOK",
  1611. "TRANSITION_HOOK": 9,
  1612. "9": "TRANSITION_HOOK",
  1613. "APP_ERROR_HANDLER": 10,
  1614. "10": "APP_ERROR_HANDLER",
  1615. "APP_WARN_HANDLER": 11,
  1616. "11": "APP_WARN_HANDLER",
  1617. "FUNCTION_REF": 12,
  1618. "12": "FUNCTION_REF",
  1619. "ASYNC_COMPONENT_LOADER": 13,
  1620. "13": "ASYNC_COMPONENT_LOADER",
  1621. "SCHEDULER": 14,
  1622. "14": "SCHEDULER"
  1623. };
  1624. var ErrorTypeStrings$1 = {
  1625. ["sp"]: "serverPrefetch hook",
  1626. ["bc"]: "beforeCreate hook",
  1627. ["c"]: "created hook",
  1628. ["bm"]: "beforeMount hook",
  1629. ["m"]: "mounted hook",
  1630. ["bu"]: "beforeUpdate hook",
  1631. ["u"]: "updated",
  1632. ["bum"]: "beforeUnmount hook",
  1633. ["um"]: "unmounted hook",
  1634. ["a"]: "activated hook",
  1635. ["da"]: "deactivated hook",
  1636. ["ec"]: "errorCaptured hook",
  1637. ["rtc"]: "renderTracked hook",
  1638. ["rtg"]: "renderTriggered hook",
  1639. [0]: "setup function",
  1640. [1]: "render function",
  1641. [2]: "watcher getter",
  1642. [3]: "watcher callback",
  1643. [4]: "watcher cleanup function",
  1644. [5]: "native event handler",
  1645. [6]: "component event handler",
  1646. [7]: "vnode hook",
  1647. [8]: "directive hook",
  1648. [9]: "transition hook",
  1649. [10]: "app errorHandler",
  1650. [11]: "app warnHandler",
  1651. [12]: "ref function",
  1652. [13]: "async component loader",
  1653. [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
  1654. };
  1655. function callWithErrorHandling(fn, instance, type, args) {
  1656. try {
  1657. return args ? fn(...args) : fn();
  1658. } catch (err) {
  1659. handleError(err, instance, type);
  1660. }
  1661. }
  1662. function callWithAsyncErrorHandling(fn, instance, type, args) {
  1663. if (isFunction(fn)) {
  1664. const res = callWithErrorHandling(fn, instance, type, args);
  1665. if (res && isPromise(res)) {
  1666. res.catch((err) => {
  1667. handleError(err, instance, type);
  1668. });
  1669. }
  1670. return res;
  1671. }
  1672. if (isArray(fn)) {
  1673. const values = [];
  1674. for (let i = 0; i < fn.length; i++) {
  1675. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  1676. }
  1677. return values;
  1678. } else if (true) {
  1679. warn$1(
  1680. `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
  1681. );
  1682. }
  1683. }
  1684. function handleError(err, instance, type, throwInDev = true) {
  1685. const contextVNode = instance ? instance.vnode : null;
  1686. if (instance) {
  1687. let cur = instance.parent;
  1688. const exposedInstance = instance.proxy;
  1689. const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
  1690. while (cur) {
  1691. const errorCapturedHooks = cur.ec;
  1692. if (errorCapturedHooks) {
  1693. for (let i = 0; i < errorCapturedHooks.length; i++) {
  1694. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  1695. return;
  1696. }
  1697. }
  1698. }
  1699. cur = cur.parent;
  1700. }
  1701. const appErrorHandler = instance.appContext.config.errorHandler;
  1702. if (appErrorHandler) {
  1703. pauseTracking();
  1704. callWithErrorHandling(
  1705. appErrorHandler,
  1706. null,
  1707. 10,
  1708. [err, exposedInstance, errorInfo]
  1709. );
  1710. resetTracking();
  1711. return;
  1712. }
  1713. }
  1714. logError(err, type, contextVNode, throwInDev);
  1715. }
  1716. function logError(err, type, contextVNode, throwInDev = true) {
  1717. if (true) {
  1718. const info = ErrorTypeStrings$1[type];
  1719. if (contextVNode) {
  1720. pushWarningContext(contextVNode);
  1721. }
  1722. warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  1723. if (contextVNode) {
  1724. popWarningContext();
  1725. }
  1726. if (throwInDev) {
  1727. throw err;
  1728. } else {
  1729. console.error(err);
  1730. }
  1731. } else {
  1732. console.error(err);
  1733. }
  1734. }
  1735. var isFlushing = false;
  1736. var isFlushPending = false;
  1737. var queue = [];
  1738. var flushIndex = 0;
  1739. var pendingPostFlushCbs = [];
  1740. var activePostFlushCbs = null;
  1741. var postFlushIndex = 0;
  1742. var resolvedPromise = Promise.resolve();
  1743. var currentFlushPromise = null;
  1744. var RECURSION_LIMIT = 100;
  1745. function nextTick(fn) {
  1746. const p2 = currentFlushPromise || resolvedPromise;
  1747. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  1748. }
  1749. function findInsertionIndex(id) {
  1750. let start = flushIndex + 1;
  1751. let end = queue.length;
  1752. while (start < end) {
  1753. const middle = start + end >>> 1;
  1754. const middleJob = queue[middle];
  1755. const middleJobId = getId(middleJob);
  1756. if (middleJobId < id || middleJobId === id && middleJob.pre) {
  1757. start = middle + 1;
  1758. } else {
  1759. end = middle;
  1760. }
  1761. }
  1762. return start;
  1763. }
  1764. function queueJob(job) {
  1765. if (!queue.length || !queue.includes(
  1766. job,
  1767. isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
  1768. )) {
  1769. if (job.id == null) {
  1770. queue.push(job);
  1771. } else {
  1772. queue.splice(findInsertionIndex(job.id), 0, job);
  1773. }
  1774. queueFlush();
  1775. }
  1776. }
  1777. function queueFlush() {
  1778. if (!isFlushing && !isFlushPending) {
  1779. isFlushPending = true;
  1780. currentFlushPromise = resolvedPromise.then(flushJobs);
  1781. }
  1782. }
  1783. function invalidateJob(job) {
  1784. const i = queue.indexOf(job);
  1785. if (i > flushIndex) {
  1786. queue.splice(i, 1);
  1787. }
  1788. }
  1789. function queuePostFlushCb(cb) {
  1790. if (!isArray(cb)) {
  1791. if (!activePostFlushCbs || !activePostFlushCbs.includes(
  1792. cb,
  1793. cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
  1794. )) {
  1795. pendingPostFlushCbs.push(cb);
  1796. }
  1797. } else {
  1798. pendingPostFlushCbs.push(...cb);
  1799. }
  1800. queueFlush();
  1801. }
  1802. function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
  1803. if (true) {
  1804. seen = seen || /* @__PURE__ */ new Map();
  1805. }
  1806. for (; i < queue.length; i++) {
  1807. const cb = queue[i];
  1808. if (cb && cb.pre) {
  1809. if (instance && cb.id !== instance.uid) {
  1810. continue;
  1811. }
  1812. if (checkRecursiveUpdates(seen, cb)) {
  1813. continue;
  1814. }
  1815. queue.splice(i, 1);
  1816. i--;
  1817. cb();
  1818. }
  1819. }
  1820. }
  1821. function flushPostFlushCbs(seen) {
  1822. if (pendingPostFlushCbs.length) {
  1823. const deduped = [...new Set(pendingPostFlushCbs)].sort(
  1824. (a, b) => getId(a) - getId(b)
  1825. );
  1826. pendingPostFlushCbs.length = 0;
  1827. if (activePostFlushCbs) {
  1828. activePostFlushCbs.push(...deduped);
  1829. return;
  1830. }
  1831. activePostFlushCbs = deduped;
  1832. if (true) {
  1833. seen = seen || /* @__PURE__ */ new Map();
  1834. }
  1835. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  1836. if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  1837. continue;
  1838. }
  1839. activePostFlushCbs[postFlushIndex]();
  1840. }
  1841. activePostFlushCbs = null;
  1842. postFlushIndex = 0;
  1843. }
  1844. }
  1845. var getId = (job) => job.id == null ? Infinity : job.id;
  1846. var comparator = (a, b) => {
  1847. const diff = getId(a) - getId(b);
  1848. if (diff === 0) {
  1849. if (a.pre && !b.pre)
  1850. return -1;
  1851. if (b.pre && !a.pre)
  1852. return 1;
  1853. }
  1854. return diff;
  1855. };
  1856. function flushJobs(seen) {
  1857. isFlushPending = false;
  1858. isFlushing = true;
  1859. if (true) {
  1860. seen = seen || /* @__PURE__ */ new Map();
  1861. }
  1862. queue.sort(comparator);
  1863. const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
  1864. try {
  1865. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  1866. const job = queue[flushIndex];
  1867. if (job && job.active !== false) {
  1868. if (check(job)) {
  1869. continue;
  1870. }
  1871. callWithErrorHandling(job, null, 14);
  1872. }
  1873. }
  1874. } finally {
  1875. flushIndex = 0;
  1876. queue.length = 0;
  1877. flushPostFlushCbs(seen);
  1878. isFlushing = false;
  1879. currentFlushPromise = null;
  1880. if (queue.length || pendingPostFlushCbs.length) {
  1881. flushJobs(seen);
  1882. }
  1883. }
  1884. }
  1885. function checkRecursiveUpdates(seen, fn) {
  1886. if (!seen.has(fn)) {
  1887. seen.set(fn, 1);
  1888. } else {
  1889. const count = seen.get(fn);
  1890. if (count > RECURSION_LIMIT) {
  1891. const instance = fn.ownerInstance;
  1892. const componentName = instance && getComponentName(instance.type);
  1893. handleError(
  1894. `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
  1895. null,
  1896. 10
  1897. );
  1898. return true;
  1899. } else {
  1900. seen.set(fn, count + 1);
  1901. }
  1902. }
  1903. }
  1904. var isHmrUpdating = false;
  1905. var hmrDirtyComponents = /* @__PURE__ */ new Set();
  1906. if (true) {
  1907. getGlobalThis().__VUE_HMR_RUNTIME__ = {
  1908. createRecord: tryWrap(createRecord),
  1909. rerender: tryWrap(rerender),
  1910. reload: tryWrap(reload)
  1911. };
  1912. }
  1913. var map = /* @__PURE__ */ new Map();
  1914. function registerHMR(instance) {
  1915. const id = instance.type.__hmrId;
  1916. let record = map.get(id);
  1917. if (!record) {
  1918. createRecord(id, instance.type);
  1919. record = map.get(id);
  1920. }
  1921. record.instances.add(instance);
  1922. }
  1923. function unregisterHMR(instance) {
  1924. map.get(instance.type.__hmrId).instances.delete(instance);
  1925. }
  1926. function createRecord(id, initialDef) {
  1927. if (map.has(id)) {
  1928. return false;
  1929. }
  1930. map.set(id, {
  1931. initialDef: normalizeClassComponent(initialDef),
  1932. instances: /* @__PURE__ */ new Set()
  1933. });
  1934. return true;
  1935. }
  1936. function normalizeClassComponent(component) {
  1937. return isClassComponent(component) ? component.__vccOpts : component;
  1938. }
  1939. function rerender(id, newRender) {
  1940. const record = map.get(id);
  1941. if (!record) {
  1942. return;
  1943. }
  1944. record.initialDef.render = newRender;
  1945. [...record.instances].forEach((instance) => {
  1946. if (newRender) {
  1947. instance.render = newRender;
  1948. normalizeClassComponent(instance.type).render = newRender;
  1949. }
  1950. instance.renderCache = [];
  1951. isHmrUpdating = true;
  1952. instance.effect.dirty = true;
  1953. instance.update();
  1954. isHmrUpdating = false;
  1955. });
  1956. }
  1957. function reload(id, newComp) {
  1958. const record = map.get(id);
  1959. if (!record)
  1960. return;
  1961. newComp = normalizeClassComponent(newComp);
  1962. updateComponentDef(record.initialDef, newComp);
  1963. const instances = [...record.instances];
  1964. for (const instance of instances) {
  1965. const oldComp = normalizeClassComponent(instance.type);
  1966. if (!hmrDirtyComponents.has(oldComp)) {
  1967. if (oldComp !== record.initialDef) {
  1968. updateComponentDef(oldComp, newComp);
  1969. }
  1970. hmrDirtyComponents.add(oldComp);
  1971. }
  1972. instance.appContext.propsCache.delete(instance.type);
  1973. instance.appContext.emitsCache.delete(instance.type);
  1974. instance.appContext.optionsCache.delete(instance.type);
  1975. if (instance.ceReload) {
  1976. hmrDirtyComponents.add(oldComp);
  1977. instance.ceReload(newComp.styles);
  1978. hmrDirtyComponents.delete(oldComp);
  1979. } else if (instance.parent) {
  1980. instance.parent.effect.dirty = true;
  1981. queueJob(instance.parent.update);
  1982. } else if (instance.appContext.reload) {
  1983. instance.appContext.reload();
  1984. } else if (typeof window !== "undefined") {
  1985. window.location.reload();
  1986. } else {
  1987. console.warn(
  1988. "[HMR] Root or manually mounted instance modified. Full reload required."
  1989. );
  1990. }
  1991. }
  1992. queuePostFlushCb(() => {
  1993. for (const instance of instances) {
  1994. hmrDirtyComponents.delete(
  1995. normalizeClassComponent(instance.type)
  1996. );
  1997. }
  1998. });
  1999. }
  2000. function updateComponentDef(oldComp, newComp) {
  2001. extend(oldComp, newComp);
  2002. for (const key in oldComp) {
  2003. if (key !== "__file" && !(key in newComp)) {
  2004. delete oldComp[key];
  2005. }
  2006. }
  2007. }
  2008. function tryWrap(fn) {
  2009. return (id, arg) => {
  2010. try {
  2011. return fn(id, arg);
  2012. } catch (e) {
  2013. console.error(e);
  2014. console.warn(
  2015. `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
  2016. );
  2017. }
  2018. };
  2019. }
  2020. var devtools$1;
  2021. var buffer = [];
  2022. var devtoolsNotInstalled = false;
  2023. function emit$1(event, ...args) {
  2024. if (devtools$1) {
  2025. devtools$1.emit(event, ...args);
  2026. } else if (!devtoolsNotInstalled) {
  2027. buffer.push({ event, args });
  2028. }
  2029. }
  2030. function setDevtoolsHook$1(hook, target) {
  2031. var _a, _b;
  2032. devtools$1 = hook;
  2033. if (devtools$1) {
  2034. devtools$1.enabled = true;
  2035. buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
  2036. buffer = [];
  2037. } else if (
  2038. // handle late devtools injection - only do this if we are in an actual
  2039. // browser environment to avoid the timer handle stalling test runner exit
  2040. // (#4815)
  2041. typeof window !== "undefined" && // some envs mock window but not fully
  2042. window.HTMLElement && // also exclude jsdom
  2043. !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
  2044. ) {
  2045. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  2046. replay.push((newHook) => {
  2047. setDevtoolsHook$1(newHook, target);
  2048. });
  2049. setTimeout(() => {
  2050. if (!devtools$1) {
  2051. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  2052. devtoolsNotInstalled = true;
  2053. buffer = [];
  2054. }
  2055. }, 3e3);
  2056. } else {
  2057. devtoolsNotInstalled = true;
  2058. buffer = [];
  2059. }
  2060. }
  2061. function devtoolsInitApp(app, version2) {
  2062. emit$1("app:init", app, version2, {
  2063. Fragment,
  2064. Text,
  2065. Comment,
  2066. Static
  2067. });
  2068. }
  2069. function devtoolsUnmountApp(app) {
  2070. emit$1("app:unmount", app);
  2071. }
  2072. var devtoolsComponentAdded = createDevtoolsComponentHook(
  2073. "component:added"
  2074. /* COMPONENT_ADDED */
  2075. );
  2076. var devtoolsComponentUpdated = createDevtoolsComponentHook(
  2077. "component:updated"
  2078. /* COMPONENT_UPDATED */
  2079. );
  2080. var _devtoolsComponentRemoved = createDevtoolsComponentHook(
  2081. "component:removed"
  2082. /* COMPONENT_REMOVED */
  2083. );
  2084. var devtoolsComponentRemoved = (component) => {
  2085. if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  2086. !devtools$1.cleanupBuffer(component)) {
  2087. _devtoolsComponentRemoved(component);
  2088. }
  2089. };
  2090. function createDevtoolsComponentHook(hook) {
  2091. return (component) => {
  2092. emit$1(
  2093. hook,
  2094. component.appContext.app,
  2095. component.uid,
  2096. component.parent ? component.parent.uid : void 0,
  2097. component
  2098. );
  2099. };
  2100. }
  2101. var devtoolsPerfStart = createDevtoolsPerformanceHook(
  2102. "perf:start"
  2103. /* PERFORMANCE_START */
  2104. );
  2105. var devtoolsPerfEnd = createDevtoolsPerformanceHook(
  2106. "perf:end"
  2107. /* PERFORMANCE_END */
  2108. );
  2109. function createDevtoolsPerformanceHook(hook) {
  2110. return (component, type, time) => {
  2111. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  2112. };
  2113. }
  2114. function devtoolsComponentEmit(component, event, params) {
  2115. emit$1(
  2116. "component:emit",
  2117. component.appContext.app,
  2118. component,
  2119. event,
  2120. params
  2121. );
  2122. }
  2123. function emit(instance, event, ...rawArgs) {
  2124. if (instance.isUnmounted)
  2125. return;
  2126. const props = instance.vnode.props || EMPTY_OBJ;
  2127. if (true) {
  2128. const {
  2129. emitsOptions,
  2130. propsOptions: [propsOptions]
  2131. } = instance;
  2132. if (emitsOptions) {
  2133. if (!(event in emitsOptions) && true) {
  2134. if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
  2135. warn$1(
  2136. `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
  2137. );
  2138. }
  2139. } else {
  2140. const validator = emitsOptions[event];
  2141. if (isFunction(validator)) {
  2142. const isValid = validator(...rawArgs);
  2143. if (!isValid) {
  2144. warn$1(
  2145. `Invalid event arguments: event validation failed for event "${event}".`
  2146. );
  2147. }
  2148. }
  2149. }
  2150. }
  2151. }
  2152. let args = rawArgs;
  2153. const isModelListener2 = event.startsWith("update:");
  2154. const modelArg = isModelListener2 && event.slice(7);
  2155. if (modelArg && modelArg in props) {
  2156. const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
  2157. const { number, trim } = props[modifiersKey] || EMPTY_OBJ;
  2158. if (trim) {
  2159. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  2160. }
  2161. if (number) {
  2162. args = rawArgs.map(looseToNumber);
  2163. }
  2164. }
  2165. if (true) {
  2166. devtoolsComponentEmit(instance, event, args);
  2167. }
  2168. if (true) {
  2169. const lowerCaseEvent = event.toLowerCase();
  2170. if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
  2171. warn$1(
  2172. `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
  2173. instance,
  2174. instance.type
  2175. )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(
  2176. event
  2177. )}" instead of "${event}".`
  2178. );
  2179. }
  2180. }
  2181. let handlerName;
  2182. let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  2183. props[handlerName = toHandlerKey(camelize(event))];
  2184. if (!handler && isModelListener2) {
  2185. handler = props[handlerName = toHandlerKey(hyphenate(event))];
  2186. }
  2187. if (handler) {
  2188. callWithAsyncErrorHandling(
  2189. handler,
  2190. instance,
  2191. 6,
  2192. args
  2193. );
  2194. }
  2195. const onceHandler = props[handlerName + `Once`];
  2196. if (onceHandler) {
  2197. if (!instance.emitted) {
  2198. instance.emitted = {};
  2199. } else if (instance.emitted[handlerName]) {
  2200. return;
  2201. }
  2202. instance.emitted[handlerName] = true;
  2203. callWithAsyncErrorHandling(
  2204. onceHandler,
  2205. instance,
  2206. 6,
  2207. args
  2208. );
  2209. }
  2210. }
  2211. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  2212. const cache = appContext.emitsCache;
  2213. const cached = cache.get(comp);
  2214. if (cached !== void 0) {
  2215. return cached;
  2216. }
  2217. const raw = comp.emits;
  2218. let normalized = {};
  2219. let hasExtends = false;
  2220. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  2221. const extendEmits = (raw2) => {
  2222. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  2223. if (normalizedFromExtend) {
  2224. hasExtends = true;
  2225. extend(normalized, normalizedFromExtend);
  2226. }
  2227. };
  2228. if (!asMixin && appContext.mixins.length) {
  2229. appContext.mixins.forEach(extendEmits);
  2230. }
  2231. if (comp.extends) {
  2232. extendEmits(comp.extends);
  2233. }
  2234. if (comp.mixins) {
  2235. comp.mixins.forEach(extendEmits);
  2236. }
  2237. }
  2238. if (!raw && !hasExtends) {
  2239. if (isObject(comp)) {
  2240. cache.set(comp, null);
  2241. }
  2242. return null;
  2243. }
  2244. if (isArray(raw)) {
  2245. raw.forEach((key) => normalized[key] = null);
  2246. } else {
  2247. extend(normalized, raw);
  2248. }
  2249. if (isObject(comp)) {
  2250. cache.set(comp, normalized);
  2251. }
  2252. return normalized;
  2253. }
  2254. function isEmitListener(options, key) {
  2255. if (!options || !isOn(key)) {
  2256. return false;
  2257. }
  2258. key = key.slice(2).replace(/Once$/, "");
  2259. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  2260. }
  2261. var currentRenderingInstance = null;
  2262. var currentScopeId = null;
  2263. function setCurrentRenderingInstance(instance) {
  2264. const prev = currentRenderingInstance;
  2265. currentRenderingInstance = instance;
  2266. currentScopeId = instance && instance.type.__scopeId || null;
  2267. return prev;
  2268. }
  2269. function pushScopeId(id) {
  2270. currentScopeId = id;
  2271. }
  2272. function popScopeId() {
  2273. currentScopeId = null;
  2274. }
  2275. var withScopeId = (_id) => withCtx;
  2276. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  2277. if (!ctx)
  2278. return fn;
  2279. if (fn._n) {
  2280. return fn;
  2281. }
  2282. const renderFnWithContext = (...args) => {
  2283. if (renderFnWithContext._d) {
  2284. setBlockTracking(-1);
  2285. }
  2286. const prevInstance = setCurrentRenderingInstance(ctx);
  2287. let res;
  2288. try {
  2289. res = fn(...args);
  2290. } finally {
  2291. setCurrentRenderingInstance(prevInstance);
  2292. if (renderFnWithContext._d) {
  2293. setBlockTracking(1);
  2294. }
  2295. }
  2296. if (true) {
  2297. devtoolsComponentUpdated(ctx);
  2298. }
  2299. return res;
  2300. };
  2301. renderFnWithContext._n = true;
  2302. renderFnWithContext._c = true;
  2303. renderFnWithContext._d = true;
  2304. return renderFnWithContext;
  2305. }
  2306. var accessedAttrs = false;
  2307. function markAttrsAccessed() {
  2308. accessedAttrs = true;
  2309. }
  2310. function renderComponentRoot(instance) {
  2311. const {
  2312. type: Component,
  2313. vnode,
  2314. proxy,
  2315. withProxy,
  2316. propsOptions: [propsOptions],
  2317. slots,
  2318. attrs,
  2319. emit: emit2,
  2320. render: render2,
  2321. renderCache,
  2322. props,
  2323. data,
  2324. setupState,
  2325. ctx,
  2326. inheritAttrs
  2327. } = instance;
  2328. const prev = setCurrentRenderingInstance(instance);
  2329. let result;
  2330. let fallthroughAttrs;
  2331. if (true) {
  2332. accessedAttrs = false;
  2333. }
  2334. try {
  2335. if (vnode.shapeFlag & 4) {
  2336. const proxyToUse = withProxy || proxy;
  2337. const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
  2338. get(target, key, receiver) {
  2339. warn$1(
  2340. `Property '${String(
  2341. key
  2342. )}' was accessed via 'this'. Avoid using 'this' in templates.`
  2343. );
  2344. return Reflect.get(target, key, receiver);
  2345. }
  2346. }) : proxyToUse;
  2347. result = normalizeVNode(
  2348. render2.call(
  2349. thisProxy,
  2350. proxyToUse,
  2351. renderCache,
  2352. true ? shallowReadonly(props) : props,
  2353. setupState,
  2354. data,
  2355. ctx
  2356. )
  2357. );
  2358. fallthroughAttrs = attrs;
  2359. } else {
  2360. const render22 = Component;
  2361. if (attrs === props) {
  2362. markAttrsAccessed();
  2363. }
  2364. result = normalizeVNode(
  2365. render22.length > 1 ? render22(
  2366. true ? shallowReadonly(props) : props,
  2367. true ? {
  2368. get attrs() {
  2369. markAttrsAccessed();
  2370. return attrs;
  2371. },
  2372. slots,
  2373. emit: emit2
  2374. } : { attrs, slots, emit: emit2 }
  2375. ) : render22(
  2376. true ? shallowReadonly(props) : props,
  2377. null
  2378. )
  2379. );
  2380. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  2381. }
  2382. } catch (err) {
  2383. blockStack.length = 0;
  2384. handleError(err, instance, 1);
  2385. result = createVNode(Comment);
  2386. }
  2387. let root = result;
  2388. let setRoot = void 0;
  2389. if (result.patchFlag > 0 && result.patchFlag & 2048) {
  2390. [root, setRoot] = getChildRoot(result);
  2391. }
  2392. if (fallthroughAttrs && inheritAttrs !== false) {
  2393. const keys = Object.keys(fallthroughAttrs);
  2394. const { shapeFlag } = root;
  2395. if (keys.length) {
  2396. if (shapeFlag & (1 | 6)) {
  2397. if (propsOptions && keys.some(isModelListener)) {
  2398. fallthroughAttrs = filterModelListeners(
  2399. fallthroughAttrs,
  2400. propsOptions
  2401. );
  2402. }
  2403. root = cloneVNode(root, fallthroughAttrs);
  2404. } else if (!accessedAttrs && root.type !== Comment) {
  2405. const allAttrs = Object.keys(attrs);
  2406. const eventAttrs = [];
  2407. const extraAttrs = [];
  2408. for (let i = 0, l = allAttrs.length; i < l; i++) {
  2409. const key = allAttrs[i];
  2410. if (isOn(key)) {
  2411. if (!isModelListener(key)) {
  2412. eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  2413. }
  2414. } else {
  2415. extraAttrs.push(key);
  2416. }
  2417. }
  2418. if (extraAttrs.length) {
  2419. warn$1(
  2420. `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
  2421. );
  2422. }
  2423. if (eventAttrs.length) {
  2424. warn$1(
  2425. `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
  2426. );
  2427. }
  2428. }
  2429. }
  2430. }
  2431. if (vnode.dirs) {
  2432. if (!isElementRoot(root)) {
  2433. warn$1(
  2434. `Runtime directive used on component with non-element root node. The directives will not function as intended.`
  2435. );
  2436. }
  2437. root = cloneVNode(root);
  2438. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  2439. }
  2440. if (vnode.transition) {
  2441. if (!isElementRoot(root)) {
  2442. warn$1(
  2443. `Component inside <Transition> renders non-element root node that cannot be animated.`
  2444. );
  2445. }
  2446. root.transition = vnode.transition;
  2447. }
  2448. if (setRoot) {
  2449. setRoot(root);
  2450. } else {
  2451. result = root;
  2452. }
  2453. setCurrentRenderingInstance(prev);
  2454. return result;
  2455. }
  2456. var getChildRoot = (vnode) => {
  2457. const rawChildren = vnode.children;
  2458. const dynamicChildren = vnode.dynamicChildren;
  2459. const childRoot = filterSingleRoot(rawChildren, false);
  2460. if (!childRoot) {
  2461. return [vnode, void 0];
  2462. } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
  2463. return getChildRoot(childRoot);
  2464. }
  2465. const index = rawChildren.indexOf(childRoot);
  2466. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  2467. const setRoot = (updatedRoot) => {
  2468. rawChildren[index] = updatedRoot;
  2469. if (dynamicChildren) {
  2470. if (dynamicIndex > -1) {
  2471. dynamicChildren[dynamicIndex] = updatedRoot;
  2472. } else if (updatedRoot.patchFlag > 0) {
  2473. vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  2474. }
  2475. }
  2476. };
  2477. return [normalizeVNode(childRoot), setRoot];
  2478. };
  2479. function filterSingleRoot(children, recurse = true) {
  2480. let singleRoot;
  2481. for (let i = 0; i < children.length; i++) {
  2482. const child = children[i];
  2483. if (isVNode(child)) {
  2484. if (child.type !== Comment || child.children === "v-if") {
  2485. if (singleRoot) {
  2486. return;
  2487. } else {
  2488. singleRoot = child;
  2489. if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
  2490. return filterSingleRoot(singleRoot.children);
  2491. }
  2492. }
  2493. }
  2494. } else {
  2495. return;
  2496. }
  2497. }
  2498. return singleRoot;
  2499. }
  2500. var getFunctionalFallthrough = (attrs) => {
  2501. let res;
  2502. for (const key in attrs) {
  2503. if (key === "class" || key === "style" || isOn(key)) {
  2504. (res || (res = {}))[key] = attrs[key];
  2505. }
  2506. }
  2507. return res;
  2508. };
  2509. var filterModelListeners = (attrs, props) => {
  2510. const res = {};
  2511. for (const key in attrs) {
  2512. if (!isModelListener(key) || !(key.slice(9) in props)) {
  2513. res[key] = attrs[key];
  2514. }
  2515. }
  2516. return res;
  2517. };
  2518. var isElementRoot = (vnode) => {
  2519. return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
  2520. };
  2521. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  2522. const { props: prevProps, children: prevChildren, component } = prevVNode;
  2523. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  2524. const emits = component.emitsOptions;
  2525. if ((prevChildren || nextChildren) && isHmrUpdating) {
  2526. return true;
  2527. }
  2528. if (nextVNode.dirs || nextVNode.transition) {
  2529. return true;
  2530. }
  2531. if (optimized && patchFlag >= 0) {
  2532. if (patchFlag & 1024) {
  2533. return true;
  2534. }
  2535. if (patchFlag & 16) {
  2536. if (!prevProps) {
  2537. return !!nextProps;
  2538. }
  2539. return hasPropsChanged(prevProps, nextProps, emits);
  2540. } else if (patchFlag & 8) {
  2541. const dynamicProps = nextVNode.dynamicProps;
  2542. for (let i = 0; i < dynamicProps.length; i++) {
  2543. const key = dynamicProps[i];
  2544. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
  2545. return true;
  2546. }
  2547. }
  2548. }
  2549. } else {
  2550. if (prevChildren || nextChildren) {
  2551. if (!nextChildren || !nextChildren.$stable) {
  2552. return true;
  2553. }
  2554. }
  2555. if (prevProps === nextProps) {
  2556. return false;
  2557. }
  2558. if (!prevProps) {
  2559. return !!nextProps;
  2560. }
  2561. if (!nextProps) {
  2562. return true;
  2563. }
  2564. return hasPropsChanged(prevProps, nextProps, emits);
  2565. }
  2566. return false;
  2567. }
  2568. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  2569. const nextKeys = Object.keys(nextProps);
  2570. if (nextKeys.length !== Object.keys(prevProps).length) {
  2571. return true;
  2572. }
  2573. for (let i = 0; i < nextKeys.length; i++) {
  2574. const key = nextKeys[i];
  2575. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
  2576. return true;
  2577. }
  2578. }
  2579. return false;
  2580. }
  2581. function updateHOCHostEl({ vnode, parent }, el) {
  2582. while (parent) {
  2583. const root = parent.subTree;
  2584. if (root.suspense && root.suspense.activeBranch === vnode) {
  2585. root.el = vnode.el;
  2586. }
  2587. if (root === vnode) {
  2588. (vnode = parent.vnode).el = el;
  2589. parent = parent.parent;
  2590. } else {
  2591. break;
  2592. }
  2593. }
  2594. }
  2595. var COMPONENTS = "components";
  2596. var DIRECTIVES = "directives";
  2597. function resolveComponent(name, maybeSelfReference) {
  2598. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  2599. }
  2600. var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
  2601. function resolveDynamicComponent(component) {
  2602. if (isString(component)) {
  2603. return resolveAsset(COMPONENTS, component, false) || component;
  2604. } else {
  2605. return component || NULL_DYNAMIC_COMPONENT;
  2606. }
  2607. }
  2608. function resolveDirective(name) {
  2609. return resolveAsset(DIRECTIVES, name);
  2610. }
  2611. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  2612. const instance = currentRenderingInstance || currentInstance;
  2613. if (instance) {
  2614. const Component = instance.type;
  2615. if (type === COMPONENTS) {
  2616. const selfName = getComponentName(
  2617. Component,
  2618. false
  2619. );
  2620. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  2621. return Component;
  2622. }
  2623. }
  2624. const res = (
  2625. // local registration
  2626. // check instance[type] first which is resolved for options API
  2627. resolve(instance[type] || Component[type], name) || // global registration
  2628. resolve(instance.appContext[type], name)
  2629. );
  2630. if (!res && maybeSelfReference) {
  2631. return Component;
  2632. }
  2633. if (warnMissing && !res) {
  2634. const extra = type === COMPONENTS ? `
  2635. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  2636. warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  2637. }
  2638. return res;
  2639. } else if (true) {
  2640. warn$1(
  2641. `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
  2642. );
  2643. }
  2644. }
  2645. function resolve(registry, name) {
  2646. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  2647. }
  2648. var isSuspense = (type) => type.__isSuspense;
  2649. var suspenseId = 0;
  2650. var SuspenseImpl = {
  2651. name: "Suspense",
  2652. // In order to make Suspense tree-shakable, we need to avoid importing it
  2653. // directly in the renderer. The renderer checks for the __isSuspense flag
  2654. // on a vnode's type and calls the `process` method, passing in renderer
  2655. // internals.
  2656. __isSuspense: true,
  2657. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  2658. if (n1 == null) {
  2659. mountSuspense(
  2660. n2,
  2661. container,
  2662. anchor,
  2663. parentComponent,
  2664. parentSuspense,
  2665. namespace,
  2666. slotScopeIds,
  2667. optimized,
  2668. rendererInternals
  2669. );
  2670. } else {
  2671. if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
  2672. n2.suspense = n1.suspense;
  2673. n2.suspense.vnode = n2;
  2674. n2.el = n1.el;
  2675. return;
  2676. }
  2677. patchSuspense(
  2678. n1,
  2679. n2,
  2680. container,
  2681. anchor,
  2682. parentComponent,
  2683. namespace,
  2684. slotScopeIds,
  2685. optimized,
  2686. rendererInternals
  2687. );
  2688. }
  2689. },
  2690. hydrate: hydrateSuspense,
  2691. create: createSuspenseBoundary,
  2692. normalize: normalizeSuspenseChildren
  2693. };
  2694. var Suspense = SuspenseImpl;
  2695. function triggerEvent(vnode, name) {
  2696. const eventListener = vnode.props && vnode.props[name];
  2697. if (isFunction(eventListener)) {
  2698. eventListener();
  2699. }
  2700. }
  2701. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  2702. const {
  2703. p: patch,
  2704. o: { createElement }
  2705. } = rendererInternals;
  2706. const hiddenContainer = createElement("div");
  2707. const suspense = vnode.suspense = createSuspenseBoundary(
  2708. vnode,
  2709. parentSuspense,
  2710. parentComponent,
  2711. container,
  2712. hiddenContainer,
  2713. anchor,
  2714. namespace,
  2715. slotScopeIds,
  2716. optimized,
  2717. rendererInternals
  2718. );
  2719. patch(
  2720. null,
  2721. suspense.pendingBranch = vnode.ssContent,
  2722. hiddenContainer,
  2723. null,
  2724. parentComponent,
  2725. suspense,
  2726. namespace,
  2727. slotScopeIds
  2728. );
  2729. if (suspense.deps > 0) {
  2730. triggerEvent(vnode, "onPending");
  2731. triggerEvent(vnode, "onFallback");
  2732. patch(
  2733. null,
  2734. vnode.ssFallback,
  2735. container,
  2736. anchor,
  2737. parentComponent,
  2738. null,
  2739. // fallback tree will not have suspense context
  2740. namespace,
  2741. slotScopeIds
  2742. );
  2743. setActiveBranch(suspense, vnode.ssFallback);
  2744. } else {
  2745. suspense.resolve(false, true);
  2746. }
  2747. }
  2748. function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  2749. const suspense = n2.suspense = n1.suspense;
  2750. suspense.vnode = n2;
  2751. n2.el = n1.el;
  2752. const newBranch = n2.ssContent;
  2753. const newFallback = n2.ssFallback;
  2754. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  2755. if (pendingBranch) {
  2756. suspense.pendingBranch = newBranch;
  2757. if (isSameVNodeType(newBranch, pendingBranch)) {
  2758. patch(
  2759. pendingBranch,
  2760. newBranch,
  2761. suspense.hiddenContainer,
  2762. null,
  2763. parentComponent,
  2764. suspense,
  2765. namespace,
  2766. slotScopeIds,
  2767. optimized
  2768. );
  2769. if (suspense.deps <= 0) {
  2770. suspense.resolve();
  2771. } else if (isInFallback) {
  2772. if (!isHydrating) {
  2773. patch(
  2774. activeBranch,
  2775. newFallback,
  2776. container,
  2777. anchor,
  2778. parentComponent,
  2779. null,
  2780. // fallback tree will not have suspense context
  2781. namespace,
  2782. slotScopeIds,
  2783. optimized
  2784. );
  2785. setActiveBranch(suspense, newFallback);
  2786. }
  2787. }
  2788. } else {
  2789. suspense.pendingId = suspenseId++;
  2790. if (isHydrating) {
  2791. suspense.isHydrating = false;
  2792. suspense.activeBranch = pendingBranch;
  2793. } else {
  2794. unmount(pendingBranch, parentComponent, suspense);
  2795. }
  2796. suspense.deps = 0;
  2797. suspense.effects.length = 0;
  2798. suspense.hiddenContainer = createElement("div");
  2799. if (isInFallback) {
  2800. patch(
  2801. null,
  2802. newBranch,
  2803. suspense.hiddenContainer,
  2804. null,
  2805. parentComponent,
  2806. suspense,
  2807. namespace,
  2808. slotScopeIds,
  2809. optimized
  2810. );
  2811. if (suspense.deps <= 0) {
  2812. suspense.resolve();
  2813. } else {
  2814. patch(
  2815. activeBranch,
  2816. newFallback,
  2817. container,
  2818. anchor,
  2819. parentComponent,
  2820. null,
  2821. // fallback tree will not have suspense context
  2822. namespace,
  2823. slotScopeIds,
  2824. optimized
  2825. );
  2826. setActiveBranch(suspense, newFallback);
  2827. }
  2828. } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  2829. patch(
  2830. activeBranch,
  2831. newBranch,
  2832. container,
  2833. anchor,
  2834. parentComponent,
  2835. suspense,
  2836. namespace,
  2837. slotScopeIds,
  2838. optimized
  2839. );
  2840. suspense.resolve(true);
  2841. } else {
  2842. patch(
  2843. null,
  2844. newBranch,
  2845. suspense.hiddenContainer,
  2846. null,
  2847. parentComponent,
  2848. suspense,
  2849. namespace,
  2850. slotScopeIds,
  2851. optimized
  2852. );
  2853. if (suspense.deps <= 0) {
  2854. suspense.resolve();
  2855. }
  2856. }
  2857. }
  2858. } else {
  2859. if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  2860. patch(
  2861. activeBranch,
  2862. newBranch,
  2863. container,
  2864. anchor,
  2865. parentComponent,
  2866. suspense,
  2867. namespace,
  2868. slotScopeIds,
  2869. optimized
  2870. );
  2871. setActiveBranch(suspense, newBranch);
  2872. } else {
  2873. triggerEvent(n2, "onPending");
  2874. suspense.pendingBranch = newBranch;
  2875. if (newBranch.shapeFlag & 512) {
  2876. suspense.pendingId = newBranch.component.suspenseId;
  2877. } else {
  2878. suspense.pendingId = suspenseId++;
  2879. }
  2880. patch(
  2881. null,
  2882. newBranch,
  2883. suspense.hiddenContainer,
  2884. null,
  2885. parentComponent,
  2886. suspense,
  2887. namespace,
  2888. slotScopeIds,
  2889. optimized
  2890. );
  2891. if (suspense.deps <= 0) {
  2892. suspense.resolve();
  2893. } else {
  2894. const { timeout, pendingId } = suspense;
  2895. if (timeout > 0) {
  2896. setTimeout(() => {
  2897. if (suspense.pendingId === pendingId) {
  2898. suspense.fallback(newFallback);
  2899. }
  2900. }, timeout);
  2901. } else if (timeout === 0) {
  2902. suspense.fallback(newFallback);
  2903. }
  2904. }
  2905. }
  2906. }
  2907. }
  2908. var hasWarned = false;
  2909. function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  2910. if (!hasWarned) {
  2911. hasWarned = true;
  2912. console[console.info ? "info" : "log"](
  2913. `<Suspense> is an experimental feature and its API will likely change.`
  2914. );
  2915. }
  2916. const {
  2917. p: patch,
  2918. m: move,
  2919. um: unmount,
  2920. n: next,
  2921. o: { parentNode, remove: remove2 }
  2922. } = rendererInternals;
  2923. let parentSuspenseId;
  2924. const isSuspensible = isVNodeSuspensible(vnode);
  2925. if (isSuspensible) {
  2926. if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
  2927. parentSuspenseId = parentSuspense.pendingId;
  2928. parentSuspense.deps++;
  2929. }
  2930. }
  2931. const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
  2932. if (true) {
  2933. assertNumber(timeout, `Suspense timeout`);
  2934. }
  2935. const initialAnchor = anchor;
  2936. const suspense = {
  2937. vnode,
  2938. parent: parentSuspense,
  2939. parentComponent,
  2940. namespace,
  2941. container,
  2942. hiddenContainer,
  2943. deps: 0,
  2944. pendingId: suspenseId++,
  2945. timeout: typeof timeout === "number" ? timeout : -1,
  2946. activeBranch: null,
  2947. pendingBranch: null,
  2948. isInFallback: !isHydrating,
  2949. isHydrating,
  2950. isUnmounted: false,
  2951. effects: [],
  2952. resolve(resume = false, sync = false) {
  2953. if (true) {
  2954. if (!resume && !suspense.pendingBranch) {
  2955. throw new Error(
  2956. `suspense.resolve() is called without a pending branch.`
  2957. );
  2958. }
  2959. if (suspense.isUnmounted) {
  2960. throw new Error(
  2961. `suspense.resolve() is called on an already unmounted suspense boundary.`
  2962. );
  2963. }
  2964. }
  2965. const {
  2966. vnode: vnode2,
  2967. activeBranch,
  2968. pendingBranch,
  2969. pendingId,
  2970. effects,
  2971. parentComponent: parentComponent2,
  2972. container: container2
  2973. } = suspense;
  2974. let delayEnter = false;
  2975. if (suspense.isHydrating) {
  2976. suspense.isHydrating = false;
  2977. } else if (!resume) {
  2978. delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
  2979. if (delayEnter) {
  2980. activeBranch.transition.afterLeave = () => {
  2981. if (pendingId === suspense.pendingId) {
  2982. move(
  2983. pendingBranch,
  2984. container2,
  2985. anchor === initialAnchor ? next(activeBranch) : anchor,
  2986. 0
  2987. );
  2988. queuePostFlushCb(effects);
  2989. }
  2990. };
  2991. }
  2992. if (activeBranch) {
  2993. if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
  2994. anchor = next(activeBranch);
  2995. }
  2996. unmount(activeBranch, parentComponent2, suspense, true);
  2997. }
  2998. if (!delayEnter) {
  2999. move(pendingBranch, container2, anchor, 0);
  3000. }
  3001. }
  3002. setActiveBranch(suspense, pendingBranch);
  3003. suspense.pendingBranch = null;
  3004. suspense.isInFallback = false;
  3005. let parent = suspense.parent;
  3006. let hasUnresolvedAncestor = false;
  3007. while (parent) {
  3008. if (parent.pendingBranch) {
  3009. parent.effects.push(...effects);
  3010. hasUnresolvedAncestor = true;
  3011. break;
  3012. }
  3013. parent = parent.parent;
  3014. }
  3015. if (!hasUnresolvedAncestor && !delayEnter) {
  3016. queuePostFlushCb(effects);
  3017. }
  3018. suspense.effects = [];
  3019. if (isSuspensible) {
  3020. if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
  3021. parentSuspense.deps--;
  3022. if (parentSuspense.deps === 0 && !sync) {
  3023. parentSuspense.resolve();
  3024. }
  3025. }
  3026. }
  3027. triggerEvent(vnode2, "onResolve");
  3028. },
  3029. fallback(fallbackVNode) {
  3030. if (!suspense.pendingBranch) {
  3031. return;
  3032. }
  3033. const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
  3034. triggerEvent(vnode2, "onFallback");
  3035. const anchor2 = next(activeBranch);
  3036. const mountFallback = () => {
  3037. if (!suspense.isInFallback) {
  3038. return;
  3039. }
  3040. patch(
  3041. null,
  3042. fallbackVNode,
  3043. container2,
  3044. anchor2,
  3045. parentComponent2,
  3046. null,
  3047. // fallback tree will not have suspense context
  3048. namespace2,
  3049. slotScopeIds,
  3050. optimized
  3051. );
  3052. setActiveBranch(suspense, fallbackVNode);
  3053. };
  3054. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
  3055. if (delayEnter) {
  3056. activeBranch.transition.afterLeave = mountFallback;
  3057. }
  3058. suspense.isInFallback = true;
  3059. unmount(
  3060. activeBranch,
  3061. parentComponent2,
  3062. null,
  3063. // no suspense so unmount hooks fire now
  3064. true
  3065. // shouldRemove
  3066. );
  3067. if (!delayEnter) {
  3068. mountFallback();
  3069. }
  3070. },
  3071. move(container2, anchor2, type) {
  3072. suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
  3073. suspense.container = container2;
  3074. },
  3075. next() {
  3076. return suspense.activeBranch && next(suspense.activeBranch);
  3077. },
  3078. registerDep(instance, setupRenderEffect) {
  3079. const isInPendingSuspense = !!suspense.pendingBranch;
  3080. if (isInPendingSuspense) {
  3081. suspense.deps++;
  3082. }
  3083. const hydratedEl = instance.vnode.el;
  3084. instance.asyncDep.catch((err) => {
  3085. handleError(err, instance, 0);
  3086. }).then((asyncSetupResult) => {
  3087. if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
  3088. return;
  3089. }
  3090. instance.asyncResolved = true;
  3091. const { vnode: vnode2 } = instance;
  3092. if (true) {
  3093. pushWarningContext(vnode2);
  3094. }
  3095. handleSetupResult(instance, asyncSetupResult, false);
  3096. if (hydratedEl) {
  3097. vnode2.el = hydratedEl;
  3098. }
  3099. const placeholder = !hydratedEl && instance.subTree.el;
  3100. setupRenderEffect(
  3101. instance,
  3102. vnode2,
  3103. // component may have been moved before resolve.
  3104. // if this is not a hydration, instance.subTree will be the comment
  3105. // placeholder.
  3106. parentNode(hydratedEl || instance.subTree.el),
  3107. // anchor will not be used if this is hydration, so only need to
  3108. // consider the comment placeholder case.
  3109. hydratedEl ? null : next(instance.subTree),
  3110. suspense,
  3111. namespace,
  3112. optimized
  3113. );
  3114. if (placeholder) {
  3115. remove2(placeholder);
  3116. }
  3117. updateHOCHostEl(instance, vnode2.el);
  3118. if (true) {
  3119. popWarningContext();
  3120. }
  3121. if (isInPendingSuspense && --suspense.deps === 0) {
  3122. suspense.resolve();
  3123. }
  3124. });
  3125. },
  3126. unmount(parentSuspense2, doRemove) {
  3127. suspense.isUnmounted = true;
  3128. if (suspense.activeBranch) {
  3129. unmount(
  3130. suspense.activeBranch,
  3131. parentComponent,
  3132. parentSuspense2,
  3133. doRemove
  3134. );
  3135. }
  3136. if (suspense.pendingBranch) {
  3137. unmount(
  3138. suspense.pendingBranch,
  3139. parentComponent,
  3140. parentSuspense2,
  3141. doRemove
  3142. );
  3143. }
  3144. }
  3145. };
  3146. return suspense;
  3147. }
  3148. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  3149. const suspense = vnode.suspense = createSuspenseBoundary(
  3150. vnode,
  3151. parentSuspense,
  3152. parentComponent,
  3153. node.parentNode,
  3154. // eslint-disable-next-line no-restricted-globals
  3155. document.createElement("div"),
  3156. null,
  3157. namespace,
  3158. slotScopeIds,
  3159. optimized,
  3160. rendererInternals,
  3161. true
  3162. );
  3163. const result = hydrateNode(
  3164. node,
  3165. suspense.pendingBranch = vnode.ssContent,
  3166. parentComponent,
  3167. suspense,
  3168. slotScopeIds,
  3169. optimized
  3170. );
  3171. if (suspense.deps === 0) {
  3172. suspense.resolve(false, true);
  3173. }
  3174. return result;
  3175. }
  3176. function normalizeSuspenseChildren(vnode) {
  3177. const { shapeFlag, children } = vnode;
  3178. const isSlotChildren = shapeFlag & 32;
  3179. vnode.ssContent = normalizeSuspenseSlot(
  3180. isSlotChildren ? children.default : children
  3181. );
  3182. vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
  3183. }
  3184. function normalizeSuspenseSlot(s) {
  3185. let block;
  3186. if (isFunction(s)) {
  3187. const trackBlock = isBlockTreeEnabled && s._c;
  3188. if (trackBlock) {
  3189. s._d = false;
  3190. openBlock();
  3191. }
  3192. s = s();
  3193. if (trackBlock) {
  3194. s._d = true;
  3195. block = currentBlock;
  3196. closeBlock();
  3197. }
  3198. }
  3199. if (isArray(s)) {
  3200. const singleChild = filterSingleRoot(s);
  3201. if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
  3202. warn$1(`<Suspense> slots expect a single root node.`);
  3203. }
  3204. s = singleChild;
  3205. }
  3206. s = normalizeVNode(s);
  3207. if (block && !s.dynamicChildren) {
  3208. s.dynamicChildren = block.filter((c) => c !== s);
  3209. }
  3210. return s;
  3211. }
  3212. function queueEffectWithSuspense(fn, suspense) {
  3213. if (suspense && suspense.pendingBranch) {
  3214. if (isArray(fn)) {
  3215. suspense.effects.push(...fn);
  3216. } else {
  3217. suspense.effects.push(fn);
  3218. }
  3219. } else {
  3220. queuePostFlushCb(fn);
  3221. }
  3222. }
  3223. function setActiveBranch(suspense, branch) {
  3224. suspense.activeBranch = branch;
  3225. const { vnode, parentComponent } = suspense;
  3226. let el = branch.el;
  3227. while (!el && branch.component) {
  3228. branch = branch.component.subTree;
  3229. el = branch.el;
  3230. }
  3231. vnode.el = el;
  3232. if (parentComponent && parentComponent.subTree === vnode) {
  3233. parentComponent.vnode.el = el;
  3234. updateHOCHostEl(parentComponent, el);
  3235. }
  3236. }
  3237. function isVNodeSuspensible(vnode) {
  3238. var _a;
  3239. return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
  3240. }
  3241. var ssrContextKey = Symbol.for("v-scx");
  3242. var useSSRContext = () => {
  3243. {
  3244. const ctx = inject(ssrContextKey);
  3245. if (!ctx) {
  3246. warn$1(
  3247. `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
  3248. );
  3249. }
  3250. return ctx;
  3251. }
  3252. };
  3253. function watchEffect(effect2, options) {
  3254. return doWatch(effect2, null, options);
  3255. }
  3256. function watchPostEffect(effect2, options) {
  3257. return doWatch(
  3258. effect2,
  3259. null,
  3260. true ? extend({}, options, { flush: "post" }) : { flush: "post" }
  3261. );
  3262. }
  3263. function watchSyncEffect(effect2, options) {
  3264. return doWatch(
  3265. effect2,
  3266. null,
  3267. true ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
  3268. );
  3269. }
  3270. var INITIAL_WATCHER_VALUE = {};
  3271. function watch(source, cb, options) {
  3272. if (!isFunction(cb)) {
  3273. warn$1(
  3274. `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
  3275. );
  3276. }
  3277. return doWatch(source, cb, options);
  3278. }
  3279. function doWatch(source, cb, {
  3280. immediate,
  3281. deep,
  3282. flush,
  3283. once,
  3284. onTrack,
  3285. onTrigger
  3286. } = EMPTY_OBJ) {
  3287. if (cb && once) {
  3288. const _cb = cb;
  3289. cb = (...args) => {
  3290. _cb(...args);
  3291. unwatch();
  3292. };
  3293. }
  3294. if (deep !== void 0 && typeof deep === "number") {
  3295. warn$1(
  3296. `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
  3297. );
  3298. }
  3299. if (!cb) {
  3300. if (immediate !== void 0) {
  3301. warn$1(
  3302. `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
  3303. );
  3304. }
  3305. if (deep !== void 0) {
  3306. warn$1(
  3307. `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
  3308. );
  3309. }
  3310. if (once !== void 0) {
  3311. warn$1(
  3312. `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
  3313. );
  3314. }
  3315. }
  3316. const warnInvalidSource = (s) => {
  3317. warn$1(
  3318. `Invalid watch source: `,
  3319. s,
  3320. `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
  3321. );
  3322. };
  3323. const instance = currentInstance;
  3324. const reactiveGetter = (source2) => deep === true ? source2 : (
  3325. // for deep: false, only traverse root-level properties
  3326. traverse(source2, deep === false ? 1 : void 0)
  3327. );
  3328. let getter;
  3329. let forceTrigger = false;
  3330. let isMultiSource = false;
  3331. if (isRef(source)) {
  3332. getter = () => source.value;
  3333. forceTrigger = isShallow(source);
  3334. } else if (isReactive(source)) {
  3335. getter = () => reactiveGetter(source);
  3336. forceTrigger = true;
  3337. } else if (isArray(source)) {
  3338. isMultiSource = true;
  3339. forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
  3340. getter = () => source.map((s) => {
  3341. if (isRef(s)) {
  3342. return s.value;
  3343. } else if (isReactive(s)) {
  3344. return reactiveGetter(s);
  3345. } else if (isFunction(s)) {
  3346. return callWithErrorHandling(s, instance, 2);
  3347. } else {
  3348. warnInvalidSource(s);
  3349. }
  3350. });
  3351. } else if (isFunction(source)) {
  3352. if (cb) {
  3353. getter = () => callWithErrorHandling(source, instance, 2);
  3354. } else {
  3355. getter = () => {
  3356. if (cleanup) {
  3357. cleanup();
  3358. }
  3359. return callWithAsyncErrorHandling(
  3360. source,
  3361. instance,
  3362. 3,
  3363. [onCleanup]
  3364. );
  3365. };
  3366. }
  3367. } else {
  3368. getter = NOOP;
  3369. warnInvalidSource(source);
  3370. }
  3371. if (cb && deep) {
  3372. const baseGetter = getter;
  3373. getter = () => traverse(baseGetter());
  3374. }
  3375. let cleanup;
  3376. let onCleanup = (fn) => {
  3377. cleanup = effect2.onStop = () => {
  3378. callWithErrorHandling(fn, instance, 4);
  3379. cleanup = effect2.onStop = void 0;
  3380. };
  3381. };
  3382. let ssrCleanup;
  3383. if (isInSSRComponentSetup) {
  3384. onCleanup = NOOP;
  3385. if (!cb) {
  3386. getter();
  3387. } else if (immediate) {
  3388. callWithAsyncErrorHandling(cb, instance, 3, [
  3389. getter(),
  3390. isMultiSource ? [] : void 0,
  3391. onCleanup
  3392. ]);
  3393. }
  3394. if (flush === "sync") {
  3395. const ctx = useSSRContext();
  3396. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  3397. } else {
  3398. return NOOP;
  3399. }
  3400. }
  3401. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  3402. const job = () => {
  3403. if (!effect2.active || !effect2.dirty) {
  3404. return;
  3405. }
  3406. if (cb) {
  3407. const newValue = effect2.run();
  3408. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
  3409. if (cleanup) {
  3410. cleanup();
  3411. }
  3412. callWithAsyncErrorHandling(cb, instance, 3, [
  3413. newValue,
  3414. // pass undefined as the old value when it's changed for the first time
  3415. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  3416. onCleanup
  3417. ]);
  3418. oldValue = newValue;
  3419. }
  3420. } else {
  3421. effect2.run();
  3422. }
  3423. };
  3424. job.allowRecurse = !!cb;
  3425. let scheduler;
  3426. if (flush === "sync") {
  3427. scheduler = job;
  3428. } else if (flush === "post") {
  3429. scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
  3430. } else {
  3431. job.pre = true;
  3432. if (instance)
  3433. job.id = instance.uid;
  3434. scheduler = () => queueJob(job);
  3435. }
  3436. const effect2 = new ReactiveEffect(getter, NOOP, scheduler);
  3437. const scope = getCurrentScope();
  3438. const unwatch = () => {
  3439. effect2.stop();
  3440. if (scope) {
  3441. remove(scope.effects, effect2);
  3442. }
  3443. };
  3444. if (true) {
  3445. effect2.onTrack = onTrack;
  3446. effect2.onTrigger = onTrigger;
  3447. }
  3448. if (cb) {
  3449. if (immediate) {
  3450. job();
  3451. } else {
  3452. oldValue = effect2.run();
  3453. }
  3454. } else if (flush === "post") {
  3455. queuePostRenderEffect(
  3456. effect2.run.bind(effect2),
  3457. instance && instance.suspense
  3458. );
  3459. } else {
  3460. effect2.run();
  3461. }
  3462. if (ssrCleanup)
  3463. ssrCleanup.push(unwatch);
  3464. return unwatch;
  3465. }
  3466. function instanceWatch(source, value, options) {
  3467. const publicThis = this.proxy;
  3468. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  3469. let cb;
  3470. if (isFunction(value)) {
  3471. cb = value;
  3472. } else {
  3473. cb = value.handler;
  3474. options = value;
  3475. }
  3476. const reset = setCurrentInstance(this);
  3477. const res = doWatch(getter, cb.bind(publicThis), options);
  3478. reset();
  3479. return res;
  3480. }
  3481. function createPathGetter(ctx, path) {
  3482. const segments = path.split(".");
  3483. return () => {
  3484. let cur = ctx;
  3485. for (let i = 0; i < segments.length && cur; i++) {
  3486. cur = cur[segments[i]];
  3487. }
  3488. return cur;
  3489. };
  3490. }
  3491. function traverse(value, depth, currentDepth = 0, seen) {
  3492. if (!isObject(value) || value["__v_skip"]) {
  3493. return value;
  3494. }
  3495. if (depth && depth > 0) {
  3496. if (currentDepth >= depth) {
  3497. return value;
  3498. }
  3499. currentDepth++;
  3500. }
  3501. seen = seen || /* @__PURE__ */ new Set();
  3502. if (seen.has(value)) {
  3503. return value;
  3504. }
  3505. seen.add(value);
  3506. if (isRef(value)) {
  3507. traverse(value.value, depth, currentDepth, seen);
  3508. } else if (isArray(value)) {
  3509. for (let i = 0; i < value.length; i++) {
  3510. traverse(value[i], depth, currentDepth, seen);
  3511. }
  3512. } else if (isSet(value) || isMap(value)) {
  3513. value.forEach((v) => {
  3514. traverse(v, depth, currentDepth, seen);
  3515. });
  3516. } else if (isPlainObject(value)) {
  3517. for (const key in value) {
  3518. traverse(value[key], depth, currentDepth, seen);
  3519. }
  3520. }
  3521. return value;
  3522. }
  3523. function validateDirectiveName(name) {
  3524. if (isBuiltInDirective(name)) {
  3525. warn$1("Do not use built-in directive ids as custom directive id: " + name);
  3526. }
  3527. }
  3528. function withDirectives(vnode, directives) {
  3529. if (currentRenderingInstance === null) {
  3530. warn$1(`withDirectives can only be used inside render functions.`);
  3531. return vnode;
  3532. }
  3533. const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
  3534. const bindings = vnode.dirs || (vnode.dirs = []);
  3535. for (let i = 0; i < directives.length; i++) {
  3536. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  3537. if (dir) {
  3538. if (isFunction(dir)) {
  3539. dir = {
  3540. mounted: dir,
  3541. updated: dir
  3542. };
  3543. }
  3544. if (dir.deep) {
  3545. traverse(value);
  3546. }
  3547. bindings.push({
  3548. dir,
  3549. instance,
  3550. value,
  3551. oldValue: void 0,
  3552. arg,
  3553. modifiers
  3554. });
  3555. }
  3556. }
  3557. return vnode;
  3558. }
  3559. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  3560. const bindings = vnode.dirs;
  3561. const oldBindings = prevVNode && prevVNode.dirs;
  3562. for (let i = 0; i < bindings.length; i++) {
  3563. const binding = bindings[i];
  3564. if (oldBindings) {
  3565. binding.oldValue = oldBindings[i].value;
  3566. }
  3567. let hook = binding.dir[name];
  3568. if (hook) {
  3569. pauseTracking();
  3570. callWithAsyncErrorHandling(hook, instance, 8, [
  3571. vnode.el,
  3572. binding,
  3573. vnode,
  3574. prevVNode
  3575. ]);
  3576. resetTracking();
  3577. }
  3578. }
  3579. }
  3580. var leaveCbKey = Symbol("_leaveCb");
  3581. var enterCbKey = Symbol("_enterCb");
  3582. function useTransitionState() {
  3583. const state = {
  3584. isMounted: false,
  3585. isLeaving: false,
  3586. isUnmounting: false,
  3587. leavingVNodes: /* @__PURE__ */ new Map()
  3588. };
  3589. onMounted(() => {
  3590. state.isMounted = true;
  3591. });
  3592. onBeforeUnmount(() => {
  3593. state.isUnmounting = true;
  3594. });
  3595. return state;
  3596. }
  3597. var TransitionHookValidator = [Function, Array];
  3598. var BaseTransitionPropsValidators = {
  3599. mode: String,
  3600. appear: Boolean,
  3601. persisted: Boolean,
  3602. // enter
  3603. onBeforeEnter: TransitionHookValidator,
  3604. onEnter: TransitionHookValidator,
  3605. onAfterEnter: TransitionHookValidator,
  3606. onEnterCancelled: TransitionHookValidator,
  3607. // leave
  3608. onBeforeLeave: TransitionHookValidator,
  3609. onLeave: TransitionHookValidator,
  3610. onAfterLeave: TransitionHookValidator,
  3611. onLeaveCancelled: TransitionHookValidator,
  3612. // appear
  3613. onBeforeAppear: TransitionHookValidator,
  3614. onAppear: TransitionHookValidator,
  3615. onAfterAppear: TransitionHookValidator,
  3616. onAppearCancelled: TransitionHookValidator
  3617. };
  3618. var BaseTransitionImpl = {
  3619. name: `BaseTransition`,
  3620. props: BaseTransitionPropsValidators,
  3621. setup(props, { slots }) {
  3622. const instance = getCurrentInstance();
  3623. const state = useTransitionState();
  3624. return () => {
  3625. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  3626. if (!children || !children.length) {
  3627. return;
  3628. }
  3629. let child = children[0];
  3630. if (children.length > 1) {
  3631. let hasFound = false;
  3632. for (const c of children) {
  3633. if (c.type !== Comment) {
  3634. if (hasFound) {
  3635. warn$1(
  3636. "<transition> can only be used on a single element or component. Use <transition-group> for lists."
  3637. );
  3638. break;
  3639. }
  3640. child = c;
  3641. hasFound = true;
  3642. if (false)
  3643. break;
  3644. }
  3645. }
  3646. }
  3647. const rawProps = toRaw(props);
  3648. const { mode } = rawProps;
  3649. if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
  3650. warn$1(`invalid <transition> mode: ${mode}`);
  3651. }
  3652. if (state.isLeaving) {
  3653. return emptyPlaceholder(child);
  3654. }
  3655. const innerChild = getKeepAliveChild(child);
  3656. if (!innerChild) {
  3657. return emptyPlaceholder(child);
  3658. }
  3659. const enterHooks = resolveTransitionHooks(
  3660. innerChild,
  3661. rawProps,
  3662. state,
  3663. instance
  3664. );
  3665. setTransitionHooks(innerChild, enterHooks);
  3666. const oldChild = instance.subTree;
  3667. const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
  3668. if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
  3669. const leavingHooks = resolveTransitionHooks(
  3670. oldInnerChild,
  3671. rawProps,
  3672. state,
  3673. instance
  3674. );
  3675. setTransitionHooks(oldInnerChild, leavingHooks);
  3676. if (mode === "out-in") {
  3677. state.isLeaving = true;
  3678. leavingHooks.afterLeave = () => {
  3679. state.isLeaving = false;
  3680. if (instance.update.active !== false) {
  3681. instance.effect.dirty = true;
  3682. instance.update();
  3683. }
  3684. };
  3685. return emptyPlaceholder(child);
  3686. } else if (mode === "in-out" && innerChild.type !== Comment) {
  3687. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  3688. const leavingVNodesCache = getLeavingNodesForType(
  3689. state,
  3690. oldInnerChild
  3691. );
  3692. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  3693. el[leaveCbKey] = () => {
  3694. earlyRemove();
  3695. el[leaveCbKey] = void 0;
  3696. delete enterHooks.delayedLeave;
  3697. };
  3698. enterHooks.delayedLeave = delayedLeave;
  3699. };
  3700. }
  3701. }
  3702. return child;
  3703. };
  3704. }
  3705. };
  3706. var BaseTransition = BaseTransitionImpl;
  3707. function getLeavingNodesForType(state, vnode) {
  3708. const { leavingVNodes } = state;
  3709. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  3710. if (!leavingVNodesCache) {
  3711. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  3712. leavingVNodes.set(vnode.type, leavingVNodesCache);
  3713. }
  3714. return leavingVNodesCache;
  3715. }
  3716. function resolveTransitionHooks(vnode, props, state, instance) {
  3717. const {
  3718. appear,
  3719. mode,
  3720. persisted = false,
  3721. onBeforeEnter,
  3722. onEnter,
  3723. onAfterEnter,
  3724. onEnterCancelled,
  3725. onBeforeLeave,
  3726. onLeave,
  3727. onAfterLeave,
  3728. onLeaveCancelled,
  3729. onBeforeAppear,
  3730. onAppear,
  3731. onAfterAppear,
  3732. onAppearCancelled
  3733. } = props;
  3734. const key = String(vnode.key);
  3735. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  3736. const callHook3 = (hook, args) => {
  3737. hook && callWithAsyncErrorHandling(
  3738. hook,
  3739. instance,
  3740. 9,
  3741. args
  3742. );
  3743. };
  3744. const callAsyncHook = (hook, args) => {
  3745. const done = args[1];
  3746. callHook3(hook, args);
  3747. if (isArray(hook)) {
  3748. if (hook.every((hook2) => hook2.length <= 1))
  3749. done();
  3750. } else if (hook.length <= 1) {
  3751. done();
  3752. }
  3753. };
  3754. const hooks = {
  3755. mode,
  3756. persisted,
  3757. beforeEnter(el) {
  3758. let hook = onBeforeEnter;
  3759. if (!state.isMounted) {
  3760. if (appear) {
  3761. hook = onBeforeAppear || onBeforeEnter;
  3762. } else {
  3763. return;
  3764. }
  3765. }
  3766. if (el[leaveCbKey]) {
  3767. el[leaveCbKey](
  3768. true
  3769. /* cancelled */
  3770. );
  3771. }
  3772. const leavingVNode = leavingVNodesCache[key];
  3773. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
  3774. leavingVNode.el[leaveCbKey]();
  3775. }
  3776. callHook3(hook, [el]);
  3777. },
  3778. enter(el) {
  3779. let hook = onEnter;
  3780. let afterHook = onAfterEnter;
  3781. let cancelHook = onEnterCancelled;
  3782. if (!state.isMounted) {
  3783. if (appear) {
  3784. hook = onAppear || onEnter;
  3785. afterHook = onAfterAppear || onAfterEnter;
  3786. cancelHook = onAppearCancelled || onEnterCancelled;
  3787. } else {
  3788. return;
  3789. }
  3790. }
  3791. let called = false;
  3792. const done = el[enterCbKey] = (cancelled) => {
  3793. if (called)
  3794. return;
  3795. called = true;
  3796. if (cancelled) {
  3797. callHook3(cancelHook, [el]);
  3798. } else {
  3799. callHook3(afterHook, [el]);
  3800. }
  3801. if (hooks.delayedLeave) {
  3802. hooks.delayedLeave();
  3803. }
  3804. el[enterCbKey] = void 0;
  3805. };
  3806. if (hook) {
  3807. callAsyncHook(hook, [el, done]);
  3808. } else {
  3809. done();
  3810. }
  3811. },
  3812. leave(el, remove2) {
  3813. const key2 = String(vnode.key);
  3814. if (el[enterCbKey]) {
  3815. el[enterCbKey](
  3816. true
  3817. /* cancelled */
  3818. );
  3819. }
  3820. if (state.isUnmounting) {
  3821. return remove2();
  3822. }
  3823. callHook3(onBeforeLeave, [el]);
  3824. let called = false;
  3825. const done = el[leaveCbKey] = (cancelled) => {
  3826. if (called)
  3827. return;
  3828. called = true;
  3829. remove2();
  3830. if (cancelled) {
  3831. callHook3(onLeaveCancelled, [el]);
  3832. } else {
  3833. callHook3(onAfterLeave, [el]);
  3834. }
  3835. el[leaveCbKey] = void 0;
  3836. if (leavingVNodesCache[key2] === vnode) {
  3837. delete leavingVNodesCache[key2];
  3838. }
  3839. };
  3840. leavingVNodesCache[key2] = vnode;
  3841. if (onLeave) {
  3842. callAsyncHook(onLeave, [el, done]);
  3843. } else {
  3844. done();
  3845. }
  3846. },
  3847. clone(vnode2) {
  3848. return resolveTransitionHooks(vnode2, props, state, instance);
  3849. }
  3850. };
  3851. return hooks;
  3852. }
  3853. function emptyPlaceholder(vnode) {
  3854. if (isKeepAlive(vnode)) {
  3855. vnode = cloneVNode(vnode);
  3856. vnode.children = null;
  3857. return vnode;
  3858. }
  3859. }
  3860. function getKeepAliveChild(vnode) {
  3861. if (!isKeepAlive(vnode)) {
  3862. return vnode;
  3863. }
  3864. if (vnode.component) {
  3865. return vnode.component.subTree;
  3866. }
  3867. const { shapeFlag, children } = vnode;
  3868. if (children) {
  3869. if (shapeFlag & 16) {
  3870. return children[0];
  3871. }
  3872. if (shapeFlag & 32 && isFunction(children.default)) {
  3873. return children.default();
  3874. }
  3875. }
  3876. }
  3877. function setTransitionHooks(vnode, hooks) {
  3878. if (vnode.shapeFlag & 6 && vnode.component) {
  3879. setTransitionHooks(vnode.component.subTree, hooks);
  3880. } else if (vnode.shapeFlag & 128) {
  3881. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  3882. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  3883. } else {
  3884. vnode.transition = hooks;
  3885. }
  3886. }
  3887. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  3888. let ret = [];
  3889. let keyedFragmentCount = 0;
  3890. for (let i = 0; i < children.length; i++) {
  3891. let child = children[i];
  3892. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  3893. if (child.type === Fragment) {
  3894. if (child.patchFlag & 128)
  3895. keyedFragmentCount++;
  3896. ret = ret.concat(
  3897. getTransitionRawChildren(child.children, keepComment, key)
  3898. );
  3899. } else if (keepComment || child.type !== Comment) {
  3900. ret.push(key != null ? cloneVNode(child, { key }) : child);
  3901. }
  3902. }
  3903. if (keyedFragmentCount > 1) {
  3904. for (let i = 0; i < ret.length; i++) {
  3905. ret[i].patchFlag = -2;
  3906. }
  3907. }
  3908. return ret;
  3909. }
  3910. function defineComponent(options, extraOptions) {
  3911. return isFunction(options) ? (
  3912. // #8326: extend call and options.name access are considered side-effects
  3913. // by Rollup, so we have to wrap it in a pure-annotated IIFE.
  3914. (() => extend({ name: options.name }, extraOptions, { setup: options }))()
  3915. ) : options;
  3916. }
  3917. var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  3918. function defineAsyncComponent(source) {
  3919. if (isFunction(source)) {
  3920. source = { loader: source };
  3921. }
  3922. const {
  3923. loader,
  3924. loadingComponent,
  3925. errorComponent,
  3926. delay = 200,
  3927. timeout,
  3928. // undefined = never times out
  3929. suspensible = true,
  3930. onError: userOnError
  3931. } = source;
  3932. let pendingRequest = null;
  3933. let resolvedComp;
  3934. let retries = 0;
  3935. const retry = () => {
  3936. retries++;
  3937. pendingRequest = null;
  3938. return load();
  3939. };
  3940. const load = () => {
  3941. let thisRequest;
  3942. return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
  3943. err = err instanceof Error ? err : new Error(String(err));
  3944. if (userOnError) {
  3945. return new Promise((resolve2, reject) => {
  3946. const userRetry = () => resolve2(retry());
  3947. const userFail = () => reject(err);
  3948. userOnError(err, userRetry, userFail, retries + 1);
  3949. });
  3950. } else {
  3951. throw err;
  3952. }
  3953. }).then((comp) => {
  3954. if (thisRequest !== pendingRequest && pendingRequest) {
  3955. return pendingRequest;
  3956. }
  3957. if (!comp) {
  3958. warn$1(
  3959. `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
  3960. );
  3961. }
  3962. if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
  3963. comp = comp.default;
  3964. }
  3965. if (comp && !isObject(comp) && !isFunction(comp)) {
  3966. throw new Error(`Invalid async component load result: ${comp}`);
  3967. }
  3968. resolvedComp = comp;
  3969. return comp;
  3970. }));
  3971. };
  3972. return defineComponent({
  3973. name: "AsyncComponentWrapper",
  3974. __asyncLoader: load,
  3975. get __asyncResolved() {
  3976. return resolvedComp;
  3977. },
  3978. setup() {
  3979. const instance = currentInstance;
  3980. if (resolvedComp) {
  3981. return () => createInnerComp(resolvedComp, instance);
  3982. }
  3983. const onError = (err) => {
  3984. pendingRequest = null;
  3985. handleError(
  3986. err,
  3987. instance,
  3988. 13,
  3989. !errorComponent
  3990. );
  3991. };
  3992. if (suspensible && instance.suspense || isInSSRComponentSetup) {
  3993. return load().then((comp) => {
  3994. return () => createInnerComp(comp, instance);
  3995. }).catch((err) => {
  3996. onError(err);
  3997. return () => errorComponent ? createVNode(errorComponent, {
  3998. error: err
  3999. }) : null;
  4000. });
  4001. }
  4002. const loaded = ref(false);
  4003. const error = ref();
  4004. const delayed = ref(!!delay);
  4005. if (delay) {
  4006. setTimeout(() => {
  4007. delayed.value = false;
  4008. }, delay);
  4009. }
  4010. if (timeout != null) {
  4011. setTimeout(() => {
  4012. if (!loaded.value && !error.value) {
  4013. const err = new Error(
  4014. `Async component timed out after ${timeout}ms.`
  4015. );
  4016. onError(err);
  4017. error.value = err;
  4018. }
  4019. }, timeout);
  4020. }
  4021. load().then(() => {
  4022. loaded.value = true;
  4023. if (instance.parent && isKeepAlive(instance.parent.vnode)) {
  4024. instance.parent.effect.dirty = true;
  4025. queueJob(instance.parent.update);
  4026. }
  4027. }).catch((err) => {
  4028. onError(err);
  4029. error.value = err;
  4030. });
  4031. return () => {
  4032. if (loaded.value && resolvedComp) {
  4033. return createInnerComp(resolvedComp, instance);
  4034. } else if (error.value && errorComponent) {
  4035. return createVNode(errorComponent, {
  4036. error: error.value
  4037. });
  4038. } else if (loadingComponent && !delayed.value) {
  4039. return createVNode(loadingComponent);
  4040. }
  4041. };
  4042. }
  4043. });
  4044. }
  4045. function createInnerComp(comp, parent) {
  4046. const { ref: ref2, props, children, ce } = parent.vnode;
  4047. const vnode = createVNode(comp, props, children);
  4048. vnode.ref = ref2;
  4049. vnode.ce = ce;
  4050. delete parent.vnode.ce;
  4051. return vnode;
  4052. }
  4053. var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  4054. var KeepAliveImpl = {
  4055. name: `KeepAlive`,
  4056. // Marker for special handling inside the renderer. We are not using a ===
  4057. // check directly on KeepAlive in the renderer, because importing it directly
  4058. // would prevent it from being tree-shaken.
  4059. __isKeepAlive: true,
  4060. props: {
  4061. include: [String, RegExp, Array],
  4062. exclude: [String, RegExp, Array],
  4063. max: [String, Number]
  4064. },
  4065. setup(props, { slots }) {
  4066. const instance = getCurrentInstance();
  4067. const sharedContext = instance.ctx;
  4068. if (!sharedContext.renderer) {
  4069. return () => {
  4070. const children = slots.default && slots.default();
  4071. return children && children.length === 1 ? children[0] : children;
  4072. };
  4073. }
  4074. const cache = /* @__PURE__ */ new Map();
  4075. const keys = /* @__PURE__ */ new Set();
  4076. let current = null;
  4077. if (true) {
  4078. instance.__v_cache = cache;
  4079. }
  4080. const parentSuspense = instance.suspense;
  4081. const {
  4082. renderer: {
  4083. p: patch,
  4084. m: move,
  4085. um: _unmount,
  4086. o: { createElement }
  4087. }
  4088. } = sharedContext;
  4089. const storageContainer = createElement("div");
  4090. sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
  4091. const instance2 = vnode.component;
  4092. move(vnode, container, anchor, 0, parentSuspense);
  4093. patch(
  4094. instance2.vnode,
  4095. vnode,
  4096. container,
  4097. anchor,
  4098. instance2,
  4099. parentSuspense,
  4100. namespace,
  4101. vnode.slotScopeIds,
  4102. optimized
  4103. );
  4104. queuePostRenderEffect(() => {
  4105. instance2.isDeactivated = false;
  4106. if (instance2.a) {
  4107. invokeArrayFns(instance2.a);
  4108. }
  4109. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  4110. if (vnodeHook) {
  4111. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4112. }
  4113. }, parentSuspense);
  4114. if (true) {
  4115. devtoolsComponentAdded(instance2);
  4116. }
  4117. };
  4118. sharedContext.deactivate = (vnode) => {
  4119. const instance2 = vnode.component;
  4120. move(vnode, storageContainer, null, 1, parentSuspense);
  4121. queuePostRenderEffect(() => {
  4122. if (instance2.da) {
  4123. invokeArrayFns(instance2.da);
  4124. }
  4125. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  4126. if (vnodeHook) {
  4127. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4128. }
  4129. instance2.isDeactivated = true;
  4130. }, parentSuspense);
  4131. if (true) {
  4132. devtoolsComponentAdded(instance2);
  4133. }
  4134. };
  4135. function unmount(vnode) {
  4136. resetShapeFlag(vnode);
  4137. _unmount(vnode, instance, parentSuspense, true);
  4138. }
  4139. function pruneCache(filter) {
  4140. cache.forEach((vnode, key) => {
  4141. const name = getComponentName(vnode.type);
  4142. if (name && (!filter || !filter(name))) {
  4143. pruneCacheEntry(key);
  4144. }
  4145. });
  4146. }
  4147. function pruneCacheEntry(key) {
  4148. const cached = cache.get(key);
  4149. if (!current || !isSameVNodeType(cached, current)) {
  4150. unmount(cached);
  4151. } else if (current) {
  4152. resetShapeFlag(current);
  4153. }
  4154. cache.delete(key);
  4155. keys.delete(key);
  4156. }
  4157. watch(
  4158. () => [props.include, props.exclude],
  4159. ([include, exclude]) => {
  4160. include && pruneCache((name) => matches(include, name));
  4161. exclude && pruneCache((name) => !matches(exclude, name));
  4162. },
  4163. // prune post-render after `current` has been updated
  4164. { flush: "post", deep: true }
  4165. );
  4166. let pendingCacheKey = null;
  4167. const cacheSubtree = () => {
  4168. if (pendingCacheKey != null) {
  4169. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  4170. }
  4171. };
  4172. onMounted(cacheSubtree);
  4173. onUpdated(cacheSubtree);
  4174. onBeforeUnmount(() => {
  4175. cache.forEach((cached) => {
  4176. const { subTree, suspense } = instance;
  4177. const vnode = getInnerChild(subTree);
  4178. if (cached.type === vnode.type && cached.key === vnode.key) {
  4179. resetShapeFlag(vnode);
  4180. const da = vnode.component.da;
  4181. da && queuePostRenderEffect(da, suspense);
  4182. return;
  4183. }
  4184. unmount(cached);
  4185. });
  4186. });
  4187. return () => {
  4188. pendingCacheKey = null;
  4189. if (!slots.default) {
  4190. return current = null;
  4191. }
  4192. const children = slots.default();
  4193. const rawVNode = children[0];
  4194. if (children.length > 1) {
  4195. if (true) {
  4196. warn$1(`KeepAlive should contain exactly one component child.`);
  4197. }
  4198. current = null;
  4199. return children;
  4200. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  4201. current = null;
  4202. return rawVNode;
  4203. }
  4204. let vnode = getInnerChild(rawVNode);
  4205. const comp = vnode.type;
  4206. const name = getComponentName(
  4207. isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
  4208. );
  4209. const { include, exclude, max } = props;
  4210. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  4211. current = vnode;
  4212. return rawVNode;
  4213. }
  4214. const key = vnode.key == null ? comp : vnode.key;
  4215. const cachedVNode = cache.get(key);
  4216. if (vnode.el) {
  4217. vnode = cloneVNode(vnode);
  4218. if (rawVNode.shapeFlag & 128) {
  4219. rawVNode.ssContent = vnode;
  4220. }
  4221. }
  4222. pendingCacheKey = key;
  4223. if (cachedVNode) {
  4224. vnode.el = cachedVNode.el;
  4225. vnode.component = cachedVNode.component;
  4226. if (vnode.transition) {
  4227. setTransitionHooks(vnode, vnode.transition);
  4228. }
  4229. vnode.shapeFlag |= 512;
  4230. keys.delete(key);
  4231. keys.add(key);
  4232. } else {
  4233. keys.add(key);
  4234. if (max && keys.size > parseInt(max, 10)) {
  4235. pruneCacheEntry(keys.values().next().value);
  4236. }
  4237. }
  4238. vnode.shapeFlag |= 256;
  4239. current = vnode;
  4240. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  4241. };
  4242. }
  4243. };
  4244. var KeepAlive = KeepAliveImpl;
  4245. function matches(pattern, name) {
  4246. if (isArray(pattern)) {
  4247. return pattern.some((p2) => matches(p2, name));
  4248. } else if (isString(pattern)) {
  4249. return pattern.split(",").includes(name);
  4250. } else if (isRegExp(pattern)) {
  4251. return pattern.test(name);
  4252. }
  4253. return false;
  4254. }
  4255. function onActivated(hook, target) {
  4256. registerKeepAliveHook(hook, "a", target);
  4257. }
  4258. function onDeactivated(hook, target) {
  4259. registerKeepAliveHook(hook, "da", target);
  4260. }
  4261. function registerKeepAliveHook(hook, type, target = currentInstance) {
  4262. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  4263. let current = target;
  4264. while (current) {
  4265. if (current.isDeactivated) {
  4266. return;
  4267. }
  4268. current = current.parent;
  4269. }
  4270. return hook();
  4271. });
  4272. injectHook(type, wrappedHook, target);
  4273. if (target) {
  4274. let current = target.parent;
  4275. while (current && current.parent) {
  4276. if (isKeepAlive(current.parent.vnode)) {
  4277. injectToKeepAliveRoot(wrappedHook, type, target, current);
  4278. }
  4279. current = current.parent;
  4280. }
  4281. }
  4282. }
  4283. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  4284. const injected = injectHook(
  4285. type,
  4286. hook,
  4287. keepAliveRoot,
  4288. true
  4289. /* prepend */
  4290. );
  4291. onUnmounted(() => {
  4292. remove(keepAliveRoot[type], injected);
  4293. }, target);
  4294. }
  4295. function resetShapeFlag(vnode) {
  4296. vnode.shapeFlag &= ~256;
  4297. vnode.shapeFlag &= ~512;
  4298. }
  4299. function getInnerChild(vnode) {
  4300. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  4301. }
  4302. function injectHook(type, hook, target = currentInstance, prepend = false) {
  4303. if (target) {
  4304. const hooks = target[type] || (target[type] = []);
  4305. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  4306. if (target.isUnmounted) {
  4307. return;
  4308. }
  4309. pauseTracking();
  4310. const reset = setCurrentInstance(target);
  4311. const res = callWithAsyncErrorHandling(hook, target, type, args);
  4312. reset();
  4313. resetTracking();
  4314. return res;
  4315. });
  4316. if (prepend) {
  4317. hooks.unshift(wrappedHook);
  4318. } else {
  4319. hooks.push(wrappedHook);
  4320. }
  4321. return wrappedHook;
  4322. } else if (true) {
  4323. const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
  4324. warn$1(
  4325. `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
  4326. );
  4327. }
  4328. }
  4329. var createHook = (lifecycle) => (hook, target = currentInstance) => (
  4330. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  4331. (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
  4332. );
  4333. var onBeforeMount = createHook("bm");
  4334. var onMounted = createHook("m");
  4335. var onBeforeUpdate = createHook("bu");
  4336. var onUpdated = createHook("u");
  4337. var onBeforeUnmount = createHook("bum");
  4338. var onUnmounted = createHook("um");
  4339. var onServerPrefetch = createHook("sp");
  4340. var onRenderTriggered = createHook(
  4341. "rtg"
  4342. );
  4343. var onRenderTracked = createHook(
  4344. "rtc"
  4345. );
  4346. function onErrorCaptured(hook, target = currentInstance) {
  4347. injectHook("ec", hook, target);
  4348. }
  4349. function renderList(source, renderItem, cache, index) {
  4350. let ret;
  4351. const cached = cache && cache[index];
  4352. if (isArray(source) || isString(source)) {
  4353. ret = new Array(source.length);
  4354. for (let i = 0, l = source.length; i < l; i++) {
  4355. ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);
  4356. }
  4357. } else if (typeof source === "number") {
  4358. if (!Number.isInteger(source)) {
  4359. warn$1(`The v-for range expect an integer value but got ${source}.`);
  4360. }
  4361. ret = new Array(source);
  4362. for (let i = 0; i < source; i++) {
  4363. ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  4364. }
  4365. } else if (isObject(source)) {
  4366. if (source[Symbol.iterator]) {
  4367. ret = Array.from(
  4368. source,
  4369. (item, i) => renderItem(item, i, void 0, cached && cached[i])
  4370. );
  4371. } else {
  4372. const keys = Object.keys(source);
  4373. ret = new Array(keys.length);
  4374. for (let i = 0, l = keys.length; i < l; i++) {
  4375. const key = keys[i];
  4376. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  4377. }
  4378. }
  4379. } else {
  4380. ret = [];
  4381. }
  4382. if (cache) {
  4383. cache[index] = ret;
  4384. }
  4385. return ret;
  4386. }
  4387. function createSlots(slots, dynamicSlots) {
  4388. for (let i = 0; i < dynamicSlots.length; i++) {
  4389. const slot = dynamicSlots[i];
  4390. if (isArray(slot)) {
  4391. for (let j = 0; j < slot.length; j++) {
  4392. slots[slot[j].name] = slot[j].fn;
  4393. }
  4394. } else if (slot) {
  4395. slots[slot.name] = slot.key ? (...args) => {
  4396. const res = slot.fn(...args);
  4397. if (res)
  4398. res.key = slot.key;
  4399. return res;
  4400. } : slot.fn;
  4401. }
  4402. }
  4403. return slots;
  4404. }
  4405. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  4406. if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
  4407. if (name !== "default")
  4408. props.name = name;
  4409. return createVNode("slot", props, fallback && fallback());
  4410. }
  4411. let slot = slots[name];
  4412. if (slot && slot.length > 1) {
  4413. warn$1(
  4414. `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
  4415. );
  4416. slot = () => [];
  4417. }
  4418. if (slot && slot._c) {
  4419. slot._d = false;
  4420. }
  4421. openBlock();
  4422. const validSlotContent = slot && ensureValidVNode(slot(props));
  4423. const rendered = createBlock(
  4424. Fragment,
  4425. {
  4426. key: props.key || // slot content array of a dynamic conditional slot may have a branch
  4427. // key attached in the `createSlots` helper, respect that
  4428. validSlotContent && validSlotContent.key || `_${name}`
  4429. },
  4430. validSlotContent || (fallback ? fallback() : []),
  4431. validSlotContent && slots._ === 1 ? 64 : -2
  4432. );
  4433. if (!noSlotted && rendered.scopeId) {
  4434. rendered.slotScopeIds = [rendered.scopeId + "-s"];
  4435. }
  4436. if (slot && slot._c) {
  4437. slot._d = true;
  4438. }
  4439. return rendered;
  4440. }
  4441. function ensureValidVNode(vnodes) {
  4442. return vnodes.some((child) => {
  4443. if (!isVNode(child))
  4444. return true;
  4445. if (child.type === Comment)
  4446. return false;
  4447. if (child.type === Fragment && !ensureValidVNode(child.children))
  4448. return false;
  4449. return true;
  4450. }) ? vnodes : null;
  4451. }
  4452. function toHandlers(obj, preserveCaseIfNecessary) {
  4453. const ret = {};
  4454. if (!isObject(obj)) {
  4455. warn$1(`v-on with no argument expects an object value.`);
  4456. return ret;
  4457. }
  4458. for (const key in obj) {
  4459. ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
  4460. }
  4461. return ret;
  4462. }
  4463. var getPublicInstance = (i) => {
  4464. if (!i)
  4465. return null;
  4466. if (isStatefulComponent(i))
  4467. return getExposeProxy(i) || i.proxy;
  4468. return getPublicInstance(i.parent);
  4469. };
  4470. var publicPropertiesMap = (
  4471. // Move PURE marker to new line to workaround compiler discarding it
  4472. // due to type annotation
  4473. extend(/* @__PURE__ */ Object.create(null), {
  4474. $: (i) => i,
  4475. $el: (i) => i.vnode.el,
  4476. $data: (i) => i.data,
  4477. $props: (i) => true ? shallowReadonly(i.props) : i.props,
  4478. $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs,
  4479. $slots: (i) => true ? shallowReadonly(i.slots) : i.slots,
  4480. $refs: (i) => true ? shallowReadonly(i.refs) : i.refs,
  4481. $parent: (i) => getPublicInstance(i.parent),
  4482. $root: (i) => getPublicInstance(i.root),
  4483. $emit: (i) => i.emit,
  4484. $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
  4485. $forceUpdate: (i) => i.f || (i.f = () => {
  4486. i.effect.dirty = true;
  4487. queueJob(i.update);
  4488. }),
  4489. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  4490. $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
  4491. })
  4492. );
  4493. var isReservedPrefix = (key) => key === "_" || key === "$";
  4494. var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  4495. var PublicInstanceProxyHandlers = {
  4496. get({ _: instance }, key) {
  4497. if (key === "__v_skip") {
  4498. return true;
  4499. }
  4500. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  4501. if (key === "__isVue") {
  4502. return true;
  4503. }
  4504. let normalizedProps;
  4505. if (key[0] !== "$") {
  4506. const n = accessCache[key];
  4507. if (n !== void 0) {
  4508. switch (n) {
  4509. case 1:
  4510. return setupState[key];
  4511. case 2:
  4512. return data[key];
  4513. case 4:
  4514. return ctx[key];
  4515. case 3:
  4516. return props[key];
  4517. }
  4518. } else if (hasSetupBinding(setupState, key)) {
  4519. accessCache[key] = 1;
  4520. return setupState[key];
  4521. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  4522. accessCache[key] = 2;
  4523. return data[key];
  4524. } else if (
  4525. // only cache other properties when instance has declared (thus stable)
  4526. // props
  4527. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  4528. ) {
  4529. accessCache[key] = 3;
  4530. return props[key];
  4531. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  4532. accessCache[key] = 4;
  4533. return ctx[key];
  4534. } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
  4535. accessCache[key] = 0;
  4536. }
  4537. }
  4538. const publicGetter = publicPropertiesMap[key];
  4539. let cssModule, globalProperties;
  4540. if (publicGetter) {
  4541. if (key === "$attrs") {
  4542. track(instance.attrs, "get", "");
  4543. markAttrsAccessed();
  4544. } else if (key === "$slots") {
  4545. track(instance, "get", key);
  4546. }
  4547. return publicGetter(instance);
  4548. } else if (
  4549. // css module (injected by vue-loader)
  4550. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  4551. ) {
  4552. return cssModule;
  4553. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  4554. accessCache[key] = 4;
  4555. return ctx[key];
  4556. } else if (
  4557. // global properties
  4558. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  4559. ) {
  4560. {
  4561. return globalProperties[key];
  4562. }
  4563. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  4564. // to infinite warning loop
  4565. key.indexOf("__v") !== 0)) {
  4566. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  4567. warn$1(
  4568. `Property ${JSON.stringify(
  4569. key
  4570. )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
  4571. );
  4572. } else if (instance === currentRenderingInstance) {
  4573. warn$1(
  4574. `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
  4575. );
  4576. }
  4577. }
  4578. },
  4579. set({ _: instance }, key, value) {
  4580. const { data, setupState, ctx } = instance;
  4581. if (hasSetupBinding(setupState, key)) {
  4582. setupState[key] = value;
  4583. return true;
  4584. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  4585. warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  4586. return false;
  4587. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  4588. data[key] = value;
  4589. return true;
  4590. } else if (hasOwn(instance.props, key)) {
  4591. warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
  4592. return false;
  4593. }
  4594. if (key[0] === "$" && key.slice(1) in instance) {
  4595. warn$1(
  4596. `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
  4597. );
  4598. return false;
  4599. } else {
  4600. if (key in instance.appContext.config.globalProperties) {
  4601. Object.defineProperty(ctx, key, {
  4602. enumerable: true,
  4603. configurable: true,
  4604. value
  4605. });
  4606. } else {
  4607. ctx[key] = value;
  4608. }
  4609. }
  4610. return true;
  4611. },
  4612. has({
  4613. _: { data, setupState, accessCache, ctx, appContext, propsOptions }
  4614. }, key) {
  4615. let normalizedProps;
  4616. return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
  4617. },
  4618. defineProperty(target, key, descriptor) {
  4619. if (descriptor.get != null) {
  4620. target._.accessCache[key] = 0;
  4621. } else if (hasOwn(descriptor, "value")) {
  4622. this.set(target, key, descriptor.value, null);
  4623. }
  4624. return Reflect.defineProperty(target, key, descriptor);
  4625. }
  4626. };
  4627. if (true) {
  4628. PublicInstanceProxyHandlers.ownKeys = (target) => {
  4629. warn$1(
  4630. `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
  4631. );
  4632. return Reflect.ownKeys(target);
  4633. };
  4634. }
  4635. var RuntimeCompiledPublicInstanceProxyHandlers = extend(
  4636. {},
  4637. PublicInstanceProxyHandlers,
  4638. {
  4639. get(target, key) {
  4640. if (key === Symbol.unscopables) {
  4641. return;
  4642. }
  4643. return PublicInstanceProxyHandlers.get(target, key, target);
  4644. },
  4645. has(_, key) {
  4646. const has2 = key[0] !== "_" && !isGloballyAllowed(key);
  4647. if (!has2 && PublicInstanceProxyHandlers.has(_, key)) {
  4648. warn$1(
  4649. `Property ${JSON.stringify(
  4650. key
  4651. )} should not start with _ which is a reserved prefix for Vue internals.`
  4652. );
  4653. }
  4654. return has2;
  4655. }
  4656. }
  4657. );
  4658. function createDevRenderContext(instance) {
  4659. const target = {};
  4660. Object.defineProperty(target, `_`, {
  4661. configurable: true,
  4662. enumerable: false,
  4663. get: () => instance
  4664. });
  4665. Object.keys(publicPropertiesMap).forEach((key) => {
  4666. Object.defineProperty(target, key, {
  4667. configurable: true,
  4668. enumerable: false,
  4669. get: () => publicPropertiesMap[key](instance),
  4670. // intercepted by the proxy so no need for implementation,
  4671. // but needed to prevent set errors
  4672. set: NOOP
  4673. });
  4674. });
  4675. return target;
  4676. }
  4677. function exposePropsOnRenderContext(instance) {
  4678. const {
  4679. ctx,
  4680. propsOptions: [propsOptions]
  4681. } = instance;
  4682. if (propsOptions) {
  4683. Object.keys(propsOptions).forEach((key) => {
  4684. Object.defineProperty(ctx, key, {
  4685. enumerable: true,
  4686. configurable: true,
  4687. get: () => instance.props[key],
  4688. set: NOOP
  4689. });
  4690. });
  4691. }
  4692. }
  4693. function exposeSetupStateOnRenderContext(instance) {
  4694. const { ctx, setupState } = instance;
  4695. Object.keys(toRaw(setupState)).forEach((key) => {
  4696. if (!setupState.__isScriptSetup) {
  4697. if (isReservedPrefix(key[0])) {
  4698. warn$1(
  4699. `setup() return property ${JSON.stringify(
  4700. key
  4701. )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
  4702. );
  4703. return;
  4704. }
  4705. Object.defineProperty(ctx, key, {
  4706. enumerable: true,
  4707. configurable: true,
  4708. get: () => setupState[key],
  4709. set: NOOP
  4710. });
  4711. }
  4712. });
  4713. }
  4714. var warnRuntimeUsage = (method) => warn$1(
  4715. `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
  4716. );
  4717. function defineProps() {
  4718. if (true) {
  4719. warnRuntimeUsage(`defineProps`);
  4720. }
  4721. return null;
  4722. }
  4723. function defineEmits() {
  4724. if (true) {
  4725. warnRuntimeUsage(`defineEmits`);
  4726. }
  4727. return null;
  4728. }
  4729. function defineExpose(exposed) {
  4730. if (true) {
  4731. warnRuntimeUsage(`defineExpose`);
  4732. }
  4733. }
  4734. function defineOptions(options) {
  4735. if (true) {
  4736. warnRuntimeUsage(`defineOptions`);
  4737. }
  4738. }
  4739. function defineSlots() {
  4740. if (true) {
  4741. warnRuntimeUsage(`defineSlots`);
  4742. }
  4743. return null;
  4744. }
  4745. function defineModel() {
  4746. if (true) {
  4747. warnRuntimeUsage("defineModel");
  4748. }
  4749. }
  4750. function withDefaults(props, defaults) {
  4751. if (true) {
  4752. warnRuntimeUsage(`withDefaults`);
  4753. }
  4754. return null;
  4755. }
  4756. function useSlots() {
  4757. return getContext().slots;
  4758. }
  4759. function useAttrs() {
  4760. return getContext().attrs;
  4761. }
  4762. function getContext() {
  4763. const i = getCurrentInstance();
  4764. if (!i) {
  4765. warn$1(`useContext() called without active instance.`);
  4766. }
  4767. return i.setupContext || (i.setupContext = createSetupContext(i));
  4768. }
  4769. function normalizePropsOrEmits(props) {
  4770. return isArray(props) ? props.reduce(
  4771. (normalized, p2) => (normalized[p2] = null, normalized),
  4772. {}
  4773. ) : props;
  4774. }
  4775. function mergeDefaults(raw, defaults) {
  4776. const props = normalizePropsOrEmits(raw);
  4777. for (const key in defaults) {
  4778. if (key.startsWith("__skip"))
  4779. continue;
  4780. let opt = props[key];
  4781. if (opt) {
  4782. if (isArray(opt) || isFunction(opt)) {
  4783. opt = props[key] = { type: opt, default: defaults[key] };
  4784. } else {
  4785. opt.default = defaults[key];
  4786. }
  4787. } else if (opt === null) {
  4788. opt = props[key] = { default: defaults[key] };
  4789. } else if (true) {
  4790. warn$1(`props default key "${key}" has no corresponding declaration.`);
  4791. }
  4792. if (opt && defaults[`__skip_${key}`]) {
  4793. opt.skipFactory = true;
  4794. }
  4795. }
  4796. return props;
  4797. }
  4798. function mergeModels(a, b) {
  4799. if (!a || !b)
  4800. return a || b;
  4801. if (isArray(a) && isArray(b))
  4802. return a.concat(b);
  4803. return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
  4804. }
  4805. function createPropsRestProxy(props, excludedKeys) {
  4806. const ret = {};
  4807. for (const key in props) {
  4808. if (!excludedKeys.includes(key)) {
  4809. Object.defineProperty(ret, key, {
  4810. enumerable: true,
  4811. get: () => props[key]
  4812. });
  4813. }
  4814. }
  4815. return ret;
  4816. }
  4817. function withAsyncContext(getAwaitable) {
  4818. const ctx = getCurrentInstance();
  4819. if (!ctx) {
  4820. warn$1(
  4821. `withAsyncContext called without active current instance. This is likely a bug.`
  4822. );
  4823. }
  4824. let awaitable = getAwaitable();
  4825. unsetCurrentInstance();
  4826. if (isPromise(awaitable)) {
  4827. awaitable = awaitable.catch((e) => {
  4828. setCurrentInstance(ctx);
  4829. throw e;
  4830. });
  4831. }
  4832. return [awaitable, () => setCurrentInstance(ctx)];
  4833. }
  4834. function createDuplicateChecker() {
  4835. const cache = /* @__PURE__ */ Object.create(null);
  4836. return (type, key) => {
  4837. if (cache[key]) {
  4838. warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
  4839. } else {
  4840. cache[key] = type;
  4841. }
  4842. };
  4843. }
  4844. var shouldCacheAccess = true;
  4845. function applyOptions(instance) {
  4846. const options = resolveMergedOptions(instance);
  4847. const publicThis = instance.proxy;
  4848. const ctx = instance.ctx;
  4849. shouldCacheAccess = false;
  4850. if (options.beforeCreate) {
  4851. callHook(options.beforeCreate, instance, "bc");
  4852. }
  4853. const {
  4854. // state
  4855. data: dataOptions,
  4856. computed: computedOptions,
  4857. methods,
  4858. watch: watchOptions,
  4859. provide: provideOptions,
  4860. inject: injectOptions,
  4861. // lifecycle
  4862. created,
  4863. beforeMount,
  4864. mounted,
  4865. beforeUpdate,
  4866. updated,
  4867. activated,
  4868. deactivated,
  4869. beforeDestroy,
  4870. beforeUnmount,
  4871. destroyed,
  4872. unmounted,
  4873. render: render2,
  4874. renderTracked,
  4875. renderTriggered,
  4876. errorCaptured,
  4877. serverPrefetch,
  4878. // public API
  4879. expose,
  4880. inheritAttrs,
  4881. // assets
  4882. components,
  4883. directives,
  4884. filters
  4885. } = options;
  4886. const checkDuplicateProperties = true ? createDuplicateChecker() : null;
  4887. if (true) {
  4888. const [propsOptions] = instance.propsOptions;
  4889. if (propsOptions) {
  4890. for (const key in propsOptions) {
  4891. checkDuplicateProperties("Props", key);
  4892. }
  4893. }
  4894. }
  4895. if (injectOptions) {
  4896. resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  4897. }
  4898. if (methods) {
  4899. for (const key in methods) {
  4900. const methodHandler = methods[key];
  4901. if (isFunction(methodHandler)) {
  4902. if (true) {
  4903. Object.defineProperty(ctx, key, {
  4904. value: methodHandler.bind(publicThis),
  4905. configurable: true,
  4906. enumerable: true,
  4907. writable: true
  4908. });
  4909. } else {
  4910. ctx[key] = methodHandler.bind(publicThis);
  4911. }
  4912. if (true) {
  4913. checkDuplicateProperties("Methods", key);
  4914. }
  4915. } else if (true) {
  4916. warn$1(
  4917. `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
  4918. );
  4919. }
  4920. }
  4921. }
  4922. if (dataOptions) {
  4923. if (!isFunction(dataOptions)) {
  4924. warn$1(
  4925. `The data option must be a function. Plain object usage is no longer supported.`
  4926. );
  4927. }
  4928. const data = dataOptions.call(publicThis, publicThis);
  4929. if (isPromise(data)) {
  4930. warn$1(
  4931. `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
  4932. );
  4933. }
  4934. if (!isObject(data)) {
  4935. warn$1(`data() should return an object.`);
  4936. } else {
  4937. instance.data = reactive(data);
  4938. if (true) {
  4939. for (const key in data) {
  4940. checkDuplicateProperties("Data", key);
  4941. if (!isReservedPrefix(key[0])) {
  4942. Object.defineProperty(ctx, key, {
  4943. configurable: true,
  4944. enumerable: true,
  4945. get: () => data[key],
  4946. set: NOOP
  4947. });
  4948. }
  4949. }
  4950. }
  4951. }
  4952. }
  4953. shouldCacheAccess = true;
  4954. if (computedOptions) {
  4955. for (const key in computedOptions) {
  4956. const opt = computedOptions[key];
  4957. const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  4958. if (get2 === NOOP) {
  4959. warn$1(`Computed property "${key}" has no getter.`);
  4960. }
  4961. const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : true ? () => {
  4962. warn$1(
  4963. `Write operation failed: computed property "${key}" is readonly.`
  4964. );
  4965. } : NOOP;
  4966. const c = computed2({
  4967. get: get2,
  4968. set: set2
  4969. });
  4970. Object.defineProperty(ctx, key, {
  4971. enumerable: true,
  4972. configurable: true,
  4973. get: () => c.value,
  4974. set: (v) => c.value = v
  4975. });
  4976. if (true) {
  4977. checkDuplicateProperties("Computed", key);
  4978. }
  4979. }
  4980. }
  4981. if (watchOptions) {
  4982. for (const key in watchOptions) {
  4983. createWatcher(watchOptions[key], ctx, publicThis, key);
  4984. }
  4985. }
  4986. if (provideOptions) {
  4987. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  4988. Reflect.ownKeys(provides).forEach((key) => {
  4989. provide(key, provides[key]);
  4990. });
  4991. }
  4992. if (created) {
  4993. callHook(created, instance, "c");
  4994. }
  4995. function registerLifecycleHook(register, hook) {
  4996. if (isArray(hook)) {
  4997. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  4998. } else if (hook) {
  4999. register(hook.bind(publicThis));
  5000. }
  5001. }
  5002. registerLifecycleHook(onBeforeMount, beforeMount);
  5003. registerLifecycleHook(onMounted, mounted);
  5004. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  5005. registerLifecycleHook(onUpdated, updated);
  5006. registerLifecycleHook(onActivated, activated);
  5007. registerLifecycleHook(onDeactivated, deactivated);
  5008. registerLifecycleHook(onErrorCaptured, errorCaptured);
  5009. registerLifecycleHook(onRenderTracked, renderTracked);
  5010. registerLifecycleHook(onRenderTriggered, renderTriggered);
  5011. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  5012. registerLifecycleHook(onUnmounted, unmounted);
  5013. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  5014. if (isArray(expose)) {
  5015. if (expose.length) {
  5016. const exposed = instance.exposed || (instance.exposed = {});
  5017. expose.forEach((key) => {
  5018. Object.defineProperty(exposed, key, {
  5019. get: () => publicThis[key],
  5020. set: (val) => publicThis[key] = val
  5021. });
  5022. });
  5023. } else if (!instance.exposed) {
  5024. instance.exposed = {};
  5025. }
  5026. }
  5027. if (render2 && instance.render === NOOP) {
  5028. instance.render = render2;
  5029. }
  5030. if (inheritAttrs != null) {
  5031. instance.inheritAttrs = inheritAttrs;
  5032. }
  5033. if (components)
  5034. instance.components = components;
  5035. if (directives)
  5036. instance.directives = directives;
  5037. }
  5038. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  5039. if (isArray(injectOptions)) {
  5040. injectOptions = normalizeInject(injectOptions);
  5041. }
  5042. for (const key in injectOptions) {
  5043. const opt = injectOptions[key];
  5044. let injected;
  5045. if (isObject(opt)) {
  5046. if ("default" in opt) {
  5047. injected = inject(
  5048. opt.from || key,
  5049. opt.default,
  5050. true
  5051. );
  5052. } else {
  5053. injected = inject(opt.from || key);
  5054. }
  5055. } else {
  5056. injected = inject(opt);
  5057. }
  5058. if (isRef(injected)) {
  5059. Object.defineProperty(ctx, key, {
  5060. enumerable: true,
  5061. configurable: true,
  5062. get: () => injected.value,
  5063. set: (v) => injected.value = v
  5064. });
  5065. } else {
  5066. ctx[key] = injected;
  5067. }
  5068. if (true) {
  5069. checkDuplicateProperties("Inject", key);
  5070. }
  5071. }
  5072. }
  5073. function callHook(hook, instance, type) {
  5074. callWithAsyncErrorHandling(
  5075. isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
  5076. instance,
  5077. type
  5078. );
  5079. }
  5080. function createWatcher(raw, ctx, publicThis, key) {
  5081. const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  5082. if (isString(raw)) {
  5083. const handler = ctx[raw];
  5084. if (isFunction(handler)) {
  5085. watch(getter, handler);
  5086. } else if (true) {
  5087. warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
  5088. }
  5089. } else if (isFunction(raw)) {
  5090. watch(getter, raw.bind(publicThis));
  5091. } else if (isObject(raw)) {
  5092. if (isArray(raw)) {
  5093. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  5094. } else {
  5095. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  5096. if (isFunction(handler)) {
  5097. watch(getter, handler, raw);
  5098. } else if (true) {
  5099. warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  5100. }
  5101. }
  5102. } else if (true) {
  5103. warn$1(`Invalid watch option: "${key}"`, raw);
  5104. }
  5105. }
  5106. function resolveMergedOptions(instance) {
  5107. const base = instance.type;
  5108. const { mixins, extends: extendsOptions } = base;
  5109. const {
  5110. mixins: globalMixins,
  5111. optionsCache: cache,
  5112. config: { optionMergeStrategies }
  5113. } = instance.appContext;
  5114. const cached = cache.get(base);
  5115. let resolved;
  5116. if (cached) {
  5117. resolved = cached;
  5118. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  5119. {
  5120. resolved = base;
  5121. }
  5122. } else {
  5123. resolved = {};
  5124. if (globalMixins.length) {
  5125. globalMixins.forEach(
  5126. (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
  5127. );
  5128. }
  5129. mergeOptions(resolved, base, optionMergeStrategies);
  5130. }
  5131. if (isObject(base)) {
  5132. cache.set(base, resolved);
  5133. }
  5134. return resolved;
  5135. }
  5136. function mergeOptions(to, from, strats, asMixin = false) {
  5137. const { mixins, extends: extendsOptions } = from;
  5138. if (extendsOptions) {
  5139. mergeOptions(to, extendsOptions, strats, true);
  5140. }
  5141. if (mixins) {
  5142. mixins.forEach(
  5143. (m) => mergeOptions(to, m, strats, true)
  5144. );
  5145. }
  5146. for (const key in from) {
  5147. if (asMixin && key === "expose") {
  5148. warn$1(
  5149. `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
  5150. );
  5151. } else {
  5152. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  5153. to[key] = strat ? strat(to[key], from[key]) : from[key];
  5154. }
  5155. }
  5156. return to;
  5157. }
  5158. var internalOptionMergeStrats = {
  5159. data: mergeDataFn,
  5160. props: mergeEmitsOrPropsOptions,
  5161. emits: mergeEmitsOrPropsOptions,
  5162. // objects
  5163. methods: mergeObjectOptions,
  5164. computed: mergeObjectOptions,
  5165. // lifecycle
  5166. beforeCreate: mergeAsArray,
  5167. created: mergeAsArray,
  5168. beforeMount: mergeAsArray,
  5169. mounted: mergeAsArray,
  5170. beforeUpdate: mergeAsArray,
  5171. updated: mergeAsArray,
  5172. beforeDestroy: mergeAsArray,
  5173. beforeUnmount: mergeAsArray,
  5174. destroyed: mergeAsArray,
  5175. unmounted: mergeAsArray,
  5176. activated: mergeAsArray,
  5177. deactivated: mergeAsArray,
  5178. errorCaptured: mergeAsArray,
  5179. serverPrefetch: mergeAsArray,
  5180. // assets
  5181. components: mergeObjectOptions,
  5182. directives: mergeObjectOptions,
  5183. // watch
  5184. watch: mergeWatchOptions,
  5185. // provide / inject
  5186. provide: mergeDataFn,
  5187. inject: mergeInject
  5188. };
  5189. function mergeDataFn(to, from) {
  5190. if (!from) {
  5191. return to;
  5192. }
  5193. if (!to) {
  5194. return from;
  5195. }
  5196. return function mergedDataFn() {
  5197. return extend(
  5198. isFunction(to) ? to.call(this, this) : to,
  5199. isFunction(from) ? from.call(this, this) : from
  5200. );
  5201. };
  5202. }
  5203. function mergeInject(to, from) {
  5204. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  5205. }
  5206. function normalizeInject(raw) {
  5207. if (isArray(raw)) {
  5208. const res = {};
  5209. for (let i = 0; i < raw.length; i++) {
  5210. res[raw[i]] = raw[i];
  5211. }
  5212. return res;
  5213. }
  5214. return raw;
  5215. }
  5216. function mergeAsArray(to, from) {
  5217. return to ? [...new Set([].concat(to, from))] : from;
  5218. }
  5219. function mergeObjectOptions(to, from) {
  5220. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  5221. }
  5222. function mergeEmitsOrPropsOptions(to, from) {
  5223. if (to) {
  5224. if (isArray(to) && isArray(from)) {
  5225. return [.../* @__PURE__ */ new Set([...to, ...from])];
  5226. }
  5227. return extend(
  5228. /* @__PURE__ */ Object.create(null),
  5229. normalizePropsOrEmits(to),
  5230. normalizePropsOrEmits(from != null ? from : {})
  5231. );
  5232. } else {
  5233. return from;
  5234. }
  5235. }
  5236. function mergeWatchOptions(to, from) {
  5237. if (!to)
  5238. return from;
  5239. if (!from)
  5240. return to;
  5241. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  5242. for (const key in from) {
  5243. merged[key] = mergeAsArray(to[key], from[key]);
  5244. }
  5245. return merged;
  5246. }
  5247. function createAppContext() {
  5248. return {
  5249. app: null,
  5250. config: {
  5251. isNativeTag: NO,
  5252. performance: false,
  5253. globalProperties: {},
  5254. optionMergeStrategies: {},
  5255. errorHandler: void 0,
  5256. warnHandler: void 0,
  5257. compilerOptions: {}
  5258. },
  5259. mixins: [],
  5260. components: {},
  5261. directives: {},
  5262. provides: /* @__PURE__ */ Object.create(null),
  5263. optionsCache: /* @__PURE__ */ new WeakMap(),
  5264. propsCache: /* @__PURE__ */ new WeakMap(),
  5265. emitsCache: /* @__PURE__ */ new WeakMap()
  5266. };
  5267. }
  5268. var uid$1 = 0;
  5269. function createAppAPI(render2, hydrate2) {
  5270. return function createApp2(rootComponent, rootProps = null) {
  5271. if (!isFunction(rootComponent)) {
  5272. rootComponent = extend({}, rootComponent);
  5273. }
  5274. if (rootProps != null && !isObject(rootProps)) {
  5275. warn$1(`root props passed to app.mount() must be an object.`);
  5276. rootProps = null;
  5277. }
  5278. const context = createAppContext();
  5279. const installedPlugins = /* @__PURE__ */ new WeakSet();
  5280. let isMounted = false;
  5281. const app = context.app = {
  5282. _uid: uid$1++,
  5283. _component: rootComponent,
  5284. _props: rootProps,
  5285. _container: null,
  5286. _context: context,
  5287. _instance: null,
  5288. version,
  5289. get config() {
  5290. return context.config;
  5291. },
  5292. set config(v) {
  5293. if (true) {
  5294. warn$1(
  5295. `app.config cannot be replaced. Modify individual options instead.`
  5296. );
  5297. }
  5298. },
  5299. use(plugin, ...options) {
  5300. if (installedPlugins.has(plugin)) {
  5301. warn$1(`Plugin has already been applied to target app.`);
  5302. } else if (plugin && isFunction(plugin.install)) {
  5303. installedPlugins.add(plugin);
  5304. plugin.install(app, ...options);
  5305. } else if (isFunction(plugin)) {
  5306. installedPlugins.add(plugin);
  5307. plugin(app, ...options);
  5308. } else if (true) {
  5309. warn$1(
  5310. `A plugin must either be a function or an object with an "install" function.`
  5311. );
  5312. }
  5313. return app;
  5314. },
  5315. mixin(mixin) {
  5316. if (__VUE_OPTIONS_API__) {
  5317. if (!context.mixins.includes(mixin)) {
  5318. context.mixins.push(mixin);
  5319. } else if (true) {
  5320. warn$1(
  5321. "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
  5322. );
  5323. }
  5324. } else if (true) {
  5325. warn$1("Mixins are only available in builds supporting Options API");
  5326. }
  5327. return app;
  5328. },
  5329. component(name, component) {
  5330. if (true) {
  5331. validateComponentName(name, context.config);
  5332. }
  5333. if (!component) {
  5334. return context.components[name];
  5335. }
  5336. if (context.components[name]) {
  5337. warn$1(`Component "${name}" has already been registered in target app.`);
  5338. }
  5339. context.components[name] = component;
  5340. return app;
  5341. },
  5342. directive(name, directive) {
  5343. if (true) {
  5344. validateDirectiveName(name);
  5345. }
  5346. if (!directive) {
  5347. return context.directives[name];
  5348. }
  5349. if (context.directives[name]) {
  5350. warn$1(`Directive "${name}" has already been registered in target app.`);
  5351. }
  5352. context.directives[name] = directive;
  5353. return app;
  5354. },
  5355. mount(rootContainer, isHydrate, namespace) {
  5356. if (!isMounted) {
  5357. if (rootContainer.__vue_app__) {
  5358. warn$1(
  5359. `There is already an app instance mounted on the host container.
  5360. If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
  5361. );
  5362. }
  5363. const vnode = createVNode(rootComponent, rootProps);
  5364. vnode.appContext = context;
  5365. if (namespace === true) {
  5366. namespace = "svg";
  5367. } else if (namespace === false) {
  5368. namespace = void 0;
  5369. }
  5370. if (true) {
  5371. context.reload = () => {
  5372. render2(
  5373. cloneVNode(vnode),
  5374. rootContainer,
  5375. namespace
  5376. );
  5377. };
  5378. }
  5379. if (isHydrate && hydrate2) {
  5380. hydrate2(vnode, rootContainer);
  5381. } else {
  5382. render2(vnode, rootContainer, namespace);
  5383. }
  5384. isMounted = true;
  5385. app._container = rootContainer;
  5386. rootContainer.__vue_app__ = app;
  5387. if (true) {
  5388. app._instance = vnode.component;
  5389. devtoolsInitApp(app, version);
  5390. }
  5391. return getExposeProxy(vnode.component) || vnode.component.proxy;
  5392. } else if (true) {
  5393. warn$1(
  5394. `App has already been mounted.
  5395. If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
  5396. );
  5397. }
  5398. },
  5399. unmount() {
  5400. if (isMounted) {
  5401. render2(null, app._container);
  5402. if (true) {
  5403. app._instance = null;
  5404. devtoolsUnmountApp(app);
  5405. }
  5406. delete app._container.__vue_app__;
  5407. } else if (true) {
  5408. warn$1(`Cannot unmount an app that is not mounted.`);
  5409. }
  5410. },
  5411. provide(key, value) {
  5412. if (key in context.provides) {
  5413. warn$1(
  5414. `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
  5415. );
  5416. }
  5417. context.provides[key] = value;
  5418. return app;
  5419. },
  5420. runWithContext(fn) {
  5421. const lastApp = currentApp;
  5422. currentApp = app;
  5423. try {
  5424. return fn();
  5425. } finally {
  5426. currentApp = lastApp;
  5427. }
  5428. }
  5429. };
  5430. return app;
  5431. };
  5432. }
  5433. var currentApp = null;
  5434. function provide(key, value) {
  5435. if (!currentInstance) {
  5436. if (true) {
  5437. warn$1(`provide() can only be used inside setup().`);
  5438. }
  5439. } else {
  5440. let provides = currentInstance.provides;
  5441. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  5442. if (parentProvides === provides) {
  5443. provides = currentInstance.provides = Object.create(parentProvides);
  5444. }
  5445. provides[key] = value;
  5446. }
  5447. }
  5448. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  5449. const instance = currentInstance || currentRenderingInstance;
  5450. if (instance || currentApp) {
  5451. const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
  5452. if (provides && key in provides) {
  5453. return provides[key];
  5454. } else if (arguments.length > 1) {
  5455. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  5456. } else if (true) {
  5457. warn$1(`injection "${String(key)}" not found.`);
  5458. }
  5459. } else if (true) {
  5460. warn$1(`inject() can only be used inside setup() or functional components.`);
  5461. }
  5462. }
  5463. function hasInjectionContext() {
  5464. return !!(currentInstance || currentRenderingInstance || currentApp);
  5465. }
  5466. var internalObjectProto = {};
  5467. var createInternalObject = () => Object.create(internalObjectProto);
  5468. var isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
  5469. function initProps(instance, rawProps, isStateful, isSSR = false) {
  5470. const props = {};
  5471. const attrs = createInternalObject();
  5472. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  5473. setFullProps(instance, rawProps, props, attrs);
  5474. for (const key in instance.propsOptions[0]) {
  5475. if (!(key in props)) {
  5476. props[key] = void 0;
  5477. }
  5478. }
  5479. if (true) {
  5480. validateProps(rawProps || {}, props, instance);
  5481. }
  5482. if (isStateful) {
  5483. instance.props = isSSR ? props : shallowReactive(props);
  5484. } else {
  5485. if (!instance.type.props) {
  5486. instance.props = attrs;
  5487. } else {
  5488. instance.props = props;
  5489. }
  5490. }
  5491. instance.attrs = attrs;
  5492. }
  5493. function isInHmrContext(instance) {
  5494. while (instance) {
  5495. if (instance.type.__hmrId)
  5496. return true;
  5497. instance = instance.parent;
  5498. }
  5499. }
  5500. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  5501. const {
  5502. props,
  5503. attrs,
  5504. vnode: { patchFlag }
  5505. } = instance;
  5506. const rawCurrentProps = toRaw(props);
  5507. const [options] = instance.propsOptions;
  5508. let hasAttrsChanged = false;
  5509. if (
  5510. // always force full diff in dev
  5511. // - #1942 if hmr is enabled with sfc component
  5512. // - vite#872 non-sfc component used by sfc component
  5513. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  5514. ) {
  5515. if (patchFlag & 8) {
  5516. const propsToUpdate = instance.vnode.dynamicProps;
  5517. for (let i = 0; i < propsToUpdate.length; i++) {
  5518. let key = propsToUpdate[i];
  5519. if (isEmitListener(instance.emitsOptions, key)) {
  5520. continue;
  5521. }
  5522. const value = rawProps[key];
  5523. if (options) {
  5524. if (hasOwn(attrs, key)) {
  5525. if (value !== attrs[key]) {
  5526. attrs[key] = value;
  5527. hasAttrsChanged = true;
  5528. }
  5529. } else {
  5530. const camelizedKey = camelize(key);
  5531. props[camelizedKey] = resolvePropValue(
  5532. options,
  5533. rawCurrentProps,
  5534. camelizedKey,
  5535. value,
  5536. instance,
  5537. false
  5538. );
  5539. }
  5540. } else {
  5541. if (value !== attrs[key]) {
  5542. attrs[key] = value;
  5543. hasAttrsChanged = true;
  5544. }
  5545. }
  5546. }
  5547. }
  5548. } else {
  5549. if (setFullProps(instance, rawProps, props, attrs)) {
  5550. hasAttrsChanged = true;
  5551. }
  5552. let kebabKey;
  5553. for (const key in rawCurrentProps) {
  5554. if (!rawProps || // for camelCase
  5555. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  5556. // and converted to camelCase (#955)
  5557. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  5558. if (options) {
  5559. if (rawPrevProps && // for camelCase
  5560. (rawPrevProps[key] !== void 0 || // for kebab-case
  5561. rawPrevProps[kebabKey] !== void 0)) {
  5562. props[key] = resolvePropValue(
  5563. options,
  5564. rawCurrentProps,
  5565. key,
  5566. void 0,
  5567. instance,
  5568. true
  5569. );
  5570. }
  5571. } else {
  5572. delete props[key];
  5573. }
  5574. }
  5575. }
  5576. if (attrs !== rawCurrentProps) {
  5577. for (const key in attrs) {
  5578. if (!rawProps || !hasOwn(rawProps, key) && true) {
  5579. delete attrs[key];
  5580. hasAttrsChanged = true;
  5581. }
  5582. }
  5583. }
  5584. }
  5585. if (hasAttrsChanged) {
  5586. trigger(instance.attrs, "set", "");
  5587. }
  5588. if (true) {
  5589. validateProps(rawProps || {}, props, instance);
  5590. }
  5591. }
  5592. function setFullProps(instance, rawProps, props, attrs) {
  5593. const [options, needCastKeys] = instance.propsOptions;
  5594. let hasAttrsChanged = false;
  5595. let rawCastValues;
  5596. if (rawProps) {
  5597. for (let key in rawProps) {
  5598. if (isReservedProp(key)) {
  5599. continue;
  5600. }
  5601. const value = rawProps[key];
  5602. let camelKey;
  5603. if (options && hasOwn(options, camelKey = camelize(key))) {
  5604. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  5605. props[camelKey] = value;
  5606. } else {
  5607. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  5608. }
  5609. } else if (!isEmitListener(instance.emitsOptions, key)) {
  5610. if (!(key in attrs) || value !== attrs[key]) {
  5611. attrs[key] = value;
  5612. hasAttrsChanged = true;
  5613. }
  5614. }
  5615. }
  5616. }
  5617. if (needCastKeys) {
  5618. const rawCurrentProps = toRaw(props);
  5619. const castValues = rawCastValues || EMPTY_OBJ;
  5620. for (let i = 0; i < needCastKeys.length; i++) {
  5621. const key = needCastKeys[i];
  5622. props[key] = resolvePropValue(
  5623. options,
  5624. rawCurrentProps,
  5625. key,
  5626. castValues[key],
  5627. instance,
  5628. !hasOwn(castValues, key)
  5629. );
  5630. }
  5631. }
  5632. return hasAttrsChanged;
  5633. }
  5634. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  5635. const opt = options[key];
  5636. if (opt != null) {
  5637. const hasDefault = hasOwn(opt, "default");
  5638. if (hasDefault && value === void 0) {
  5639. const defaultValue = opt.default;
  5640. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  5641. const { propsDefaults } = instance;
  5642. if (key in propsDefaults) {
  5643. value = propsDefaults[key];
  5644. } else {
  5645. const reset = setCurrentInstance(instance);
  5646. value = propsDefaults[key] = defaultValue.call(
  5647. null,
  5648. props
  5649. );
  5650. reset();
  5651. }
  5652. } else {
  5653. value = defaultValue;
  5654. }
  5655. }
  5656. if (opt[
  5657. 0
  5658. /* shouldCast */
  5659. ]) {
  5660. if (isAbsent && !hasDefault) {
  5661. value = false;
  5662. } else if (opt[
  5663. 1
  5664. /* shouldCastTrue */
  5665. ] && (value === "" || value === hyphenate(key))) {
  5666. value = true;
  5667. }
  5668. }
  5669. }
  5670. return value;
  5671. }
  5672. function normalizePropsOptions(comp, appContext, asMixin = false) {
  5673. const cache = appContext.propsCache;
  5674. const cached = cache.get(comp);
  5675. if (cached) {
  5676. return cached;
  5677. }
  5678. const raw = comp.props;
  5679. const normalized = {};
  5680. const needCastKeys = [];
  5681. let hasExtends = false;
  5682. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  5683. const extendProps = (raw2) => {
  5684. hasExtends = true;
  5685. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  5686. extend(normalized, props);
  5687. if (keys)
  5688. needCastKeys.push(...keys);
  5689. };
  5690. if (!asMixin && appContext.mixins.length) {
  5691. appContext.mixins.forEach(extendProps);
  5692. }
  5693. if (comp.extends) {
  5694. extendProps(comp.extends);
  5695. }
  5696. if (comp.mixins) {
  5697. comp.mixins.forEach(extendProps);
  5698. }
  5699. }
  5700. if (!raw && !hasExtends) {
  5701. if (isObject(comp)) {
  5702. cache.set(comp, EMPTY_ARR);
  5703. }
  5704. return EMPTY_ARR;
  5705. }
  5706. if (isArray(raw)) {
  5707. for (let i = 0; i < raw.length; i++) {
  5708. if (!isString(raw[i])) {
  5709. warn$1(`props must be strings when using array syntax.`, raw[i]);
  5710. }
  5711. const normalizedKey = camelize(raw[i]);
  5712. if (validatePropName(normalizedKey)) {
  5713. normalized[normalizedKey] = EMPTY_OBJ;
  5714. }
  5715. }
  5716. } else if (raw) {
  5717. if (!isObject(raw)) {
  5718. warn$1(`invalid props options`, raw);
  5719. }
  5720. for (const key in raw) {
  5721. const normalizedKey = camelize(key);
  5722. if (validatePropName(normalizedKey)) {
  5723. const opt = raw[key];
  5724. const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  5725. if (prop) {
  5726. const booleanIndex = getTypeIndex(Boolean, prop.type);
  5727. const stringIndex = getTypeIndex(String, prop.type);
  5728. prop[
  5729. 0
  5730. /* shouldCast */
  5731. ] = booleanIndex > -1;
  5732. prop[
  5733. 1
  5734. /* shouldCastTrue */
  5735. ] = stringIndex < 0 || booleanIndex < stringIndex;
  5736. if (booleanIndex > -1 || hasOwn(prop, "default")) {
  5737. needCastKeys.push(normalizedKey);
  5738. }
  5739. }
  5740. }
  5741. }
  5742. }
  5743. const res = [normalized, needCastKeys];
  5744. if (isObject(comp)) {
  5745. cache.set(comp, res);
  5746. }
  5747. return res;
  5748. }
  5749. function validatePropName(key) {
  5750. if (key[0] !== "$" && !isReservedProp(key)) {
  5751. return true;
  5752. } else if (true) {
  5753. warn$1(`Invalid prop name: "${key}" is a reserved property.`);
  5754. }
  5755. return false;
  5756. }
  5757. function getType(ctor) {
  5758. if (ctor === null) {
  5759. return "null";
  5760. }
  5761. if (typeof ctor === "function") {
  5762. return ctor.name || "";
  5763. } else if (typeof ctor === "object") {
  5764. const name = ctor.constructor && ctor.constructor.name;
  5765. return name || "";
  5766. }
  5767. return "";
  5768. }
  5769. function isSameType(a, b) {
  5770. return getType(a) === getType(b);
  5771. }
  5772. function getTypeIndex(type, expectedTypes) {
  5773. if (isArray(expectedTypes)) {
  5774. return expectedTypes.findIndex((t) => isSameType(t, type));
  5775. } else if (isFunction(expectedTypes)) {
  5776. return isSameType(expectedTypes, type) ? 0 : -1;
  5777. }
  5778. return -1;
  5779. }
  5780. function validateProps(rawProps, props, instance) {
  5781. const resolvedValues = toRaw(props);
  5782. const options = instance.propsOptions[0];
  5783. for (const key in options) {
  5784. let opt = options[key];
  5785. if (opt == null)
  5786. continue;
  5787. validateProp(
  5788. key,
  5789. resolvedValues[key],
  5790. opt,
  5791. true ? shallowReadonly(resolvedValues) : resolvedValues,
  5792. !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
  5793. );
  5794. }
  5795. }
  5796. function validateProp(name, value, prop, props, isAbsent) {
  5797. const { type, required, validator, skipCheck } = prop;
  5798. if (required && isAbsent) {
  5799. warn$1('Missing required prop: "' + name + '"');
  5800. return;
  5801. }
  5802. if (value == null && !required) {
  5803. return;
  5804. }
  5805. if (type != null && type !== true && !skipCheck) {
  5806. let isValid = false;
  5807. const types = isArray(type) ? type : [type];
  5808. const expectedTypes = [];
  5809. for (let i = 0; i < types.length && !isValid; i++) {
  5810. const { valid, expectedType } = assertType(value, types[i]);
  5811. expectedTypes.push(expectedType || "");
  5812. isValid = valid;
  5813. }
  5814. if (!isValid) {
  5815. warn$1(getInvalidTypeMessage(name, value, expectedTypes));
  5816. return;
  5817. }
  5818. }
  5819. if (validator && !validator(value, props)) {
  5820. warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
  5821. }
  5822. }
  5823. var isSimpleType = makeMap(
  5824. "String,Number,Boolean,Function,Symbol,BigInt"
  5825. );
  5826. function assertType(value, type) {
  5827. let valid;
  5828. const expectedType = getType(type);
  5829. if (isSimpleType(expectedType)) {
  5830. const t = typeof value;
  5831. valid = t === expectedType.toLowerCase();
  5832. if (!valid && t === "object") {
  5833. valid = value instanceof type;
  5834. }
  5835. } else if (expectedType === "Object") {
  5836. valid = isObject(value);
  5837. } else if (expectedType === "Array") {
  5838. valid = isArray(value);
  5839. } else if (expectedType === "null") {
  5840. valid = value === null;
  5841. } else {
  5842. valid = value instanceof type;
  5843. }
  5844. return {
  5845. valid,
  5846. expectedType
  5847. };
  5848. }
  5849. function getInvalidTypeMessage(name, value, expectedTypes) {
  5850. if (expectedTypes.length === 0) {
  5851. return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
  5852. }
  5853. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  5854. const expectedType = expectedTypes[0];
  5855. const receivedType = toRawType(value);
  5856. const expectedValue = styleValue(value, expectedType);
  5857. const receivedValue = styleValue(value, receivedType);
  5858. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  5859. message += ` with value ${expectedValue}`;
  5860. }
  5861. message += `, got ${receivedType} `;
  5862. if (isExplicable(receivedType)) {
  5863. message += `with value ${receivedValue}.`;
  5864. }
  5865. return message;
  5866. }
  5867. function styleValue(value, type) {
  5868. if (type === "String") {
  5869. return `"${value}"`;
  5870. } else if (type === "Number") {
  5871. return `${Number(value)}`;
  5872. } else {
  5873. return `${value}`;
  5874. }
  5875. }
  5876. function isExplicable(type) {
  5877. const explicitTypes = ["string", "number", "boolean"];
  5878. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  5879. }
  5880. function isBoolean(...args) {
  5881. return args.some((elem) => elem.toLowerCase() === "boolean");
  5882. }
  5883. var isInternalKey = (key) => key[0] === "_" || key === "$stable";
  5884. var normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  5885. var normalizeSlot = (key, rawSlot, ctx) => {
  5886. if (rawSlot._n) {
  5887. return rawSlot;
  5888. }
  5889. const normalized = withCtx((...args) => {
  5890. if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
  5891. warn$1(
  5892. `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
  5893. );
  5894. }
  5895. return normalizeSlotValue(rawSlot(...args));
  5896. }, ctx);
  5897. normalized._c = false;
  5898. return normalized;
  5899. };
  5900. var normalizeObjectSlots = (rawSlots, slots, instance) => {
  5901. const ctx = rawSlots._ctx;
  5902. for (const key in rawSlots) {
  5903. if (isInternalKey(key))
  5904. continue;
  5905. const value = rawSlots[key];
  5906. if (isFunction(value)) {
  5907. slots[key] = normalizeSlot(key, value, ctx);
  5908. } else if (value != null) {
  5909. if (true) {
  5910. warn$1(
  5911. `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
  5912. );
  5913. }
  5914. const normalized = normalizeSlotValue(value);
  5915. slots[key] = () => normalized;
  5916. }
  5917. }
  5918. };
  5919. var normalizeVNodeSlots = (instance, children) => {
  5920. if (!isKeepAlive(instance.vnode) && true) {
  5921. warn$1(
  5922. `Non-function value encountered for default slot. Prefer function slots for better performance.`
  5923. );
  5924. }
  5925. const normalized = normalizeSlotValue(children);
  5926. instance.slots.default = () => normalized;
  5927. };
  5928. var initSlots = (instance, children) => {
  5929. const slots = instance.slots = createInternalObject();
  5930. if (instance.vnode.shapeFlag & 32) {
  5931. const type = children._;
  5932. if (type) {
  5933. extend(slots, children);
  5934. def(slots, "_", type);
  5935. } else {
  5936. normalizeObjectSlots(children, slots);
  5937. }
  5938. } else if (children) {
  5939. normalizeVNodeSlots(instance, children);
  5940. }
  5941. };
  5942. var updateSlots = (instance, children, optimized) => {
  5943. const { vnode, slots } = instance;
  5944. let needDeletionCheck = true;
  5945. let deletionComparisonTarget = EMPTY_OBJ;
  5946. if (vnode.shapeFlag & 32) {
  5947. const type = children._;
  5948. if (type) {
  5949. if (isHmrUpdating) {
  5950. extend(slots, children);
  5951. trigger(instance, "set", "$slots");
  5952. } else if (optimized && type === 1) {
  5953. needDeletionCheck = false;
  5954. } else {
  5955. extend(slots, children);
  5956. if (!optimized && type === 1) {
  5957. delete slots._;
  5958. }
  5959. }
  5960. } else {
  5961. needDeletionCheck = !children.$stable;
  5962. normalizeObjectSlots(children, slots);
  5963. }
  5964. deletionComparisonTarget = children;
  5965. } else if (children) {
  5966. normalizeVNodeSlots(instance, children);
  5967. deletionComparisonTarget = { default: 1 };
  5968. }
  5969. if (needDeletionCheck) {
  5970. for (const key in slots) {
  5971. if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
  5972. delete slots[key];
  5973. }
  5974. }
  5975. }
  5976. };
  5977. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  5978. if (isArray(rawRef)) {
  5979. rawRef.forEach(
  5980. (r, i) => setRef(
  5981. r,
  5982. oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),
  5983. parentSuspense,
  5984. vnode,
  5985. isUnmount
  5986. )
  5987. );
  5988. return;
  5989. }
  5990. if (isAsyncWrapper(vnode) && !isUnmount) {
  5991. return;
  5992. }
  5993. const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
  5994. const value = isUnmount ? null : refValue;
  5995. const { i: owner, r: ref2 } = rawRef;
  5996. if (!owner) {
  5997. warn$1(
  5998. `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
  5999. );
  6000. return;
  6001. }
  6002. const oldRef = oldRawRef && oldRawRef.r;
  6003. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  6004. const setupState = owner.setupState;
  6005. if (oldRef != null && oldRef !== ref2) {
  6006. if (isString(oldRef)) {
  6007. refs[oldRef] = null;
  6008. if (hasOwn(setupState, oldRef)) {
  6009. setupState[oldRef] = null;
  6010. }
  6011. } else if (isRef(oldRef)) {
  6012. oldRef.value = null;
  6013. }
  6014. }
  6015. if (isFunction(ref2)) {
  6016. callWithErrorHandling(ref2, owner, 12, [value, refs]);
  6017. } else {
  6018. const _isString = isString(ref2);
  6019. const _isRef = isRef(ref2);
  6020. if (_isString || _isRef) {
  6021. const doSet = () => {
  6022. if (rawRef.f) {
  6023. const existing = _isString ? hasOwn(setupState, ref2) ? setupState[ref2] : refs[ref2] : ref2.value;
  6024. if (isUnmount) {
  6025. isArray(existing) && remove(existing, refValue);
  6026. } else {
  6027. if (!isArray(existing)) {
  6028. if (_isString) {
  6029. refs[ref2] = [refValue];
  6030. if (hasOwn(setupState, ref2)) {
  6031. setupState[ref2] = refs[ref2];
  6032. }
  6033. } else {
  6034. ref2.value = [refValue];
  6035. if (rawRef.k)
  6036. refs[rawRef.k] = ref2.value;
  6037. }
  6038. } else if (!existing.includes(refValue)) {
  6039. existing.push(refValue);
  6040. }
  6041. }
  6042. } else if (_isString) {
  6043. refs[ref2] = value;
  6044. if (hasOwn(setupState, ref2)) {
  6045. setupState[ref2] = value;
  6046. }
  6047. } else if (_isRef) {
  6048. ref2.value = value;
  6049. if (rawRef.k)
  6050. refs[rawRef.k] = value;
  6051. } else if (true) {
  6052. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  6053. }
  6054. };
  6055. if (value) {
  6056. doSet.id = -1;
  6057. queuePostRenderEffect(doSet, parentSuspense);
  6058. } else {
  6059. doSet();
  6060. }
  6061. } else if (true) {
  6062. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  6063. }
  6064. }
  6065. }
  6066. var hasMismatch = false;
  6067. var isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
  6068. var isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
  6069. var getContainerType = (container) => {
  6070. if (isSVGContainer(container))
  6071. return "svg";
  6072. if (isMathMLContainer(container))
  6073. return "mathml";
  6074. return void 0;
  6075. };
  6076. var isComment = (node) => node.nodeType === 8;
  6077. function createHydrationFunctions(rendererInternals) {
  6078. const {
  6079. mt: mountComponent,
  6080. p: patch,
  6081. o: {
  6082. patchProp: patchProp2,
  6083. createText,
  6084. nextSibling,
  6085. parentNode,
  6086. remove: remove2,
  6087. insert,
  6088. createComment
  6089. }
  6090. } = rendererInternals;
  6091. const hydrate2 = (vnode, container) => {
  6092. if (!container.hasChildNodes()) {
  6093. warn$1(
  6094. `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
  6095. );
  6096. patch(null, vnode, container);
  6097. flushPostFlushCbs();
  6098. container._vnode = vnode;
  6099. return;
  6100. }
  6101. hasMismatch = false;
  6102. hydrateNode(container.firstChild, vnode, null, null, null);
  6103. flushPostFlushCbs();
  6104. container._vnode = vnode;
  6105. if (hasMismatch && true) {
  6106. console.error(`Hydration completed but contains mismatches.`);
  6107. }
  6108. };
  6109. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  6110. optimized = optimized || !!vnode.dynamicChildren;
  6111. const isFragmentStart = isComment(node) && node.data === "[";
  6112. const onMismatch = () => handleMismatch(
  6113. node,
  6114. vnode,
  6115. parentComponent,
  6116. parentSuspense,
  6117. slotScopeIds,
  6118. isFragmentStart
  6119. );
  6120. const { type, ref: ref2, shapeFlag, patchFlag } = vnode;
  6121. let domType = node.nodeType;
  6122. vnode.el = node;
  6123. if (true) {
  6124. if (!("__vnode" in node)) {
  6125. Object.defineProperty(node, "__vnode", {
  6126. value: vnode,
  6127. enumerable: false
  6128. });
  6129. }
  6130. if (!("__vueParentComponent" in node)) {
  6131. Object.defineProperty(node, "__vueParentComponent", {
  6132. value: parentComponent,
  6133. enumerable: false
  6134. });
  6135. }
  6136. }
  6137. if (patchFlag === -2) {
  6138. optimized = false;
  6139. vnode.dynamicChildren = null;
  6140. }
  6141. let nextNode = null;
  6142. switch (type) {
  6143. case Text:
  6144. if (domType !== 3) {
  6145. if (vnode.children === "") {
  6146. insert(vnode.el = createText(""), parentNode(node), node);
  6147. nextNode = node;
  6148. } else {
  6149. nextNode = onMismatch();
  6150. }
  6151. } else {
  6152. if (node.data !== vnode.children) {
  6153. hasMismatch = true;
  6154. warn$1(
  6155. `Hydration text mismatch in`,
  6156. node.parentNode,
  6157. `
  6158. - rendered on server: ${JSON.stringify(
  6159. node.data
  6160. )}
  6161. - expected on client: ${JSON.stringify(vnode.children)}`
  6162. );
  6163. node.data = vnode.children;
  6164. }
  6165. nextNode = nextSibling(node);
  6166. }
  6167. break;
  6168. case Comment:
  6169. if (isTemplateNode(node)) {
  6170. nextNode = nextSibling(node);
  6171. replaceNode(
  6172. vnode.el = node.content.firstChild,
  6173. node,
  6174. parentComponent
  6175. );
  6176. } else if (domType !== 8 || isFragmentStart) {
  6177. nextNode = onMismatch();
  6178. } else {
  6179. nextNode = nextSibling(node);
  6180. }
  6181. break;
  6182. case Static:
  6183. if (isFragmentStart) {
  6184. node = nextSibling(node);
  6185. domType = node.nodeType;
  6186. }
  6187. if (domType === 1 || domType === 3) {
  6188. nextNode = node;
  6189. const needToAdoptContent = !vnode.children.length;
  6190. for (let i = 0; i < vnode.staticCount; i++) {
  6191. if (needToAdoptContent)
  6192. vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
  6193. if (i === vnode.staticCount - 1) {
  6194. vnode.anchor = nextNode;
  6195. }
  6196. nextNode = nextSibling(nextNode);
  6197. }
  6198. return isFragmentStart ? nextSibling(nextNode) : nextNode;
  6199. } else {
  6200. onMismatch();
  6201. }
  6202. break;
  6203. case Fragment:
  6204. if (!isFragmentStart) {
  6205. nextNode = onMismatch();
  6206. } else {
  6207. nextNode = hydrateFragment(
  6208. node,
  6209. vnode,
  6210. parentComponent,
  6211. parentSuspense,
  6212. slotScopeIds,
  6213. optimized
  6214. );
  6215. }
  6216. break;
  6217. default:
  6218. if (shapeFlag & 1) {
  6219. if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
  6220. nextNode = onMismatch();
  6221. } else {
  6222. nextNode = hydrateElement(
  6223. node,
  6224. vnode,
  6225. parentComponent,
  6226. parentSuspense,
  6227. slotScopeIds,
  6228. optimized
  6229. );
  6230. }
  6231. } else if (shapeFlag & 6) {
  6232. vnode.slotScopeIds = slotScopeIds;
  6233. const container = parentNode(node);
  6234. if (isFragmentStart) {
  6235. nextNode = locateClosingAnchor(node);
  6236. } else if (isComment(node) && node.data === "teleport start") {
  6237. nextNode = locateClosingAnchor(node, node.data, "teleport end");
  6238. } else {
  6239. nextNode = nextSibling(node);
  6240. }
  6241. mountComponent(
  6242. vnode,
  6243. container,
  6244. null,
  6245. parentComponent,
  6246. parentSuspense,
  6247. getContainerType(container),
  6248. optimized
  6249. );
  6250. if (isAsyncWrapper(vnode)) {
  6251. let subTree;
  6252. if (isFragmentStart) {
  6253. subTree = createVNode(Fragment);
  6254. subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
  6255. } else {
  6256. subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
  6257. }
  6258. subTree.el = node;
  6259. vnode.component.subTree = subTree;
  6260. }
  6261. } else if (shapeFlag & 64) {
  6262. if (domType !== 8) {
  6263. nextNode = onMismatch();
  6264. } else {
  6265. nextNode = vnode.type.hydrate(
  6266. node,
  6267. vnode,
  6268. parentComponent,
  6269. parentSuspense,
  6270. slotScopeIds,
  6271. optimized,
  6272. rendererInternals,
  6273. hydrateChildren
  6274. );
  6275. }
  6276. } else if (shapeFlag & 128) {
  6277. nextNode = vnode.type.hydrate(
  6278. node,
  6279. vnode,
  6280. parentComponent,
  6281. parentSuspense,
  6282. getContainerType(parentNode(node)),
  6283. slotScopeIds,
  6284. optimized,
  6285. rendererInternals,
  6286. hydrateNode
  6287. );
  6288. } else if (true) {
  6289. warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
  6290. }
  6291. }
  6292. if (ref2 != null) {
  6293. setRef(ref2, null, parentSuspense, vnode);
  6294. }
  6295. return nextNode;
  6296. };
  6297. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  6298. optimized = optimized || !!vnode.dynamicChildren;
  6299. const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
  6300. const forcePatch = type === "input" || type === "option";
  6301. if (true) {
  6302. if (dirs) {
  6303. invokeDirectiveHook(vnode, null, parentComponent, "created");
  6304. }
  6305. let needCallTransitionHooks = false;
  6306. if (isTemplateNode(el)) {
  6307. needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
  6308. const content = el.content.firstChild;
  6309. if (needCallTransitionHooks) {
  6310. transition.beforeEnter(content);
  6311. }
  6312. replaceNode(content, el, parentComponent);
  6313. vnode.el = el = content;
  6314. }
  6315. if (shapeFlag & 16 && // skip if element has innerHTML / textContent
  6316. !(props && (props.innerHTML || props.textContent))) {
  6317. let next = hydrateChildren(
  6318. el.firstChild,
  6319. vnode,
  6320. el,
  6321. parentComponent,
  6322. parentSuspense,
  6323. slotScopeIds,
  6324. optimized
  6325. );
  6326. let hasWarned2 = false;
  6327. while (next) {
  6328. hasMismatch = true;
  6329. if (!hasWarned2) {
  6330. warn$1(
  6331. `Hydration children mismatch on`,
  6332. el,
  6333. `
  6334. Server rendered element contains more child nodes than client vdom.`
  6335. );
  6336. hasWarned2 = true;
  6337. }
  6338. const cur = next;
  6339. next = next.nextSibling;
  6340. remove2(cur);
  6341. }
  6342. } else if (shapeFlag & 8) {
  6343. if (el.textContent !== vnode.children) {
  6344. hasMismatch = true;
  6345. warn$1(
  6346. `Hydration text content mismatch on`,
  6347. el,
  6348. `
  6349. - rendered on server: ${el.textContent}
  6350. - expected on client: ${vnode.children}`
  6351. );
  6352. el.textContent = vnode.children;
  6353. }
  6354. }
  6355. if (props) {
  6356. if (true) {
  6357. for (const key in props) {
  6358. if (propHasMismatch(el, key, props[key], vnode, parentComponent)) {
  6359. hasMismatch = true;
  6360. }
  6361. if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
  6362. key[0] === ".") {
  6363. patchProp2(
  6364. el,
  6365. key,
  6366. null,
  6367. props[key],
  6368. void 0,
  6369. void 0,
  6370. parentComponent
  6371. );
  6372. }
  6373. }
  6374. } else if (props.onClick) {
  6375. patchProp2(
  6376. el,
  6377. "onClick",
  6378. null,
  6379. props.onClick,
  6380. void 0,
  6381. void 0,
  6382. parentComponent
  6383. );
  6384. }
  6385. }
  6386. let vnodeHooks;
  6387. if (vnodeHooks = props && props.onVnodeBeforeMount) {
  6388. invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  6389. }
  6390. if (dirs) {
  6391. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  6392. }
  6393. if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
  6394. queueEffectWithSuspense(() => {
  6395. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  6396. needCallTransitionHooks && transition.enter(el);
  6397. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  6398. }, parentSuspense);
  6399. }
  6400. }
  6401. return el.nextSibling;
  6402. };
  6403. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  6404. optimized = optimized || !!parentVNode.dynamicChildren;
  6405. const children = parentVNode.children;
  6406. const l = children.length;
  6407. let hasWarned2 = false;
  6408. for (let i = 0; i < l; i++) {
  6409. const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
  6410. if (node) {
  6411. node = hydrateNode(
  6412. node,
  6413. vnode,
  6414. parentComponent,
  6415. parentSuspense,
  6416. slotScopeIds,
  6417. optimized
  6418. );
  6419. } else if (vnode.type === Text && !vnode.children) {
  6420. continue;
  6421. } else {
  6422. hasMismatch = true;
  6423. if (!hasWarned2) {
  6424. warn$1(
  6425. `Hydration children mismatch on`,
  6426. container,
  6427. `
  6428. Server rendered element contains fewer child nodes than client vdom.`
  6429. );
  6430. hasWarned2 = true;
  6431. }
  6432. patch(
  6433. null,
  6434. vnode,
  6435. container,
  6436. null,
  6437. parentComponent,
  6438. parentSuspense,
  6439. getContainerType(container),
  6440. slotScopeIds
  6441. );
  6442. }
  6443. }
  6444. return node;
  6445. };
  6446. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  6447. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  6448. if (fragmentSlotScopeIds) {
  6449. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  6450. }
  6451. const container = parentNode(node);
  6452. const next = hydrateChildren(
  6453. nextSibling(node),
  6454. vnode,
  6455. container,
  6456. parentComponent,
  6457. parentSuspense,
  6458. slotScopeIds,
  6459. optimized
  6460. );
  6461. if (next && isComment(next) && next.data === "]") {
  6462. return nextSibling(vnode.anchor = next);
  6463. } else {
  6464. hasMismatch = true;
  6465. insert(vnode.anchor = createComment(`]`), container, next);
  6466. return next;
  6467. }
  6468. };
  6469. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  6470. hasMismatch = true;
  6471. warn$1(
  6472. `Hydration node mismatch:
  6473. - rendered on server:`,
  6474. node,
  6475. node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
  6476. `
  6477. - expected on client:`,
  6478. vnode.type
  6479. );
  6480. vnode.el = null;
  6481. if (isFragment) {
  6482. const end = locateClosingAnchor(node);
  6483. while (true) {
  6484. const next2 = nextSibling(node);
  6485. if (next2 && next2 !== end) {
  6486. remove2(next2);
  6487. } else {
  6488. break;
  6489. }
  6490. }
  6491. }
  6492. const next = nextSibling(node);
  6493. const container = parentNode(node);
  6494. remove2(node);
  6495. patch(
  6496. null,
  6497. vnode,
  6498. container,
  6499. next,
  6500. parentComponent,
  6501. parentSuspense,
  6502. getContainerType(container),
  6503. slotScopeIds
  6504. );
  6505. return next;
  6506. };
  6507. const locateClosingAnchor = (node, open = "[", close = "]") => {
  6508. let match = 0;
  6509. while (node) {
  6510. node = nextSibling(node);
  6511. if (node && isComment(node)) {
  6512. if (node.data === open)
  6513. match++;
  6514. if (node.data === close) {
  6515. if (match === 0) {
  6516. return nextSibling(node);
  6517. } else {
  6518. match--;
  6519. }
  6520. }
  6521. }
  6522. }
  6523. return node;
  6524. };
  6525. const replaceNode = (newNode, oldNode, parentComponent) => {
  6526. const parentNode2 = oldNode.parentNode;
  6527. if (parentNode2) {
  6528. parentNode2.replaceChild(newNode, oldNode);
  6529. }
  6530. let parent = parentComponent;
  6531. while (parent) {
  6532. if (parent.vnode.el === oldNode) {
  6533. parent.vnode.el = parent.subTree.el = newNode;
  6534. }
  6535. parent = parent.parent;
  6536. }
  6537. };
  6538. const isTemplateNode = (node) => {
  6539. return node.nodeType === 1 && node.tagName.toLowerCase() === "template";
  6540. };
  6541. return [hydrate2, hydrateNode];
  6542. }
  6543. function propHasMismatch(el, key, clientValue, vnode, instance) {
  6544. var _a;
  6545. let mismatchType;
  6546. let mismatchKey;
  6547. let actual;
  6548. let expected;
  6549. if (key === "class") {
  6550. actual = el.getAttribute("class");
  6551. expected = normalizeClass(clientValue);
  6552. if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
  6553. mismatchType = mismatchKey = `class`;
  6554. }
  6555. } else if (key === "style") {
  6556. actual = el.getAttribute("style");
  6557. expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
  6558. const actualMap = toStyleMap(actual);
  6559. const expectedMap = toStyleMap(expected);
  6560. if (vnode.dirs) {
  6561. for (const { dir, value } of vnode.dirs) {
  6562. if (dir.name === "show" && !value) {
  6563. expectedMap.set("display", "none");
  6564. }
  6565. }
  6566. }
  6567. const root = instance == null ? void 0 : instance.subTree;
  6568. if (vnode === root || (root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) {
  6569. const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
  6570. for (const key2 in cssVars) {
  6571. expectedMap.set(`--${key2}`, String(cssVars[key2]));
  6572. }
  6573. }
  6574. if (!isMapEqual(actualMap, expectedMap)) {
  6575. mismatchType = mismatchKey = "style";
  6576. }
  6577. } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
  6578. if (isBooleanAttr(key)) {
  6579. actual = el.hasAttribute(key);
  6580. expected = includeBooleanAttr(clientValue);
  6581. } else if (clientValue == null) {
  6582. actual = el.hasAttribute(key);
  6583. expected = false;
  6584. } else {
  6585. if (el.hasAttribute(key)) {
  6586. actual = el.getAttribute(key);
  6587. } else if (key === "value" && el.tagName === "TEXTAREA") {
  6588. actual = el.value;
  6589. } else {
  6590. actual = false;
  6591. }
  6592. expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
  6593. }
  6594. if (actual !== expected) {
  6595. mismatchType = `attribute`;
  6596. mismatchKey = key;
  6597. }
  6598. }
  6599. if (mismatchType) {
  6600. const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
  6601. const preSegment = `Hydration ${mismatchType} mismatch on`;
  6602. const postSegment = `
  6603. - rendered on server: ${format(actual)}
  6604. - expected on client: ${format(expected)}
  6605. Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  6606. You should fix the source of the mismatch.`;
  6607. {
  6608. warn$1(preSegment, el, postSegment);
  6609. }
  6610. return true;
  6611. }
  6612. return false;
  6613. }
  6614. function toClassSet(str) {
  6615. return new Set(str.trim().split(/\s+/));
  6616. }
  6617. function isSetEqual(a, b) {
  6618. if (a.size !== b.size) {
  6619. return false;
  6620. }
  6621. for (const s of a) {
  6622. if (!b.has(s)) {
  6623. return false;
  6624. }
  6625. }
  6626. return true;
  6627. }
  6628. function toStyleMap(str) {
  6629. const styleMap = /* @__PURE__ */ new Map();
  6630. for (const item of str.split(";")) {
  6631. let [key, value] = item.split(":");
  6632. key = key == null ? void 0 : key.trim();
  6633. value = value == null ? void 0 : value.trim();
  6634. if (key && value) {
  6635. styleMap.set(key, value);
  6636. }
  6637. }
  6638. return styleMap;
  6639. }
  6640. function isMapEqual(a, b) {
  6641. if (a.size !== b.size) {
  6642. return false;
  6643. }
  6644. for (const [key, value] of a) {
  6645. if (value !== b.get(key)) {
  6646. return false;
  6647. }
  6648. }
  6649. return true;
  6650. }
  6651. var supported;
  6652. var perf;
  6653. function startMeasure(instance, type) {
  6654. if (instance.appContext.config.performance && isSupported()) {
  6655. perf.mark(`vue-${type}-${instance.uid}`);
  6656. }
  6657. if (true) {
  6658. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  6659. }
  6660. }
  6661. function endMeasure(instance, type) {
  6662. if (instance.appContext.config.performance && isSupported()) {
  6663. const startTag = `vue-${type}-${instance.uid}`;
  6664. const endTag = startTag + `:end`;
  6665. perf.mark(endTag);
  6666. perf.measure(
  6667. `<${formatComponentName(instance, instance.type)}> ${type}`,
  6668. startTag,
  6669. endTag
  6670. );
  6671. perf.clearMarks(startTag);
  6672. perf.clearMarks(endTag);
  6673. }
  6674. if (true) {
  6675. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  6676. }
  6677. }
  6678. function isSupported() {
  6679. if (supported !== void 0) {
  6680. return supported;
  6681. }
  6682. if (typeof window !== "undefined" && window.performance) {
  6683. supported = true;
  6684. perf = window.performance;
  6685. } else {
  6686. supported = false;
  6687. }
  6688. return supported;
  6689. }
  6690. function initFeatureFlags() {
  6691. const needWarn = [];
  6692. if (typeof __VUE_OPTIONS_API__ !== "boolean") {
  6693. needWarn.push(`__VUE_OPTIONS_API__`);
  6694. getGlobalThis().__VUE_OPTIONS_API__ = true;
  6695. }
  6696. if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
  6697. needWarn.push(`__VUE_PROD_DEVTOOLS__`);
  6698. getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
  6699. }
  6700. if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
  6701. needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
  6702. getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
  6703. }
  6704. if (needWarn.length) {
  6705. const multi = needWarn.length > 1;
  6706. console.warn(
  6707. `Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
  6708. For more details, see https://link.vuejs.org/feature-flags.`
  6709. );
  6710. }
  6711. }
  6712. var queuePostRenderEffect = queueEffectWithSuspense;
  6713. function createRenderer(options) {
  6714. return baseCreateRenderer(options);
  6715. }
  6716. function createHydrationRenderer(options) {
  6717. return baseCreateRenderer(options, createHydrationFunctions);
  6718. }
  6719. function baseCreateRenderer(options, createHydrationFns) {
  6720. {
  6721. initFeatureFlags();
  6722. }
  6723. const target = getGlobalThis();
  6724. target.__VUE__ = true;
  6725. if (true) {
  6726. setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  6727. }
  6728. const {
  6729. insert: hostInsert,
  6730. remove: hostRemove,
  6731. patchProp: hostPatchProp,
  6732. createElement: hostCreateElement,
  6733. createText: hostCreateText,
  6734. createComment: hostCreateComment,
  6735. setText: hostSetText,
  6736. setElementText: hostSetElementText,
  6737. parentNode: hostParentNode,
  6738. nextSibling: hostNextSibling,
  6739. setScopeId: hostSetScopeId = NOOP,
  6740. insertStaticContent: hostInsertStaticContent
  6741. } = options;
  6742. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
  6743. if (n1 === n2) {
  6744. return;
  6745. }
  6746. if (n1 && !isSameVNodeType(n1, n2)) {
  6747. anchor = getNextHostNode(n1);
  6748. unmount(n1, parentComponent, parentSuspense, true);
  6749. n1 = null;
  6750. }
  6751. if (n2.patchFlag === -2) {
  6752. optimized = false;
  6753. n2.dynamicChildren = null;
  6754. }
  6755. const { type, ref: ref2, shapeFlag } = n2;
  6756. switch (type) {
  6757. case Text:
  6758. processText(n1, n2, container, anchor);
  6759. break;
  6760. case Comment:
  6761. processCommentNode(n1, n2, container, anchor);
  6762. break;
  6763. case Static:
  6764. if (n1 == null) {
  6765. mountStaticNode(n2, container, anchor, namespace);
  6766. } else if (true) {
  6767. patchStaticNode(n1, n2, container, namespace);
  6768. }
  6769. break;
  6770. case Fragment:
  6771. processFragment(
  6772. n1,
  6773. n2,
  6774. container,
  6775. anchor,
  6776. parentComponent,
  6777. parentSuspense,
  6778. namespace,
  6779. slotScopeIds,
  6780. optimized
  6781. );
  6782. break;
  6783. default:
  6784. if (shapeFlag & 1) {
  6785. processElement(
  6786. n1,
  6787. n2,
  6788. container,
  6789. anchor,
  6790. parentComponent,
  6791. parentSuspense,
  6792. namespace,
  6793. slotScopeIds,
  6794. optimized
  6795. );
  6796. } else if (shapeFlag & 6) {
  6797. processComponent(
  6798. n1,
  6799. n2,
  6800. container,
  6801. anchor,
  6802. parentComponent,
  6803. parentSuspense,
  6804. namespace,
  6805. slotScopeIds,
  6806. optimized
  6807. );
  6808. } else if (shapeFlag & 64) {
  6809. type.process(
  6810. n1,
  6811. n2,
  6812. container,
  6813. anchor,
  6814. parentComponent,
  6815. parentSuspense,
  6816. namespace,
  6817. slotScopeIds,
  6818. optimized,
  6819. internals
  6820. );
  6821. } else if (shapeFlag & 128) {
  6822. type.process(
  6823. n1,
  6824. n2,
  6825. container,
  6826. anchor,
  6827. parentComponent,
  6828. parentSuspense,
  6829. namespace,
  6830. slotScopeIds,
  6831. optimized,
  6832. internals
  6833. );
  6834. } else if (true) {
  6835. warn$1("Invalid VNode type:", type, `(${typeof type})`);
  6836. }
  6837. }
  6838. if (ref2 != null && parentComponent) {
  6839. setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  6840. }
  6841. };
  6842. const processText = (n1, n2, container, anchor) => {
  6843. if (n1 == null) {
  6844. hostInsert(
  6845. n2.el = hostCreateText(n2.children),
  6846. container,
  6847. anchor
  6848. );
  6849. } else {
  6850. const el = n2.el = n1.el;
  6851. if (n2.children !== n1.children) {
  6852. hostSetText(el, n2.children);
  6853. }
  6854. }
  6855. };
  6856. const processCommentNode = (n1, n2, container, anchor) => {
  6857. if (n1 == null) {
  6858. hostInsert(
  6859. n2.el = hostCreateComment(n2.children || ""),
  6860. container,
  6861. anchor
  6862. );
  6863. } else {
  6864. n2.el = n1.el;
  6865. }
  6866. };
  6867. const mountStaticNode = (n2, container, anchor, namespace) => {
  6868. [n2.el, n2.anchor] = hostInsertStaticContent(
  6869. n2.children,
  6870. container,
  6871. anchor,
  6872. namespace,
  6873. n2.el,
  6874. n2.anchor
  6875. );
  6876. };
  6877. const patchStaticNode = (n1, n2, container, namespace) => {
  6878. if (n2.children !== n1.children) {
  6879. const anchor = hostNextSibling(n1.anchor);
  6880. removeStaticNode(n1);
  6881. [n2.el, n2.anchor] = hostInsertStaticContent(
  6882. n2.children,
  6883. container,
  6884. anchor,
  6885. namespace
  6886. );
  6887. } else {
  6888. n2.el = n1.el;
  6889. n2.anchor = n1.anchor;
  6890. }
  6891. };
  6892. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  6893. let next;
  6894. while (el && el !== anchor) {
  6895. next = hostNextSibling(el);
  6896. hostInsert(el, container, nextSibling);
  6897. el = next;
  6898. }
  6899. hostInsert(anchor, container, nextSibling);
  6900. };
  6901. const removeStaticNode = ({ el, anchor }) => {
  6902. let next;
  6903. while (el && el !== anchor) {
  6904. next = hostNextSibling(el);
  6905. hostRemove(el);
  6906. el = next;
  6907. }
  6908. hostRemove(anchor);
  6909. };
  6910. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6911. if (n2.type === "svg") {
  6912. namespace = "svg";
  6913. } else if (n2.type === "math") {
  6914. namespace = "mathml";
  6915. }
  6916. if (n1 == null) {
  6917. mountElement(
  6918. n2,
  6919. container,
  6920. anchor,
  6921. parentComponent,
  6922. parentSuspense,
  6923. namespace,
  6924. slotScopeIds,
  6925. optimized
  6926. );
  6927. } else {
  6928. patchElement(
  6929. n1,
  6930. n2,
  6931. parentComponent,
  6932. parentSuspense,
  6933. namespace,
  6934. slotScopeIds,
  6935. optimized
  6936. );
  6937. }
  6938. };
  6939. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6940. let el;
  6941. let vnodeHook;
  6942. const { props, shapeFlag, transition, dirs } = vnode;
  6943. el = vnode.el = hostCreateElement(
  6944. vnode.type,
  6945. namespace,
  6946. props && props.is,
  6947. props
  6948. );
  6949. if (shapeFlag & 8) {
  6950. hostSetElementText(el, vnode.children);
  6951. } else if (shapeFlag & 16) {
  6952. mountChildren(
  6953. vnode.children,
  6954. el,
  6955. null,
  6956. parentComponent,
  6957. parentSuspense,
  6958. resolveChildrenNamespace(vnode, namespace),
  6959. slotScopeIds,
  6960. optimized
  6961. );
  6962. }
  6963. if (dirs) {
  6964. invokeDirectiveHook(vnode, null, parentComponent, "created");
  6965. }
  6966. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  6967. if (props) {
  6968. for (const key in props) {
  6969. if (key !== "value" && !isReservedProp(key)) {
  6970. hostPatchProp(
  6971. el,
  6972. key,
  6973. null,
  6974. props[key],
  6975. namespace,
  6976. vnode.children,
  6977. parentComponent,
  6978. parentSuspense,
  6979. unmountChildren
  6980. );
  6981. }
  6982. }
  6983. if ("value" in props) {
  6984. hostPatchProp(el, "value", null, props.value, namespace);
  6985. }
  6986. if (vnodeHook = props.onVnodeBeforeMount) {
  6987. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  6988. }
  6989. }
  6990. if (true) {
  6991. Object.defineProperty(el, "__vnode", {
  6992. value: vnode,
  6993. enumerable: false
  6994. });
  6995. Object.defineProperty(el, "__vueParentComponent", {
  6996. value: parentComponent,
  6997. enumerable: false
  6998. });
  6999. }
  7000. if (dirs) {
  7001. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  7002. }
  7003. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  7004. if (needCallTransitionHooks) {
  7005. transition.beforeEnter(el);
  7006. }
  7007. hostInsert(el, container, anchor);
  7008. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
  7009. queuePostRenderEffect(() => {
  7010. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7011. needCallTransitionHooks && transition.enter(el);
  7012. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  7013. }, parentSuspense);
  7014. }
  7015. };
  7016. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  7017. if (scopeId) {
  7018. hostSetScopeId(el, scopeId);
  7019. }
  7020. if (slotScopeIds) {
  7021. for (let i = 0; i < slotScopeIds.length; i++) {
  7022. hostSetScopeId(el, slotScopeIds[i]);
  7023. }
  7024. }
  7025. if (parentComponent) {
  7026. let subTree = parentComponent.subTree;
  7027. if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
  7028. subTree = filterSingleRoot(subTree.children) || subTree;
  7029. }
  7030. if (vnode === subTree) {
  7031. const parentVNode = parentComponent.vnode;
  7032. setScopeId(
  7033. el,
  7034. parentVNode,
  7035. parentVNode.scopeId,
  7036. parentVNode.slotScopeIds,
  7037. parentComponent.parent
  7038. );
  7039. }
  7040. }
  7041. };
  7042. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
  7043. for (let i = start; i < children.length; i++) {
  7044. const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
  7045. patch(
  7046. null,
  7047. child,
  7048. container,
  7049. anchor,
  7050. parentComponent,
  7051. parentSuspense,
  7052. namespace,
  7053. slotScopeIds,
  7054. optimized
  7055. );
  7056. }
  7057. };
  7058. const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7059. const el = n2.el = n1.el;
  7060. let { patchFlag, dynamicChildren, dirs } = n2;
  7061. patchFlag |= n1.patchFlag & 16;
  7062. const oldProps = n1.props || EMPTY_OBJ;
  7063. const newProps = n2.props || EMPTY_OBJ;
  7064. let vnodeHook;
  7065. parentComponent && toggleRecurse(parentComponent, false);
  7066. if (vnodeHook = newProps.onVnodeBeforeUpdate) {
  7067. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  7068. }
  7069. if (dirs) {
  7070. invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  7071. }
  7072. parentComponent && toggleRecurse(parentComponent, true);
  7073. if (isHmrUpdating) {
  7074. patchFlag = 0;
  7075. optimized = false;
  7076. dynamicChildren = null;
  7077. }
  7078. if (dynamicChildren) {
  7079. patchBlockChildren(
  7080. n1.dynamicChildren,
  7081. dynamicChildren,
  7082. el,
  7083. parentComponent,
  7084. parentSuspense,
  7085. resolveChildrenNamespace(n2, namespace),
  7086. slotScopeIds
  7087. );
  7088. if (true) {
  7089. traverseStaticChildren(n1, n2);
  7090. }
  7091. } else if (!optimized) {
  7092. patchChildren(
  7093. n1,
  7094. n2,
  7095. el,
  7096. null,
  7097. parentComponent,
  7098. parentSuspense,
  7099. resolveChildrenNamespace(n2, namespace),
  7100. slotScopeIds,
  7101. false
  7102. );
  7103. }
  7104. if (patchFlag > 0) {
  7105. if (patchFlag & 16) {
  7106. patchProps(
  7107. el,
  7108. n2,
  7109. oldProps,
  7110. newProps,
  7111. parentComponent,
  7112. parentSuspense,
  7113. namespace
  7114. );
  7115. } else {
  7116. if (patchFlag & 2) {
  7117. if (oldProps.class !== newProps.class) {
  7118. hostPatchProp(el, "class", null, newProps.class, namespace);
  7119. }
  7120. }
  7121. if (patchFlag & 4) {
  7122. hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
  7123. }
  7124. if (patchFlag & 8) {
  7125. const propsToUpdate = n2.dynamicProps;
  7126. for (let i = 0; i < propsToUpdate.length; i++) {
  7127. const key = propsToUpdate[i];
  7128. const prev = oldProps[key];
  7129. const next = newProps[key];
  7130. if (next !== prev || key === "value") {
  7131. hostPatchProp(
  7132. el,
  7133. key,
  7134. prev,
  7135. next,
  7136. namespace,
  7137. n1.children,
  7138. parentComponent,
  7139. parentSuspense,
  7140. unmountChildren
  7141. );
  7142. }
  7143. }
  7144. }
  7145. }
  7146. if (patchFlag & 1) {
  7147. if (n1.children !== n2.children) {
  7148. hostSetElementText(el, n2.children);
  7149. }
  7150. }
  7151. } else if (!optimized && dynamicChildren == null) {
  7152. patchProps(
  7153. el,
  7154. n2,
  7155. oldProps,
  7156. newProps,
  7157. parentComponent,
  7158. parentSuspense,
  7159. namespace
  7160. );
  7161. }
  7162. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  7163. queuePostRenderEffect(() => {
  7164. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  7165. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  7166. }, parentSuspense);
  7167. }
  7168. };
  7169. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
  7170. for (let i = 0; i < newChildren.length; i++) {
  7171. const oldVNode = oldChildren[i];
  7172. const newVNode = newChildren[i];
  7173. const container = (
  7174. // oldVNode may be an errored async setup() component inside Suspense
  7175. // which will not have a mounted element
  7176. oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
  7177. // of the Fragment itself so it can move its children.
  7178. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
  7179. // which also requires the correct parent container
  7180. !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
  7181. oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
  7182. // In other cases, the parent container is not actually used so we
  7183. // just pass the block element here to avoid a DOM parentNode call.
  7184. fallbackContainer
  7185. )
  7186. );
  7187. patch(
  7188. oldVNode,
  7189. newVNode,
  7190. container,
  7191. null,
  7192. parentComponent,
  7193. parentSuspense,
  7194. namespace,
  7195. slotScopeIds,
  7196. true
  7197. );
  7198. }
  7199. };
  7200. const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
  7201. if (oldProps !== newProps) {
  7202. if (oldProps !== EMPTY_OBJ) {
  7203. for (const key in oldProps) {
  7204. if (!isReservedProp(key) && !(key in newProps)) {
  7205. hostPatchProp(
  7206. el,
  7207. key,
  7208. oldProps[key],
  7209. null,
  7210. namespace,
  7211. vnode.children,
  7212. parentComponent,
  7213. parentSuspense,
  7214. unmountChildren
  7215. );
  7216. }
  7217. }
  7218. }
  7219. for (const key in newProps) {
  7220. if (isReservedProp(key))
  7221. continue;
  7222. const next = newProps[key];
  7223. const prev = oldProps[key];
  7224. if (next !== prev && key !== "value") {
  7225. hostPatchProp(
  7226. el,
  7227. key,
  7228. prev,
  7229. next,
  7230. namespace,
  7231. vnode.children,
  7232. parentComponent,
  7233. parentSuspense,
  7234. unmountChildren
  7235. );
  7236. }
  7237. }
  7238. if ("value" in newProps) {
  7239. hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
  7240. }
  7241. }
  7242. };
  7243. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7244. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  7245. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  7246. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  7247. if (
  7248. // #5523 dev root fragment may inherit directives
  7249. isHmrUpdating || patchFlag & 2048
  7250. ) {
  7251. patchFlag = 0;
  7252. optimized = false;
  7253. dynamicChildren = null;
  7254. }
  7255. if (fragmentSlotScopeIds) {
  7256. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  7257. }
  7258. if (n1 == null) {
  7259. hostInsert(fragmentStartAnchor, container, anchor);
  7260. hostInsert(fragmentEndAnchor, container, anchor);
  7261. mountChildren(
  7262. // #10007
  7263. // such fragment like `<></>` will be compiled into
  7264. // a fragment which doesn't have a children.
  7265. // In this case fallback to an empty array
  7266. n2.children || [],
  7267. container,
  7268. fragmentEndAnchor,
  7269. parentComponent,
  7270. parentSuspense,
  7271. namespace,
  7272. slotScopeIds,
  7273. optimized
  7274. );
  7275. } else {
  7276. if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
  7277. // of renderSlot() with no valid children
  7278. n1.dynamicChildren) {
  7279. patchBlockChildren(
  7280. n1.dynamicChildren,
  7281. dynamicChildren,
  7282. container,
  7283. parentComponent,
  7284. parentSuspense,
  7285. namespace,
  7286. slotScopeIds
  7287. );
  7288. if (true) {
  7289. traverseStaticChildren(n1, n2);
  7290. } else if (
  7291. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  7292. // get moved around. Make sure all root level vnodes inherit el.
  7293. // #2134 or if it's a component root, it may also get moved around
  7294. // as the component is being moved.
  7295. n2.key != null || parentComponent && n2 === parentComponent.subTree
  7296. ) {
  7297. traverseStaticChildren(
  7298. n1,
  7299. n2,
  7300. true
  7301. /* shallow */
  7302. );
  7303. }
  7304. } else {
  7305. patchChildren(
  7306. n1,
  7307. n2,
  7308. container,
  7309. fragmentEndAnchor,
  7310. parentComponent,
  7311. parentSuspense,
  7312. namespace,
  7313. slotScopeIds,
  7314. optimized
  7315. );
  7316. }
  7317. }
  7318. };
  7319. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7320. n2.slotScopeIds = slotScopeIds;
  7321. if (n1 == null) {
  7322. if (n2.shapeFlag & 512) {
  7323. parentComponent.ctx.activate(
  7324. n2,
  7325. container,
  7326. anchor,
  7327. namespace,
  7328. optimized
  7329. );
  7330. } else {
  7331. mountComponent(
  7332. n2,
  7333. container,
  7334. anchor,
  7335. parentComponent,
  7336. parentSuspense,
  7337. namespace,
  7338. optimized
  7339. );
  7340. }
  7341. } else {
  7342. updateComponent(n1, n2, optimized);
  7343. }
  7344. };
  7345. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
  7346. const instance = initialVNode.component = createComponentInstance(
  7347. initialVNode,
  7348. parentComponent,
  7349. parentSuspense
  7350. );
  7351. if (instance.type.__hmrId) {
  7352. registerHMR(instance);
  7353. }
  7354. if (true) {
  7355. pushWarningContext(initialVNode);
  7356. startMeasure(instance, `mount`);
  7357. }
  7358. if (isKeepAlive(initialVNode)) {
  7359. instance.ctx.renderer = internals;
  7360. }
  7361. {
  7362. if (true) {
  7363. startMeasure(instance, `init`);
  7364. }
  7365. setupComponent(instance);
  7366. if (true) {
  7367. endMeasure(instance, `init`);
  7368. }
  7369. }
  7370. if (instance.asyncDep) {
  7371. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);
  7372. if (!initialVNode.el) {
  7373. const placeholder = instance.subTree = createVNode(Comment);
  7374. processCommentNode(null, placeholder, container, anchor);
  7375. }
  7376. } else {
  7377. setupRenderEffect(
  7378. instance,
  7379. initialVNode,
  7380. container,
  7381. anchor,
  7382. parentSuspense,
  7383. namespace,
  7384. optimized
  7385. );
  7386. }
  7387. if (true) {
  7388. popWarningContext();
  7389. endMeasure(instance, `mount`);
  7390. }
  7391. };
  7392. const updateComponent = (n1, n2, optimized) => {
  7393. const instance = n2.component = n1.component;
  7394. if (shouldUpdateComponent(n1, n2, optimized)) {
  7395. if (instance.asyncDep && !instance.asyncResolved) {
  7396. if (true) {
  7397. pushWarningContext(n2);
  7398. }
  7399. updateComponentPreRender(instance, n2, optimized);
  7400. if (true) {
  7401. popWarningContext();
  7402. }
  7403. return;
  7404. } else {
  7405. instance.next = n2;
  7406. invalidateJob(instance.update);
  7407. instance.effect.dirty = true;
  7408. instance.update();
  7409. }
  7410. } else {
  7411. n2.el = n1.el;
  7412. instance.vnode = n2;
  7413. }
  7414. };
  7415. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
  7416. const componentUpdateFn = () => {
  7417. if (!instance.isMounted) {
  7418. let vnodeHook;
  7419. const { el, props } = initialVNode;
  7420. const { bm, m, parent } = instance;
  7421. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  7422. toggleRecurse(instance, false);
  7423. if (bm) {
  7424. invokeArrayFns(bm);
  7425. }
  7426. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
  7427. invokeVNodeHook(vnodeHook, parent, initialVNode);
  7428. }
  7429. toggleRecurse(instance, true);
  7430. if (el && hydrateNode) {
  7431. const hydrateSubTree = () => {
  7432. if (true) {
  7433. startMeasure(instance, `render`);
  7434. }
  7435. instance.subTree = renderComponentRoot(instance);
  7436. if (true) {
  7437. endMeasure(instance, `render`);
  7438. }
  7439. if (true) {
  7440. startMeasure(instance, `hydrate`);
  7441. }
  7442. hydrateNode(
  7443. el,
  7444. instance.subTree,
  7445. instance,
  7446. parentSuspense,
  7447. null
  7448. );
  7449. if (true) {
  7450. endMeasure(instance, `hydrate`);
  7451. }
  7452. };
  7453. if (isAsyncWrapperVNode) {
  7454. initialVNode.type.__asyncLoader().then(
  7455. // note: we are moving the render call into an async callback,
  7456. // which means it won't track dependencies - but it's ok because
  7457. // a server-rendered async wrapper is already in resolved state
  7458. // and it will never need to change.
  7459. () => !instance.isUnmounted && hydrateSubTree()
  7460. );
  7461. } else {
  7462. hydrateSubTree();
  7463. }
  7464. } else {
  7465. if (true) {
  7466. startMeasure(instance, `render`);
  7467. }
  7468. const subTree = instance.subTree = renderComponentRoot(instance);
  7469. if (true) {
  7470. endMeasure(instance, `render`);
  7471. }
  7472. if (true) {
  7473. startMeasure(instance, `patch`);
  7474. }
  7475. patch(
  7476. null,
  7477. subTree,
  7478. container,
  7479. anchor,
  7480. instance,
  7481. parentSuspense,
  7482. namespace
  7483. );
  7484. if (true) {
  7485. endMeasure(instance, `patch`);
  7486. }
  7487. initialVNode.el = subTree.el;
  7488. }
  7489. if (m) {
  7490. queuePostRenderEffect(m, parentSuspense);
  7491. }
  7492. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  7493. const scopedInitialVNode = initialVNode;
  7494. queuePostRenderEffect(
  7495. () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
  7496. parentSuspense
  7497. );
  7498. }
  7499. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
  7500. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  7501. }
  7502. instance.isMounted = true;
  7503. if (true) {
  7504. devtoolsComponentAdded(instance);
  7505. }
  7506. initialVNode = container = anchor = null;
  7507. } else {
  7508. let { next, bu, u, parent, vnode } = instance;
  7509. {
  7510. const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
  7511. if (nonHydratedAsyncRoot) {
  7512. if (next) {
  7513. next.el = vnode.el;
  7514. updateComponentPreRender(instance, next, optimized);
  7515. }
  7516. nonHydratedAsyncRoot.asyncDep.then(() => {
  7517. if (!instance.isUnmounted) {
  7518. componentUpdateFn();
  7519. }
  7520. });
  7521. return;
  7522. }
  7523. }
  7524. let originNext = next;
  7525. let vnodeHook;
  7526. if (true) {
  7527. pushWarningContext(next || instance.vnode);
  7528. }
  7529. toggleRecurse(instance, false);
  7530. if (next) {
  7531. next.el = vnode.el;
  7532. updateComponentPreRender(instance, next, optimized);
  7533. } else {
  7534. next = vnode;
  7535. }
  7536. if (bu) {
  7537. invokeArrayFns(bu);
  7538. }
  7539. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
  7540. invokeVNodeHook(vnodeHook, parent, next, vnode);
  7541. }
  7542. toggleRecurse(instance, true);
  7543. if (true) {
  7544. startMeasure(instance, `render`);
  7545. }
  7546. const nextTree = renderComponentRoot(instance);
  7547. if (true) {
  7548. endMeasure(instance, `render`);
  7549. }
  7550. const prevTree = instance.subTree;
  7551. instance.subTree = nextTree;
  7552. if (true) {
  7553. startMeasure(instance, `patch`);
  7554. }
  7555. patch(
  7556. prevTree,
  7557. nextTree,
  7558. // parent may have changed if it's in a teleport
  7559. hostParentNode(prevTree.el),
  7560. // anchor may have changed if it's in a fragment
  7561. getNextHostNode(prevTree),
  7562. instance,
  7563. parentSuspense,
  7564. namespace
  7565. );
  7566. if (true) {
  7567. endMeasure(instance, `patch`);
  7568. }
  7569. next.el = nextTree.el;
  7570. if (originNext === null) {
  7571. updateHOCHostEl(instance, nextTree.el);
  7572. }
  7573. if (u) {
  7574. queuePostRenderEffect(u, parentSuspense);
  7575. }
  7576. if (vnodeHook = next.props && next.props.onVnodeUpdated) {
  7577. queuePostRenderEffect(
  7578. () => invokeVNodeHook(vnodeHook, parent, next, vnode),
  7579. parentSuspense
  7580. );
  7581. }
  7582. if (true) {
  7583. devtoolsComponentUpdated(instance);
  7584. }
  7585. if (true) {
  7586. popWarningContext();
  7587. }
  7588. }
  7589. };
  7590. const effect2 = instance.effect = new ReactiveEffect(
  7591. componentUpdateFn,
  7592. NOOP,
  7593. () => queueJob(update),
  7594. instance.scope
  7595. // track it in component's effect scope
  7596. );
  7597. const update = instance.update = () => {
  7598. if (effect2.dirty) {
  7599. effect2.run();
  7600. }
  7601. };
  7602. update.id = instance.uid;
  7603. toggleRecurse(instance, true);
  7604. if (true) {
  7605. effect2.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
  7606. effect2.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
  7607. update.ownerInstance = instance;
  7608. }
  7609. update();
  7610. };
  7611. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  7612. nextVNode.component = instance;
  7613. const prevProps = instance.vnode.props;
  7614. instance.vnode = nextVNode;
  7615. instance.next = null;
  7616. updateProps(instance, nextVNode.props, prevProps, optimized);
  7617. updateSlots(instance, nextVNode.children, optimized);
  7618. pauseTracking();
  7619. flushPreFlushCbs(instance);
  7620. resetTracking();
  7621. };
  7622. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
  7623. const c1 = n1 && n1.children;
  7624. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  7625. const c2 = n2.children;
  7626. const { patchFlag, shapeFlag } = n2;
  7627. if (patchFlag > 0) {
  7628. if (patchFlag & 128) {
  7629. patchKeyedChildren(
  7630. c1,
  7631. c2,
  7632. container,
  7633. anchor,
  7634. parentComponent,
  7635. parentSuspense,
  7636. namespace,
  7637. slotScopeIds,
  7638. optimized
  7639. );
  7640. return;
  7641. } else if (patchFlag & 256) {
  7642. patchUnkeyedChildren(
  7643. c1,
  7644. c2,
  7645. container,
  7646. anchor,
  7647. parentComponent,
  7648. parentSuspense,
  7649. namespace,
  7650. slotScopeIds,
  7651. optimized
  7652. );
  7653. return;
  7654. }
  7655. }
  7656. if (shapeFlag & 8) {
  7657. if (prevShapeFlag & 16) {
  7658. unmountChildren(c1, parentComponent, parentSuspense);
  7659. }
  7660. if (c2 !== c1) {
  7661. hostSetElementText(container, c2);
  7662. }
  7663. } else {
  7664. if (prevShapeFlag & 16) {
  7665. if (shapeFlag & 16) {
  7666. patchKeyedChildren(
  7667. c1,
  7668. c2,
  7669. container,
  7670. anchor,
  7671. parentComponent,
  7672. parentSuspense,
  7673. namespace,
  7674. slotScopeIds,
  7675. optimized
  7676. );
  7677. } else {
  7678. unmountChildren(c1, parentComponent, parentSuspense, true);
  7679. }
  7680. } else {
  7681. if (prevShapeFlag & 8) {
  7682. hostSetElementText(container, "");
  7683. }
  7684. if (shapeFlag & 16) {
  7685. mountChildren(
  7686. c2,
  7687. container,
  7688. anchor,
  7689. parentComponent,
  7690. parentSuspense,
  7691. namespace,
  7692. slotScopeIds,
  7693. optimized
  7694. );
  7695. }
  7696. }
  7697. }
  7698. };
  7699. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7700. c1 = c1 || EMPTY_ARR;
  7701. c2 = c2 || EMPTY_ARR;
  7702. const oldLength = c1.length;
  7703. const newLength = c2.length;
  7704. const commonLength = Math.min(oldLength, newLength);
  7705. let i;
  7706. for (i = 0; i < commonLength; i++) {
  7707. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7708. patch(
  7709. c1[i],
  7710. nextChild,
  7711. container,
  7712. null,
  7713. parentComponent,
  7714. parentSuspense,
  7715. namespace,
  7716. slotScopeIds,
  7717. optimized
  7718. );
  7719. }
  7720. if (oldLength > newLength) {
  7721. unmountChildren(
  7722. c1,
  7723. parentComponent,
  7724. parentSuspense,
  7725. true,
  7726. false,
  7727. commonLength
  7728. );
  7729. } else {
  7730. mountChildren(
  7731. c2,
  7732. container,
  7733. anchor,
  7734. parentComponent,
  7735. parentSuspense,
  7736. namespace,
  7737. slotScopeIds,
  7738. optimized,
  7739. commonLength
  7740. );
  7741. }
  7742. };
  7743. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7744. let i = 0;
  7745. const l2 = c2.length;
  7746. let e1 = c1.length - 1;
  7747. let e2 = l2 - 1;
  7748. while (i <= e1 && i <= e2) {
  7749. const n1 = c1[i];
  7750. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7751. if (isSameVNodeType(n1, n2)) {
  7752. patch(
  7753. n1,
  7754. n2,
  7755. container,
  7756. null,
  7757. parentComponent,
  7758. parentSuspense,
  7759. namespace,
  7760. slotScopeIds,
  7761. optimized
  7762. );
  7763. } else {
  7764. break;
  7765. }
  7766. i++;
  7767. }
  7768. while (i <= e1 && i <= e2) {
  7769. const n1 = c1[e1];
  7770. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  7771. if (isSameVNodeType(n1, n2)) {
  7772. patch(
  7773. n1,
  7774. n2,
  7775. container,
  7776. null,
  7777. parentComponent,
  7778. parentSuspense,
  7779. namespace,
  7780. slotScopeIds,
  7781. optimized
  7782. );
  7783. } else {
  7784. break;
  7785. }
  7786. e1--;
  7787. e2--;
  7788. }
  7789. if (i > e1) {
  7790. if (i <= e2) {
  7791. const nextPos = e2 + 1;
  7792. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  7793. while (i <= e2) {
  7794. patch(
  7795. null,
  7796. c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
  7797. container,
  7798. anchor,
  7799. parentComponent,
  7800. parentSuspense,
  7801. namespace,
  7802. slotScopeIds,
  7803. optimized
  7804. );
  7805. i++;
  7806. }
  7807. }
  7808. } else if (i > e2) {
  7809. while (i <= e1) {
  7810. unmount(c1[i], parentComponent, parentSuspense, true);
  7811. i++;
  7812. }
  7813. } else {
  7814. const s1 = i;
  7815. const s2 = i;
  7816. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  7817. for (i = s2; i <= e2; i++) {
  7818. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7819. if (nextChild.key != null) {
  7820. if (keyToNewIndexMap.has(nextChild.key)) {
  7821. warn$1(
  7822. `Duplicate keys found during update:`,
  7823. JSON.stringify(nextChild.key),
  7824. `Make sure keys are unique.`
  7825. );
  7826. }
  7827. keyToNewIndexMap.set(nextChild.key, i);
  7828. }
  7829. }
  7830. let j;
  7831. let patched = 0;
  7832. const toBePatched = e2 - s2 + 1;
  7833. let moved = false;
  7834. let maxNewIndexSoFar = 0;
  7835. const newIndexToOldIndexMap = new Array(toBePatched);
  7836. for (i = 0; i < toBePatched; i++)
  7837. newIndexToOldIndexMap[i] = 0;
  7838. for (i = s1; i <= e1; i++) {
  7839. const prevChild = c1[i];
  7840. if (patched >= toBePatched) {
  7841. unmount(prevChild, parentComponent, parentSuspense, true);
  7842. continue;
  7843. }
  7844. let newIndex;
  7845. if (prevChild.key != null) {
  7846. newIndex = keyToNewIndexMap.get(prevChild.key);
  7847. } else {
  7848. for (j = s2; j <= e2; j++) {
  7849. if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  7850. newIndex = j;
  7851. break;
  7852. }
  7853. }
  7854. }
  7855. if (newIndex === void 0) {
  7856. unmount(prevChild, parentComponent, parentSuspense, true);
  7857. } else {
  7858. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  7859. if (newIndex >= maxNewIndexSoFar) {
  7860. maxNewIndexSoFar = newIndex;
  7861. } else {
  7862. moved = true;
  7863. }
  7864. patch(
  7865. prevChild,
  7866. c2[newIndex],
  7867. container,
  7868. null,
  7869. parentComponent,
  7870. parentSuspense,
  7871. namespace,
  7872. slotScopeIds,
  7873. optimized
  7874. );
  7875. patched++;
  7876. }
  7877. }
  7878. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  7879. j = increasingNewIndexSequence.length - 1;
  7880. for (i = toBePatched - 1; i >= 0; i--) {
  7881. const nextIndex = s2 + i;
  7882. const nextChild = c2[nextIndex];
  7883. const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
  7884. if (newIndexToOldIndexMap[i] === 0) {
  7885. patch(
  7886. null,
  7887. nextChild,
  7888. container,
  7889. anchor,
  7890. parentComponent,
  7891. parentSuspense,
  7892. namespace,
  7893. slotScopeIds,
  7894. optimized
  7895. );
  7896. } else if (moved) {
  7897. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  7898. move(nextChild, container, anchor, 2);
  7899. } else {
  7900. j--;
  7901. }
  7902. }
  7903. }
  7904. }
  7905. };
  7906. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  7907. const { el, type, transition, children, shapeFlag } = vnode;
  7908. if (shapeFlag & 6) {
  7909. move(vnode.component.subTree, container, anchor, moveType);
  7910. return;
  7911. }
  7912. if (shapeFlag & 128) {
  7913. vnode.suspense.move(container, anchor, moveType);
  7914. return;
  7915. }
  7916. if (shapeFlag & 64) {
  7917. type.move(vnode, container, anchor, internals);
  7918. return;
  7919. }
  7920. if (type === Fragment) {
  7921. hostInsert(el, container, anchor);
  7922. for (let i = 0; i < children.length; i++) {
  7923. move(children[i], container, anchor, moveType);
  7924. }
  7925. hostInsert(vnode.anchor, container, anchor);
  7926. return;
  7927. }
  7928. if (type === Static) {
  7929. moveStaticNode(vnode, container, anchor);
  7930. return;
  7931. }
  7932. const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
  7933. if (needTransition2) {
  7934. if (moveType === 0) {
  7935. transition.beforeEnter(el);
  7936. hostInsert(el, container, anchor);
  7937. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  7938. } else {
  7939. const { leave, delayLeave, afterLeave } = transition;
  7940. const remove22 = () => hostInsert(el, container, anchor);
  7941. const performLeave = () => {
  7942. leave(el, () => {
  7943. remove22();
  7944. afterLeave && afterLeave();
  7945. });
  7946. };
  7947. if (delayLeave) {
  7948. delayLeave(el, remove22, performLeave);
  7949. } else {
  7950. performLeave();
  7951. }
  7952. }
  7953. } else {
  7954. hostInsert(el, container, anchor);
  7955. }
  7956. };
  7957. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  7958. const {
  7959. type,
  7960. props,
  7961. ref: ref2,
  7962. children,
  7963. dynamicChildren,
  7964. shapeFlag,
  7965. patchFlag,
  7966. dirs
  7967. } = vnode;
  7968. if (ref2 != null) {
  7969. setRef(ref2, null, parentSuspense, vnode, true);
  7970. }
  7971. if (shapeFlag & 256) {
  7972. parentComponent.ctx.deactivate(vnode);
  7973. return;
  7974. }
  7975. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  7976. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  7977. let vnodeHook;
  7978. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  7979. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7980. }
  7981. if (shapeFlag & 6) {
  7982. unmountComponent(vnode.component, parentSuspense, doRemove);
  7983. } else {
  7984. if (shapeFlag & 128) {
  7985. vnode.suspense.unmount(parentSuspense, doRemove);
  7986. return;
  7987. }
  7988. if (shouldInvokeDirs) {
  7989. invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  7990. }
  7991. if (shapeFlag & 64) {
  7992. vnode.type.remove(
  7993. vnode,
  7994. parentComponent,
  7995. parentSuspense,
  7996. optimized,
  7997. internals,
  7998. doRemove
  7999. );
  8000. } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments
  8001. (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
  8002. unmountChildren(
  8003. dynamicChildren,
  8004. parentComponent,
  8005. parentSuspense,
  8006. false,
  8007. true
  8008. );
  8009. } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
  8010. unmountChildren(children, parentComponent, parentSuspense);
  8011. }
  8012. if (doRemove) {
  8013. remove2(vnode);
  8014. }
  8015. }
  8016. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
  8017. queuePostRenderEffect(() => {
  8018. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  8019. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  8020. }, parentSuspense);
  8021. }
  8022. };
  8023. const remove2 = (vnode) => {
  8024. const { type, el, anchor, transition } = vnode;
  8025. if (type === Fragment) {
  8026. if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
  8027. vnode.children.forEach((child) => {
  8028. if (child.type === Comment) {
  8029. hostRemove(child.el);
  8030. } else {
  8031. remove2(child);
  8032. }
  8033. });
  8034. } else {
  8035. removeFragment(el, anchor);
  8036. }
  8037. return;
  8038. }
  8039. if (type === Static) {
  8040. removeStaticNode(vnode);
  8041. return;
  8042. }
  8043. const performRemove = () => {
  8044. hostRemove(el);
  8045. if (transition && !transition.persisted && transition.afterLeave) {
  8046. transition.afterLeave();
  8047. }
  8048. };
  8049. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  8050. const { leave, delayLeave } = transition;
  8051. const performLeave = () => leave(el, performRemove);
  8052. if (delayLeave) {
  8053. delayLeave(vnode.el, performRemove, performLeave);
  8054. } else {
  8055. performLeave();
  8056. }
  8057. } else {
  8058. performRemove();
  8059. }
  8060. };
  8061. const removeFragment = (cur, end) => {
  8062. let next;
  8063. while (cur !== end) {
  8064. next = hostNextSibling(cur);
  8065. hostRemove(cur);
  8066. cur = next;
  8067. }
  8068. hostRemove(end);
  8069. };
  8070. const unmountComponent = (instance, parentSuspense, doRemove) => {
  8071. if (instance.type.__hmrId) {
  8072. unregisterHMR(instance);
  8073. }
  8074. const { bum, scope, update, subTree, um } = instance;
  8075. if (bum) {
  8076. invokeArrayFns(bum);
  8077. }
  8078. scope.stop();
  8079. if (update) {
  8080. update.active = false;
  8081. unmount(subTree, instance, parentSuspense, doRemove);
  8082. }
  8083. if (um) {
  8084. queuePostRenderEffect(um, parentSuspense);
  8085. }
  8086. queuePostRenderEffect(() => {
  8087. instance.isUnmounted = true;
  8088. }, parentSuspense);
  8089. if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
  8090. parentSuspense.deps--;
  8091. if (parentSuspense.deps === 0) {
  8092. parentSuspense.resolve();
  8093. }
  8094. }
  8095. if (true) {
  8096. devtoolsComponentRemoved(instance);
  8097. }
  8098. };
  8099. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  8100. for (let i = start; i < children.length; i++) {
  8101. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  8102. }
  8103. };
  8104. const getNextHostNode = (vnode) => {
  8105. if (vnode.shapeFlag & 6) {
  8106. return getNextHostNode(vnode.component.subTree);
  8107. }
  8108. if (vnode.shapeFlag & 128) {
  8109. return vnode.suspense.next();
  8110. }
  8111. return hostNextSibling(vnode.anchor || vnode.el);
  8112. };
  8113. let isFlushing2 = false;
  8114. const render2 = (vnode, container, namespace) => {
  8115. if (vnode == null) {
  8116. if (container._vnode) {
  8117. unmount(container._vnode, null, null, true);
  8118. }
  8119. } else {
  8120. patch(
  8121. container._vnode || null,
  8122. vnode,
  8123. container,
  8124. null,
  8125. null,
  8126. null,
  8127. namespace
  8128. );
  8129. }
  8130. if (!isFlushing2) {
  8131. isFlushing2 = true;
  8132. flushPreFlushCbs();
  8133. flushPostFlushCbs();
  8134. isFlushing2 = false;
  8135. }
  8136. container._vnode = vnode;
  8137. };
  8138. const internals = {
  8139. p: patch,
  8140. um: unmount,
  8141. m: move,
  8142. r: remove2,
  8143. mt: mountComponent,
  8144. mc: mountChildren,
  8145. pc: patchChildren,
  8146. pbc: patchBlockChildren,
  8147. n: getNextHostNode,
  8148. o: options
  8149. };
  8150. let hydrate2;
  8151. let hydrateNode;
  8152. if (createHydrationFns) {
  8153. [hydrate2, hydrateNode] = createHydrationFns(
  8154. internals
  8155. );
  8156. }
  8157. return {
  8158. render: render2,
  8159. hydrate: hydrate2,
  8160. createApp: createAppAPI(render2, hydrate2)
  8161. };
  8162. }
  8163. function resolveChildrenNamespace({ type, props }, currentNamespace) {
  8164. return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
  8165. }
  8166. function toggleRecurse({ effect: effect2, update }, allowed) {
  8167. effect2.allowRecurse = update.allowRecurse = allowed;
  8168. }
  8169. function needTransition(parentSuspense, transition) {
  8170. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  8171. }
  8172. function traverseStaticChildren(n1, n2, shallow = false) {
  8173. const ch1 = n1.children;
  8174. const ch2 = n2.children;
  8175. if (isArray(ch1) && isArray(ch2)) {
  8176. for (let i = 0; i < ch1.length; i++) {
  8177. const c1 = ch1[i];
  8178. let c2 = ch2[i];
  8179. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  8180. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  8181. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  8182. c2.el = c1.el;
  8183. }
  8184. if (!shallow)
  8185. traverseStaticChildren(c1, c2);
  8186. }
  8187. if (c2.type === Text) {
  8188. c2.el = c1.el;
  8189. }
  8190. if (c2.type === Comment && !c2.el) {
  8191. c2.el = c1.el;
  8192. }
  8193. }
  8194. }
  8195. }
  8196. function getSequence(arr) {
  8197. const p2 = arr.slice();
  8198. const result = [0];
  8199. let i, j, u, v, c;
  8200. const len = arr.length;
  8201. for (i = 0; i < len; i++) {
  8202. const arrI = arr[i];
  8203. if (arrI !== 0) {
  8204. j = result[result.length - 1];
  8205. if (arr[j] < arrI) {
  8206. p2[i] = j;
  8207. result.push(i);
  8208. continue;
  8209. }
  8210. u = 0;
  8211. v = result.length - 1;
  8212. while (u < v) {
  8213. c = u + v >> 1;
  8214. if (arr[result[c]] < arrI) {
  8215. u = c + 1;
  8216. } else {
  8217. v = c;
  8218. }
  8219. }
  8220. if (arrI < arr[result[u]]) {
  8221. if (u > 0) {
  8222. p2[i] = result[u - 1];
  8223. }
  8224. result[u] = i;
  8225. }
  8226. }
  8227. }
  8228. u = result.length;
  8229. v = result[u - 1];
  8230. while (u-- > 0) {
  8231. result[u] = v;
  8232. v = p2[v];
  8233. }
  8234. return result;
  8235. }
  8236. function locateNonHydratedAsyncRoot(instance) {
  8237. const subComponent = instance.subTree.component;
  8238. if (subComponent) {
  8239. if (subComponent.asyncDep && !subComponent.asyncResolved) {
  8240. return subComponent;
  8241. } else {
  8242. return locateNonHydratedAsyncRoot(subComponent);
  8243. }
  8244. }
  8245. }
  8246. var isTeleport = (type) => type.__isTeleport;
  8247. var isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  8248. var isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  8249. var isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
  8250. var resolveTarget = (props, select) => {
  8251. const targetSelector = props && props.to;
  8252. if (isString(targetSelector)) {
  8253. if (!select) {
  8254. warn$1(
  8255. `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
  8256. );
  8257. return null;
  8258. } else {
  8259. const target = select(targetSelector);
  8260. if (!target) {
  8261. warn$1(
  8262. `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
  8263. );
  8264. }
  8265. return target;
  8266. }
  8267. } else {
  8268. if (!targetSelector && !isTeleportDisabled(props)) {
  8269. warn$1(`Invalid Teleport target: ${targetSelector}`);
  8270. }
  8271. return targetSelector;
  8272. }
  8273. };
  8274. var TeleportImpl = {
  8275. name: "Teleport",
  8276. __isTeleport: true,
  8277. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
  8278. const {
  8279. mc: mountChildren,
  8280. pc: patchChildren,
  8281. pbc: patchBlockChildren,
  8282. o: { insert, querySelector, createText, createComment }
  8283. } = internals;
  8284. const disabled = isTeleportDisabled(n2.props);
  8285. let { shapeFlag, children, dynamicChildren } = n2;
  8286. if (isHmrUpdating) {
  8287. optimized = false;
  8288. dynamicChildren = null;
  8289. }
  8290. if (n1 == null) {
  8291. const placeholder = n2.el = true ? createComment("teleport start") : createText("");
  8292. const mainAnchor = n2.anchor = true ? createComment("teleport end") : createText("");
  8293. insert(placeholder, container, anchor);
  8294. insert(mainAnchor, container, anchor);
  8295. const target = n2.target = resolveTarget(n2.props, querySelector);
  8296. const targetAnchor = n2.targetAnchor = createText("");
  8297. if (target) {
  8298. insert(targetAnchor, target);
  8299. if (namespace === "svg" || isTargetSVG(target)) {
  8300. namespace = "svg";
  8301. } else if (namespace === "mathml" || isTargetMathML(target)) {
  8302. namespace = "mathml";
  8303. }
  8304. } else if (!disabled) {
  8305. warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
  8306. }
  8307. const mount = (container2, anchor2) => {
  8308. if (shapeFlag & 16) {
  8309. mountChildren(
  8310. children,
  8311. container2,
  8312. anchor2,
  8313. parentComponent,
  8314. parentSuspense,
  8315. namespace,
  8316. slotScopeIds,
  8317. optimized
  8318. );
  8319. }
  8320. };
  8321. if (disabled) {
  8322. mount(container, mainAnchor);
  8323. } else if (target) {
  8324. mount(target, targetAnchor);
  8325. }
  8326. } else {
  8327. n2.el = n1.el;
  8328. const mainAnchor = n2.anchor = n1.anchor;
  8329. const target = n2.target = n1.target;
  8330. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  8331. const wasDisabled = isTeleportDisabled(n1.props);
  8332. const currentContainer = wasDisabled ? container : target;
  8333. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  8334. if (namespace === "svg" || isTargetSVG(target)) {
  8335. namespace = "svg";
  8336. } else if (namespace === "mathml" || isTargetMathML(target)) {
  8337. namespace = "mathml";
  8338. }
  8339. if (dynamicChildren) {
  8340. patchBlockChildren(
  8341. n1.dynamicChildren,
  8342. dynamicChildren,
  8343. currentContainer,
  8344. parentComponent,
  8345. parentSuspense,
  8346. namespace,
  8347. slotScopeIds
  8348. );
  8349. traverseStaticChildren(n1, n2, true);
  8350. } else if (!optimized) {
  8351. patchChildren(
  8352. n1,
  8353. n2,
  8354. currentContainer,
  8355. currentAnchor,
  8356. parentComponent,
  8357. parentSuspense,
  8358. namespace,
  8359. slotScopeIds,
  8360. false
  8361. );
  8362. }
  8363. if (disabled) {
  8364. if (!wasDisabled) {
  8365. moveTeleport(
  8366. n2,
  8367. container,
  8368. mainAnchor,
  8369. internals,
  8370. 1
  8371. );
  8372. } else {
  8373. if (n2.props && n1.props && n2.props.to !== n1.props.to) {
  8374. n2.props.to = n1.props.to;
  8375. }
  8376. }
  8377. } else {
  8378. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  8379. const nextTarget = n2.target = resolveTarget(
  8380. n2.props,
  8381. querySelector
  8382. );
  8383. if (nextTarget) {
  8384. moveTeleport(
  8385. n2,
  8386. nextTarget,
  8387. null,
  8388. internals,
  8389. 0
  8390. );
  8391. } else if (true) {
  8392. warn$1(
  8393. "Invalid Teleport target on update:",
  8394. target,
  8395. `(${typeof target})`
  8396. );
  8397. }
  8398. } else if (wasDisabled) {
  8399. moveTeleport(
  8400. n2,
  8401. target,
  8402. targetAnchor,
  8403. internals,
  8404. 1
  8405. );
  8406. }
  8407. }
  8408. }
  8409. updateCssVars(n2);
  8410. },
  8411. remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  8412. const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
  8413. if (target) {
  8414. hostRemove(targetAnchor);
  8415. }
  8416. doRemove && hostRemove(anchor);
  8417. if (shapeFlag & 16) {
  8418. const shouldRemove = doRemove || !isTeleportDisabled(props);
  8419. for (let i = 0; i < children.length; i++) {
  8420. const child = children[i];
  8421. unmount(
  8422. child,
  8423. parentComponent,
  8424. parentSuspense,
  8425. shouldRemove,
  8426. !!child.dynamicChildren
  8427. );
  8428. }
  8429. }
  8430. },
  8431. move: moveTeleport,
  8432. hydrate: hydrateTeleport
  8433. };
  8434. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  8435. if (moveType === 0) {
  8436. insert(vnode.targetAnchor, container, parentAnchor);
  8437. }
  8438. const { el, anchor, shapeFlag, children, props } = vnode;
  8439. const isReorder = moveType === 2;
  8440. if (isReorder) {
  8441. insert(el, container, parentAnchor);
  8442. }
  8443. if (!isReorder || isTeleportDisabled(props)) {
  8444. if (shapeFlag & 16) {
  8445. for (let i = 0; i < children.length; i++) {
  8446. move(
  8447. children[i],
  8448. container,
  8449. parentAnchor,
  8450. 2
  8451. );
  8452. }
  8453. }
  8454. }
  8455. if (isReorder) {
  8456. insert(anchor, container, parentAnchor);
  8457. }
  8458. }
  8459. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
  8460. o: { nextSibling, parentNode, querySelector }
  8461. }, hydrateChildren) {
  8462. const target = vnode.target = resolveTarget(
  8463. vnode.props,
  8464. querySelector
  8465. );
  8466. if (target) {
  8467. const targetNode = target._lpa || target.firstChild;
  8468. if (vnode.shapeFlag & 16) {
  8469. if (isTeleportDisabled(vnode.props)) {
  8470. vnode.anchor = hydrateChildren(
  8471. nextSibling(node),
  8472. vnode,
  8473. parentNode(node),
  8474. parentComponent,
  8475. parentSuspense,
  8476. slotScopeIds,
  8477. optimized
  8478. );
  8479. vnode.targetAnchor = targetNode;
  8480. } else {
  8481. vnode.anchor = nextSibling(node);
  8482. let targetAnchor = targetNode;
  8483. while (targetAnchor) {
  8484. targetAnchor = nextSibling(targetAnchor);
  8485. if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
  8486. vnode.targetAnchor = targetAnchor;
  8487. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  8488. break;
  8489. }
  8490. }
  8491. hydrateChildren(
  8492. targetNode,
  8493. vnode,
  8494. target,
  8495. parentComponent,
  8496. parentSuspense,
  8497. slotScopeIds,
  8498. optimized
  8499. );
  8500. }
  8501. }
  8502. updateCssVars(vnode);
  8503. }
  8504. return vnode.anchor && nextSibling(vnode.anchor);
  8505. }
  8506. var Teleport = TeleportImpl;
  8507. function updateCssVars(vnode) {
  8508. const ctx = vnode.ctx;
  8509. if (ctx && ctx.ut) {
  8510. let node = vnode.children[0].el;
  8511. while (node && node !== vnode.targetAnchor) {
  8512. if (node.nodeType === 1)
  8513. node.setAttribute("data-v-owner", ctx.uid);
  8514. node = node.nextSibling;
  8515. }
  8516. ctx.ut();
  8517. }
  8518. }
  8519. var Fragment = Symbol.for("v-fgt");
  8520. var Text = Symbol.for("v-txt");
  8521. var Comment = Symbol.for("v-cmt");
  8522. var Static = Symbol.for("v-stc");
  8523. var blockStack = [];
  8524. var currentBlock = null;
  8525. function openBlock(disableTracking = false) {
  8526. blockStack.push(currentBlock = disableTracking ? null : []);
  8527. }
  8528. function closeBlock() {
  8529. blockStack.pop();
  8530. currentBlock = blockStack[blockStack.length - 1] || null;
  8531. }
  8532. var isBlockTreeEnabled = 1;
  8533. function setBlockTracking(value) {
  8534. isBlockTreeEnabled += value;
  8535. }
  8536. function setupBlock(vnode) {
  8537. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  8538. closeBlock();
  8539. if (isBlockTreeEnabled > 0 && currentBlock) {
  8540. currentBlock.push(vnode);
  8541. }
  8542. return vnode;
  8543. }
  8544. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  8545. return setupBlock(
  8546. createBaseVNode(
  8547. type,
  8548. props,
  8549. children,
  8550. patchFlag,
  8551. dynamicProps,
  8552. shapeFlag,
  8553. true
  8554. )
  8555. );
  8556. }
  8557. function createBlock(type, props, children, patchFlag, dynamicProps) {
  8558. return setupBlock(
  8559. createVNode(
  8560. type,
  8561. props,
  8562. children,
  8563. patchFlag,
  8564. dynamicProps,
  8565. true
  8566. )
  8567. );
  8568. }
  8569. function isVNode(value) {
  8570. return value ? value.__v_isVNode === true : false;
  8571. }
  8572. function isSameVNodeType(n1, n2) {
  8573. if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) {
  8574. n1.shapeFlag &= ~256;
  8575. n2.shapeFlag &= ~512;
  8576. return false;
  8577. }
  8578. return n1.type === n2.type && n1.key === n2.key;
  8579. }
  8580. var vnodeArgsTransformer;
  8581. function transformVNodeArgs(transformer) {
  8582. vnodeArgsTransformer = transformer;
  8583. }
  8584. var createVNodeWithArgsTransform = (...args) => {
  8585. return _createVNode(
  8586. ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
  8587. );
  8588. };
  8589. var normalizeKey = ({ key }) => key != null ? key : null;
  8590. var normalizeRef = ({
  8591. ref: ref2,
  8592. ref_key,
  8593. ref_for
  8594. }) => {
  8595. if (typeof ref2 === "number") {
  8596. ref2 = "" + ref2;
  8597. }
  8598. return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
  8599. };
  8600. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  8601. const vnode = {
  8602. __v_isVNode: true,
  8603. __v_skip: true,
  8604. type,
  8605. props,
  8606. key: props && normalizeKey(props),
  8607. ref: props && normalizeRef(props),
  8608. scopeId: currentScopeId,
  8609. slotScopeIds: null,
  8610. children,
  8611. component: null,
  8612. suspense: null,
  8613. ssContent: null,
  8614. ssFallback: null,
  8615. dirs: null,
  8616. transition: null,
  8617. el: null,
  8618. anchor: null,
  8619. target: null,
  8620. targetAnchor: null,
  8621. staticCount: 0,
  8622. shapeFlag,
  8623. patchFlag,
  8624. dynamicProps,
  8625. dynamicChildren: null,
  8626. appContext: null,
  8627. ctx: currentRenderingInstance
  8628. };
  8629. if (needFullChildrenNormalization) {
  8630. normalizeChildren(vnode, children);
  8631. if (shapeFlag & 128) {
  8632. type.normalize(vnode);
  8633. }
  8634. } else if (children) {
  8635. vnode.shapeFlag |= isString(children) ? 8 : 16;
  8636. }
  8637. if (vnode.key !== vnode.key) {
  8638. warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  8639. }
  8640. if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
  8641. !isBlockNode && // has current parent block
  8642. currentBlock && // presence of a patch flag indicates this node needs patching on updates.
  8643. // component nodes also should always be patched, because even if the
  8644. // component doesn't need to update, it needs to persist the instance on to
  8645. // the next vnode so that it can be properly unmounted later.
  8646. (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  8647. // vnode should not be considered dynamic due to handler caching.
  8648. vnode.patchFlag !== 32) {
  8649. currentBlock.push(vnode);
  8650. }
  8651. return vnode;
  8652. }
  8653. var createVNode = true ? createVNodeWithArgsTransform : _createVNode;
  8654. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  8655. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  8656. if (!type) {
  8657. warn$1(`Invalid vnode type when creating vnode: ${type}.`);
  8658. }
  8659. type = Comment;
  8660. }
  8661. if (isVNode(type)) {
  8662. const cloned = cloneVNode(
  8663. type,
  8664. props,
  8665. true
  8666. /* mergeRef: true */
  8667. );
  8668. if (children) {
  8669. normalizeChildren(cloned, children);
  8670. }
  8671. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
  8672. if (cloned.shapeFlag & 6) {
  8673. currentBlock[currentBlock.indexOf(type)] = cloned;
  8674. } else {
  8675. currentBlock.push(cloned);
  8676. }
  8677. }
  8678. cloned.patchFlag |= -2;
  8679. return cloned;
  8680. }
  8681. if (isClassComponent(type)) {
  8682. type = type.__vccOpts;
  8683. }
  8684. if (props) {
  8685. props = guardReactiveProps(props);
  8686. let { class: klass, style } = props;
  8687. if (klass && !isString(klass)) {
  8688. props.class = normalizeClass(klass);
  8689. }
  8690. if (isObject(style)) {
  8691. if (isProxy(style) && !isArray(style)) {
  8692. style = extend({}, style);
  8693. }
  8694. props.style = normalizeStyle(style);
  8695. }
  8696. }
  8697. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  8698. if (shapeFlag & 4 && isProxy(type)) {
  8699. type = toRaw(type);
  8700. warn$1(
  8701. `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
  8702. `
  8703. Component that was made reactive: `,
  8704. type
  8705. );
  8706. }
  8707. return createBaseVNode(
  8708. type,
  8709. props,
  8710. children,
  8711. patchFlag,
  8712. dynamicProps,
  8713. shapeFlag,
  8714. isBlockNode,
  8715. true
  8716. );
  8717. }
  8718. function guardReactiveProps(props) {
  8719. if (!props)
  8720. return null;
  8721. return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
  8722. }
  8723. function cloneVNode(vnode, extraProps, mergeRef = false) {
  8724. const { props, ref: ref2, patchFlag, children } = vnode;
  8725. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  8726. const cloned = {
  8727. __v_isVNode: true,
  8728. __v_skip: true,
  8729. type: vnode.type,
  8730. props: mergedProps,
  8731. key: mergedProps && normalizeKey(mergedProps),
  8732. ref: extraProps && extraProps.ref ? (
  8733. // #2078 in the case of <component :is="vnode" ref="extra"/>
  8734. // if the vnode itself already has a ref, cloneVNode will need to merge
  8735. // the refs so the single vnode can be set on multiple refs
  8736. mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
  8737. ) : ref2,
  8738. scopeId: vnode.scopeId,
  8739. slotScopeIds: vnode.slotScopeIds,
  8740. children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
  8741. target: vnode.target,
  8742. targetAnchor: vnode.targetAnchor,
  8743. staticCount: vnode.staticCount,
  8744. shapeFlag: vnode.shapeFlag,
  8745. // if the vnode is cloned with extra props, we can no longer assume its
  8746. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  8747. // note: preserve flag for fragments since they use the flag for children
  8748. // fast paths only.
  8749. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  8750. dynamicProps: vnode.dynamicProps,
  8751. dynamicChildren: vnode.dynamicChildren,
  8752. appContext: vnode.appContext,
  8753. dirs: vnode.dirs,
  8754. transition: vnode.transition,
  8755. // These should technically only be non-null on mounted VNodes. However,
  8756. // they *should* be copied for kept-alive vnodes. So we just always copy
  8757. // them since them being non-null during a mount doesn't affect the logic as
  8758. // they will simply be overwritten.
  8759. component: vnode.component,
  8760. suspense: vnode.suspense,
  8761. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  8762. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  8763. el: vnode.el,
  8764. anchor: vnode.anchor,
  8765. ctx: vnode.ctx,
  8766. ce: vnode.ce
  8767. };
  8768. return cloned;
  8769. }
  8770. function deepCloneVNode(vnode) {
  8771. const cloned = cloneVNode(vnode);
  8772. if (isArray(vnode.children)) {
  8773. cloned.children = vnode.children.map(deepCloneVNode);
  8774. }
  8775. return cloned;
  8776. }
  8777. function createTextVNode(text = " ", flag = 0) {
  8778. return createVNode(Text, null, text, flag);
  8779. }
  8780. function createStaticVNode(content, numberOfNodes) {
  8781. const vnode = createVNode(Static, null, content);
  8782. vnode.staticCount = numberOfNodes;
  8783. return vnode;
  8784. }
  8785. function createCommentVNode(text = "", asBlock = false) {
  8786. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  8787. }
  8788. function normalizeVNode(child) {
  8789. if (child == null || typeof child === "boolean") {
  8790. return createVNode(Comment);
  8791. } else if (isArray(child)) {
  8792. return createVNode(
  8793. Fragment,
  8794. null,
  8795. // #3666, avoid reference pollution when reusing vnode
  8796. child.slice()
  8797. );
  8798. } else if (typeof child === "object") {
  8799. return cloneIfMounted(child);
  8800. } else {
  8801. return createVNode(Text, null, String(child));
  8802. }
  8803. }
  8804. function cloneIfMounted(child) {
  8805. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  8806. }
  8807. function normalizeChildren(vnode, children) {
  8808. let type = 0;
  8809. const { shapeFlag } = vnode;
  8810. if (children == null) {
  8811. children = null;
  8812. } else if (isArray(children)) {
  8813. type = 16;
  8814. } else if (typeof children === "object") {
  8815. if (shapeFlag & (1 | 64)) {
  8816. const slot = children.default;
  8817. if (slot) {
  8818. slot._c && (slot._d = false);
  8819. normalizeChildren(vnode, slot());
  8820. slot._c && (slot._d = true);
  8821. }
  8822. return;
  8823. } else {
  8824. type = 32;
  8825. const slotFlag = children._;
  8826. if (!slotFlag && !isInternalObject(children)) {
  8827. children._ctx = currentRenderingInstance;
  8828. } else if (slotFlag === 3 && currentRenderingInstance) {
  8829. if (currentRenderingInstance.slots._ === 1) {
  8830. children._ = 1;
  8831. } else {
  8832. children._ = 2;
  8833. vnode.patchFlag |= 1024;
  8834. }
  8835. }
  8836. }
  8837. } else if (isFunction(children)) {
  8838. children = { default: children, _ctx: currentRenderingInstance };
  8839. type = 32;
  8840. } else {
  8841. children = String(children);
  8842. if (shapeFlag & 64) {
  8843. type = 16;
  8844. children = [createTextVNode(children)];
  8845. } else {
  8846. type = 8;
  8847. }
  8848. }
  8849. vnode.children = children;
  8850. vnode.shapeFlag |= type;
  8851. }
  8852. function mergeProps(...args) {
  8853. const ret = {};
  8854. for (let i = 0; i < args.length; i++) {
  8855. const toMerge = args[i];
  8856. for (const key in toMerge) {
  8857. if (key === "class") {
  8858. if (ret.class !== toMerge.class) {
  8859. ret.class = normalizeClass([ret.class, toMerge.class]);
  8860. }
  8861. } else if (key === "style") {
  8862. ret.style = normalizeStyle([ret.style, toMerge.style]);
  8863. } else if (isOn(key)) {
  8864. const existing = ret[key];
  8865. const incoming = toMerge[key];
  8866. if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
  8867. ret[key] = existing ? [].concat(existing, incoming) : incoming;
  8868. }
  8869. } else if (key !== "") {
  8870. ret[key] = toMerge[key];
  8871. }
  8872. }
  8873. }
  8874. return ret;
  8875. }
  8876. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  8877. callWithAsyncErrorHandling(hook, instance, 7, [
  8878. vnode,
  8879. prevVNode
  8880. ]);
  8881. }
  8882. var emptyAppContext = createAppContext();
  8883. var uid = 0;
  8884. function createComponentInstance(vnode, parent, suspense) {
  8885. const type = vnode.type;
  8886. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  8887. const instance = {
  8888. uid: uid++,
  8889. vnode,
  8890. type,
  8891. parent,
  8892. appContext,
  8893. root: null,
  8894. // to be immediately set
  8895. next: null,
  8896. subTree: null,
  8897. // will be set synchronously right after creation
  8898. effect: null,
  8899. update: null,
  8900. // will be set synchronously right after creation
  8901. scope: new EffectScope(
  8902. true
  8903. /* detached */
  8904. ),
  8905. render: null,
  8906. proxy: null,
  8907. exposed: null,
  8908. exposeProxy: null,
  8909. withProxy: null,
  8910. provides: parent ? parent.provides : Object.create(appContext.provides),
  8911. accessCache: null,
  8912. renderCache: [],
  8913. // local resolved assets
  8914. components: null,
  8915. directives: null,
  8916. // resolved props and emits options
  8917. propsOptions: normalizePropsOptions(type, appContext),
  8918. emitsOptions: normalizeEmitsOptions(type, appContext),
  8919. // emit
  8920. emit: null,
  8921. // to be set immediately
  8922. emitted: null,
  8923. // props default value
  8924. propsDefaults: EMPTY_OBJ,
  8925. // inheritAttrs
  8926. inheritAttrs: type.inheritAttrs,
  8927. // state
  8928. ctx: EMPTY_OBJ,
  8929. data: EMPTY_OBJ,
  8930. props: EMPTY_OBJ,
  8931. attrs: EMPTY_OBJ,
  8932. slots: EMPTY_OBJ,
  8933. refs: EMPTY_OBJ,
  8934. setupState: EMPTY_OBJ,
  8935. setupContext: null,
  8936. attrsProxy: null,
  8937. slotsProxy: null,
  8938. // suspense related
  8939. suspense,
  8940. suspenseId: suspense ? suspense.pendingId : 0,
  8941. asyncDep: null,
  8942. asyncResolved: false,
  8943. // lifecycle hooks
  8944. // not using enums here because it results in computed properties
  8945. isMounted: false,
  8946. isUnmounted: false,
  8947. isDeactivated: false,
  8948. bc: null,
  8949. c: null,
  8950. bm: null,
  8951. m: null,
  8952. bu: null,
  8953. u: null,
  8954. um: null,
  8955. bum: null,
  8956. da: null,
  8957. a: null,
  8958. rtg: null,
  8959. rtc: null,
  8960. ec: null,
  8961. sp: null
  8962. };
  8963. if (true) {
  8964. instance.ctx = createDevRenderContext(instance);
  8965. } else {
  8966. instance.ctx = { _: instance };
  8967. }
  8968. instance.root = parent ? parent.root : instance;
  8969. instance.emit = emit.bind(null, instance);
  8970. if (vnode.ce) {
  8971. vnode.ce(instance);
  8972. }
  8973. return instance;
  8974. }
  8975. var currentInstance = null;
  8976. var getCurrentInstance = () => currentInstance || currentRenderingInstance;
  8977. var internalSetCurrentInstance;
  8978. var setInSSRSetupState;
  8979. {
  8980. const g = getGlobalThis();
  8981. const registerGlobalSetter = (key, setter) => {
  8982. let setters;
  8983. if (!(setters = g[key]))
  8984. setters = g[key] = [];
  8985. setters.push(setter);
  8986. return (v) => {
  8987. if (setters.length > 1)
  8988. setters.forEach((set2) => set2(v));
  8989. else
  8990. setters[0](v);
  8991. };
  8992. };
  8993. internalSetCurrentInstance = registerGlobalSetter(
  8994. `__VUE_INSTANCE_SETTERS__`,
  8995. (v) => currentInstance = v
  8996. );
  8997. setInSSRSetupState = registerGlobalSetter(
  8998. `__VUE_SSR_SETTERS__`,
  8999. (v) => isInSSRComponentSetup = v
  9000. );
  9001. }
  9002. var setCurrentInstance = (instance) => {
  9003. const prev = currentInstance;
  9004. internalSetCurrentInstance(instance);
  9005. instance.scope.on();
  9006. return () => {
  9007. instance.scope.off();
  9008. internalSetCurrentInstance(prev);
  9009. };
  9010. };
  9011. var unsetCurrentInstance = () => {
  9012. currentInstance && currentInstance.scope.off();
  9013. internalSetCurrentInstance(null);
  9014. };
  9015. var isBuiltInTag = makeMap("slot,component");
  9016. function validateComponentName(name, { isNativeTag }) {
  9017. if (isBuiltInTag(name) || isNativeTag(name)) {
  9018. warn$1(
  9019. "Do not use built-in or reserved HTML elements as component id: " + name
  9020. );
  9021. }
  9022. }
  9023. function isStatefulComponent(instance) {
  9024. return instance.vnode.shapeFlag & 4;
  9025. }
  9026. var isInSSRComponentSetup = false;
  9027. function setupComponent(instance, isSSR = false) {
  9028. isSSR && setInSSRSetupState(isSSR);
  9029. const { props, children } = instance.vnode;
  9030. const isStateful = isStatefulComponent(instance);
  9031. initProps(instance, props, isStateful, isSSR);
  9032. initSlots(instance, children);
  9033. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  9034. isSSR && setInSSRSetupState(false);
  9035. return setupResult;
  9036. }
  9037. function setupStatefulComponent(instance, isSSR) {
  9038. var _a;
  9039. const Component = instance.type;
  9040. if (true) {
  9041. if (Component.name) {
  9042. validateComponentName(Component.name, instance.appContext.config);
  9043. }
  9044. if (Component.components) {
  9045. const names = Object.keys(Component.components);
  9046. for (let i = 0; i < names.length; i++) {
  9047. validateComponentName(names[i], instance.appContext.config);
  9048. }
  9049. }
  9050. if (Component.directives) {
  9051. const names = Object.keys(Component.directives);
  9052. for (let i = 0; i < names.length; i++) {
  9053. validateDirectiveName(names[i]);
  9054. }
  9055. }
  9056. if (Component.compilerOptions && isRuntimeOnly()) {
  9057. warn$1(
  9058. `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`
  9059. );
  9060. }
  9061. }
  9062. instance.accessCache = /* @__PURE__ */ Object.create(null);
  9063. instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
  9064. if (true) {
  9065. exposePropsOnRenderContext(instance);
  9066. }
  9067. const { setup } = Component;
  9068. if (setup) {
  9069. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  9070. const reset = setCurrentInstance(instance);
  9071. pauseTracking();
  9072. const setupResult = callWithErrorHandling(
  9073. setup,
  9074. instance,
  9075. 0,
  9076. [
  9077. true ? shallowReadonly(instance.props) : instance.props,
  9078. setupContext
  9079. ]
  9080. );
  9081. resetTracking();
  9082. reset();
  9083. if (isPromise(setupResult)) {
  9084. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  9085. if (isSSR) {
  9086. return setupResult.then((resolvedResult) => {
  9087. handleSetupResult(instance, resolvedResult, isSSR);
  9088. }).catch((e) => {
  9089. handleError(e, instance, 0);
  9090. });
  9091. } else {
  9092. instance.asyncDep = setupResult;
  9093. if (!instance.suspense) {
  9094. const name = (_a = Component.name) != null ? _a : "Anonymous";
  9095. warn$1(
  9096. `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
  9097. );
  9098. }
  9099. }
  9100. } else {
  9101. handleSetupResult(instance, setupResult, isSSR);
  9102. }
  9103. } else {
  9104. finishComponentSetup(instance, isSSR);
  9105. }
  9106. }
  9107. function handleSetupResult(instance, setupResult, isSSR) {
  9108. if (isFunction(setupResult)) {
  9109. if (instance.type.__ssrInlineRender) {
  9110. instance.ssrRender = setupResult;
  9111. } else {
  9112. instance.render = setupResult;
  9113. }
  9114. } else if (isObject(setupResult)) {
  9115. if (isVNode(setupResult)) {
  9116. warn$1(
  9117. `setup() should not return VNodes directly - return a render function instead.`
  9118. );
  9119. }
  9120. if (true) {
  9121. instance.devtoolsRawSetupState = setupResult;
  9122. }
  9123. instance.setupState = proxyRefs(setupResult);
  9124. if (true) {
  9125. exposeSetupStateOnRenderContext(instance);
  9126. }
  9127. } else if (setupResult !== void 0) {
  9128. warn$1(
  9129. `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
  9130. );
  9131. }
  9132. finishComponentSetup(instance, isSSR);
  9133. }
  9134. var compile;
  9135. var installWithProxy;
  9136. function registerRuntimeCompiler(_compile) {
  9137. compile = _compile;
  9138. installWithProxy = (i) => {
  9139. if (i.render._rc) {
  9140. i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  9141. }
  9142. };
  9143. }
  9144. var isRuntimeOnly = () => !compile;
  9145. function finishComponentSetup(instance, isSSR, skipOptions) {
  9146. const Component = instance.type;
  9147. if (!instance.render) {
  9148. if (!isSSR && compile && !Component.render) {
  9149. const template = Component.template || resolveMergedOptions(instance).template;
  9150. if (template) {
  9151. if (true) {
  9152. startMeasure(instance, `compile`);
  9153. }
  9154. const { isCustomElement, compilerOptions } = instance.appContext.config;
  9155. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  9156. const finalCompilerOptions = extend(
  9157. extend(
  9158. {
  9159. isCustomElement,
  9160. delimiters
  9161. },
  9162. compilerOptions
  9163. ),
  9164. componentCompilerOptions
  9165. );
  9166. Component.render = compile(template, finalCompilerOptions);
  9167. if (true) {
  9168. endMeasure(instance, `compile`);
  9169. }
  9170. }
  9171. }
  9172. instance.render = Component.render || NOOP;
  9173. if (installWithProxy) {
  9174. installWithProxy(instance);
  9175. }
  9176. }
  9177. if (__VUE_OPTIONS_API__ && true) {
  9178. const reset = setCurrentInstance(instance);
  9179. pauseTracking();
  9180. try {
  9181. applyOptions(instance);
  9182. } finally {
  9183. resetTracking();
  9184. reset();
  9185. }
  9186. }
  9187. if (!Component.render && instance.render === NOOP && !isSSR) {
  9188. if (!compile && Component.template) {
  9189. warn$1(
  9190. `Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  9191. );
  9192. } else {
  9193. warn$1(`Component is missing template or render function.`);
  9194. }
  9195. }
  9196. }
  9197. var attrsProxyHandlers = true ? {
  9198. get(target, key) {
  9199. markAttrsAccessed();
  9200. track(target, "get", "");
  9201. return target[key];
  9202. },
  9203. set() {
  9204. warn$1(`setupContext.attrs is readonly.`);
  9205. return false;
  9206. },
  9207. deleteProperty() {
  9208. warn$1(`setupContext.attrs is readonly.`);
  9209. return false;
  9210. }
  9211. } : {
  9212. get(target, key) {
  9213. track(target, "get", "");
  9214. return target[key];
  9215. }
  9216. };
  9217. function getSlotsProxy(instance) {
  9218. return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
  9219. get(target, key) {
  9220. track(instance, "get", "$slots");
  9221. return target[key];
  9222. }
  9223. }));
  9224. }
  9225. function createSetupContext(instance) {
  9226. const expose = (exposed) => {
  9227. if (true) {
  9228. if (instance.exposed) {
  9229. warn$1(`expose() should be called only once per setup().`);
  9230. }
  9231. if (exposed != null) {
  9232. let exposedType = typeof exposed;
  9233. if (exposedType === "object") {
  9234. if (isArray(exposed)) {
  9235. exposedType = "array";
  9236. } else if (isRef(exposed)) {
  9237. exposedType = "ref";
  9238. }
  9239. }
  9240. if (exposedType !== "object") {
  9241. warn$1(
  9242. `expose() should be passed a plain object, received ${exposedType}.`
  9243. );
  9244. }
  9245. }
  9246. }
  9247. instance.exposed = exposed || {};
  9248. };
  9249. if (true) {
  9250. let attrsProxy;
  9251. return Object.freeze({
  9252. get attrs() {
  9253. return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
  9254. },
  9255. get slots() {
  9256. return getSlotsProxy(instance);
  9257. },
  9258. get emit() {
  9259. return (event, ...args) => instance.emit(event, ...args);
  9260. },
  9261. expose
  9262. });
  9263. } else {
  9264. return {
  9265. attrs: new Proxy(instance.attrs, attrsProxyHandlers),
  9266. slots: instance.slots,
  9267. emit: instance.emit,
  9268. expose
  9269. };
  9270. }
  9271. }
  9272. function getExposeProxy(instance) {
  9273. if (instance.exposed) {
  9274. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  9275. get(target, key) {
  9276. if (key in target) {
  9277. return target[key];
  9278. } else if (key in publicPropertiesMap) {
  9279. return publicPropertiesMap[key](instance);
  9280. }
  9281. },
  9282. has(target, key) {
  9283. return key in target || key in publicPropertiesMap;
  9284. }
  9285. }));
  9286. }
  9287. }
  9288. var classifyRE = /(?:^|[-_])(\w)/g;
  9289. var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  9290. function getComponentName(Component, includeInferred = true) {
  9291. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  9292. }
  9293. function formatComponentName(instance, Component, isRoot = false) {
  9294. let name = getComponentName(Component);
  9295. if (!name && Component.__file) {
  9296. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  9297. if (match) {
  9298. name = match[1];
  9299. }
  9300. }
  9301. if (!name && instance && instance.parent) {
  9302. const inferFromRegistry = (registry) => {
  9303. for (const key in registry) {
  9304. if (registry[key] === Component) {
  9305. return key;
  9306. }
  9307. }
  9308. };
  9309. name = inferFromRegistry(
  9310. instance.components || instance.parent.type.components
  9311. ) || inferFromRegistry(instance.appContext.components);
  9312. }
  9313. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  9314. }
  9315. function isClassComponent(value) {
  9316. return isFunction(value) && "__vccOpts" in value;
  9317. }
  9318. var computed2 = (getterOrOptions, debugOptions) => {
  9319. const c = computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
  9320. if (true) {
  9321. const i = getCurrentInstance();
  9322. if (i && i.appContext.config.warnRecursiveComputed) {
  9323. c._warnRecursive = true;
  9324. }
  9325. }
  9326. return c;
  9327. };
  9328. function useModel(props, name, options = EMPTY_OBJ) {
  9329. const i = getCurrentInstance();
  9330. if (!i) {
  9331. warn$1(`useModel() called without active instance.`);
  9332. return ref();
  9333. }
  9334. if (!i.propsOptions[0][name]) {
  9335. warn$1(`useModel() called with prop "${name}" which is not declared.`);
  9336. return ref();
  9337. }
  9338. const camelizedName = camelize(name);
  9339. const hyphenatedName = hyphenate(name);
  9340. const res = customRef((track2, trigger2) => {
  9341. let localValue;
  9342. watchSyncEffect(() => {
  9343. const propValue = props[name];
  9344. if (hasChanged(localValue, propValue)) {
  9345. localValue = propValue;
  9346. trigger2();
  9347. }
  9348. });
  9349. return {
  9350. get() {
  9351. track2();
  9352. return options.get ? options.get(localValue) : localValue;
  9353. },
  9354. set(value) {
  9355. const rawProps = i.vnode.props;
  9356. if (!(rawProps && // check if parent has passed v-model
  9357. (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
  9358. localValue = value;
  9359. trigger2();
  9360. }
  9361. i.emit(`update:${name}`, options.set ? options.set(value) : value);
  9362. }
  9363. };
  9364. });
  9365. const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
  9366. res[Symbol.iterator] = () => {
  9367. let i2 = 0;
  9368. return {
  9369. next() {
  9370. if (i2 < 2) {
  9371. return { value: i2++ ? props[modifierKey] || {} : res, done: false };
  9372. } else {
  9373. return { done: true };
  9374. }
  9375. }
  9376. };
  9377. };
  9378. return res;
  9379. }
  9380. function h(type, propsOrChildren, children) {
  9381. const l = arguments.length;
  9382. if (l === 2) {
  9383. if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
  9384. if (isVNode(propsOrChildren)) {
  9385. return createVNode(type, null, [propsOrChildren]);
  9386. }
  9387. return createVNode(type, propsOrChildren);
  9388. } else {
  9389. return createVNode(type, null, propsOrChildren);
  9390. }
  9391. } else {
  9392. if (l > 3) {
  9393. children = Array.prototype.slice.call(arguments, 2);
  9394. } else if (l === 3 && isVNode(children)) {
  9395. children = [children];
  9396. }
  9397. return createVNode(type, propsOrChildren, children);
  9398. }
  9399. }
  9400. function initCustomFormatter() {
  9401. if (typeof window === "undefined") {
  9402. return;
  9403. }
  9404. const vueStyle = { style: "color:#3ba776" };
  9405. const numberStyle = { style: "color:#1677ff" };
  9406. const stringStyle = { style: "color:#f5222d" };
  9407. const keywordStyle = { style: "color:#eb2f96" };
  9408. const formatter = {
  9409. header(obj) {
  9410. if (!isObject(obj)) {
  9411. return null;
  9412. }
  9413. if (obj.__isVue) {
  9414. return ["div", vueStyle, `VueInstance`];
  9415. } else if (isRef(obj)) {
  9416. return [
  9417. "div",
  9418. {},
  9419. ["span", vueStyle, genRefFlag(obj)],
  9420. "<",
  9421. formatValue(obj.value),
  9422. `>`
  9423. ];
  9424. } else if (isReactive(obj)) {
  9425. return [
  9426. "div",
  9427. {},
  9428. ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
  9429. "<",
  9430. formatValue(obj),
  9431. `>${isReadonly(obj) ? ` (readonly)` : ``}`
  9432. ];
  9433. } else if (isReadonly(obj)) {
  9434. return [
  9435. "div",
  9436. {},
  9437. ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
  9438. "<",
  9439. formatValue(obj),
  9440. ">"
  9441. ];
  9442. }
  9443. return null;
  9444. },
  9445. hasBody(obj) {
  9446. return obj && obj.__isVue;
  9447. },
  9448. body(obj) {
  9449. if (obj && obj.__isVue) {
  9450. return [
  9451. "div",
  9452. {},
  9453. ...formatInstance(obj.$)
  9454. ];
  9455. }
  9456. }
  9457. };
  9458. function formatInstance(instance) {
  9459. const blocks = [];
  9460. if (instance.type.props && instance.props) {
  9461. blocks.push(createInstanceBlock("props", toRaw(instance.props)));
  9462. }
  9463. if (instance.setupState !== EMPTY_OBJ) {
  9464. blocks.push(createInstanceBlock("setup", instance.setupState));
  9465. }
  9466. if (instance.data !== EMPTY_OBJ) {
  9467. blocks.push(createInstanceBlock("data", toRaw(instance.data)));
  9468. }
  9469. const computed3 = extractKeys(instance, "computed");
  9470. if (computed3) {
  9471. blocks.push(createInstanceBlock("computed", computed3));
  9472. }
  9473. const injected = extractKeys(instance, "inject");
  9474. if (injected) {
  9475. blocks.push(createInstanceBlock("injected", injected));
  9476. }
  9477. blocks.push([
  9478. "div",
  9479. {},
  9480. [
  9481. "span",
  9482. {
  9483. style: keywordStyle.style + ";opacity:0.66"
  9484. },
  9485. "$ (internal): "
  9486. ],
  9487. ["object", { object: instance }]
  9488. ]);
  9489. return blocks;
  9490. }
  9491. function createInstanceBlock(type, target) {
  9492. target = extend({}, target);
  9493. if (!Object.keys(target).length) {
  9494. return ["span", {}];
  9495. }
  9496. return [
  9497. "div",
  9498. { style: "line-height:1.25em;margin-bottom:0.6em" },
  9499. [
  9500. "div",
  9501. {
  9502. style: "color:#476582"
  9503. },
  9504. type
  9505. ],
  9506. [
  9507. "div",
  9508. {
  9509. style: "padding-left:1.25em"
  9510. },
  9511. ...Object.keys(target).map((key) => {
  9512. return [
  9513. "div",
  9514. {},
  9515. ["span", keywordStyle, key + ": "],
  9516. formatValue(target[key], false)
  9517. ];
  9518. })
  9519. ]
  9520. ];
  9521. }
  9522. function formatValue(v, asRaw = true) {
  9523. if (typeof v === "number") {
  9524. return ["span", numberStyle, v];
  9525. } else if (typeof v === "string") {
  9526. return ["span", stringStyle, JSON.stringify(v)];
  9527. } else if (typeof v === "boolean") {
  9528. return ["span", keywordStyle, v];
  9529. } else if (isObject(v)) {
  9530. return ["object", { object: asRaw ? toRaw(v) : v }];
  9531. } else {
  9532. return ["span", stringStyle, String(v)];
  9533. }
  9534. }
  9535. function extractKeys(instance, type) {
  9536. const Comp = instance.type;
  9537. if (isFunction(Comp)) {
  9538. return;
  9539. }
  9540. const extracted = {};
  9541. for (const key in instance.ctx) {
  9542. if (isKeyOfType(Comp, key, type)) {
  9543. extracted[key] = instance.ctx[key];
  9544. }
  9545. }
  9546. return extracted;
  9547. }
  9548. function isKeyOfType(Comp, key, type) {
  9549. const opts = Comp[type];
  9550. if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
  9551. return true;
  9552. }
  9553. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
  9554. return true;
  9555. }
  9556. if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
  9557. return true;
  9558. }
  9559. }
  9560. function genRefFlag(v) {
  9561. if (isShallow(v)) {
  9562. return `ShallowRef`;
  9563. }
  9564. if (v.effect) {
  9565. return `ComputedRef`;
  9566. }
  9567. return `Ref`;
  9568. }
  9569. if (window.devtoolsFormatters) {
  9570. window.devtoolsFormatters.push(formatter);
  9571. } else {
  9572. window.devtoolsFormatters = [formatter];
  9573. }
  9574. }
  9575. function withMemo(memo, render2, cache, index) {
  9576. const cached = cache[index];
  9577. if (cached && isMemoSame(cached, memo)) {
  9578. return cached;
  9579. }
  9580. const ret = render2();
  9581. ret.memo = memo.slice();
  9582. return cache[index] = ret;
  9583. }
  9584. function isMemoSame(cached, memo) {
  9585. const prev = cached.memo;
  9586. if (prev.length != memo.length) {
  9587. return false;
  9588. }
  9589. for (let i = 0; i < prev.length; i++) {
  9590. if (hasChanged(prev[i], memo[i])) {
  9591. return false;
  9592. }
  9593. }
  9594. if (isBlockTreeEnabled > 0 && currentBlock) {
  9595. currentBlock.push(cached);
  9596. }
  9597. return true;
  9598. }
  9599. var version = "3.4.25";
  9600. var warn2 = true ? warn$1 : NOOP;
  9601. var ErrorTypeStrings = ErrorTypeStrings$1;
  9602. var devtools = true ? devtools$1 : void 0;
  9603. var setDevtoolsHook = true ? setDevtoolsHook$1 : NOOP;
  9604. var _ssrUtils = {
  9605. createComponentInstance,
  9606. setupComponent,
  9607. renderComponentRoot,
  9608. setCurrentRenderingInstance,
  9609. isVNode,
  9610. normalizeVNode
  9611. };
  9612. var ssrUtils = _ssrUtils;
  9613. var resolveFilter = null;
  9614. var compatUtils = null;
  9615. var DeprecationTypes = null;
  9616. // node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
  9617. var svgNS = "http://www.w3.org/2000/svg";
  9618. var mathmlNS = "http://www.w3.org/1998/Math/MathML";
  9619. var doc = typeof document !== "undefined" ? document : null;
  9620. var templateContainer = doc && doc.createElement("template");
  9621. var nodeOps = {
  9622. insert: (child, parent, anchor) => {
  9623. parent.insertBefore(child, anchor || null);
  9624. },
  9625. remove: (child) => {
  9626. const parent = child.parentNode;
  9627. if (parent) {
  9628. parent.removeChild(child);
  9629. }
  9630. },
  9631. createElement: (tag, namespace, is, props) => {
  9632. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0);
  9633. if (tag === "select" && props && props.multiple != null) {
  9634. el.setAttribute("multiple", props.multiple);
  9635. }
  9636. return el;
  9637. },
  9638. createText: (text) => doc.createTextNode(text),
  9639. createComment: (text) => doc.createComment(text),
  9640. setText: (node, text) => {
  9641. node.nodeValue = text;
  9642. },
  9643. setElementText: (el, text) => {
  9644. el.textContent = text;
  9645. },
  9646. parentNode: (node) => node.parentNode,
  9647. nextSibling: (node) => node.nextSibling,
  9648. querySelector: (selector) => doc.querySelector(selector),
  9649. setScopeId(el, id) {
  9650. el.setAttribute(id, "");
  9651. },
  9652. // __UNSAFE__
  9653. // Reason: innerHTML.
  9654. // Static content here can only come from compiled templates.
  9655. // As long as the user only uses trusted templates, this is safe.
  9656. insertStaticContent(content, parent, anchor, namespace, start, end) {
  9657. const before = anchor ? anchor.previousSibling : parent.lastChild;
  9658. if (start && (start === end || start.nextSibling)) {
  9659. while (true) {
  9660. parent.insertBefore(start.cloneNode(true), anchor);
  9661. if (start === end || !(start = start.nextSibling))
  9662. break;
  9663. }
  9664. } else {
  9665. templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
  9666. const template = templateContainer.content;
  9667. if (namespace === "svg" || namespace === "mathml") {
  9668. const wrapper = template.firstChild;
  9669. while (wrapper.firstChild) {
  9670. template.appendChild(wrapper.firstChild);
  9671. }
  9672. template.removeChild(wrapper);
  9673. }
  9674. parent.insertBefore(template, anchor);
  9675. }
  9676. return [
  9677. // first
  9678. before ? before.nextSibling : parent.firstChild,
  9679. // last
  9680. anchor ? anchor.previousSibling : parent.lastChild
  9681. ];
  9682. }
  9683. };
  9684. var TRANSITION = "transition";
  9685. var ANIMATION = "animation";
  9686. var vtcKey = Symbol("_vtc");
  9687. var Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
  9688. Transition.displayName = "Transition";
  9689. var DOMTransitionPropsValidators = {
  9690. name: String,
  9691. type: String,
  9692. css: {
  9693. type: Boolean,
  9694. default: true
  9695. },
  9696. duration: [String, Number, Object],
  9697. enterFromClass: String,
  9698. enterActiveClass: String,
  9699. enterToClass: String,
  9700. appearFromClass: String,
  9701. appearActiveClass: String,
  9702. appearToClass: String,
  9703. leaveFromClass: String,
  9704. leaveActiveClass: String,
  9705. leaveToClass: String
  9706. };
  9707. var TransitionPropsValidators = Transition.props = extend(
  9708. {},
  9709. BaseTransitionPropsValidators,
  9710. DOMTransitionPropsValidators
  9711. );
  9712. var callHook2 = (hook, args = []) => {
  9713. if (isArray(hook)) {
  9714. hook.forEach((h2) => h2(...args));
  9715. } else if (hook) {
  9716. hook(...args);
  9717. }
  9718. };
  9719. var hasExplicitCallback = (hook) => {
  9720. return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  9721. };
  9722. function resolveTransitionProps(rawProps) {
  9723. const baseProps = {};
  9724. for (const key in rawProps) {
  9725. if (!(key in DOMTransitionPropsValidators)) {
  9726. baseProps[key] = rawProps[key];
  9727. }
  9728. }
  9729. if (rawProps.css === false) {
  9730. return baseProps;
  9731. }
  9732. const {
  9733. name = "v",
  9734. type,
  9735. duration,
  9736. enterFromClass = `${name}-enter-from`,
  9737. enterActiveClass = `${name}-enter-active`,
  9738. enterToClass = `${name}-enter-to`,
  9739. appearFromClass = enterFromClass,
  9740. appearActiveClass = enterActiveClass,
  9741. appearToClass = enterToClass,
  9742. leaveFromClass = `${name}-leave-from`,
  9743. leaveActiveClass = `${name}-leave-active`,
  9744. leaveToClass = `${name}-leave-to`
  9745. } = rawProps;
  9746. const durations = normalizeDuration(duration);
  9747. const enterDuration = durations && durations[0];
  9748. const leaveDuration = durations && durations[1];
  9749. const {
  9750. onBeforeEnter,
  9751. onEnter,
  9752. onEnterCancelled,
  9753. onLeave,
  9754. onLeaveCancelled,
  9755. onBeforeAppear = onBeforeEnter,
  9756. onAppear = onEnter,
  9757. onAppearCancelled = onEnterCancelled
  9758. } = baseProps;
  9759. const finishEnter = (el, isAppear, done) => {
  9760. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  9761. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  9762. done && done();
  9763. };
  9764. const finishLeave = (el, done) => {
  9765. el._isLeaving = false;
  9766. removeTransitionClass(el, leaveFromClass);
  9767. removeTransitionClass(el, leaveToClass);
  9768. removeTransitionClass(el, leaveActiveClass);
  9769. done && done();
  9770. };
  9771. const makeEnterHook = (isAppear) => {
  9772. return (el, done) => {
  9773. const hook = isAppear ? onAppear : onEnter;
  9774. const resolve2 = () => finishEnter(el, isAppear, done);
  9775. callHook2(hook, [el, resolve2]);
  9776. nextFrame(() => {
  9777. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  9778. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  9779. if (!hasExplicitCallback(hook)) {
  9780. whenTransitionEnds(el, type, enterDuration, resolve2);
  9781. }
  9782. });
  9783. };
  9784. };
  9785. return extend(baseProps, {
  9786. onBeforeEnter(el) {
  9787. callHook2(onBeforeEnter, [el]);
  9788. addTransitionClass(el, enterFromClass);
  9789. addTransitionClass(el, enterActiveClass);
  9790. },
  9791. onBeforeAppear(el) {
  9792. callHook2(onBeforeAppear, [el]);
  9793. addTransitionClass(el, appearFromClass);
  9794. addTransitionClass(el, appearActiveClass);
  9795. },
  9796. onEnter: makeEnterHook(false),
  9797. onAppear: makeEnterHook(true),
  9798. onLeave(el, done) {
  9799. el._isLeaving = true;
  9800. const resolve2 = () => finishLeave(el, done);
  9801. addTransitionClass(el, leaveFromClass);
  9802. addTransitionClass(el, leaveActiveClass);
  9803. forceReflow();
  9804. nextFrame(() => {
  9805. if (!el._isLeaving) {
  9806. return;
  9807. }
  9808. removeTransitionClass(el, leaveFromClass);
  9809. addTransitionClass(el, leaveToClass);
  9810. if (!hasExplicitCallback(onLeave)) {
  9811. whenTransitionEnds(el, type, leaveDuration, resolve2);
  9812. }
  9813. });
  9814. callHook2(onLeave, [el, resolve2]);
  9815. },
  9816. onEnterCancelled(el) {
  9817. finishEnter(el, false);
  9818. callHook2(onEnterCancelled, [el]);
  9819. },
  9820. onAppearCancelled(el) {
  9821. finishEnter(el, true);
  9822. callHook2(onAppearCancelled, [el]);
  9823. },
  9824. onLeaveCancelled(el) {
  9825. finishLeave(el);
  9826. callHook2(onLeaveCancelled, [el]);
  9827. }
  9828. });
  9829. }
  9830. function normalizeDuration(duration) {
  9831. if (duration == null) {
  9832. return null;
  9833. } else if (isObject(duration)) {
  9834. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  9835. } else {
  9836. const n = NumberOf(duration);
  9837. return [n, n];
  9838. }
  9839. }
  9840. function NumberOf(val) {
  9841. const res = toNumber(val);
  9842. if (true) {
  9843. assertNumber(res, "<transition> explicit duration");
  9844. }
  9845. return res;
  9846. }
  9847. function addTransitionClass(el, cls) {
  9848. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  9849. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  9850. }
  9851. function removeTransitionClass(el, cls) {
  9852. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  9853. const _vtc = el[vtcKey];
  9854. if (_vtc) {
  9855. _vtc.delete(cls);
  9856. if (!_vtc.size) {
  9857. el[vtcKey] = void 0;
  9858. }
  9859. }
  9860. }
  9861. function nextFrame(cb) {
  9862. requestAnimationFrame(() => {
  9863. requestAnimationFrame(cb);
  9864. });
  9865. }
  9866. var endId = 0;
  9867. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
  9868. const id = el._endId = ++endId;
  9869. const resolveIfNotStale = () => {
  9870. if (id === el._endId) {
  9871. resolve2();
  9872. }
  9873. };
  9874. if (explicitTimeout) {
  9875. return setTimeout(resolveIfNotStale, explicitTimeout);
  9876. }
  9877. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  9878. if (!type) {
  9879. return resolve2();
  9880. }
  9881. const endEvent = type + "end";
  9882. let ended = 0;
  9883. const end = () => {
  9884. el.removeEventListener(endEvent, onEnd);
  9885. resolveIfNotStale();
  9886. };
  9887. const onEnd = (e) => {
  9888. if (e.target === el && ++ended >= propCount) {
  9889. end();
  9890. }
  9891. };
  9892. setTimeout(() => {
  9893. if (ended < propCount) {
  9894. end();
  9895. }
  9896. }, timeout + 1);
  9897. el.addEventListener(endEvent, onEnd);
  9898. }
  9899. function getTransitionInfo(el, expectedType) {
  9900. const styles = window.getComputedStyle(el);
  9901. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  9902. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  9903. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  9904. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  9905. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  9906. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  9907. const animationTimeout = getTimeout(animationDelays, animationDurations);
  9908. let type = null;
  9909. let timeout = 0;
  9910. let propCount = 0;
  9911. if (expectedType === TRANSITION) {
  9912. if (transitionTimeout > 0) {
  9913. type = TRANSITION;
  9914. timeout = transitionTimeout;
  9915. propCount = transitionDurations.length;
  9916. }
  9917. } else if (expectedType === ANIMATION) {
  9918. if (animationTimeout > 0) {
  9919. type = ANIMATION;
  9920. timeout = animationTimeout;
  9921. propCount = animationDurations.length;
  9922. }
  9923. } else {
  9924. timeout = Math.max(transitionTimeout, animationTimeout);
  9925. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  9926. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  9927. }
  9928. const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
  9929. getStyleProperties(`${TRANSITION}Property`).toString()
  9930. );
  9931. return {
  9932. type,
  9933. timeout,
  9934. propCount,
  9935. hasTransform
  9936. };
  9937. }
  9938. function getTimeout(delays, durations) {
  9939. while (delays.length < durations.length) {
  9940. delays = delays.concat(delays);
  9941. }
  9942. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  9943. }
  9944. function toMs(s) {
  9945. if (s === "auto")
  9946. return 0;
  9947. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  9948. }
  9949. function forceReflow() {
  9950. return document.body.offsetHeight;
  9951. }
  9952. function patchClass(el, value, isSVG) {
  9953. const transitionClasses = el[vtcKey];
  9954. if (transitionClasses) {
  9955. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  9956. }
  9957. if (value == null) {
  9958. el.removeAttribute("class");
  9959. } else if (isSVG) {
  9960. el.setAttribute("class", value);
  9961. } else {
  9962. el.className = value;
  9963. }
  9964. }
  9965. var vShowOriginalDisplay = Symbol("_vod");
  9966. var vShowHidden = Symbol("_vsh");
  9967. var vShow = {
  9968. beforeMount(el, { value }, { transition }) {
  9969. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  9970. if (transition && value) {
  9971. transition.beforeEnter(el);
  9972. } else {
  9973. setDisplay(el, value);
  9974. }
  9975. },
  9976. mounted(el, { value }, { transition }) {
  9977. if (transition && value) {
  9978. transition.enter(el);
  9979. }
  9980. },
  9981. updated(el, { value, oldValue }, { transition }) {
  9982. if (!value === !oldValue)
  9983. return;
  9984. if (transition) {
  9985. if (value) {
  9986. transition.beforeEnter(el);
  9987. setDisplay(el, true);
  9988. transition.enter(el);
  9989. } else {
  9990. transition.leave(el, () => {
  9991. setDisplay(el, false);
  9992. });
  9993. }
  9994. } else {
  9995. setDisplay(el, value);
  9996. }
  9997. },
  9998. beforeUnmount(el, { value }) {
  9999. setDisplay(el, value);
  10000. }
  10001. };
  10002. if (true) {
  10003. vShow.name = "show";
  10004. }
  10005. function setDisplay(el, value) {
  10006. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  10007. el[vShowHidden] = !value;
  10008. }
  10009. function initVShowForSSR() {
  10010. vShow.getSSRProps = ({ value }) => {
  10011. if (!value) {
  10012. return { style: { display: "none" } };
  10013. }
  10014. };
  10015. }
  10016. var CSS_VAR_TEXT = Symbol(true ? "CSS_VAR_TEXT" : "");
  10017. function useCssVars(getter) {
  10018. const instance = getCurrentInstance();
  10019. if (!instance) {
  10020. warn2(`useCssVars is called without current active component instance.`);
  10021. return;
  10022. }
  10023. const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
  10024. Array.from(
  10025. document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
  10026. ).forEach((node) => setVarsOnNode(node, vars));
  10027. };
  10028. if (true) {
  10029. instance.getCssVars = () => getter(instance.proxy);
  10030. }
  10031. const setVars = () => {
  10032. const vars = getter(instance.proxy);
  10033. setVarsOnVNode(instance.subTree, vars);
  10034. updateTeleports(vars);
  10035. };
  10036. onMounted(() => {
  10037. watchPostEffect(setVars);
  10038. const ob = new MutationObserver(setVars);
  10039. ob.observe(instance.subTree.el.parentNode, { childList: true });
  10040. onUnmounted(() => ob.disconnect());
  10041. });
  10042. }
  10043. function setVarsOnVNode(vnode, vars) {
  10044. if (vnode.shapeFlag & 128) {
  10045. const suspense = vnode.suspense;
  10046. vnode = suspense.activeBranch;
  10047. if (suspense.pendingBranch && !suspense.isHydrating) {
  10048. suspense.effects.push(() => {
  10049. setVarsOnVNode(suspense.activeBranch, vars);
  10050. });
  10051. }
  10052. }
  10053. while (vnode.component) {
  10054. vnode = vnode.component.subTree;
  10055. }
  10056. if (vnode.shapeFlag & 1 && vnode.el) {
  10057. setVarsOnNode(vnode.el, vars);
  10058. } else if (vnode.type === Fragment) {
  10059. vnode.children.forEach((c) => setVarsOnVNode(c, vars));
  10060. } else if (vnode.type === Static) {
  10061. let { el, anchor } = vnode;
  10062. while (el) {
  10063. setVarsOnNode(el, vars);
  10064. if (el === anchor)
  10065. break;
  10066. el = el.nextSibling;
  10067. }
  10068. }
  10069. }
  10070. function setVarsOnNode(el, vars) {
  10071. if (el.nodeType === 1) {
  10072. const style = el.style;
  10073. let cssText = "";
  10074. for (const key in vars) {
  10075. style.setProperty(`--${key}`, vars[key]);
  10076. cssText += `--${key}: ${vars[key]};`;
  10077. }
  10078. style[CSS_VAR_TEXT] = cssText;
  10079. }
  10080. }
  10081. var displayRE = /(^|;)\s*display\s*:/;
  10082. function patchStyle(el, prev, next) {
  10083. const style = el.style;
  10084. const isCssString = isString(next);
  10085. let hasControlledDisplay = false;
  10086. if (next && !isCssString) {
  10087. if (prev) {
  10088. if (!isString(prev)) {
  10089. for (const key in prev) {
  10090. if (next[key] == null) {
  10091. setStyle(style, key, "");
  10092. }
  10093. }
  10094. } else {
  10095. for (const prevStyle of prev.split(";")) {
  10096. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  10097. if (next[key] == null) {
  10098. setStyle(style, key, "");
  10099. }
  10100. }
  10101. }
  10102. }
  10103. for (const key in next) {
  10104. if (key === "display") {
  10105. hasControlledDisplay = true;
  10106. }
  10107. setStyle(style, key, next[key]);
  10108. }
  10109. } else {
  10110. if (isCssString) {
  10111. if (prev !== next) {
  10112. const cssVarText = style[CSS_VAR_TEXT];
  10113. if (cssVarText) {
  10114. next += ";" + cssVarText;
  10115. }
  10116. style.cssText = next;
  10117. hasControlledDisplay = displayRE.test(next);
  10118. }
  10119. } else if (prev) {
  10120. el.removeAttribute("style");
  10121. }
  10122. }
  10123. if (vShowOriginalDisplay in el) {
  10124. el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
  10125. if (el[vShowHidden]) {
  10126. style.display = "none";
  10127. }
  10128. }
  10129. }
  10130. var semicolonRE = /[^\\];\s*$/;
  10131. var importantRE = /\s*!important$/;
  10132. function setStyle(style, name, val) {
  10133. if (isArray(val)) {
  10134. val.forEach((v) => setStyle(style, name, v));
  10135. } else {
  10136. if (val == null)
  10137. val = "";
  10138. if (true) {
  10139. if (semicolonRE.test(val)) {
  10140. warn2(
  10141. `Unexpected semicolon at the end of '${name}' style value: '${val}'`
  10142. );
  10143. }
  10144. }
  10145. if (name.startsWith("--")) {
  10146. style.setProperty(name, val);
  10147. } else {
  10148. const prefixed = autoPrefix(style, name);
  10149. if (importantRE.test(val)) {
  10150. style.setProperty(
  10151. hyphenate(prefixed),
  10152. val.replace(importantRE, ""),
  10153. "important"
  10154. );
  10155. } else {
  10156. style[prefixed] = val;
  10157. }
  10158. }
  10159. }
  10160. }
  10161. var prefixes = ["Webkit", "Moz", "ms"];
  10162. var prefixCache = {};
  10163. function autoPrefix(style, rawName) {
  10164. const cached = prefixCache[rawName];
  10165. if (cached) {
  10166. return cached;
  10167. }
  10168. let name = camelize(rawName);
  10169. if (name !== "filter" && name in style) {
  10170. return prefixCache[rawName] = name;
  10171. }
  10172. name = capitalize(name);
  10173. for (let i = 0; i < prefixes.length; i++) {
  10174. const prefixed = prefixes[i] + name;
  10175. if (prefixed in style) {
  10176. return prefixCache[rawName] = prefixed;
  10177. }
  10178. }
  10179. return rawName;
  10180. }
  10181. var xlinkNS = "http://www.w3.org/1999/xlink";
  10182. function patchAttr(el, key, value, isSVG, instance) {
  10183. if (isSVG && key.startsWith("xlink:")) {
  10184. if (value == null) {
  10185. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  10186. } else {
  10187. el.setAttributeNS(xlinkNS, key, value);
  10188. }
  10189. } else {
  10190. const isBoolean2 = isSpecialBooleanAttr(key);
  10191. if (value == null || isBoolean2 && !includeBooleanAttr(value)) {
  10192. el.removeAttribute(key);
  10193. } else {
  10194. el.setAttribute(key, isBoolean2 ? "" : value);
  10195. }
  10196. }
  10197. }
  10198. function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
  10199. if (key === "innerHTML" || key === "textContent") {
  10200. if (prevChildren) {
  10201. unmountChildren(prevChildren, parentComponent, parentSuspense);
  10202. }
  10203. el[key] = value == null ? "" : value;
  10204. return;
  10205. }
  10206. const tag = el.tagName;
  10207. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  10208. !tag.includes("-")) {
  10209. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  10210. const newValue = value == null ? "" : value;
  10211. if (oldValue !== newValue || !("_value" in el)) {
  10212. el.value = newValue;
  10213. }
  10214. if (value == null) {
  10215. el.removeAttribute(key);
  10216. }
  10217. el._value = value;
  10218. return;
  10219. }
  10220. let needRemove = false;
  10221. if (value === "" || value == null) {
  10222. const type = typeof el[key];
  10223. if (type === "boolean") {
  10224. value = includeBooleanAttr(value);
  10225. } else if (value == null && type === "string") {
  10226. value = "";
  10227. needRemove = true;
  10228. } else if (type === "number") {
  10229. value = 0;
  10230. needRemove = true;
  10231. }
  10232. }
  10233. try {
  10234. el[key] = value;
  10235. } catch (e) {
  10236. if (!needRemove) {
  10237. warn2(
  10238. `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
  10239. e
  10240. );
  10241. }
  10242. }
  10243. needRemove && el.removeAttribute(key);
  10244. }
  10245. function addEventListener(el, event, handler, options) {
  10246. el.addEventListener(event, handler, options);
  10247. }
  10248. function removeEventListener(el, event, handler, options) {
  10249. el.removeEventListener(event, handler, options);
  10250. }
  10251. var veiKey = Symbol("_vei");
  10252. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  10253. const invokers = el[veiKey] || (el[veiKey] = {});
  10254. const existingInvoker = invokers[rawName];
  10255. if (nextValue && existingInvoker) {
  10256. existingInvoker.value = true ? sanitizeEventValue(nextValue, rawName) : nextValue;
  10257. } else {
  10258. const [name, options] = parseName(rawName);
  10259. if (nextValue) {
  10260. const invoker = invokers[rawName] = createInvoker(
  10261. true ? sanitizeEventValue(nextValue, rawName) : nextValue,
  10262. instance
  10263. );
  10264. addEventListener(el, name, invoker, options);
  10265. } else if (existingInvoker) {
  10266. removeEventListener(el, name, existingInvoker, options);
  10267. invokers[rawName] = void 0;
  10268. }
  10269. }
  10270. }
  10271. var optionsModifierRE = /(?:Once|Passive|Capture)$/;
  10272. function parseName(name) {
  10273. let options;
  10274. if (optionsModifierRE.test(name)) {
  10275. options = {};
  10276. let m;
  10277. while (m = name.match(optionsModifierRE)) {
  10278. name = name.slice(0, name.length - m[0].length);
  10279. options[m[0].toLowerCase()] = true;
  10280. }
  10281. }
  10282. const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
  10283. return [event, options];
  10284. }
  10285. var cachedNow = 0;
  10286. var p = Promise.resolve();
  10287. var getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  10288. function createInvoker(initialValue, instance) {
  10289. const invoker = (e) => {
  10290. if (!e._vts) {
  10291. e._vts = Date.now();
  10292. } else if (e._vts <= invoker.attached) {
  10293. return;
  10294. }
  10295. callWithAsyncErrorHandling(
  10296. patchStopImmediatePropagation(e, invoker.value),
  10297. instance,
  10298. 5,
  10299. [e]
  10300. );
  10301. };
  10302. invoker.value = initialValue;
  10303. invoker.attached = getNow();
  10304. return invoker;
  10305. }
  10306. function sanitizeEventValue(value, propName) {
  10307. if (isFunction(value) || isArray(value)) {
  10308. return value;
  10309. }
  10310. warn2(
  10311. `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
  10312. Expected function or array of functions, received type ${typeof value}.`
  10313. );
  10314. return NOOP;
  10315. }
  10316. function patchStopImmediatePropagation(e, value) {
  10317. if (isArray(value)) {
  10318. const originalStop = e.stopImmediatePropagation;
  10319. e.stopImmediatePropagation = () => {
  10320. originalStop.call(e);
  10321. e._stopped = true;
  10322. };
  10323. return value.map(
  10324. (fn) => (e2) => !e2._stopped && fn && fn(e2)
  10325. );
  10326. } else {
  10327. return value;
  10328. }
  10329. }
  10330. var isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  10331. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  10332. var patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
  10333. const isSVG = namespace === "svg";
  10334. if (key === "class") {
  10335. patchClass(el, nextValue, isSVG);
  10336. } else if (key === "style") {
  10337. patchStyle(el, prevValue, nextValue);
  10338. } else if (isOn(key)) {
  10339. if (!isModelListener(key)) {
  10340. patchEvent(el, key, prevValue, nextValue, parentComponent);
  10341. }
  10342. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  10343. patchDOMProp(
  10344. el,
  10345. key,
  10346. nextValue,
  10347. prevChildren,
  10348. parentComponent,
  10349. parentSuspense,
  10350. unmountChildren
  10351. );
  10352. } else {
  10353. if (key === "true-value") {
  10354. el._trueValue = nextValue;
  10355. } else if (key === "false-value") {
  10356. el._falseValue = nextValue;
  10357. }
  10358. patchAttr(el, key, nextValue, isSVG);
  10359. }
  10360. };
  10361. function shouldSetAsProp(el, key, value, isSVG) {
  10362. if (isSVG) {
  10363. if (key === "innerHTML" || key === "textContent") {
  10364. return true;
  10365. }
  10366. if (key in el && isNativeOn(key) && isFunction(value)) {
  10367. return true;
  10368. }
  10369. return false;
  10370. }
  10371. if (key === "spellcheck" || key === "draggable" || key === "translate") {
  10372. return false;
  10373. }
  10374. if (key === "form") {
  10375. return false;
  10376. }
  10377. if (key === "list" && el.tagName === "INPUT") {
  10378. return false;
  10379. }
  10380. if (key === "type" && el.tagName === "TEXTAREA") {
  10381. return false;
  10382. }
  10383. if (key === "width" || key === "height") {
  10384. const tag = el.tagName;
  10385. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  10386. return false;
  10387. }
  10388. }
  10389. if (isNativeOn(key) && isString(value)) {
  10390. return false;
  10391. }
  10392. return key in el;
  10393. }
  10394. function defineCustomElement(options, hydrate2) {
  10395. const Comp = defineComponent(options);
  10396. class VueCustomElement extends VueElement {
  10397. constructor(initialProps) {
  10398. super(Comp, initialProps, hydrate2);
  10399. }
  10400. }
  10401. VueCustomElement.def = Comp;
  10402. return VueCustomElement;
  10403. }
  10404. var defineSSRCustomElement = (options) => {
  10405. return defineCustomElement(options, hydrate);
  10406. };
  10407. var BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
  10408. };
  10409. var VueElement = class _VueElement extends BaseClass {
  10410. constructor(_def, _props = {}, hydrate2) {
  10411. super();
  10412. this._def = _def;
  10413. this._props = _props;
  10414. this._instance = null;
  10415. this._connected = false;
  10416. this._resolved = false;
  10417. this._numberProps = null;
  10418. this._ob = null;
  10419. if (this.shadowRoot && hydrate2) {
  10420. hydrate2(this._createVNode(), this.shadowRoot);
  10421. } else {
  10422. if (this.shadowRoot) {
  10423. warn2(
  10424. `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
  10425. );
  10426. }
  10427. this.attachShadow({ mode: "open" });
  10428. if (!this._def.__asyncLoader) {
  10429. this._resolveProps(this._def);
  10430. }
  10431. }
  10432. }
  10433. connectedCallback() {
  10434. this._connected = true;
  10435. if (!this._instance) {
  10436. if (this._resolved) {
  10437. this._update();
  10438. } else {
  10439. this._resolveDef();
  10440. }
  10441. }
  10442. }
  10443. disconnectedCallback() {
  10444. this._connected = false;
  10445. if (this._ob) {
  10446. this._ob.disconnect();
  10447. this._ob = null;
  10448. }
  10449. nextTick(() => {
  10450. if (!this._connected) {
  10451. render(null, this.shadowRoot);
  10452. this._instance = null;
  10453. }
  10454. });
  10455. }
  10456. /**
  10457. * resolve inner component definition (handle possible async component)
  10458. */
  10459. _resolveDef() {
  10460. this._resolved = true;
  10461. for (let i = 0; i < this.attributes.length; i++) {
  10462. this._setAttr(this.attributes[i].name);
  10463. }
  10464. this._ob = new MutationObserver((mutations) => {
  10465. for (const m of mutations) {
  10466. this._setAttr(m.attributeName);
  10467. }
  10468. });
  10469. this._ob.observe(this, { attributes: true });
  10470. const resolve2 = (def2, isAsync = false) => {
  10471. const { props, styles } = def2;
  10472. let numberProps;
  10473. if (props && !isArray(props)) {
  10474. for (const key in props) {
  10475. const opt = props[key];
  10476. if (opt === Number || opt && opt.type === Number) {
  10477. if (key in this._props) {
  10478. this._props[key] = toNumber(this._props[key]);
  10479. }
  10480. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
  10481. }
  10482. }
  10483. }
  10484. this._numberProps = numberProps;
  10485. if (isAsync) {
  10486. this._resolveProps(def2);
  10487. }
  10488. this._applyStyles(styles);
  10489. this._update();
  10490. };
  10491. const asyncDef = this._def.__asyncLoader;
  10492. if (asyncDef) {
  10493. asyncDef().then((def2) => resolve2(def2, true));
  10494. } else {
  10495. resolve2(this._def);
  10496. }
  10497. }
  10498. _resolveProps(def2) {
  10499. const { props } = def2;
  10500. const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
  10501. for (const key of Object.keys(this)) {
  10502. if (key[0] !== "_" && declaredPropKeys.includes(key)) {
  10503. this._setProp(key, this[key], true, false);
  10504. }
  10505. }
  10506. for (const key of declaredPropKeys.map(camelize)) {
  10507. Object.defineProperty(this, key, {
  10508. get() {
  10509. return this._getProp(key);
  10510. },
  10511. set(val) {
  10512. this._setProp(key, val);
  10513. }
  10514. });
  10515. }
  10516. }
  10517. _setAttr(key) {
  10518. let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
  10519. const camelKey = camelize(key);
  10520. if (this._numberProps && this._numberProps[camelKey]) {
  10521. value = toNumber(value);
  10522. }
  10523. this._setProp(camelKey, value, false);
  10524. }
  10525. /**
  10526. * @internal
  10527. */
  10528. _getProp(key) {
  10529. return this._props[key];
  10530. }
  10531. /**
  10532. * @internal
  10533. */
  10534. _setProp(key, val, shouldReflect = true, shouldUpdate = true) {
  10535. if (val !== this._props[key]) {
  10536. this._props[key] = val;
  10537. if (shouldUpdate && this._instance) {
  10538. this._update();
  10539. }
  10540. if (shouldReflect) {
  10541. if (val === true) {
  10542. this.setAttribute(hyphenate(key), "");
  10543. } else if (typeof val === "string" || typeof val === "number") {
  10544. this.setAttribute(hyphenate(key), val + "");
  10545. } else if (!val) {
  10546. this.removeAttribute(hyphenate(key));
  10547. }
  10548. }
  10549. }
  10550. }
  10551. _update() {
  10552. render(this._createVNode(), this.shadowRoot);
  10553. }
  10554. _createVNode() {
  10555. const vnode = createVNode(this._def, extend({}, this._props));
  10556. if (!this._instance) {
  10557. vnode.ce = (instance) => {
  10558. this._instance = instance;
  10559. instance.isCE = true;
  10560. if (true) {
  10561. instance.ceReload = (newStyles) => {
  10562. if (this._styles) {
  10563. this._styles.forEach((s) => this.shadowRoot.removeChild(s));
  10564. this._styles.length = 0;
  10565. }
  10566. this._applyStyles(newStyles);
  10567. this._instance = null;
  10568. this._update();
  10569. };
  10570. }
  10571. const dispatch = (event, args) => {
  10572. this.dispatchEvent(
  10573. new CustomEvent(event, {
  10574. detail: args
  10575. })
  10576. );
  10577. };
  10578. instance.emit = (event, ...args) => {
  10579. dispatch(event, args);
  10580. if (hyphenate(event) !== event) {
  10581. dispatch(hyphenate(event), args);
  10582. }
  10583. };
  10584. let parent = this;
  10585. while (parent = parent && (parent.parentNode || parent.host)) {
  10586. if (parent instanceof _VueElement) {
  10587. instance.parent = parent._instance;
  10588. instance.provides = parent._instance.provides;
  10589. break;
  10590. }
  10591. }
  10592. };
  10593. }
  10594. return vnode;
  10595. }
  10596. _applyStyles(styles) {
  10597. if (styles) {
  10598. styles.forEach((css) => {
  10599. const s = document.createElement("style");
  10600. s.textContent = css;
  10601. this.shadowRoot.appendChild(s);
  10602. if (true) {
  10603. (this._styles || (this._styles = [])).push(s);
  10604. }
  10605. });
  10606. }
  10607. }
  10608. };
  10609. function useCssModule(name = "$style") {
  10610. {
  10611. const instance = getCurrentInstance();
  10612. if (!instance) {
  10613. warn2(`useCssModule must be called inside setup()`);
  10614. return EMPTY_OBJ;
  10615. }
  10616. const modules = instance.type.__cssModules;
  10617. if (!modules) {
  10618. warn2(`Current instance does not have CSS modules injected.`);
  10619. return EMPTY_OBJ;
  10620. }
  10621. const mod = modules[name];
  10622. if (!mod) {
  10623. warn2(`Current instance does not have CSS module named "${name}".`);
  10624. return EMPTY_OBJ;
  10625. }
  10626. return mod;
  10627. }
  10628. }
  10629. var positionMap = /* @__PURE__ */ new WeakMap();
  10630. var newPositionMap = /* @__PURE__ */ new WeakMap();
  10631. var moveCbKey = Symbol("_moveCb");
  10632. var enterCbKey2 = Symbol("_enterCb");
  10633. var TransitionGroupImpl = {
  10634. name: "TransitionGroup",
  10635. props: extend({}, TransitionPropsValidators, {
  10636. tag: String,
  10637. moveClass: String
  10638. }),
  10639. setup(props, { slots }) {
  10640. const instance = getCurrentInstance();
  10641. const state = useTransitionState();
  10642. let prevChildren;
  10643. let children;
  10644. onUpdated(() => {
  10645. if (!prevChildren.length) {
  10646. return;
  10647. }
  10648. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  10649. if (!hasCSSTransform(
  10650. prevChildren[0].el,
  10651. instance.vnode.el,
  10652. moveClass
  10653. )) {
  10654. return;
  10655. }
  10656. prevChildren.forEach(callPendingCbs);
  10657. prevChildren.forEach(recordPosition);
  10658. const movedChildren = prevChildren.filter(applyTranslation);
  10659. forceReflow();
  10660. movedChildren.forEach((c) => {
  10661. const el = c.el;
  10662. const style = el.style;
  10663. addTransitionClass(el, moveClass);
  10664. style.transform = style.webkitTransform = style.transitionDuration = "";
  10665. const cb = el[moveCbKey] = (e) => {
  10666. if (e && e.target !== el) {
  10667. return;
  10668. }
  10669. if (!e || /transform$/.test(e.propertyName)) {
  10670. el.removeEventListener("transitionend", cb);
  10671. el[moveCbKey] = null;
  10672. removeTransitionClass(el, moveClass);
  10673. }
  10674. };
  10675. el.addEventListener("transitionend", cb);
  10676. });
  10677. });
  10678. return () => {
  10679. const rawProps = toRaw(props);
  10680. const cssTransitionProps = resolveTransitionProps(rawProps);
  10681. let tag = rawProps.tag || Fragment;
  10682. prevChildren = [];
  10683. if (children) {
  10684. for (let i = 0; i < children.length; i++) {
  10685. const child = children[i];
  10686. if (child.el && child.el instanceof Element) {
  10687. prevChildren.push(child);
  10688. setTransitionHooks(
  10689. child,
  10690. resolveTransitionHooks(
  10691. child,
  10692. cssTransitionProps,
  10693. state,
  10694. instance
  10695. )
  10696. );
  10697. positionMap.set(
  10698. child,
  10699. child.el.getBoundingClientRect()
  10700. );
  10701. }
  10702. }
  10703. }
  10704. children = slots.default ? getTransitionRawChildren(slots.default()) : [];
  10705. for (let i = 0; i < children.length; i++) {
  10706. const child = children[i];
  10707. if (child.key != null) {
  10708. setTransitionHooks(
  10709. child,
  10710. resolveTransitionHooks(child, cssTransitionProps, state, instance)
  10711. );
  10712. } else if (true) {
  10713. warn2(`<TransitionGroup> children must be keyed.`);
  10714. }
  10715. }
  10716. return createVNode(tag, null, children);
  10717. };
  10718. }
  10719. };
  10720. var removeMode = (props) => delete props.mode;
  10721. removeMode(TransitionGroupImpl.props);
  10722. var TransitionGroup = TransitionGroupImpl;
  10723. function callPendingCbs(c) {
  10724. const el = c.el;
  10725. if (el[moveCbKey]) {
  10726. el[moveCbKey]();
  10727. }
  10728. if (el[enterCbKey2]) {
  10729. el[enterCbKey2]();
  10730. }
  10731. }
  10732. function recordPosition(c) {
  10733. newPositionMap.set(c, c.el.getBoundingClientRect());
  10734. }
  10735. function applyTranslation(c) {
  10736. const oldPos = positionMap.get(c);
  10737. const newPos = newPositionMap.get(c);
  10738. const dx = oldPos.left - newPos.left;
  10739. const dy = oldPos.top - newPos.top;
  10740. if (dx || dy) {
  10741. const s = c.el.style;
  10742. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  10743. s.transitionDuration = "0s";
  10744. return c;
  10745. }
  10746. }
  10747. function hasCSSTransform(el, root, moveClass) {
  10748. const clone = el.cloneNode();
  10749. const _vtc = el[vtcKey];
  10750. if (_vtc) {
  10751. _vtc.forEach((cls) => {
  10752. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  10753. });
  10754. }
  10755. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  10756. clone.style.display = "none";
  10757. const container = root.nodeType === 1 ? root : root.parentNode;
  10758. container.appendChild(clone);
  10759. const { hasTransform } = getTransitionInfo(clone);
  10760. container.removeChild(clone);
  10761. return hasTransform;
  10762. }
  10763. var getModelAssigner = (vnode) => {
  10764. const fn = vnode.props["onUpdate:modelValue"] || false;
  10765. return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
  10766. };
  10767. function onCompositionStart(e) {
  10768. e.target.composing = true;
  10769. }
  10770. function onCompositionEnd(e) {
  10771. const target = e.target;
  10772. if (target.composing) {
  10773. target.composing = false;
  10774. target.dispatchEvent(new Event("input"));
  10775. }
  10776. }
  10777. var assignKey = Symbol("_assign");
  10778. var vModelText = {
  10779. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  10780. el[assignKey] = getModelAssigner(vnode);
  10781. const castToNumber = number || vnode.props && vnode.props.type === "number";
  10782. addEventListener(el, lazy ? "change" : "input", (e) => {
  10783. if (e.target.composing)
  10784. return;
  10785. let domValue = el.value;
  10786. if (trim) {
  10787. domValue = domValue.trim();
  10788. }
  10789. if (castToNumber) {
  10790. domValue = looseToNumber(domValue);
  10791. }
  10792. el[assignKey](domValue);
  10793. });
  10794. if (trim) {
  10795. addEventListener(el, "change", () => {
  10796. el.value = el.value.trim();
  10797. });
  10798. }
  10799. if (!lazy) {
  10800. addEventListener(el, "compositionstart", onCompositionStart);
  10801. addEventListener(el, "compositionend", onCompositionEnd);
  10802. addEventListener(el, "change", onCompositionEnd);
  10803. }
  10804. },
  10805. // set value on mounted so it's after min/max for type="range"
  10806. mounted(el, { value }) {
  10807. el.value = value == null ? "" : value;
  10808. },
  10809. beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
  10810. el[assignKey] = getModelAssigner(vnode);
  10811. if (el.composing)
  10812. return;
  10813. const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
  10814. const newValue = value == null ? "" : value;
  10815. if (elValue === newValue) {
  10816. return;
  10817. }
  10818. if (document.activeElement === el && el.type !== "range") {
  10819. if (lazy) {
  10820. return;
  10821. }
  10822. if (trim && el.value.trim() === newValue) {
  10823. return;
  10824. }
  10825. }
  10826. el.value = newValue;
  10827. }
  10828. };
  10829. var vModelCheckbox = {
  10830. // #4096 array checkboxes need to be deep traversed
  10831. deep: true,
  10832. created(el, _, vnode) {
  10833. el[assignKey] = getModelAssigner(vnode);
  10834. addEventListener(el, "change", () => {
  10835. const modelValue = el._modelValue;
  10836. const elementValue = getValue(el);
  10837. const checked = el.checked;
  10838. const assign = el[assignKey];
  10839. if (isArray(modelValue)) {
  10840. const index = looseIndexOf(modelValue, elementValue);
  10841. const found = index !== -1;
  10842. if (checked && !found) {
  10843. assign(modelValue.concat(elementValue));
  10844. } else if (!checked && found) {
  10845. const filtered = [...modelValue];
  10846. filtered.splice(index, 1);
  10847. assign(filtered);
  10848. }
  10849. } else if (isSet(modelValue)) {
  10850. const cloned = new Set(modelValue);
  10851. if (checked) {
  10852. cloned.add(elementValue);
  10853. } else {
  10854. cloned.delete(elementValue);
  10855. }
  10856. assign(cloned);
  10857. } else {
  10858. assign(getCheckboxValue(el, checked));
  10859. }
  10860. });
  10861. },
  10862. // set initial checked on mount to wait for true-value/false-value
  10863. mounted: setChecked,
  10864. beforeUpdate(el, binding, vnode) {
  10865. el[assignKey] = getModelAssigner(vnode);
  10866. setChecked(el, binding, vnode);
  10867. }
  10868. };
  10869. function setChecked(el, { value, oldValue }, vnode) {
  10870. el._modelValue = value;
  10871. if (isArray(value)) {
  10872. el.checked = looseIndexOf(value, vnode.props.value) > -1;
  10873. } else if (isSet(value)) {
  10874. el.checked = value.has(vnode.props.value);
  10875. } else if (value !== oldValue) {
  10876. el.checked = looseEqual(value, getCheckboxValue(el, true));
  10877. }
  10878. }
  10879. var vModelRadio = {
  10880. created(el, { value }, vnode) {
  10881. el.checked = looseEqual(value, vnode.props.value);
  10882. el[assignKey] = getModelAssigner(vnode);
  10883. addEventListener(el, "change", () => {
  10884. el[assignKey](getValue(el));
  10885. });
  10886. },
  10887. beforeUpdate(el, { value, oldValue }, vnode) {
  10888. el[assignKey] = getModelAssigner(vnode);
  10889. if (value !== oldValue) {
  10890. el.checked = looseEqual(value, vnode.props.value);
  10891. }
  10892. }
  10893. };
  10894. var vModelSelect = {
  10895. // <select multiple> value need to be deep traversed
  10896. deep: true,
  10897. created(el, { value, modifiers: { number } }, vnode) {
  10898. const isSetModel = isSet(value);
  10899. addEventListener(el, "change", () => {
  10900. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
  10901. (o) => number ? looseToNumber(getValue(o)) : getValue(o)
  10902. );
  10903. el[assignKey](
  10904. el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
  10905. );
  10906. el._assigning = true;
  10907. nextTick(() => {
  10908. el._assigning = false;
  10909. });
  10910. });
  10911. el[assignKey] = getModelAssigner(vnode);
  10912. },
  10913. // set value in mounted & updated because <select> relies on its children
  10914. // <option>s.
  10915. mounted(el, { value, modifiers: { number } }) {
  10916. setSelected(el, value);
  10917. },
  10918. beforeUpdate(el, _binding, vnode) {
  10919. el[assignKey] = getModelAssigner(vnode);
  10920. },
  10921. updated(el, { value, modifiers: { number } }) {
  10922. if (!el._assigning) {
  10923. setSelected(el, value);
  10924. }
  10925. }
  10926. };
  10927. function setSelected(el, value, number) {
  10928. const isMultiple = el.multiple;
  10929. const isArrayValue = isArray(value);
  10930. if (isMultiple && !isArrayValue && !isSet(value)) {
  10931. warn2(
  10932. `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
  10933. );
  10934. return;
  10935. }
  10936. for (let i = 0, l = el.options.length; i < l; i++) {
  10937. const option = el.options[i];
  10938. const optionValue = getValue(option);
  10939. if (isMultiple) {
  10940. if (isArrayValue) {
  10941. const optionType = typeof optionValue;
  10942. if (optionType === "string" || optionType === "number") {
  10943. option.selected = value.some((v) => String(v) === String(optionValue));
  10944. } else {
  10945. option.selected = looseIndexOf(value, optionValue) > -1;
  10946. }
  10947. } else {
  10948. option.selected = value.has(optionValue);
  10949. }
  10950. } else if (looseEqual(getValue(option), value)) {
  10951. if (el.selectedIndex !== i)
  10952. el.selectedIndex = i;
  10953. return;
  10954. }
  10955. }
  10956. if (!isMultiple && el.selectedIndex !== -1) {
  10957. el.selectedIndex = -1;
  10958. }
  10959. }
  10960. function getValue(el) {
  10961. return "_value" in el ? el._value : el.value;
  10962. }
  10963. function getCheckboxValue(el, checked) {
  10964. const key = checked ? "_trueValue" : "_falseValue";
  10965. return key in el ? el[key] : checked;
  10966. }
  10967. var vModelDynamic = {
  10968. created(el, binding, vnode) {
  10969. callModelHook(el, binding, vnode, null, "created");
  10970. },
  10971. mounted(el, binding, vnode) {
  10972. callModelHook(el, binding, vnode, null, "mounted");
  10973. },
  10974. beforeUpdate(el, binding, vnode, prevVNode) {
  10975. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  10976. },
  10977. updated(el, binding, vnode, prevVNode) {
  10978. callModelHook(el, binding, vnode, prevVNode, "updated");
  10979. }
  10980. };
  10981. function resolveDynamicModel(tagName, type) {
  10982. switch (tagName) {
  10983. case "SELECT":
  10984. return vModelSelect;
  10985. case "TEXTAREA":
  10986. return vModelText;
  10987. default:
  10988. switch (type) {
  10989. case "checkbox":
  10990. return vModelCheckbox;
  10991. case "radio":
  10992. return vModelRadio;
  10993. default:
  10994. return vModelText;
  10995. }
  10996. }
  10997. }
  10998. function callModelHook(el, binding, vnode, prevVNode, hook) {
  10999. const modelToUse = resolveDynamicModel(
  11000. el.tagName,
  11001. vnode.props && vnode.props.type
  11002. );
  11003. const fn = modelToUse[hook];
  11004. fn && fn(el, binding, vnode, prevVNode);
  11005. }
  11006. function initVModelForSSR() {
  11007. vModelText.getSSRProps = ({ value }) => ({ value });
  11008. vModelRadio.getSSRProps = ({ value }, vnode) => {
  11009. if (vnode.props && looseEqual(vnode.props.value, value)) {
  11010. return { checked: true };
  11011. }
  11012. };
  11013. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  11014. if (isArray(value)) {
  11015. if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {
  11016. return { checked: true };
  11017. }
  11018. } else if (isSet(value)) {
  11019. if (vnode.props && value.has(vnode.props.value)) {
  11020. return { checked: true };
  11021. }
  11022. } else if (value) {
  11023. return { checked: true };
  11024. }
  11025. };
  11026. vModelDynamic.getSSRProps = (binding, vnode) => {
  11027. if (typeof vnode.type !== "string") {
  11028. return;
  11029. }
  11030. const modelToUse = resolveDynamicModel(
  11031. // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
  11032. vnode.type.toUpperCase(),
  11033. vnode.props && vnode.props.type
  11034. );
  11035. if (modelToUse.getSSRProps) {
  11036. return modelToUse.getSSRProps(binding, vnode);
  11037. }
  11038. };
  11039. }
  11040. var systemModifiers = ["ctrl", "shift", "alt", "meta"];
  11041. var modifierGuards = {
  11042. stop: (e) => e.stopPropagation(),
  11043. prevent: (e) => e.preventDefault(),
  11044. self: (e) => e.target !== e.currentTarget,
  11045. ctrl: (e) => !e.ctrlKey,
  11046. shift: (e) => !e.shiftKey,
  11047. alt: (e) => !e.altKey,
  11048. meta: (e) => !e.metaKey,
  11049. left: (e) => "button" in e && e.button !== 0,
  11050. middle: (e) => "button" in e && e.button !== 1,
  11051. right: (e) => "button" in e && e.button !== 2,
  11052. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  11053. };
  11054. var withModifiers = (fn, modifiers) => {
  11055. const cache = fn._withMods || (fn._withMods = {});
  11056. const cacheKey = modifiers.join(".");
  11057. return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
  11058. for (let i = 0; i < modifiers.length; i++) {
  11059. const guard = modifierGuards[modifiers[i]];
  11060. if (guard && guard(event, modifiers))
  11061. return;
  11062. }
  11063. return fn(event, ...args);
  11064. });
  11065. };
  11066. var keyNames = {
  11067. esc: "escape",
  11068. space: " ",
  11069. up: "arrow-up",
  11070. left: "arrow-left",
  11071. right: "arrow-right",
  11072. down: "arrow-down",
  11073. delete: "backspace"
  11074. };
  11075. var withKeys = (fn, modifiers) => {
  11076. const cache = fn._withKeys || (fn._withKeys = {});
  11077. const cacheKey = modifiers.join(".");
  11078. return cache[cacheKey] || (cache[cacheKey] = (event) => {
  11079. if (!("key" in event)) {
  11080. return;
  11081. }
  11082. const eventKey = hyphenate(event.key);
  11083. if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {
  11084. return fn(event);
  11085. }
  11086. });
  11087. };
  11088. var rendererOptions = extend({ patchProp }, nodeOps);
  11089. var renderer;
  11090. var enabledHydration = false;
  11091. function ensureRenderer() {
  11092. return renderer || (renderer = createRenderer(rendererOptions));
  11093. }
  11094. function ensureHydrationRenderer() {
  11095. renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
  11096. enabledHydration = true;
  11097. return renderer;
  11098. }
  11099. var render = (...args) => {
  11100. ensureRenderer().render(...args);
  11101. };
  11102. var hydrate = (...args) => {
  11103. ensureHydrationRenderer().hydrate(...args);
  11104. };
  11105. var createApp = (...args) => {
  11106. const app = ensureRenderer().createApp(...args);
  11107. if (true) {
  11108. injectNativeTagCheck(app);
  11109. injectCompilerOptionsCheck(app);
  11110. }
  11111. const { mount } = app;
  11112. app.mount = (containerOrSelector) => {
  11113. const container = normalizeContainer(containerOrSelector);
  11114. if (!container)
  11115. return;
  11116. const component = app._component;
  11117. if (!isFunction(component) && !component.render && !component.template) {
  11118. component.template = container.innerHTML;
  11119. }
  11120. container.innerHTML = "";
  11121. const proxy = mount(container, false, resolveRootNamespace(container));
  11122. if (container instanceof Element) {
  11123. container.removeAttribute("v-cloak");
  11124. container.setAttribute("data-v-app", "");
  11125. }
  11126. return proxy;
  11127. };
  11128. return app;
  11129. };
  11130. var createSSRApp = (...args) => {
  11131. const app = ensureHydrationRenderer().createApp(...args);
  11132. if (true) {
  11133. injectNativeTagCheck(app);
  11134. injectCompilerOptionsCheck(app);
  11135. }
  11136. const { mount } = app;
  11137. app.mount = (containerOrSelector) => {
  11138. const container = normalizeContainer(containerOrSelector);
  11139. if (container) {
  11140. return mount(container, true, resolveRootNamespace(container));
  11141. }
  11142. };
  11143. return app;
  11144. };
  11145. function resolveRootNamespace(container) {
  11146. if (container instanceof SVGElement) {
  11147. return "svg";
  11148. }
  11149. if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
  11150. return "mathml";
  11151. }
  11152. }
  11153. function injectNativeTagCheck(app) {
  11154. Object.defineProperty(app.config, "isNativeTag", {
  11155. value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
  11156. writable: false
  11157. });
  11158. }
  11159. function injectCompilerOptionsCheck(app) {
  11160. if (isRuntimeOnly()) {
  11161. const isCustomElement = app.config.isCustomElement;
  11162. Object.defineProperty(app.config, "isCustomElement", {
  11163. get() {
  11164. return isCustomElement;
  11165. },
  11166. set() {
  11167. warn2(
  11168. `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
  11169. );
  11170. }
  11171. });
  11172. const compilerOptions = app.config.compilerOptions;
  11173. const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
  11174. - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
  11175. - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
  11176. - For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
  11177. Object.defineProperty(app.config, "compilerOptions", {
  11178. get() {
  11179. warn2(msg);
  11180. return compilerOptions;
  11181. },
  11182. set() {
  11183. warn2(msg);
  11184. }
  11185. });
  11186. }
  11187. }
  11188. function normalizeContainer(container) {
  11189. if (isString(container)) {
  11190. const res = document.querySelector(container);
  11191. if (!res) {
  11192. warn2(
  11193. `Failed to mount app: mount target selector "${container}" returned null.`
  11194. );
  11195. }
  11196. return res;
  11197. }
  11198. if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
  11199. warn2(
  11200. `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
  11201. );
  11202. }
  11203. return container;
  11204. }
  11205. var ssrDirectiveInitialized = false;
  11206. var initDirectivesForSSR = () => {
  11207. if (!ssrDirectiveInitialized) {
  11208. ssrDirectiveInitialized = true;
  11209. initVModelForSSR();
  11210. initVShowForSSR();
  11211. }
  11212. };
  11213. // node_modules/vue/dist/vue.runtime.esm-bundler.js
  11214. function initDev() {
  11215. {
  11216. initCustomFormatter();
  11217. }
  11218. }
  11219. if (true) {
  11220. initDev();
  11221. }
  11222. var compile2 = () => {
  11223. if (true) {
  11224. warn2(
  11225. `Runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  11226. );
  11227. }
  11228. };
  11229. export {
  11230. BaseTransition,
  11231. BaseTransitionPropsValidators,
  11232. Comment,
  11233. DeprecationTypes,
  11234. EffectScope,
  11235. ErrorCodes,
  11236. ErrorTypeStrings,
  11237. Fragment,
  11238. KeepAlive,
  11239. ReactiveEffect,
  11240. Static,
  11241. Suspense,
  11242. Teleport,
  11243. Text,
  11244. TrackOpTypes,
  11245. Transition,
  11246. TransitionGroup,
  11247. TriggerOpTypes,
  11248. VueElement,
  11249. assertNumber,
  11250. callWithAsyncErrorHandling,
  11251. callWithErrorHandling,
  11252. camelize,
  11253. capitalize,
  11254. cloneVNode,
  11255. compatUtils,
  11256. compile2 as compile,
  11257. computed2 as computed,
  11258. createApp,
  11259. createBlock,
  11260. createCommentVNode,
  11261. createElementBlock,
  11262. createBaseVNode as createElementVNode,
  11263. createHydrationRenderer,
  11264. createPropsRestProxy,
  11265. createRenderer,
  11266. createSSRApp,
  11267. createSlots,
  11268. createStaticVNode,
  11269. createTextVNode,
  11270. createVNode,
  11271. customRef,
  11272. defineAsyncComponent,
  11273. defineComponent,
  11274. defineCustomElement,
  11275. defineEmits,
  11276. defineExpose,
  11277. defineModel,
  11278. defineOptions,
  11279. defineProps,
  11280. defineSSRCustomElement,
  11281. defineSlots,
  11282. devtools,
  11283. effect,
  11284. effectScope,
  11285. getCurrentInstance,
  11286. getCurrentScope,
  11287. getTransitionRawChildren,
  11288. guardReactiveProps,
  11289. h,
  11290. handleError,
  11291. hasInjectionContext,
  11292. hydrate,
  11293. initCustomFormatter,
  11294. initDirectivesForSSR,
  11295. inject,
  11296. isMemoSame,
  11297. isProxy,
  11298. isReactive,
  11299. isReadonly,
  11300. isRef,
  11301. isRuntimeOnly,
  11302. isShallow,
  11303. isVNode,
  11304. markRaw,
  11305. mergeDefaults,
  11306. mergeModels,
  11307. mergeProps,
  11308. nextTick,
  11309. normalizeClass,
  11310. normalizeProps,
  11311. normalizeStyle,
  11312. onActivated,
  11313. onBeforeMount,
  11314. onBeforeUnmount,
  11315. onBeforeUpdate,
  11316. onDeactivated,
  11317. onErrorCaptured,
  11318. onMounted,
  11319. onRenderTracked,
  11320. onRenderTriggered,
  11321. onScopeDispose,
  11322. onServerPrefetch,
  11323. onUnmounted,
  11324. onUpdated,
  11325. openBlock,
  11326. popScopeId,
  11327. provide,
  11328. proxyRefs,
  11329. pushScopeId,
  11330. queuePostFlushCb,
  11331. reactive,
  11332. readonly,
  11333. ref,
  11334. registerRuntimeCompiler,
  11335. render,
  11336. renderList,
  11337. renderSlot,
  11338. resolveComponent,
  11339. resolveDirective,
  11340. resolveDynamicComponent,
  11341. resolveFilter,
  11342. resolveTransitionHooks,
  11343. setBlockTracking,
  11344. setDevtoolsHook,
  11345. setTransitionHooks,
  11346. shallowReactive,
  11347. shallowReadonly,
  11348. shallowRef,
  11349. ssrContextKey,
  11350. ssrUtils,
  11351. stop,
  11352. toDisplayString,
  11353. toHandlerKey,
  11354. toHandlers,
  11355. toRaw,
  11356. toRef,
  11357. toRefs,
  11358. toValue,
  11359. transformVNodeArgs,
  11360. triggerRef,
  11361. unref,
  11362. useAttrs,
  11363. useCssModule,
  11364. useCssVars,
  11365. useModel,
  11366. useSSRContext,
  11367. useSlots,
  11368. useTransitionState,
  11369. vModelCheckbox,
  11370. vModelDynamic,
  11371. vModelRadio,
  11372. vModelSelect,
  11373. vModelText,
  11374. vShow,
  11375. version,
  11376. warn2 as warn,
  11377. watch,
  11378. watchEffect,
  11379. watchPostEffect,
  11380. watchSyncEffect,
  11381. withAsyncContext,
  11382. withCtx,
  11383. withDefaults,
  11384. withDirectives,
  11385. withKeys,
  11386. withMemo,
  11387. withModifiers,
  11388. withScopeId
  11389. };
  11390. /*! Bundled license information:
  11391. @vue/shared/dist/shared.esm-bundler.js:
  11392. (**
  11393. * @vue/shared v3.4.25
  11394. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  11395. * @license MIT
  11396. **)
  11397. (*! #__NO_SIDE_EFFECTS__ *)
  11398. @vue/reactivity/dist/reactivity.esm-bundler.js:
  11399. (**
  11400. * @vue/reactivity v3.4.25
  11401. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  11402. * @license MIT
  11403. **)
  11404. @vue/runtime-core/dist/runtime-core.esm-bundler.js:
  11405. (**
  11406. * @vue/runtime-core v3.4.25
  11407. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  11408. * @license MIT
  11409. **)
  11410. (*! #__NO_SIDE_EFFECTS__ *)
  11411. @vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
  11412. (**
  11413. * @vue/runtime-dom v3.4.25
  11414. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  11415. * @license MIT
  11416. **)
  11417. (*! #__NO_SIDE_EFFECTS__ *)
  11418. vue/dist/vue.runtime.esm-bundler.js:
  11419. (**
  11420. * vue v3.4.25
  11421. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  11422. * @license MIT
  11423. **)
  11424. */
  11425. //# sourceMappingURL=vue.js.map