chunk-UARXZWXR.js 469 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932
  1. import {
  2. Fragment,
  3. Teleport,
  4. Transition,
  5. computed2 as computed,
  6. createApp,
  7. createTextVNode,
  8. createVNode,
  9. defineComponent,
  10. getCurrentInstance,
  11. h,
  12. inject,
  13. isRef,
  14. isVNode,
  15. mergeProps,
  16. nextTick,
  17. onActivated,
  18. onBeforeUnmount,
  19. onBeforeUpdate,
  20. onDeactivated,
  21. onMounted,
  22. onUnmounted,
  23. onUpdated,
  24. provide,
  25. reactive,
  26. ref,
  27. resolveDirective,
  28. unref,
  29. vShow,
  30. watch,
  31. watchEffect,
  32. withDirectives,
  33. withKeys
  34. } from "./chunk-27TSZX5F.js";
  35. // node_modules/vant/es/utils/basic.mjs
  36. function noop() {
  37. }
  38. var extend = Object.assign;
  39. var inBrowser = typeof window !== "undefined";
  40. function get(object, path) {
  41. const keys = path.split(".");
  42. let result = object;
  43. keys.forEach((key) => {
  44. var _a;
  45. result = isObject(result) ? (_a = result[key]) != null ? _a : "" : "";
  46. });
  47. return result;
  48. }
  49. function pick(obj, keys, ignoreUndefined) {
  50. return keys.reduce((ret, key) => {
  51. if (!ignoreUndefined || obj[key] !== void 0) {
  52. ret[key] = obj[key];
  53. }
  54. return ret;
  55. }, {});
  56. }
  57. var toArray = (item) => Array.isArray(item) ? item : [item];
  58. // node_modules/vant/es/utils/validate.mjs
  59. var isDef = (val) => val !== void 0 && val !== null;
  60. var isFunction = (val) => typeof val === "function";
  61. var isObject = (val) => val !== null && typeof val === "object";
  62. var isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
  63. var isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
  64. function isMobile(value) {
  65. value = value.replace(/[^-|\d]/g, "");
  66. return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
  67. }
  68. var isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
  69. var isIOS = () => inBrowser ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
  70. // node_modules/vant/es/utils/deep-assign.mjs
  71. var { hasOwnProperty } = Object.prototype;
  72. function assignKey(to, from, key) {
  73. const val = from[key];
  74. if (!isDef(val)) {
  75. return;
  76. }
  77. if (!hasOwnProperty.call(to, key) || !isObject(val)) {
  78. to[key] = val;
  79. } else {
  80. to[key] = deepAssign(Object(to[key]), val);
  81. }
  82. }
  83. function deepAssign(to, from) {
  84. Object.keys(from).forEach((key) => {
  85. assignKey(to, from, key);
  86. });
  87. return to;
  88. }
  89. // node_modules/vant/es/locale/lang/zh-CN.mjs
  90. var stdin_default = {
  91. name: "\u59D3\u540D",
  92. tel: "\u7535\u8BDD",
  93. save: "\u4FDD\u5B58",
  94. confirm: "\u786E\u8BA4",
  95. cancel: "\u53D6\u6D88",
  96. delete: "\u5220\u9664",
  97. loading: "\u52A0\u8F7D\u4E2D...",
  98. noCoupon: "\u6682\u65E0\u4F18\u60E0\u5238",
  99. nameEmpty: "\u8BF7\u586B\u5199\u59D3\u540D",
  100. addContact: "\u6DFB\u52A0\u8054\u7CFB\u4EBA",
  101. telInvalid: "\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",
  102. vanCalendar: {
  103. end: "\u7ED3\u675F",
  104. start: "\u5F00\u59CB",
  105. title: "\u65E5\u671F\u9009\u62E9",
  106. weekdays: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
  107. monthTitle: (year, month) => `${year}\u5E74${month}\u6708`,
  108. rangePrompt: (maxRange) => `\u6700\u591A\u9009\u62E9 ${maxRange} \u5929`
  109. },
  110. vanCascader: {
  111. select: "\u8BF7\u9009\u62E9"
  112. },
  113. vanPagination: {
  114. prev: "\u4E0A\u4E00\u9875",
  115. next: "\u4E0B\u4E00\u9875"
  116. },
  117. vanPullRefresh: {
  118. pulling: "\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",
  119. loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
  120. },
  121. vanSubmitBar: {
  122. label: "\u5408\u8BA1:"
  123. },
  124. vanCoupon: {
  125. unlimited: "\u65E0\u95E8\u69DB",
  126. discount: (discount) => `${discount}\u6298`,
  127. condition: (condition) => `\u6EE1${condition}\u5143\u53EF\u7528`
  128. },
  129. vanCouponCell: {
  130. title: "\u4F18\u60E0\u5238",
  131. count: (count) => `${count}\u5F20\u53EF\u7528`
  132. },
  133. vanCouponList: {
  134. exchange: "\u5151\u6362",
  135. close: "\u4E0D\u4F7F\u7528",
  136. enable: "\u53EF\u7528",
  137. disabled: "\u4E0D\u53EF\u7528",
  138. placeholder: "\u8F93\u5165\u4F18\u60E0\u7801"
  139. },
  140. vanAddressEdit: {
  141. area: "\u5730\u533A",
  142. postal: "\u90AE\u653F\u7F16\u7801",
  143. areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
  144. addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
  145. postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
  146. addressDetail: "\u8BE6\u7EC6\u5730\u5740",
  147. defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
  148. },
  149. vanAddressList: {
  150. add: "\u65B0\u589E\u5730\u5740"
  151. }
  152. };
  153. // node_modules/vant/es/locale/index.mjs
  154. var lang = ref("zh-CN");
  155. var messages = reactive({
  156. "zh-CN": stdin_default
  157. });
  158. var Locale = {
  159. messages() {
  160. return messages[lang.value];
  161. },
  162. use(newLang, newMessages) {
  163. lang.value = newLang;
  164. this.add({ [newLang]: newMessages });
  165. },
  166. add(newMessages = {}) {
  167. deepAssign(messages, newMessages);
  168. }
  169. };
  170. var stdin_default2 = Locale;
  171. // node_modules/vant/es/utils/props.mjs
  172. var unknownProp = null;
  173. var numericProp = [Number, String];
  174. var truthProp = {
  175. type: Boolean,
  176. default: true
  177. };
  178. var makeRequiredProp = (type) => ({
  179. type,
  180. required: true
  181. });
  182. var makeArrayProp = () => ({
  183. type: Array,
  184. default: () => []
  185. });
  186. var makeNumberProp = (defaultVal) => ({
  187. type: Number,
  188. default: defaultVal
  189. });
  190. var makeNumericProp = (defaultVal) => ({
  191. type: numericProp,
  192. default: defaultVal
  193. });
  194. var makeStringProp = (defaultVal) => ({
  195. type: String,
  196. default: defaultVal
  197. });
  198. // node_modules/@vant/use/dist/index.esm.mjs
  199. var inBrowser2 = typeof window !== "undefined";
  200. function raf(fn2) {
  201. return inBrowser2 ? requestAnimationFrame(fn2) : -1;
  202. }
  203. function cancelRaf(id) {
  204. if (inBrowser2) {
  205. cancelAnimationFrame(id);
  206. }
  207. }
  208. function doubleRaf(fn2) {
  209. raf(() => raf(fn2));
  210. }
  211. var isWindow = (val) => val === window;
  212. var makeDOMRect = (width2, height2) => ({
  213. top: 0,
  214. left: 0,
  215. right: width2,
  216. bottom: height2,
  217. width: width2,
  218. height: height2
  219. });
  220. var useRect = (elementOrRef) => {
  221. const element = unref(elementOrRef);
  222. if (isWindow(element)) {
  223. const width2 = element.innerWidth;
  224. const height2 = element.innerHeight;
  225. return makeDOMRect(width2, height2);
  226. }
  227. if (element == null ? void 0 : element.getBoundingClientRect) {
  228. return element.getBoundingClientRect();
  229. }
  230. return makeDOMRect(0, 0);
  231. };
  232. function useToggle(defaultValue = false) {
  233. const state = ref(defaultValue);
  234. const toggle = (value = !state.value) => {
  235. state.value = value;
  236. };
  237. return [state, toggle];
  238. }
  239. function useParent(key) {
  240. const parent = inject(key, null);
  241. if (parent) {
  242. const instance4 = getCurrentInstance();
  243. const { link, unlink, internalChildren } = parent;
  244. link(instance4);
  245. onUnmounted(() => unlink(instance4));
  246. const index = computed(() => internalChildren.indexOf(instance4));
  247. return {
  248. parent,
  249. index
  250. };
  251. }
  252. return {
  253. parent: null,
  254. index: ref(-1)
  255. };
  256. }
  257. function flattenVNodes(children) {
  258. const result = [];
  259. const traverse = (children2) => {
  260. if (Array.isArray(children2)) {
  261. children2.forEach((child) => {
  262. var _a;
  263. if (isVNode(child)) {
  264. result.push(child);
  265. if ((_a = child.component) == null ? void 0 : _a.subTree) {
  266. result.push(child.component.subTree);
  267. traverse(child.component.subTree.children);
  268. }
  269. if (child.children) {
  270. traverse(child.children);
  271. }
  272. }
  273. });
  274. }
  275. };
  276. traverse(children);
  277. return result;
  278. }
  279. function sortChildren(parent, publicChildren, internalChildren) {
  280. const vnodes = flattenVNodes(parent.subTree.children);
  281. internalChildren.sort(
  282. (a, b) => vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode)
  283. );
  284. const orderedPublicChildren = internalChildren.map((item) => item.proxy);
  285. publicChildren.sort((a, b) => {
  286. const indexA = orderedPublicChildren.indexOf(a);
  287. const indexB = orderedPublicChildren.indexOf(b);
  288. return indexA - indexB;
  289. });
  290. }
  291. function useChildren(key) {
  292. const publicChildren = reactive([]);
  293. const internalChildren = reactive([]);
  294. const parent = getCurrentInstance();
  295. const linkChildren = (value) => {
  296. const link = (child) => {
  297. if (child.proxy) {
  298. internalChildren.push(child);
  299. publicChildren.push(child.proxy);
  300. sortChildren(parent, publicChildren, internalChildren);
  301. }
  302. };
  303. const unlink = (child) => {
  304. const index = internalChildren.indexOf(child);
  305. publicChildren.splice(index, 1);
  306. internalChildren.splice(index, 1);
  307. };
  308. provide(
  309. key,
  310. Object.assign(
  311. {
  312. link,
  313. unlink,
  314. children: publicChildren,
  315. internalChildren
  316. },
  317. value
  318. )
  319. );
  320. };
  321. return {
  322. children: publicChildren,
  323. linkChildren
  324. };
  325. }
  326. var SECOND = 1e3;
  327. var MINUTE = 60 * SECOND;
  328. var HOUR = 60 * MINUTE;
  329. var DAY = 24 * HOUR;
  330. function parseTime(time) {
  331. const days = Math.floor(time / DAY);
  332. const hours = Math.floor(time % DAY / HOUR);
  333. const minutes = Math.floor(time % HOUR / MINUTE);
  334. const seconds = Math.floor(time % MINUTE / SECOND);
  335. const milliseconds = Math.floor(time % SECOND);
  336. return {
  337. total: time,
  338. days,
  339. hours,
  340. minutes,
  341. seconds,
  342. milliseconds
  343. };
  344. }
  345. function isSameSecond(time1, time2) {
  346. return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
  347. }
  348. function useCountDown(options) {
  349. let rafId;
  350. let endTime;
  351. let counting;
  352. let deactivated;
  353. const remain = ref(options.time);
  354. const current2 = computed(() => parseTime(remain.value));
  355. const pause = () => {
  356. counting = false;
  357. cancelRaf(rafId);
  358. };
  359. const getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
  360. const setRemain = (value) => {
  361. var _a, _b;
  362. remain.value = value;
  363. (_a = options.onChange) == null ? void 0 : _a.call(options, current2.value);
  364. if (value === 0) {
  365. pause();
  366. (_b = options.onFinish) == null ? void 0 : _b.call(options);
  367. }
  368. };
  369. const microTick = () => {
  370. rafId = raf(() => {
  371. if (counting) {
  372. setRemain(getCurrentRemain());
  373. if (remain.value > 0) {
  374. microTick();
  375. }
  376. }
  377. });
  378. };
  379. const macroTick = () => {
  380. rafId = raf(() => {
  381. if (counting) {
  382. const remainRemain = getCurrentRemain();
  383. if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) {
  384. setRemain(remainRemain);
  385. }
  386. if (remain.value > 0) {
  387. macroTick();
  388. }
  389. }
  390. });
  391. };
  392. const tick = () => {
  393. if (!inBrowser2) {
  394. return;
  395. }
  396. if (options.millisecond) {
  397. microTick();
  398. } else {
  399. macroTick();
  400. }
  401. };
  402. const start2 = () => {
  403. if (!counting) {
  404. endTime = Date.now() + remain.value;
  405. counting = true;
  406. tick();
  407. }
  408. };
  409. const reset = (totalTime = options.time) => {
  410. pause();
  411. remain.value = totalTime;
  412. };
  413. onBeforeUnmount(pause);
  414. onActivated(() => {
  415. if (deactivated) {
  416. counting = true;
  417. deactivated = false;
  418. tick();
  419. }
  420. });
  421. onDeactivated(() => {
  422. if (counting) {
  423. pause();
  424. deactivated = true;
  425. }
  426. });
  427. return {
  428. start: start2,
  429. pause,
  430. reset,
  431. current: current2
  432. };
  433. }
  434. function onMountedOrActivated(hook) {
  435. let mounted;
  436. onMounted(() => {
  437. hook();
  438. nextTick(() => {
  439. mounted = true;
  440. });
  441. });
  442. onActivated(() => {
  443. if (mounted) {
  444. hook();
  445. }
  446. });
  447. }
  448. function useEventListener(type, listener, options = {}) {
  449. if (!inBrowser2) {
  450. return;
  451. }
  452. const { target = window, passive: passive2 = false, capture = false } = options;
  453. let attached;
  454. const add = (target2) => {
  455. const element = unref(target2);
  456. if (element && !attached) {
  457. element.addEventListener(type, listener, {
  458. capture,
  459. passive: passive2
  460. });
  461. attached = true;
  462. }
  463. };
  464. const remove2 = (target2) => {
  465. const element = unref(target2);
  466. if (element && attached) {
  467. element.removeEventListener(type, listener, capture);
  468. attached = false;
  469. }
  470. };
  471. onUnmounted(() => remove2(target));
  472. onDeactivated(() => remove2(target));
  473. onMountedOrActivated(() => add(target));
  474. if (isRef(target)) {
  475. watch(target, (val, oldVal) => {
  476. remove2(oldVal);
  477. add(val);
  478. });
  479. }
  480. }
  481. function useClickAway(target, listener, options = {}) {
  482. if (!inBrowser2) {
  483. return;
  484. }
  485. const { eventName = "click" } = options;
  486. const onClick = (event) => {
  487. const targets = Array.isArray(target) ? target : [target];
  488. const isClickAway = targets.every((item) => {
  489. const element = unref(item);
  490. return element && !element.contains(event.target);
  491. });
  492. if (isClickAway) {
  493. listener(event);
  494. }
  495. };
  496. useEventListener(eventName, onClick, { target: document });
  497. }
  498. var width;
  499. var height;
  500. function useWindowSize() {
  501. if (!width) {
  502. width = ref(0);
  503. height = ref(0);
  504. if (inBrowser2) {
  505. const update = () => {
  506. width.value = window.innerWidth;
  507. height.value = window.innerHeight;
  508. };
  509. update();
  510. window.addEventListener("resize", update, { passive: true });
  511. window.addEventListener("orientationchange", update, { passive: true });
  512. }
  513. }
  514. return { width, height };
  515. }
  516. var overflowScrollReg = /scroll|auto|overlay/i;
  517. var defaultRoot = inBrowser2 ? window : void 0;
  518. function isElement(node) {
  519. const ELEMENT_NODE_TYPE = 1;
  520. return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
  521. }
  522. function getScrollParent(el, root = defaultRoot) {
  523. let node = el;
  524. while (node && node !== root && isElement(node)) {
  525. const { overflowY } = window.getComputedStyle(node);
  526. if (overflowScrollReg.test(overflowY)) {
  527. return node;
  528. }
  529. node = node.parentNode;
  530. }
  531. return root;
  532. }
  533. function useScrollParent(el, root = defaultRoot) {
  534. const scrollParent = ref();
  535. onMounted(() => {
  536. if (el.value) {
  537. scrollParent.value = getScrollParent(el.value, root);
  538. }
  539. });
  540. return scrollParent;
  541. }
  542. var visibility;
  543. function usePageVisibility() {
  544. if (!visibility) {
  545. visibility = ref("visible");
  546. if (inBrowser2) {
  547. const update = () => {
  548. visibility.value = document.hidden ? "hidden" : "visible";
  549. };
  550. update();
  551. window.addEventListener("visibilitychange", update);
  552. }
  553. }
  554. return visibility;
  555. }
  556. var CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
  557. function useCustomFieldValue(customValue) {
  558. const field = inject(CUSTOM_FIELD_INJECTION_KEY, null);
  559. if (field && !field.customValue.value) {
  560. field.customValue.value = customValue;
  561. watch(customValue, () => {
  562. field.resetValidation();
  563. field.validateWithTrigger("onChange");
  564. });
  565. }
  566. }
  567. // node_modules/vant/es/utils/dom.mjs
  568. function getScrollTop(el) {
  569. const top2 = "scrollTop" in el ? el.scrollTop : el.pageYOffset;
  570. return Math.max(top2, 0);
  571. }
  572. function setScrollTop(el, value) {
  573. if ("scrollTop" in el) {
  574. el.scrollTop = value;
  575. } else {
  576. el.scrollTo(el.scrollX, value);
  577. }
  578. }
  579. function getRootScrollTop() {
  580. return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
  581. }
  582. function setRootScrollTop(value) {
  583. setScrollTop(window, value);
  584. setScrollTop(document.body, value);
  585. }
  586. function getElementTop(el, scroller) {
  587. if (el === window) {
  588. return 0;
  589. }
  590. const scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
  591. return useRect(el).top + scrollTop;
  592. }
  593. var isIOS2 = isIOS();
  594. function resetScroll() {
  595. if (isIOS2) {
  596. setRootScrollTop(getRootScrollTop());
  597. }
  598. }
  599. var stopPropagation = (event) => event.stopPropagation();
  600. function preventDefault(event, isStopPropagation) {
  601. if (typeof event.cancelable !== "boolean" || event.cancelable) {
  602. event.preventDefault();
  603. }
  604. if (isStopPropagation) {
  605. stopPropagation(event);
  606. }
  607. }
  608. function isHidden(elementRef) {
  609. const el = unref(elementRef);
  610. if (!el) {
  611. return false;
  612. }
  613. const style = window.getComputedStyle(el);
  614. const hidden = style.display === "none";
  615. const parentHidden = el.offsetParent === null && style.position !== "fixed";
  616. return hidden || parentHidden;
  617. }
  618. var { width: windowWidth, height: windowHeight } = useWindowSize();
  619. // node_modules/vant/es/utils/format.mjs
  620. function addUnit(value) {
  621. if (isDef(value)) {
  622. return isNumeric(value) ? `${value}px` : String(value);
  623. }
  624. return void 0;
  625. }
  626. function getSizeStyle(originSize) {
  627. if (isDef(originSize)) {
  628. if (Array.isArray(originSize)) {
  629. return {
  630. width: addUnit(originSize[0]),
  631. height: addUnit(originSize[1])
  632. };
  633. }
  634. const size = addUnit(originSize);
  635. return {
  636. width: size,
  637. height: size
  638. };
  639. }
  640. }
  641. function getZIndexStyle(zIndex) {
  642. const style = {};
  643. if (zIndex !== void 0) {
  644. style.zIndex = +zIndex;
  645. }
  646. return style;
  647. }
  648. var rootFontSize;
  649. function getRootFontSize() {
  650. if (!rootFontSize) {
  651. const doc = document.documentElement;
  652. const fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  653. rootFontSize = parseFloat(fontSize);
  654. }
  655. return rootFontSize;
  656. }
  657. function convertRem(value) {
  658. value = value.replace(/rem/g, "");
  659. return +value * getRootFontSize();
  660. }
  661. function convertVw(value) {
  662. value = value.replace(/vw/g, "");
  663. return +value * windowWidth.value / 100;
  664. }
  665. function convertVh(value) {
  666. value = value.replace(/vh/g, "");
  667. return +value * windowHeight.value / 100;
  668. }
  669. function unitToPx(value) {
  670. if (typeof value === "number") {
  671. return value;
  672. }
  673. if (inBrowser) {
  674. if (value.includes("rem")) {
  675. return convertRem(value);
  676. }
  677. if (value.includes("vw")) {
  678. return convertVw(value);
  679. }
  680. if (value.includes("vh")) {
  681. return convertVh(value);
  682. }
  683. }
  684. return parseFloat(value);
  685. }
  686. var camelizeRE = /-(\w)/g;
  687. var camelize = (str) => str.replace(camelizeRE, (_, c) => c.toUpperCase());
  688. var kebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
  689. function padZero(num, targetLength = 2) {
  690. let str = num + "";
  691. while (str.length < targetLength) {
  692. str = "0" + str;
  693. }
  694. return str;
  695. }
  696. var clamp = (num, min, max) => Math.min(Math.max(num, min), max);
  697. function trimExtraChar(value, char, regExp) {
  698. const index = value.indexOf(char);
  699. if (index === -1) {
  700. return value;
  701. }
  702. if (char === "-" && index !== 0) {
  703. return value.slice(0, index);
  704. }
  705. return value.slice(0, index + 1) + value.slice(index).replace(regExp, "");
  706. }
  707. function formatNumber(value, allowDot = true, allowMinus = true) {
  708. if (allowDot) {
  709. value = trimExtraChar(value, ".", /\./g);
  710. } else {
  711. value = value.split(".")[0];
  712. }
  713. if (allowMinus) {
  714. value = trimExtraChar(value, "-", /-/g);
  715. } else {
  716. value = value.replace(/-/, "");
  717. }
  718. const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
  719. return value.replace(regExp, "");
  720. }
  721. function addNumber(num1, num2) {
  722. const cardinal = 10 ** 10;
  723. return Math.round((num1 + num2) * cardinal) / cardinal;
  724. }
  725. // node_modules/vant/es/utils/create.mjs
  726. function createTranslate(name97) {
  727. const prefix = camelize(name97) + ".";
  728. return (path, ...args) => {
  729. const messages2 = stdin_default2.messages();
  730. const message = get(messages2, prefix + path) || get(messages2, path);
  731. return isFunction(message) ? message(...args) : message;
  732. };
  733. }
  734. function genBem(name97, mods) {
  735. if (!mods) {
  736. return "";
  737. }
  738. if (typeof mods === "string") {
  739. return ` ${name97}--${mods}`;
  740. }
  741. if (Array.isArray(mods)) {
  742. return mods.reduce(
  743. (ret, item) => ret + genBem(name97, item),
  744. ""
  745. );
  746. }
  747. return Object.keys(mods).reduce(
  748. (ret, key) => ret + (mods[key] ? genBem(name97, key) : ""),
  749. ""
  750. );
  751. }
  752. function createBEM(name97) {
  753. return (el, mods) => {
  754. if (el && typeof el !== "string") {
  755. mods = el;
  756. el = "";
  757. }
  758. el = el ? `${name97}__${el}` : name97;
  759. return `${el}${genBem(el, mods)}`;
  760. };
  761. }
  762. function createNamespace(name97) {
  763. const prefixedName = `van-${name97}`;
  764. return [
  765. prefixedName,
  766. createBEM(prefixedName),
  767. createTranslate(prefixedName)
  768. ];
  769. }
  770. // node_modules/vant/es/utils/constant.mjs
  771. var BORDER = "van-hairline";
  772. var BORDER_TOP = `${BORDER}--top`;
  773. var BORDER_LEFT = `${BORDER}--left`;
  774. var BORDER_BOTTOM = `${BORDER}--bottom`;
  775. var BORDER_SURROUND = `${BORDER}--surround`;
  776. var BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
  777. var BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
  778. var HAPTICS_FEEDBACK = "van-haptics-feedback";
  779. var FORM_KEY = Symbol("van-form");
  780. // node_modules/vant/es/utils/interceptor.mjs
  781. function callInterceptor(interceptor, {
  782. args = [],
  783. done,
  784. canceled
  785. }) {
  786. if (interceptor) {
  787. const returnVal = interceptor.apply(null, args);
  788. if (isPromise(returnVal)) {
  789. returnVal.then((value) => {
  790. if (value) {
  791. done();
  792. } else if (canceled) {
  793. canceled();
  794. }
  795. }).catch(noop);
  796. } else if (returnVal) {
  797. done();
  798. } else if (canceled) {
  799. canceled();
  800. }
  801. } else {
  802. done();
  803. }
  804. }
  805. // node_modules/vant/es/utils/with-install.mjs
  806. function withInstall(options) {
  807. options.install = (app) => {
  808. const { name: name97 } = options;
  809. if (name97) {
  810. app.component(name97, options);
  811. app.component(camelize(`-${name97}`), options);
  812. }
  813. };
  814. return options;
  815. }
  816. // node_modules/vant/es/composables/on-popup-reopen.mjs
  817. var POPUP_TOGGLE_KEY = Symbol();
  818. function onPopupReopen(callback) {
  819. const popupToggleStatus = inject(POPUP_TOGGLE_KEY, null);
  820. if (popupToggleStatus) {
  821. watch(popupToggleStatus, (show) => {
  822. if (show) {
  823. callback();
  824. }
  825. });
  826. }
  827. }
  828. // node_modules/vant/es/composables/use-height.mjs
  829. var useHeight = (element, withSafeArea) => {
  830. const height2 = ref();
  831. const setHeight = () => {
  832. height2.value = useRect(element).height;
  833. };
  834. onMounted(() => {
  835. nextTick(setHeight);
  836. if (withSafeArea) {
  837. for (let i = 1; i <= 3; i++) {
  838. setTimeout(setHeight, 100 * i);
  839. }
  840. }
  841. });
  842. onPopupReopen(() => nextTick(setHeight));
  843. return height2;
  844. };
  845. // node_modules/vant/es/composables/use-placeholder.mjs
  846. function usePlaceholder(contentRef, bem93) {
  847. const height2 = useHeight(contentRef, true);
  848. return (renderContent) => createVNode("div", {
  849. "class": bem93("placeholder"),
  850. "style": {
  851. height: height2.value ? `${height2.value}px` : void 0
  852. }
  853. }, [renderContent()]);
  854. }
  855. // node_modules/vant/es/action-bar/ActionBar.mjs
  856. var [name, bem] = createNamespace("action-bar");
  857. var ACTION_BAR_KEY = Symbol(name);
  858. var actionBarProps = {
  859. placeholder: Boolean,
  860. safeAreaInsetBottom: truthProp
  861. };
  862. var stdin_default3 = defineComponent({
  863. name,
  864. props: actionBarProps,
  865. setup(props, {
  866. slots
  867. }) {
  868. const root = ref();
  869. const renderPlaceholder = usePlaceholder(root, bem);
  870. const {
  871. linkChildren
  872. } = useChildren(ACTION_BAR_KEY);
  873. linkChildren();
  874. const renderActionBar = () => {
  875. var _a;
  876. return createVNode("div", {
  877. "ref": root,
  878. "class": [bem(), {
  879. "van-safe-area-bottom": props.safeAreaInsetBottom
  880. }]
  881. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  882. };
  883. return () => {
  884. if (props.placeholder) {
  885. return renderPlaceholder(renderActionBar);
  886. }
  887. return renderActionBar();
  888. };
  889. }
  890. });
  891. // node_modules/vant/es/action-bar/index.mjs
  892. var ActionBar = withInstall(stdin_default3);
  893. // node_modules/vant/es/badge/Badge.mjs
  894. var [name2, bem2] = createNamespace("badge");
  895. var badgeProps = {
  896. dot: Boolean,
  897. max: numericProp,
  898. tag: makeStringProp("div"),
  899. color: String,
  900. offset: Array,
  901. content: numericProp,
  902. showZero: truthProp,
  903. position: makeStringProp("top-right")
  904. };
  905. var stdin_default4 = defineComponent({
  906. name: name2,
  907. props: badgeProps,
  908. setup(props, {
  909. slots
  910. }) {
  911. const hasContent = () => {
  912. if (slots.content) {
  913. return true;
  914. }
  915. const {
  916. content,
  917. showZero
  918. } = props;
  919. return isDef(content) && content !== "" && (showZero || content !== 0 && content !== "0");
  920. };
  921. const renderContent = () => {
  922. const {
  923. dot,
  924. max,
  925. content
  926. } = props;
  927. if (!dot && hasContent()) {
  928. if (slots.content) {
  929. return slots.content();
  930. }
  931. if (isDef(max) && isNumeric(content) && +content > max) {
  932. return `${max}+`;
  933. }
  934. return content;
  935. }
  936. };
  937. const style = computed(() => {
  938. const style2 = {
  939. background: props.color
  940. };
  941. if (props.offset) {
  942. const [x, y] = props.offset;
  943. if (slots.default) {
  944. style2.top = addUnit(y);
  945. if (typeof x === "number") {
  946. style2.right = addUnit(-x);
  947. } else {
  948. style2.right = x.startsWith("-") ? x.replace("-", "") : `-${x}`;
  949. }
  950. } else {
  951. style2.marginTop = addUnit(y);
  952. style2.marginLeft = addUnit(x);
  953. }
  954. }
  955. return style2;
  956. });
  957. const renderBadge = () => {
  958. if (hasContent() || props.dot) {
  959. return createVNode("div", {
  960. "class": bem2([props.position, {
  961. dot: props.dot,
  962. fixed: !!slots.default
  963. }]),
  964. "style": style.value
  965. }, [renderContent()]);
  966. }
  967. };
  968. return () => {
  969. if (slots.default) {
  970. const {
  971. tag
  972. } = props;
  973. return createVNode(tag, {
  974. "class": bem2("wrapper")
  975. }, {
  976. default: () => [slots.default(), renderBadge()]
  977. });
  978. }
  979. return renderBadge();
  980. };
  981. }
  982. });
  983. // node_modules/vant/es/badge/index.mjs
  984. var Badge = withInstall(stdin_default4);
  985. // node_modules/vant/es/composables/use-global-z-index.mjs
  986. var globalZIndex = 2e3;
  987. var useGlobalZIndex = () => ++globalZIndex;
  988. var setGlobalZIndex = (val) => {
  989. globalZIndex = val;
  990. };
  991. // node_modules/vant/es/config-provider/ConfigProvider.mjs
  992. var [name3, bem3] = createNamespace("config-provider");
  993. var CONFIG_PROVIDER_KEY = Symbol(name3);
  994. var configProviderProps = {
  995. tag: makeStringProp("div"),
  996. zIndex: Number,
  997. themeVars: Object,
  998. iconPrefix: String
  999. };
  1000. function mapThemeVarsToCSSVars(themeVars) {
  1001. const cssVars = {};
  1002. Object.keys(themeVars).forEach((key) => {
  1003. cssVars[`--van-${kebabCase(key)}`] = themeVars[key];
  1004. });
  1005. return cssVars;
  1006. }
  1007. var stdin_default5 = defineComponent({
  1008. name: name3,
  1009. props: configProviderProps,
  1010. setup(props, {
  1011. slots
  1012. }) {
  1013. const style = computed(() => {
  1014. if (props.themeVars) {
  1015. return mapThemeVarsToCSSVars(props.themeVars);
  1016. }
  1017. });
  1018. provide(CONFIG_PROVIDER_KEY, props);
  1019. watchEffect(() => {
  1020. if (props.zIndex !== void 0) {
  1021. setGlobalZIndex(props.zIndex);
  1022. }
  1023. });
  1024. return () => createVNode(props.tag, {
  1025. "class": bem3(),
  1026. "style": style.value
  1027. }, {
  1028. default: () => {
  1029. var _a;
  1030. return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
  1031. }
  1032. });
  1033. }
  1034. });
  1035. // node_modules/vant/es/icon/Icon.mjs
  1036. var [name4, bem4] = createNamespace("icon");
  1037. var isImage = (name210) => name210 == null ? void 0 : name210.includes("/");
  1038. var iconProps = {
  1039. dot: Boolean,
  1040. tag: makeStringProp("i"),
  1041. name: String,
  1042. size: numericProp,
  1043. badge: numericProp,
  1044. color: String,
  1045. badgeProps: Object,
  1046. classPrefix: String
  1047. };
  1048. var stdin_default6 = defineComponent({
  1049. name: name4,
  1050. props: iconProps,
  1051. setup(props, {
  1052. slots
  1053. }) {
  1054. const config = inject(CONFIG_PROVIDER_KEY, null);
  1055. const classPrefix = computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem4());
  1056. return () => {
  1057. const {
  1058. tag,
  1059. dot,
  1060. name: name210,
  1061. size,
  1062. badge,
  1063. color
  1064. } = props;
  1065. const isImageIcon = isImage(name210);
  1066. return createVNode(Badge, mergeProps({
  1067. "dot": dot,
  1068. "tag": tag,
  1069. "class": [classPrefix.value, isImageIcon ? "" : `${classPrefix.value}-${name210}`],
  1070. "style": {
  1071. color,
  1072. fontSize: addUnit(size)
  1073. },
  1074. "content": badge
  1075. }, props.badgeProps), {
  1076. default: () => {
  1077. var _a;
  1078. return [(_a = slots.default) == null ? void 0 : _a.call(slots), isImageIcon && createVNode("img", {
  1079. "class": bem4("image"),
  1080. "src": name210
  1081. }, null)];
  1082. }
  1083. });
  1084. };
  1085. }
  1086. });
  1087. // node_modules/vant/es/icon/index.mjs
  1088. var Icon = withInstall(stdin_default6);
  1089. // node_modules/vant/es/loading/Loading.mjs
  1090. var [name5, bem5] = createNamespace("loading");
  1091. var SpinIcon = Array(12).fill(null).map((_, index) => createVNode("i", {
  1092. "class": bem5("line", String(index + 1))
  1093. }, null));
  1094. var CircularIcon = createVNode("svg", {
  1095. "class": bem5("circular"),
  1096. "viewBox": "25 25 50 50"
  1097. }, [createVNode("circle", {
  1098. "cx": "50",
  1099. "cy": "50",
  1100. "r": "20",
  1101. "fill": "none"
  1102. }, null)]);
  1103. var loadingProps = {
  1104. size: numericProp,
  1105. type: makeStringProp("circular"),
  1106. color: String,
  1107. vertical: Boolean,
  1108. textSize: numericProp,
  1109. textColor: String
  1110. };
  1111. var stdin_default7 = defineComponent({
  1112. name: name5,
  1113. props: loadingProps,
  1114. setup(props, {
  1115. slots
  1116. }) {
  1117. const spinnerStyle = computed(() => extend({
  1118. color: props.color
  1119. }, getSizeStyle(props.size)));
  1120. const renderText = () => {
  1121. var _a;
  1122. if (slots.default) {
  1123. return createVNode("span", {
  1124. "class": bem5("text"),
  1125. "style": {
  1126. fontSize: addUnit(props.textSize),
  1127. color: (_a = props.textColor) != null ? _a : props.color
  1128. }
  1129. }, [slots.default()]);
  1130. }
  1131. };
  1132. return () => {
  1133. const {
  1134. type,
  1135. vertical
  1136. } = props;
  1137. return createVNode("div", {
  1138. "class": bem5([type, {
  1139. vertical
  1140. }]),
  1141. "aria-live": "polite",
  1142. "aria-busy": true
  1143. }, [createVNode("span", {
  1144. "class": bem5("spinner", type),
  1145. "style": spinnerStyle.value
  1146. }, [type === "spinner" ? SpinIcon : CircularIcon]), renderText()]);
  1147. };
  1148. }
  1149. });
  1150. // node_modules/vant/es/loading/index.mjs
  1151. var Loading = withInstall(stdin_default7);
  1152. // node_modules/vant/es/composables/use-route.mjs
  1153. var routeProps = {
  1154. to: [String, Object],
  1155. url: String,
  1156. replace: Boolean
  1157. };
  1158. function route({
  1159. to,
  1160. url,
  1161. replace,
  1162. $router: router
  1163. }) {
  1164. if (to && router) {
  1165. router[replace ? "replace" : "push"](to);
  1166. } else if (url) {
  1167. replace ? location.replace(url) : location.href = url;
  1168. }
  1169. }
  1170. function useRoute() {
  1171. const vm = getCurrentInstance().proxy;
  1172. return () => route(vm);
  1173. }
  1174. // node_modules/vant/es/button/Button.mjs
  1175. var [name6, bem6] = createNamespace("button");
  1176. var buttonProps = extend({}, routeProps, {
  1177. tag: makeStringProp("button"),
  1178. text: String,
  1179. icon: String,
  1180. type: makeStringProp("default"),
  1181. size: makeStringProp("normal"),
  1182. color: String,
  1183. block: Boolean,
  1184. plain: Boolean,
  1185. round: Boolean,
  1186. square: Boolean,
  1187. loading: Boolean,
  1188. hairline: Boolean,
  1189. disabled: Boolean,
  1190. iconPrefix: String,
  1191. nativeType: makeStringProp("button"),
  1192. loadingSize: numericProp,
  1193. loadingText: String,
  1194. loadingType: String,
  1195. iconPosition: makeStringProp("left")
  1196. });
  1197. var stdin_default8 = defineComponent({
  1198. name: name6,
  1199. props: buttonProps,
  1200. emits: ["click"],
  1201. setup(props, {
  1202. emit,
  1203. slots
  1204. }) {
  1205. const route2 = useRoute();
  1206. const renderLoadingIcon = () => {
  1207. if (slots.loading) {
  1208. return slots.loading();
  1209. }
  1210. return createVNode(Loading, {
  1211. "size": props.loadingSize,
  1212. "type": props.loadingType,
  1213. "class": bem6("loading")
  1214. }, null);
  1215. };
  1216. const renderIcon = () => {
  1217. if (props.loading) {
  1218. return renderLoadingIcon();
  1219. }
  1220. if (slots.icon) {
  1221. return createVNode("div", {
  1222. "class": bem6("icon")
  1223. }, [slots.icon()]);
  1224. }
  1225. if (props.icon) {
  1226. return createVNode(Icon, {
  1227. "name": props.icon,
  1228. "class": bem6("icon"),
  1229. "classPrefix": props.iconPrefix
  1230. }, null);
  1231. }
  1232. };
  1233. const renderText = () => {
  1234. let text;
  1235. if (props.loading) {
  1236. text = props.loadingText;
  1237. } else {
  1238. text = slots.default ? slots.default() : props.text;
  1239. }
  1240. if (text) {
  1241. return createVNode("span", {
  1242. "class": bem6("text")
  1243. }, [text]);
  1244. }
  1245. };
  1246. const getStyle = () => {
  1247. const {
  1248. color,
  1249. plain
  1250. } = props;
  1251. if (color) {
  1252. const style = {
  1253. color: plain ? color : "white"
  1254. };
  1255. if (!plain) {
  1256. style.background = color;
  1257. }
  1258. if (color.includes("gradient")) {
  1259. style.border = 0;
  1260. } else {
  1261. style.borderColor = color;
  1262. }
  1263. return style;
  1264. }
  1265. };
  1266. const onClick = (event) => {
  1267. if (props.loading) {
  1268. preventDefault(event);
  1269. } else if (!props.disabled) {
  1270. emit("click", event);
  1271. route2();
  1272. }
  1273. };
  1274. return () => {
  1275. const {
  1276. tag,
  1277. type,
  1278. size,
  1279. block,
  1280. round: round2,
  1281. plain,
  1282. square,
  1283. loading,
  1284. disabled,
  1285. hairline,
  1286. nativeType,
  1287. iconPosition
  1288. } = props;
  1289. const classes = [bem6([type, size, {
  1290. plain,
  1291. block,
  1292. round: round2,
  1293. square,
  1294. loading,
  1295. disabled,
  1296. hairline
  1297. }]), {
  1298. [BORDER_SURROUND]: hairline
  1299. }];
  1300. return createVNode(tag, {
  1301. "type": nativeType,
  1302. "class": classes,
  1303. "style": getStyle(),
  1304. "disabled": disabled,
  1305. "onClick": onClick
  1306. }, {
  1307. default: () => [createVNode("div", {
  1308. "class": bem6("content")
  1309. }, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon()])]
  1310. });
  1311. };
  1312. }
  1313. });
  1314. // node_modules/vant/es/button/index.mjs
  1315. var Button = withInstall(stdin_default8);
  1316. // node_modules/vant/es/composables/use-expose.mjs
  1317. function useExpose(apis) {
  1318. const instance4 = getCurrentInstance();
  1319. if (instance4) {
  1320. extend(instance4.proxy, apis);
  1321. }
  1322. }
  1323. // node_modules/vant/es/action-bar-button/ActionBarButton.mjs
  1324. var [name7, bem7] = createNamespace("action-bar-button");
  1325. var actionBarButtonProps = extend({}, routeProps, {
  1326. type: String,
  1327. text: String,
  1328. icon: String,
  1329. color: String,
  1330. loading: Boolean,
  1331. disabled: Boolean
  1332. });
  1333. var stdin_default9 = defineComponent({
  1334. name: name7,
  1335. props: actionBarButtonProps,
  1336. setup(props, {
  1337. slots
  1338. }) {
  1339. const route2 = useRoute();
  1340. const {
  1341. parent,
  1342. index
  1343. } = useParent(ACTION_BAR_KEY);
  1344. const isFirst = computed(() => {
  1345. if (parent) {
  1346. const prev = parent.children[index.value - 1];
  1347. return !(prev && "isButton" in prev);
  1348. }
  1349. });
  1350. const isLast = computed(() => {
  1351. if (parent) {
  1352. const next = parent.children[index.value + 1];
  1353. return !(next && "isButton" in next);
  1354. }
  1355. });
  1356. useExpose({
  1357. isButton: true
  1358. });
  1359. return () => {
  1360. const {
  1361. type,
  1362. icon,
  1363. text,
  1364. color,
  1365. loading,
  1366. disabled
  1367. } = props;
  1368. return createVNode(Button, {
  1369. "class": bem7([type, {
  1370. last: isLast.value,
  1371. first: isFirst.value
  1372. }]),
  1373. "size": "large",
  1374. "type": type,
  1375. "icon": icon,
  1376. "color": color,
  1377. "loading": loading,
  1378. "disabled": disabled,
  1379. "onClick": route2
  1380. }, {
  1381. default: () => [slots.default ? slots.default() : text]
  1382. });
  1383. };
  1384. }
  1385. });
  1386. // node_modules/vant/es/action-bar-button/index.mjs
  1387. var ActionBarButton = withInstall(stdin_default9);
  1388. // node_modules/vant/es/action-bar-icon/ActionBarIcon.mjs
  1389. var [name8, bem8] = createNamespace("action-bar-icon");
  1390. var actionBarIconProps = extend({}, routeProps, {
  1391. dot: Boolean,
  1392. text: String,
  1393. icon: String,
  1394. color: String,
  1395. badge: numericProp,
  1396. iconClass: unknownProp,
  1397. badgeProps: Object,
  1398. iconPrefix: String
  1399. });
  1400. var stdin_default10 = defineComponent({
  1401. name: name8,
  1402. props: actionBarIconProps,
  1403. setup(props, {
  1404. slots
  1405. }) {
  1406. const route2 = useRoute();
  1407. useParent(ACTION_BAR_KEY);
  1408. const renderIcon = () => {
  1409. const {
  1410. dot,
  1411. badge,
  1412. icon,
  1413. color,
  1414. iconClass,
  1415. badgeProps: badgeProps2,
  1416. iconPrefix
  1417. } = props;
  1418. if (slots.icon) {
  1419. return createVNode(Badge, mergeProps({
  1420. "dot": dot,
  1421. "class": bem8("icon"),
  1422. "content": badge
  1423. }, badgeProps2), {
  1424. default: slots.icon
  1425. });
  1426. }
  1427. return createVNode(Icon, {
  1428. "tag": "div",
  1429. "dot": dot,
  1430. "name": icon,
  1431. "badge": badge,
  1432. "color": color,
  1433. "class": [bem8("icon"), iconClass],
  1434. "badgeProps": badgeProps2,
  1435. "classPrefix": iconPrefix
  1436. }, null);
  1437. };
  1438. return () => createVNode("div", {
  1439. "role": "button",
  1440. "class": bem8(),
  1441. "tabindex": 0,
  1442. "onClick": route2
  1443. }, [renderIcon(), slots.default ? slots.default() : props.text]);
  1444. }
  1445. });
  1446. // node_modules/vant/es/action-bar-icon/index.mjs
  1447. var ActionBarIcon = withInstall(stdin_default10);
  1448. // node_modules/vant/es/composables/use-lazy-render.mjs
  1449. function useLazyRender(show) {
  1450. const inited = ref(false);
  1451. watch(
  1452. show,
  1453. (value) => {
  1454. if (value) {
  1455. inited.value = value;
  1456. }
  1457. },
  1458. { immediate: true }
  1459. );
  1460. return (render) => () => inited.value ? render() : null;
  1461. }
  1462. // node_modules/vant/es/overlay/Overlay.mjs
  1463. var [name9, bem9] = createNamespace("overlay");
  1464. var overlayProps = {
  1465. show: Boolean,
  1466. zIndex: numericProp,
  1467. duration: numericProp,
  1468. className: unknownProp,
  1469. lockScroll: truthProp,
  1470. lazyRender: truthProp,
  1471. customStyle: Object
  1472. };
  1473. var stdin_default11 = defineComponent({
  1474. name: name9,
  1475. props: overlayProps,
  1476. setup(props, {
  1477. slots
  1478. }) {
  1479. const root = ref();
  1480. const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
  1481. const onTouchMove = (event) => {
  1482. if (props.lockScroll) {
  1483. preventDefault(event, true);
  1484. }
  1485. };
  1486. const renderOverlay = lazyRender(() => {
  1487. var _a;
  1488. const style = extend(getZIndexStyle(props.zIndex), props.customStyle);
  1489. if (isDef(props.duration)) {
  1490. style.animationDuration = `${props.duration}s`;
  1491. }
  1492. return withDirectives(createVNode("div", {
  1493. "ref": root,
  1494. "style": style,
  1495. "class": [bem9(), props.className]
  1496. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props.show]]);
  1497. });
  1498. useEventListener("touchmove", onTouchMove, {
  1499. target: root
  1500. });
  1501. return () => createVNode(Transition, {
  1502. "name": "van-fade",
  1503. "appear": true
  1504. }, {
  1505. default: renderOverlay
  1506. });
  1507. }
  1508. });
  1509. // node_modules/vant/es/overlay/index.mjs
  1510. var Overlay = withInstall(stdin_default11);
  1511. // node_modules/vant/es/popup/shared.mjs
  1512. var popupSharedProps = {
  1513. show: Boolean,
  1514. zIndex: numericProp,
  1515. overlay: truthProp,
  1516. duration: numericProp,
  1517. teleport: [String, Object],
  1518. lockScroll: truthProp,
  1519. lazyRender: truthProp,
  1520. beforeClose: Function,
  1521. overlayStyle: Object,
  1522. overlayClass: unknownProp,
  1523. transitionAppear: Boolean,
  1524. closeOnClickOverlay: truthProp
  1525. };
  1526. var popupSharedPropKeys = Object.keys(
  1527. popupSharedProps
  1528. );
  1529. // node_modules/vant/es/composables/use-touch.mjs
  1530. function getDirection(x, y) {
  1531. if (x > y) {
  1532. return "horizontal";
  1533. }
  1534. if (y > x) {
  1535. return "vertical";
  1536. }
  1537. return "";
  1538. }
  1539. function useTouch() {
  1540. const startX = ref(0);
  1541. const startY = ref(0);
  1542. const deltaX = ref(0);
  1543. const deltaY = ref(0);
  1544. const offsetX = ref(0);
  1545. const offsetY = ref(0);
  1546. const direction = ref("");
  1547. const isVertical = () => direction.value === "vertical";
  1548. const isHorizontal = () => direction.value === "horizontal";
  1549. const reset = () => {
  1550. deltaX.value = 0;
  1551. deltaY.value = 0;
  1552. offsetX.value = 0;
  1553. offsetY.value = 0;
  1554. direction.value = "";
  1555. };
  1556. const start2 = (event) => {
  1557. reset();
  1558. startX.value = event.touches[0].clientX;
  1559. startY.value = event.touches[0].clientY;
  1560. };
  1561. const move = (event) => {
  1562. const touch = event.touches[0];
  1563. deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
  1564. deltaY.value = touch.clientY - startY.value;
  1565. offsetX.value = Math.abs(deltaX.value);
  1566. offsetY.value = Math.abs(deltaY.value);
  1567. const LOCK_DIRECTION_DISTANCE = 10;
  1568. if (!direction.value || offsetX.value < LOCK_DIRECTION_DISTANCE && offsetY.value < LOCK_DIRECTION_DISTANCE) {
  1569. direction.value = getDirection(offsetX.value, offsetY.value);
  1570. }
  1571. };
  1572. return {
  1573. move,
  1574. start: start2,
  1575. reset,
  1576. startX,
  1577. startY,
  1578. deltaX,
  1579. deltaY,
  1580. offsetX,
  1581. offsetY,
  1582. direction,
  1583. isVertical,
  1584. isHorizontal
  1585. };
  1586. }
  1587. // node_modules/vant/es/composables/use-lock-scroll.mjs
  1588. var totalLockCount = 0;
  1589. var BODY_LOCK_CLASS = "van-overflow-hidden";
  1590. function useLockScroll(rootRef, shouldLock) {
  1591. const touch = useTouch();
  1592. const DIRECTION_UP = "01";
  1593. const DIRECTION_DOWN = "10";
  1594. const onTouchMove = (event) => {
  1595. touch.move(event);
  1596. const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
  1597. const el = getScrollParent(
  1598. event.target,
  1599. rootRef.value
  1600. );
  1601. const { scrollHeight, offsetHeight, scrollTop } = el;
  1602. let status = "11";
  1603. if (scrollTop === 0) {
  1604. status = offsetHeight >= scrollHeight ? "00" : "01";
  1605. } else if (scrollTop + offsetHeight >= scrollHeight) {
  1606. status = "10";
  1607. }
  1608. if (status !== "11" && touch.isVertical() && !(parseInt(status, 2) & parseInt(direction, 2))) {
  1609. preventDefault(event, true);
  1610. }
  1611. };
  1612. const lock = () => {
  1613. document.addEventListener("touchstart", touch.start);
  1614. document.addEventListener("touchmove", onTouchMove, { passive: false });
  1615. if (!totalLockCount) {
  1616. document.body.classList.add(BODY_LOCK_CLASS);
  1617. }
  1618. totalLockCount++;
  1619. };
  1620. const unlock = () => {
  1621. if (totalLockCount) {
  1622. document.removeEventListener("touchstart", touch.start);
  1623. document.removeEventListener("touchmove", onTouchMove);
  1624. totalLockCount--;
  1625. if (!totalLockCount) {
  1626. document.body.classList.remove(BODY_LOCK_CLASS);
  1627. }
  1628. }
  1629. };
  1630. const init = () => shouldLock() && lock();
  1631. const destroy = () => shouldLock() && unlock();
  1632. onMountedOrActivated(init);
  1633. onDeactivated(destroy);
  1634. onBeforeUnmount(destroy);
  1635. watch(shouldLock, (value) => {
  1636. value ? lock() : unlock();
  1637. });
  1638. }
  1639. // node_modules/vant/es/popup/Popup.mjs
  1640. var popupProps = extend({}, popupSharedProps, {
  1641. round: Boolean,
  1642. position: makeStringProp("center"),
  1643. closeIcon: makeStringProp("cross"),
  1644. closeable: Boolean,
  1645. transition: String,
  1646. iconPrefix: String,
  1647. closeOnPopstate: Boolean,
  1648. closeIconPosition: makeStringProp("top-right"),
  1649. safeAreaInsetTop: Boolean,
  1650. safeAreaInsetBottom: Boolean
  1651. });
  1652. var [name10, bem10] = createNamespace("popup");
  1653. var stdin_default12 = defineComponent({
  1654. name: name10,
  1655. inheritAttrs: false,
  1656. props: popupProps,
  1657. emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
  1658. setup(props, {
  1659. emit,
  1660. attrs,
  1661. slots
  1662. }) {
  1663. let opened;
  1664. let shouldReopen;
  1665. const zIndex = ref();
  1666. const popupRef = ref();
  1667. const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
  1668. const style = computed(() => {
  1669. const style2 = {
  1670. zIndex: zIndex.value
  1671. };
  1672. if (isDef(props.duration)) {
  1673. const key = props.position === "center" ? "animationDuration" : "transitionDuration";
  1674. style2[key] = `${props.duration}s`;
  1675. }
  1676. return style2;
  1677. });
  1678. const open = () => {
  1679. if (!opened) {
  1680. opened = true;
  1681. zIndex.value = props.zIndex !== void 0 ? +props.zIndex : useGlobalZIndex();
  1682. emit("open");
  1683. }
  1684. };
  1685. const close = () => {
  1686. if (opened) {
  1687. callInterceptor(props.beforeClose, {
  1688. done() {
  1689. opened = false;
  1690. emit("close");
  1691. emit("update:show", false);
  1692. }
  1693. });
  1694. }
  1695. };
  1696. const onClickOverlay = (event) => {
  1697. emit("click-overlay", event);
  1698. if (props.closeOnClickOverlay) {
  1699. close();
  1700. }
  1701. };
  1702. const renderOverlay = () => {
  1703. if (props.overlay) {
  1704. return createVNode(Overlay, {
  1705. "show": props.show,
  1706. "class": props.overlayClass,
  1707. "zIndex": zIndex.value,
  1708. "duration": props.duration,
  1709. "customStyle": props.overlayStyle,
  1710. "role": props.closeOnClickOverlay ? "button" : void 0,
  1711. "tabindex": props.closeOnClickOverlay ? 0 : void 0,
  1712. "onClick": onClickOverlay
  1713. }, {
  1714. default: slots["overlay-content"]
  1715. });
  1716. }
  1717. };
  1718. const onClickCloseIcon = (event) => {
  1719. emit("click-close-icon", event);
  1720. close();
  1721. };
  1722. const renderCloseIcon = () => {
  1723. if (props.closeable) {
  1724. return createVNode(Icon, {
  1725. "role": "button",
  1726. "tabindex": 0,
  1727. "name": props.closeIcon,
  1728. "class": [bem10("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
  1729. "classPrefix": props.iconPrefix,
  1730. "onClick": onClickCloseIcon
  1731. }, null);
  1732. }
  1733. };
  1734. const onOpened = () => emit("opened");
  1735. const onClosed = () => emit("closed");
  1736. const onKeydown = (event) => emit("keydown", event);
  1737. const renderPopup = lazyRender(() => {
  1738. var _a;
  1739. const {
  1740. round: round2,
  1741. position,
  1742. safeAreaInsetTop,
  1743. safeAreaInsetBottom
  1744. } = props;
  1745. return withDirectives(createVNode("div", mergeProps({
  1746. "ref": popupRef,
  1747. "style": style.value,
  1748. "role": "dialog",
  1749. "tabindex": 0,
  1750. "class": [bem10({
  1751. round: round2,
  1752. [position]: position
  1753. }), {
  1754. "van-safe-area-top": safeAreaInsetTop,
  1755. "van-safe-area-bottom": safeAreaInsetBottom
  1756. }],
  1757. "onKeydown": onKeydown
  1758. }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[vShow, props.show]]);
  1759. });
  1760. const renderTransition = () => {
  1761. const {
  1762. position,
  1763. transition,
  1764. transitionAppear
  1765. } = props;
  1766. const name210 = position === "center" ? "van-fade" : `van-popup-slide-${position}`;
  1767. return createVNode(Transition, {
  1768. "name": transition || name210,
  1769. "appear": transitionAppear,
  1770. "onAfterEnter": onOpened,
  1771. "onAfterLeave": onClosed
  1772. }, {
  1773. default: renderPopup
  1774. });
  1775. };
  1776. watch(() => props.show, (show) => {
  1777. if (show && !opened) {
  1778. open();
  1779. if (attrs.tabindex === 0) {
  1780. nextTick(() => {
  1781. var _a;
  1782. (_a = popupRef.value) == null ? void 0 : _a.focus();
  1783. });
  1784. }
  1785. }
  1786. if (!show && opened) {
  1787. opened = false;
  1788. emit("close");
  1789. }
  1790. });
  1791. useExpose({
  1792. popupRef
  1793. });
  1794. useLockScroll(popupRef, () => props.show && props.lockScroll);
  1795. useEventListener("popstate", () => {
  1796. if (props.closeOnPopstate) {
  1797. close();
  1798. shouldReopen = false;
  1799. }
  1800. });
  1801. onMounted(() => {
  1802. if (props.show) {
  1803. open();
  1804. }
  1805. });
  1806. onActivated(() => {
  1807. if (shouldReopen) {
  1808. emit("update:show", true);
  1809. shouldReopen = false;
  1810. }
  1811. });
  1812. onDeactivated(() => {
  1813. if (props.show && props.teleport) {
  1814. close();
  1815. shouldReopen = true;
  1816. }
  1817. });
  1818. provide(POPUP_TOGGLE_KEY, () => props.show);
  1819. return () => {
  1820. if (props.teleport) {
  1821. return createVNode(Teleport, {
  1822. "to": props.teleport
  1823. }, {
  1824. default: () => [renderOverlay(), renderTransition()]
  1825. });
  1826. }
  1827. return createVNode(Fragment, null, [renderOverlay(), renderTransition()]);
  1828. };
  1829. }
  1830. });
  1831. // node_modules/vant/es/popup/index.mjs
  1832. var Popup = withInstall(stdin_default12);
  1833. // node_modules/vant/es/action-sheet/ActionSheet.mjs
  1834. var [name11, bem11] = createNamespace("action-sheet");
  1835. var actionSheetProps = extend({}, popupSharedProps, {
  1836. title: String,
  1837. round: truthProp,
  1838. actions: makeArrayProp(),
  1839. closeIcon: makeStringProp("cross"),
  1840. closeable: truthProp,
  1841. cancelText: String,
  1842. description: String,
  1843. closeOnPopstate: truthProp,
  1844. closeOnClickAction: Boolean,
  1845. safeAreaInsetBottom: truthProp
  1846. });
  1847. var popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
  1848. var stdin_default13 = defineComponent({
  1849. name: name11,
  1850. props: actionSheetProps,
  1851. emits: ["select", "cancel", "update:show"],
  1852. setup(props, {
  1853. slots,
  1854. emit
  1855. }) {
  1856. const updateShow = (show) => emit("update:show", show);
  1857. const onCancel = () => {
  1858. updateShow(false);
  1859. emit("cancel");
  1860. };
  1861. const renderHeader = () => {
  1862. if (props.title) {
  1863. return createVNode("div", {
  1864. "class": bem11("header")
  1865. }, [props.title, props.closeable && createVNode(Icon, {
  1866. "name": props.closeIcon,
  1867. "class": [bem11("close"), HAPTICS_FEEDBACK],
  1868. "onClick": onCancel
  1869. }, null)]);
  1870. }
  1871. };
  1872. const renderCancel = () => {
  1873. if (slots.cancel || props.cancelText) {
  1874. return [createVNode("div", {
  1875. "class": bem11("gap")
  1876. }, null), createVNode("button", {
  1877. "type": "button",
  1878. "class": bem11("cancel"),
  1879. "onClick": onCancel
  1880. }, [slots.cancel ? slots.cancel() : props.cancelText])];
  1881. }
  1882. };
  1883. const renderActionContent = (action, index) => {
  1884. if (action.loading) {
  1885. return createVNode(Loading, {
  1886. "class": bem11("loading-icon")
  1887. }, null);
  1888. }
  1889. if (slots.action) {
  1890. return slots.action({
  1891. action,
  1892. index
  1893. });
  1894. }
  1895. return [createVNode("span", {
  1896. "class": bem11("name")
  1897. }, [action.name]), action.subname && createVNode("div", {
  1898. "class": bem11("subname")
  1899. }, [action.subname])];
  1900. };
  1901. const renderAction = (action, index) => {
  1902. const {
  1903. color,
  1904. loading,
  1905. callback,
  1906. disabled,
  1907. className
  1908. } = action;
  1909. const onClick = () => {
  1910. if (disabled || loading) {
  1911. return;
  1912. }
  1913. if (callback) {
  1914. callback(action);
  1915. }
  1916. if (props.closeOnClickAction) {
  1917. updateShow(false);
  1918. }
  1919. nextTick(() => emit("select", action, index));
  1920. };
  1921. return createVNode("button", {
  1922. "type": "button",
  1923. "style": {
  1924. color
  1925. },
  1926. "class": [bem11("item", {
  1927. loading,
  1928. disabled
  1929. }), className],
  1930. "onClick": onClick
  1931. }, [renderActionContent(action, index)]);
  1932. };
  1933. const renderDescription = () => {
  1934. if (props.description || slots.description) {
  1935. const content = slots.description ? slots.description() : props.description;
  1936. return createVNode("div", {
  1937. "class": bem11("description")
  1938. }, [content]);
  1939. }
  1940. };
  1941. return () => createVNode(Popup, mergeProps({
  1942. "class": bem11(),
  1943. "position": "bottom",
  1944. "onUpdate:show": updateShow
  1945. }, pick(props, popupInheritKeys)), {
  1946. default: () => {
  1947. var _a;
  1948. return [renderHeader(), renderDescription(), createVNode("div", {
  1949. "class": bem11("content")
  1950. }, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
  1951. }
  1952. });
  1953. }
  1954. });
  1955. // node_modules/vant/es/action-sheet/index.mjs
  1956. var ActionSheet = withInstall(stdin_default13);
  1957. // node_modules/vant/es/utils/deep-clone.mjs
  1958. function deepClone(obj) {
  1959. if (!isDef(obj)) {
  1960. return obj;
  1961. }
  1962. if (Array.isArray(obj)) {
  1963. return obj.map((item) => deepClone(item));
  1964. }
  1965. if (isObject(obj)) {
  1966. const to = {};
  1967. Object.keys(obj).forEach((key) => {
  1968. to[key] = deepClone(obj[key]);
  1969. });
  1970. return to;
  1971. }
  1972. return obj;
  1973. }
  1974. // node_modules/vant/es/picker/PickerColumn.mjs
  1975. var DEFAULT_DURATION = 200;
  1976. var MOMENTUM_LIMIT_TIME = 300;
  1977. var MOMENTUM_LIMIT_DISTANCE = 15;
  1978. var [name12, bem12] = createNamespace("picker-column");
  1979. function getElementTranslateY(element) {
  1980. const {
  1981. transform
  1982. } = window.getComputedStyle(element);
  1983. const translateY = transform.slice(7, transform.length - 1).split(", ")[5];
  1984. return Number(translateY);
  1985. }
  1986. var PICKER_KEY = Symbol(name12);
  1987. var isOptionDisabled = (option) => isObject(option) && option.disabled;
  1988. var stdin_default14 = defineComponent({
  1989. name: name12,
  1990. props: {
  1991. textKey: makeRequiredProp(String),
  1992. readonly: Boolean,
  1993. allowHtml: Boolean,
  1994. className: unknownProp,
  1995. itemHeight: makeRequiredProp(Number),
  1996. defaultIndex: makeNumberProp(0),
  1997. swipeDuration: makeRequiredProp(numericProp),
  1998. initialOptions: makeArrayProp(),
  1999. visibleItemCount: makeRequiredProp(numericProp)
  2000. },
  2001. emits: ["change"],
  2002. setup(props, {
  2003. emit,
  2004. slots
  2005. }) {
  2006. let moving;
  2007. let startOffset;
  2008. let touchStartTime;
  2009. let momentumOffset;
  2010. let transitionEndTrigger;
  2011. const root = ref();
  2012. const wrapper = ref();
  2013. const state = reactive({
  2014. index: props.defaultIndex,
  2015. offset: 0,
  2016. duration: 0,
  2017. options: deepClone(props.initialOptions)
  2018. });
  2019. const touch = useTouch();
  2020. const count = () => state.options.length;
  2021. const baseOffset = () => props.itemHeight * (+props.visibleItemCount - 1) / 2;
  2022. const adjustIndex = (index) => {
  2023. index = clamp(index, 0, count());
  2024. for (let i = index; i < count(); i++) {
  2025. if (!isOptionDisabled(state.options[i]))
  2026. return i;
  2027. }
  2028. for (let i = index - 1; i >= 0; i--) {
  2029. if (!isOptionDisabled(state.options[i]))
  2030. return i;
  2031. }
  2032. };
  2033. const setIndex = (index, emitChange) => {
  2034. index = adjustIndex(index) || 0;
  2035. const offset2 = -index * props.itemHeight;
  2036. const trigger = () => {
  2037. if (index !== state.index) {
  2038. state.index = index;
  2039. if (emitChange) {
  2040. emit("change", index);
  2041. }
  2042. }
  2043. };
  2044. if (moving && offset2 !== state.offset) {
  2045. transitionEndTrigger = trigger;
  2046. } else {
  2047. trigger();
  2048. }
  2049. state.offset = offset2;
  2050. };
  2051. const setOptions = (options) => {
  2052. if (JSON.stringify(options) !== JSON.stringify(state.options)) {
  2053. state.options = deepClone(options);
  2054. setIndex(props.defaultIndex);
  2055. }
  2056. };
  2057. const onClickItem = (index) => {
  2058. if (moving || props.readonly) {
  2059. return;
  2060. }
  2061. transitionEndTrigger = null;
  2062. state.duration = DEFAULT_DURATION;
  2063. setIndex(index, true);
  2064. };
  2065. const getOptionText = (option) => {
  2066. if (isObject(option) && props.textKey in option) {
  2067. return option[props.textKey];
  2068. }
  2069. return option;
  2070. };
  2071. const getIndexByOffset = (offset2) => clamp(Math.round(-offset2 / props.itemHeight), 0, count() - 1);
  2072. const momentum = (distance, duration) => {
  2073. const speed = Math.abs(distance / duration);
  2074. distance = state.offset + speed / 3e-3 * (distance < 0 ? -1 : 1);
  2075. const index = getIndexByOffset(distance);
  2076. state.duration = +props.swipeDuration;
  2077. setIndex(index, true);
  2078. };
  2079. const stopMomentum = () => {
  2080. moving = false;
  2081. state.duration = 0;
  2082. if (transitionEndTrigger) {
  2083. transitionEndTrigger();
  2084. transitionEndTrigger = null;
  2085. }
  2086. };
  2087. const onTouchStart = (event) => {
  2088. if (props.readonly) {
  2089. return;
  2090. }
  2091. touch.start(event);
  2092. if (moving) {
  2093. const translateY = getElementTranslateY(wrapper.value);
  2094. state.offset = Math.min(0, translateY - baseOffset());
  2095. startOffset = state.offset;
  2096. } else {
  2097. startOffset = state.offset;
  2098. }
  2099. state.duration = 0;
  2100. touchStartTime = Date.now();
  2101. momentumOffset = startOffset;
  2102. transitionEndTrigger = null;
  2103. };
  2104. const onTouchMove = (event) => {
  2105. if (props.readonly) {
  2106. return;
  2107. }
  2108. touch.move(event);
  2109. if (touch.isVertical()) {
  2110. moving = true;
  2111. preventDefault(event, true);
  2112. }
  2113. state.offset = clamp(startOffset + touch.deltaY.value, -(count() * props.itemHeight), props.itemHeight);
  2114. const now = Date.now();
  2115. if (now - touchStartTime > MOMENTUM_LIMIT_TIME) {
  2116. touchStartTime = now;
  2117. momentumOffset = state.offset;
  2118. }
  2119. };
  2120. const onTouchEnd = () => {
  2121. if (props.readonly) {
  2122. return;
  2123. }
  2124. const distance = state.offset - momentumOffset;
  2125. const duration = Date.now() - touchStartTime;
  2126. const allowMomentum = duration < MOMENTUM_LIMIT_TIME && Math.abs(distance) > MOMENTUM_LIMIT_DISTANCE;
  2127. if (allowMomentum) {
  2128. momentum(distance, duration);
  2129. return;
  2130. }
  2131. const index = getIndexByOffset(state.offset);
  2132. state.duration = DEFAULT_DURATION;
  2133. setIndex(index, true);
  2134. setTimeout(() => {
  2135. moving = false;
  2136. }, 0);
  2137. };
  2138. const renderOptions = () => {
  2139. const optionStyle = {
  2140. height: `${props.itemHeight}px`
  2141. };
  2142. return state.options.map((option, index) => {
  2143. const text = getOptionText(option);
  2144. const disabled = isOptionDisabled(option);
  2145. const data = {
  2146. role: "button",
  2147. style: optionStyle,
  2148. tabindex: disabled ? -1 : 0,
  2149. class: bem12("item", {
  2150. disabled,
  2151. selected: index === state.index
  2152. }),
  2153. onClick: () => onClickItem(index)
  2154. };
  2155. const childData = {
  2156. class: "van-ellipsis",
  2157. [props.allowHtml ? "innerHTML" : "textContent"]: text
  2158. };
  2159. return createVNode("li", data, [slots.option ? slots.option(option) : createVNode("div", childData, null)]);
  2160. });
  2161. };
  2162. const setValue = (value) => {
  2163. const {
  2164. options
  2165. } = state;
  2166. for (let i = 0; i < options.length; i++) {
  2167. if (getOptionText(options[i]) === value) {
  2168. return setIndex(i);
  2169. }
  2170. }
  2171. };
  2172. const getValue = () => state.options[state.index];
  2173. const hasOptions = () => state.options.length;
  2174. setIndex(state.index);
  2175. useParent(PICKER_KEY);
  2176. useExpose({
  2177. state,
  2178. setIndex,
  2179. getValue,
  2180. setValue,
  2181. setOptions,
  2182. hasOptions,
  2183. stopMomentum
  2184. });
  2185. watch(() => props.initialOptions, setOptions);
  2186. watch(() => props.defaultIndex, (value) => setIndex(value));
  2187. useEventListener("touchmove", onTouchMove, {
  2188. target: root
  2189. });
  2190. return () => createVNode("div", {
  2191. "ref": root,
  2192. "class": [bem12(), props.className],
  2193. "onTouchstartPassive": onTouchStart,
  2194. "onTouchend": onTouchEnd,
  2195. "onTouchcancel": onTouchEnd
  2196. }, [createVNode("ul", {
  2197. "ref": wrapper,
  2198. "style": {
  2199. transform: `translate3d(0, ${state.offset + baseOffset()}px, 0)`,
  2200. transitionDuration: `${state.duration}ms`,
  2201. transitionProperty: state.duration ? "all" : "none"
  2202. },
  2203. "class": bem12("wrapper"),
  2204. "onTransitionend": stopMomentum
  2205. }, [renderOptions()])]);
  2206. }
  2207. });
  2208. // node_modules/vant/es/picker/Picker.mjs
  2209. var [name13, bem13, t] = createNamespace("picker");
  2210. var pickerSharedProps = {
  2211. title: String,
  2212. loading: Boolean,
  2213. readonly: Boolean,
  2214. allowHtml: Boolean,
  2215. itemHeight: makeNumericProp(44),
  2216. showToolbar: truthProp,
  2217. swipeDuration: makeNumericProp(1e3),
  2218. visibleItemCount: makeNumericProp(6),
  2219. cancelButtonText: String,
  2220. confirmButtonText: String
  2221. };
  2222. var pickerProps = extend({}, pickerSharedProps, {
  2223. columns: makeArrayProp(),
  2224. valueKey: String,
  2225. defaultIndex: makeNumericProp(0),
  2226. toolbarPosition: makeStringProp("top"),
  2227. columnsFieldNames: Object
  2228. });
  2229. var stdin_default15 = defineComponent({
  2230. name: name13,
  2231. props: pickerProps,
  2232. emits: ["confirm", "cancel", "change"],
  2233. setup(props, {
  2234. emit,
  2235. slots
  2236. }) {
  2237. if (true) {
  2238. if (slots.default) {
  2239. console.warn('[Vant] Picker: "default" slot is deprecated, please use "toolbar" slot instead.');
  2240. }
  2241. if (props.valueKey) {
  2242. console.warn('[Vant] Picker: "valueKey" prop is deprecated, please use "columnsFieldNames" prop instead.');
  2243. }
  2244. }
  2245. const hasOptions = ref(false);
  2246. const columnsRef = ref();
  2247. const formattedColumns = ref([]);
  2248. const columnsFieldNames = computed(() => {
  2249. const {
  2250. columnsFieldNames: columnsFieldNames2
  2251. } = props;
  2252. return {
  2253. text: (columnsFieldNames2 == null ? void 0 : columnsFieldNames2.text) || props.valueKey || "text",
  2254. values: (columnsFieldNames2 == null ? void 0 : columnsFieldNames2.values) || "values",
  2255. children: (columnsFieldNames2 == null ? void 0 : columnsFieldNames2.children) || "children"
  2256. };
  2257. });
  2258. const {
  2259. children,
  2260. linkChildren
  2261. } = useChildren(PICKER_KEY);
  2262. linkChildren();
  2263. const itemHeight = computed(() => unitToPx(props.itemHeight));
  2264. const dataType = computed(() => {
  2265. const firstColumn = props.columns[0];
  2266. if (typeof firstColumn === "object") {
  2267. if (columnsFieldNames.value.children in firstColumn) {
  2268. return "cascade";
  2269. }
  2270. if (columnsFieldNames.value.values in firstColumn) {
  2271. return "object";
  2272. }
  2273. }
  2274. return "plain";
  2275. });
  2276. const formatCascade = () => {
  2277. var _a;
  2278. const formatted = [];
  2279. let cursor = {
  2280. [columnsFieldNames.value.children]: props.columns
  2281. };
  2282. while (cursor && cursor[columnsFieldNames.value.children]) {
  2283. const children2 = cursor[columnsFieldNames.value.children];
  2284. let defaultIndex = (_a = cursor.defaultIndex) != null ? _a : +props.defaultIndex;
  2285. while (children2[defaultIndex] && children2[defaultIndex].disabled) {
  2286. if (defaultIndex < children2.length - 1) {
  2287. defaultIndex++;
  2288. } else {
  2289. defaultIndex = 0;
  2290. break;
  2291. }
  2292. }
  2293. formatted.push({
  2294. [columnsFieldNames.value.values]: cursor[columnsFieldNames.value.children],
  2295. className: cursor.className,
  2296. defaultIndex
  2297. });
  2298. cursor = children2[defaultIndex];
  2299. }
  2300. formattedColumns.value = formatted;
  2301. };
  2302. const format3 = () => {
  2303. const {
  2304. columns
  2305. } = props;
  2306. if (dataType.value === "plain") {
  2307. formattedColumns.value = [{
  2308. [columnsFieldNames.value.values]: columns
  2309. }];
  2310. } else if (dataType.value === "cascade") {
  2311. formatCascade();
  2312. } else {
  2313. formattedColumns.value = columns;
  2314. }
  2315. hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
  2316. };
  2317. const getIndexes = () => children.map((child) => child.state.index);
  2318. const setColumnValues = (index, options) => {
  2319. const column = children[index];
  2320. if (column) {
  2321. column.setOptions(options);
  2322. hasOptions.value = true;
  2323. }
  2324. };
  2325. const onCascadeChange = (columnIndex) => {
  2326. let cursor = {
  2327. [columnsFieldNames.value.children]: props.columns
  2328. };
  2329. const indexes = getIndexes();
  2330. for (let i = 0; i <= columnIndex; i++) {
  2331. cursor = cursor[columnsFieldNames.value.children][indexes[i]];
  2332. }
  2333. while (cursor && cursor[columnsFieldNames.value.children]) {
  2334. columnIndex++;
  2335. setColumnValues(columnIndex, cursor[columnsFieldNames.value.children]);
  2336. cursor = cursor[columnsFieldNames.value.children][cursor.defaultIndex || 0];
  2337. }
  2338. };
  2339. const getChild = (index) => children[index];
  2340. const getColumnValue = (index) => {
  2341. const column = getChild(index);
  2342. if (column) {
  2343. return column.getValue();
  2344. }
  2345. };
  2346. const setColumnValue = (index, value) => {
  2347. const column = getChild(index);
  2348. if (column) {
  2349. column.setValue(value);
  2350. if (dataType.value === "cascade") {
  2351. onCascadeChange(index);
  2352. }
  2353. }
  2354. };
  2355. const getColumnIndex = (index) => {
  2356. const column = getChild(index);
  2357. if (column) {
  2358. return column.state.index;
  2359. }
  2360. };
  2361. const setColumnIndex = (columnIndex, optionIndex) => {
  2362. const column = getChild(columnIndex);
  2363. if (column) {
  2364. column.setIndex(optionIndex);
  2365. if (dataType.value === "cascade") {
  2366. onCascadeChange(columnIndex);
  2367. }
  2368. }
  2369. };
  2370. const getColumnValues = (index) => {
  2371. const column = getChild(index);
  2372. if (column) {
  2373. return column.state.options;
  2374. }
  2375. };
  2376. const getValues = () => children.map((child) => child.getValue());
  2377. const setValues = (values) => {
  2378. values.forEach((value, index) => {
  2379. setColumnValue(index, value);
  2380. });
  2381. };
  2382. const setIndexes = (indexes) => {
  2383. indexes.forEach((optionIndex, columnIndex) => {
  2384. setColumnIndex(columnIndex, optionIndex);
  2385. });
  2386. };
  2387. const emitAction = (event) => {
  2388. if (dataType.value === "plain") {
  2389. emit(event, getColumnValue(0), getColumnIndex(0));
  2390. } else {
  2391. emit(event, getValues(), getIndexes());
  2392. }
  2393. };
  2394. const onChange = (columnIndex) => {
  2395. if (dataType.value === "cascade") {
  2396. onCascadeChange(columnIndex);
  2397. }
  2398. if (dataType.value === "plain") {
  2399. emit("change", getColumnValue(0), getColumnIndex(0));
  2400. } else {
  2401. emit("change", getValues(), columnIndex);
  2402. }
  2403. };
  2404. const confirm = () => {
  2405. children.forEach((child) => child.stopMomentum());
  2406. emitAction("confirm");
  2407. };
  2408. const cancel = () => emitAction("cancel");
  2409. const renderTitle = () => {
  2410. if (slots.title) {
  2411. return slots.title();
  2412. }
  2413. if (props.title) {
  2414. return createVNode("div", {
  2415. "class": [bem13("title"), "van-ellipsis"]
  2416. }, [props.title]);
  2417. }
  2418. };
  2419. const renderCancel = () => {
  2420. const text = props.cancelButtonText || t("cancel");
  2421. return createVNode("button", {
  2422. "type": "button",
  2423. "class": [bem13("cancel"), HAPTICS_FEEDBACK],
  2424. "onClick": cancel
  2425. }, [slots.cancel ? slots.cancel() : text]);
  2426. };
  2427. const renderConfirm = () => {
  2428. const text = props.confirmButtonText || t("confirm");
  2429. return createVNode("button", {
  2430. "type": "button",
  2431. "class": [bem13("confirm"), HAPTICS_FEEDBACK],
  2432. "onClick": confirm
  2433. }, [slots.confirm ? slots.confirm() : text]);
  2434. };
  2435. const renderToolbar = () => {
  2436. if (props.showToolbar) {
  2437. const slot = slots.toolbar || slots.default;
  2438. return createVNode("div", {
  2439. "class": bem13("toolbar")
  2440. }, [slot ? slot() : [renderCancel(), renderTitle(), renderConfirm()]]);
  2441. }
  2442. };
  2443. const renderColumnItems = () => formattedColumns.value.map((item, columnIndex) => {
  2444. var _a;
  2445. return createVNode(stdin_default14, {
  2446. "textKey": columnsFieldNames.value.text,
  2447. "readonly": props.readonly,
  2448. "allowHtml": props.allowHtml,
  2449. "className": item.className,
  2450. "itemHeight": itemHeight.value,
  2451. "defaultIndex": (_a = item.defaultIndex) != null ? _a : +props.defaultIndex,
  2452. "swipeDuration": props.swipeDuration,
  2453. "initialOptions": item[columnsFieldNames.value.values],
  2454. "visibleItemCount": props.visibleItemCount,
  2455. "onChange": () => onChange(columnIndex)
  2456. }, {
  2457. option: slots.option
  2458. });
  2459. });
  2460. const renderMask = (wrapHeight) => {
  2461. if (hasOptions.value) {
  2462. const frameStyle = {
  2463. height: `${itemHeight.value}px`
  2464. };
  2465. const maskStyle = {
  2466. backgroundSize: `100% ${(wrapHeight - itemHeight.value) / 2}px`
  2467. };
  2468. return [createVNode("div", {
  2469. "class": bem13("mask"),
  2470. "style": maskStyle
  2471. }, null), createVNode("div", {
  2472. "class": [BORDER_UNSET_TOP_BOTTOM, bem13("frame")],
  2473. "style": frameStyle
  2474. }, null)];
  2475. }
  2476. };
  2477. const renderColumns = () => {
  2478. const wrapHeight = itemHeight.value * +props.visibleItemCount;
  2479. const columnsStyle = {
  2480. height: `${wrapHeight}px`
  2481. };
  2482. return createVNode("div", {
  2483. "ref": columnsRef,
  2484. "class": bem13("columns"),
  2485. "style": columnsStyle
  2486. }, [renderColumnItems(), renderMask(wrapHeight)]);
  2487. };
  2488. watch(() => props.columns, format3, {
  2489. immediate: true
  2490. });
  2491. useEventListener("touchmove", preventDefault, {
  2492. target: columnsRef
  2493. });
  2494. useExpose({
  2495. confirm,
  2496. getValues,
  2497. setValues,
  2498. getIndexes,
  2499. setIndexes,
  2500. getColumnIndex,
  2501. setColumnIndex,
  2502. getColumnValue,
  2503. setColumnValue,
  2504. getColumnValues,
  2505. setColumnValues
  2506. });
  2507. return () => {
  2508. var _a, _b;
  2509. return createVNode("div", {
  2510. "class": bem13()
  2511. }, [props.toolbarPosition === "top" ? renderToolbar() : null, props.loading ? createVNode(Loading, {
  2512. "class": bem13("loading")
  2513. }, null) : null, (_a = slots["columns-top"]) == null ? void 0 : _a.call(slots), renderColumns(), (_b = slots["columns-bottom"]) == null ? void 0 : _b.call(slots), props.toolbarPosition === "bottom" ? renderToolbar() : null]);
  2514. };
  2515. }
  2516. });
  2517. // node_modules/vant/es/picker/index.mjs
  2518. var Picker = withInstall(stdin_default15);
  2519. // node_modules/vant/es/area/Area.mjs
  2520. var [name14, bem14] = createNamespace("area");
  2521. var EMPTY_CODE = "000000";
  2522. var INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
  2523. var INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
  2524. var isOverseaCode = (code) => code[0] === "9";
  2525. var areaProps = extend({}, pickerSharedProps, {
  2526. value: String,
  2527. columnsNum: makeNumericProp(3),
  2528. columnsPlaceholder: makeArrayProp(),
  2529. areaList: {
  2530. type: Object,
  2531. default: () => ({})
  2532. },
  2533. isOverseaCode: {
  2534. type: Function,
  2535. default: isOverseaCode
  2536. }
  2537. });
  2538. var stdin_default16 = defineComponent({
  2539. name: name14,
  2540. props: areaProps,
  2541. emits: ["change", "confirm", "cancel"],
  2542. setup(props, {
  2543. emit,
  2544. slots
  2545. }) {
  2546. const pickerRef = ref();
  2547. const state = reactive({
  2548. code: props.value,
  2549. columns: [{
  2550. values: []
  2551. }, {
  2552. values: []
  2553. }, {
  2554. values: []
  2555. }]
  2556. });
  2557. const areaList = computed(() => {
  2558. const {
  2559. areaList: areaList2
  2560. } = props;
  2561. return {
  2562. province: areaList2.province_list || {},
  2563. city: areaList2.city_list || {},
  2564. county: areaList2.county_list || {}
  2565. };
  2566. });
  2567. const placeholderMap = computed(() => {
  2568. const {
  2569. columnsPlaceholder
  2570. } = props;
  2571. return {
  2572. province: columnsPlaceholder[0] || "",
  2573. city: columnsPlaceholder[1] || "",
  2574. county: columnsPlaceholder[2] || ""
  2575. };
  2576. });
  2577. const getDefaultCode = () => {
  2578. if (props.columnsPlaceholder.length) {
  2579. return EMPTY_CODE;
  2580. }
  2581. const {
  2582. county,
  2583. city
  2584. } = areaList.value;
  2585. const countyCodes = Object.keys(county);
  2586. if (countyCodes[0]) {
  2587. return countyCodes[0];
  2588. }
  2589. const cityCodes = Object.keys(city);
  2590. if (cityCodes[0]) {
  2591. return cityCodes[0];
  2592. }
  2593. return "";
  2594. };
  2595. const getColumnValues = (type, code) => {
  2596. let column = [];
  2597. if (type !== "province" && !code) {
  2598. return column;
  2599. }
  2600. const list = areaList.value[type];
  2601. column = Object.keys(list).map((listCode) => ({
  2602. code: listCode,
  2603. name: list[listCode]
  2604. }));
  2605. if (code) {
  2606. if (type === "city" && props.isOverseaCode(code)) {
  2607. code = "9";
  2608. }
  2609. column = column.filter((item) => item.code.indexOf(code) === 0);
  2610. }
  2611. if (placeholderMap.value[type] && column.length) {
  2612. let codeFill = "";
  2613. if (type === "city") {
  2614. codeFill = EMPTY_CODE.slice(2, 4);
  2615. } else if (type === "county") {
  2616. codeFill = EMPTY_CODE.slice(4, 6);
  2617. }
  2618. column.unshift({
  2619. code: code + codeFill,
  2620. name: placeholderMap.value[type]
  2621. });
  2622. }
  2623. return column;
  2624. };
  2625. const getIndex = (type, code) => {
  2626. let compareNum = code.length;
  2627. if (type === "province") {
  2628. compareNum = props.isOverseaCode(code) ? 1 : 2;
  2629. }
  2630. if (type === "city") {
  2631. compareNum = 4;
  2632. }
  2633. code = code.slice(0, compareNum);
  2634. const list = getColumnValues(type, compareNum > 2 ? code.slice(0, compareNum - 2) : "");
  2635. for (let i = 0; i < list.length; i++) {
  2636. if (list[i].code.slice(0, compareNum) === code) {
  2637. return i;
  2638. }
  2639. }
  2640. return 0;
  2641. };
  2642. const setValues = () => {
  2643. const picker = pickerRef.value;
  2644. if (!picker) {
  2645. return;
  2646. }
  2647. let code = state.code || getDefaultCode();
  2648. const province = getColumnValues("province");
  2649. const city = getColumnValues("city", code.slice(0, 2));
  2650. picker.setColumnValues(0, province);
  2651. picker.setColumnValues(1, city);
  2652. if (city.length && code.slice(2, 4) === "00" && !props.isOverseaCode(code)) {
  2653. [{
  2654. code
  2655. }] = city;
  2656. }
  2657. picker.setColumnValues(2, getColumnValues("county", code.slice(0, 4)));
  2658. picker.setIndexes([getIndex("province", code), getIndex("city", code), getIndex("county", code)]);
  2659. };
  2660. const parseValues = (values) => values.map((value, index) => {
  2661. if (value) {
  2662. value = deepClone(value);
  2663. if (!value.code || value.name === props.columnsPlaceholder[index]) {
  2664. value.code = "";
  2665. value.name = "";
  2666. }
  2667. }
  2668. return value;
  2669. });
  2670. const getValues = () => {
  2671. if (pickerRef.value) {
  2672. const values = pickerRef.value.getValues().filter(Boolean);
  2673. return parseValues(values);
  2674. }
  2675. return [];
  2676. };
  2677. const getArea = () => {
  2678. const values = getValues();
  2679. const area = {
  2680. code: "",
  2681. country: "",
  2682. province: "",
  2683. city: "",
  2684. county: ""
  2685. };
  2686. if (!values.length) {
  2687. return area;
  2688. }
  2689. const names = values.map((item) => item.name);
  2690. const validValues = values.filter((value) => value.code);
  2691. area.code = validValues.length ? validValues[validValues.length - 1].code : "";
  2692. if (props.isOverseaCode(area.code)) {
  2693. area.country = names[1] || "";
  2694. area.province = names[2] || "";
  2695. } else {
  2696. area.province = names[0] || "";
  2697. area.city = names[1] || "";
  2698. area.county = names[2] || "";
  2699. }
  2700. return area;
  2701. };
  2702. const reset = (newCode = "") => {
  2703. state.code = newCode;
  2704. setValues();
  2705. };
  2706. const onChange = (values, index) => {
  2707. state.code = values[index].code;
  2708. setValues();
  2709. if (pickerRef.value) {
  2710. const parsedValues = parseValues(pickerRef.value.getValues());
  2711. emit("change", parsedValues, index);
  2712. }
  2713. };
  2714. const onConfirm = (values, index) => {
  2715. setValues();
  2716. emit("confirm", parseValues(values), index);
  2717. };
  2718. const onCancel = (...args) => emit("cancel", ...args);
  2719. onMounted(setValues);
  2720. watch(() => props.value, (value) => {
  2721. state.code = value;
  2722. setValues();
  2723. });
  2724. watch(() => props.areaList, setValues, {
  2725. deep: true
  2726. });
  2727. watch(() => props.columnsNum, () => {
  2728. nextTick(setValues);
  2729. });
  2730. useExpose({
  2731. reset,
  2732. getArea,
  2733. getValues
  2734. });
  2735. return () => {
  2736. const columns = state.columns.slice(0, +props.columnsNum);
  2737. return createVNode(Picker, mergeProps({
  2738. "ref": pickerRef,
  2739. "class": bem14(),
  2740. "columns": columns,
  2741. "columnsFieldNames": {
  2742. text: "name"
  2743. },
  2744. "onChange": onChange,
  2745. "onCancel": onCancel,
  2746. "onConfirm": onConfirm
  2747. }, pick(props, INHERIT_PROPS)), pick(slots, INHERIT_SLOTS));
  2748. };
  2749. }
  2750. });
  2751. // node_modules/vant/es/area/index.mjs
  2752. var Area = withInstall(stdin_default16);
  2753. // node_modules/vant/es/cell/Cell.mjs
  2754. var [name15, bem15] = createNamespace("cell");
  2755. var cellSharedProps = {
  2756. icon: String,
  2757. size: String,
  2758. title: numericProp,
  2759. value: numericProp,
  2760. label: numericProp,
  2761. center: Boolean,
  2762. isLink: Boolean,
  2763. border: truthProp,
  2764. required: Boolean,
  2765. iconPrefix: String,
  2766. valueClass: unknownProp,
  2767. labelClass: unknownProp,
  2768. titleClass: unknownProp,
  2769. titleStyle: null,
  2770. arrowDirection: String,
  2771. clickable: {
  2772. type: Boolean,
  2773. default: null
  2774. }
  2775. };
  2776. var cellProps = extend({}, cellSharedProps, routeProps);
  2777. var stdin_default17 = defineComponent({
  2778. name: name15,
  2779. props: cellProps,
  2780. setup(props, {
  2781. slots
  2782. }) {
  2783. const route2 = useRoute();
  2784. const renderLabel = () => {
  2785. const showLabel = slots.label || isDef(props.label);
  2786. if (showLabel) {
  2787. return createVNode("div", {
  2788. "class": [bem15("label"), props.labelClass]
  2789. }, [slots.label ? slots.label() : props.label]);
  2790. }
  2791. };
  2792. const renderTitle = () => {
  2793. if (slots.title || isDef(props.title)) {
  2794. return createVNode("div", {
  2795. "class": [bem15("title"), props.titleClass],
  2796. "style": props.titleStyle
  2797. }, [slots.title ? slots.title() : createVNode("span", null, [props.title]), renderLabel()]);
  2798. }
  2799. };
  2800. const renderValue = () => {
  2801. const slot = slots.value || slots.default;
  2802. const hasValue = slot || isDef(props.value);
  2803. if (hasValue) {
  2804. const hasTitle = slots.title || isDef(props.title);
  2805. return createVNode("div", {
  2806. "class": [bem15("value", {
  2807. alone: !hasTitle
  2808. }), props.valueClass]
  2809. }, [slot ? slot() : createVNode("span", null, [props.value])]);
  2810. }
  2811. };
  2812. const renderLeftIcon = () => {
  2813. if (slots.icon) {
  2814. return slots.icon();
  2815. }
  2816. if (props.icon) {
  2817. return createVNode(Icon, {
  2818. "name": props.icon,
  2819. "class": bem15("left-icon"),
  2820. "classPrefix": props.iconPrefix
  2821. }, null);
  2822. }
  2823. };
  2824. const renderRightIcon = () => {
  2825. if (slots["right-icon"]) {
  2826. return slots["right-icon"]();
  2827. }
  2828. if (props.isLink) {
  2829. const name210 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
  2830. return createVNode(Icon, {
  2831. "name": name210,
  2832. "class": bem15("right-icon")
  2833. }, null);
  2834. }
  2835. };
  2836. return () => {
  2837. var _a, _b;
  2838. const {
  2839. size,
  2840. center,
  2841. border,
  2842. isLink,
  2843. required
  2844. } = props;
  2845. const clickable = (_a = props.clickable) != null ? _a : isLink;
  2846. const classes = {
  2847. center,
  2848. required,
  2849. clickable,
  2850. borderless: !border
  2851. };
  2852. if (size) {
  2853. classes[size] = !!size;
  2854. }
  2855. return createVNode("div", {
  2856. "class": bem15(classes),
  2857. "role": clickable ? "button" : void 0,
  2858. "tabindex": clickable ? 0 : void 0,
  2859. "onClick": route2
  2860. }, [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_b = slots.extra) == null ? void 0 : _b.call(slots)]);
  2861. };
  2862. }
  2863. });
  2864. // node_modules/vant/es/cell/index.mjs
  2865. var Cell = withInstall(stdin_default17);
  2866. // node_modules/vant/es/form/Form.mjs
  2867. var [name16, bem16] = createNamespace("form");
  2868. var formProps = {
  2869. colon: Boolean,
  2870. disabled: Boolean,
  2871. readonly: Boolean,
  2872. showError: Boolean,
  2873. labelWidth: numericProp,
  2874. labelAlign: String,
  2875. inputAlign: String,
  2876. scrollToError: Boolean,
  2877. validateFirst: Boolean,
  2878. submitOnEnter: truthProp,
  2879. showErrorMessage: truthProp,
  2880. errorMessageAlign: String,
  2881. validateTrigger: {
  2882. type: [String, Array],
  2883. default: "onBlur"
  2884. }
  2885. };
  2886. var stdin_default18 = defineComponent({
  2887. name: name16,
  2888. props: formProps,
  2889. emits: ["submit", "failed"],
  2890. setup(props, {
  2891. emit,
  2892. slots
  2893. }) {
  2894. const {
  2895. children,
  2896. linkChildren
  2897. } = useChildren(FORM_KEY);
  2898. const getFieldsByNames = (names) => {
  2899. if (names) {
  2900. return children.filter((field) => names.includes(field.name));
  2901. }
  2902. return children;
  2903. };
  2904. const validateSeq = (names) => new Promise((resolve, reject) => {
  2905. const errors = [];
  2906. const fields = getFieldsByNames(names);
  2907. fields.reduce((promise, field) => promise.then(() => {
  2908. if (!errors.length) {
  2909. return field.validate().then((error) => {
  2910. if (error) {
  2911. errors.push(error);
  2912. }
  2913. });
  2914. }
  2915. }), Promise.resolve()).then(() => {
  2916. if (errors.length) {
  2917. reject(errors);
  2918. } else {
  2919. resolve();
  2920. }
  2921. });
  2922. });
  2923. const validateAll = (names) => new Promise((resolve, reject) => {
  2924. const fields = getFieldsByNames(names);
  2925. Promise.all(fields.map((item) => item.validate())).then((errors) => {
  2926. errors = errors.filter(Boolean);
  2927. if (errors.length) {
  2928. reject(errors);
  2929. } else {
  2930. resolve();
  2931. }
  2932. });
  2933. });
  2934. const validateField = (name210) => {
  2935. const matched = children.find((item) => item.name === name210);
  2936. if (matched) {
  2937. return new Promise((resolve, reject) => {
  2938. matched.validate().then((error) => {
  2939. if (error) {
  2940. reject(error);
  2941. } else {
  2942. resolve();
  2943. }
  2944. });
  2945. });
  2946. }
  2947. return Promise.reject();
  2948. };
  2949. const validate = (name210) => {
  2950. if (typeof name210 === "string") {
  2951. return validateField(name210);
  2952. }
  2953. return props.validateFirst ? validateSeq(name210) : validateAll(name210);
  2954. };
  2955. const resetValidation = (name210) => {
  2956. if (typeof name210 === "string") {
  2957. name210 = [name210];
  2958. }
  2959. const fields = getFieldsByNames(name210);
  2960. fields.forEach((item) => {
  2961. item.resetValidation();
  2962. });
  2963. };
  2964. const getValidationStatus = () => children.reduce((form, field) => {
  2965. form[field.name] = field.getValidationStatus();
  2966. return form;
  2967. }, {});
  2968. const scrollToField = (name210, options) => {
  2969. children.some((item) => {
  2970. if (item.name === name210) {
  2971. item.$el.scrollIntoView(options);
  2972. return true;
  2973. }
  2974. return false;
  2975. });
  2976. };
  2977. const getValues = () => children.reduce((form, field) => {
  2978. form[field.name] = field.formValue.value;
  2979. return form;
  2980. }, {});
  2981. const submit = () => {
  2982. const values = getValues();
  2983. validate().then(() => emit("submit", values)).catch((errors) => {
  2984. emit("failed", {
  2985. values,
  2986. errors
  2987. });
  2988. if (props.scrollToError && errors[0].name) {
  2989. scrollToField(errors[0].name);
  2990. }
  2991. });
  2992. };
  2993. const onSubmit = (event) => {
  2994. preventDefault(event);
  2995. submit();
  2996. };
  2997. linkChildren({
  2998. props
  2999. });
  3000. useExpose({
  3001. submit,
  3002. validate,
  3003. getValues,
  3004. scrollToField,
  3005. resetValidation,
  3006. getValidationStatus
  3007. });
  3008. return () => {
  3009. var _a;
  3010. return createVNode("form", {
  3011. "class": bem16(),
  3012. "onSubmit": onSubmit
  3013. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  3014. };
  3015. }
  3016. });
  3017. // node_modules/vant/es/form/index.mjs
  3018. var Form = withInstall(stdin_default18);
  3019. // node_modules/vant/es/field/utils.mjs
  3020. function isEmptyValue(value) {
  3021. if (Array.isArray(value)) {
  3022. return !value.length;
  3023. }
  3024. if (value === 0) {
  3025. return false;
  3026. }
  3027. return !value;
  3028. }
  3029. function runSyncRule(value, rule) {
  3030. if (isEmptyValue(value)) {
  3031. if (rule.required) {
  3032. return false;
  3033. }
  3034. if (rule.validateEmpty === false) {
  3035. return true;
  3036. }
  3037. }
  3038. if (rule.pattern && !rule.pattern.test(String(value))) {
  3039. return false;
  3040. }
  3041. return true;
  3042. }
  3043. function runRuleValidator(value, rule) {
  3044. return new Promise((resolve) => {
  3045. const returnVal = rule.validator(value, rule);
  3046. if (isPromise(returnVal)) {
  3047. returnVal.then(resolve);
  3048. return;
  3049. }
  3050. resolve(returnVal);
  3051. });
  3052. }
  3053. function getRuleMessage(value, rule) {
  3054. const { message } = rule;
  3055. if (isFunction(message)) {
  3056. return message(value, rule);
  3057. }
  3058. return message || "";
  3059. }
  3060. function startComposing({ target }) {
  3061. target.composing = true;
  3062. }
  3063. function endComposing({ target }) {
  3064. if (target.composing) {
  3065. target.composing = false;
  3066. target.dispatchEvent(new Event("input"));
  3067. }
  3068. }
  3069. function resizeTextarea(input, autosize) {
  3070. const scrollTop = getRootScrollTop();
  3071. input.style.height = "auto";
  3072. let height2 = input.scrollHeight;
  3073. if (isObject(autosize)) {
  3074. const { maxHeight, minHeight } = autosize;
  3075. if (maxHeight !== void 0) {
  3076. height2 = Math.min(height2, maxHeight);
  3077. }
  3078. if (minHeight !== void 0) {
  3079. height2 = Math.max(height2, minHeight);
  3080. }
  3081. }
  3082. if (height2) {
  3083. input.style.height = `${height2}px`;
  3084. setRootScrollTop(scrollTop);
  3085. }
  3086. }
  3087. function mapInputType(type) {
  3088. if (type === "number") {
  3089. return {
  3090. type: "text",
  3091. inputmode: "decimal"
  3092. };
  3093. }
  3094. if (type === "digit") {
  3095. return {
  3096. type: "tel",
  3097. inputmode: "numeric"
  3098. };
  3099. }
  3100. return { type };
  3101. }
  3102. function getStringLength(str) {
  3103. return [...str].length;
  3104. }
  3105. function cutString(str, maxlength) {
  3106. return [...str].slice(0, maxlength).join("");
  3107. }
  3108. // node_modules/vant/es/composables/use-id.mjs
  3109. var current = 0;
  3110. function useId() {
  3111. const vm = getCurrentInstance();
  3112. const { name: name97 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
  3113. if (false) {
  3114. return name97;
  3115. }
  3116. return `${name97}-${++current}`;
  3117. }
  3118. // node_modules/vant/es/field/Field.mjs
  3119. var [name17, bem17] = createNamespace("field");
  3120. var fieldSharedProps = {
  3121. id: String,
  3122. name: String,
  3123. leftIcon: String,
  3124. rightIcon: String,
  3125. autofocus: Boolean,
  3126. clearable: Boolean,
  3127. maxlength: numericProp,
  3128. formatter: Function,
  3129. clearIcon: makeStringProp("clear"),
  3130. modelValue: makeNumericProp(""),
  3131. inputAlign: String,
  3132. placeholder: String,
  3133. autocomplete: String,
  3134. errorMessage: String,
  3135. enterkeyhint: String,
  3136. clearTrigger: makeStringProp("focus"),
  3137. formatTrigger: makeStringProp("onChange"),
  3138. error: {
  3139. type: Boolean,
  3140. default: null
  3141. },
  3142. disabled: {
  3143. type: Boolean,
  3144. default: null
  3145. },
  3146. readonly: {
  3147. type: Boolean,
  3148. default: null
  3149. }
  3150. };
  3151. var fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
  3152. rows: numericProp,
  3153. type: makeStringProp("text"),
  3154. rules: Array,
  3155. autosize: [Boolean, Object],
  3156. labelWidth: numericProp,
  3157. labelClass: unknownProp,
  3158. labelAlign: String,
  3159. showWordLimit: Boolean,
  3160. errorMessageAlign: String,
  3161. colon: {
  3162. type: Boolean,
  3163. default: null
  3164. }
  3165. });
  3166. var stdin_default19 = defineComponent({
  3167. name: name17,
  3168. props: fieldProps,
  3169. emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
  3170. setup(props, {
  3171. emit,
  3172. slots
  3173. }) {
  3174. const id = useId();
  3175. const state = reactive({
  3176. status: "unvalidated",
  3177. focused: false,
  3178. validateMessage: ""
  3179. });
  3180. const inputRef = ref();
  3181. const clearIconRef = ref();
  3182. const customValue = ref();
  3183. const {
  3184. parent: form
  3185. } = useParent(FORM_KEY);
  3186. const getModelValue = () => {
  3187. var _a;
  3188. return String((_a = props.modelValue) != null ? _a : "");
  3189. };
  3190. const getProp = (key) => {
  3191. if (isDef(props[key])) {
  3192. return props[key];
  3193. }
  3194. if (form && isDef(form.props[key])) {
  3195. return form.props[key];
  3196. }
  3197. };
  3198. const showClear = computed(() => {
  3199. const readonly = getProp("readonly");
  3200. if (props.clearable && !readonly) {
  3201. const hasValue = getModelValue() !== "";
  3202. const trigger = props.clearTrigger === "always" || props.clearTrigger === "focus" && state.focused;
  3203. return hasValue && trigger;
  3204. }
  3205. return false;
  3206. });
  3207. const formValue = computed(() => {
  3208. if (customValue.value && slots.input) {
  3209. return customValue.value();
  3210. }
  3211. return props.modelValue;
  3212. });
  3213. const runRules = (rules) => rules.reduce((promise, rule) => promise.then(() => {
  3214. if (state.status === "failed") {
  3215. return;
  3216. }
  3217. let {
  3218. value
  3219. } = formValue;
  3220. if (rule.formatter) {
  3221. value = rule.formatter(value, rule);
  3222. }
  3223. if (!runSyncRule(value, rule)) {
  3224. state.status = "failed";
  3225. state.validateMessage = getRuleMessage(value, rule);
  3226. return;
  3227. }
  3228. if (rule.validator) {
  3229. if (isEmptyValue(value) && rule.validateEmpty === false) {
  3230. return;
  3231. }
  3232. return runRuleValidator(value, rule).then((result) => {
  3233. if (result && typeof result === "string") {
  3234. state.status = "failed";
  3235. state.validateMessage = result;
  3236. } else if (result === false) {
  3237. state.status = "failed";
  3238. state.validateMessage = getRuleMessage(value, rule);
  3239. }
  3240. });
  3241. }
  3242. }), Promise.resolve());
  3243. const resetValidation = () => {
  3244. state.status = "unvalidated";
  3245. state.validateMessage = "";
  3246. };
  3247. const endValidate = () => emit("end-validate", {
  3248. status: state.status
  3249. });
  3250. const validate = (rules = props.rules) => new Promise((resolve) => {
  3251. resetValidation();
  3252. if (rules) {
  3253. emit("start-validate");
  3254. runRules(rules).then(() => {
  3255. if (state.status === "failed") {
  3256. resolve({
  3257. name: props.name,
  3258. message: state.validateMessage
  3259. });
  3260. endValidate();
  3261. } else {
  3262. state.status = "passed";
  3263. resolve();
  3264. endValidate();
  3265. }
  3266. });
  3267. } else {
  3268. resolve();
  3269. }
  3270. });
  3271. const validateWithTrigger = (trigger) => {
  3272. if (form && props.rules) {
  3273. const {
  3274. validateTrigger
  3275. } = form.props;
  3276. const defaultTrigger = toArray(validateTrigger).includes(trigger);
  3277. const rules = props.rules.filter((rule) => {
  3278. if (rule.trigger) {
  3279. return toArray(rule.trigger).includes(trigger);
  3280. }
  3281. return defaultTrigger;
  3282. });
  3283. if (rules.length) {
  3284. validate(rules);
  3285. }
  3286. }
  3287. };
  3288. const limitValueLength = (value) => {
  3289. const {
  3290. maxlength
  3291. } = props;
  3292. if (isDef(maxlength) && getStringLength(value) > maxlength) {
  3293. const modelValue = getModelValue();
  3294. if (modelValue && getStringLength(modelValue) === +maxlength) {
  3295. return modelValue;
  3296. }
  3297. return cutString(value, +maxlength);
  3298. }
  3299. return value;
  3300. };
  3301. const updateValue = (value, trigger = "onChange") => {
  3302. const originalValue = value;
  3303. value = limitValueLength(value);
  3304. const isExceedLimit = value !== originalValue;
  3305. if (props.type === "number" || props.type === "digit") {
  3306. const isNumber = props.type === "number";
  3307. value = formatNumber(value, isNumber, isNumber);
  3308. }
  3309. if (props.formatter && trigger === props.formatTrigger) {
  3310. value = props.formatter(value);
  3311. }
  3312. if (inputRef.value && inputRef.value.value !== value) {
  3313. if (state.focused && isExceedLimit) {
  3314. const {
  3315. selectionStart,
  3316. selectionEnd
  3317. } = inputRef.value;
  3318. inputRef.value.value = value;
  3319. inputRef.value.setSelectionRange(selectionStart - 1, selectionEnd - 1);
  3320. } else {
  3321. inputRef.value.value = value;
  3322. }
  3323. }
  3324. if (value !== props.modelValue) {
  3325. emit("update:modelValue", value);
  3326. }
  3327. };
  3328. const onInput = (event) => {
  3329. if (!event.target.composing) {
  3330. updateValue(event.target.value);
  3331. }
  3332. };
  3333. const blur = () => {
  3334. var _a;
  3335. return (_a = inputRef.value) == null ? void 0 : _a.blur();
  3336. };
  3337. const focus = () => {
  3338. var _a;
  3339. return (_a = inputRef.value) == null ? void 0 : _a.focus();
  3340. };
  3341. const adjustTextareaSize = () => {
  3342. const input = inputRef.value;
  3343. if (props.type === "textarea" && props.autosize && input) {
  3344. resizeTextarea(input, props.autosize);
  3345. }
  3346. };
  3347. const onFocus = (event) => {
  3348. state.focused = true;
  3349. emit("focus", event);
  3350. nextTick(adjustTextareaSize);
  3351. if (getProp("readonly")) {
  3352. blur();
  3353. }
  3354. };
  3355. const onBlur = (event) => {
  3356. if (getProp("readonly")) {
  3357. return;
  3358. }
  3359. state.focused = false;
  3360. updateValue(getModelValue(), "onBlur");
  3361. emit("blur", event);
  3362. validateWithTrigger("onBlur");
  3363. nextTick(adjustTextareaSize);
  3364. resetScroll();
  3365. };
  3366. const onClickInput = (event) => emit("click-input", event);
  3367. const onClickLeftIcon = (event) => emit("click-left-icon", event);
  3368. const onClickRightIcon = (event) => emit("click-right-icon", event);
  3369. const onClear = (event) => {
  3370. preventDefault(event);
  3371. emit("update:modelValue", "");
  3372. emit("clear", event);
  3373. };
  3374. const showError = computed(() => {
  3375. if (typeof props.error === "boolean") {
  3376. return props.error;
  3377. }
  3378. if (form && form.props.showError && state.status === "failed") {
  3379. return true;
  3380. }
  3381. });
  3382. const labelStyle = computed(() => {
  3383. const labelWidth = getProp("labelWidth");
  3384. if (labelWidth) {
  3385. return {
  3386. width: addUnit(labelWidth)
  3387. };
  3388. }
  3389. });
  3390. const onKeypress = (event) => {
  3391. const ENTER_CODE = 13;
  3392. if (event.keyCode === ENTER_CODE) {
  3393. const submitOnEnter = form && form.props.submitOnEnter;
  3394. if (!submitOnEnter && props.type !== "textarea") {
  3395. preventDefault(event);
  3396. }
  3397. if (props.type === "search") {
  3398. blur();
  3399. }
  3400. }
  3401. emit("keypress", event);
  3402. };
  3403. const getInputId = () => props.id || `${id}-input`;
  3404. const getValidationStatus = () => state.status;
  3405. const renderInput = () => {
  3406. const controlClass = bem17("control", [getProp("inputAlign"), {
  3407. error: showError.value,
  3408. custom: !!slots.input,
  3409. "min-height": props.type === "textarea" && !props.autosize
  3410. }]);
  3411. if (slots.input) {
  3412. return createVNode("div", {
  3413. "class": controlClass,
  3414. "onClick": onClickInput
  3415. }, [slots.input()]);
  3416. }
  3417. const inputAttrs = {
  3418. id: getInputId(),
  3419. ref: inputRef,
  3420. name: props.name,
  3421. rows: props.rows !== void 0 ? +props.rows : void 0,
  3422. class: controlClass,
  3423. disabled: getProp("disabled"),
  3424. readonly: getProp("readonly"),
  3425. autofocus: props.autofocus,
  3426. placeholder: props.placeholder,
  3427. autocomplete: props.autocomplete,
  3428. enterkeyhint: props.enterkeyhint,
  3429. "aria-labelledby": props.label ? `${id}-label` : void 0,
  3430. onBlur,
  3431. onFocus,
  3432. onInput,
  3433. onClick: onClickInput,
  3434. onChange: endComposing,
  3435. onKeypress,
  3436. onCompositionend: endComposing,
  3437. onCompositionstart: startComposing
  3438. };
  3439. if (props.type === "textarea") {
  3440. return createVNode("textarea", inputAttrs, null);
  3441. }
  3442. return createVNode("input", mergeProps(mapInputType(props.type), inputAttrs), null);
  3443. };
  3444. const renderLeftIcon = () => {
  3445. const leftIconSlot = slots["left-icon"];
  3446. if (props.leftIcon || leftIconSlot) {
  3447. return createVNode("div", {
  3448. "class": bem17("left-icon"),
  3449. "onClick": onClickLeftIcon
  3450. }, [leftIconSlot ? leftIconSlot() : createVNode(Icon, {
  3451. "name": props.leftIcon,
  3452. "classPrefix": props.iconPrefix
  3453. }, null)]);
  3454. }
  3455. };
  3456. const renderRightIcon = () => {
  3457. const rightIconSlot = slots["right-icon"];
  3458. if (props.rightIcon || rightIconSlot) {
  3459. return createVNode("div", {
  3460. "class": bem17("right-icon"),
  3461. "onClick": onClickRightIcon
  3462. }, [rightIconSlot ? rightIconSlot() : createVNode(Icon, {
  3463. "name": props.rightIcon,
  3464. "classPrefix": props.iconPrefix
  3465. }, null)]);
  3466. }
  3467. };
  3468. const renderWordLimit = () => {
  3469. if (props.showWordLimit && props.maxlength) {
  3470. const count = getStringLength(getModelValue());
  3471. return createVNode("div", {
  3472. "class": bem17("word-limit")
  3473. }, [createVNode("span", {
  3474. "class": bem17("word-num")
  3475. }, [count]), createTextVNode("/"), props.maxlength]);
  3476. }
  3477. };
  3478. const renderMessage = () => {
  3479. if (form && form.props.showErrorMessage === false) {
  3480. return;
  3481. }
  3482. const message = props.errorMessage || state.validateMessage;
  3483. if (message) {
  3484. const slot = slots["error-message"];
  3485. const errorMessageAlign = getProp("errorMessageAlign");
  3486. return createVNode("div", {
  3487. "class": bem17("error-message", errorMessageAlign)
  3488. }, [slot ? slot({
  3489. message
  3490. }) : message]);
  3491. }
  3492. };
  3493. const renderLabel = () => {
  3494. const colon = getProp("colon") ? ":" : "";
  3495. if (slots.label) {
  3496. return [slots.label(), colon];
  3497. }
  3498. if (props.label) {
  3499. return createVNode("label", {
  3500. "id": `${id}-label`,
  3501. "for": getInputId()
  3502. }, [props.label + colon]);
  3503. }
  3504. };
  3505. const renderFieldBody = () => [createVNode("div", {
  3506. "class": bem17("body")
  3507. }, [renderInput(), showClear.value && createVNode(Icon, {
  3508. "ref": clearIconRef,
  3509. "name": props.clearIcon,
  3510. "class": bem17("clear")
  3511. }, null), renderRightIcon(), slots.button && createVNode("div", {
  3512. "class": bem17("button")
  3513. }, [slots.button()])]), renderWordLimit(), renderMessage()];
  3514. useExpose({
  3515. blur,
  3516. focus,
  3517. validate,
  3518. formValue,
  3519. resetValidation,
  3520. getValidationStatus
  3521. });
  3522. provide(CUSTOM_FIELD_INJECTION_KEY, {
  3523. customValue,
  3524. resetValidation,
  3525. validateWithTrigger
  3526. });
  3527. watch(() => props.modelValue, () => {
  3528. updateValue(getModelValue());
  3529. resetValidation();
  3530. validateWithTrigger("onChange");
  3531. nextTick(adjustTextareaSize);
  3532. });
  3533. onMounted(() => {
  3534. updateValue(getModelValue(), props.formatTrigger);
  3535. nextTick(adjustTextareaSize);
  3536. });
  3537. useEventListener("touchstart", onClear, {
  3538. target: computed(() => {
  3539. var _a;
  3540. return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
  3541. })
  3542. });
  3543. return () => {
  3544. const disabled = getProp("disabled");
  3545. const labelAlign = getProp("labelAlign");
  3546. const Label = renderLabel();
  3547. const LeftIcon = renderLeftIcon();
  3548. return createVNode(Cell, {
  3549. "size": props.size,
  3550. "icon": props.leftIcon,
  3551. "class": bem17({
  3552. error: showError.value,
  3553. disabled,
  3554. [`label-${labelAlign}`]: labelAlign
  3555. }),
  3556. "center": props.center,
  3557. "border": props.border,
  3558. "isLink": props.isLink,
  3559. "clickable": props.clickable,
  3560. "titleStyle": labelStyle.value,
  3561. "valueClass": bem17("value"),
  3562. "titleClass": [bem17("label", [labelAlign, {
  3563. required: props.required
  3564. }]), props.labelClass],
  3565. "arrowDirection": props.arrowDirection
  3566. }, {
  3567. icon: LeftIcon ? () => LeftIcon : null,
  3568. title: Label ? () => Label : null,
  3569. value: renderFieldBody,
  3570. extra: slots.extra
  3571. });
  3572. };
  3573. }
  3574. });
  3575. // node_modules/vant/es/field/index.mjs
  3576. var Field = withInstall(stdin_default19);
  3577. // node_modules/vant/es/utils/mount-component.mjs
  3578. function usePopupState() {
  3579. const state = reactive({
  3580. show: false
  3581. });
  3582. const toggle = (show) => {
  3583. state.show = show;
  3584. };
  3585. const open = (props) => {
  3586. extend(state, props, { transitionAppear: true });
  3587. toggle(true);
  3588. };
  3589. const close = () => toggle(false);
  3590. useExpose({ open, close, toggle });
  3591. return {
  3592. open,
  3593. close,
  3594. state,
  3595. toggle
  3596. };
  3597. }
  3598. function mountComponent(RootComponent) {
  3599. const app = createApp(RootComponent);
  3600. const root = document.createElement("div");
  3601. document.body.appendChild(root);
  3602. return {
  3603. instance: app.mount(root),
  3604. unmount() {
  3605. app.unmount();
  3606. document.body.removeChild(root);
  3607. }
  3608. };
  3609. }
  3610. // node_modules/vant/es/toast/lock-click.mjs
  3611. var lockCount = 0;
  3612. function lockClick(lock) {
  3613. if (lock) {
  3614. if (!lockCount) {
  3615. document.body.classList.add("van-toast--unclickable");
  3616. }
  3617. lockCount++;
  3618. } else if (lockCount) {
  3619. lockCount--;
  3620. if (!lockCount) {
  3621. document.body.classList.remove("van-toast--unclickable");
  3622. }
  3623. }
  3624. }
  3625. // node_modules/vant/es/toast/Toast.mjs
  3626. var [name18, bem18] = createNamespace("toast");
  3627. var popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
  3628. var toastProps = {
  3629. icon: String,
  3630. show: Boolean,
  3631. type: makeStringProp("text"),
  3632. overlay: Boolean,
  3633. message: numericProp,
  3634. iconSize: numericProp,
  3635. duration: makeNumberProp(2e3),
  3636. position: makeStringProp("middle"),
  3637. teleport: [String, Object],
  3638. className: unknownProp,
  3639. iconPrefix: String,
  3640. transition: makeStringProp("van-fade"),
  3641. loadingType: String,
  3642. forbidClick: Boolean,
  3643. overlayClass: unknownProp,
  3644. overlayStyle: Object,
  3645. closeOnClick: Boolean,
  3646. closeOnClickOverlay: Boolean
  3647. };
  3648. var stdin_default20 = defineComponent({
  3649. name: name18,
  3650. props: toastProps,
  3651. emits: ["update:show"],
  3652. setup(props, {
  3653. emit
  3654. }) {
  3655. let timer2;
  3656. let clickable = false;
  3657. const toggleClickable = () => {
  3658. const newValue = props.show && props.forbidClick;
  3659. if (clickable !== newValue) {
  3660. clickable = newValue;
  3661. lockClick(clickable);
  3662. }
  3663. };
  3664. const updateShow = (show) => emit("update:show", show);
  3665. const onClick = () => {
  3666. if (props.closeOnClick) {
  3667. updateShow(false);
  3668. }
  3669. };
  3670. const clearTimer = () => clearTimeout(timer2);
  3671. const renderIcon = () => {
  3672. const {
  3673. icon,
  3674. type,
  3675. iconSize,
  3676. iconPrefix,
  3677. loadingType
  3678. } = props;
  3679. const hasIcon = icon || type === "success" || type === "fail";
  3680. if (hasIcon) {
  3681. return createVNode(Icon, {
  3682. "name": icon || type,
  3683. "size": iconSize,
  3684. "class": bem18("icon"),
  3685. "classPrefix": iconPrefix
  3686. }, null);
  3687. }
  3688. if (type === "loading") {
  3689. return createVNode(Loading, {
  3690. "class": bem18("loading"),
  3691. "size": iconSize,
  3692. "type": loadingType
  3693. }, null);
  3694. }
  3695. };
  3696. const renderMessage = () => {
  3697. const {
  3698. type,
  3699. message
  3700. } = props;
  3701. if (isDef(message) && message !== "") {
  3702. return type === "html" ? createVNode("div", {
  3703. "key": 0,
  3704. "class": bem18("text"),
  3705. "innerHTML": String(message)
  3706. }, null) : createVNode("div", {
  3707. "class": bem18("text")
  3708. }, [message]);
  3709. }
  3710. };
  3711. watch(() => [props.show, props.forbidClick], toggleClickable);
  3712. watch(() => [props.show, props.type, props.message, props.duration], () => {
  3713. clearTimer();
  3714. if (props.show && props.duration > 0) {
  3715. timer2 = setTimeout(() => {
  3716. updateShow(false);
  3717. }, props.duration);
  3718. }
  3719. });
  3720. onMounted(toggleClickable);
  3721. onUnmounted(toggleClickable);
  3722. return () => createVNode(Popup, mergeProps({
  3723. "class": [bem18([props.position, {
  3724. [props.type]: !props.icon
  3725. }]), props.className],
  3726. "lockScroll": false,
  3727. "onClick": onClick,
  3728. "onClosed": clearTimer,
  3729. "onUpdate:show": updateShow
  3730. }, pick(props, popupInheritProps)), {
  3731. default: () => [renderIcon(), renderMessage()]
  3732. });
  3733. }
  3734. });
  3735. // node_modules/vant/es/toast/function-call.mjs
  3736. var defaultOptions = {
  3737. icon: "",
  3738. type: "text",
  3739. message: "",
  3740. className: "",
  3741. overlay: false,
  3742. onClose: void 0,
  3743. onOpened: void 0,
  3744. duration: 2e3,
  3745. teleport: "body",
  3746. iconSize: void 0,
  3747. iconPrefix: void 0,
  3748. position: "middle",
  3749. transition: "van-fade",
  3750. forbidClick: false,
  3751. loadingType: void 0,
  3752. overlayClass: "",
  3753. overlayStyle: void 0,
  3754. closeOnClick: false,
  3755. closeOnClickOverlay: false
  3756. };
  3757. var queue = [];
  3758. var allowMultiple = false;
  3759. var currentOptions = extend({}, defaultOptions);
  3760. var defaultOptionsMap = /* @__PURE__ */ new Map();
  3761. function parseOptions(message) {
  3762. if (isObject(message)) {
  3763. return message;
  3764. }
  3765. return {
  3766. message
  3767. };
  3768. }
  3769. function createInstance() {
  3770. const {
  3771. instance: instance4,
  3772. unmount
  3773. } = mountComponent({
  3774. setup() {
  3775. const message = ref("");
  3776. const {
  3777. open,
  3778. state,
  3779. close,
  3780. toggle
  3781. } = usePopupState();
  3782. const onClosed = () => {
  3783. if (allowMultiple) {
  3784. queue = queue.filter((item) => item !== instance4);
  3785. unmount();
  3786. }
  3787. };
  3788. const render = () => {
  3789. const attrs = {
  3790. onClosed,
  3791. "onUpdate:show": toggle
  3792. };
  3793. return createVNode(stdin_default20, mergeProps(state, attrs), null);
  3794. };
  3795. watch(message, (val) => {
  3796. state.message = val;
  3797. });
  3798. getCurrentInstance().render = render;
  3799. return {
  3800. open,
  3801. clear: close,
  3802. message
  3803. };
  3804. }
  3805. });
  3806. return instance4;
  3807. }
  3808. function getInstance() {
  3809. if (!queue.length || allowMultiple) {
  3810. const instance4 = createInstance();
  3811. queue.push(instance4);
  3812. }
  3813. return queue[queue.length - 1];
  3814. }
  3815. function Toast(options = {}) {
  3816. if (!inBrowser) {
  3817. return {};
  3818. }
  3819. const toast = getInstance();
  3820. const parsedOptions = parseOptions(options);
  3821. toast.open(extend({}, currentOptions, defaultOptionsMap.get(parsedOptions.type || currentOptions.type), parsedOptions));
  3822. return toast;
  3823. }
  3824. var createMethod = (type) => (options) => Toast(extend({
  3825. type
  3826. }, parseOptions(options)));
  3827. Toast.loading = createMethod("loading");
  3828. Toast.success = createMethod("success");
  3829. Toast.fail = createMethod("fail");
  3830. Toast.clear = (all) => {
  3831. var _a;
  3832. if (queue.length) {
  3833. if (all) {
  3834. queue.forEach((toast) => {
  3835. toast.clear();
  3836. });
  3837. queue = [];
  3838. } else if (!allowMultiple) {
  3839. queue[0].clear();
  3840. } else {
  3841. (_a = queue.shift()) == null ? void 0 : _a.clear();
  3842. }
  3843. }
  3844. };
  3845. function setDefaultOptions(type, options) {
  3846. if (typeof type === "string") {
  3847. defaultOptionsMap.set(type, options);
  3848. } else {
  3849. extend(currentOptions, type);
  3850. }
  3851. }
  3852. Toast.setDefaultOptions = setDefaultOptions;
  3853. Toast.resetDefaultOptions = (type) => {
  3854. if (typeof type === "string") {
  3855. defaultOptionsMap.delete(type);
  3856. } else {
  3857. currentOptions = extend({}, defaultOptions);
  3858. defaultOptionsMap.clear();
  3859. }
  3860. };
  3861. Toast.allowMultiple = (value = true) => {
  3862. allowMultiple = value;
  3863. };
  3864. Toast.install = (app) => {
  3865. app.use(withInstall(stdin_default20));
  3866. app.config.globalProperties.$toast = Toast;
  3867. };
  3868. // node_modules/vant/es/switch/Switch.mjs
  3869. var [name19, bem19] = createNamespace("switch");
  3870. var switchProps = {
  3871. size: numericProp,
  3872. loading: Boolean,
  3873. disabled: Boolean,
  3874. modelValue: unknownProp,
  3875. activeColor: String,
  3876. inactiveColor: String,
  3877. activeValue: {
  3878. type: unknownProp,
  3879. default: true
  3880. },
  3881. inactiveValue: {
  3882. type: unknownProp,
  3883. default: false
  3884. }
  3885. };
  3886. var stdin_default21 = defineComponent({
  3887. name: name19,
  3888. props: switchProps,
  3889. emits: ["change", "update:modelValue"],
  3890. setup(props, {
  3891. emit,
  3892. slots
  3893. }) {
  3894. const isChecked = () => props.modelValue === props.activeValue;
  3895. const onClick = () => {
  3896. if (!props.disabled && !props.loading) {
  3897. const newValue = isChecked() ? props.inactiveValue : props.activeValue;
  3898. emit("update:modelValue", newValue);
  3899. emit("change", newValue);
  3900. }
  3901. };
  3902. const renderLoading = () => {
  3903. if (props.loading) {
  3904. const color = isChecked() ? props.activeColor : props.inactiveColor;
  3905. return createVNode(Loading, {
  3906. "class": bem19("loading"),
  3907. "color": color
  3908. }, null);
  3909. }
  3910. if (slots.node) {
  3911. return slots.node();
  3912. }
  3913. };
  3914. useCustomFieldValue(() => props.modelValue);
  3915. return () => {
  3916. var _a;
  3917. const {
  3918. size,
  3919. loading,
  3920. disabled,
  3921. activeColor,
  3922. inactiveColor
  3923. } = props;
  3924. const checked = isChecked();
  3925. const style = {
  3926. fontSize: addUnit(size),
  3927. backgroundColor: checked ? activeColor : inactiveColor
  3928. };
  3929. return createVNode("div", {
  3930. "role": "switch",
  3931. "class": bem19({
  3932. on: checked,
  3933. loading,
  3934. disabled
  3935. }),
  3936. "style": style,
  3937. "tabindex": disabled ? void 0 : 0,
  3938. "aria-checked": checked,
  3939. "onClick": onClick
  3940. }, [createVNode("div", {
  3941. "class": bem19("node")
  3942. }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
  3943. };
  3944. }
  3945. });
  3946. // node_modules/vant/es/switch/index.mjs
  3947. var Switch = withInstall(stdin_default21);
  3948. // node_modules/vant/es/address-edit/AddressEditDetail.mjs
  3949. var [name20, bem20] = createNamespace("address-edit-detail");
  3950. var t2 = createNamespace("address-edit")[2];
  3951. var stdin_default22 = defineComponent({
  3952. name: name20,
  3953. props: {
  3954. show: Boolean,
  3955. rows: numericProp,
  3956. value: String,
  3957. rules: Array,
  3958. focused: Boolean,
  3959. maxlength: numericProp,
  3960. searchResult: Array,
  3961. showSearchResult: Boolean
  3962. },
  3963. emits: ["blur", "focus", "input", "select-search"],
  3964. setup(props, {
  3965. emit
  3966. }) {
  3967. const field = ref();
  3968. const showSearchResult = () => props.focused && props.searchResult && props.showSearchResult;
  3969. const onSelect = (express) => {
  3970. emit("select-search", express);
  3971. emit("input", `${express.address || ""} ${express.name || ""}`.trim());
  3972. };
  3973. const renderSearchTitle = (express) => {
  3974. if (express.name) {
  3975. const text = express.name.replace(props.value, `<span class=${bem20("keyword")}>${props.value}</span>`);
  3976. return createVNode("div", {
  3977. "innerHTML": text
  3978. }, null);
  3979. }
  3980. };
  3981. const renderSearchResult = () => {
  3982. if (!showSearchResult()) {
  3983. return;
  3984. }
  3985. const {
  3986. searchResult
  3987. } = props;
  3988. return searchResult.map((express) => createVNode(Cell, {
  3989. "clickable": true,
  3990. "key": express.name + express.address,
  3991. "icon": "location-o",
  3992. "label": express.address,
  3993. "class": bem20("search-item"),
  3994. "border": false,
  3995. "onClick": () => onSelect(express)
  3996. }, {
  3997. title: () => renderSearchTitle(express)
  3998. }));
  3999. };
  4000. const onBlur = (event) => emit("blur", event);
  4001. const onFocus = (event) => emit("focus", event);
  4002. const onInput = (value) => emit("input", value);
  4003. return () => {
  4004. if (props.show) {
  4005. return createVNode(Fragment, null, [createVNode(Field, {
  4006. "autosize": true,
  4007. "clearable": true,
  4008. "ref": field,
  4009. "class": bem20(),
  4010. "rows": props.rows,
  4011. "type": "textarea",
  4012. "rules": props.rules,
  4013. "label": t2("addressDetail"),
  4014. "border": !showSearchResult(),
  4015. "maxlength": props.maxlength,
  4016. "modelValue": props.value,
  4017. "placeholder": t2("addressDetail"),
  4018. "onBlur": onBlur,
  4019. "onFocus": onFocus,
  4020. "onUpdate:modelValue": onInput
  4021. }, null), renderSearchResult()]);
  4022. }
  4023. };
  4024. }
  4025. });
  4026. // node_modules/vant/es/address-edit/AddressEdit.mjs
  4027. var [name21, bem21, t3] = createNamespace("address-edit");
  4028. var DEFAULT_DATA = {
  4029. name: "",
  4030. tel: "",
  4031. city: "",
  4032. county: "",
  4033. country: "",
  4034. province: "",
  4035. areaCode: "",
  4036. isDefault: false,
  4037. postalCode: "",
  4038. addressDetail: ""
  4039. };
  4040. var isPostal = (value) => /^\d{6}$/.test(value);
  4041. var addressEditProps = {
  4042. areaList: Object,
  4043. isSaving: Boolean,
  4044. isDeleting: Boolean,
  4045. validator: Function,
  4046. showArea: truthProp,
  4047. showDetail: truthProp,
  4048. showDelete: Boolean,
  4049. showPostal: Boolean,
  4050. disableArea: Boolean,
  4051. searchResult: Array,
  4052. telMaxlength: numericProp,
  4053. showSetDefault: Boolean,
  4054. saveButtonText: String,
  4055. areaPlaceholder: String,
  4056. deleteButtonText: String,
  4057. showSearchResult: Boolean,
  4058. detailRows: makeNumericProp(1),
  4059. detailMaxlength: makeNumericProp(200),
  4060. areaColumnsPlaceholder: makeArrayProp(),
  4061. addressInfo: {
  4062. type: Object,
  4063. default: () => extend({}, DEFAULT_DATA)
  4064. },
  4065. telValidator: {
  4066. type: Function,
  4067. default: isMobile
  4068. },
  4069. postalValidator: {
  4070. type: Function,
  4071. default: isPostal
  4072. }
  4073. };
  4074. var stdin_default23 = defineComponent({
  4075. name: name21,
  4076. props: addressEditProps,
  4077. emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
  4078. setup(props, {
  4079. emit,
  4080. slots
  4081. }) {
  4082. const areaRef = ref();
  4083. const data = reactive({});
  4084. const showAreaPopup = ref(false);
  4085. const detailFocused = ref(false);
  4086. const areaListLoaded = computed(() => isObject(props.areaList) && Object.keys(props.areaList).length);
  4087. const areaText = computed(() => {
  4088. const {
  4089. country,
  4090. province,
  4091. city,
  4092. county,
  4093. areaCode
  4094. } = data;
  4095. if (areaCode) {
  4096. const arr = [country, province, city, county];
  4097. if (province && province === city) {
  4098. arr.splice(1, 1);
  4099. }
  4100. return arr.filter(Boolean).join("/");
  4101. }
  4102. return "";
  4103. });
  4104. const hideBottomFields = computed(() => {
  4105. var _a;
  4106. return ((_a = props.searchResult) == null ? void 0 : _a.length) && detailFocused.value;
  4107. });
  4108. const assignAreaValues = () => {
  4109. if (areaRef.value) {
  4110. const detail = areaRef.value.getArea();
  4111. detail.areaCode = detail.code;
  4112. delete detail.code;
  4113. extend(data, detail);
  4114. }
  4115. };
  4116. const onFocus = (key) => {
  4117. detailFocused.value = key === "addressDetail";
  4118. emit("focus", key);
  4119. };
  4120. const rules = computed(() => {
  4121. const {
  4122. validator,
  4123. telValidator,
  4124. postalValidator
  4125. } = props;
  4126. const makeRule = (name210, emptyMessage) => ({
  4127. validator: (value) => {
  4128. if (validator) {
  4129. const message = validator(name210, value);
  4130. if (message) {
  4131. return message;
  4132. }
  4133. }
  4134. if (!value) {
  4135. return emptyMessage;
  4136. }
  4137. return true;
  4138. }
  4139. });
  4140. return {
  4141. name: [makeRule("name", t3("nameEmpty"))],
  4142. tel: [makeRule("tel", t3("telInvalid")), {
  4143. validator: telValidator,
  4144. message: t3("telInvalid")
  4145. }],
  4146. areaCode: [makeRule("areaCode", t3("areaEmpty"))],
  4147. addressDetail: [makeRule("addressDetail", t3("addressEmpty"))],
  4148. postalCode: [makeRule("addressDetail", t3("postalEmpty")), {
  4149. validator: postalValidator,
  4150. message: t3("postalEmpty")
  4151. }]
  4152. };
  4153. });
  4154. const onSave = () => emit("save", data);
  4155. const onChangeDetail = (val) => {
  4156. data.addressDetail = val;
  4157. emit("change-detail", val);
  4158. };
  4159. const onAreaConfirm = (values) => {
  4160. values = values.filter(Boolean);
  4161. if (values.some((value) => !value.code)) {
  4162. Toast(t3("areaEmpty"));
  4163. } else {
  4164. showAreaPopup.value = false;
  4165. assignAreaValues();
  4166. emit("change-area", values);
  4167. }
  4168. };
  4169. const onDelete = () => emit("delete", data);
  4170. const getArea = () => {
  4171. var _a;
  4172. return ((_a = areaRef.value) == null ? void 0 : _a.getValues()) || [];
  4173. };
  4174. const setAreaCode = (code) => {
  4175. data.areaCode = code || "";
  4176. if (code) {
  4177. nextTick(assignAreaValues);
  4178. }
  4179. };
  4180. const onDetailBlur = () => {
  4181. setTimeout(() => {
  4182. detailFocused.value = false;
  4183. });
  4184. };
  4185. const setAddressDetail = (value) => {
  4186. data.addressDetail = value;
  4187. };
  4188. const renderSetDefaultCell = () => {
  4189. if (props.showSetDefault) {
  4190. const slots2 = {
  4191. "right-icon": () => createVNode(Switch, {
  4192. "modelValue": data.isDefault,
  4193. "onUpdate:modelValue": ($event) => data.isDefault = $event,
  4194. "size": "24",
  4195. "onChange": (event) => emit("change-default", event)
  4196. }, null)
  4197. };
  4198. return withDirectives(createVNode(Cell, {
  4199. "center": true,
  4200. "title": t3("defaultAddress"),
  4201. "class": bem21("default")
  4202. }, slots2), [[vShow, !hideBottomFields.value]]);
  4203. }
  4204. };
  4205. useExpose({
  4206. getArea,
  4207. setAreaCode,
  4208. setAddressDetail
  4209. });
  4210. watch(() => props.areaList, () => setAreaCode(data.areaCode));
  4211. watch(() => props.addressInfo, (value) => {
  4212. extend(data, DEFAULT_DATA, value);
  4213. setAreaCode(value.areaCode);
  4214. }, {
  4215. deep: true,
  4216. immediate: true
  4217. });
  4218. return () => {
  4219. const {
  4220. disableArea
  4221. } = props;
  4222. return createVNode(Form, {
  4223. "class": bem21(),
  4224. "onSubmit": onSave
  4225. }, {
  4226. default: () => {
  4227. var _a;
  4228. return [createVNode("div", {
  4229. "class": bem21("fields")
  4230. }, [createVNode(Field, {
  4231. "modelValue": data.name,
  4232. "onUpdate:modelValue": ($event) => data.name = $event,
  4233. "clearable": true,
  4234. "label": t3("name"),
  4235. "rules": rules.value.name,
  4236. "placeholder": t3("name"),
  4237. "onFocus": () => onFocus("name")
  4238. }, null), createVNode(Field, {
  4239. "modelValue": data.tel,
  4240. "onUpdate:modelValue": ($event) => data.tel = $event,
  4241. "clearable": true,
  4242. "type": "tel",
  4243. "label": t3("tel"),
  4244. "rules": rules.value.tel,
  4245. "maxlength": props.telMaxlength,
  4246. "placeholder": t3("tel"),
  4247. "onFocus": () => onFocus("tel")
  4248. }, null), withDirectives(createVNode(Field, {
  4249. "readonly": true,
  4250. "label": t3("area"),
  4251. "is-link": !disableArea,
  4252. "modelValue": areaText.value,
  4253. "rules": rules.value.areaCode,
  4254. "placeholder": props.areaPlaceholder || t3("area"),
  4255. "onFocus": () => onFocus("areaCode"),
  4256. "onClick": () => {
  4257. emit("click-area");
  4258. showAreaPopup.value = !disableArea;
  4259. }
  4260. }, null), [[vShow, props.showArea]]), createVNode(stdin_default22, {
  4261. "show": props.showDetail,
  4262. "rows": props.detailRows,
  4263. "rules": rules.value.addressDetail,
  4264. "value": data.addressDetail,
  4265. "focused": detailFocused.value,
  4266. "maxlength": props.detailMaxlength,
  4267. "searchResult": props.searchResult,
  4268. "showSearchResult": props.showSearchResult,
  4269. "onBlur": onDetailBlur,
  4270. "onFocus": () => onFocus("addressDetail"),
  4271. "onInput": onChangeDetail,
  4272. "onSelect-search": (event) => emit("select-search", event)
  4273. }, null), props.showPostal && withDirectives(createVNode(Field, {
  4274. "modelValue": data.postalCode,
  4275. "onUpdate:modelValue": ($event) => data.postalCode = $event,
  4276. "type": "tel",
  4277. "rules": rules.value.postalCode,
  4278. "label": t3("postal"),
  4279. "maxlength": "6",
  4280. "placeholder": t3("postal"),
  4281. "onFocus": () => onFocus("postalCode")
  4282. }, null), [[vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
  4283. "class": bem21("buttons")
  4284. }, [createVNode(Button, {
  4285. "block": true,
  4286. "round": true,
  4287. "type": "danger",
  4288. "text": props.saveButtonText || t3("save"),
  4289. "class": bem21("button"),
  4290. "loading": props.isSaving,
  4291. "nativeType": "submit"
  4292. }, null), props.showDelete && createVNode(Button, {
  4293. "block": true,
  4294. "round": true,
  4295. "class": bem21("button"),
  4296. "loading": props.isDeleting,
  4297. "text": props.deleteButtonText || t3("delete"),
  4298. "onClick": onDelete
  4299. }, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
  4300. "show": showAreaPopup.value,
  4301. "onUpdate:show": ($event) => showAreaPopup.value = $event,
  4302. "round": true,
  4303. "teleport": "body",
  4304. "position": "bottom",
  4305. "lazyRender": false
  4306. }, {
  4307. default: () => [createVNode(Area, {
  4308. "ref": areaRef,
  4309. "value": data.areaCode,
  4310. "loading": !areaListLoaded.value,
  4311. "areaList": props.areaList,
  4312. "columnsPlaceholder": props.areaColumnsPlaceholder,
  4313. "onConfirm": onAreaConfirm,
  4314. "onCancel": () => {
  4315. showAreaPopup.value = false;
  4316. }
  4317. }, null)]
  4318. })];
  4319. }
  4320. });
  4321. };
  4322. }
  4323. });
  4324. // node_modules/vant/es/address-edit/index.mjs
  4325. var AddressEdit = withInstall(stdin_default23);
  4326. // node_modules/vant/es/radio-group/RadioGroup.mjs
  4327. var [name22, bem22] = createNamespace("radio-group");
  4328. var radioGroupProps = {
  4329. disabled: Boolean,
  4330. iconSize: numericProp,
  4331. direction: String,
  4332. modelValue: unknownProp,
  4333. checkedColor: String
  4334. };
  4335. var RADIO_KEY = Symbol(name22);
  4336. var stdin_default24 = defineComponent({
  4337. name: name22,
  4338. props: radioGroupProps,
  4339. emits: ["change", "update:modelValue"],
  4340. setup(props, {
  4341. emit,
  4342. slots
  4343. }) {
  4344. const {
  4345. linkChildren
  4346. } = useChildren(RADIO_KEY);
  4347. const updateValue = (value) => emit("update:modelValue", value);
  4348. watch(() => props.modelValue, (value) => emit("change", value));
  4349. linkChildren({
  4350. props,
  4351. updateValue
  4352. });
  4353. useCustomFieldValue(() => props.modelValue);
  4354. return () => {
  4355. var _a;
  4356. return createVNode("div", {
  4357. "class": bem22([props.direction]),
  4358. "role": "radiogroup"
  4359. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  4360. };
  4361. }
  4362. });
  4363. // node_modules/vant/es/radio-group/index.mjs
  4364. var RadioGroup = withInstall(stdin_default24);
  4365. // node_modules/vant/es/tag/Tag.mjs
  4366. var [name23, bem23] = createNamespace("tag");
  4367. var tagProps = {
  4368. size: String,
  4369. mark: Boolean,
  4370. show: truthProp,
  4371. type: makeStringProp("default"),
  4372. color: String,
  4373. plain: Boolean,
  4374. round: Boolean,
  4375. textColor: String,
  4376. closeable: Boolean
  4377. };
  4378. var stdin_default25 = defineComponent({
  4379. name: name23,
  4380. props: tagProps,
  4381. emits: ["close"],
  4382. setup(props, {
  4383. slots,
  4384. emit
  4385. }) {
  4386. const onClose = (event) => {
  4387. event.stopPropagation();
  4388. emit("close", event);
  4389. };
  4390. const getStyle = () => {
  4391. if (props.plain) {
  4392. return {
  4393. color: props.textColor || props.color,
  4394. borderColor: props.color
  4395. };
  4396. }
  4397. return {
  4398. color: props.textColor,
  4399. background: props.color
  4400. };
  4401. };
  4402. const renderTag = () => {
  4403. var _a;
  4404. const {
  4405. type,
  4406. mark,
  4407. plain,
  4408. round: round2,
  4409. size,
  4410. closeable
  4411. } = props;
  4412. const classes = {
  4413. mark,
  4414. plain,
  4415. round: round2
  4416. };
  4417. if (size) {
  4418. classes[size] = size;
  4419. }
  4420. const CloseIcon = closeable && createVNode(Icon, {
  4421. "name": "cross",
  4422. "class": [bem23("close"), HAPTICS_FEEDBACK],
  4423. "onClick": onClose
  4424. }, null);
  4425. return createVNode("span", {
  4426. "style": getStyle(),
  4427. "class": bem23([classes, type])
  4428. }, [(_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
  4429. };
  4430. return () => createVNode(Transition, {
  4431. "name": props.closeable ? "van-fade" : void 0
  4432. }, {
  4433. default: () => [props.show ? renderTag() : null]
  4434. });
  4435. }
  4436. });
  4437. // node_modules/vant/es/tag/index.mjs
  4438. var Tag = withInstall(stdin_default25);
  4439. // node_modules/vant/es/checkbox/Checker.mjs
  4440. var checkerProps = {
  4441. name: unknownProp,
  4442. shape: makeStringProp("round"),
  4443. disabled: Boolean,
  4444. iconSize: numericProp,
  4445. modelValue: unknownProp,
  4446. checkedColor: String,
  4447. labelPosition: String,
  4448. labelDisabled: Boolean
  4449. };
  4450. var stdin_default26 = defineComponent({
  4451. props: extend({}, checkerProps, {
  4452. bem: makeRequiredProp(Function),
  4453. role: String,
  4454. parent: Object,
  4455. checked: Boolean,
  4456. bindGroup: truthProp
  4457. }),
  4458. emits: ["click", "toggle"],
  4459. setup(props, {
  4460. emit,
  4461. slots
  4462. }) {
  4463. const iconRef = ref();
  4464. const getParentProp = (name97) => {
  4465. if (props.parent && props.bindGroup) {
  4466. return props.parent.props[name97];
  4467. }
  4468. };
  4469. const disabled = computed(() => getParentProp("disabled") || props.disabled);
  4470. const direction = computed(() => getParentProp("direction"));
  4471. const iconStyle = computed(() => {
  4472. const checkedColor = props.checkedColor || getParentProp("checkedColor");
  4473. if (checkedColor && props.checked && !disabled.value) {
  4474. return {
  4475. borderColor: checkedColor,
  4476. backgroundColor: checkedColor
  4477. };
  4478. }
  4479. });
  4480. const onClick = (event) => {
  4481. const {
  4482. target
  4483. } = event;
  4484. const icon = iconRef.value;
  4485. const iconClicked = icon === target || (icon == null ? void 0 : icon.contains(target));
  4486. if (!disabled.value && (iconClicked || !props.labelDisabled)) {
  4487. emit("toggle");
  4488. }
  4489. emit("click", event);
  4490. };
  4491. const renderIcon = () => {
  4492. const {
  4493. bem: bem93,
  4494. shape,
  4495. checked
  4496. } = props;
  4497. const iconSize = props.iconSize || getParentProp("iconSize");
  4498. return createVNode("div", {
  4499. "ref": iconRef,
  4500. "class": bem93("icon", [shape, {
  4501. disabled: disabled.value,
  4502. checked
  4503. }]),
  4504. "style": {
  4505. fontSize: addUnit(iconSize)
  4506. }
  4507. }, [slots.icon ? slots.icon({
  4508. checked,
  4509. disabled: disabled.value
  4510. }) : createVNode(Icon, {
  4511. "name": "success",
  4512. "style": iconStyle.value
  4513. }, null)]);
  4514. };
  4515. const renderLabel = () => {
  4516. if (slots.default) {
  4517. return createVNode("span", {
  4518. "class": props.bem("label", [props.labelPosition, {
  4519. disabled: disabled.value
  4520. }])
  4521. }, [slots.default()]);
  4522. }
  4523. };
  4524. return () => {
  4525. const nodes = props.labelPosition === "left" ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
  4526. return createVNode("div", {
  4527. "role": props.role,
  4528. "class": props.bem([{
  4529. disabled: disabled.value,
  4530. "label-disabled": props.labelDisabled
  4531. }, direction.value]),
  4532. "tabindex": disabled.value ? void 0 : 0,
  4533. "aria-checked": props.checked,
  4534. "onClick": onClick
  4535. }, [nodes]);
  4536. };
  4537. }
  4538. });
  4539. // node_modules/vant/es/radio/Radio.mjs
  4540. var [name24, bem24] = createNamespace("radio");
  4541. var stdin_default27 = defineComponent({
  4542. name: name24,
  4543. props: checkerProps,
  4544. emits: ["update:modelValue"],
  4545. setup(props, {
  4546. emit,
  4547. slots
  4548. }) {
  4549. const {
  4550. parent
  4551. } = useParent(RADIO_KEY);
  4552. const checked = () => {
  4553. const value = parent ? parent.props.modelValue : props.modelValue;
  4554. return value === props.name;
  4555. };
  4556. const toggle = () => {
  4557. if (parent) {
  4558. parent.updateValue(props.name);
  4559. } else {
  4560. emit("update:modelValue", props.name);
  4561. }
  4562. };
  4563. return () => createVNode(stdin_default26, mergeProps({
  4564. "bem": bem24,
  4565. "role": "radio",
  4566. "parent": parent,
  4567. "checked": checked(),
  4568. "onToggle": toggle
  4569. }, props), pick(slots, ["default", "icon"]));
  4570. }
  4571. });
  4572. // node_modules/vant/es/radio/index.mjs
  4573. var Radio = withInstall(stdin_default27);
  4574. // node_modules/vant/es/address-list/AddressListItem.mjs
  4575. var [name25, bem25] = createNamespace("address-item");
  4576. var stdin_default28 = defineComponent({
  4577. name: name25,
  4578. props: {
  4579. address: makeRequiredProp(Object),
  4580. disabled: Boolean,
  4581. switchable: Boolean,
  4582. defaultTagText: String
  4583. },
  4584. emits: ["edit", "click", "select"],
  4585. setup(props, {
  4586. slots,
  4587. emit
  4588. }) {
  4589. const onClick = () => {
  4590. if (props.switchable) {
  4591. emit("select");
  4592. }
  4593. emit("click");
  4594. };
  4595. const renderRightIcon = () => createVNode(Icon, {
  4596. "name": "edit",
  4597. "class": bem25("edit"),
  4598. "onClick": (event) => {
  4599. event.stopPropagation();
  4600. emit("edit");
  4601. emit("click");
  4602. }
  4603. }, null);
  4604. const renderTag = () => {
  4605. if (slots.tag) {
  4606. return slots.tag(props.address);
  4607. }
  4608. if (props.address.isDefault && props.defaultTagText) {
  4609. return createVNode(Tag, {
  4610. "type": "danger",
  4611. "round": true,
  4612. "class": bem25("tag")
  4613. }, {
  4614. default: () => [props.defaultTagText]
  4615. });
  4616. }
  4617. };
  4618. const renderContent = () => {
  4619. const {
  4620. address,
  4621. disabled,
  4622. switchable
  4623. } = props;
  4624. const Info = [createVNode("div", {
  4625. "class": bem25("name")
  4626. }, [`${address.name} ${address.tel}`, renderTag()]), createVNode("div", {
  4627. "class": bem25("address")
  4628. }, [address.address])];
  4629. if (switchable && !disabled) {
  4630. return createVNode(Radio, {
  4631. "name": address.id,
  4632. "iconSize": 18
  4633. }, {
  4634. default: () => [Info]
  4635. });
  4636. }
  4637. return Info;
  4638. };
  4639. return () => {
  4640. var _a;
  4641. const {
  4642. disabled
  4643. } = props;
  4644. return createVNode("div", {
  4645. "class": bem25({
  4646. disabled
  4647. }),
  4648. "onClick": onClick
  4649. }, [createVNode(Cell, {
  4650. "border": false,
  4651. "valueClass": bem25("value")
  4652. }, {
  4653. value: renderContent,
  4654. "right-icon": renderRightIcon
  4655. }), (_a = slots.bottom) == null ? void 0 : _a.call(slots, extend({}, props.address, {
  4656. disabled
  4657. }))]);
  4658. };
  4659. }
  4660. });
  4661. // node_modules/vant/es/address-list/AddressList.mjs
  4662. var [name26, bem26, t4] = createNamespace("address-list");
  4663. var addressListProps = {
  4664. list: makeArrayProp(),
  4665. modelValue: numericProp,
  4666. switchable: truthProp,
  4667. disabledText: String,
  4668. disabledList: makeArrayProp(),
  4669. addButtonText: String,
  4670. defaultTagText: String
  4671. };
  4672. var stdin_default29 = defineComponent({
  4673. name: name26,
  4674. props: addressListProps,
  4675. emits: ["add", "edit", "select", "click-item", "edit-disabled", "select-disabled", "update:modelValue"],
  4676. setup(props, {
  4677. slots,
  4678. emit
  4679. }) {
  4680. const renderItem = (item, index, disabled) => {
  4681. const onEdit = () => emit(disabled ? "edit-disabled" : "edit", item, index);
  4682. const onClick = () => emit("click-item", item, index);
  4683. const onSelect = () => {
  4684. emit(disabled ? "select-disabled" : "select", item, index);
  4685. if (!disabled) {
  4686. emit("update:modelValue", item.id);
  4687. }
  4688. };
  4689. return createVNode(stdin_default28, {
  4690. "key": item.id,
  4691. "address": item,
  4692. "disabled": disabled,
  4693. "switchable": props.switchable,
  4694. "defaultTagText": props.defaultTagText,
  4695. "onEdit": onEdit,
  4696. "onClick": onClick,
  4697. "onSelect": onSelect
  4698. }, {
  4699. bottom: slots["item-bottom"],
  4700. tag: slots.tag
  4701. });
  4702. };
  4703. const renderList = (list, disabled) => {
  4704. if (list) {
  4705. return list.map((item, index) => renderItem(item, index, disabled));
  4706. }
  4707. };
  4708. const renderBottom = () => createVNode("div", {
  4709. "class": [bem26("bottom"), "van-safe-area-bottom"]
  4710. }, [createVNode(Button, {
  4711. "round": true,
  4712. "block": true,
  4713. "type": "danger",
  4714. "text": props.addButtonText || t4("add"),
  4715. "class": bem26("add"),
  4716. "onClick": () => emit("add")
  4717. }, null)]);
  4718. return () => {
  4719. var _a, _b;
  4720. const List2 = renderList(props.list);
  4721. const DisabledList = renderList(props.disabledList, true);
  4722. const DisabledText = props.disabledText && createVNode("div", {
  4723. "class": bem26("disabled-text")
  4724. }, [props.disabledText]);
  4725. return createVNode("div", {
  4726. "class": bem26()
  4727. }, [(_a = slots.top) == null ? void 0 : _a.call(slots), createVNode(RadioGroup, {
  4728. "modelValue": props.modelValue
  4729. }, {
  4730. default: () => [List2]
  4731. }), DisabledText, DisabledList, (_b = slots.default) == null ? void 0 : _b.call(slots), renderBottom()]);
  4732. };
  4733. }
  4734. });
  4735. // node_modules/vant/es/address-list/index.mjs
  4736. var AddressList = withInstall(stdin_default29);
  4737. // node_modules/vant/es/calendar/utils.mjs
  4738. var [name27, bem27, t5] = createNamespace("calendar");
  4739. var formatMonthTitle = (date) => t5("monthTitle", date.getFullYear(), date.getMonth() + 1);
  4740. function compareMonth(date1, date2) {
  4741. const year1 = date1.getFullYear();
  4742. const year2 = date2.getFullYear();
  4743. if (year1 === year2) {
  4744. const month1 = date1.getMonth();
  4745. const month2 = date2.getMonth();
  4746. return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
  4747. }
  4748. return year1 > year2 ? 1 : -1;
  4749. }
  4750. function compareDay(day1, day2) {
  4751. const compareMonthResult = compareMonth(day1, day2);
  4752. if (compareMonthResult === 0) {
  4753. const date1 = day1.getDate();
  4754. const date2 = day2.getDate();
  4755. return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;
  4756. }
  4757. return compareMonthResult;
  4758. }
  4759. var cloneDate = (date) => new Date(date);
  4760. var cloneDates = (dates) => Array.isArray(dates) ? dates.map(cloneDate) : cloneDate(dates);
  4761. function getDayByOffset(date, offset2) {
  4762. const cloned = cloneDate(date);
  4763. cloned.setDate(cloned.getDate() + offset2);
  4764. return cloned;
  4765. }
  4766. var getPrevDay = (date) => getDayByOffset(date, -1);
  4767. var getNextDay = (date) => getDayByOffset(date, 1);
  4768. var getToday = () => {
  4769. const today = new Date();
  4770. today.setHours(0, 0, 0, 0);
  4771. return today;
  4772. };
  4773. function calcDateNum(date) {
  4774. const day1 = date[0].getTime();
  4775. const day2 = date[1].getTime();
  4776. return (day2 - day1) / (1e3 * 60 * 60 * 24) + 1;
  4777. }
  4778. // node_modules/vant/es/composables/use-refs.mjs
  4779. function useRefs() {
  4780. const refs = ref([]);
  4781. const cache = [];
  4782. onBeforeUpdate(() => {
  4783. refs.value = [];
  4784. });
  4785. const setRefs = (index) => {
  4786. if (!cache[index]) {
  4787. cache[index] = (el) => {
  4788. refs.value[index] = el;
  4789. };
  4790. }
  4791. return cache[index];
  4792. };
  4793. return [refs, setRefs];
  4794. }
  4795. // node_modules/vant/es/datetime-picker/utils.mjs
  4796. var sharedProps = extend({}, pickerSharedProps, {
  4797. filter: Function,
  4798. columnsOrder: Array,
  4799. formatter: {
  4800. type: Function,
  4801. default: (type, value) => value
  4802. }
  4803. });
  4804. var pickerInheritKeys = Object.keys(pickerSharedProps);
  4805. function times(n, iteratee) {
  4806. if (n < 0) {
  4807. return [];
  4808. }
  4809. const result = Array(n);
  4810. let index = -1;
  4811. while (++index < n) {
  4812. result[index] = iteratee(index);
  4813. }
  4814. return result;
  4815. }
  4816. function getTrueValue(value) {
  4817. if (!value) {
  4818. return 0;
  4819. }
  4820. while (Number.isNaN(parseInt(value, 10))) {
  4821. if (value.length > 1) {
  4822. value = value.slice(1);
  4823. } else {
  4824. return 0;
  4825. }
  4826. }
  4827. return parseInt(value, 10);
  4828. }
  4829. var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
  4830. var proxyPickerMethods = (picker, callback) => {
  4831. const methods = [
  4832. "setValues",
  4833. "setIndexes",
  4834. "setColumnIndex",
  4835. "setColumnValue"
  4836. ];
  4837. return new Proxy(picker, {
  4838. get: (target, prop) => {
  4839. if (methods.includes(prop)) {
  4840. return (...args) => {
  4841. target[prop](...args);
  4842. callback();
  4843. };
  4844. }
  4845. return target[prop];
  4846. }
  4847. });
  4848. };
  4849. // node_modules/vant/es/calendar/CalendarDay.mjs
  4850. var [name28] = createNamespace("calendar-day");
  4851. var stdin_default30 = defineComponent({
  4852. name: name28,
  4853. props: {
  4854. item: makeRequiredProp(Object),
  4855. color: String,
  4856. index: Number,
  4857. offset: makeNumberProp(0),
  4858. rowHeight: String
  4859. },
  4860. emits: ["click"],
  4861. setup(props, {
  4862. emit,
  4863. slots
  4864. }) {
  4865. const style = computed(() => {
  4866. var _a;
  4867. const {
  4868. item,
  4869. index,
  4870. color,
  4871. offset: offset2,
  4872. rowHeight
  4873. } = props;
  4874. const style2 = {
  4875. height: rowHeight
  4876. };
  4877. if (item.type === "placeholder") {
  4878. style2.width = "100%";
  4879. return style2;
  4880. }
  4881. if (index === 0) {
  4882. style2.marginLeft = `${100 * offset2 / 7}%`;
  4883. }
  4884. if (color) {
  4885. switch (item.type) {
  4886. case "end":
  4887. case "start":
  4888. case "start-end":
  4889. case "multiple-middle":
  4890. case "multiple-selected":
  4891. style2.background = color;
  4892. break;
  4893. case "middle":
  4894. style2.color = color;
  4895. break;
  4896. }
  4897. }
  4898. if (offset2 + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
  4899. style2.marginBottom = 0;
  4900. }
  4901. return style2;
  4902. });
  4903. const onClick = () => {
  4904. if (props.item.type !== "disabled") {
  4905. emit("click", props.item);
  4906. }
  4907. };
  4908. const renderTopInfo = () => {
  4909. const {
  4910. topInfo
  4911. } = props.item;
  4912. if (topInfo || slots["top-info"]) {
  4913. return createVNode("div", {
  4914. "class": bem27("top-info")
  4915. }, [slots["top-info"] ? slots["top-info"](props.item) : topInfo]);
  4916. }
  4917. };
  4918. const renderBottomInfo = () => {
  4919. const {
  4920. bottomInfo
  4921. } = props.item;
  4922. if (bottomInfo || slots["bottom-info"]) {
  4923. return createVNode("div", {
  4924. "class": bem27("bottom-info")
  4925. }, [slots["bottom-info"] ? slots["bottom-info"](props.item) : bottomInfo]);
  4926. }
  4927. };
  4928. const renderContent = () => {
  4929. const {
  4930. item,
  4931. color,
  4932. rowHeight
  4933. } = props;
  4934. const {
  4935. type,
  4936. text
  4937. } = item;
  4938. const Nodes = [renderTopInfo(), text, renderBottomInfo()];
  4939. if (type === "selected") {
  4940. return createVNode("div", {
  4941. "class": bem27("selected-day"),
  4942. "style": {
  4943. width: rowHeight,
  4944. height: rowHeight,
  4945. background: color
  4946. }
  4947. }, [Nodes]);
  4948. }
  4949. return Nodes;
  4950. };
  4951. return () => {
  4952. const {
  4953. type,
  4954. className
  4955. } = props.item;
  4956. if (type === "placeholder") {
  4957. return createVNode("div", {
  4958. "class": bem27("day"),
  4959. "style": style.value
  4960. }, null);
  4961. }
  4962. return createVNode("div", {
  4963. "role": "gridcell",
  4964. "style": style.value,
  4965. "class": [bem27("day", type), className],
  4966. "tabindex": type === "disabled" ? void 0 : -1,
  4967. "onClick": onClick
  4968. }, [renderContent()]);
  4969. };
  4970. }
  4971. });
  4972. // node_modules/vant/es/calendar/CalendarMonth.mjs
  4973. var [name29] = createNamespace("calendar-month");
  4974. var calendarMonthProps = {
  4975. date: makeRequiredProp(Date),
  4976. type: String,
  4977. color: String,
  4978. minDate: makeRequiredProp(Date),
  4979. maxDate: makeRequiredProp(Date),
  4980. showMark: Boolean,
  4981. rowHeight: numericProp,
  4982. formatter: Function,
  4983. lazyRender: Boolean,
  4984. currentDate: [Date, Array],
  4985. allowSameDay: Boolean,
  4986. showSubtitle: Boolean,
  4987. showMonthTitle: Boolean,
  4988. firstDayOfWeek: Number
  4989. };
  4990. var stdin_default31 = defineComponent({
  4991. name: name29,
  4992. props: calendarMonthProps,
  4993. emits: ["click", "update-height"],
  4994. setup(props, {
  4995. emit,
  4996. slots
  4997. }) {
  4998. const [visible, setVisible] = useToggle();
  4999. const daysRef = ref();
  5000. const monthRef = ref();
  5001. const height2 = useHeight(monthRef);
  5002. const title = computed(() => formatMonthTitle(props.date));
  5003. const rowHeight = computed(() => addUnit(props.rowHeight));
  5004. const offset2 = computed(() => {
  5005. const realDay = props.date.getDay();
  5006. if (props.firstDayOfWeek) {
  5007. return (realDay + 7 - props.firstDayOfWeek) % 7;
  5008. }
  5009. return realDay;
  5010. });
  5011. const totalDay = computed(() => getMonthEndDay(props.date.getFullYear(), props.date.getMonth() + 1));
  5012. const shouldRender = computed(() => visible.value || !props.lazyRender);
  5013. const getTitle = () => title.value;
  5014. const getMultipleDayType = (day) => {
  5015. const isSelected = (date) => props.currentDate.some((item) => compareDay(item, date) === 0);
  5016. if (isSelected(day)) {
  5017. const prevDay = getPrevDay(day);
  5018. const nextDay = getNextDay(day);
  5019. const prevSelected = isSelected(prevDay);
  5020. const nextSelected = isSelected(nextDay);
  5021. if (prevSelected && nextSelected) {
  5022. return "multiple-middle";
  5023. }
  5024. if (prevSelected) {
  5025. return "end";
  5026. }
  5027. if (nextSelected) {
  5028. return "start";
  5029. }
  5030. return "multiple-selected";
  5031. }
  5032. return "";
  5033. };
  5034. const getRangeDayType = (day) => {
  5035. const [startDay, endDay] = props.currentDate;
  5036. if (!startDay) {
  5037. return "";
  5038. }
  5039. const compareToStart = compareDay(day, startDay);
  5040. if (!endDay) {
  5041. return compareToStart === 0 ? "start" : "";
  5042. }
  5043. const compareToEnd = compareDay(day, endDay);
  5044. if (props.allowSameDay && compareToStart === 0 && compareToEnd === 0) {
  5045. return "start-end";
  5046. }
  5047. if (compareToStart === 0) {
  5048. return "start";
  5049. }
  5050. if (compareToEnd === 0) {
  5051. return "end";
  5052. }
  5053. if (compareToStart > 0 && compareToEnd < 0) {
  5054. return "middle";
  5055. }
  5056. return "";
  5057. };
  5058. const getDayType = (day) => {
  5059. const {
  5060. type,
  5061. minDate,
  5062. maxDate,
  5063. currentDate
  5064. } = props;
  5065. if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) {
  5066. return "disabled";
  5067. }
  5068. if (currentDate === null) {
  5069. return "";
  5070. }
  5071. if (Array.isArray(currentDate)) {
  5072. if (type === "multiple") {
  5073. return getMultipleDayType(day);
  5074. }
  5075. if (type === "range") {
  5076. return getRangeDayType(day);
  5077. }
  5078. } else if (type === "single") {
  5079. return compareDay(day, currentDate) === 0 ? "selected" : "";
  5080. }
  5081. return "";
  5082. };
  5083. const getBottomInfo = (dayType) => {
  5084. if (props.type === "range") {
  5085. if (dayType === "start" || dayType === "end") {
  5086. return t5(dayType);
  5087. }
  5088. if (dayType === "start-end") {
  5089. return `${t5("start")}/${t5("end")}`;
  5090. }
  5091. }
  5092. };
  5093. const renderTitle = () => {
  5094. if (props.showMonthTitle) {
  5095. return createVNode("div", {
  5096. "class": bem27("month-title")
  5097. }, [title.value]);
  5098. }
  5099. };
  5100. const renderMark = () => {
  5101. if (props.showMark && shouldRender.value) {
  5102. return createVNode("div", {
  5103. "class": bem27("month-mark")
  5104. }, [props.date.getMonth() + 1]);
  5105. }
  5106. };
  5107. const placeholders = computed(() => {
  5108. const count = Math.ceil((totalDay.value + offset2.value) / 7);
  5109. return Array(count).fill({
  5110. type: "placeholder"
  5111. });
  5112. });
  5113. const days = computed(() => {
  5114. const days2 = [];
  5115. const year = props.date.getFullYear();
  5116. const month = props.date.getMonth();
  5117. for (let day = 1; day <= totalDay.value; day++) {
  5118. const date = new Date(year, month, day);
  5119. const type = getDayType(date);
  5120. let config = {
  5121. date,
  5122. type,
  5123. text: day,
  5124. bottomInfo: getBottomInfo(type)
  5125. };
  5126. if (props.formatter) {
  5127. config = props.formatter(config);
  5128. }
  5129. days2.push(config);
  5130. }
  5131. return days2;
  5132. });
  5133. const disabledDays = computed(() => days.value.filter((day) => day.type === "disabled"));
  5134. const scrollToDate = (body, targetDate) => {
  5135. if (daysRef.value) {
  5136. const daysRect = useRect(daysRef.value);
  5137. const totalRows = placeholders.value.length;
  5138. const currentRow = Math.ceil((targetDate.getDate() + offset2.value) / 7);
  5139. const rowOffset = (currentRow - 1) * daysRect.height / totalRows;
  5140. setScrollTop(body, daysRect.top + rowOffset + body.scrollTop - useRect(body).top);
  5141. }
  5142. };
  5143. const renderDay = (item, index) => createVNode(stdin_default30, {
  5144. "item": item,
  5145. "index": index,
  5146. "color": props.color,
  5147. "offset": offset2.value,
  5148. "rowHeight": rowHeight.value,
  5149. "onClick": (item2) => emit("click", item2)
  5150. }, pick(slots, ["top-info", "bottom-info"]));
  5151. const renderDays = () => createVNode("div", {
  5152. "ref": daysRef,
  5153. "role": "grid",
  5154. "class": bem27("days")
  5155. }, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
  5156. useExpose({
  5157. getTitle,
  5158. getHeight: () => height2.value,
  5159. setVisible,
  5160. scrollToDate,
  5161. disabledDays
  5162. });
  5163. return () => createVNode("div", {
  5164. "class": bem27("month"),
  5165. "ref": monthRef
  5166. }, [renderTitle(), renderDays()]);
  5167. }
  5168. });
  5169. // node_modules/vant/es/calendar/CalendarHeader.mjs
  5170. var [name30] = createNamespace("calendar-header");
  5171. var stdin_default32 = defineComponent({
  5172. name: name30,
  5173. props: {
  5174. title: String,
  5175. subtitle: String,
  5176. showTitle: Boolean,
  5177. showSubtitle: Boolean,
  5178. firstDayOfWeek: Number
  5179. },
  5180. emits: ["click-subtitle"],
  5181. setup(props, {
  5182. slots,
  5183. emit
  5184. }) {
  5185. const renderTitle = () => {
  5186. if (props.showTitle) {
  5187. const text = props.title || t5("title");
  5188. const title = slots.title ? slots.title() : text;
  5189. return createVNode("div", {
  5190. "class": bem27("header-title")
  5191. }, [title]);
  5192. }
  5193. };
  5194. const onClickSubtitle = (event) => emit("click-subtitle", event);
  5195. const renderSubtitle = () => {
  5196. if (props.showSubtitle) {
  5197. const title = slots.subtitle ? slots.subtitle() : props.subtitle;
  5198. return createVNode("div", {
  5199. "class": bem27("header-subtitle"),
  5200. "onClick": onClickSubtitle
  5201. }, [title]);
  5202. }
  5203. };
  5204. const renderWeekDays = () => {
  5205. const {
  5206. firstDayOfWeek
  5207. } = props;
  5208. const weekdays = t5("weekdays");
  5209. const renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
  5210. return createVNode("div", {
  5211. "class": bem27("weekdays")
  5212. }, [renderWeekDays2.map((text) => createVNode("span", {
  5213. "class": bem27("weekday")
  5214. }, [text]))]);
  5215. };
  5216. return () => createVNode("div", {
  5217. "class": bem27("header")
  5218. }, [renderTitle(), renderSubtitle(), renderWeekDays()]);
  5219. }
  5220. });
  5221. // node_modules/vant/es/calendar/Calendar.mjs
  5222. var calendarProps = {
  5223. show: Boolean,
  5224. type: makeStringProp("single"),
  5225. title: String,
  5226. color: String,
  5227. round: truthProp,
  5228. readonly: Boolean,
  5229. poppable: truthProp,
  5230. maxRange: makeNumericProp(null),
  5231. position: makeStringProp("bottom"),
  5232. teleport: [String, Object],
  5233. showMark: truthProp,
  5234. showTitle: truthProp,
  5235. formatter: Function,
  5236. rowHeight: numericProp,
  5237. confirmText: String,
  5238. rangePrompt: String,
  5239. lazyRender: truthProp,
  5240. showConfirm: truthProp,
  5241. defaultDate: [Date, Array],
  5242. allowSameDay: Boolean,
  5243. showSubtitle: truthProp,
  5244. closeOnPopstate: truthProp,
  5245. showRangePrompt: truthProp,
  5246. confirmDisabledText: String,
  5247. closeOnClickOverlay: truthProp,
  5248. safeAreaInsetTop: Boolean,
  5249. safeAreaInsetBottom: truthProp,
  5250. minDate: {
  5251. type: Date,
  5252. validator: isDate,
  5253. default: getToday
  5254. },
  5255. maxDate: {
  5256. type: Date,
  5257. validator: isDate,
  5258. default: () => {
  5259. const now = getToday();
  5260. return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate());
  5261. }
  5262. },
  5263. firstDayOfWeek: {
  5264. type: numericProp,
  5265. default: 0,
  5266. validator: (val) => val >= 0 && val <= 6
  5267. }
  5268. };
  5269. var stdin_default33 = defineComponent({
  5270. name: name27,
  5271. props: calendarProps,
  5272. emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
  5273. setup(props, {
  5274. emit,
  5275. slots
  5276. }) {
  5277. const limitDateRange = (date, minDate = props.minDate, maxDate = props.maxDate) => {
  5278. if (compareDay(date, minDate) === -1) {
  5279. return minDate;
  5280. }
  5281. if (compareDay(date, maxDate) === 1) {
  5282. return maxDate;
  5283. }
  5284. return date;
  5285. };
  5286. const getInitialDate = (defaultDate = props.defaultDate) => {
  5287. const {
  5288. type,
  5289. minDate,
  5290. maxDate,
  5291. allowSameDay
  5292. } = props;
  5293. if (defaultDate === null) {
  5294. return defaultDate;
  5295. }
  5296. const now = getToday();
  5297. if (type === "range") {
  5298. if (!Array.isArray(defaultDate)) {
  5299. defaultDate = [];
  5300. }
  5301. const start2 = limitDateRange(defaultDate[0] || now, minDate, allowSameDay ? maxDate : getPrevDay(maxDate));
  5302. const end2 = limitDateRange(defaultDate[1] || now, allowSameDay ? minDate : getNextDay(minDate));
  5303. return [start2, end2];
  5304. }
  5305. if (type === "multiple") {
  5306. if (Array.isArray(defaultDate)) {
  5307. return defaultDate.map((date) => limitDateRange(date));
  5308. }
  5309. return [limitDateRange(now)];
  5310. }
  5311. if (!defaultDate || Array.isArray(defaultDate)) {
  5312. defaultDate = now;
  5313. }
  5314. return limitDateRange(defaultDate);
  5315. };
  5316. let bodyHeight;
  5317. const bodyRef = ref();
  5318. const subtitle = ref("");
  5319. const currentDate = ref(getInitialDate());
  5320. const [monthRefs, setMonthRefs] = useRefs();
  5321. const dayOffset = computed(() => props.firstDayOfWeek ? +props.firstDayOfWeek % 7 : 0);
  5322. const months = computed(() => {
  5323. const months2 = [];
  5324. const cursor = new Date(props.minDate);
  5325. cursor.setDate(1);
  5326. do {
  5327. months2.push(new Date(cursor));
  5328. cursor.setMonth(cursor.getMonth() + 1);
  5329. } while (compareMonth(cursor, props.maxDate) !== 1);
  5330. return months2;
  5331. });
  5332. const buttonDisabled = computed(() => {
  5333. if (currentDate.value) {
  5334. if (props.type === "range") {
  5335. return !currentDate.value[0] || !currentDate.value[1];
  5336. }
  5337. if (props.type === "multiple") {
  5338. return !currentDate.value.length;
  5339. }
  5340. }
  5341. return !currentDate.value;
  5342. });
  5343. const getSelectedDate = () => currentDate.value;
  5344. const onScroll = () => {
  5345. const top2 = getScrollTop(bodyRef.value);
  5346. const bottom2 = top2 + bodyHeight;
  5347. const heights = months.value.map((item, index) => monthRefs.value[index].getHeight());
  5348. const heightSum = heights.reduce((a, b) => a + b, 0);
  5349. if (bottom2 > heightSum && top2 > 0) {
  5350. return;
  5351. }
  5352. let height2 = 0;
  5353. let currentMonth;
  5354. const visibleRange = [-1, -1];
  5355. for (let i = 0; i < months.value.length; i++) {
  5356. const month = monthRefs.value[i];
  5357. const visible = height2 <= bottom2 && height2 + heights[i] >= top2;
  5358. if (visible) {
  5359. visibleRange[1] = i;
  5360. if (!currentMonth) {
  5361. currentMonth = month;
  5362. visibleRange[0] = i;
  5363. }
  5364. if (!monthRefs.value[i].showed) {
  5365. monthRefs.value[i].showed = true;
  5366. emit("month-show", {
  5367. date: month.date,
  5368. title: month.getTitle()
  5369. });
  5370. }
  5371. }
  5372. height2 += heights[i];
  5373. }
  5374. months.value.forEach((month, index) => {
  5375. const visible = index >= visibleRange[0] - 1 && index <= visibleRange[1] + 1;
  5376. monthRefs.value[index].setVisible(visible);
  5377. });
  5378. if (currentMonth) {
  5379. subtitle.value = currentMonth.getTitle();
  5380. }
  5381. };
  5382. const scrollToDate = (targetDate) => {
  5383. raf(() => {
  5384. months.value.some((month, index) => {
  5385. if (compareMonth(month, targetDate) === 0) {
  5386. if (bodyRef.value) {
  5387. monthRefs.value[index].scrollToDate(bodyRef.value, targetDate);
  5388. }
  5389. return true;
  5390. }
  5391. return false;
  5392. });
  5393. onScroll();
  5394. });
  5395. };
  5396. const scrollToCurrentDate = () => {
  5397. if (props.poppable && !props.show) {
  5398. return;
  5399. }
  5400. if (currentDate.value) {
  5401. const targetDate = props.type === "single" ? currentDate.value : currentDate.value[0];
  5402. if (isDate(targetDate)) {
  5403. scrollToDate(targetDate);
  5404. }
  5405. } else {
  5406. raf(onScroll);
  5407. }
  5408. };
  5409. const init = () => {
  5410. if (props.poppable && !props.show) {
  5411. return;
  5412. }
  5413. raf(() => {
  5414. bodyHeight = Math.floor(useRect(bodyRef).height);
  5415. });
  5416. scrollToCurrentDate();
  5417. };
  5418. const reset = (date = getInitialDate()) => {
  5419. currentDate.value = date;
  5420. scrollToCurrentDate();
  5421. };
  5422. const checkRange = (date) => {
  5423. const {
  5424. maxRange,
  5425. rangePrompt,
  5426. showRangePrompt
  5427. } = props;
  5428. if (maxRange && calcDateNum(date) > maxRange) {
  5429. if (showRangePrompt) {
  5430. Toast(rangePrompt || t5("rangePrompt", maxRange));
  5431. }
  5432. emit("over-range");
  5433. return false;
  5434. }
  5435. return true;
  5436. };
  5437. const onConfirm = () => {
  5438. var _a;
  5439. return emit("confirm", (_a = currentDate.value) != null ? _a : cloneDates(currentDate.value));
  5440. };
  5441. const select = (date, complete) => {
  5442. const setCurrentDate = (date2) => {
  5443. currentDate.value = date2;
  5444. emit("select", cloneDates(date2));
  5445. };
  5446. if (complete && props.type === "range") {
  5447. const valid = checkRange(date);
  5448. if (!valid) {
  5449. setCurrentDate([date[0], getDayByOffset(date[0], +props.maxRange - 1)]);
  5450. return;
  5451. }
  5452. }
  5453. setCurrentDate(date);
  5454. if (complete && !props.showConfirm) {
  5455. onConfirm();
  5456. }
  5457. };
  5458. const getDisabledDate = (disabledDays2, startDay, date) => {
  5459. var _a;
  5460. return (_a = disabledDays2.find((day) => compareDay(startDay, day.date) === -1 && compareDay(day.date, date) === -1)) == null ? void 0 : _a.date;
  5461. };
  5462. const disabledDays = computed(() => monthRefs.value.reduce((arr, ref2) => {
  5463. var _a, _b;
  5464. arr.push(...(_b = (_a = ref2.disabledDays) == null ? void 0 : _a.value) != null ? _b : []);
  5465. return arr;
  5466. }, []));
  5467. const onClickDay = (item) => {
  5468. if (props.readonly || !item.date) {
  5469. return;
  5470. }
  5471. const {
  5472. date
  5473. } = item;
  5474. const {
  5475. type
  5476. } = props;
  5477. if (type === "range") {
  5478. if (!currentDate.value) {
  5479. select([date]);
  5480. return;
  5481. }
  5482. const [startDay, endDay] = currentDate.value;
  5483. if (startDay && !endDay) {
  5484. const compareToStart = compareDay(date, startDay);
  5485. if (compareToStart === 1) {
  5486. const disabledDay = getDisabledDate(disabledDays.value, startDay, date);
  5487. if (disabledDay) {
  5488. const endDay2 = getPrevDay(disabledDay);
  5489. if (compareDay(startDay, endDay2) === -1) {
  5490. select([startDay, endDay2]);
  5491. } else {
  5492. select([date]);
  5493. }
  5494. } else {
  5495. select([startDay, date], true);
  5496. }
  5497. } else if (compareToStart === -1) {
  5498. select([date]);
  5499. } else if (props.allowSameDay) {
  5500. select([date, date], true);
  5501. }
  5502. } else {
  5503. select([date]);
  5504. }
  5505. } else if (type === "multiple") {
  5506. if (!currentDate.value) {
  5507. select([date]);
  5508. return;
  5509. }
  5510. const dates = currentDate.value;
  5511. const selectedIndex = dates.findIndex((dateItem) => compareDay(dateItem, date) === 0);
  5512. if (selectedIndex !== -1) {
  5513. const [unselectedDate] = dates.splice(selectedIndex, 1);
  5514. emit("unselect", cloneDate(unselectedDate));
  5515. } else if (props.maxRange && dates.length >= props.maxRange) {
  5516. Toast(props.rangePrompt || t5("rangePrompt", props.maxRange));
  5517. } else {
  5518. select([...dates, date]);
  5519. }
  5520. } else {
  5521. select(date, true);
  5522. }
  5523. };
  5524. const updateShow = (value) => emit("update:show", value);
  5525. const renderMonth = (date, index) => {
  5526. const showMonthTitle = index !== 0 || !props.showSubtitle;
  5527. return createVNode(stdin_default31, mergeProps({
  5528. "ref": setMonthRefs(index),
  5529. "date": date,
  5530. "currentDate": currentDate.value,
  5531. "showMonthTitle": showMonthTitle,
  5532. "firstDayOfWeek": dayOffset.value
  5533. }, pick(props, ["type", "color", "minDate", "maxDate", "showMark", "formatter", "rowHeight", "lazyRender", "showSubtitle", "allowSameDay"]), {
  5534. "onClick": onClickDay
  5535. }), pick(slots, ["top-info", "bottom-info"]));
  5536. };
  5537. const renderFooterButton = () => {
  5538. if (slots.footer) {
  5539. return slots.footer();
  5540. }
  5541. if (props.showConfirm) {
  5542. const slot = slots["confirm-text"];
  5543. const disabled = buttonDisabled.value;
  5544. const text = disabled ? props.confirmDisabledText : props.confirmText;
  5545. return createVNode(Button, {
  5546. "round": true,
  5547. "block": true,
  5548. "type": "danger",
  5549. "color": props.color,
  5550. "class": bem27("confirm"),
  5551. "disabled": disabled,
  5552. "nativeType": "button",
  5553. "onClick": onConfirm
  5554. }, {
  5555. default: () => [slot ? slot({
  5556. disabled
  5557. }) : text || t5("confirm")]
  5558. });
  5559. }
  5560. };
  5561. const renderFooter = () => createVNode("div", {
  5562. "class": [bem27("footer"), {
  5563. "van-safe-area-bottom": props.safeAreaInsetBottom
  5564. }]
  5565. }, [renderFooterButton()]);
  5566. const renderCalendar = () => createVNode("div", {
  5567. "class": bem27()
  5568. }, [createVNode(stdin_default32, {
  5569. "title": props.title,
  5570. "subtitle": subtitle.value,
  5571. "showTitle": props.showTitle,
  5572. "showSubtitle": props.showSubtitle,
  5573. "firstDayOfWeek": dayOffset.value,
  5574. "onClick-subtitle": (event) => emit("click-subtitle", event)
  5575. }, pick(slots, ["title", "subtitle"])), createVNode("div", {
  5576. "ref": bodyRef,
  5577. "class": bem27("body"),
  5578. "onScroll": onScroll
  5579. }, [months.value.map(renderMonth)]), renderFooter()]);
  5580. watch(() => props.show, init);
  5581. watch(() => [props.type, props.minDate, props.maxDate], () => reset(getInitialDate(currentDate.value)));
  5582. watch(() => props.defaultDate, (value = null) => {
  5583. currentDate.value = value;
  5584. scrollToCurrentDate();
  5585. });
  5586. useExpose({
  5587. reset,
  5588. scrollToDate,
  5589. getSelectedDate
  5590. });
  5591. onMountedOrActivated(init);
  5592. return () => {
  5593. if (props.poppable) {
  5594. return createVNode(Popup, {
  5595. "show": props.show,
  5596. "class": bem27("popup"),
  5597. "round": props.round,
  5598. "position": props.position,
  5599. "closeable": props.showTitle || props.showSubtitle,
  5600. "teleport": props.teleport,
  5601. "closeOnPopstate": props.closeOnPopstate,
  5602. "safeAreaInsetTop": props.safeAreaInsetTop,
  5603. "closeOnClickOverlay": props.closeOnClickOverlay,
  5604. "onUpdate:show": updateShow
  5605. }, {
  5606. default: renderCalendar
  5607. });
  5608. }
  5609. return renderCalendar();
  5610. };
  5611. }
  5612. });
  5613. // node_modules/vant/es/calendar/index.mjs
  5614. var Calendar = withInstall(stdin_default33);
  5615. // node_modules/vant/es/image/Image.mjs
  5616. var [name31, bem28] = createNamespace("image");
  5617. var imageProps = {
  5618. src: String,
  5619. alt: String,
  5620. fit: String,
  5621. position: String,
  5622. round: Boolean,
  5623. block: Boolean,
  5624. width: numericProp,
  5625. height: numericProp,
  5626. radius: numericProp,
  5627. lazyLoad: Boolean,
  5628. iconSize: numericProp,
  5629. showError: truthProp,
  5630. errorIcon: makeStringProp("photo-fail"),
  5631. iconPrefix: String,
  5632. showLoading: truthProp,
  5633. loadingIcon: makeStringProp("photo")
  5634. };
  5635. var stdin_default34 = defineComponent({
  5636. name: name31,
  5637. props: imageProps,
  5638. emits: ["load", "error"],
  5639. setup(props, {
  5640. emit,
  5641. slots
  5642. }) {
  5643. const error = ref(false);
  5644. const loading = ref(true);
  5645. const imageRef = ref();
  5646. const {
  5647. $Lazyload
  5648. } = getCurrentInstance().proxy;
  5649. const style = computed(() => {
  5650. const style2 = {
  5651. width: addUnit(props.width),
  5652. height: addUnit(props.height)
  5653. };
  5654. if (isDef(props.radius)) {
  5655. style2.overflow = "hidden";
  5656. style2.borderRadius = addUnit(props.radius);
  5657. }
  5658. return style2;
  5659. });
  5660. watch(() => props.src, () => {
  5661. error.value = false;
  5662. loading.value = true;
  5663. });
  5664. const onLoad = (event) => {
  5665. loading.value = false;
  5666. emit("load", event);
  5667. };
  5668. const onError = (event) => {
  5669. error.value = true;
  5670. loading.value = false;
  5671. emit("error", event);
  5672. };
  5673. const renderIcon = (name210, className, slot) => {
  5674. if (slot) {
  5675. return slot();
  5676. }
  5677. return createVNode(Icon, {
  5678. "name": name210,
  5679. "size": props.iconSize,
  5680. "class": className,
  5681. "classPrefix": props.iconPrefix
  5682. }, null);
  5683. };
  5684. const renderPlaceholder = () => {
  5685. if (loading.value && props.showLoading) {
  5686. return createVNode("div", {
  5687. "class": bem28("loading")
  5688. }, [renderIcon(props.loadingIcon, bem28("loading-icon"), slots.loading)]);
  5689. }
  5690. if (error.value && props.showError) {
  5691. return createVNode("div", {
  5692. "class": bem28("error")
  5693. }, [renderIcon(props.errorIcon, bem28("error-icon"), slots.error)]);
  5694. }
  5695. };
  5696. const renderImage = () => {
  5697. if (error.value || !props.src) {
  5698. return;
  5699. }
  5700. const attrs = {
  5701. alt: props.alt,
  5702. class: bem28("img"),
  5703. style: {
  5704. objectFit: props.fit,
  5705. objectPosition: props.position
  5706. }
  5707. };
  5708. if (props.lazyLoad) {
  5709. return withDirectives(createVNode("img", mergeProps({
  5710. "ref": imageRef
  5711. }, attrs), null), [[resolveDirective("lazy"), props.src]]);
  5712. }
  5713. return createVNode("img", mergeProps({
  5714. "src": props.src,
  5715. "onLoad": onLoad,
  5716. "onError": onError
  5717. }, attrs), null);
  5718. };
  5719. const onLazyLoaded = ({
  5720. el
  5721. }) => {
  5722. const check = () => {
  5723. if (el === imageRef.value && loading.value) {
  5724. onLoad();
  5725. }
  5726. };
  5727. if (imageRef.value) {
  5728. check();
  5729. } else {
  5730. nextTick(check);
  5731. }
  5732. };
  5733. const onLazyLoadError = ({
  5734. el
  5735. }) => {
  5736. if (el === imageRef.value && !error.value) {
  5737. onError();
  5738. }
  5739. };
  5740. if ($Lazyload && inBrowser) {
  5741. $Lazyload.$on("loaded", onLazyLoaded);
  5742. $Lazyload.$on("error", onLazyLoadError);
  5743. onBeforeUnmount(() => {
  5744. $Lazyload.$off("loaded", onLazyLoaded);
  5745. $Lazyload.$off("error", onLazyLoadError);
  5746. });
  5747. }
  5748. return () => {
  5749. var _a;
  5750. return createVNode("div", {
  5751. "class": bem28({
  5752. round: props.round,
  5753. block: props.block
  5754. }),
  5755. "style": style.value
  5756. }, [renderImage(), renderPlaceholder(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
  5757. };
  5758. }
  5759. });
  5760. // node_modules/vant/es/image/index.mjs
  5761. var Image2 = withInstall(stdin_default34);
  5762. // node_modules/vant/es/card/Card.mjs
  5763. var [name32, bem29] = createNamespace("card");
  5764. var cardProps = {
  5765. tag: String,
  5766. num: numericProp,
  5767. desc: String,
  5768. thumb: String,
  5769. title: String,
  5770. price: numericProp,
  5771. centered: Boolean,
  5772. lazyLoad: Boolean,
  5773. currency: makeStringProp("\xA5"),
  5774. thumbLink: String,
  5775. originPrice: numericProp
  5776. };
  5777. var stdin_default35 = defineComponent({
  5778. name: name32,
  5779. props: cardProps,
  5780. emits: ["click-thumb"],
  5781. setup(props, {
  5782. slots,
  5783. emit
  5784. }) {
  5785. const renderTitle = () => {
  5786. if (slots.title) {
  5787. return slots.title();
  5788. }
  5789. if (props.title) {
  5790. return createVNode("div", {
  5791. "class": [bem29("title"), "van-multi-ellipsis--l2"]
  5792. }, [props.title]);
  5793. }
  5794. };
  5795. const renderThumbTag = () => {
  5796. if (slots.tag || props.tag) {
  5797. return createVNode("div", {
  5798. "class": bem29("tag")
  5799. }, [slots.tag ? slots.tag() : createVNode(Tag, {
  5800. "mark": true,
  5801. "type": "danger"
  5802. }, {
  5803. default: () => [props.tag]
  5804. })]);
  5805. }
  5806. };
  5807. const renderThumbImage = () => {
  5808. if (slots.thumb) {
  5809. return slots.thumb();
  5810. }
  5811. return createVNode(Image2, {
  5812. "src": props.thumb,
  5813. "fit": "cover",
  5814. "width": "100%",
  5815. "height": "100%",
  5816. "lazyLoad": props.lazyLoad
  5817. }, null);
  5818. };
  5819. const renderThumb = () => {
  5820. if (slots.thumb || props.thumb) {
  5821. return createVNode("a", {
  5822. "href": props.thumbLink,
  5823. "class": bem29("thumb"),
  5824. "onClick": (event) => emit("click-thumb", event)
  5825. }, [renderThumbImage(), renderThumbTag()]);
  5826. }
  5827. };
  5828. const renderDesc = () => {
  5829. if (slots.desc) {
  5830. return slots.desc();
  5831. }
  5832. if (props.desc) {
  5833. return createVNode("div", {
  5834. "class": [bem29("desc"), "van-ellipsis"]
  5835. }, [props.desc]);
  5836. }
  5837. };
  5838. const renderPriceText = () => {
  5839. const priceArr = props.price.toString().split(".");
  5840. return createVNode("div", null, [createVNode("span", {
  5841. "class": bem29("price-currency")
  5842. }, [props.currency]), createVNode("span", {
  5843. "class": bem29("price-integer")
  5844. }, [priceArr[0]]), createTextVNode("."), createVNode("span", {
  5845. "class": bem29("price-decimal")
  5846. }, [priceArr[1]])]);
  5847. };
  5848. return () => {
  5849. var _a, _b, _c;
  5850. const showNum = slots.num || isDef(props.num);
  5851. const showPrice = slots.price || isDef(props.price);
  5852. const showOriginPrice = slots["origin-price"] || isDef(props.originPrice);
  5853. const showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
  5854. const Price = showPrice && createVNode("div", {
  5855. "class": bem29("price")
  5856. }, [slots.price ? slots.price() : renderPriceText()]);
  5857. const OriginPrice = showOriginPrice && createVNode("div", {
  5858. "class": bem29("origin-price")
  5859. }, [slots["origin-price"] ? slots["origin-price"]() : `${props.currency} ${props.originPrice}`]);
  5860. const Num = showNum && createVNode("div", {
  5861. "class": bem29("num")
  5862. }, [slots.num ? slots.num() : `x${props.num}`]);
  5863. const Footer = slots.footer && createVNode("div", {
  5864. "class": bem29("footer")
  5865. }, [slots.footer()]);
  5866. const Bottom = showBottom && createVNode("div", {
  5867. "class": bem29("bottom")
  5868. }, [(_a = slots["price-top"]) == null ? void 0 : _a.call(slots), Price, OriginPrice, Num, (_b = slots.bottom) == null ? void 0 : _b.call(slots)]);
  5869. return createVNode("div", {
  5870. "class": bem29()
  5871. }, [createVNode("div", {
  5872. "class": bem29("header")
  5873. }, [renderThumb(), createVNode("div", {
  5874. "class": bem29("content", {
  5875. centered: props.centered
  5876. })
  5877. }, [createVNode("div", null, [renderTitle(), renderDesc(), (_c = slots.tags) == null ? void 0 : _c.call(slots)]), Bottom])]), Footer]);
  5878. };
  5879. }
  5880. });
  5881. // node_modules/vant/es/card/index.mjs
  5882. var Card = withInstall(stdin_default35);
  5883. // node_modules/vant/es/composables/use-visibility-change.mjs
  5884. function useVisibilityChange(target, onChange) {
  5885. if (!inBrowser || !window.IntersectionObserver) {
  5886. return;
  5887. }
  5888. const observer = new IntersectionObserver(
  5889. (entries) => {
  5890. onChange(entries[0].intersectionRatio > 0);
  5891. },
  5892. { root: document.body }
  5893. );
  5894. const observe = () => {
  5895. if (target.value) {
  5896. observer.observe(target.value);
  5897. }
  5898. };
  5899. const unobserve = () => {
  5900. if (target.value) {
  5901. observer.unobserve(target.value);
  5902. }
  5903. };
  5904. onDeactivated(unobserve);
  5905. onBeforeUnmount(unobserve);
  5906. onMountedOrActivated(observe);
  5907. }
  5908. // node_modules/vant/es/sticky/Sticky.mjs
  5909. var [name33, bem30] = createNamespace("sticky");
  5910. var stickyProps = {
  5911. zIndex: numericProp,
  5912. position: makeStringProp("top"),
  5913. container: Object,
  5914. offsetTop: makeNumericProp(0),
  5915. offsetBottom: makeNumericProp(0)
  5916. };
  5917. var stdin_default36 = defineComponent({
  5918. name: name33,
  5919. props: stickyProps,
  5920. emits: ["scroll", "change"],
  5921. setup(props, {
  5922. emit,
  5923. slots
  5924. }) {
  5925. const root = ref();
  5926. const scrollParent = useScrollParent(root);
  5927. const state = reactive({
  5928. fixed: false,
  5929. width: 0,
  5930. height: 0,
  5931. transform: 0
  5932. });
  5933. const offset2 = computed(() => unitToPx(props.position === "top" ? props.offsetTop : props.offsetBottom));
  5934. const rootStyle = computed(() => {
  5935. const {
  5936. fixed,
  5937. height: height2,
  5938. width: width2
  5939. } = state;
  5940. if (fixed) {
  5941. return {
  5942. width: `${width2}px`,
  5943. height: `${height2}px`
  5944. };
  5945. }
  5946. });
  5947. const stickyStyle = computed(() => {
  5948. if (!state.fixed) {
  5949. return;
  5950. }
  5951. const style = extend(getZIndexStyle(props.zIndex), {
  5952. width: `${state.width}px`,
  5953. height: `${state.height}px`,
  5954. [props.position]: `${offset2.value}px`
  5955. });
  5956. if (state.transform) {
  5957. style.transform = `translate3d(0, ${state.transform}px, 0)`;
  5958. }
  5959. return style;
  5960. });
  5961. const emitScroll = (scrollTop) => emit("scroll", {
  5962. scrollTop,
  5963. isFixed: state.fixed
  5964. });
  5965. const onScroll = () => {
  5966. if (!root.value || isHidden(root)) {
  5967. return;
  5968. }
  5969. const {
  5970. container,
  5971. position
  5972. } = props;
  5973. const rootRect = useRect(root);
  5974. const scrollTop = getScrollTop(window);
  5975. state.width = rootRect.width;
  5976. state.height = rootRect.height;
  5977. if (position === "top") {
  5978. if (container) {
  5979. const containerRect = useRect(container);
  5980. const difference = containerRect.bottom - offset2.value - state.height;
  5981. state.fixed = offset2.value > rootRect.top && containerRect.bottom > 0;
  5982. state.transform = difference < 0 ? difference : 0;
  5983. } else {
  5984. state.fixed = offset2.value > rootRect.top;
  5985. }
  5986. } else {
  5987. const {
  5988. clientHeight
  5989. } = document.documentElement;
  5990. if (container) {
  5991. const containerRect = useRect(container);
  5992. const difference = clientHeight - containerRect.top - offset2.value - state.height;
  5993. state.fixed = clientHeight - offset2.value < rootRect.bottom && clientHeight > containerRect.top;
  5994. state.transform = difference < 0 ? -difference : 0;
  5995. } else {
  5996. state.fixed = clientHeight - offset2.value < rootRect.bottom;
  5997. }
  5998. }
  5999. emitScroll(scrollTop);
  6000. };
  6001. watch(() => state.fixed, (value) => emit("change", value));
  6002. useEventListener("scroll", onScroll, {
  6003. target: scrollParent,
  6004. passive: true
  6005. });
  6006. useVisibilityChange(root, onScroll);
  6007. return () => {
  6008. var _a;
  6009. return createVNode("div", {
  6010. "ref": root,
  6011. "style": rootStyle.value
  6012. }, [createVNode("div", {
  6013. "class": bem30({
  6014. fixed: state.fixed
  6015. }),
  6016. "style": stickyStyle.value
  6017. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
  6018. };
  6019. }
  6020. });
  6021. // node_modules/vant/es/sticky/index.mjs
  6022. var Sticky = withInstall(stdin_default36);
  6023. // node_modules/vant/es/swipe/Swipe.mjs
  6024. var [name34, bem31] = createNamespace("swipe");
  6025. var swipeProps = {
  6026. loop: truthProp,
  6027. width: numericProp,
  6028. height: numericProp,
  6029. vertical: Boolean,
  6030. autoplay: makeNumericProp(0),
  6031. duration: makeNumericProp(500),
  6032. touchable: truthProp,
  6033. lazyRender: Boolean,
  6034. initialSwipe: makeNumericProp(0),
  6035. indicatorColor: String,
  6036. showIndicators: truthProp,
  6037. stopPropagation: truthProp
  6038. };
  6039. var SWIPE_KEY = Symbol(name34);
  6040. var stdin_default37 = defineComponent({
  6041. name: name34,
  6042. props: swipeProps,
  6043. emits: ["change"],
  6044. setup(props, {
  6045. emit,
  6046. slots
  6047. }) {
  6048. const root = ref();
  6049. const track = ref();
  6050. const state = reactive({
  6051. rect: null,
  6052. width: 0,
  6053. height: 0,
  6054. offset: 0,
  6055. active: 0,
  6056. swiping: false
  6057. });
  6058. const touch = useTouch();
  6059. const {
  6060. children,
  6061. linkChildren
  6062. } = useChildren(SWIPE_KEY);
  6063. const count = computed(() => children.length);
  6064. const size = computed(() => state[props.vertical ? "height" : "width"]);
  6065. const delta = computed(() => props.vertical ? touch.deltaY.value : touch.deltaX.value);
  6066. const minOffset = computed(() => {
  6067. if (state.rect) {
  6068. const base = props.vertical ? state.rect.height : state.rect.width;
  6069. return base - size.value * count.value;
  6070. }
  6071. return 0;
  6072. });
  6073. const maxCount = computed(() => Math.ceil(Math.abs(minOffset.value) / size.value));
  6074. const trackSize = computed(() => count.value * size.value);
  6075. const activeIndicator = computed(() => (state.active + count.value) % count.value);
  6076. const isCorrectDirection = computed(() => {
  6077. const expect = props.vertical ? "vertical" : "horizontal";
  6078. return touch.direction.value === expect;
  6079. });
  6080. const trackStyle = computed(() => {
  6081. const style = {
  6082. transitionDuration: `${state.swiping ? 0 : props.duration}ms`,
  6083. transform: `translate${props.vertical ? "Y" : "X"}(${state.offset}px)`
  6084. };
  6085. if (size.value) {
  6086. const mainAxis = props.vertical ? "height" : "width";
  6087. const crossAxis = props.vertical ? "width" : "height";
  6088. style[mainAxis] = `${trackSize.value}px`;
  6089. style[crossAxis] = props[crossAxis] ? `${props[crossAxis]}px` : "";
  6090. }
  6091. return style;
  6092. });
  6093. const getTargetActive = (pace) => {
  6094. const {
  6095. active
  6096. } = state;
  6097. if (pace) {
  6098. if (props.loop) {
  6099. return clamp(active + pace, -1, count.value);
  6100. }
  6101. return clamp(active + pace, 0, maxCount.value);
  6102. }
  6103. return active;
  6104. };
  6105. const getTargetOffset = (targetActive, offset2 = 0) => {
  6106. let currentPosition = targetActive * size.value;
  6107. if (!props.loop) {
  6108. currentPosition = Math.min(currentPosition, -minOffset.value);
  6109. }
  6110. let targetOffset = offset2 - currentPosition;
  6111. if (!props.loop) {
  6112. targetOffset = clamp(targetOffset, minOffset.value, 0);
  6113. }
  6114. return targetOffset;
  6115. };
  6116. const move = ({
  6117. pace = 0,
  6118. offset: offset2 = 0,
  6119. emitChange
  6120. }) => {
  6121. if (count.value <= 1) {
  6122. return;
  6123. }
  6124. const {
  6125. active
  6126. } = state;
  6127. const targetActive = getTargetActive(pace);
  6128. const targetOffset = getTargetOffset(targetActive, offset2);
  6129. if (props.loop) {
  6130. if (children[0] && targetOffset !== minOffset.value) {
  6131. const outRightBound = targetOffset < minOffset.value;
  6132. children[0].setOffset(outRightBound ? trackSize.value : 0);
  6133. }
  6134. if (children[count.value - 1] && targetOffset !== 0) {
  6135. const outLeftBound = targetOffset > 0;
  6136. children[count.value - 1].setOffset(outLeftBound ? -trackSize.value : 0);
  6137. }
  6138. }
  6139. state.active = targetActive;
  6140. state.offset = targetOffset;
  6141. if (emitChange && targetActive !== active) {
  6142. emit("change", activeIndicator.value);
  6143. }
  6144. };
  6145. const correctPosition = () => {
  6146. state.swiping = true;
  6147. if (state.active <= -1) {
  6148. move({
  6149. pace: count.value
  6150. });
  6151. } else if (state.active >= count.value) {
  6152. move({
  6153. pace: -count.value
  6154. });
  6155. }
  6156. };
  6157. const prev = () => {
  6158. correctPosition();
  6159. touch.reset();
  6160. doubleRaf(() => {
  6161. state.swiping = false;
  6162. move({
  6163. pace: -1,
  6164. emitChange: true
  6165. });
  6166. });
  6167. };
  6168. const next = () => {
  6169. correctPosition();
  6170. touch.reset();
  6171. doubleRaf(() => {
  6172. state.swiping = false;
  6173. move({
  6174. pace: 1,
  6175. emitChange: true
  6176. });
  6177. });
  6178. };
  6179. let autoplayTimer;
  6180. const stopAutoplay = () => clearTimeout(autoplayTimer);
  6181. const autoplay = () => {
  6182. stopAutoplay();
  6183. if (props.autoplay > 0 && count.value > 1) {
  6184. autoplayTimer = setTimeout(() => {
  6185. next();
  6186. autoplay();
  6187. }, +props.autoplay);
  6188. }
  6189. };
  6190. const initialize = (active = +props.initialSwipe) => {
  6191. if (!root.value) {
  6192. return;
  6193. }
  6194. const cb = () => {
  6195. var _a, _b;
  6196. if (!isHidden(root)) {
  6197. const rect = {
  6198. width: root.value.offsetWidth,
  6199. height: root.value.offsetHeight
  6200. };
  6201. state.rect = rect;
  6202. state.width = +((_a = props.width) != null ? _a : rect.width);
  6203. state.height = +((_b = props.height) != null ? _b : rect.height);
  6204. }
  6205. if (count.value) {
  6206. active = Math.min(count.value - 1, active);
  6207. }
  6208. state.active = active;
  6209. state.swiping = true;
  6210. state.offset = getTargetOffset(active);
  6211. children.forEach((swipe) => {
  6212. swipe.setOffset(0);
  6213. });
  6214. autoplay();
  6215. };
  6216. if (isHidden(root)) {
  6217. nextTick().then(cb);
  6218. } else {
  6219. cb();
  6220. }
  6221. };
  6222. const resize = () => initialize(state.active);
  6223. let touchStartTime;
  6224. const onTouchStart = (event) => {
  6225. if (!props.touchable)
  6226. return;
  6227. touch.start(event);
  6228. touchStartTime = Date.now();
  6229. stopAutoplay();
  6230. correctPosition();
  6231. };
  6232. const onTouchMove = (event) => {
  6233. if (props.touchable && state.swiping) {
  6234. touch.move(event);
  6235. if (isCorrectDirection.value) {
  6236. const isEdgeTouch = !props.loop && (state.active === 0 && delta.value > 0 || state.active === count.value - 1 && delta.value < 0);
  6237. if (!isEdgeTouch) {
  6238. preventDefault(event, props.stopPropagation);
  6239. move({
  6240. offset: delta.value
  6241. });
  6242. }
  6243. }
  6244. }
  6245. };
  6246. const onTouchEnd = () => {
  6247. if (!props.touchable || !state.swiping) {
  6248. return;
  6249. }
  6250. const duration = Date.now() - touchStartTime;
  6251. const speed = delta.value / duration;
  6252. const shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(delta.value) > size.value / 2;
  6253. if (shouldSwipe && isCorrectDirection.value) {
  6254. const offset2 = props.vertical ? touch.offsetY.value : touch.offsetX.value;
  6255. let pace = 0;
  6256. if (props.loop) {
  6257. pace = offset2 > 0 ? delta.value > 0 ? -1 : 1 : 0;
  6258. } else {
  6259. pace = -Math[delta.value > 0 ? "ceil" : "floor"](delta.value / size.value);
  6260. }
  6261. move({
  6262. pace,
  6263. emitChange: true
  6264. });
  6265. } else if (delta.value) {
  6266. move({
  6267. pace: 0
  6268. });
  6269. }
  6270. state.swiping = false;
  6271. autoplay();
  6272. };
  6273. const swipeTo = (index, options = {}) => {
  6274. correctPosition();
  6275. touch.reset();
  6276. doubleRaf(() => {
  6277. let targetIndex;
  6278. if (props.loop && index === count.value) {
  6279. targetIndex = state.active === 0 ? 0 : index;
  6280. } else {
  6281. targetIndex = index % count.value;
  6282. }
  6283. if (options.immediate) {
  6284. doubleRaf(() => {
  6285. state.swiping = false;
  6286. });
  6287. } else {
  6288. state.swiping = false;
  6289. }
  6290. move({
  6291. pace: targetIndex - state.active,
  6292. emitChange: true
  6293. });
  6294. });
  6295. };
  6296. const renderDot = (_, index) => {
  6297. const active = index === activeIndicator.value;
  6298. const style = active ? {
  6299. backgroundColor: props.indicatorColor
  6300. } : void 0;
  6301. return createVNode("i", {
  6302. "style": style,
  6303. "class": bem31("indicator", {
  6304. active
  6305. })
  6306. }, null);
  6307. };
  6308. const renderIndicator = () => {
  6309. if (slots.indicator) {
  6310. return slots.indicator({
  6311. active: activeIndicator.value,
  6312. total: count.value
  6313. });
  6314. }
  6315. if (props.showIndicators && count.value > 1) {
  6316. return createVNode("div", {
  6317. "class": bem31("indicators", {
  6318. vertical: props.vertical
  6319. })
  6320. }, [Array(count.value).fill("").map(renderDot)]);
  6321. }
  6322. };
  6323. useExpose({
  6324. prev,
  6325. next,
  6326. state,
  6327. resize,
  6328. swipeTo
  6329. });
  6330. linkChildren({
  6331. size,
  6332. props,
  6333. count,
  6334. activeIndicator
  6335. });
  6336. watch(() => props.initialSwipe, (value) => initialize(+value));
  6337. watch(count, () => initialize(state.active));
  6338. watch(() => props.autoplay, autoplay);
  6339. watch([windowWidth, windowHeight], resize);
  6340. watch(usePageVisibility(), (visible) => {
  6341. if (visible === "visible") {
  6342. autoplay();
  6343. } else {
  6344. stopAutoplay();
  6345. }
  6346. });
  6347. onMounted(initialize);
  6348. onActivated(() => initialize(state.active));
  6349. onPopupReopen(() => initialize(state.active));
  6350. onDeactivated(stopAutoplay);
  6351. onBeforeUnmount(stopAutoplay);
  6352. useEventListener("touchmove", onTouchMove, {
  6353. target: track
  6354. });
  6355. return () => {
  6356. var _a;
  6357. return createVNode("div", {
  6358. "ref": root,
  6359. "class": bem31()
  6360. }, [createVNode("div", {
  6361. "ref": track,
  6362. "style": trackStyle.value,
  6363. "class": bem31("track", {
  6364. vertical: props.vertical
  6365. }),
  6366. "onTouchstartPassive": onTouchStart,
  6367. "onTouchend": onTouchEnd,
  6368. "onTouchcancel": onTouchEnd
  6369. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), renderIndicator()]);
  6370. };
  6371. }
  6372. });
  6373. // node_modules/vant/es/swipe/index.mjs
  6374. var Swipe = withInstall(stdin_default37);
  6375. // node_modules/vant/es/swipe-item/SwipeItem.mjs
  6376. var [name35, bem32] = createNamespace("swipe-item");
  6377. var stdin_default38 = defineComponent({
  6378. name: name35,
  6379. setup(props, {
  6380. slots
  6381. }) {
  6382. let rendered;
  6383. const state = reactive({
  6384. offset: 0,
  6385. inited: false,
  6386. mounted: false
  6387. });
  6388. const {
  6389. parent,
  6390. index
  6391. } = useParent(SWIPE_KEY);
  6392. if (!parent) {
  6393. if (true) {
  6394. console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
  6395. }
  6396. return;
  6397. }
  6398. const style = computed(() => {
  6399. const style2 = {};
  6400. const {
  6401. vertical
  6402. } = parent.props;
  6403. if (parent.size.value) {
  6404. style2[vertical ? "height" : "width"] = `${parent.size.value}px`;
  6405. }
  6406. if (state.offset) {
  6407. style2.transform = `translate${vertical ? "Y" : "X"}(${state.offset}px)`;
  6408. }
  6409. return style2;
  6410. });
  6411. const shouldRender = computed(() => {
  6412. const {
  6413. loop,
  6414. lazyRender
  6415. } = parent.props;
  6416. if (!lazyRender || rendered) {
  6417. return true;
  6418. }
  6419. if (!state.mounted) {
  6420. return false;
  6421. }
  6422. const active = parent.activeIndicator.value;
  6423. const maxActive = parent.count.value - 1;
  6424. const prevActive = active === 0 && loop ? maxActive : active - 1;
  6425. const nextActive = active === maxActive && loop ? 0 : active + 1;
  6426. rendered = index.value === active || index.value === prevActive || index.value === nextActive;
  6427. return rendered;
  6428. });
  6429. const setOffset = (offset2) => {
  6430. state.offset = offset2;
  6431. };
  6432. onMounted(() => {
  6433. nextTick(() => {
  6434. state.mounted = true;
  6435. });
  6436. });
  6437. useExpose({
  6438. setOffset
  6439. });
  6440. return () => {
  6441. var _a;
  6442. return createVNode("div", {
  6443. "class": bem32(),
  6444. "style": style.value
  6445. }, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
  6446. };
  6447. }
  6448. });
  6449. // node_modules/vant/es/swipe-item/index.mjs
  6450. var SwipeItem = withInstall(stdin_default38);
  6451. // node_modules/vant/es/tabs/utils.mjs
  6452. function scrollLeftTo(scroller, to, duration) {
  6453. let count = 0;
  6454. const from = scroller.scrollLeft;
  6455. const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
  6456. function animate() {
  6457. scroller.scrollLeft += (to - from) / frames;
  6458. if (++count < frames) {
  6459. raf(animate);
  6460. }
  6461. }
  6462. animate();
  6463. }
  6464. function scrollTopTo(scroller, to, duration, callback) {
  6465. let current2 = getScrollTop(scroller);
  6466. const isDown = current2 < to;
  6467. const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
  6468. const step = (to - current2) / frames;
  6469. function animate() {
  6470. current2 += step;
  6471. if (isDown && current2 > to || !isDown && current2 < to) {
  6472. current2 = to;
  6473. }
  6474. setScrollTop(scroller, current2);
  6475. if (isDown && current2 < to || !isDown && current2 > to) {
  6476. raf(animate);
  6477. } else if (callback) {
  6478. raf(callback);
  6479. }
  6480. }
  6481. animate();
  6482. }
  6483. // node_modules/vant/es/tabs/TabsTitle.mjs
  6484. var [name36, bem33] = createNamespace("tab");
  6485. var stdin_default39 = defineComponent({
  6486. name: name36,
  6487. props: {
  6488. id: String,
  6489. dot: Boolean,
  6490. type: String,
  6491. color: String,
  6492. title: String,
  6493. badge: numericProp,
  6494. shrink: Boolean,
  6495. isActive: Boolean,
  6496. disabled: Boolean,
  6497. controls: String,
  6498. scrollable: Boolean,
  6499. activeColor: String,
  6500. inactiveColor: String,
  6501. showZeroBadge: truthProp
  6502. },
  6503. setup(props, {
  6504. slots
  6505. }) {
  6506. const style = computed(() => {
  6507. const style2 = {};
  6508. const {
  6509. type,
  6510. color,
  6511. disabled,
  6512. isActive,
  6513. activeColor,
  6514. inactiveColor
  6515. } = props;
  6516. const isCard = type === "card";
  6517. if (color && isCard) {
  6518. style2.borderColor = color;
  6519. if (!disabled) {
  6520. if (isActive) {
  6521. style2.backgroundColor = color;
  6522. } else {
  6523. style2.color = color;
  6524. }
  6525. }
  6526. }
  6527. const titleColor = isActive ? activeColor : inactiveColor;
  6528. if (titleColor) {
  6529. style2.color = titleColor;
  6530. }
  6531. return style2;
  6532. });
  6533. const renderText = () => {
  6534. const Text2 = createVNode("span", {
  6535. "class": bem33("text", {
  6536. ellipsis: !props.scrollable
  6537. })
  6538. }, [slots.title ? slots.title() : props.title]);
  6539. if (props.dot || isDef(props.badge) && props.badge !== "") {
  6540. return createVNode(Badge, {
  6541. "dot": props.dot,
  6542. "content": props.badge,
  6543. "showZero": props.showZeroBadge
  6544. }, {
  6545. default: () => [Text2]
  6546. });
  6547. }
  6548. return Text2;
  6549. };
  6550. return () => createVNode("div", {
  6551. "id": props.id,
  6552. "role": "tab",
  6553. "class": [bem33([props.type, {
  6554. grow: props.scrollable && !props.shrink,
  6555. shrink: props.shrink,
  6556. active: props.isActive,
  6557. disabled: props.disabled
  6558. }])],
  6559. "style": style.value,
  6560. "tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
  6561. "aria-selected": props.isActive,
  6562. "aria-disabled": props.disabled || void 0,
  6563. "aria-controls": props.controls
  6564. }, [renderText()]);
  6565. }
  6566. });
  6567. // node_modules/vant/es/tabs/TabsContent.mjs
  6568. var [name37, bem34] = createNamespace("tabs");
  6569. var stdin_default40 = defineComponent({
  6570. name: name37,
  6571. props: {
  6572. count: makeRequiredProp(Number),
  6573. inited: Boolean,
  6574. animated: Boolean,
  6575. duration: makeRequiredProp(numericProp),
  6576. swipeable: Boolean,
  6577. lazyRender: Boolean,
  6578. currentIndex: makeRequiredProp(Number)
  6579. },
  6580. emits: ["change"],
  6581. setup(props, {
  6582. emit,
  6583. slots
  6584. }) {
  6585. const swipeRef = ref();
  6586. const onChange = (index) => emit("change", index);
  6587. const renderChildren = () => {
  6588. var _a;
  6589. const Content = (_a = slots.default) == null ? void 0 : _a.call(slots);
  6590. if (props.animated || props.swipeable) {
  6591. return createVNode(Swipe, {
  6592. "ref": swipeRef,
  6593. "loop": false,
  6594. "class": bem34("track"),
  6595. "duration": +props.duration * 1e3,
  6596. "touchable": props.swipeable,
  6597. "lazyRender": props.lazyRender,
  6598. "showIndicators": false,
  6599. "onChange": onChange
  6600. }, {
  6601. default: () => [Content]
  6602. });
  6603. }
  6604. return Content;
  6605. };
  6606. const swipeToCurrentTab = (index) => {
  6607. const swipe = swipeRef.value;
  6608. if (swipe && swipe.state.active !== index) {
  6609. swipe.swipeTo(index, {
  6610. immediate: !props.inited
  6611. });
  6612. }
  6613. };
  6614. watch(() => props.currentIndex, swipeToCurrentTab);
  6615. onMounted(() => {
  6616. swipeToCurrentTab(props.currentIndex);
  6617. });
  6618. useExpose({
  6619. swipeRef
  6620. });
  6621. return () => createVNode("div", {
  6622. "class": bem34("content", {
  6623. animated: props.animated || props.swipeable
  6624. })
  6625. }, [renderChildren()]);
  6626. }
  6627. });
  6628. // node_modules/vant/es/tabs/Tabs.mjs
  6629. var [name38, bem35] = createNamespace("tabs");
  6630. var tabsProps = {
  6631. type: makeStringProp("line"),
  6632. color: String,
  6633. border: Boolean,
  6634. sticky: Boolean,
  6635. shrink: Boolean,
  6636. active: makeNumericProp(0),
  6637. duration: makeNumericProp(0.3),
  6638. animated: Boolean,
  6639. ellipsis: truthProp,
  6640. swipeable: Boolean,
  6641. scrollspy: Boolean,
  6642. offsetTop: makeNumericProp(0),
  6643. background: String,
  6644. lazyRender: truthProp,
  6645. lineWidth: numericProp,
  6646. lineHeight: numericProp,
  6647. beforeChange: Function,
  6648. swipeThreshold: makeNumericProp(5),
  6649. titleActiveColor: String,
  6650. titleInactiveColor: String
  6651. };
  6652. var TABS_KEY = Symbol(name38);
  6653. var stdin_default41 = defineComponent({
  6654. name: name38,
  6655. props: tabsProps,
  6656. emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active"],
  6657. setup(props, {
  6658. emit,
  6659. slots
  6660. }) {
  6661. var _a, _b;
  6662. if (true) {
  6663. const props2 = (_b = (_a = getCurrentInstance()) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props;
  6664. if (props2 && "onClick" in props2) {
  6665. console.warn('[Vant] Tabs: "click" event is deprecated, using "click-tab" instead.');
  6666. }
  6667. if (props2 && "onDisabled" in props2) {
  6668. console.warn('[Vant] Tabs: "disabled" event is deprecated, using "click-tab" instead.');
  6669. }
  6670. }
  6671. let tabHeight;
  6672. let lockScroll;
  6673. let stickyFixed;
  6674. const root = ref();
  6675. const navRef = ref();
  6676. const wrapRef = ref();
  6677. const contentRef = ref();
  6678. const id = useId();
  6679. const scroller = useScrollParent(root);
  6680. const [titleRefs, setTitleRefs] = useRefs();
  6681. const {
  6682. children,
  6683. linkChildren
  6684. } = useChildren(TABS_KEY);
  6685. const state = reactive({
  6686. inited: false,
  6687. position: "",
  6688. lineStyle: {},
  6689. currentIndex: -1
  6690. });
  6691. const scrollable = computed(() => children.length > props.swipeThreshold || !props.ellipsis || props.shrink);
  6692. const navStyle = computed(() => ({
  6693. borderColor: props.color,
  6694. background: props.background
  6695. }));
  6696. const getTabName = (tab, index) => {
  6697. var _a2;
  6698. return (_a2 = tab.name) != null ? _a2 : index;
  6699. };
  6700. const currentName = computed(() => {
  6701. const activeTab = children[state.currentIndex];
  6702. if (activeTab) {
  6703. return getTabName(activeTab, state.currentIndex);
  6704. }
  6705. });
  6706. const offsetTopPx = computed(() => unitToPx(props.offsetTop));
  6707. const scrollOffset = computed(() => {
  6708. if (props.sticky) {
  6709. return offsetTopPx.value + tabHeight;
  6710. }
  6711. return 0;
  6712. });
  6713. const scrollIntoView = (immediate) => {
  6714. const nav = navRef.value;
  6715. const titles = titleRefs.value;
  6716. if (!scrollable.value || !nav || !titles || !titles[state.currentIndex]) {
  6717. return;
  6718. }
  6719. const title = titles[state.currentIndex].$el;
  6720. const to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;
  6721. scrollLeftTo(nav, to, immediate ? 0 : +props.duration);
  6722. };
  6723. const setLine = () => {
  6724. const shouldAnimate = state.inited;
  6725. nextTick(() => {
  6726. const titles = titleRefs.value;
  6727. if (!titles || !titles[state.currentIndex] || props.type !== "line" || isHidden(root.value)) {
  6728. return;
  6729. }
  6730. const title = titles[state.currentIndex].$el;
  6731. const {
  6732. lineWidth,
  6733. lineHeight
  6734. } = props;
  6735. const left2 = title.offsetLeft + title.offsetWidth / 2;
  6736. const lineStyle = {
  6737. width: addUnit(lineWidth),
  6738. backgroundColor: props.color,
  6739. transform: `translateX(${left2}px) translateX(-50%)`
  6740. };
  6741. if (shouldAnimate) {
  6742. lineStyle.transitionDuration = `${props.duration}s`;
  6743. }
  6744. if (isDef(lineHeight)) {
  6745. const height2 = addUnit(lineHeight);
  6746. lineStyle.height = height2;
  6747. lineStyle.borderRadius = height2;
  6748. }
  6749. state.lineStyle = lineStyle;
  6750. });
  6751. };
  6752. const findAvailableTab = (index) => {
  6753. const diff = index < state.currentIndex ? -1 : 1;
  6754. while (index >= 0 && index < children.length) {
  6755. if (!children[index].disabled) {
  6756. return index;
  6757. }
  6758. index += diff;
  6759. }
  6760. };
  6761. const setCurrentIndex = (currentIndex, skipScrollIntoView) => {
  6762. const newIndex = findAvailableTab(currentIndex);
  6763. if (!isDef(newIndex)) {
  6764. return;
  6765. }
  6766. const newTab = children[newIndex];
  6767. const newName = getTabName(newTab, newIndex);
  6768. const shouldEmitChange = state.currentIndex !== null;
  6769. if (state.currentIndex !== newIndex) {
  6770. state.currentIndex = newIndex;
  6771. if (!skipScrollIntoView) {
  6772. scrollIntoView();
  6773. }
  6774. setLine();
  6775. }
  6776. if (newName !== props.active) {
  6777. emit("update:active", newName);
  6778. if (shouldEmitChange) {
  6779. emit("change", newName, newTab.title);
  6780. }
  6781. }
  6782. if (stickyFixed && !props.scrollspy) {
  6783. setRootScrollTop(Math.ceil(getElementTop(root.value) - offsetTopPx.value));
  6784. }
  6785. };
  6786. const setCurrentIndexByName = (name210, skipScrollIntoView) => {
  6787. const matched = children.find((tab, index2) => getTabName(tab, index2) === name210);
  6788. const index = matched ? children.indexOf(matched) : 0;
  6789. setCurrentIndex(index, skipScrollIntoView);
  6790. };
  6791. const scrollToCurrentContent = (immediate = false) => {
  6792. if (props.scrollspy) {
  6793. const target = children[state.currentIndex].$el;
  6794. if (target && scroller.value) {
  6795. const to = getElementTop(target, scroller.value) - scrollOffset.value;
  6796. lockScroll = true;
  6797. scrollTopTo(scroller.value, to, immediate ? 0 : +props.duration, () => {
  6798. lockScroll = false;
  6799. });
  6800. }
  6801. }
  6802. };
  6803. const onClickTab = (item, index, event) => {
  6804. const {
  6805. title,
  6806. disabled
  6807. } = children[index];
  6808. const name210 = getTabName(children[index], index);
  6809. if (disabled) {
  6810. emit("disabled", name210, title);
  6811. } else {
  6812. callInterceptor(props.beforeChange, {
  6813. args: [name210],
  6814. done: () => {
  6815. setCurrentIndex(index);
  6816. scrollToCurrentContent();
  6817. }
  6818. });
  6819. emit("click", name210, title);
  6820. route(item);
  6821. }
  6822. emit("click-tab", {
  6823. name: name210,
  6824. title,
  6825. event,
  6826. disabled
  6827. });
  6828. };
  6829. const onStickyScroll = (params) => {
  6830. stickyFixed = params.isFixed;
  6831. emit("scroll", params);
  6832. };
  6833. const scrollTo = (name210) => {
  6834. nextTick(() => {
  6835. setCurrentIndexByName(name210);
  6836. scrollToCurrentContent(true);
  6837. });
  6838. };
  6839. const getCurrentIndexOnScroll = () => {
  6840. for (let index = 0; index < children.length; index++) {
  6841. const {
  6842. top: top2
  6843. } = useRect(children[index].$el);
  6844. if (top2 > scrollOffset.value) {
  6845. return index === 0 ? 0 : index - 1;
  6846. }
  6847. }
  6848. return children.length - 1;
  6849. };
  6850. const onScroll = () => {
  6851. if (props.scrollspy && !lockScroll) {
  6852. const index = getCurrentIndexOnScroll();
  6853. setCurrentIndex(index);
  6854. }
  6855. };
  6856. const renderNav = () => children.map((item, index) => createVNode(stdin_default39, mergeProps({
  6857. "key": item.id,
  6858. "id": `${id}-${index}`,
  6859. "ref": setTitleRefs(index),
  6860. "type": props.type,
  6861. "color": props.color,
  6862. "style": item.titleStyle,
  6863. "class": item.titleClass,
  6864. "shrink": props.shrink,
  6865. "isActive": index === state.currentIndex,
  6866. "controls": item.id,
  6867. "scrollable": scrollable.value,
  6868. "activeColor": props.titleActiveColor,
  6869. "inactiveColor": props.titleInactiveColor,
  6870. "onClick": (event) => onClickTab(item, index, event)
  6871. }, pick(item, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
  6872. title: item.$slots.title
  6873. }));
  6874. const renderLine = () => {
  6875. if (props.type === "line" && children.length) {
  6876. return createVNode("div", {
  6877. "class": bem35("line"),
  6878. "style": state.lineStyle
  6879. }, null);
  6880. }
  6881. };
  6882. const renderHeader = () => {
  6883. var _a2, _b2, _c;
  6884. const {
  6885. type,
  6886. border,
  6887. sticky
  6888. } = props;
  6889. const Header = [createVNode("div", {
  6890. "ref": sticky ? void 0 : wrapRef,
  6891. "class": [bem35("wrap"), {
  6892. [BORDER_TOP_BOTTOM]: type === "line" && border
  6893. }]
  6894. }, [createVNode("div", {
  6895. "ref": navRef,
  6896. "role": "tablist",
  6897. "class": bem35("nav", [type, {
  6898. shrink: props.shrink,
  6899. complete: scrollable.value
  6900. }]),
  6901. "style": navStyle.value,
  6902. "aria-orientation": "horizontal"
  6903. }, [(_a2 = slots["nav-left"]) == null ? void 0 : _a2.call(slots), renderNav(), renderLine(), (_b2 = slots["nav-right"]) == null ? void 0 : _b2.call(slots)])]), (_c = slots["nav-bottom"]) == null ? void 0 : _c.call(slots)];
  6904. if (sticky) {
  6905. return createVNode("div", {
  6906. "ref": wrapRef
  6907. }, [Header]);
  6908. }
  6909. return Header;
  6910. };
  6911. watch([() => props.color, windowWidth], setLine);
  6912. watch(() => props.active, (value) => {
  6913. if (value !== currentName.value) {
  6914. setCurrentIndexByName(value);
  6915. }
  6916. });
  6917. watch(() => children.length, () => {
  6918. if (state.inited) {
  6919. setCurrentIndexByName(props.active);
  6920. setLine();
  6921. nextTick(() => {
  6922. scrollIntoView(true);
  6923. });
  6924. }
  6925. });
  6926. const init = () => {
  6927. setCurrentIndexByName(props.active, true);
  6928. nextTick(() => {
  6929. state.inited = true;
  6930. if (wrapRef.value) {
  6931. tabHeight = useRect(wrapRef.value).height;
  6932. }
  6933. scrollIntoView(true);
  6934. });
  6935. };
  6936. const onRendered = (name210, title) => emit("rendered", name210, title);
  6937. const resize = () => {
  6938. setLine();
  6939. nextTick(() => {
  6940. var _a2, _b2;
  6941. return (_b2 = (_a2 = contentRef.value) == null ? void 0 : _a2.swipeRef.value) == null ? void 0 : _b2.resize();
  6942. });
  6943. };
  6944. useExpose({
  6945. resize,
  6946. scrollTo
  6947. });
  6948. onActivated(setLine);
  6949. onPopupReopen(setLine);
  6950. onMountedOrActivated(init);
  6951. useEventListener("scroll", onScroll, {
  6952. target: scroller,
  6953. passive: true
  6954. });
  6955. linkChildren({
  6956. id,
  6957. props,
  6958. setLine,
  6959. onRendered,
  6960. currentName,
  6961. scrollIntoView
  6962. });
  6963. return () => createVNode("div", {
  6964. "ref": root,
  6965. "class": bem35([props.type])
  6966. }, [props.sticky ? createVNode(Sticky, {
  6967. "container": root.value,
  6968. "offsetTop": offsetTopPx.value,
  6969. "onScroll": onStickyScroll
  6970. }, {
  6971. default: () => [renderHeader()]
  6972. }) : renderHeader(), createVNode(stdin_default40, {
  6973. "ref": contentRef,
  6974. "count": children.length,
  6975. "inited": state.inited,
  6976. "animated": props.animated,
  6977. "duration": props.duration,
  6978. "swipeable": props.swipeable,
  6979. "lazyRender": props.lazyRender,
  6980. "currentIndex": state.currentIndex,
  6981. "onChange": setCurrentIndex
  6982. }, {
  6983. default: () => {
  6984. var _a2;
  6985. return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
  6986. }
  6987. })]);
  6988. }
  6989. });
  6990. // node_modules/vant/es/composables/use-tab-status.mjs
  6991. var TAB_STATUS_KEY = Symbol();
  6992. var useTabStatus = () => inject(TAB_STATUS_KEY, null);
  6993. // node_modules/vant/es/tab/Tab.mjs
  6994. var [name39, bem36] = createNamespace("tab");
  6995. var tabProps = extend({}, routeProps, {
  6996. dot: Boolean,
  6997. name: numericProp,
  6998. badge: numericProp,
  6999. title: String,
  7000. disabled: Boolean,
  7001. titleClass: unknownProp,
  7002. titleStyle: [String, Object],
  7003. showZeroBadge: truthProp
  7004. });
  7005. var stdin_default42 = defineComponent({
  7006. name: name39,
  7007. props: tabProps,
  7008. setup(props, {
  7009. slots
  7010. }) {
  7011. const id = useId();
  7012. const inited = ref(false);
  7013. const {
  7014. parent,
  7015. index
  7016. } = useParent(TABS_KEY);
  7017. if (!parent) {
  7018. if (true) {
  7019. console.error("[Vant] <Tab> must be a child component of <Tabs>.");
  7020. }
  7021. return;
  7022. }
  7023. const getName = () => {
  7024. var _a;
  7025. return (_a = props.name) != null ? _a : index.value;
  7026. };
  7027. const init = () => {
  7028. inited.value = true;
  7029. if (parent.props.lazyRender) {
  7030. nextTick(() => {
  7031. parent.onRendered(getName(), props.title);
  7032. });
  7033. }
  7034. };
  7035. const active = computed(() => {
  7036. const isActive = getName() === parent.currentName.value;
  7037. if (isActive && !inited.value) {
  7038. init();
  7039. }
  7040. return isActive;
  7041. });
  7042. const hasInactiveClass = ref(!active.value);
  7043. watch(active, (val) => {
  7044. if (val) {
  7045. hasInactiveClass.value = false;
  7046. } else {
  7047. doubleRaf(() => {
  7048. hasInactiveClass.value = true;
  7049. });
  7050. }
  7051. });
  7052. watch(() => props.title, () => {
  7053. parent.setLine();
  7054. parent.scrollIntoView();
  7055. });
  7056. provide(TAB_STATUS_KEY, active);
  7057. return () => {
  7058. var _a;
  7059. const label = `${parent.id}-${index.value}`;
  7060. const {
  7061. animated,
  7062. swipeable,
  7063. scrollspy,
  7064. lazyRender
  7065. } = parent.props;
  7066. if (!slots.default && !animated) {
  7067. return;
  7068. }
  7069. const show = scrollspy || active.value;
  7070. if (animated || swipeable) {
  7071. return createVNode(SwipeItem, {
  7072. "id": id,
  7073. "role": "tabpanel",
  7074. "class": bem36("panel-wrapper", {
  7075. inactive: hasInactiveClass.value
  7076. }),
  7077. "tabindex": active.value ? 0 : -1,
  7078. "aria-hidden": !active.value,
  7079. "aria-labelledby": label
  7080. }, {
  7081. default: () => {
  7082. var _a2;
  7083. return [createVNode("div", {
  7084. "class": bem36("panel")
  7085. }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
  7086. }
  7087. });
  7088. }
  7089. const shouldRender = inited.value || scrollspy || !lazyRender;
  7090. const Content = shouldRender ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null;
  7091. useExpose({
  7092. id
  7093. });
  7094. return withDirectives(createVNode("div", {
  7095. "id": id,
  7096. "role": "tabpanel",
  7097. "class": bem36("panel"),
  7098. "tabindex": show ? 0 : -1,
  7099. "aria-labelledby": label
  7100. }, [Content]), [[vShow, show]]);
  7101. };
  7102. }
  7103. });
  7104. // node_modules/vant/es/tab/index.mjs
  7105. var Tab = withInstall(stdin_default42);
  7106. // node_modules/vant/es/tabs/index.mjs
  7107. var Tabs = withInstall(stdin_default41);
  7108. // node_modules/vant/es/cascader/Cascader.mjs
  7109. var [name40, bem37, t6] = createNamespace("cascader");
  7110. var cascaderProps = {
  7111. title: String,
  7112. options: makeArrayProp(),
  7113. closeable: truthProp,
  7114. swipeable: truthProp,
  7115. closeIcon: makeStringProp("cross"),
  7116. showHeader: truthProp,
  7117. modelValue: numericProp,
  7118. fieldNames: Object,
  7119. placeholder: String,
  7120. activeColor: String
  7121. };
  7122. var stdin_default43 = defineComponent({
  7123. name: name40,
  7124. props: cascaderProps,
  7125. emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
  7126. setup(props, {
  7127. slots,
  7128. emit
  7129. }) {
  7130. const tabs = ref([]);
  7131. const activeTab = ref(0);
  7132. const {
  7133. text: textKey,
  7134. value: valueKey,
  7135. children: childrenKey
  7136. } = extend({
  7137. text: "text",
  7138. value: "value",
  7139. children: "children"
  7140. }, props.fieldNames);
  7141. const getSelectedOptionsByValue = (options, value) => {
  7142. for (const option of options) {
  7143. if (option[valueKey] === value) {
  7144. return [option];
  7145. }
  7146. if (option[childrenKey]) {
  7147. const selectedOptions = getSelectedOptionsByValue(option[childrenKey], value);
  7148. if (selectedOptions) {
  7149. return [option, ...selectedOptions];
  7150. }
  7151. }
  7152. }
  7153. };
  7154. const updateTabs = () => {
  7155. const {
  7156. options,
  7157. modelValue
  7158. } = props;
  7159. if (modelValue !== void 0) {
  7160. const selectedOptions = getSelectedOptionsByValue(options, modelValue);
  7161. if (selectedOptions) {
  7162. let optionsCursor = options;
  7163. tabs.value = selectedOptions.map((option) => {
  7164. const tab = {
  7165. options: optionsCursor,
  7166. selected: option
  7167. };
  7168. const next = optionsCursor.find((item) => item[valueKey] === option[valueKey]);
  7169. if (next) {
  7170. optionsCursor = next[childrenKey];
  7171. }
  7172. return tab;
  7173. });
  7174. if (optionsCursor) {
  7175. tabs.value.push({
  7176. options: optionsCursor,
  7177. selected: null
  7178. });
  7179. }
  7180. nextTick(() => {
  7181. activeTab.value = tabs.value.length - 1;
  7182. });
  7183. return;
  7184. }
  7185. }
  7186. tabs.value = [{
  7187. options,
  7188. selected: null
  7189. }];
  7190. };
  7191. const onSelect = (option, tabIndex) => {
  7192. if (option.disabled) {
  7193. return;
  7194. }
  7195. tabs.value[tabIndex].selected = option;
  7196. if (tabs.value.length > tabIndex + 1) {
  7197. tabs.value = tabs.value.slice(0, tabIndex + 1);
  7198. }
  7199. if (option[childrenKey]) {
  7200. const nextTab = {
  7201. options: option[childrenKey],
  7202. selected: null
  7203. };
  7204. if (tabs.value[tabIndex + 1]) {
  7205. tabs.value[tabIndex + 1] = nextTab;
  7206. } else {
  7207. tabs.value.push(nextTab);
  7208. }
  7209. nextTick(() => {
  7210. activeTab.value++;
  7211. });
  7212. }
  7213. const selectedOptions = tabs.value.map((tab) => tab.selected).filter(Boolean);
  7214. emit("update:modelValue", option[valueKey]);
  7215. const params = {
  7216. value: option[valueKey],
  7217. tabIndex,
  7218. selectedOptions
  7219. };
  7220. emit("change", params);
  7221. if (!option[childrenKey]) {
  7222. emit("finish", params);
  7223. }
  7224. };
  7225. const onClose = () => emit("close");
  7226. const onClickTab = ({
  7227. name: name210,
  7228. title
  7229. }) => emit("click-tab", name210, title);
  7230. const renderHeader = () => props.showHeader ? createVNode("div", {
  7231. "class": bem37("header")
  7232. }, [createVNode("h2", {
  7233. "class": bem37("title")
  7234. }, [slots.title ? slots.title() : props.title]), props.closeable ? createVNode(Icon, {
  7235. "name": props.closeIcon,
  7236. "class": [bem37("close-icon"), HAPTICS_FEEDBACK],
  7237. "onClick": onClose
  7238. }, null) : null]) : null;
  7239. const renderOption = (option, selectedOption, tabIndex) => {
  7240. const {
  7241. disabled
  7242. } = option;
  7243. const selected = !!(selectedOption && option[valueKey] === selectedOption[valueKey]);
  7244. const color = option.color || (selected ? props.activeColor : void 0);
  7245. const Text2 = slots.option ? slots.option({
  7246. option,
  7247. selected
  7248. }) : createVNode("span", null, [option[textKey]]);
  7249. return createVNode("li", {
  7250. "role": "menuitemradio",
  7251. "class": [bem37("option", {
  7252. selected,
  7253. disabled
  7254. }), option.className],
  7255. "style": {
  7256. color
  7257. },
  7258. "tabindex": disabled ? void 0 : selected ? 0 : -1,
  7259. "aria-checked": selected,
  7260. "aria-disabled": disabled || void 0,
  7261. "onClick": () => onSelect(option, tabIndex)
  7262. }, [Text2, selected ? createVNode(Icon, {
  7263. "name": "success",
  7264. "class": bem37("selected-icon")
  7265. }, null) : null]);
  7266. };
  7267. const renderOptions = (options, selectedOption, tabIndex) => createVNode("ul", {
  7268. "role": "menu",
  7269. "class": bem37("options")
  7270. }, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
  7271. const renderTab = (tab, tabIndex) => {
  7272. const {
  7273. options,
  7274. selected
  7275. } = tab;
  7276. const placeholder = props.placeholder || t6("select");
  7277. const title = selected ? selected[textKey] : placeholder;
  7278. return createVNode(Tab, {
  7279. "title": title,
  7280. "titleClass": bem37("tab", {
  7281. unselected: !selected
  7282. })
  7283. }, {
  7284. default: () => {
  7285. var _a, _b;
  7286. return [(_a = slots["options-top"]) == null ? void 0 : _a.call(slots, {
  7287. tabIndex
  7288. }), renderOptions(options, selected, tabIndex), (_b = slots["options-bottom"]) == null ? void 0 : _b.call(slots, {
  7289. tabIndex
  7290. })];
  7291. }
  7292. });
  7293. };
  7294. const renderTabs = () => createVNode(Tabs, {
  7295. "active": activeTab.value,
  7296. "onUpdate:active": ($event) => activeTab.value = $event,
  7297. "shrink": true,
  7298. "animated": true,
  7299. "class": bem37("tabs"),
  7300. "color": props.activeColor,
  7301. "swipeable": props.swipeable,
  7302. "onClick-tab": onClickTab
  7303. }, {
  7304. default: () => [tabs.value.map(renderTab)]
  7305. });
  7306. updateTabs();
  7307. watch(() => props.options, updateTabs, {
  7308. deep: true
  7309. });
  7310. watch(() => props.modelValue, (value) => {
  7311. if (value !== void 0) {
  7312. const values = tabs.value.map((tab) => {
  7313. var _a;
  7314. return (_a = tab.selected) == null ? void 0 : _a[valueKey];
  7315. });
  7316. if (values.includes(value)) {
  7317. return;
  7318. }
  7319. }
  7320. updateTabs();
  7321. });
  7322. return () => createVNode("div", {
  7323. "class": bem37()
  7324. }, [renderHeader(), renderTabs()]);
  7325. }
  7326. });
  7327. // node_modules/vant/es/cascader/index.mjs
  7328. var Cascader = withInstall(stdin_default43);
  7329. // node_modules/vant/es/cell-group/CellGroup.mjs
  7330. var [name41, bem38] = createNamespace("cell-group");
  7331. var cellGroupProps = {
  7332. title: String,
  7333. inset: Boolean,
  7334. border: truthProp
  7335. };
  7336. var stdin_default44 = defineComponent({
  7337. name: name41,
  7338. inheritAttrs: false,
  7339. props: cellGroupProps,
  7340. setup(props, {
  7341. slots,
  7342. attrs
  7343. }) {
  7344. const renderGroup = () => {
  7345. var _a;
  7346. return createVNode("div", mergeProps({
  7347. "class": [bem38({
  7348. inset: props.inset
  7349. }), {
  7350. [BORDER_TOP_BOTTOM]: props.border && !props.inset
  7351. }]
  7352. }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  7353. };
  7354. const renderTitle = () => createVNode("div", {
  7355. "class": bem38("title", {
  7356. inset: props.inset
  7357. })
  7358. }, [slots.title ? slots.title() : props.title]);
  7359. return () => {
  7360. if (props.title || slots.title) {
  7361. return createVNode(Fragment, null, [renderTitle(), renderGroup()]);
  7362. }
  7363. return renderGroup();
  7364. };
  7365. }
  7366. });
  7367. // node_modules/vant/es/cell-group/index.mjs
  7368. var CellGroup = withInstall(stdin_default44);
  7369. // node_modules/vant/es/checkbox-group/CheckboxGroup.mjs
  7370. var [name42, bem39] = createNamespace("checkbox-group");
  7371. var checkboxGroupProps = {
  7372. max: numericProp,
  7373. disabled: Boolean,
  7374. iconSize: numericProp,
  7375. direction: String,
  7376. modelValue: makeArrayProp(),
  7377. checkedColor: String
  7378. };
  7379. var CHECKBOX_GROUP_KEY = Symbol(name42);
  7380. var stdin_default45 = defineComponent({
  7381. name: name42,
  7382. props: checkboxGroupProps,
  7383. emits: ["change", "update:modelValue"],
  7384. setup(props, {
  7385. emit,
  7386. slots
  7387. }) {
  7388. const {
  7389. children,
  7390. linkChildren
  7391. } = useChildren(CHECKBOX_GROUP_KEY);
  7392. const updateValue = (value) => emit("update:modelValue", value);
  7393. const toggleAll = (options = {}) => {
  7394. if (typeof options === "boolean") {
  7395. options = {
  7396. checked: options
  7397. };
  7398. }
  7399. const {
  7400. checked,
  7401. skipDisabled
  7402. } = options;
  7403. const checkedChildren = children.filter((item) => {
  7404. if (!item.props.bindGroup) {
  7405. return false;
  7406. }
  7407. if (item.props.disabled && skipDisabled) {
  7408. return item.checked.value;
  7409. }
  7410. return checked != null ? checked : !item.checked.value;
  7411. });
  7412. const names = checkedChildren.map((item) => item.name);
  7413. updateValue(names);
  7414. };
  7415. watch(() => props.modelValue, (value) => emit("change", value));
  7416. useExpose({
  7417. toggleAll
  7418. });
  7419. useCustomFieldValue(() => props.modelValue);
  7420. linkChildren({
  7421. props,
  7422. updateValue
  7423. });
  7424. return () => {
  7425. var _a;
  7426. return createVNode("div", {
  7427. "class": bem39([props.direction])
  7428. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  7429. };
  7430. }
  7431. });
  7432. // node_modules/vant/es/checkbox/Checkbox.mjs
  7433. var [name43, bem40] = createNamespace("checkbox");
  7434. var checkboxProps = extend({}, checkerProps, {
  7435. bindGroup: truthProp
  7436. });
  7437. var stdin_default46 = defineComponent({
  7438. name: name43,
  7439. props: checkboxProps,
  7440. emits: ["change", "update:modelValue"],
  7441. setup(props, {
  7442. emit,
  7443. slots
  7444. }) {
  7445. const {
  7446. parent
  7447. } = useParent(CHECKBOX_GROUP_KEY);
  7448. const setParentValue = (checked2) => {
  7449. const {
  7450. name: name210
  7451. } = props;
  7452. const {
  7453. max,
  7454. modelValue
  7455. } = parent.props;
  7456. const value = modelValue.slice();
  7457. if (checked2) {
  7458. const overlimit = max && value.length >= max;
  7459. if (!overlimit && !value.includes(name210)) {
  7460. value.push(name210);
  7461. if (props.bindGroup) {
  7462. parent.updateValue(value);
  7463. }
  7464. }
  7465. } else {
  7466. const index = value.indexOf(name210);
  7467. if (index !== -1) {
  7468. value.splice(index, 1);
  7469. if (props.bindGroup) {
  7470. parent.updateValue(value);
  7471. }
  7472. }
  7473. }
  7474. };
  7475. const checked = computed(() => {
  7476. if (parent && props.bindGroup) {
  7477. return parent.props.modelValue.indexOf(props.name) !== -1;
  7478. }
  7479. return !!props.modelValue;
  7480. });
  7481. const toggle = (newValue = !checked.value) => {
  7482. if (parent && props.bindGroup) {
  7483. setParentValue(newValue);
  7484. } else {
  7485. emit("update:modelValue", newValue);
  7486. }
  7487. };
  7488. watch(() => props.modelValue, (value) => emit("change", value));
  7489. useExpose({
  7490. toggle,
  7491. props,
  7492. checked
  7493. });
  7494. useCustomFieldValue(() => props.modelValue);
  7495. return () => createVNode(stdin_default26, mergeProps({
  7496. "bem": bem40,
  7497. "role": "checkbox",
  7498. "parent": parent,
  7499. "checked": checked.value,
  7500. "onToggle": toggle
  7501. }, props), pick(slots, ["default", "icon"]));
  7502. }
  7503. });
  7504. // node_modules/vant/es/checkbox/index.mjs
  7505. var Checkbox = withInstall(stdin_default46);
  7506. // node_modules/vant/es/checkbox-group/index.mjs
  7507. var CheckboxGroup = withInstall(stdin_default45);
  7508. // node_modules/vant/es/circle/Circle.mjs
  7509. var [name44, bem41] = createNamespace("circle");
  7510. var uid = 0;
  7511. var format = (rate) => Math.min(Math.max(+rate, 0), 100);
  7512. function getPath(clockwise, viewBoxSize) {
  7513. const sweepFlag = clockwise ? 1 : 0;
  7514. return `M ${viewBoxSize / 2} ${viewBoxSize / 2} m 0, -500 a 500, 500 0 1, ${sweepFlag} 0, 1000 a 500, 500 0 1, ${sweepFlag} 0, -1000`;
  7515. }
  7516. var circleProps = {
  7517. text: String,
  7518. size: numericProp,
  7519. fill: makeStringProp("none"),
  7520. rate: makeNumericProp(100),
  7521. speed: makeNumericProp(0),
  7522. color: [String, Object],
  7523. clockwise: truthProp,
  7524. layerColor: String,
  7525. currentRate: makeNumberProp(0),
  7526. strokeWidth: makeNumericProp(40),
  7527. strokeLinecap: String,
  7528. startPosition: makeStringProp("top")
  7529. };
  7530. var stdin_default47 = defineComponent({
  7531. name: name44,
  7532. props: circleProps,
  7533. emits: ["update:currentRate"],
  7534. setup(props, {
  7535. emit,
  7536. slots
  7537. }) {
  7538. const id = `van-circle-${uid++}`;
  7539. const viewBoxSize = computed(() => +props.strokeWidth + 1e3);
  7540. const path = computed(() => getPath(props.clockwise, viewBoxSize.value));
  7541. const svgStyle = computed(() => {
  7542. const ROTATE_ANGLE_MAP = {
  7543. top: 0,
  7544. right: 90,
  7545. bottom: 180,
  7546. left: 270
  7547. };
  7548. const angleValue = ROTATE_ANGLE_MAP[props.startPosition];
  7549. if (angleValue) {
  7550. return {
  7551. transform: `rotate(${angleValue}deg)`
  7552. };
  7553. }
  7554. });
  7555. watch(() => props.rate, (rate) => {
  7556. let rafId;
  7557. const startTime = Date.now();
  7558. const startRate = props.currentRate;
  7559. const endRate = format(rate);
  7560. const duration = Math.abs((startRate - endRate) * 1e3 / +props.speed);
  7561. const animate = () => {
  7562. const now = Date.now();
  7563. const progress = Math.min((now - startTime) / duration, 1);
  7564. const rate2 = progress * (endRate - startRate) + startRate;
  7565. emit("update:currentRate", format(parseFloat(rate2.toFixed(1))));
  7566. if (endRate > startRate ? rate2 < endRate : rate2 > endRate) {
  7567. rafId = raf(animate);
  7568. }
  7569. };
  7570. if (props.speed) {
  7571. if (rafId) {
  7572. cancelRaf(rafId);
  7573. }
  7574. rafId = raf(animate);
  7575. } else {
  7576. emit("update:currentRate", endRate);
  7577. }
  7578. }, {
  7579. immediate: true
  7580. });
  7581. const renderHover = () => {
  7582. const PERIMETER = 3140;
  7583. const {
  7584. strokeWidth,
  7585. currentRate,
  7586. strokeLinecap
  7587. } = props;
  7588. const offset2 = PERIMETER * currentRate / 100;
  7589. const color = isObject(props.color) ? `url(#${id})` : props.color;
  7590. const style = {
  7591. stroke: color,
  7592. strokeWidth: `${+strokeWidth + 1}px`,
  7593. strokeLinecap,
  7594. strokeDasharray: `${offset2}px ${PERIMETER}px`
  7595. };
  7596. return createVNode("path", {
  7597. "d": path.value,
  7598. "style": style,
  7599. "class": bem41("hover"),
  7600. "stroke": color
  7601. }, null);
  7602. };
  7603. const renderLayer = () => {
  7604. const style = {
  7605. fill: props.fill,
  7606. stroke: props.layerColor,
  7607. strokeWidth: `${props.strokeWidth}px`
  7608. };
  7609. return createVNode("path", {
  7610. "class": bem41("layer"),
  7611. "style": style,
  7612. "d": path.value
  7613. }, null);
  7614. };
  7615. const renderGradient = () => {
  7616. const {
  7617. color
  7618. } = props;
  7619. if (!isObject(color)) {
  7620. return;
  7621. }
  7622. const Stops = Object.keys(color).sort((a, b) => parseFloat(a) - parseFloat(b)).map((key, index) => createVNode("stop", {
  7623. "key": index,
  7624. "offset": key,
  7625. "stop-color": color[key]
  7626. }, null));
  7627. return createVNode("defs", null, [createVNode("linearGradient", {
  7628. "id": id,
  7629. "x1": "100%",
  7630. "y1": "0%",
  7631. "x2": "0%",
  7632. "y2": "0%"
  7633. }, [Stops])]);
  7634. };
  7635. const renderText = () => {
  7636. if (slots.default) {
  7637. return slots.default();
  7638. }
  7639. if (props.text) {
  7640. return createVNode("div", {
  7641. "class": bem41("text")
  7642. }, [props.text]);
  7643. }
  7644. };
  7645. return () => createVNode("div", {
  7646. "class": bem41(),
  7647. "style": getSizeStyle(props.size)
  7648. }, [createVNode("svg", {
  7649. "viewBox": `0 0 ${viewBoxSize.value} ${viewBoxSize.value}`,
  7650. "style": svgStyle.value
  7651. }, [renderGradient(), renderLayer(), renderHover()]), renderText()]);
  7652. }
  7653. });
  7654. // node_modules/vant/es/circle/index.mjs
  7655. var Circle = withInstall(stdin_default47);
  7656. // node_modules/vant/es/row/Row.mjs
  7657. var [name45, bem42] = createNamespace("row");
  7658. var ROW_KEY = Symbol(name45);
  7659. var rowProps = {
  7660. tag: makeStringProp("div"),
  7661. wrap: truthProp,
  7662. align: String,
  7663. gutter: makeNumericProp(0),
  7664. justify: String
  7665. };
  7666. var stdin_default48 = defineComponent({
  7667. name: name45,
  7668. props: rowProps,
  7669. setup(props, {
  7670. slots
  7671. }) {
  7672. const {
  7673. children,
  7674. linkChildren
  7675. } = useChildren(ROW_KEY);
  7676. const groups = computed(() => {
  7677. const groups2 = [[]];
  7678. let totalSpan = 0;
  7679. children.forEach((child, index) => {
  7680. totalSpan += Number(child.span);
  7681. if (totalSpan > 24) {
  7682. groups2.push([index]);
  7683. totalSpan -= 24;
  7684. } else {
  7685. groups2[groups2.length - 1].push(index);
  7686. }
  7687. });
  7688. return groups2;
  7689. });
  7690. const spaces = computed(() => {
  7691. const gutter = Number(props.gutter);
  7692. const spaces2 = [];
  7693. if (!gutter) {
  7694. return spaces2;
  7695. }
  7696. groups.value.forEach((group) => {
  7697. const averagePadding = gutter * (group.length - 1) / group.length;
  7698. group.forEach((item, index) => {
  7699. if (index === 0) {
  7700. spaces2.push({
  7701. right: averagePadding
  7702. });
  7703. } else {
  7704. const left2 = gutter - spaces2[item - 1].right;
  7705. const right2 = averagePadding - left2;
  7706. spaces2.push({
  7707. left: left2,
  7708. right: right2
  7709. });
  7710. }
  7711. });
  7712. });
  7713. return spaces2;
  7714. });
  7715. linkChildren({
  7716. spaces
  7717. });
  7718. return () => {
  7719. const {
  7720. tag,
  7721. wrap,
  7722. align,
  7723. justify
  7724. } = props;
  7725. return createVNode(tag, {
  7726. "class": bem42({
  7727. [`align-${align}`]: align,
  7728. [`justify-${justify}`]: justify,
  7729. nowrap: !wrap
  7730. })
  7731. }, {
  7732. default: () => {
  7733. var _a;
  7734. return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
  7735. }
  7736. });
  7737. };
  7738. }
  7739. });
  7740. // node_modules/vant/es/col/Col.mjs
  7741. var [name46, bem43] = createNamespace("col");
  7742. var colProps = {
  7743. tag: makeStringProp("div"),
  7744. span: makeNumericProp(0),
  7745. offset: numericProp
  7746. };
  7747. var stdin_default49 = defineComponent({
  7748. name: name46,
  7749. props: colProps,
  7750. setup(props, {
  7751. slots
  7752. }) {
  7753. const {
  7754. parent,
  7755. index
  7756. } = useParent(ROW_KEY);
  7757. const style = computed(() => {
  7758. if (!parent) {
  7759. return;
  7760. }
  7761. const {
  7762. spaces
  7763. } = parent;
  7764. if (spaces && spaces.value && spaces.value[index.value]) {
  7765. const {
  7766. left: left2,
  7767. right: right2
  7768. } = spaces.value[index.value];
  7769. return {
  7770. paddingLeft: left2 ? `${left2}px` : null,
  7771. paddingRight: right2 ? `${right2}px` : null
  7772. };
  7773. }
  7774. });
  7775. return () => {
  7776. const {
  7777. tag,
  7778. span,
  7779. offset: offset2
  7780. } = props;
  7781. return createVNode(tag, {
  7782. "style": style.value,
  7783. "class": bem43({
  7784. [span]: span,
  7785. [`offset-${offset2}`]: offset2
  7786. })
  7787. }, {
  7788. default: () => {
  7789. var _a;
  7790. return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
  7791. }
  7792. });
  7793. };
  7794. }
  7795. });
  7796. // node_modules/vant/es/col/index.mjs
  7797. var Col = withInstall(stdin_default49);
  7798. // node_modules/vant/es/collapse/Collapse.mjs
  7799. var [name47, bem44] = createNamespace("collapse");
  7800. var COLLAPSE_KEY = Symbol(name47);
  7801. var collapseProps = {
  7802. border: truthProp,
  7803. accordion: Boolean,
  7804. modelValue: {
  7805. type: [String, Number, Array],
  7806. default: ""
  7807. }
  7808. };
  7809. function validateModelValue(modelValue, accordion) {
  7810. if (accordion && Array.isArray(modelValue)) {
  7811. console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode');
  7812. return false;
  7813. }
  7814. if (!accordion && !Array.isArray(modelValue)) {
  7815. console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode');
  7816. return false;
  7817. }
  7818. return true;
  7819. }
  7820. var stdin_default50 = defineComponent({
  7821. name: name47,
  7822. props: collapseProps,
  7823. emits: ["change", "update:modelValue"],
  7824. setup(props, {
  7825. emit,
  7826. slots
  7827. }) {
  7828. const {
  7829. linkChildren,
  7830. children
  7831. } = useChildren(COLLAPSE_KEY);
  7832. const updateName = (name210) => {
  7833. emit("change", name210);
  7834. emit("update:modelValue", name210);
  7835. };
  7836. const toggle = (name210, expanded) => {
  7837. const {
  7838. accordion,
  7839. modelValue
  7840. } = props;
  7841. if (accordion) {
  7842. updateName(name210 === modelValue ? "" : name210);
  7843. } else if (expanded) {
  7844. updateName(modelValue.concat(name210));
  7845. } else {
  7846. updateName(modelValue.filter((activeName) => activeName !== name210));
  7847. }
  7848. };
  7849. const toggleAll = (options = {}) => {
  7850. if (props.accordion) {
  7851. return;
  7852. }
  7853. if (typeof options === "boolean") {
  7854. options = {
  7855. expanded: options
  7856. };
  7857. }
  7858. const {
  7859. expanded,
  7860. skipDisabled
  7861. } = options;
  7862. const expandedChildren = children.filter((item) => {
  7863. if (item.disabled && skipDisabled) {
  7864. return item.expanded.value;
  7865. }
  7866. return expanded != null ? expanded : !item.expanded.value;
  7867. });
  7868. const names = expandedChildren.map((item) => item.itemName.value);
  7869. updateName(names);
  7870. };
  7871. const isExpanded = (name210) => {
  7872. const {
  7873. accordion,
  7874. modelValue
  7875. } = props;
  7876. if (!validateModelValue(modelValue, accordion)) {
  7877. return false;
  7878. }
  7879. return accordion ? modelValue === name210 : modelValue.includes(name210);
  7880. };
  7881. useExpose({
  7882. toggleAll
  7883. });
  7884. linkChildren({
  7885. toggle,
  7886. isExpanded
  7887. });
  7888. return () => {
  7889. var _a;
  7890. return createVNode("div", {
  7891. "class": [bem44(), {
  7892. [BORDER_TOP_BOTTOM]: props.border
  7893. }]
  7894. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  7895. };
  7896. }
  7897. });
  7898. // node_modules/vant/es/collapse/index.mjs
  7899. var Collapse = withInstall(stdin_default50);
  7900. // node_modules/vant/es/collapse-item/CollapseItem.mjs
  7901. var [name48, bem45] = createNamespace("collapse-item");
  7902. var CELL_SLOTS = ["icon", "title", "value", "label", "right-icon"];
  7903. var collapseItemProps = extend({}, cellSharedProps, {
  7904. name: numericProp,
  7905. isLink: truthProp,
  7906. disabled: Boolean,
  7907. readonly: Boolean,
  7908. lazyRender: truthProp
  7909. });
  7910. var stdin_default51 = defineComponent({
  7911. name: name48,
  7912. props: collapseItemProps,
  7913. setup(props, {
  7914. slots
  7915. }) {
  7916. const wrapperRef = ref();
  7917. const contentRef = ref();
  7918. const {
  7919. parent,
  7920. index
  7921. } = useParent(COLLAPSE_KEY);
  7922. if (!parent) {
  7923. if (true) {
  7924. console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
  7925. }
  7926. return;
  7927. }
  7928. const name210 = computed(() => {
  7929. var _a;
  7930. return (_a = props.name) != null ? _a : index.value;
  7931. });
  7932. const expanded = computed(() => parent.isExpanded(name210.value));
  7933. const show = ref(expanded.value);
  7934. const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
  7935. const onTransitionEnd = () => {
  7936. if (!expanded.value) {
  7937. show.value = false;
  7938. } else if (wrapperRef.value) {
  7939. wrapperRef.value.style.height = "";
  7940. }
  7941. };
  7942. watch(expanded, (value, oldValue) => {
  7943. if (oldValue === null) {
  7944. return;
  7945. }
  7946. if (value) {
  7947. show.value = true;
  7948. }
  7949. const tick = value ? nextTick : raf;
  7950. tick(() => {
  7951. if (!contentRef.value || !wrapperRef.value) {
  7952. return;
  7953. }
  7954. const {
  7955. offsetHeight
  7956. } = contentRef.value;
  7957. if (offsetHeight) {
  7958. const contentHeight = `${offsetHeight}px`;
  7959. wrapperRef.value.style.height = value ? "0" : contentHeight;
  7960. doubleRaf(() => {
  7961. if (wrapperRef.value) {
  7962. wrapperRef.value.style.height = value ? contentHeight : "0";
  7963. }
  7964. });
  7965. } else {
  7966. onTransitionEnd();
  7967. }
  7968. });
  7969. });
  7970. const toggle = (newValue = !expanded.value) => {
  7971. parent.toggle(name210.value, newValue);
  7972. };
  7973. const onClickTitle = () => {
  7974. if (!props.disabled && !props.readonly) {
  7975. toggle();
  7976. }
  7977. };
  7978. const renderTitle = () => {
  7979. const {
  7980. border,
  7981. disabled,
  7982. readonly
  7983. } = props;
  7984. const attrs = pick(props, Object.keys(cellSharedProps));
  7985. if (readonly) {
  7986. attrs.isLink = false;
  7987. }
  7988. if (disabled || readonly) {
  7989. attrs.clickable = false;
  7990. }
  7991. return createVNode(Cell, mergeProps({
  7992. "role": "button",
  7993. "class": bem45("title", {
  7994. disabled,
  7995. expanded: expanded.value,
  7996. borderless: !border
  7997. }),
  7998. "aria-expanded": String(expanded.value),
  7999. "onClick": onClickTitle
  8000. }, attrs), pick(slots, CELL_SLOTS));
  8001. };
  8002. const renderContent = lazyRender(() => {
  8003. var _a;
  8004. return withDirectives(createVNode("div", {
  8005. "ref": wrapperRef,
  8006. "class": bem45("wrapper"),
  8007. "onTransitionend": onTransitionEnd
  8008. }, [createVNode("div", {
  8009. "ref": contentRef,
  8010. "class": bem45("content")
  8011. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), [[vShow, show.value]]);
  8012. });
  8013. useExpose({
  8014. toggle,
  8015. expanded,
  8016. itemName: name210
  8017. });
  8018. return () => createVNode("div", {
  8019. "class": [bem45({
  8020. border: index.value && props.border
  8021. })]
  8022. }, [renderTitle(), renderContent()]);
  8023. }
  8024. });
  8025. // node_modules/vant/es/collapse-item/index.mjs
  8026. var CollapseItem = withInstall(stdin_default51);
  8027. // node_modules/vant/es/config-provider/index.mjs
  8028. var ConfigProvider = withInstall(stdin_default5);
  8029. // node_modules/vant/es/contact-card/ContactCard.mjs
  8030. var [name49, bem46, t7] = createNamespace("contact-card");
  8031. var contactCardProps = {
  8032. tel: String,
  8033. name: String,
  8034. type: makeStringProp("add"),
  8035. addText: String,
  8036. editable: truthProp
  8037. };
  8038. var stdin_default52 = defineComponent({
  8039. name: name49,
  8040. props: contactCardProps,
  8041. emits: ["click"],
  8042. setup(props, {
  8043. emit
  8044. }) {
  8045. const onClick = (event) => {
  8046. if (props.editable) {
  8047. emit("click", event);
  8048. }
  8049. };
  8050. const renderContent = () => {
  8051. if (props.type === "add") {
  8052. return props.addText || t7("addContact");
  8053. }
  8054. return [createVNode("div", null, [`${t7("name")}\uFF1A${props.name}`]), createVNode("div", null, [`${t7("tel")}\uFF1A${props.tel}`])];
  8055. };
  8056. return () => createVNode(Cell, {
  8057. "center": true,
  8058. "icon": props.type === "edit" ? "contact" : "add-square",
  8059. "class": bem46([props.type]),
  8060. "border": false,
  8061. "isLink": props.editable,
  8062. "valueClass": bem46("value"),
  8063. "onClick": onClick
  8064. }, {
  8065. value: renderContent
  8066. });
  8067. }
  8068. });
  8069. // node_modules/vant/es/contact-card/index.mjs
  8070. var ContactCard = withInstall(stdin_default52);
  8071. // node_modules/vant/es/contact-edit/ContactEdit.mjs
  8072. var [name50, bem47, t8] = createNamespace("contact-edit");
  8073. var DEFAULT_CONTACT = {
  8074. tel: "",
  8075. name: ""
  8076. };
  8077. var contactEditProps = {
  8078. isEdit: Boolean,
  8079. isSaving: Boolean,
  8080. isDeleting: Boolean,
  8081. showSetDefault: Boolean,
  8082. setDefaultLabel: String,
  8083. contactInfo: {
  8084. type: Object,
  8085. default: () => extend({}, DEFAULT_CONTACT)
  8086. },
  8087. telValidator: {
  8088. type: Function,
  8089. default: isMobile
  8090. }
  8091. };
  8092. var stdin_default53 = defineComponent({
  8093. name: name50,
  8094. props: contactEditProps,
  8095. emits: ["save", "delete", "change-default"],
  8096. setup(props, {
  8097. emit
  8098. }) {
  8099. const contact = reactive(extend({}, DEFAULT_CONTACT, props.contactInfo));
  8100. const onSave = () => {
  8101. if (!props.isSaving) {
  8102. emit("save", contact);
  8103. }
  8104. };
  8105. const onDelete = () => emit("delete", contact);
  8106. const renderButtons = () => createVNode("div", {
  8107. "class": bem47("buttons")
  8108. }, [createVNode(Button, {
  8109. "block": true,
  8110. "round": true,
  8111. "type": "danger",
  8112. "text": t8("save"),
  8113. "class": bem47("button"),
  8114. "loading": props.isSaving,
  8115. "nativeType": "submit"
  8116. }, null), props.isEdit && createVNode(Button, {
  8117. "block": true,
  8118. "round": true,
  8119. "text": t8("delete"),
  8120. "class": bem47("button"),
  8121. "loading": props.isDeleting,
  8122. "onClick": onDelete
  8123. }, null)]);
  8124. const renderSwitch = () => createVNode(Switch, {
  8125. "modelValue": contact.isDefault,
  8126. "onUpdate:modelValue": ($event) => contact.isDefault = $event,
  8127. "size": 24,
  8128. "onChange": (checked) => emit("change-default", checked)
  8129. }, null);
  8130. const renderSetDefault = () => {
  8131. if (props.showSetDefault) {
  8132. return createVNode(Cell, {
  8133. "title": props.setDefaultLabel,
  8134. "class": bem47("switch-cell"),
  8135. "border": false
  8136. }, {
  8137. "right-icon": renderSwitch
  8138. });
  8139. }
  8140. };
  8141. watch(() => props.contactInfo, (value) => extend(contact, DEFAULT_CONTACT, value));
  8142. return () => createVNode(Form, {
  8143. "class": bem47(),
  8144. "onSubmit": onSave
  8145. }, {
  8146. default: () => [createVNode("div", {
  8147. "class": bem47("fields")
  8148. }, [createVNode(Field, {
  8149. "modelValue": contact.name,
  8150. "onUpdate:modelValue": ($event) => contact.name = $event,
  8151. "clearable": true,
  8152. "label": t8("name"),
  8153. "rules": [{
  8154. required: true,
  8155. message: t8("nameEmpty")
  8156. }],
  8157. "maxlength": "30",
  8158. "placeholder": t8("name")
  8159. }, null), createVNode(Field, {
  8160. "modelValue": contact.tel,
  8161. "onUpdate:modelValue": ($event) => contact.tel = $event,
  8162. "clearable": true,
  8163. "type": "tel",
  8164. "label": t8("tel"),
  8165. "rules": [{
  8166. validator: props.telValidator,
  8167. message: t8("telInvalid")
  8168. }],
  8169. "placeholder": t8("tel")
  8170. }, null)]), renderSetDefault(), renderButtons()]
  8171. });
  8172. }
  8173. });
  8174. // node_modules/vant/es/contact-edit/index.mjs
  8175. var ContactEdit = withInstall(stdin_default53);
  8176. // node_modules/vant/es/contact-list/ContactList.mjs
  8177. var [name51, bem48, t9] = createNamespace("contact-list");
  8178. var contactListProps = {
  8179. list: Array,
  8180. addText: String,
  8181. modelValue: unknownProp,
  8182. defaultTagText: String
  8183. };
  8184. var stdin_default54 = defineComponent({
  8185. name: name51,
  8186. props: contactListProps,
  8187. emits: ["add", "edit", "select", "update:modelValue"],
  8188. setup(props, {
  8189. emit
  8190. }) {
  8191. const renderItem = (item, index) => {
  8192. const onClick = () => {
  8193. emit("update:modelValue", item.id);
  8194. emit("select", item, index);
  8195. };
  8196. const renderRightIcon = () => createVNode(Radio, {
  8197. "class": bem48("radio"),
  8198. "name": item.id,
  8199. "iconSize": 16
  8200. }, null);
  8201. const renderEditIcon = () => createVNode(Icon, {
  8202. "name": "edit",
  8203. "class": bem48("edit"),
  8204. "onClick": (event) => {
  8205. event.stopPropagation();
  8206. emit("edit", item, index);
  8207. }
  8208. }, null);
  8209. const renderContent = () => {
  8210. const nodes = [`${item.name}\uFF0C${item.tel}`];
  8211. if (item.isDefault && props.defaultTagText) {
  8212. nodes.push(createVNode(Tag, {
  8213. "type": "danger",
  8214. "round": true,
  8215. "class": bem48("item-tag")
  8216. }, {
  8217. default: () => [props.defaultTagText]
  8218. }));
  8219. }
  8220. return nodes;
  8221. };
  8222. return createVNode(Cell, {
  8223. "key": item.id,
  8224. "isLink": true,
  8225. "center": true,
  8226. "class": bem48("item"),
  8227. "valueClass": bem48("item-value"),
  8228. "onClick": onClick
  8229. }, {
  8230. icon: renderEditIcon,
  8231. value: renderContent,
  8232. "right-icon": renderRightIcon
  8233. });
  8234. };
  8235. return () => createVNode("div", {
  8236. "class": bem48()
  8237. }, [createVNode(RadioGroup, {
  8238. "modelValue": props.modelValue,
  8239. "class": bem48("group")
  8240. }, {
  8241. default: () => [props.list && props.list.map(renderItem)]
  8242. }), createVNode("div", {
  8243. "class": [bem48("bottom"), "van-safe-area-bottom"]
  8244. }, [createVNode(Button, {
  8245. "round": true,
  8246. "block": true,
  8247. "type": "danger",
  8248. "class": bem48("add"),
  8249. "text": props.addText || t9("addContact"),
  8250. "onClick": () => emit("add")
  8251. }, null)])]);
  8252. }
  8253. });
  8254. // node_modules/vant/es/contact-list/index.mjs
  8255. var ContactList = withInstall(stdin_default54);
  8256. // node_modules/vant/es/count-down/utils.mjs
  8257. function parseFormat(format3, currentTime) {
  8258. const { days } = currentTime;
  8259. let { hours, minutes, seconds, milliseconds } = currentTime;
  8260. if (format3.includes("DD")) {
  8261. format3 = format3.replace("DD", padZero(days));
  8262. } else {
  8263. hours += days * 24;
  8264. }
  8265. if (format3.includes("HH")) {
  8266. format3 = format3.replace("HH", padZero(hours));
  8267. } else {
  8268. minutes += hours * 60;
  8269. }
  8270. if (format3.includes("mm")) {
  8271. format3 = format3.replace("mm", padZero(minutes));
  8272. } else {
  8273. seconds += minutes * 60;
  8274. }
  8275. if (format3.includes("ss")) {
  8276. format3 = format3.replace("ss", padZero(seconds));
  8277. } else {
  8278. milliseconds += seconds * 1e3;
  8279. }
  8280. if (format3.includes("S")) {
  8281. const ms = padZero(milliseconds, 3);
  8282. if (format3.includes("SSS")) {
  8283. format3 = format3.replace("SSS", ms);
  8284. } else if (format3.includes("SS")) {
  8285. format3 = format3.replace("SS", ms.slice(0, 2));
  8286. } else {
  8287. format3 = format3.replace("S", ms.charAt(0));
  8288. }
  8289. }
  8290. return format3;
  8291. }
  8292. // node_modules/vant/es/count-down/CountDown.mjs
  8293. var [name52, bem49] = createNamespace("count-down");
  8294. var countDownProps = {
  8295. time: makeNumericProp(0),
  8296. format: makeStringProp("HH:mm:ss"),
  8297. autoStart: truthProp,
  8298. millisecond: Boolean
  8299. };
  8300. var stdin_default55 = defineComponent({
  8301. name: name52,
  8302. props: countDownProps,
  8303. emits: ["change", "finish"],
  8304. setup(props, {
  8305. emit,
  8306. slots
  8307. }) {
  8308. const {
  8309. start: start2,
  8310. pause,
  8311. reset,
  8312. current: current2
  8313. } = useCountDown({
  8314. time: +props.time,
  8315. millisecond: props.millisecond,
  8316. onChange: (current22) => emit("change", current22),
  8317. onFinish: () => emit("finish")
  8318. });
  8319. const timeText = computed(() => parseFormat(props.format, current2.value));
  8320. const resetTime = () => {
  8321. reset(+props.time);
  8322. if (props.autoStart) {
  8323. start2();
  8324. }
  8325. };
  8326. watch(() => props.time, resetTime, {
  8327. immediate: true
  8328. });
  8329. useExpose({
  8330. start: start2,
  8331. pause,
  8332. reset: resetTime
  8333. });
  8334. return () => createVNode("div", {
  8335. "role": "timer",
  8336. "class": bem49()
  8337. }, [slots.default ? slots.default(current2.value) : timeText.value]);
  8338. }
  8339. });
  8340. // node_modules/vant/es/count-down/index.mjs
  8341. var CountDown = withInstall(stdin_default55);
  8342. // node_modules/vant/es/coupon/utils.mjs
  8343. function getDate(timeStamp) {
  8344. const date = new Date(timeStamp * 1e3);
  8345. return `${date.getFullYear()}.${padZero(date.getMonth() + 1)}.${padZero(
  8346. date.getDate()
  8347. )}`;
  8348. }
  8349. var formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
  8350. var formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
  8351. // node_modules/vant/es/coupon/Coupon.mjs
  8352. var [name53, bem50, t10] = createNamespace("coupon");
  8353. var stdin_default56 = defineComponent({
  8354. name: name53,
  8355. props: {
  8356. chosen: Boolean,
  8357. coupon: makeRequiredProp(Object),
  8358. disabled: Boolean,
  8359. currency: makeStringProp("\xA5")
  8360. },
  8361. setup(props) {
  8362. const validPeriod = computed(() => {
  8363. const {
  8364. startAt,
  8365. endAt
  8366. } = props.coupon;
  8367. return `${getDate(startAt)} - ${getDate(endAt)}`;
  8368. });
  8369. const faceAmount = computed(() => {
  8370. const {
  8371. coupon,
  8372. currency
  8373. } = props;
  8374. if (coupon.valueDesc) {
  8375. return [coupon.valueDesc, createVNode("span", null, [coupon.unitDesc || ""])];
  8376. }
  8377. if (coupon.denominations) {
  8378. const denominations = formatAmount(coupon.denominations);
  8379. return [createVNode("span", null, [currency]), ` ${denominations}`];
  8380. }
  8381. if (coupon.discount) {
  8382. return t10("discount", formatDiscount(coupon.discount));
  8383. }
  8384. return "";
  8385. });
  8386. const conditionMessage = computed(() => {
  8387. const condition = formatAmount(props.coupon.originCondition || 0);
  8388. return condition === "0" ? t10("unlimited") : t10("condition", condition);
  8389. });
  8390. return () => {
  8391. const {
  8392. chosen,
  8393. coupon,
  8394. disabled
  8395. } = props;
  8396. const description = disabled && coupon.reason || coupon.description;
  8397. return createVNode("div", {
  8398. "class": bem50({
  8399. disabled
  8400. })
  8401. }, [createVNode("div", {
  8402. "class": bem50("content")
  8403. }, [createVNode("div", {
  8404. "class": bem50("head")
  8405. }, [createVNode("h2", {
  8406. "class": bem50("amount")
  8407. }, [faceAmount.value]), createVNode("p", {
  8408. "class": bem50("condition")
  8409. }, [coupon.condition || conditionMessage.value])]), createVNode("div", {
  8410. "class": bem50("body")
  8411. }, [createVNode("p", {
  8412. "class": bem50("name")
  8413. }, [coupon.name]), createVNode("p", {
  8414. "class": bem50("valid")
  8415. }, [validPeriod.value]), !disabled && createVNode(Checkbox, {
  8416. "class": bem50("corner"),
  8417. "modelValue": chosen
  8418. }, null)])]), description && createVNode("p", {
  8419. "class": bem50("description")
  8420. }, [description])]);
  8421. };
  8422. }
  8423. });
  8424. // node_modules/vant/es/coupon/index.mjs
  8425. var Coupon = withInstall(stdin_default56);
  8426. // node_modules/vant/es/coupon-cell/CouponCell.mjs
  8427. var [name54, bem51, t11] = createNamespace("coupon-cell");
  8428. var couponCellProps = {
  8429. title: String,
  8430. border: truthProp,
  8431. editable: truthProp,
  8432. coupons: makeArrayProp(),
  8433. currency: makeStringProp("\xA5"),
  8434. chosenCoupon: makeNumericProp(-1)
  8435. };
  8436. function formatValue({
  8437. coupons,
  8438. chosenCoupon,
  8439. currency
  8440. }) {
  8441. const coupon = coupons[+chosenCoupon];
  8442. if (coupon) {
  8443. let value = 0;
  8444. if (isDef(coupon.value)) {
  8445. ({
  8446. value
  8447. } = coupon);
  8448. } else if (isDef(coupon.denominations)) {
  8449. value = coupon.denominations;
  8450. }
  8451. return `-${currency} ${(value / 100).toFixed(2)}`;
  8452. }
  8453. return coupons.length === 0 ? t11("noCoupon") : t11("count", coupons.length);
  8454. }
  8455. var stdin_default57 = defineComponent({
  8456. name: name54,
  8457. props: couponCellProps,
  8458. setup(props) {
  8459. return () => {
  8460. const selected = props.coupons[+props.chosenCoupon];
  8461. return createVNode(Cell, {
  8462. "class": bem51(),
  8463. "value": formatValue(props),
  8464. "title": props.title || t11("title"),
  8465. "border": props.border,
  8466. "isLink": props.editable,
  8467. "valueClass": bem51("value", {
  8468. selected
  8469. })
  8470. }, null);
  8471. };
  8472. }
  8473. });
  8474. // node_modules/vant/es/coupon-cell/index.mjs
  8475. var CouponCell = withInstall(stdin_default57);
  8476. // node_modules/vant/es/empty/Empty.mjs
  8477. var [name55, bem52] = createNamespace("empty");
  8478. var emptyProps = {
  8479. image: makeStringProp("default"),
  8480. imageSize: [Number, String, Array],
  8481. description: String
  8482. };
  8483. var stdin_default58 = defineComponent({
  8484. name: name55,
  8485. props: emptyProps,
  8486. setup(props, {
  8487. slots
  8488. }) {
  8489. const renderDescription = () => {
  8490. const description = slots.description ? slots.description() : props.description;
  8491. if (description) {
  8492. return createVNode("p", {
  8493. "class": bem52("description")
  8494. }, [description]);
  8495. }
  8496. };
  8497. const renderBottom = () => {
  8498. if (slots.default) {
  8499. return createVNode("div", {
  8500. "class": bem52("bottom")
  8501. }, [slots.default()]);
  8502. }
  8503. };
  8504. const baseId = useId();
  8505. const getId = (num) => `${baseId}-${num}`;
  8506. const getUrlById = (num) => `url(#${getId(num)})`;
  8507. const renderStop = (color, offset2, opacity) => createVNode("stop", {
  8508. "stop-color": color,
  8509. "offset": `${offset2}%`,
  8510. "stop-opacity": opacity
  8511. }, null);
  8512. const renderStops = (fromColor, toColor) => [renderStop(fromColor, 0), renderStop(toColor, 100)];
  8513. const renderShadow = (id) => [createVNode("defs", null, [createVNode("radialGradient", {
  8514. "id": getId(id),
  8515. "cx": "50%",
  8516. "cy": "54%",
  8517. "fx": "50%",
  8518. "fy": "54%",
  8519. "r": "297%",
  8520. "gradientTransform": "matrix(-.16 0 0 -.33 .58 .72)"
  8521. }, [renderStop("#EBEDF0", 0), renderStop("#F2F3F5", 100, 0.3)])]), createVNode("ellipse", {
  8522. "fill": getUrlById(id),
  8523. "opacity": ".8",
  8524. "cx": "80",
  8525. "cy": "140",
  8526. "rx": "46",
  8527. "ry": "8"
  8528. }, null)];
  8529. const renderBuilding = () => [createVNode("defs", null, [createVNode("linearGradient", {
  8530. "id": getId("a"),
  8531. "x1": "64%",
  8532. "y1": "100%",
  8533. "x2": "64%"
  8534. }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)])]), createVNode("g", {
  8535. "opacity": ".8"
  8536. }, [createVNode("path", {
  8537. "d": "M36 131V53H16v20H2v58h34z",
  8538. "fill": getUrlById("a")
  8539. }, null), createVNode("path", {
  8540. "d": "M123 15h22v14h9v77h-31V15z",
  8541. "fill": getUrlById("a")
  8542. }, null)])];
  8543. const renderCloud = () => [createVNode("defs", null, [createVNode("linearGradient", {
  8544. "id": getId("b"),
  8545. "x1": "64%",
  8546. "y1": "97%",
  8547. "x2": "64%",
  8548. "y2": "0%"
  8549. }, [renderStop("#F2F3F5", 0, 0.3), renderStop("#F2F3F5", 100)])]), createVNode("g", {
  8550. "opacity": ".8"
  8551. }, [createVNode("path", {
  8552. "d": "M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",
  8553. "fill": getUrlById("b")
  8554. }, null), createVNode("path", {
  8555. "d": "M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",
  8556. "fill": getUrlById("b")
  8557. }, null)])];
  8558. const renderNetwork = () => createVNode("svg", {
  8559. "viewBox": "0 0 160 160"
  8560. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8561. "id": getId(1),
  8562. "x1": "64%",
  8563. "y1": "100%",
  8564. "x2": "64%"
  8565. }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
  8566. "id": getId(2),
  8567. "x1": "50%",
  8568. "x2": "50%",
  8569. "y2": "84%"
  8570. }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
  8571. "id": getId(3),
  8572. "x1": "100%",
  8573. "x2": "100%",
  8574. "y2": "100%"
  8575. }, [renderStops("#EAEDF0", "#DCDEE0")]), createVNode("radialGradient", {
  8576. "id": getId(4),
  8577. "cx": "50%",
  8578. "cy": "0%",
  8579. "fx": "50%",
  8580. "fy": "0%",
  8581. "r": "100%",
  8582. "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
  8583. }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
  8584. "fill": "none"
  8585. }, [renderBuilding(), createVNode("path", {
  8586. "fill": getUrlById(4),
  8587. "d": "M0 139h160v21H0z"
  8588. }, null), createVNode("path", {
  8589. "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
  8590. "fill": getUrlById(2)
  8591. }, null), createVNode("g", {
  8592. "opacity": ".6",
  8593. "stroke-linecap": "round",
  8594. "stroke-width": "7"
  8595. }, [createVNode("path", {
  8596. "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
  8597. "stroke": getUrlById(3)
  8598. }, null), createVNode("path", {
  8599. "d": "M53 36a34 34 0 0 0 0 48",
  8600. "stroke": getUrlById(3)
  8601. }, null), createVNode("path", {
  8602. "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
  8603. "stroke": getUrlById(3)
  8604. }, null), createVNode("path", {
  8605. "d": "M106 84a34 34 0 0 0 0-48",
  8606. "stroke": getUrlById(3)
  8607. }, null)]), createVNode("g", {
  8608. "transform": "translate(31 105)"
  8609. }, [createVNode("rect", {
  8610. "fill": "#EBEDF0",
  8611. "width": "98",
  8612. "height": "34",
  8613. "rx": "2"
  8614. }, null), createVNode("rect", {
  8615. "fill": "#FFF",
  8616. "x": "9",
  8617. "y": "8",
  8618. "width": "80",
  8619. "height": "18",
  8620. "rx": "1.1"
  8621. }, null), createVNode("rect", {
  8622. "fill": "#EBEDF0",
  8623. "x": "15",
  8624. "y": "12",
  8625. "width": "18",
  8626. "height": "6",
  8627. "rx": "1.1"
  8628. }, null)])])]);
  8629. const renderMaterial = () => createVNode("svg", {
  8630. "viewBox": "0 0 160 160"
  8631. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8632. "x1": "50%",
  8633. "x2": "50%",
  8634. "y2": "100%",
  8635. "id": getId(5)
  8636. }, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
  8637. "x1": "95%",
  8638. "y1": "48%",
  8639. "x2": "5.5%",
  8640. "y2": "51%",
  8641. "id": getId(6)
  8642. }, [renderStops("#EAEDF1", "#DCDEE0")]), createVNode("linearGradient", {
  8643. "y1": "45%",
  8644. "x2": "100%",
  8645. "y2": "54%",
  8646. "id": getId(7)
  8647. }, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), createVNode("g", {
  8648. "transform": "translate(36 50)",
  8649. "fill": "none"
  8650. }, [createVNode("g", {
  8651. "transform": "translate(8)"
  8652. }, [createVNode("rect", {
  8653. "fill": "#EBEDF0",
  8654. "opacity": ".6",
  8655. "x": "38",
  8656. "y": "13",
  8657. "width": "36",
  8658. "height": "53",
  8659. "rx": "2"
  8660. }, null), createVNode("rect", {
  8661. "fill": getUrlById(5),
  8662. "width": "64",
  8663. "height": "66",
  8664. "rx": "2"
  8665. }, null), createVNode("rect", {
  8666. "fill": "#FFF",
  8667. "x": "6",
  8668. "y": "6",
  8669. "width": "52",
  8670. "height": "55",
  8671. "rx": "1"
  8672. }, null), createVNode("g", {
  8673. "transform": "translate(15 17)",
  8674. "fill": getUrlById(6)
  8675. }, [createVNode("rect", {
  8676. "width": "34",
  8677. "height": "6",
  8678. "rx": "1"
  8679. }, null), createVNode("path", {
  8680. "d": "M0 14h34v6H0z"
  8681. }, null), createVNode("rect", {
  8682. "y": "28",
  8683. "width": "34",
  8684. "height": "6",
  8685. "rx": "1"
  8686. }, null)])]), createVNode("rect", {
  8687. "fill": getUrlById(7),
  8688. "y": "61",
  8689. "width": "88",
  8690. "height": "28",
  8691. "rx": "1"
  8692. }, null), createVNode("rect", {
  8693. "fill": "#F7F8FA",
  8694. "x": "29",
  8695. "y": "72",
  8696. "width": "30",
  8697. "height": "6",
  8698. "rx": "1"
  8699. }, null)])]);
  8700. const renderError = () => createVNode("svg", {
  8701. "viewBox": "0 0 160 160"
  8702. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8703. "x1": "50%",
  8704. "x2": "50%",
  8705. "y2": "100%",
  8706. "id": getId(8)
  8707. }, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), renderShadow("c"), createVNode("path", {
  8708. "d": "m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",
  8709. "fill": getUrlById(8)
  8710. }, null)]);
  8711. const renderSearch = () => createVNode("svg", {
  8712. "viewBox": "0 0 160 160"
  8713. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8714. "x1": "50%",
  8715. "y1": "100%",
  8716. "x2": "50%",
  8717. "id": getId(9)
  8718. }, [renderStops("#EEE", "#D8D8D8")]), createVNode("linearGradient", {
  8719. "x1": "100%",
  8720. "y1": "50%",
  8721. "y2": "50%",
  8722. "id": getId(10)
  8723. }, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
  8724. "x1": "50%",
  8725. "x2": "50%",
  8726. "y2": "100%",
  8727. "id": getId(11)
  8728. }, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
  8729. "x1": "50%",
  8730. "x2": "50%",
  8731. "y2": "100%",
  8732. "id": getId(12)
  8733. }, [renderStops("#FFF", "#F7F8FA")])]), renderBuilding(), renderCloud(), renderShadow("d"), createVNode("g", {
  8734. "transform": "rotate(-45 113 -4)",
  8735. "fill": "none"
  8736. }, [createVNode("rect", {
  8737. "fill": getUrlById(9),
  8738. "x": "24",
  8739. "y": "52.8",
  8740. "width": "5.8",
  8741. "height": "19",
  8742. "rx": "1"
  8743. }, null), createVNode("rect", {
  8744. "fill": getUrlById(10),
  8745. "x": "22.1",
  8746. "y": "67.3",
  8747. "width": "9.9",
  8748. "height": "28",
  8749. "rx": "1"
  8750. }, null), createVNode("circle", {
  8751. "stroke": getUrlById(11),
  8752. "stroke-width": "8",
  8753. "cx": "27",
  8754. "cy": "27",
  8755. "r": "27"
  8756. }, null), createVNode("circle", {
  8757. "fill": getUrlById(12),
  8758. "cx": "27",
  8759. "cy": "27",
  8760. "r": "16"
  8761. }, null), createVNode("path", {
  8762. "d": "M37 7c-8 0-15 5-16 12",
  8763. "stroke": getUrlById(11),
  8764. "stroke-width": "3",
  8765. "opacity": ".5",
  8766. "stroke-linecap": "round",
  8767. "transform": "rotate(45 29 13)"
  8768. }, null)])]);
  8769. const renderImage = () => {
  8770. var _a;
  8771. if (slots.image) {
  8772. return slots.image();
  8773. }
  8774. const PRESET_IMAGES = {
  8775. error: renderError,
  8776. search: renderSearch,
  8777. network: renderNetwork,
  8778. default: renderMaterial
  8779. };
  8780. return ((_a = PRESET_IMAGES[props.image]) == null ? void 0 : _a.call(PRESET_IMAGES)) || createVNode("img", {
  8781. "src": props.image
  8782. }, null);
  8783. };
  8784. return () => createVNode("div", {
  8785. "class": bem52()
  8786. }, [createVNode("div", {
  8787. "class": bem52("image"),
  8788. "style": getSizeStyle(props.imageSize)
  8789. }, [renderImage()]), renderDescription(), renderBottom()]);
  8790. }
  8791. });
  8792. // node_modules/vant/es/empty/index.mjs
  8793. var Empty = withInstall(stdin_default58);
  8794. // node_modules/vant/es/coupon-list/CouponList.mjs
  8795. var [name56, bem53, t12] = createNamespace("coupon-list");
  8796. var couponListProps = {
  8797. code: makeStringProp(""),
  8798. coupons: makeArrayProp(),
  8799. currency: makeStringProp("\xA5"),
  8800. showCount: truthProp,
  8801. emptyImage: String,
  8802. chosenCoupon: makeNumberProp(-1),
  8803. enabledTitle: String,
  8804. disabledTitle: String,
  8805. disabledCoupons: makeArrayProp(),
  8806. showExchangeBar: truthProp,
  8807. showCloseButton: truthProp,
  8808. closeButtonText: String,
  8809. inputPlaceholder: String,
  8810. exchangeMinLength: makeNumberProp(1),
  8811. exchangeButtonText: String,
  8812. displayedCouponIndex: makeNumberProp(-1),
  8813. exchangeButtonLoading: Boolean,
  8814. exchangeButtonDisabled: Boolean
  8815. };
  8816. var stdin_default59 = defineComponent({
  8817. name: name56,
  8818. props: couponListProps,
  8819. emits: ["change", "exchange", "update:code"],
  8820. setup(props, {
  8821. emit,
  8822. slots
  8823. }) {
  8824. const [couponRefs, setCouponRefs] = useRefs();
  8825. const root = ref();
  8826. const barRef = ref();
  8827. const activeTab = ref(0);
  8828. const listHeight = ref(0);
  8829. const currentCode = ref(props.code);
  8830. const buttonDisabled = computed(() => !props.exchangeButtonLoading && (props.exchangeButtonDisabled || !currentCode.value || currentCode.value.length < props.exchangeMinLength));
  8831. const updateListHeight = () => {
  8832. const TABS_HEIGHT = 44;
  8833. const rootHeight = useRect(root).height;
  8834. const headerHeight = useRect(barRef).height + TABS_HEIGHT;
  8835. listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight.value) - headerHeight;
  8836. };
  8837. const onExchange = () => {
  8838. emit("exchange", currentCode.value);
  8839. if (!props.code) {
  8840. currentCode.value = "";
  8841. }
  8842. };
  8843. const scrollToCoupon = (index) => {
  8844. nextTick(() => {
  8845. var _a;
  8846. return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
  8847. });
  8848. };
  8849. const renderEmpty = () => createVNode(Empty, {
  8850. "image": props.emptyImage
  8851. }, {
  8852. default: () => [createVNode("p", {
  8853. "class": bem53("empty-tip")
  8854. }, [t12("noCoupon")])]
  8855. });
  8856. const renderExchangeBar = () => {
  8857. if (props.showExchangeBar) {
  8858. return createVNode("div", {
  8859. "ref": barRef,
  8860. "class": bem53("exchange-bar")
  8861. }, [createVNode(Field, {
  8862. "modelValue": currentCode.value,
  8863. "onUpdate:modelValue": ($event) => currentCode.value = $event,
  8864. "clearable": true,
  8865. "border": false,
  8866. "class": bem53("field"),
  8867. "placeholder": props.inputPlaceholder || t12("placeholder"),
  8868. "maxlength": "20"
  8869. }, null), createVNode(Button, {
  8870. "plain": true,
  8871. "type": "danger",
  8872. "class": bem53("exchange"),
  8873. "text": props.exchangeButtonText || t12("exchange"),
  8874. "loading": props.exchangeButtonLoading,
  8875. "disabled": buttonDisabled.value,
  8876. "onClick": onExchange
  8877. }, null)]);
  8878. }
  8879. };
  8880. const renderCouponTab = () => {
  8881. const {
  8882. coupons
  8883. } = props;
  8884. const count = props.showCount ? ` (${coupons.length})` : "";
  8885. const title = (props.enabledTitle || t12("enable")) + count;
  8886. return createVNode(Tab, {
  8887. "title": title
  8888. }, {
  8889. default: () => {
  8890. var _a;
  8891. return [createVNode("div", {
  8892. "class": bem53("list", {
  8893. "with-bottom": props.showCloseButton
  8894. }),
  8895. "style": {
  8896. height: `${listHeight.value}px`
  8897. }
  8898. }, [coupons.map((coupon, index) => createVNode(Coupon, {
  8899. "key": coupon.id,
  8900. "ref": setCouponRefs(index),
  8901. "coupon": coupon,
  8902. "chosen": index === props.chosenCoupon,
  8903. "currency": props.currency,
  8904. "onClick": () => emit("change", index)
  8905. }, null)), !coupons.length && renderEmpty(), (_a = slots["list-footer"]) == null ? void 0 : _a.call(slots)])];
  8906. }
  8907. });
  8908. };
  8909. const renderDisabledTab = () => {
  8910. const {
  8911. disabledCoupons
  8912. } = props;
  8913. const count = props.showCount ? ` (${disabledCoupons.length})` : "";
  8914. const title = (props.disabledTitle || t12("disabled")) + count;
  8915. return createVNode(Tab, {
  8916. "title": title
  8917. }, {
  8918. default: () => {
  8919. var _a;
  8920. return [createVNode("div", {
  8921. "class": bem53("list", {
  8922. "with-bottom": props.showCloseButton
  8923. }),
  8924. "style": {
  8925. height: `${listHeight.value}px`
  8926. }
  8927. }, [disabledCoupons.map((coupon) => createVNode(Coupon, {
  8928. "disabled": true,
  8929. "key": coupon.id,
  8930. "coupon": coupon,
  8931. "currency": props.currency
  8932. }, null)), !disabledCoupons.length && renderEmpty(), (_a = slots["disabled-list-footer"]) == null ? void 0 : _a.call(slots)])];
  8933. }
  8934. });
  8935. };
  8936. watch(() => props.code, (value) => {
  8937. currentCode.value = value;
  8938. });
  8939. watch(windowHeight, updateListHeight);
  8940. watch(currentCode, (value) => emit("update:code", value));
  8941. watch(() => props.displayedCouponIndex, scrollToCoupon);
  8942. onMounted(() => {
  8943. updateListHeight();
  8944. scrollToCoupon(props.displayedCouponIndex);
  8945. });
  8946. return () => createVNode("div", {
  8947. "ref": root,
  8948. "class": bem53()
  8949. }, [renderExchangeBar(), createVNode(Tabs, {
  8950. "active": activeTab.value,
  8951. "onUpdate:active": ($event) => activeTab.value = $event,
  8952. "class": bem53("tab")
  8953. }, {
  8954. default: () => [renderCouponTab(), renderDisabledTab()]
  8955. }), createVNode("div", {
  8956. "class": bem53("bottom")
  8957. }, [withDirectives(createVNode(Button, {
  8958. "round": true,
  8959. "block": true,
  8960. "type": "danger",
  8961. "class": bem53("close"),
  8962. "text": props.closeButtonText || t12("close"),
  8963. "onClick": () => emit("change", -1)
  8964. }, null), [[vShow, props.showCloseButton]])])]);
  8965. }
  8966. });
  8967. // node_modules/vant/es/coupon-list/index.mjs
  8968. var CouponList = withInstall(stdin_default59);
  8969. // node_modules/vant/es/datetime-picker/TimePicker.mjs
  8970. var [name57] = createNamespace("time-picker");
  8971. var stdin_default60 = defineComponent({
  8972. name: name57,
  8973. props: extend({}, sharedProps, {
  8974. minHour: makeNumericProp(0),
  8975. maxHour: makeNumericProp(23),
  8976. minMinute: makeNumericProp(0),
  8977. maxMinute: makeNumericProp(59),
  8978. modelValue: String
  8979. }),
  8980. emits: ["confirm", "cancel", "change", "update:modelValue"],
  8981. setup(props, {
  8982. emit,
  8983. slots
  8984. }) {
  8985. const formatValue2 = (value) => {
  8986. const {
  8987. minHour,
  8988. maxHour,
  8989. maxMinute,
  8990. minMinute
  8991. } = props;
  8992. if (!value) {
  8993. value = `${padZero(minHour)}:${padZero(minMinute)}`;
  8994. }
  8995. let [hour, minute] = value.split(":");
  8996. hour = padZero(clamp(+hour, +minHour, +maxHour));
  8997. minute = padZero(clamp(+minute, +minMinute, +maxMinute));
  8998. return `${hour}:${minute}`;
  8999. };
  9000. const picker = ref();
  9001. const currentDate = ref(formatValue2(props.modelValue));
  9002. const ranges = computed(() => [{
  9003. type: "hour",
  9004. range: [+props.minHour, +props.maxHour]
  9005. }, {
  9006. type: "minute",
  9007. range: [+props.minMinute, +props.maxMinute]
  9008. }]);
  9009. const originColumns = computed(() => ranges.value.map(({
  9010. type,
  9011. range: rangeArr
  9012. }) => {
  9013. let values = times(rangeArr[1] - rangeArr[0] + 1, (index) => padZero(rangeArr[0] + index));
  9014. if (props.filter) {
  9015. values = props.filter(type, values);
  9016. }
  9017. return {
  9018. type,
  9019. values
  9020. };
  9021. }));
  9022. const columns = computed(() => originColumns.value.map((column) => ({
  9023. values: column.values.map((value) => props.formatter(column.type, value))
  9024. })));
  9025. const updateColumnValue = () => {
  9026. const pair = currentDate.value.split(":");
  9027. const values = [props.formatter("hour", pair[0]), props.formatter("minute", pair[1])];
  9028. nextTick(() => {
  9029. var _a;
  9030. (_a = picker.value) == null ? void 0 : _a.setValues(values);
  9031. });
  9032. };
  9033. const updateInnerValue = () => {
  9034. const [hourIndex, minuteIndex] = picker.value.getIndexes();
  9035. const [hourColumn, minuteColumn] = originColumns.value;
  9036. const hour = hourColumn.values[hourIndex] || hourColumn.values[0];
  9037. const minute = minuteColumn.values[minuteIndex] || minuteColumn.values[0];
  9038. currentDate.value = formatValue2(`${hour}:${minute}`);
  9039. updateColumnValue();
  9040. };
  9041. const onConfirm = () => emit("confirm", currentDate.value);
  9042. const onCancel = () => emit("cancel");
  9043. const onChange = () => {
  9044. updateInnerValue();
  9045. nextTick(() => {
  9046. nextTick(() => emit("change", currentDate.value));
  9047. });
  9048. };
  9049. onMounted(() => {
  9050. updateColumnValue();
  9051. nextTick(updateInnerValue);
  9052. });
  9053. watch(columns, updateColumnValue);
  9054. watch(() => [props.filter, props.maxHour, props.minMinute, props.maxMinute], updateInnerValue);
  9055. watch(() => props.minHour, () => {
  9056. nextTick(updateInnerValue);
  9057. });
  9058. watch(currentDate, (value) => emit("update:modelValue", value));
  9059. watch(() => props.modelValue, (value) => {
  9060. value = formatValue2(value);
  9061. if (value !== currentDate.value) {
  9062. currentDate.value = value;
  9063. updateColumnValue();
  9064. }
  9065. });
  9066. useExpose({
  9067. getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
  9068. });
  9069. return () => createVNode(Picker, mergeProps({
  9070. "ref": picker,
  9071. "columns": columns.value,
  9072. "onChange": onChange,
  9073. "onCancel": onCancel,
  9074. "onConfirm": onConfirm
  9075. }, pick(props, pickerInheritKeys)), slots);
  9076. }
  9077. });
  9078. // node_modules/vant/es/datetime-picker/DatePicker.mjs
  9079. var currentYear = new Date().getFullYear();
  9080. var [name58] = createNamespace("date-picker");
  9081. var stdin_default61 = defineComponent({
  9082. name: name58,
  9083. props: extend({}, sharedProps, {
  9084. type: makeStringProp("datetime"),
  9085. modelValue: Date,
  9086. minDate: {
  9087. type: Date,
  9088. default: () => new Date(currentYear - 10, 0, 1),
  9089. validator: isDate
  9090. },
  9091. maxDate: {
  9092. type: Date,
  9093. default: () => new Date(currentYear + 10, 11, 31),
  9094. validator: isDate
  9095. }
  9096. }),
  9097. emits: ["confirm", "cancel", "change", "update:modelValue"],
  9098. setup(props, {
  9099. emit,
  9100. slots
  9101. }) {
  9102. const formatValue2 = (value) => {
  9103. if (isDate(value)) {
  9104. const timestamp = clamp(value.getTime(), props.minDate.getTime(), props.maxDate.getTime());
  9105. return new Date(timestamp);
  9106. }
  9107. return void 0;
  9108. };
  9109. const picker = ref();
  9110. const currentDate = ref(formatValue2(props.modelValue));
  9111. const getBoundary = (type, value) => {
  9112. const boundary = props[`${type}Date`];
  9113. const year = boundary.getFullYear();
  9114. let month = 1;
  9115. let date = 1;
  9116. let hour = 0;
  9117. let minute = 0;
  9118. if (type === "max") {
  9119. month = 12;
  9120. date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
  9121. hour = 23;
  9122. minute = 59;
  9123. }
  9124. if (value.getFullYear() === year) {
  9125. month = boundary.getMonth() + 1;
  9126. if (value.getMonth() + 1 === month) {
  9127. date = boundary.getDate();
  9128. if (value.getDate() === date) {
  9129. hour = boundary.getHours();
  9130. if (value.getHours() === hour) {
  9131. minute = boundary.getMinutes();
  9132. }
  9133. }
  9134. }
  9135. }
  9136. return {
  9137. [`${type}Year`]: year,
  9138. [`${type}Month`]: month,
  9139. [`${type}Date`]: date,
  9140. [`${type}Hour`]: hour,
  9141. [`${type}Minute`]: minute
  9142. };
  9143. };
  9144. const ranges = computed(() => {
  9145. const {
  9146. maxYear,
  9147. maxDate,
  9148. maxMonth,
  9149. maxHour,
  9150. maxMinute
  9151. } = getBoundary("max", currentDate.value || props.minDate);
  9152. const {
  9153. minYear,
  9154. minDate,
  9155. minMonth,
  9156. minHour,
  9157. minMinute
  9158. } = getBoundary("min", currentDate.value || props.minDate);
  9159. let result = [{
  9160. type: "year",
  9161. range: [minYear, maxYear]
  9162. }, {
  9163. type: "month",
  9164. range: [minMonth, maxMonth]
  9165. }, {
  9166. type: "day",
  9167. range: [minDate, maxDate]
  9168. }, {
  9169. type: "hour",
  9170. range: [minHour, maxHour]
  9171. }, {
  9172. type: "minute",
  9173. range: [minMinute, maxMinute]
  9174. }];
  9175. switch (props.type) {
  9176. case "date":
  9177. result = result.slice(0, 3);
  9178. break;
  9179. case "year-month":
  9180. result = result.slice(0, 2);
  9181. break;
  9182. case "month-day":
  9183. result = result.slice(1, 3);
  9184. break;
  9185. case "datehour":
  9186. result = result.slice(0, 4);
  9187. break;
  9188. }
  9189. if (props.columnsOrder) {
  9190. const columnsOrder = props.columnsOrder.concat(result.map((column) => column.type));
  9191. result.sort((a, b) => columnsOrder.indexOf(a.type) - columnsOrder.indexOf(b.type));
  9192. }
  9193. return result;
  9194. });
  9195. const originColumns = computed(() => ranges.value.map(({
  9196. type,
  9197. range: rangeArr
  9198. }) => {
  9199. let values = times(rangeArr[1] - rangeArr[0] + 1, (index) => padZero(rangeArr[0] + index));
  9200. if (props.filter) {
  9201. values = props.filter(type, values);
  9202. }
  9203. return {
  9204. type,
  9205. values
  9206. };
  9207. }));
  9208. const columns = computed(() => originColumns.value.map((column) => ({
  9209. values: column.values.map((value) => props.formatter(column.type, value))
  9210. })));
  9211. const updateColumnValue = () => {
  9212. const value = currentDate.value || props.minDate;
  9213. const {
  9214. formatter
  9215. } = props;
  9216. const values = originColumns.value.map((column) => {
  9217. switch (column.type) {
  9218. case "year":
  9219. return formatter("year", `${value.getFullYear()}`);
  9220. case "month":
  9221. return formatter("month", padZero(value.getMonth() + 1));
  9222. case "day":
  9223. return formatter("day", padZero(value.getDate()));
  9224. case "hour":
  9225. return formatter("hour", padZero(value.getHours()));
  9226. case "minute":
  9227. return formatter("minute", padZero(value.getMinutes()));
  9228. default:
  9229. return "";
  9230. }
  9231. });
  9232. nextTick(() => {
  9233. var _a;
  9234. (_a = picker.value) == null ? void 0 : _a.setValues(values);
  9235. });
  9236. };
  9237. const updateInnerValue = () => {
  9238. const {
  9239. type
  9240. } = props;
  9241. const indexes = picker.value.getIndexes();
  9242. const getValue = (type2) => {
  9243. let index = 0;
  9244. originColumns.value.forEach((column, columnIndex) => {
  9245. if (type2 === column.type) {
  9246. index = columnIndex;
  9247. }
  9248. });
  9249. const {
  9250. values
  9251. } = originColumns.value[index];
  9252. return getTrueValue(values[indexes[index]]);
  9253. };
  9254. let year;
  9255. let month;
  9256. let day;
  9257. if (type === "month-day") {
  9258. year = (currentDate.value || props.minDate).getFullYear();
  9259. month = getValue("month");
  9260. day = getValue("day");
  9261. } else {
  9262. year = getValue("year");
  9263. month = getValue("month");
  9264. day = type === "year-month" ? 1 : getValue("day");
  9265. }
  9266. const maxDay = getMonthEndDay(year, month);
  9267. day = day > maxDay ? maxDay : day;
  9268. let hour = 0;
  9269. let minute = 0;
  9270. if (type === "datehour") {
  9271. hour = getValue("hour");
  9272. }
  9273. if (type === "datetime") {
  9274. hour = getValue("hour");
  9275. minute = getValue("minute");
  9276. }
  9277. const value = new Date(year, month - 1, day, hour, minute);
  9278. currentDate.value = formatValue2(value);
  9279. };
  9280. const onConfirm = () => {
  9281. emit("update:modelValue", currentDate.value);
  9282. emit("confirm", currentDate.value);
  9283. };
  9284. const onCancel = () => emit("cancel");
  9285. const onChange = () => {
  9286. updateInnerValue();
  9287. nextTick(() => {
  9288. updateInnerValue();
  9289. nextTick(() => emit("change", currentDate.value));
  9290. });
  9291. };
  9292. onMounted(() => {
  9293. updateColumnValue();
  9294. nextTick(updateInnerValue);
  9295. });
  9296. watch(columns, updateColumnValue);
  9297. watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
  9298. watch(() => [props.filter, props.minDate, props.maxDate], () => {
  9299. nextTick(updateInnerValue);
  9300. });
  9301. watch(() => props.modelValue, (value) => {
  9302. var _a;
  9303. value = formatValue2(value);
  9304. if (value && value.valueOf() !== ((_a = currentDate.value) == null ? void 0 : _a.valueOf())) {
  9305. currentDate.value = value;
  9306. }
  9307. });
  9308. useExpose({
  9309. getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
  9310. });
  9311. return () => createVNode(Picker, mergeProps({
  9312. "ref": picker,
  9313. "columns": columns.value,
  9314. "onChange": onChange,
  9315. "onCancel": onCancel,
  9316. "onConfirm": onConfirm
  9317. }, pick(props, pickerInheritKeys)), slots);
  9318. }
  9319. });
  9320. // node_modules/vant/es/datetime-picker/DatetimePicker.mjs
  9321. var [name59, bem54] = createNamespace("datetime-picker");
  9322. var timePickerPropKeys = Object.keys(stdin_default60.props);
  9323. var datePickerPropKeys = Object.keys(stdin_default61.props);
  9324. var datetimePickerProps = extend({}, stdin_default60.props, stdin_default61.props, {
  9325. modelValue: [String, Date]
  9326. });
  9327. var stdin_default62 = defineComponent({
  9328. name: name59,
  9329. props: datetimePickerProps,
  9330. setup(props, {
  9331. attrs,
  9332. slots
  9333. }) {
  9334. const root = ref();
  9335. useExpose({
  9336. getPicker: () => {
  9337. var _a;
  9338. return (_a = root.value) == null ? void 0 : _a.getPicker();
  9339. }
  9340. });
  9341. return () => {
  9342. const isTimePicker = props.type === "time";
  9343. const Component = isTimePicker ? stdin_default60 : stdin_default61;
  9344. const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
  9345. return createVNode(Component, mergeProps({
  9346. "ref": root,
  9347. "class": bem54()
  9348. }, inheritProps, attrs), slots);
  9349. };
  9350. }
  9351. });
  9352. // node_modules/vant/es/datetime-picker/index.mjs
  9353. var DatetimePicker = withInstall(stdin_default62);
  9354. // node_modules/vant/es/dialog/Dialog.mjs
  9355. var [name60, bem55, t13] = createNamespace("dialog");
  9356. var dialogProps = extend({}, popupSharedProps, {
  9357. title: String,
  9358. theme: String,
  9359. width: numericProp,
  9360. message: [String, Function],
  9361. callback: Function,
  9362. allowHtml: Boolean,
  9363. className: unknownProp,
  9364. transition: makeStringProp("van-dialog-bounce"),
  9365. messageAlign: String,
  9366. closeOnPopstate: truthProp,
  9367. showCancelButton: Boolean,
  9368. cancelButtonText: String,
  9369. cancelButtonColor: String,
  9370. cancelButtonDisabled: Boolean,
  9371. confirmButtonText: String,
  9372. confirmButtonColor: String,
  9373. confirmButtonDisabled: Boolean,
  9374. showConfirmButton: truthProp,
  9375. closeOnClickOverlay: Boolean
  9376. });
  9377. var popupInheritKeys2 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
  9378. var stdin_default63 = defineComponent({
  9379. name: name60,
  9380. props: dialogProps,
  9381. emits: ["confirm", "cancel", "keydown", "update:show"],
  9382. setup(props, {
  9383. emit,
  9384. slots
  9385. }) {
  9386. const root = ref();
  9387. const loading = reactive({
  9388. confirm: false,
  9389. cancel: false
  9390. });
  9391. const updateShow = (value) => emit("update:show", value);
  9392. const close = (action) => {
  9393. var _a;
  9394. updateShow(false);
  9395. (_a = props.callback) == null ? void 0 : _a.call(props, action);
  9396. };
  9397. const getActionHandler = (action) => () => {
  9398. if (!props.show) {
  9399. return;
  9400. }
  9401. emit(action);
  9402. if (props.beforeClose) {
  9403. loading[action] = true;
  9404. callInterceptor(props.beforeClose, {
  9405. args: [action],
  9406. done() {
  9407. close(action);
  9408. loading[action] = false;
  9409. },
  9410. canceled() {
  9411. loading[action] = false;
  9412. }
  9413. });
  9414. } else {
  9415. close(action);
  9416. }
  9417. };
  9418. const onCancel = getActionHandler("cancel");
  9419. const onConfirm = getActionHandler("confirm");
  9420. const onKeydown = withKeys((event) => {
  9421. var _a, _b;
  9422. if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
  9423. return;
  9424. }
  9425. const onEventType = {
  9426. Enter: props.showConfirmButton ? onConfirm : noop,
  9427. Escape: props.showCancelButton ? onCancel : noop
  9428. };
  9429. onEventType[event.key]();
  9430. emit("keydown", event);
  9431. }, ["enter", "esc"]);
  9432. const renderTitle = () => {
  9433. const title = slots.title ? slots.title() : props.title;
  9434. if (title) {
  9435. return createVNode("div", {
  9436. "class": bem55("header", {
  9437. isolated: !props.message && !slots.default
  9438. })
  9439. }, [title]);
  9440. }
  9441. };
  9442. const renderMessage = (hasTitle) => {
  9443. const {
  9444. message,
  9445. allowHtml,
  9446. messageAlign
  9447. } = props;
  9448. const classNames = bem55("message", {
  9449. "has-title": hasTitle,
  9450. [messageAlign]: messageAlign
  9451. });
  9452. const content = isFunction(message) ? message() : message;
  9453. if (allowHtml && typeof content === "string") {
  9454. return createVNode("div", {
  9455. "class": classNames,
  9456. "innerHTML": content
  9457. }, null);
  9458. }
  9459. return createVNode("div", {
  9460. "class": classNames
  9461. }, [content]);
  9462. };
  9463. const renderContent = () => {
  9464. if (slots.default) {
  9465. return createVNode("div", {
  9466. "class": bem55("content")
  9467. }, [slots.default()]);
  9468. }
  9469. const {
  9470. title,
  9471. message,
  9472. allowHtml
  9473. } = props;
  9474. if (message) {
  9475. const hasTitle = !!(title || slots.title);
  9476. return createVNode("div", {
  9477. "key": allowHtml ? 1 : 0,
  9478. "class": bem55("content", {
  9479. isolated: !hasTitle
  9480. })
  9481. }, [renderMessage(hasTitle)]);
  9482. }
  9483. };
  9484. const renderButtons = () => createVNode("div", {
  9485. "class": [BORDER_TOP, bem55("footer")]
  9486. }, [props.showCancelButton && createVNode(Button, {
  9487. "size": "large",
  9488. "text": props.cancelButtonText || t13("cancel"),
  9489. "class": bem55("cancel"),
  9490. "style": {
  9491. color: props.cancelButtonColor
  9492. },
  9493. "loading": loading.cancel,
  9494. "disabled": props.cancelButtonDisabled,
  9495. "onClick": onCancel
  9496. }, null), props.showConfirmButton && createVNode(Button, {
  9497. "size": "large",
  9498. "text": props.confirmButtonText || t13("confirm"),
  9499. "class": [bem55("confirm"), {
  9500. [BORDER_LEFT]: props.showCancelButton
  9501. }],
  9502. "style": {
  9503. color: props.confirmButtonColor
  9504. },
  9505. "loading": loading.confirm,
  9506. "disabled": props.confirmButtonDisabled,
  9507. "onClick": onConfirm
  9508. }, null)]);
  9509. const renderRoundButtons = () => createVNode(ActionBar, {
  9510. "class": bem55("footer")
  9511. }, {
  9512. default: () => [props.showCancelButton && createVNode(ActionBarButton, {
  9513. "type": "warning",
  9514. "text": props.cancelButtonText || t13("cancel"),
  9515. "class": bem55("cancel"),
  9516. "color": props.cancelButtonColor,
  9517. "loading": loading.cancel,
  9518. "disabled": props.cancelButtonDisabled,
  9519. "onClick": onCancel
  9520. }, null), props.showConfirmButton && createVNode(ActionBarButton, {
  9521. "type": "danger",
  9522. "text": props.confirmButtonText || t13("confirm"),
  9523. "class": bem55("confirm"),
  9524. "color": props.confirmButtonColor,
  9525. "loading": loading.confirm,
  9526. "disabled": props.confirmButtonDisabled,
  9527. "onClick": onConfirm
  9528. }, null)]
  9529. });
  9530. const renderFooter = () => {
  9531. if (slots.footer) {
  9532. return slots.footer();
  9533. }
  9534. return props.theme === "round-button" ? renderRoundButtons() : renderButtons();
  9535. };
  9536. return () => {
  9537. const {
  9538. width: width2,
  9539. title,
  9540. theme,
  9541. message,
  9542. className
  9543. } = props;
  9544. return createVNode(Popup, mergeProps({
  9545. "ref": root,
  9546. "role": "dialog",
  9547. "class": [bem55([theme]), className],
  9548. "style": {
  9549. width: addUnit(width2)
  9550. },
  9551. "tabindex": 0,
  9552. "aria-labelledby": title || message,
  9553. "onKeydown": onKeydown,
  9554. "onUpdate:show": updateShow
  9555. }, pick(props, popupInheritKeys2)), {
  9556. default: () => [renderTitle(), renderContent(), renderFooter()]
  9557. });
  9558. };
  9559. }
  9560. });
  9561. // node_modules/vant/es/dialog/function-call.mjs
  9562. var instance;
  9563. function initInstance() {
  9564. const Wrapper = {
  9565. setup() {
  9566. const {
  9567. state,
  9568. toggle
  9569. } = usePopupState();
  9570. return () => createVNode(stdin_default63, mergeProps(state, {
  9571. "onUpdate:show": toggle
  9572. }), null);
  9573. }
  9574. };
  9575. ({
  9576. instance
  9577. } = mountComponent(Wrapper));
  9578. }
  9579. function Dialog(options) {
  9580. if (!inBrowser) {
  9581. return Promise.resolve();
  9582. }
  9583. return new Promise((resolve, reject) => {
  9584. if (!instance) {
  9585. initInstance();
  9586. }
  9587. instance.open(extend({}, Dialog.currentOptions, options, {
  9588. callback: (action) => {
  9589. (action === "confirm" ? resolve : reject)(action);
  9590. }
  9591. }));
  9592. });
  9593. }
  9594. Dialog.defaultOptions = {
  9595. title: "",
  9596. width: "",
  9597. theme: null,
  9598. message: "",
  9599. overlay: true,
  9600. callback: null,
  9601. teleport: "body",
  9602. className: "",
  9603. allowHtml: false,
  9604. lockScroll: true,
  9605. transition: void 0,
  9606. beforeClose: null,
  9607. overlayClass: "",
  9608. overlayStyle: void 0,
  9609. messageAlign: "",
  9610. cancelButtonText: "",
  9611. cancelButtonColor: null,
  9612. cancelButtonDisabled: false,
  9613. confirmButtonText: "",
  9614. confirmButtonColor: null,
  9615. confirmButtonDisabled: false,
  9616. showConfirmButton: true,
  9617. showCancelButton: false,
  9618. closeOnPopstate: true,
  9619. closeOnClickOverlay: false
  9620. };
  9621. Dialog.currentOptions = extend({}, Dialog.defaultOptions);
  9622. Dialog.alert = Dialog;
  9623. Dialog.confirm = (options) => Dialog(extend({
  9624. showCancelButton: true
  9625. }, options));
  9626. Dialog.close = () => {
  9627. if (instance) {
  9628. instance.toggle(false);
  9629. }
  9630. };
  9631. Dialog.setDefaultOptions = (options) => {
  9632. extend(Dialog.currentOptions, options);
  9633. };
  9634. Dialog.resetDefaultOptions = () => {
  9635. Dialog.currentOptions = extend({}, Dialog.defaultOptions);
  9636. };
  9637. Dialog.Component = withInstall(stdin_default63);
  9638. Dialog.install = (app) => {
  9639. app.use(Dialog.Component);
  9640. app.config.globalProperties.$dialog = Dialog;
  9641. };
  9642. // node_modules/vant/es/divider/Divider.mjs
  9643. var [name61, bem56] = createNamespace("divider");
  9644. var dividerProps = {
  9645. dashed: Boolean,
  9646. hairline: truthProp,
  9647. contentPosition: makeStringProp("center")
  9648. };
  9649. var stdin_default64 = defineComponent({
  9650. name: name61,
  9651. props: dividerProps,
  9652. setup(props, {
  9653. slots
  9654. }) {
  9655. return () => {
  9656. var _a;
  9657. return createVNode("div", {
  9658. "role": "separator",
  9659. "class": bem56({
  9660. dashed: props.dashed,
  9661. hairline: props.hairline,
  9662. [`content-${props.contentPosition}`]: !!slots.default
  9663. })
  9664. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  9665. };
  9666. }
  9667. });
  9668. // node_modules/vant/es/divider/index.mjs
  9669. var Divider = withInstall(stdin_default64);
  9670. // node_modules/vant/es/dropdown-menu/DropdownMenu.mjs
  9671. var [name62, bem57] = createNamespace("dropdown-menu");
  9672. var dropdownMenuProps = {
  9673. overlay: truthProp,
  9674. zIndex: numericProp,
  9675. duration: makeNumericProp(0.2),
  9676. direction: makeStringProp("down"),
  9677. activeColor: String,
  9678. closeOnClickOutside: truthProp,
  9679. closeOnClickOverlay: truthProp
  9680. };
  9681. var DROPDOWN_KEY = Symbol(name62);
  9682. var stdin_default65 = defineComponent({
  9683. name: name62,
  9684. props: dropdownMenuProps,
  9685. setup(props, {
  9686. slots
  9687. }) {
  9688. const id = useId();
  9689. const root = ref();
  9690. const barRef = ref();
  9691. const offset2 = ref(0);
  9692. const {
  9693. children,
  9694. linkChildren
  9695. } = useChildren(DROPDOWN_KEY);
  9696. const scrollParent = useScrollParent(root);
  9697. const opened = computed(() => children.some((item) => item.state.showWrapper));
  9698. const barStyle = computed(() => {
  9699. if (opened.value && isDef(props.zIndex)) {
  9700. return {
  9701. zIndex: +props.zIndex + 1
  9702. };
  9703. }
  9704. });
  9705. const onClickAway = () => {
  9706. if (props.closeOnClickOutside) {
  9707. children.forEach((item) => {
  9708. item.toggle(false);
  9709. });
  9710. }
  9711. };
  9712. const updateOffset = () => {
  9713. if (barRef.value) {
  9714. const rect = useRect(barRef);
  9715. if (props.direction === "down") {
  9716. offset2.value = rect.bottom;
  9717. } else {
  9718. offset2.value = windowHeight.value - rect.top;
  9719. }
  9720. }
  9721. };
  9722. const onScroll = () => {
  9723. if (opened.value) {
  9724. updateOffset();
  9725. }
  9726. };
  9727. const toggleItem = (active) => {
  9728. children.forEach((item, index) => {
  9729. if (index === active) {
  9730. updateOffset();
  9731. item.toggle();
  9732. } else if (item.state.showPopup) {
  9733. item.toggle(false, {
  9734. immediate: true
  9735. });
  9736. }
  9737. });
  9738. };
  9739. const renderTitle = (item, index) => {
  9740. const {
  9741. showPopup
  9742. } = item.state;
  9743. const {
  9744. disabled,
  9745. titleClass
  9746. } = item;
  9747. return createVNode("div", {
  9748. "id": `${id}-${index}`,
  9749. "role": "button",
  9750. "tabindex": disabled ? void 0 : 0,
  9751. "class": [bem57("item", {
  9752. disabled
  9753. }), {
  9754. [HAPTICS_FEEDBACK]: !disabled
  9755. }],
  9756. "onClick": () => {
  9757. if (!disabled) {
  9758. toggleItem(index);
  9759. }
  9760. }
  9761. }, [createVNode("span", {
  9762. "class": [bem57("title", {
  9763. down: showPopup === (props.direction === "down"),
  9764. active: showPopup
  9765. }), titleClass],
  9766. "style": {
  9767. color: showPopup ? props.activeColor : ""
  9768. }
  9769. }, [createVNode("div", {
  9770. "class": "van-ellipsis"
  9771. }, [item.renderTitle()])])]);
  9772. };
  9773. linkChildren({
  9774. id,
  9775. props,
  9776. offset: offset2
  9777. });
  9778. useClickAway(root, onClickAway);
  9779. useEventListener("scroll", onScroll, {
  9780. target: scrollParent,
  9781. passive: true
  9782. });
  9783. return () => {
  9784. var _a;
  9785. return createVNode("div", {
  9786. "ref": root,
  9787. "class": bem57()
  9788. }, [createVNode("div", {
  9789. "ref": barRef,
  9790. "style": barStyle.value,
  9791. "class": bem57("bar", {
  9792. opened: opened.value
  9793. })
  9794. }, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
  9795. };
  9796. }
  9797. });
  9798. // node_modules/vant/es/dropdown-item/DropdownItem.mjs
  9799. var [name63, bem58] = createNamespace("dropdown-item");
  9800. var dropdownItemProps = {
  9801. title: String,
  9802. options: makeArrayProp(),
  9803. disabled: Boolean,
  9804. teleport: [String, Object],
  9805. lazyRender: truthProp,
  9806. modelValue: unknownProp,
  9807. titleClass: unknownProp
  9808. };
  9809. var stdin_default66 = defineComponent({
  9810. name: name63,
  9811. props: dropdownItemProps,
  9812. emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
  9813. setup(props, {
  9814. emit,
  9815. slots
  9816. }) {
  9817. const state = reactive({
  9818. showPopup: false,
  9819. transition: true,
  9820. showWrapper: false
  9821. });
  9822. const {
  9823. parent,
  9824. index
  9825. } = useParent(DROPDOWN_KEY);
  9826. if (!parent) {
  9827. if (true) {
  9828. console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
  9829. }
  9830. return;
  9831. }
  9832. const getEmitter = (name210) => () => emit(name210);
  9833. const onOpen = getEmitter("open");
  9834. const onClose = getEmitter("close");
  9835. const onOpened = getEmitter("opened");
  9836. const onClosed = () => {
  9837. state.showWrapper = false;
  9838. emit("closed");
  9839. };
  9840. const onClickWrapper = (event) => {
  9841. if (props.teleport) {
  9842. event.stopPropagation();
  9843. }
  9844. };
  9845. const toggle = (show = !state.showPopup, options = {}) => {
  9846. if (show === state.showPopup) {
  9847. return;
  9848. }
  9849. state.showPopup = show;
  9850. state.transition = !options.immediate;
  9851. if (show) {
  9852. state.showWrapper = true;
  9853. }
  9854. };
  9855. const renderTitle = () => {
  9856. if (slots.title) {
  9857. return slots.title();
  9858. }
  9859. if (props.title) {
  9860. return props.title;
  9861. }
  9862. const match = props.options.find((option) => option.value === props.modelValue);
  9863. return match ? match.text : "";
  9864. };
  9865. const renderOption = (option) => {
  9866. const {
  9867. activeColor
  9868. } = parent.props;
  9869. const active = option.value === props.modelValue;
  9870. const onClick = () => {
  9871. state.showPopup = false;
  9872. if (option.value !== props.modelValue) {
  9873. emit("update:modelValue", option.value);
  9874. emit("change", option.value);
  9875. }
  9876. };
  9877. const renderIcon = () => {
  9878. if (active) {
  9879. return createVNode(Icon, {
  9880. "class": bem58("icon"),
  9881. "color": activeColor,
  9882. "name": "success"
  9883. }, null);
  9884. }
  9885. };
  9886. return createVNode(Cell, {
  9887. "role": "menuitem",
  9888. "key": option.value,
  9889. "icon": option.icon,
  9890. "title": option.text,
  9891. "class": bem58("option", {
  9892. active
  9893. }),
  9894. "style": {
  9895. color: active ? activeColor : ""
  9896. },
  9897. "tabindex": active ? 0 : -1,
  9898. "clickable": true,
  9899. "onClick": onClick
  9900. }, {
  9901. value: renderIcon
  9902. });
  9903. };
  9904. const renderContent = () => {
  9905. const {
  9906. offset: offset2
  9907. } = parent;
  9908. const {
  9909. zIndex,
  9910. overlay,
  9911. duration,
  9912. direction,
  9913. closeOnClickOverlay
  9914. } = parent.props;
  9915. const style = getZIndexStyle(zIndex);
  9916. if (direction === "down") {
  9917. style.top = `${offset2.value}px`;
  9918. } else {
  9919. style.bottom = `${offset2.value}px`;
  9920. }
  9921. return withDirectives(createVNode("div", {
  9922. "style": style,
  9923. "class": bem58([direction]),
  9924. "onClick": onClickWrapper
  9925. }, [createVNode(Popup, {
  9926. "show": state.showPopup,
  9927. "onUpdate:show": ($event) => state.showPopup = $event,
  9928. "role": "menu",
  9929. "class": bem58("content"),
  9930. "overlay": overlay,
  9931. "position": direction === "down" ? "top" : "bottom",
  9932. "duration": state.transition ? duration : 0,
  9933. "lazyRender": props.lazyRender,
  9934. "overlayStyle": {
  9935. position: "absolute"
  9936. },
  9937. "aria-labelledby": `${parent.id}-${index.value}`,
  9938. "closeOnClickOverlay": closeOnClickOverlay,
  9939. "onOpen": onOpen,
  9940. "onClose": onClose,
  9941. "onOpened": onOpened,
  9942. "onClosed": onClosed
  9943. }, {
  9944. default: () => {
  9945. var _a;
  9946. return [props.options.map(renderOption), (_a = slots.default) == null ? void 0 : _a.call(slots)];
  9947. }
  9948. })]), [[vShow, state.showWrapper]]);
  9949. };
  9950. useExpose({
  9951. state,
  9952. toggle,
  9953. renderTitle
  9954. });
  9955. return () => {
  9956. if (props.teleport) {
  9957. return createVNode(Teleport, {
  9958. "to": props.teleport
  9959. }, {
  9960. default: () => [renderContent()]
  9961. });
  9962. }
  9963. return renderContent();
  9964. };
  9965. }
  9966. });
  9967. // node_modules/vant/es/dropdown-item/index.mjs
  9968. var DropdownItem = withInstall(stdin_default66);
  9969. // node_modules/vant/es/dropdown-menu/index.mjs
  9970. var DropdownMenu = withInstall(stdin_default65);
  9971. // node_modules/vant/es/grid/Grid.mjs
  9972. var [name64, bem59] = createNamespace("grid");
  9973. var gridProps = {
  9974. square: Boolean,
  9975. center: truthProp,
  9976. border: truthProp,
  9977. gutter: numericProp,
  9978. reverse: Boolean,
  9979. iconSize: numericProp,
  9980. direction: String,
  9981. clickable: Boolean,
  9982. columnNum: makeNumericProp(4)
  9983. };
  9984. var GRID_KEY = Symbol(name64);
  9985. var stdin_default67 = defineComponent({
  9986. name: name64,
  9987. props: gridProps,
  9988. setup(props, {
  9989. slots
  9990. }) {
  9991. const {
  9992. linkChildren
  9993. } = useChildren(GRID_KEY);
  9994. linkChildren({
  9995. props
  9996. });
  9997. return () => {
  9998. var _a;
  9999. return createVNode("div", {
  10000. "style": {
  10001. paddingLeft: addUnit(props.gutter)
  10002. },
  10003. "class": [bem59(), {
  10004. [BORDER_TOP]: props.border && !props.gutter
  10005. }]
  10006. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  10007. };
  10008. }
  10009. });
  10010. // node_modules/vant/es/grid/index.mjs
  10011. var Grid = withInstall(stdin_default67);
  10012. // node_modules/vant/es/grid-item/GridItem.mjs
  10013. var [name65, bem60] = createNamespace("grid-item");
  10014. var gridItemProps = extend({}, routeProps, {
  10015. dot: Boolean,
  10016. text: String,
  10017. icon: String,
  10018. badge: numericProp,
  10019. iconColor: String,
  10020. iconPrefix: String,
  10021. badgeProps: Object
  10022. });
  10023. var stdin_default68 = defineComponent({
  10024. name: name65,
  10025. props: gridItemProps,
  10026. setup(props, {
  10027. slots
  10028. }) {
  10029. const {
  10030. parent,
  10031. index
  10032. } = useParent(GRID_KEY);
  10033. const route2 = useRoute();
  10034. if (!parent) {
  10035. if (true) {
  10036. console.error("[Vant] <GridItem> must be a child component of <Grid>.");
  10037. }
  10038. return;
  10039. }
  10040. const rootStyle = computed(() => {
  10041. const {
  10042. square,
  10043. gutter,
  10044. columnNum
  10045. } = parent.props;
  10046. const percent = `${100 / +columnNum}%`;
  10047. const style = {
  10048. flexBasis: percent
  10049. };
  10050. if (square) {
  10051. style.paddingTop = percent;
  10052. } else if (gutter) {
  10053. const gutterValue = addUnit(gutter);
  10054. style.paddingRight = gutterValue;
  10055. if (index.value >= columnNum) {
  10056. style.marginTop = gutterValue;
  10057. }
  10058. }
  10059. return style;
  10060. });
  10061. const contentStyle = computed(() => {
  10062. const {
  10063. square,
  10064. gutter
  10065. } = parent.props;
  10066. if (square && gutter) {
  10067. const gutterValue = addUnit(gutter);
  10068. return {
  10069. right: gutterValue,
  10070. bottom: gutterValue,
  10071. height: "auto"
  10072. };
  10073. }
  10074. });
  10075. const renderIcon = () => {
  10076. if (slots.icon) {
  10077. return createVNode(Badge, mergeProps({
  10078. "dot": props.dot,
  10079. "content": props.badge
  10080. }, props.badgeProps), {
  10081. default: slots.icon
  10082. });
  10083. }
  10084. if (props.icon) {
  10085. return createVNode(Icon, {
  10086. "dot": props.dot,
  10087. "name": props.icon,
  10088. "size": parent.props.iconSize,
  10089. "badge": props.badge,
  10090. "class": bem60("icon"),
  10091. "color": props.iconColor,
  10092. "badgeProps": props.badgeProps,
  10093. "classPrefix": props.iconPrefix
  10094. }, null);
  10095. }
  10096. };
  10097. const renderText = () => {
  10098. if (slots.text) {
  10099. return slots.text();
  10100. }
  10101. if (props.text) {
  10102. return createVNode("span", {
  10103. "class": bem60("text")
  10104. }, [props.text]);
  10105. }
  10106. };
  10107. const renderContent = () => {
  10108. if (slots.default) {
  10109. return slots.default();
  10110. }
  10111. return [renderIcon(), renderText()];
  10112. };
  10113. return () => {
  10114. const {
  10115. center,
  10116. border,
  10117. square,
  10118. gutter,
  10119. reverse,
  10120. direction,
  10121. clickable
  10122. } = parent.props;
  10123. const classes = [bem60("content", [direction, {
  10124. center,
  10125. square,
  10126. reverse,
  10127. clickable,
  10128. surround: border && gutter
  10129. }]), {
  10130. [BORDER]: border
  10131. }];
  10132. return createVNode("div", {
  10133. "class": [bem60({
  10134. square
  10135. })],
  10136. "style": rootStyle.value
  10137. }, [createVNode("div", {
  10138. "role": clickable ? "button" : void 0,
  10139. "class": classes,
  10140. "style": contentStyle.value,
  10141. "tabindex": clickable ? 0 : void 0,
  10142. "onClick": route2
  10143. }, [renderContent()])]);
  10144. };
  10145. }
  10146. });
  10147. // node_modules/vant/es/grid-item/index.mjs
  10148. var GridItem = withInstall(stdin_default68);
  10149. // node_modules/vant/es/image-preview/ImagePreviewItem.mjs
  10150. var getDistance = (touches) => Math.sqrt((touches[0].clientX - touches[1].clientX) ** 2 + (touches[0].clientY - touches[1].clientY) ** 2);
  10151. var bem61 = createNamespace("image-preview")[1];
  10152. var stdin_default69 = defineComponent({
  10153. props: {
  10154. src: String,
  10155. show: Boolean,
  10156. active: Number,
  10157. minZoom: makeRequiredProp(numericProp),
  10158. maxZoom: makeRequiredProp(numericProp),
  10159. rootWidth: makeRequiredProp(Number),
  10160. rootHeight: makeRequiredProp(Number)
  10161. },
  10162. emits: ["scale", "close"],
  10163. setup(props, {
  10164. emit,
  10165. slots
  10166. }) {
  10167. const state = reactive({
  10168. scale: 1,
  10169. moveX: 0,
  10170. moveY: 0,
  10171. moving: false,
  10172. zooming: false,
  10173. imageRatio: 0,
  10174. displayWidth: 0,
  10175. displayHeight: 0
  10176. });
  10177. const touch = useTouch();
  10178. const swipeItem = ref();
  10179. const vertical = computed(() => {
  10180. const {
  10181. rootWidth,
  10182. rootHeight
  10183. } = props;
  10184. const rootRatio = rootHeight / rootWidth;
  10185. return state.imageRatio > rootRatio;
  10186. });
  10187. const imageStyle = computed(() => {
  10188. const {
  10189. scale,
  10190. moveX,
  10191. moveY,
  10192. moving,
  10193. zooming
  10194. } = state;
  10195. const style = {
  10196. transitionDuration: zooming || moving ? "0s" : ".3s"
  10197. };
  10198. if (scale !== 1) {
  10199. const offsetX = moveX / scale;
  10200. const offsetY = moveY / scale;
  10201. style.transform = `scale(${scale}, ${scale}) translate(${offsetX}px, ${offsetY}px)`;
  10202. }
  10203. return style;
  10204. });
  10205. const maxMoveX = computed(() => {
  10206. if (state.imageRatio) {
  10207. const {
  10208. rootWidth,
  10209. rootHeight
  10210. } = props;
  10211. const displayWidth = vertical.value ? rootHeight / state.imageRatio : rootWidth;
  10212. return Math.max(0, (state.scale * displayWidth - rootWidth) / 2);
  10213. }
  10214. return 0;
  10215. });
  10216. const maxMoveY = computed(() => {
  10217. if (state.imageRatio) {
  10218. const {
  10219. rootWidth,
  10220. rootHeight
  10221. } = props;
  10222. const displayHeight = vertical.value ? rootHeight : rootWidth * state.imageRatio;
  10223. return Math.max(0, (state.scale * displayHeight - rootHeight) / 2);
  10224. }
  10225. return 0;
  10226. });
  10227. const setScale = (scale) => {
  10228. scale = clamp(scale, +props.minZoom, +props.maxZoom + 1);
  10229. if (scale !== state.scale) {
  10230. state.scale = scale;
  10231. emit("scale", {
  10232. scale,
  10233. index: props.active
  10234. });
  10235. }
  10236. };
  10237. const resetScale = () => {
  10238. setScale(1);
  10239. state.moveX = 0;
  10240. state.moveY = 0;
  10241. };
  10242. const toggleScale = () => {
  10243. const scale = state.scale > 1 ? 1 : 2;
  10244. setScale(scale);
  10245. state.moveX = 0;
  10246. state.moveY = 0;
  10247. };
  10248. let fingerNum;
  10249. let startMoveX;
  10250. let startMoveY;
  10251. let startScale;
  10252. let startDistance;
  10253. let doubleTapTimer;
  10254. let touchStartTime;
  10255. const onTouchStart = (event) => {
  10256. const {
  10257. touches
  10258. } = event;
  10259. const {
  10260. offsetX
  10261. } = touch;
  10262. touch.start(event);
  10263. fingerNum = touches.length;
  10264. startMoveX = state.moveX;
  10265. startMoveY = state.moveY;
  10266. touchStartTime = Date.now();
  10267. state.moving = fingerNum === 1 && state.scale !== 1;
  10268. state.zooming = fingerNum === 2 && !offsetX.value;
  10269. if (state.zooming) {
  10270. startScale = state.scale;
  10271. startDistance = getDistance(event.touches);
  10272. }
  10273. };
  10274. const onTouchMove = (event) => {
  10275. const {
  10276. touches
  10277. } = event;
  10278. touch.move(event);
  10279. if (state.moving || state.zooming) {
  10280. preventDefault(event, true);
  10281. }
  10282. if (state.moving) {
  10283. const {
  10284. deltaX,
  10285. deltaY
  10286. } = touch;
  10287. const moveX = deltaX.value + startMoveX;
  10288. const moveY = deltaY.value + startMoveY;
  10289. state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
  10290. state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
  10291. }
  10292. if (state.zooming && touches.length === 2) {
  10293. const distance = getDistance(touches);
  10294. const scale = startScale * distance / startDistance;
  10295. setScale(scale);
  10296. }
  10297. };
  10298. const checkTap = () => {
  10299. if (fingerNum > 1) {
  10300. return;
  10301. }
  10302. const {
  10303. offsetX,
  10304. offsetY
  10305. } = touch;
  10306. const deltaTime = Date.now() - touchStartTime;
  10307. const TAP_TIME = 250;
  10308. const TAP_OFFSET = 5;
  10309. if (offsetX.value < TAP_OFFSET && offsetY.value < TAP_OFFSET && deltaTime < TAP_TIME) {
  10310. if (doubleTapTimer) {
  10311. clearTimeout(doubleTapTimer);
  10312. doubleTapTimer = null;
  10313. toggleScale();
  10314. } else {
  10315. doubleTapTimer = setTimeout(() => {
  10316. emit("close");
  10317. doubleTapTimer = null;
  10318. }, TAP_TIME);
  10319. }
  10320. }
  10321. };
  10322. const onTouchEnd = (event) => {
  10323. let stopPropagation2 = false;
  10324. if (state.moving || state.zooming) {
  10325. stopPropagation2 = true;
  10326. if (state.moving && startMoveX === state.moveX && startMoveY === state.moveY) {
  10327. stopPropagation2 = false;
  10328. }
  10329. if (!event.touches.length) {
  10330. if (state.zooming) {
  10331. state.moveX = clamp(state.moveX, -maxMoveX.value, maxMoveX.value);
  10332. state.moveY = clamp(state.moveY, -maxMoveY.value, maxMoveY.value);
  10333. state.zooming = false;
  10334. }
  10335. state.moving = false;
  10336. startMoveX = 0;
  10337. startMoveY = 0;
  10338. startScale = 1;
  10339. if (state.scale < 1) {
  10340. resetScale();
  10341. }
  10342. if (state.scale > props.maxZoom) {
  10343. state.scale = +props.maxZoom;
  10344. }
  10345. }
  10346. }
  10347. preventDefault(event, stopPropagation2);
  10348. checkTap();
  10349. touch.reset();
  10350. };
  10351. const onLoad = (event) => {
  10352. const {
  10353. naturalWidth,
  10354. naturalHeight
  10355. } = event.target;
  10356. state.imageRatio = naturalHeight / naturalWidth;
  10357. };
  10358. watch(() => props.active, resetScale);
  10359. watch(() => props.show, (value) => {
  10360. if (!value) {
  10361. resetScale();
  10362. }
  10363. });
  10364. useEventListener("touchmove", onTouchMove, {
  10365. target: computed(() => {
  10366. var _a;
  10367. return (_a = swipeItem.value) == null ? void 0 : _a.$el;
  10368. })
  10369. });
  10370. return () => {
  10371. const imageSlots = {
  10372. loading: () => createVNode(Loading, {
  10373. "type": "spinner"
  10374. }, null)
  10375. };
  10376. return createVNode(SwipeItem, {
  10377. "ref": swipeItem,
  10378. "class": bem61("swipe-item"),
  10379. "onTouchstartPassive": onTouchStart,
  10380. "onTouchend": onTouchEnd,
  10381. "onTouchcancel": onTouchEnd
  10382. }, {
  10383. default: () => [slots.image ? createVNode("div", {
  10384. "class": bem61("image-wrap")
  10385. }, [slots.image({
  10386. src: props.src
  10387. })]) : createVNode(Image2, {
  10388. "src": props.src,
  10389. "fit": "contain",
  10390. "class": bem61("image", {
  10391. vertical: vertical.value
  10392. }),
  10393. "style": imageStyle.value,
  10394. "onLoad": onLoad
  10395. }, imageSlots)]
  10396. });
  10397. };
  10398. }
  10399. });
  10400. // node_modules/vant/es/image-preview/ImagePreview.mjs
  10401. var [name66, bem62] = createNamespace("image-preview");
  10402. var popupProps2 = ["show", "transition", "overlayStyle", "closeOnPopstate"];
  10403. var imagePreviewProps = {
  10404. show: Boolean,
  10405. loop: truthProp,
  10406. images: makeArrayProp(),
  10407. minZoom: makeNumericProp(1 / 3),
  10408. maxZoom: makeNumericProp(3),
  10409. overlay: truthProp,
  10410. closeable: Boolean,
  10411. showIndex: truthProp,
  10412. className: unknownProp,
  10413. closeIcon: makeStringProp("clear"),
  10414. transition: String,
  10415. beforeClose: Function,
  10416. overlayClass: unknownProp,
  10417. overlayStyle: Object,
  10418. swipeDuration: makeNumericProp(300),
  10419. startPosition: makeNumericProp(0),
  10420. showIndicators: Boolean,
  10421. closeOnPopstate: truthProp,
  10422. closeIconPosition: makeStringProp("top-right")
  10423. };
  10424. var stdin_default70 = defineComponent({
  10425. name: name66,
  10426. props: imagePreviewProps,
  10427. emits: ["scale", "close", "closed", "change", "update:show"],
  10428. setup(props, {
  10429. emit,
  10430. slots
  10431. }) {
  10432. const swipeRef = ref();
  10433. const state = reactive({
  10434. active: 0,
  10435. rootWidth: 0,
  10436. rootHeight: 0
  10437. });
  10438. const resize = () => {
  10439. if (swipeRef.value) {
  10440. const rect = useRect(swipeRef.value.$el);
  10441. state.rootWidth = rect.width;
  10442. state.rootHeight = rect.height;
  10443. swipeRef.value.resize();
  10444. }
  10445. };
  10446. const emitScale = (args) => emit("scale", args);
  10447. const updateShow = (show) => emit("update:show", show);
  10448. const emitClose = () => {
  10449. callInterceptor(props.beforeClose, {
  10450. args: [state.active],
  10451. done: () => updateShow(false)
  10452. });
  10453. };
  10454. const setActive = (active) => {
  10455. if (active !== state.active) {
  10456. state.active = active;
  10457. emit("change", active);
  10458. }
  10459. };
  10460. const renderIndex = () => {
  10461. if (props.showIndex) {
  10462. return createVNode("div", {
  10463. "class": bem62("index")
  10464. }, [slots.index ? slots.index({
  10465. index: state.active
  10466. }) : `${state.active + 1} / ${props.images.length}`]);
  10467. }
  10468. };
  10469. const renderCover = () => {
  10470. if (slots.cover) {
  10471. return createVNode("div", {
  10472. "class": bem62("cover")
  10473. }, [slots.cover()]);
  10474. }
  10475. };
  10476. const renderImages = () => createVNode(Swipe, {
  10477. "ref": swipeRef,
  10478. "lazyRender": true,
  10479. "loop": props.loop,
  10480. "class": bem62("swipe"),
  10481. "duration": props.swipeDuration,
  10482. "initialSwipe": props.startPosition,
  10483. "showIndicators": props.showIndicators,
  10484. "indicatorColor": "white",
  10485. "onChange": setActive
  10486. }, {
  10487. default: () => [props.images.map((image) => createVNode(stdin_default69, {
  10488. "src": image,
  10489. "show": props.show,
  10490. "active": state.active,
  10491. "maxZoom": props.maxZoom,
  10492. "minZoom": props.minZoom,
  10493. "rootWidth": state.rootWidth,
  10494. "rootHeight": state.rootHeight,
  10495. "onScale": emitScale,
  10496. "onClose": emitClose
  10497. }, {
  10498. image: slots.image
  10499. }))]
  10500. });
  10501. const renderClose = () => {
  10502. if (props.closeable) {
  10503. return createVNode(Icon, {
  10504. "role": "button",
  10505. "name": props.closeIcon,
  10506. "class": [bem62("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
  10507. "onClick": emitClose
  10508. }, null);
  10509. }
  10510. };
  10511. const onClosed = () => emit("closed");
  10512. const swipeTo = (index, options) => {
  10513. var _a;
  10514. return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
  10515. };
  10516. useExpose({
  10517. swipeTo
  10518. });
  10519. onMounted(resize);
  10520. watch([windowWidth, windowHeight], resize);
  10521. watch(() => props.startPosition, (value) => setActive(+value));
  10522. watch(() => props.show, (value) => {
  10523. const {
  10524. images,
  10525. startPosition
  10526. } = props;
  10527. if (value) {
  10528. setActive(+startPosition);
  10529. nextTick(() => {
  10530. resize();
  10531. swipeTo(+startPosition, {
  10532. immediate: true
  10533. });
  10534. });
  10535. } else {
  10536. emit("close", {
  10537. index: state.active,
  10538. url: images[state.active]
  10539. });
  10540. }
  10541. });
  10542. return () => createVNode(Popup, mergeProps({
  10543. "class": [bem62(), props.className],
  10544. "overlayClass": [bem62("overlay"), props.overlayClass],
  10545. "onClosed": onClosed,
  10546. "onUpdate:show": updateShow
  10547. }, pick(props, popupProps2)), {
  10548. default: () => [renderClose(), renderImages(), renderIndex(), renderCover()]
  10549. });
  10550. }
  10551. });
  10552. // node_modules/vant/es/image-preview/function-call.mjs
  10553. var instance2;
  10554. var defaultConfig = {
  10555. loop: true,
  10556. images: [],
  10557. maxZoom: 3,
  10558. minZoom: 1 / 3,
  10559. onScale: void 0,
  10560. onClose: void 0,
  10561. onChange: void 0,
  10562. teleport: "body",
  10563. className: "",
  10564. showIndex: true,
  10565. closeable: false,
  10566. closeIcon: "clear",
  10567. transition: void 0,
  10568. beforeClose: void 0,
  10569. overlayStyle: void 0,
  10570. overlayClass: void 0,
  10571. startPosition: 0,
  10572. swipeDuration: 300,
  10573. showIndicators: false,
  10574. closeOnPopstate: true,
  10575. closeIconPosition: "top-right"
  10576. };
  10577. function initInstance2() {
  10578. ({
  10579. instance: instance2
  10580. } = mountComponent({
  10581. setup() {
  10582. const {
  10583. state,
  10584. toggle
  10585. } = usePopupState();
  10586. const onClosed = () => {
  10587. state.images = [];
  10588. };
  10589. return () => createVNode(stdin_default70, mergeProps(state, {
  10590. "onClosed": onClosed,
  10591. "onUpdate:show": toggle
  10592. }), null);
  10593. }
  10594. }));
  10595. }
  10596. var ImagePreview = (options, startPosition = 0) => {
  10597. if (!inBrowser) {
  10598. return;
  10599. }
  10600. if (!instance2) {
  10601. initInstance2();
  10602. }
  10603. options = Array.isArray(options) ? {
  10604. images: options,
  10605. startPosition
  10606. } : options;
  10607. instance2.open(extend({}, defaultConfig, options));
  10608. return instance2;
  10609. };
  10610. ImagePreview.Component = withInstall(stdin_default70);
  10611. ImagePreview.install = (app) => {
  10612. app.use(ImagePreview.Component);
  10613. };
  10614. // node_modules/vant/es/index-bar/IndexBar.mjs
  10615. function genAlphabet() {
  10616. const charCodeOfA = "A".charCodeAt(0);
  10617. const indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
  10618. return indexList;
  10619. }
  10620. var [name67, bem63] = createNamespace("index-bar");
  10621. var indexBarProps = {
  10622. sticky: truthProp,
  10623. zIndex: numericProp,
  10624. teleport: [String, Object],
  10625. highlightColor: String,
  10626. stickyOffsetTop: makeNumberProp(0),
  10627. indexList: {
  10628. type: Array,
  10629. default: genAlphabet
  10630. }
  10631. };
  10632. var INDEX_BAR_KEY = Symbol(name67);
  10633. var stdin_default71 = defineComponent({
  10634. name: name67,
  10635. props: indexBarProps,
  10636. emits: ["select", "change"],
  10637. setup(props, {
  10638. emit,
  10639. slots
  10640. }) {
  10641. const root = ref();
  10642. const sidebar = ref();
  10643. const activeAnchor = ref("");
  10644. const touch = useTouch();
  10645. const scrollParent = useScrollParent(root);
  10646. const {
  10647. children,
  10648. linkChildren
  10649. } = useChildren(INDEX_BAR_KEY);
  10650. let selectActiveIndex;
  10651. linkChildren({
  10652. props
  10653. });
  10654. const sidebarStyle = computed(() => {
  10655. if (isDef(props.zIndex)) {
  10656. return {
  10657. zIndex: +props.zIndex + 1
  10658. };
  10659. }
  10660. });
  10661. const highlightStyle = computed(() => {
  10662. if (props.highlightColor) {
  10663. return {
  10664. color: props.highlightColor
  10665. };
  10666. }
  10667. });
  10668. const getActiveAnchor = (scrollTop, rects) => {
  10669. for (let i = children.length - 1; i >= 0; i--) {
  10670. const prevHeight = i > 0 ? rects[i - 1].height : 0;
  10671. const reachTop = props.sticky ? prevHeight + props.stickyOffsetTop : 0;
  10672. if (scrollTop + reachTop >= rects[i].top) {
  10673. return i;
  10674. }
  10675. }
  10676. return -1;
  10677. };
  10678. const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
  10679. const onScroll = () => {
  10680. if (isHidden(root)) {
  10681. return;
  10682. }
  10683. const {
  10684. sticky,
  10685. indexList
  10686. } = props;
  10687. const scrollTop = getScrollTop(scrollParent.value);
  10688. const scrollParentRect = useRect(scrollParent);
  10689. const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
  10690. let active = -1;
  10691. if (selectActiveIndex) {
  10692. const match = getMatchAnchor(selectActiveIndex);
  10693. if (match) {
  10694. const rect = match.getRect(scrollParent.value, scrollParentRect);
  10695. active = getActiveAnchor(rect.top, rects);
  10696. }
  10697. } else {
  10698. active = getActiveAnchor(scrollTop, rects);
  10699. }
  10700. activeAnchor.value = indexList[active];
  10701. if (sticky) {
  10702. children.forEach((item, index) => {
  10703. const {
  10704. state,
  10705. $el
  10706. } = item;
  10707. if (index === active || index === active - 1) {
  10708. const rect = $el.getBoundingClientRect();
  10709. state.left = rect.left;
  10710. state.width = rect.width;
  10711. } else {
  10712. state.left = null;
  10713. state.width = null;
  10714. }
  10715. if (index === active) {
  10716. state.active = true;
  10717. state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
  10718. } else if (index === active - 1 && selectActiveIndex === "") {
  10719. const activeItemTop = rects[active].top - scrollTop;
  10720. state.active = activeItemTop > 0;
  10721. state.top = activeItemTop + scrollParentRect.top - rects[index].height;
  10722. } else {
  10723. state.active = false;
  10724. }
  10725. });
  10726. }
  10727. selectActiveIndex = "";
  10728. };
  10729. const init = () => {
  10730. nextTick(onScroll);
  10731. };
  10732. useEventListener("scroll", onScroll, {
  10733. target: scrollParent,
  10734. passive: true
  10735. });
  10736. onMounted(init);
  10737. watch(() => props.indexList, init);
  10738. watch(activeAnchor, (value) => {
  10739. if (value) {
  10740. emit("change", value);
  10741. }
  10742. });
  10743. const renderIndexes = () => props.indexList.map((index) => {
  10744. const active = index === activeAnchor.value;
  10745. return createVNode("span", {
  10746. "class": bem63("index", {
  10747. active
  10748. }),
  10749. "style": active ? highlightStyle.value : void 0,
  10750. "data-index": index
  10751. }, [index]);
  10752. });
  10753. const scrollTo = (index) => {
  10754. selectActiveIndex = String(index);
  10755. const match = getMatchAnchor(selectActiveIndex);
  10756. if (match) {
  10757. const scrollTop = getScrollTop(scrollParent.value);
  10758. const scrollParentRect = useRect(scrollParent);
  10759. const {
  10760. offsetHeight
  10761. } = document.documentElement;
  10762. match.$el.scrollIntoView();
  10763. if (scrollTop === offsetHeight - scrollParentRect.height) {
  10764. onScroll();
  10765. return;
  10766. }
  10767. if (props.sticky && props.stickyOffsetTop) {
  10768. setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
  10769. }
  10770. emit("select", match.index);
  10771. }
  10772. };
  10773. const scrollToElement = (element) => {
  10774. const {
  10775. index
  10776. } = element.dataset;
  10777. if (index) {
  10778. scrollTo(index);
  10779. }
  10780. };
  10781. const onClickSidebar = (event) => {
  10782. scrollToElement(event.target);
  10783. };
  10784. let touchActiveIndex;
  10785. const onTouchMove = (event) => {
  10786. touch.move(event);
  10787. if (touch.isVertical()) {
  10788. preventDefault(event);
  10789. const {
  10790. clientX,
  10791. clientY
  10792. } = event.touches[0];
  10793. const target = document.elementFromPoint(clientX, clientY);
  10794. if (target) {
  10795. const {
  10796. index
  10797. } = target.dataset;
  10798. if (index && touchActiveIndex !== index) {
  10799. touchActiveIndex = index;
  10800. scrollToElement(target);
  10801. }
  10802. }
  10803. }
  10804. };
  10805. const renderSidebar = () => createVNode("div", {
  10806. "ref": sidebar,
  10807. "class": bem63("sidebar"),
  10808. "style": sidebarStyle.value,
  10809. "onClick": onClickSidebar,
  10810. "onTouchstartPassive": touch.start
  10811. }, [renderIndexes()]);
  10812. useExpose({
  10813. scrollTo
  10814. });
  10815. useEventListener("touchmove", onTouchMove, {
  10816. target: sidebar
  10817. });
  10818. return () => {
  10819. var _a;
  10820. return createVNode("div", {
  10821. "ref": root,
  10822. "class": bem63()
  10823. }, [props.teleport ? createVNode(Teleport, {
  10824. "to": props.teleport
  10825. }, {
  10826. default: () => [renderSidebar()]
  10827. }) : renderSidebar(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
  10828. };
  10829. }
  10830. });
  10831. // node_modules/vant/es/index-anchor/IndexAnchor.mjs
  10832. var [name68, bem64] = createNamespace("index-anchor");
  10833. var indexAnchorProps = {
  10834. index: numericProp
  10835. };
  10836. var stdin_default72 = defineComponent({
  10837. name: name68,
  10838. props: indexAnchorProps,
  10839. setup(props, {
  10840. slots
  10841. }) {
  10842. const state = reactive({
  10843. top: 0,
  10844. left: null,
  10845. rect: {
  10846. top: 0,
  10847. height: 0
  10848. },
  10849. width: null,
  10850. active: false
  10851. });
  10852. const root = ref();
  10853. const {
  10854. parent
  10855. } = useParent(INDEX_BAR_KEY);
  10856. if (!parent) {
  10857. if (true) {
  10858. console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
  10859. }
  10860. return;
  10861. }
  10862. const isSticky = () => state.active && parent.props.sticky;
  10863. const anchorStyle = computed(() => {
  10864. const {
  10865. zIndex,
  10866. highlightColor
  10867. } = parent.props;
  10868. if (isSticky()) {
  10869. return extend(getZIndexStyle(zIndex), {
  10870. left: state.left ? `${state.left}px` : void 0,
  10871. width: state.width ? `${state.width}px` : void 0,
  10872. transform: state.top ? `translate3d(0, ${state.top}px, 0)` : void 0,
  10873. color: highlightColor
  10874. });
  10875. }
  10876. });
  10877. const getRect = (scrollParent, scrollParentRect) => {
  10878. const rootRect = useRect(root);
  10879. state.rect.height = rootRect.height;
  10880. if (scrollParent === window || scrollParent === document.body) {
  10881. state.rect.top = rootRect.top + getRootScrollTop();
  10882. } else {
  10883. state.rect.top = rootRect.top + getScrollTop(scrollParent) - scrollParentRect.top;
  10884. }
  10885. return state.rect;
  10886. };
  10887. useExpose({
  10888. state,
  10889. getRect
  10890. });
  10891. return () => {
  10892. const sticky = isSticky();
  10893. return createVNode("div", {
  10894. "ref": root,
  10895. "style": {
  10896. height: sticky ? `${state.rect.height}px` : void 0
  10897. }
  10898. }, [createVNode("div", {
  10899. "style": anchorStyle.value,
  10900. "class": [bem64({
  10901. sticky
  10902. }), {
  10903. [BORDER_BOTTOM]: sticky
  10904. }]
  10905. }, [slots.default ? slots.default() : props.index])]);
  10906. };
  10907. }
  10908. });
  10909. // node_modules/vant/es/index-anchor/index.mjs
  10910. var IndexAnchor = withInstall(stdin_default72);
  10911. // node_modules/vant/es/index-bar/index.mjs
  10912. var IndexBar = withInstall(stdin_default71);
  10913. // node_modules/vant/es/list/List.mjs
  10914. var [name69, bem65, t14] = createNamespace("list");
  10915. var listProps = {
  10916. error: Boolean,
  10917. offset: makeNumericProp(300),
  10918. loading: Boolean,
  10919. finished: Boolean,
  10920. errorText: String,
  10921. direction: makeStringProp("down"),
  10922. loadingText: String,
  10923. finishedText: String,
  10924. immediateCheck: truthProp
  10925. };
  10926. var stdin_default73 = defineComponent({
  10927. name: name69,
  10928. props: listProps,
  10929. emits: ["load", "update:error", "update:loading"],
  10930. setup(props, {
  10931. emit,
  10932. slots
  10933. }) {
  10934. const loading = ref(props.loading);
  10935. const root = ref();
  10936. const placeholder = ref();
  10937. const tabStatus = useTabStatus();
  10938. const scrollParent = useScrollParent(root);
  10939. const check = () => {
  10940. nextTick(() => {
  10941. if (loading.value || props.finished || props.error || (tabStatus == null ? void 0 : tabStatus.value) === false) {
  10942. return;
  10943. }
  10944. const {
  10945. offset: offset2,
  10946. direction
  10947. } = props;
  10948. const scrollParentRect = useRect(scrollParent);
  10949. if (!scrollParentRect.height || isHidden(root)) {
  10950. return;
  10951. }
  10952. let isReachEdge = false;
  10953. const placeholderRect = useRect(placeholder);
  10954. if (direction === "up") {
  10955. isReachEdge = scrollParentRect.top - placeholderRect.top <= offset2;
  10956. } else {
  10957. isReachEdge = placeholderRect.bottom - scrollParentRect.bottom <= offset2;
  10958. }
  10959. if (isReachEdge) {
  10960. loading.value = true;
  10961. emit("update:loading", true);
  10962. emit("load");
  10963. }
  10964. });
  10965. };
  10966. const renderFinishedText = () => {
  10967. if (props.finished) {
  10968. const text = slots.finished ? slots.finished() : props.finishedText;
  10969. if (text) {
  10970. return createVNode("div", {
  10971. "class": bem65("finished-text")
  10972. }, [text]);
  10973. }
  10974. }
  10975. };
  10976. const clickErrorText = () => {
  10977. emit("update:error", false);
  10978. check();
  10979. };
  10980. const renderErrorText = () => {
  10981. if (props.error) {
  10982. const text = slots.error ? slots.error() : props.errorText;
  10983. if (text) {
  10984. return createVNode("div", {
  10985. "role": "button",
  10986. "class": bem65("error-text"),
  10987. "tabindex": 0,
  10988. "onClick": clickErrorText
  10989. }, [text]);
  10990. }
  10991. }
  10992. };
  10993. const renderLoading = () => {
  10994. if (loading.value && !props.finished) {
  10995. return createVNode("div", {
  10996. "class": bem65("loading")
  10997. }, [slots.loading ? slots.loading() : createVNode(Loading, {
  10998. "class": bem65("loading-icon")
  10999. }, {
  11000. default: () => [props.loadingText || t14("loading")]
  11001. })]);
  11002. }
  11003. };
  11004. watch(() => [props.loading, props.finished, props.error], check);
  11005. if (tabStatus) {
  11006. watch(tabStatus, (tabActive) => {
  11007. if (tabActive) {
  11008. check();
  11009. }
  11010. });
  11011. }
  11012. onUpdated(() => {
  11013. loading.value = props.loading;
  11014. });
  11015. onMounted(() => {
  11016. if (props.immediateCheck) {
  11017. check();
  11018. }
  11019. });
  11020. useExpose({
  11021. check
  11022. });
  11023. useEventListener("scroll", check, {
  11024. target: scrollParent,
  11025. passive: true
  11026. });
  11027. return () => {
  11028. var _a;
  11029. const Content = (_a = slots.default) == null ? void 0 : _a.call(slots);
  11030. const Placeholder = createVNode("div", {
  11031. "ref": placeholder,
  11032. "class": bem65("placeholder")
  11033. }, null);
  11034. return createVNode("div", {
  11035. "ref": root,
  11036. "role": "feed",
  11037. "class": bem65(),
  11038. "aria-busy": loading.value
  11039. }, [props.direction === "down" ? Content : Placeholder, renderLoading(), renderFinishedText(), renderErrorText(), props.direction === "up" ? Content : Placeholder]);
  11040. };
  11041. }
  11042. });
  11043. // node_modules/vant/es/list/index.mjs
  11044. var List = withInstall(stdin_default73);
  11045. // node_modules/vant/es/nav-bar/NavBar.mjs
  11046. var [name70, bem66] = createNamespace("nav-bar");
  11047. var navBarProps = {
  11048. title: String,
  11049. fixed: Boolean,
  11050. zIndex: numericProp,
  11051. border: truthProp,
  11052. leftText: String,
  11053. rightText: String,
  11054. leftArrow: Boolean,
  11055. placeholder: Boolean,
  11056. safeAreaInsetTop: Boolean
  11057. };
  11058. var stdin_default74 = defineComponent({
  11059. name: name70,
  11060. props: navBarProps,
  11061. emits: ["click-left", "click-right"],
  11062. setup(props, {
  11063. emit,
  11064. slots
  11065. }) {
  11066. const navBarRef = ref();
  11067. const renderPlaceholder = usePlaceholder(navBarRef, bem66);
  11068. const onClickLeft = (event) => emit("click-left", event);
  11069. const onClickRight = (event) => emit("click-right", event);
  11070. const renderLeft = () => {
  11071. if (slots.left) {
  11072. return slots.left();
  11073. }
  11074. return [props.leftArrow && createVNode(Icon, {
  11075. "class": bem66("arrow"),
  11076. "name": "arrow-left"
  11077. }, null), props.leftText && createVNode("span", {
  11078. "class": bem66("text")
  11079. }, [props.leftText])];
  11080. };
  11081. const renderRight = () => {
  11082. if (slots.right) {
  11083. return slots.right();
  11084. }
  11085. return createVNode("span", {
  11086. "class": bem66("text")
  11087. }, [props.rightText]);
  11088. };
  11089. const renderNavBar = () => {
  11090. const {
  11091. title,
  11092. fixed,
  11093. border,
  11094. zIndex
  11095. } = props;
  11096. const style = getZIndexStyle(zIndex);
  11097. const hasLeft = props.leftArrow || props.leftText || slots.left;
  11098. const hasRight = props.rightText || slots.right;
  11099. return createVNode("div", {
  11100. "ref": navBarRef,
  11101. "style": style,
  11102. "class": [bem66({
  11103. fixed
  11104. }), {
  11105. [BORDER_BOTTOM]: border,
  11106. "van-safe-area-top": props.safeAreaInsetTop
  11107. }]
  11108. }, [createVNode("div", {
  11109. "class": bem66("content")
  11110. }, [hasLeft && createVNode("div", {
  11111. "class": [bem66("left"), HAPTICS_FEEDBACK],
  11112. "onClick": onClickLeft
  11113. }, [renderLeft()]), createVNode("div", {
  11114. "class": [bem66("title"), "van-ellipsis"]
  11115. }, [slots.title ? slots.title() : title]), hasRight && createVNode("div", {
  11116. "class": [bem66("right"), HAPTICS_FEEDBACK],
  11117. "onClick": onClickRight
  11118. }, [renderRight()])])]);
  11119. };
  11120. return () => {
  11121. if (props.fixed && props.placeholder) {
  11122. return renderPlaceholder(renderNavBar);
  11123. }
  11124. return renderNavBar();
  11125. };
  11126. }
  11127. });
  11128. // node_modules/vant/es/nav-bar/index.mjs
  11129. var NavBar = withInstall(stdin_default74);
  11130. // node_modules/vant/es/notice-bar/NoticeBar.mjs
  11131. var [name71, bem67] = createNamespace("notice-bar");
  11132. var noticeBarProps = {
  11133. text: String,
  11134. mode: String,
  11135. color: String,
  11136. delay: makeNumericProp(1),
  11137. speed: makeNumericProp(60),
  11138. leftIcon: String,
  11139. wrapable: Boolean,
  11140. background: String,
  11141. scrollable: {
  11142. type: Boolean,
  11143. default: null
  11144. }
  11145. };
  11146. var stdin_default75 = defineComponent({
  11147. name: name71,
  11148. props: noticeBarProps,
  11149. emits: ["close", "replay"],
  11150. setup(props, {
  11151. emit,
  11152. slots
  11153. }) {
  11154. let wrapWidth = 0;
  11155. let contentWidth = 0;
  11156. let startTimer;
  11157. const wrapRef = ref();
  11158. const contentRef = ref();
  11159. const state = reactive({
  11160. show: true,
  11161. offset: 0,
  11162. duration: 0
  11163. });
  11164. const renderLeftIcon = () => {
  11165. if (slots["left-icon"]) {
  11166. return slots["left-icon"]();
  11167. }
  11168. if (props.leftIcon) {
  11169. return createVNode(Icon, {
  11170. "class": bem67("left-icon"),
  11171. "name": props.leftIcon
  11172. }, null);
  11173. }
  11174. };
  11175. const getRightIconName = () => {
  11176. if (props.mode === "closeable") {
  11177. return "cross";
  11178. }
  11179. if (props.mode === "link") {
  11180. return "arrow";
  11181. }
  11182. };
  11183. const onClickRightIcon = (event) => {
  11184. if (props.mode === "closeable") {
  11185. state.show = false;
  11186. emit("close", event);
  11187. }
  11188. };
  11189. const renderRightIcon = () => {
  11190. if (slots["right-icon"]) {
  11191. return slots["right-icon"]();
  11192. }
  11193. const name210 = getRightIconName();
  11194. if (name210) {
  11195. return createVNode(Icon, {
  11196. "name": name210,
  11197. "class": bem67("right-icon"),
  11198. "onClick": onClickRightIcon
  11199. }, null);
  11200. }
  11201. };
  11202. const onTransitionEnd = () => {
  11203. state.offset = wrapWidth;
  11204. state.duration = 0;
  11205. raf(() => {
  11206. doubleRaf(() => {
  11207. state.offset = -contentWidth;
  11208. state.duration = (contentWidth + wrapWidth) / +props.speed;
  11209. emit("replay");
  11210. });
  11211. });
  11212. };
  11213. const renderMarquee = () => {
  11214. const ellipsis = props.scrollable === false && !props.wrapable;
  11215. const style = {
  11216. transform: state.offset ? `translateX(${state.offset}px)` : "",
  11217. transitionDuration: `${state.duration}s`
  11218. };
  11219. return createVNode("div", {
  11220. "ref": wrapRef,
  11221. "role": "marquee",
  11222. "class": bem67("wrap")
  11223. }, [createVNode("div", {
  11224. "ref": contentRef,
  11225. "style": style,
  11226. "class": [bem67("content"), {
  11227. "van-ellipsis": ellipsis
  11228. }],
  11229. "onTransitionend": onTransitionEnd
  11230. }, [slots.default ? slots.default() : props.text])]);
  11231. };
  11232. const reset = () => {
  11233. const {
  11234. delay,
  11235. speed,
  11236. scrollable
  11237. } = props;
  11238. const ms = isDef(delay) ? +delay * 1e3 : 0;
  11239. wrapWidth = 0;
  11240. contentWidth = 0;
  11241. state.offset = 0;
  11242. state.duration = 0;
  11243. clearTimeout(startTimer);
  11244. startTimer = setTimeout(() => {
  11245. if (!wrapRef.value || !contentRef.value || scrollable === false) {
  11246. return;
  11247. }
  11248. const wrapRefWidth = useRect(wrapRef).width;
  11249. const contentRefWidth = useRect(contentRef).width;
  11250. if (scrollable || contentRefWidth > wrapRefWidth) {
  11251. doubleRaf(() => {
  11252. wrapWidth = wrapRefWidth;
  11253. contentWidth = contentRefWidth;
  11254. state.offset = -contentWidth;
  11255. state.duration = contentWidth / +speed;
  11256. });
  11257. }
  11258. }, ms);
  11259. };
  11260. onPopupReopen(reset);
  11261. onMountedOrActivated(reset);
  11262. useEventListener("pageshow", reset);
  11263. useExpose({
  11264. reset
  11265. });
  11266. watch(() => [props.text, props.scrollable], reset);
  11267. return () => {
  11268. const {
  11269. color,
  11270. wrapable,
  11271. background
  11272. } = props;
  11273. return withDirectives(createVNode("div", {
  11274. "role": "alert",
  11275. "class": bem67({
  11276. wrapable
  11277. }),
  11278. "style": {
  11279. color,
  11280. background
  11281. }
  11282. }, [renderLeftIcon(), renderMarquee(), renderRightIcon()]), [[vShow, state.show]]);
  11283. };
  11284. }
  11285. });
  11286. // node_modules/vant/es/notice-bar/index.mjs
  11287. var NoticeBar = withInstall(stdin_default75);
  11288. // node_modules/vant/es/notify/Notify.mjs
  11289. var [name72, bem68] = createNamespace("notify");
  11290. var notifyProps = extend({}, popupSharedProps, {
  11291. type: makeStringProp("danger"),
  11292. color: String,
  11293. message: numericProp,
  11294. position: makeStringProp("top"),
  11295. className: unknownProp,
  11296. background: String,
  11297. lockScroll: Boolean
  11298. });
  11299. var stdin_default76 = defineComponent({
  11300. name: name72,
  11301. props: notifyProps,
  11302. emits: ["update:show"],
  11303. setup(props, {
  11304. emit,
  11305. slots
  11306. }) {
  11307. const updateShow = (show) => emit("update:show", show);
  11308. return () => createVNode(Popup, {
  11309. "show": props.show,
  11310. "class": [bem68([props.type]), props.className],
  11311. "style": {
  11312. color: props.color,
  11313. background: props.background
  11314. },
  11315. "overlay": false,
  11316. "position": props.position,
  11317. "duration": 0.2,
  11318. "lockScroll": props.lockScroll,
  11319. "onUpdate:show": updateShow
  11320. }, {
  11321. default: () => [slots.default ? slots.default() : props.message]
  11322. });
  11323. }
  11324. });
  11325. // node_modules/vant/es/notify/function-call.mjs
  11326. var timer;
  11327. var instance3;
  11328. var parseOptions2 = (message) => isObject(message) ? message : {
  11329. message
  11330. };
  11331. function initInstance3() {
  11332. ({
  11333. instance: instance3
  11334. } = mountComponent({
  11335. setup() {
  11336. const {
  11337. state,
  11338. toggle
  11339. } = usePopupState();
  11340. return () => createVNode(stdin_default76, mergeProps(state, {
  11341. "onUpdate:show": toggle
  11342. }), null);
  11343. }
  11344. }));
  11345. }
  11346. function Notify(options) {
  11347. if (!inBrowser) {
  11348. return;
  11349. }
  11350. if (!instance3) {
  11351. initInstance3();
  11352. }
  11353. options = extend({}, Notify.currentOptions, parseOptions2(options));
  11354. instance3.open(options);
  11355. clearTimeout(timer);
  11356. if (options.duration > 0) {
  11357. timer = window.setTimeout(Notify.clear, options.duration);
  11358. }
  11359. return instance3;
  11360. }
  11361. var getDefaultOptions = () => ({
  11362. type: "danger",
  11363. color: void 0,
  11364. message: "",
  11365. onClose: void 0,
  11366. onClick: void 0,
  11367. onOpened: void 0,
  11368. duration: 3e3,
  11369. position: void 0,
  11370. className: "",
  11371. lockScroll: false,
  11372. background: void 0
  11373. });
  11374. Notify.clear = () => {
  11375. if (instance3) {
  11376. instance3.toggle(false);
  11377. }
  11378. };
  11379. Notify.currentOptions = getDefaultOptions();
  11380. Notify.setDefaultOptions = (options) => {
  11381. extend(Notify.currentOptions, options);
  11382. };
  11383. Notify.resetDefaultOptions = () => {
  11384. Notify.currentOptions = getDefaultOptions();
  11385. };
  11386. Notify.Component = withInstall(stdin_default76);
  11387. Notify.install = (app) => {
  11388. app.use(Notify.Component);
  11389. app.config.globalProperties.$notify = Notify;
  11390. };
  11391. // node_modules/vant/es/number-keyboard/NumberKeyboardKey.mjs
  11392. var [name73, bem69] = createNamespace("key");
  11393. var CollapseIcon = createVNode("svg", {
  11394. "class": bem69("collapse-icon"),
  11395. "viewBox": "0 0 30 24"
  11396. }, [createVNode("path", {
  11397. "d": "M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z",
  11398. "fill": "currentColor"
  11399. }, null)]);
  11400. var DeleteIcon = createVNode("svg", {
  11401. "class": bem69("delete-icon"),
  11402. "viewBox": "0 0 32 22"
  11403. }, [createVNode("path", {
  11404. "d": "M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z",
  11405. "fill": "currentColor"
  11406. }, null)]);
  11407. var stdin_default77 = defineComponent({
  11408. name: name73,
  11409. props: {
  11410. type: String,
  11411. text: numericProp,
  11412. color: String,
  11413. wider: Boolean,
  11414. large: Boolean,
  11415. loading: Boolean
  11416. },
  11417. emits: ["press"],
  11418. setup(props, {
  11419. emit,
  11420. slots
  11421. }) {
  11422. const active = ref(false);
  11423. const touch = useTouch();
  11424. const onTouchStart = (event) => {
  11425. touch.start(event);
  11426. active.value = true;
  11427. };
  11428. const onTouchMove = (event) => {
  11429. touch.move(event);
  11430. if (touch.direction.value) {
  11431. active.value = false;
  11432. }
  11433. };
  11434. const onTouchEnd = (event) => {
  11435. if (active.value) {
  11436. if (!slots.default) {
  11437. preventDefault(event);
  11438. }
  11439. active.value = false;
  11440. emit("press", props.text, props.type);
  11441. }
  11442. };
  11443. const renderContent = () => {
  11444. if (props.loading) {
  11445. return createVNode(Loading, {
  11446. "class": bem69("loading-icon")
  11447. }, null);
  11448. }
  11449. const text = slots.default ? slots.default() : props.text;
  11450. switch (props.type) {
  11451. case "delete":
  11452. return text || DeleteIcon;
  11453. case "extra":
  11454. return text || CollapseIcon;
  11455. default:
  11456. return text;
  11457. }
  11458. };
  11459. return () => createVNode("div", {
  11460. "class": bem69("wrapper", {
  11461. wider: props.wider
  11462. }),
  11463. "onTouchstartPassive": onTouchStart,
  11464. "onTouchmovePassive": onTouchMove,
  11465. "onTouchend": onTouchEnd,
  11466. "onTouchcancel": onTouchEnd
  11467. }, [createVNode("div", {
  11468. "role": "button",
  11469. "tabindex": 0,
  11470. "class": bem69([props.color, {
  11471. large: props.large,
  11472. active: active.value,
  11473. delete: props.type === "delete"
  11474. }])
  11475. }, [renderContent()])]);
  11476. }
  11477. });
  11478. // node_modules/vant/es/number-keyboard/NumberKeyboard.mjs
  11479. var [name74, bem70] = createNamespace("number-keyboard");
  11480. var numberKeyboardProps = {
  11481. show: Boolean,
  11482. title: String,
  11483. theme: makeStringProp("default"),
  11484. zIndex: numericProp,
  11485. teleport: [String, Object],
  11486. maxlength: makeNumericProp(Infinity),
  11487. modelValue: makeStringProp(""),
  11488. transition: truthProp,
  11489. blurOnClose: truthProp,
  11490. showDeleteKey: truthProp,
  11491. randomKeyOrder: Boolean,
  11492. closeButtonText: String,
  11493. deleteButtonText: String,
  11494. closeButtonLoading: Boolean,
  11495. hideOnClickOutside: truthProp,
  11496. safeAreaInsetBottom: truthProp,
  11497. extraKey: {
  11498. type: [String, Array],
  11499. default: ""
  11500. }
  11501. };
  11502. function shuffle(array) {
  11503. for (let i = array.length - 1; i > 0; i--) {
  11504. const j = Math.floor(Math.random() * (i + 1));
  11505. const temp = array[i];
  11506. array[i] = array[j];
  11507. array[j] = temp;
  11508. }
  11509. return array;
  11510. }
  11511. var stdin_default78 = defineComponent({
  11512. name: name74,
  11513. inheritAttrs: false,
  11514. props: numberKeyboardProps,
  11515. emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
  11516. setup(props, {
  11517. emit,
  11518. slots,
  11519. attrs
  11520. }) {
  11521. const root = ref();
  11522. const genBasicKeys = () => {
  11523. const keys2 = Array(9).fill("").map((_, i) => ({
  11524. text: i + 1
  11525. }));
  11526. if (props.randomKeyOrder) {
  11527. shuffle(keys2);
  11528. }
  11529. return keys2;
  11530. };
  11531. const genDefaultKeys = () => [...genBasicKeys(), {
  11532. text: props.extraKey,
  11533. type: "extra"
  11534. }, {
  11535. text: 0
  11536. }, {
  11537. text: props.showDeleteKey ? props.deleteButtonText : "",
  11538. type: props.showDeleteKey ? "delete" : ""
  11539. }];
  11540. const genCustomKeys = () => {
  11541. const keys2 = genBasicKeys();
  11542. const {
  11543. extraKey
  11544. } = props;
  11545. const extraKeys = Array.isArray(extraKey) ? extraKey : [extraKey];
  11546. if (extraKeys.length === 1) {
  11547. keys2.push({
  11548. text: 0,
  11549. wider: true
  11550. }, {
  11551. text: extraKeys[0],
  11552. type: "extra"
  11553. });
  11554. } else if (extraKeys.length === 2) {
  11555. keys2.push({
  11556. text: extraKeys[0],
  11557. type: "extra"
  11558. }, {
  11559. text: 0
  11560. }, {
  11561. text: extraKeys[1],
  11562. type: "extra"
  11563. });
  11564. }
  11565. return keys2;
  11566. };
  11567. const keys = computed(() => props.theme === "custom" ? genCustomKeys() : genDefaultKeys());
  11568. const onBlur = () => {
  11569. if (props.show) {
  11570. emit("blur");
  11571. }
  11572. };
  11573. const onClose = () => {
  11574. emit("close");
  11575. if (props.blurOnClose) {
  11576. onBlur();
  11577. }
  11578. };
  11579. const onAnimationEnd = () => emit(props.show ? "show" : "hide");
  11580. const onPress = (text, type) => {
  11581. if (text === "") {
  11582. if (type === "extra") {
  11583. onBlur();
  11584. }
  11585. return;
  11586. }
  11587. const value = props.modelValue;
  11588. if (type === "delete") {
  11589. emit("delete");
  11590. emit("update:modelValue", value.slice(0, value.length - 1));
  11591. } else if (type === "close") {
  11592. onClose();
  11593. } else if (value.length < props.maxlength) {
  11594. emit("input", text);
  11595. emit("update:modelValue", value + text);
  11596. }
  11597. };
  11598. const renderTitle = () => {
  11599. const {
  11600. title,
  11601. theme,
  11602. closeButtonText
  11603. } = props;
  11604. const leftSlot = slots["title-left"];
  11605. const showClose = closeButtonText && theme === "default";
  11606. const showTitle = title || showClose || leftSlot;
  11607. if (!showTitle) {
  11608. return;
  11609. }
  11610. return createVNode("div", {
  11611. "class": bem70("header")
  11612. }, [leftSlot && createVNode("span", {
  11613. "class": bem70("title-left")
  11614. }, [leftSlot()]), title && createVNode("h2", {
  11615. "class": bem70("title")
  11616. }, [title]), showClose && createVNode("button", {
  11617. "type": "button",
  11618. "class": [bem70("close"), HAPTICS_FEEDBACK],
  11619. "onClick": onClose
  11620. }, [closeButtonText])]);
  11621. };
  11622. const renderKeys = () => keys.value.map((key) => {
  11623. const keySlots = {};
  11624. if (key.type === "delete") {
  11625. keySlots.default = slots.delete;
  11626. }
  11627. if (key.type === "extra") {
  11628. keySlots.default = slots["extra-key"];
  11629. }
  11630. return createVNode(stdin_default77, {
  11631. "key": key.text,
  11632. "text": key.text,
  11633. "type": key.type,
  11634. "wider": key.wider,
  11635. "color": key.color,
  11636. "onPress": onPress
  11637. }, keySlots);
  11638. });
  11639. const renderSidebar = () => {
  11640. if (props.theme === "custom") {
  11641. return createVNode("div", {
  11642. "class": bem70("sidebar")
  11643. }, [props.showDeleteKey && createVNode(stdin_default77, {
  11644. "large": true,
  11645. "text": props.deleteButtonText,
  11646. "type": "delete",
  11647. "onPress": onPress
  11648. }, {
  11649. delete: slots.delete
  11650. }), createVNode(stdin_default77, {
  11651. "large": true,
  11652. "text": props.closeButtonText,
  11653. "type": "close",
  11654. "color": "blue",
  11655. "loading": props.closeButtonLoading,
  11656. "onPress": onPress
  11657. }, null)]);
  11658. }
  11659. };
  11660. watch(() => props.show, (value) => {
  11661. if (!props.transition) {
  11662. emit(value ? "show" : "hide");
  11663. }
  11664. });
  11665. if (props.hideOnClickOutside) {
  11666. useClickAway(root, onBlur, {
  11667. eventName: "touchstart"
  11668. });
  11669. }
  11670. return () => {
  11671. const Title = renderTitle();
  11672. const Content = createVNode(Transition, {
  11673. "name": props.transition ? "van-slide-up" : ""
  11674. }, {
  11675. default: () => [withDirectives(createVNode("div", mergeProps({
  11676. "ref": root,
  11677. "style": getZIndexStyle(props.zIndex),
  11678. "class": bem70({
  11679. unfit: !props.safeAreaInsetBottom,
  11680. "with-title": !!Title
  11681. }),
  11682. "onAnimationend": onAnimationEnd,
  11683. "onTouchstartPassive": stopPropagation
  11684. }, attrs), [Title, createVNode("div", {
  11685. "class": bem70("body")
  11686. }, [createVNode("div", {
  11687. "class": bem70("keys")
  11688. }, [renderKeys()]), renderSidebar()])]), [[vShow, props.show]])]
  11689. });
  11690. if (props.teleport) {
  11691. return createVNode(Teleport, {
  11692. "to": props.teleport
  11693. }, {
  11694. default: () => [Content]
  11695. });
  11696. }
  11697. return Content;
  11698. };
  11699. }
  11700. });
  11701. // node_modules/vant/es/number-keyboard/index.mjs
  11702. var NumberKeyboard = withInstall(stdin_default78);
  11703. // node_modules/vant/es/pagination/Pagination.mjs
  11704. var [name75, bem71, t15] = createNamespace("pagination");
  11705. var makePage = (number, text, active) => ({
  11706. number,
  11707. text,
  11708. active
  11709. });
  11710. var paginationProps = {
  11711. mode: makeStringProp("multi"),
  11712. prevText: String,
  11713. nextText: String,
  11714. pageCount: makeNumericProp(0),
  11715. modelValue: makeNumberProp(0),
  11716. totalItems: makeNumericProp(0),
  11717. showPageSize: makeNumericProp(5),
  11718. itemsPerPage: makeNumericProp(10),
  11719. forceEllipses: Boolean
  11720. };
  11721. var stdin_default79 = defineComponent({
  11722. name: name75,
  11723. props: paginationProps,
  11724. emits: ["change", "update:modelValue"],
  11725. setup(props, {
  11726. emit,
  11727. slots
  11728. }) {
  11729. const count = computed(() => {
  11730. const {
  11731. pageCount,
  11732. totalItems,
  11733. itemsPerPage
  11734. } = props;
  11735. const count2 = +pageCount || Math.ceil(+totalItems / +itemsPerPage);
  11736. return Math.max(1, count2);
  11737. });
  11738. const pages = computed(() => {
  11739. const items = [];
  11740. const pageCount = count.value;
  11741. const showPageSize = +props.showPageSize;
  11742. const {
  11743. modelValue,
  11744. forceEllipses
  11745. } = props;
  11746. let startPage = 1;
  11747. let endPage = pageCount;
  11748. const isMaxSized = showPageSize < pageCount;
  11749. if (isMaxSized) {
  11750. startPage = Math.max(modelValue - Math.floor(showPageSize / 2), 1);
  11751. endPage = startPage + showPageSize - 1;
  11752. if (endPage > pageCount) {
  11753. endPage = pageCount;
  11754. startPage = endPage - showPageSize + 1;
  11755. }
  11756. }
  11757. for (let number = startPage; number <= endPage; number++) {
  11758. const page = makePage(number, number, number === modelValue);
  11759. items.push(page);
  11760. }
  11761. if (isMaxSized && showPageSize > 0 && forceEllipses) {
  11762. if (startPage > 1) {
  11763. const prevPages = makePage(startPage - 1, "...");
  11764. items.unshift(prevPages);
  11765. }
  11766. if (endPage < pageCount) {
  11767. const nextPages = makePage(endPage + 1, "...");
  11768. items.push(nextPages);
  11769. }
  11770. }
  11771. return items;
  11772. });
  11773. const updateModelValue = (value, emitChange) => {
  11774. value = clamp(value, 1, count.value);
  11775. if (props.modelValue !== value) {
  11776. emit("update:modelValue", value);
  11777. if (emitChange) {
  11778. emit("change", value);
  11779. }
  11780. }
  11781. };
  11782. watchEffect(() => updateModelValue(props.modelValue));
  11783. const renderDesc = () => createVNode("li", {
  11784. "class": bem71("page-desc")
  11785. }, [slots.pageDesc ? slots.pageDesc() : `${props.modelValue}/${count.value}`]);
  11786. const renderPrevButton = () => {
  11787. const {
  11788. mode,
  11789. modelValue
  11790. } = props;
  11791. const slot = slots["prev-text"];
  11792. const disabled = modelValue === 1;
  11793. return createVNode("li", {
  11794. "class": [bem71("item", {
  11795. disabled,
  11796. border: mode === "simple",
  11797. prev: true
  11798. }), BORDER_SURROUND]
  11799. }, [createVNode("button", {
  11800. "type": "button",
  11801. "disabled": disabled,
  11802. "onClick": () => updateModelValue(modelValue - 1, true)
  11803. }, [slot ? slot() : props.prevText || t15("prev")])]);
  11804. };
  11805. const renderNextButton = () => {
  11806. const {
  11807. mode,
  11808. modelValue
  11809. } = props;
  11810. const slot = slots["next-text"];
  11811. const disabled = modelValue === count.value;
  11812. return createVNode("li", {
  11813. "class": [bem71("item", {
  11814. disabled,
  11815. border: mode === "simple",
  11816. next: true
  11817. }), BORDER_SURROUND]
  11818. }, [createVNode("button", {
  11819. "type": "button",
  11820. "disabled": disabled,
  11821. "onClick": () => updateModelValue(modelValue + 1, true)
  11822. }, [slot ? slot() : props.nextText || t15("next")])]);
  11823. };
  11824. const renderPages = () => pages.value.map((page) => createVNode("li", {
  11825. "class": [bem71("item", {
  11826. active: page.active,
  11827. page: true
  11828. }), BORDER_SURROUND]
  11829. }, [createVNode("button", {
  11830. "type": "button",
  11831. "aria-current": page.active || void 0,
  11832. "onClick": () => updateModelValue(page.number, true)
  11833. }, [slots.page ? slots.page(page) : page.text])]));
  11834. return () => createVNode("nav", {
  11835. "role": "navigation",
  11836. "class": bem71()
  11837. }, [createVNode("ul", {
  11838. "class": bem71("items")
  11839. }, [renderPrevButton(), props.mode === "simple" ? renderDesc() : renderPages(), renderNextButton()])]);
  11840. }
  11841. });
  11842. // node_modules/vant/es/pagination/index.mjs
  11843. var Pagination = withInstall(stdin_default79);
  11844. // node_modules/vant/es/password-input/PasswordInput.mjs
  11845. var [name76, bem72] = createNamespace("password-input");
  11846. var passwordInputProps = {
  11847. info: String,
  11848. mask: truthProp,
  11849. value: makeStringProp(""),
  11850. gutter: numericProp,
  11851. length: makeNumericProp(6),
  11852. focused: Boolean,
  11853. errorInfo: String
  11854. };
  11855. var stdin_default80 = defineComponent({
  11856. name: name76,
  11857. props: passwordInputProps,
  11858. emits: ["focus"],
  11859. setup(props, {
  11860. emit
  11861. }) {
  11862. const onTouchStart = (event) => {
  11863. event.stopPropagation();
  11864. emit("focus", event);
  11865. };
  11866. const renderPoints = () => {
  11867. const Points = [];
  11868. const {
  11869. mask,
  11870. value,
  11871. length,
  11872. gutter,
  11873. focused
  11874. } = props;
  11875. for (let i = 0; i < length; i++) {
  11876. const char = value[i];
  11877. const showBorder = i !== 0 && !gutter;
  11878. const showCursor = focused && i === value.length;
  11879. let style;
  11880. if (i !== 0 && gutter) {
  11881. style = {
  11882. marginLeft: addUnit(gutter)
  11883. };
  11884. }
  11885. Points.push(createVNode("li", {
  11886. "class": [{
  11887. [BORDER_LEFT]: showBorder
  11888. }, bem72("item", {
  11889. focus: showCursor
  11890. })],
  11891. "style": style
  11892. }, [mask ? createVNode("i", {
  11893. "style": {
  11894. visibility: char ? "visible" : "hidden"
  11895. }
  11896. }, null) : char, showCursor && createVNode("div", {
  11897. "class": bem72("cursor")
  11898. }, null)]));
  11899. }
  11900. return Points;
  11901. };
  11902. return () => {
  11903. const info = props.errorInfo || props.info;
  11904. return createVNode("div", {
  11905. "class": bem72()
  11906. }, [createVNode("ul", {
  11907. "class": [bem72("security"), {
  11908. [BORDER_SURROUND]: !props.gutter
  11909. }],
  11910. "onTouchstartPassive": onTouchStart
  11911. }, [renderPoints()]), info && createVNode("div", {
  11912. "class": bem72(props.errorInfo ? "error-info" : "info")
  11913. }, [info])]);
  11914. };
  11915. }
  11916. });
  11917. // node_modules/vant/es/password-input/index.mjs
  11918. var PasswordInput = withInstall(stdin_default80);
  11919. // node_modules/@vant/popperjs/dist/index.esm.mjs
  11920. function getWindow(node) {
  11921. if (node == null) {
  11922. return window;
  11923. }
  11924. if (node.toString() !== "[object Window]") {
  11925. var ownerDocument = node.ownerDocument;
  11926. return ownerDocument ? ownerDocument.defaultView || window : window;
  11927. }
  11928. return node;
  11929. }
  11930. function isElement2(node) {
  11931. var OwnElement = getWindow(node).Element;
  11932. return node instanceof OwnElement || node instanceof Element;
  11933. }
  11934. function isHTMLElement(node) {
  11935. var OwnElement = getWindow(node).HTMLElement;
  11936. return node instanceof OwnElement || node instanceof HTMLElement;
  11937. }
  11938. function isShadowRoot(node) {
  11939. if (typeof ShadowRoot === "undefined") {
  11940. return false;
  11941. }
  11942. var OwnElement = getWindow(node).ShadowRoot;
  11943. return node instanceof OwnElement || node instanceof ShadowRoot;
  11944. }
  11945. var round = Math.round;
  11946. function getUAString() {
  11947. var uaData = navigator.userAgentData;
  11948. if (uaData != null && uaData.brands) {
  11949. return uaData.brands.map(function(item) {
  11950. return item.brand + "/" + item.version;
  11951. }).join(" ");
  11952. }
  11953. return navigator.userAgent;
  11954. }
  11955. function isLayoutViewport() {
  11956. return !/^((?!chrome|android).)*safari/i.test(getUAString());
  11957. }
  11958. function getBoundingClientRect(element, includeScale, isFixedStrategy) {
  11959. if (includeScale === void 0) {
  11960. includeScale = false;
  11961. }
  11962. if (isFixedStrategy === void 0) {
  11963. isFixedStrategy = false;
  11964. }
  11965. var clientRect = element.getBoundingClientRect();
  11966. var scaleX = 1;
  11967. var scaleY = 1;
  11968. if (includeScale && isHTMLElement(element)) {
  11969. scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
  11970. scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
  11971. }
  11972. var _ref = isElement2(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
  11973. var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
  11974. var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
  11975. var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
  11976. var width2 = clientRect.width / scaleX;
  11977. var height2 = clientRect.height / scaleY;
  11978. return {
  11979. width: width2,
  11980. height: height2,
  11981. top: y,
  11982. right: x + width2,
  11983. bottom: y + height2,
  11984. left: x,
  11985. x,
  11986. y
  11987. };
  11988. }
  11989. function getWindowScroll(node) {
  11990. var win = getWindow(node);
  11991. var scrollLeft = win.pageXOffset;
  11992. var scrollTop = win.pageYOffset;
  11993. return {
  11994. scrollLeft,
  11995. scrollTop
  11996. };
  11997. }
  11998. function getHTMLElementScroll(element) {
  11999. return {
  12000. scrollLeft: element.scrollLeft,
  12001. scrollTop: element.scrollTop
  12002. };
  12003. }
  12004. function getNodeScroll(node) {
  12005. if (node === getWindow(node) || !isHTMLElement(node)) {
  12006. return getWindowScroll(node);
  12007. } else {
  12008. return getHTMLElementScroll(node);
  12009. }
  12010. }
  12011. function getNodeName(element) {
  12012. return element ? (element.nodeName || "").toLowerCase() : null;
  12013. }
  12014. function getDocumentElement(element) {
  12015. return ((isElement2(element) ? element.ownerDocument : element.document) || window.document).documentElement;
  12016. }
  12017. function getWindowScrollBarX(element) {
  12018. return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
  12019. }
  12020. function getComputedStyle(element) {
  12021. return getWindow(element).getComputedStyle(element);
  12022. }
  12023. function isScrollParent(element) {
  12024. var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
  12025. return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
  12026. }
  12027. function isElementScaled(element) {
  12028. var rect = element.getBoundingClientRect();
  12029. var scaleX = round(rect.width) / element.offsetWidth || 1;
  12030. var scaleY = round(rect.height) / element.offsetHeight || 1;
  12031. return scaleX !== 1 || scaleY !== 1;
  12032. }
  12033. function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
  12034. if (isFixed === void 0) {
  12035. isFixed = false;
  12036. }
  12037. var isOffsetParentAnElement = isHTMLElement(offsetParent);
  12038. var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
  12039. var documentElement = getDocumentElement(offsetParent);
  12040. var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
  12041. var scroll = {
  12042. scrollLeft: 0,
  12043. scrollTop: 0
  12044. };
  12045. var offsets = {
  12046. x: 0,
  12047. y: 0
  12048. };
  12049. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  12050. if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) {
  12051. scroll = getNodeScroll(offsetParent);
  12052. }
  12053. if (isHTMLElement(offsetParent)) {
  12054. offsets = getBoundingClientRect(offsetParent, true);
  12055. offsets.x += offsetParent.clientLeft;
  12056. offsets.y += offsetParent.clientTop;
  12057. } else if (documentElement) {
  12058. offsets.x = getWindowScrollBarX(documentElement);
  12059. }
  12060. }
  12061. return {
  12062. x: rect.left + scroll.scrollLeft - offsets.x,
  12063. y: rect.top + scroll.scrollTop - offsets.y,
  12064. width: rect.width,
  12065. height: rect.height
  12066. };
  12067. }
  12068. function getLayoutRect(element) {
  12069. var clientRect = getBoundingClientRect(element);
  12070. var width2 = element.offsetWidth;
  12071. var height2 = element.offsetHeight;
  12072. if (Math.abs(clientRect.width - width2) <= 1) {
  12073. width2 = clientRect.width;
  12074. }
  12075. if (Math.abs(clientRect.height - height2) <= 1) {
  12076. height2 = clientRect.height;
  12077. }
  12078. return {
  12079. x: element.offsetLeft,
  12080. y: element.offsetTop,
  12081. width: width2,
  12082. height: height2
  12083. };
  12084. }
  12085. function getParentNode(element) {
  12086. if (getNodeName(element) === "html") {
  12087. return element;
  12088. }
  12089. return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element);
  12090. }
  12091. function getScrollParent2(node) {
  12092. if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) {
  12093. return node.ownerDocument.body;
  12094. }
  12095. if (isHTMLElement(node) && isScrollParent(node)) {
  12096. return node;
  12097. }
  12098. return getScrollParent2(getParentNode(node));
  12099. }
  12100. function listScrollParents(element, list) {
  12101. var _element$ownerDocumen;
  12102. if (list === void 0) {
  12103. list = [];
  12104. }
  12105. var scrollParent = getScrollParent2(element);
  12106. var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
  12107. var win = getWindow(scrollParent);
  12108. var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
  12109. var updatedList = list.concat(target);
  12110. return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));
  12111. }
  12112. function isTableElement(element) {
  12113. return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
  12114. }
  12115. function getTrueOffsetParent(element) {
  12116. if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
  12117. return null;
  12118. }
  12119. return element.offsetParent;
  12120. }
  12121. function getContainingBlock(element) {
  12122. var isFirefox = /firefox/i.test(getUAString());
  12123. var isIE = /Trident/i.test(getUAString());
  12124. if (isIE && isHTMLElement(element)) {
  12125. var elementCss = getComputedStyle(element);
  12126. if (elementCss.position === "fixed") {
  12127. return null;
  12128. }
  12129. }
  12130. var currentNode = getParentNode(element);
  12131. if (isShadowRoot(currentNode)) {
  12132. currentNode = currentNode.host;
  12133. }
  12134. while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
  12135. var css = getComputedStyle(currentNode);
  12136. if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
  12137. return currentNode;
  12138. } else {
  12139. currentNode = currentNode.parentNode;
  12140. }
  12141. }
  12142. return null;
  12143. }
  12144. function getOffsetParent(element) {
  12145. var window2 = getWindow(element);
  12146. var offsetParent = getTrueOffsetParent(element);
  12147. while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
  12148. offsetParent = getTrueOffsetParent(offsetParent);
  12149. }
  12150. if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) {
  12151. return window2;
  12152. }
  12153. return offsetParent || getContainingBlock(element) || window2;
  12154. }
  12155. var top = "top";
  12156. var bottom = "bottom";
  12157. var right = "right";
  12158. var left = "left";
  12159. var auto = "auto";
  12160. var basePlacements = [top, bottom, right, left];
  12161. var start = "start";
  12162. var end = "end";
  12163. var placements = [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
  12164. return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
  12165. }, []);
  12166. var beforeRead = "beforeRead";
  12167. var read = "read";
  12168. var afterRead = "afterRead";
  12169. var beforeMain = "beforeMain";
  12170. var main = "main";
  12171. var afterMain = "afterMain";
  12172. var beforeWrite = "beforeWrite";
  12173. var write = "write";
  12174. var afterWrite = "afterWrite";
  12175. var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
  12176. function order(modifiers) {
  12177. var map = /* @__PURE__ */ new Map();
  12178. var visited = /* @__PURE__ */ new Set();
  12179. var result = [];
  12180. modifiers.forEach(function(modifier) {
  12181. map.set(modifier.name, modifier);
  12182. });
  12183. function sort(modifier) {
  12184. visited.add(modifier.name);
  12185. var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
  12186. requires.forEach(function(dep) {
  12187. if (!visited.has(dep)) {
  12188. var depModifier = map.get(dep);
  12189. if (depModifier) {
  12190. sort(depModifier);
  12191. }
  12192. }
  12193. });
  12194. result.push(modifier);
  12195. }
  12196. modifiers.forEach(function(modifier) {
  12197. if (!visited.has(modifier.name)) {
  12198. sort(modifier);
  12199. }
  12200. });
  12201. return result;
  12202. }
  12203. function orderModifiers(modifiers) {
  12204. var orderedModifiers = order(modifiers);
  12205. return modifierPhases.reduce(function(acc, phase) {
  12206. return acc.concat(orderedModifiers.filter(function(modifier) {
  12207. return modifier.phase === phase;
  12208. }));
  12209. }, []);
  12210. }
  12211. function debounce(fn2) {
  12212. var pending;
  12213. return function() {
  12214. if (!pending) {
  12215. pending = new Promise(function(resolve) {
  12216. Promise.resolve().then(function() {
  12217. pending = void 0;
  12218. resolve(fn2());
  12219. });
  12220. });
  12221. }
  12222. return pending;
  12223. };
  12224. }
  12225. function format2(str) {
  12226. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  12227. args[_key - 1] = arguments[_key];
  12228. }
  12229. return [].concat(args).reduce(function(p, c) {
  12230. return p.replace(/%s/, c);
  12231. }, str);
  12232. }
  12233. var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
  12234. var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
  12235. var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
  12236. function validateModifiers(modifiers) {
  12237. modifiers.forEach(function(modifier) {
  12238. [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) {
  12239. return self.indexOf(value) === index;
  12240. }).forEach(function(key) {
  12241. switch (key) {
  12242. case "name":
  12243. if (typeof modifier.name !== "string") {
  12244. console.error(format2(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"'));
  12245. }
  12246. break;
  12247. case "enabled":
  12248. if (typeof modifier.enabled !== "boolean") {
  12249. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"'));
  12250. }
  12251. break;
  12252. case "phase":
  12253. if (modifierPhases.indexOf(modifier.phase) < 0) {
  12254. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"'));
  12255. }
  12256. break;
  12257. case "fn":
  12258. if (typeof modifier.fn !== "function") {
  12259. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"'));
  12260. }
  12261. break;
  12262. case "effect":
  12263. if (modifier.effect != null && typeof modifier.effect !== "function") {
  12264. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"'));
  12265. }
  12266. break;
  12267. case "requires":
  12268. if (modifier.requires != null && !Array.isArray(modifier.requires)) {
  12269. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"'));
  12270. }
  12271. break;
  12272. case "requiresIfExists":
  12273. if (!Array.isArray(modifier.requiresIfExists)) {
  12274. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"'));
  12275. }
  12276. break;
  12277. case "options":
  12278. case "data":
  12279. break;
  12280. default:
  12281. console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) {
  12282. return '"' + s + '"';
  12283. }).join(", ") + '; but "' + key + '" was provided.');
  12284. }
  12285. modifier.requires && modifier.requires.forEach(function(requirement) {
  12286. if (modifiers.find(function(mod) {
  12287. return mod.name === requirement;
  12288. }) == null) {
  12289. console.error(format2(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
  12290. }
  12291. });
  12292. });
  12293. });
  12294. }
  12295. function uniqueBy(arr, fn2) {
  12296. var identifiers = /* @__PURE__ */ new Set();
  12297. return arr.filter(function(item) {
  12298. var identifier = fn2(item);
  12299. if (!identifiers.has(identifier)) {
  12300. identifiers.add(identifier);
  12301. return true;
  12302. }
  12303. });
  12304. }
  12305. function getBasePlacement(placement) {
  12306. return placement.split("-")[0];
  12307. }
  12308. function mergeByName(modifiers) {
  12309. var merged = modifiers.reduce(function(merged2, current2) {
  12310. var existing = merged2[current2.name];
  12311. merged2[current2.name] = existing ? Object.assign({}, existing, current2, {
  12312. options: Object.assign({}, existing.options, current2.options),
  12313. data: Object.assign({}, existing.data, current2.data)
  12314. }) : current2;
  12315. return merged2;
  12316. }, {});
  12317. return Object.keys(merged).map(function(key) {
  12318. return merged[key];
  12319. });
  12320. }
  12321. function getVariation(placement) {
  12322. return placement.split("-")[1];
  12323. }
  12324. function getMainAxisFromPlacement(placement) {
  12325. return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
  12326. }
  12327. function computeOffsets(_ref) {
  12328. var reference = _ref.reference, element = _ref.element, placement = _ref.placement;
  12329. var basePlacement = placement ? getBasePlacement(placement) : null;
  12330. var variation = placement ? getVariation(placement) : null;
  12331. var commonX = reference.x + reference.width / 2 - element.width / 2;
  12332. var commonY = reference.y + reference.height / 2 - element.height / 2;
  12333. var offsets;
  12334. switch (basePlacement) {
  12335. case top:
  12336. offsets = {
  12337. x: commonX,
  12338. y: reference.y - element.height
  12339. };
  12340. break;
  12341. case bottom:
  12342. offsets = {
  12343. x: commonX,
  12344. y: reference.y + reference.height
  12345. };
  12346. break;
  12347. case right:
  12348. offsets = {
  12349. x: reference.x + reference.width,
  12350. y: commonY
  12351. };
  12352. break;
  12353. case left:
  12354. offsets = {
  12355. x: reference.x - element.width,
  12356. y: commonY
  12357. };
  12358. break;
  12359. default:
  12360. offsets = {
  12361. x: reference.x,
  12362. y: reference.y
  12363. };
  12364. }
  12365. var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
  12366. if (mainAxis != null) {
  12367. var len = mainAxis === "y" ? "height" : "width";
  12368. switch (variation) {
  12369. case start:
  12370. offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
  12371. break;
  12372. case end:
  12373. offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
  12374. break;
  12375. default:
  12376. }
  12377. }
  12378. return offsets;
  12379. }
  12380. var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.";
  12381. var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.";
  12382. var DEFAULT_OPTIONS = {
  12383. placement: "bottom",
  12384. modifiers: [],
  12385. strategy: "absolute"
  12386. };
  12387. function areValidElements() {
  12388. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  12389. args[_key] = arguments[_key];
  12390. }
  12391. return !args.some(function(element) {
  12392. return !(element && typeof element.getBoundingClientRect === "function");
  12393. });
  12394. }
  12395. function popperGenerator(generatorOptions) {
  12396. if (generatorOptions === void 0) {
  12397. generatorOptions = {};
  12398. }
  12399. var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions3 = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
  12400. return function createPopper2(reference, popper, options) {
  12401. if (options === void 0) {
  12402. options = defaultOptions3;
  12403. }
  12404. var state = {
  12405. placement: "bottom",
  12406. orderedModifiers: [],
  12407. options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions3),
  12408. modifiersData: {},
  12409. elements: {
  12410. reference,
  12411. popper
  12412. },
  12413. attributes: {},
  12414. styles: {}
  12415. };
  12416. var effectCleanupFns = [];
  12417. var isDestroyed = false;
  12418. var instance4 = {
  12419. state,
  12420. setOptions: function setOptions(setOptionsAction) {
  12421. var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
  12422. cleanupModifierEffects();
  12423. state.options = Object.assign({}, defaultOptions3, state.options, options2);
  12424. state.scrollParents = {
  12425. reference: isElement2(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
  12426. popper: listScrollParents(popper)
  12427. };
  12428. var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers)));
  12429. state.orderedModifiers = orderedModifiers.filter(function(m) {
  12430. return m.enabled;
  12431. });
  12432. if (true) {
  12433. var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) {
  12434. var name97 = _ref.name;
  12435. return name97;
  12436. });
  12437. validateModifiers(modifiers);
  12438. if (getBasePlacement(state.options.placement) === auto) {
  12439. var flipModifier = state.orderedModifiers.find(function(_ref2) {
  12440. var name97 = _ref2.name;
  12441. return name97 === "flip";
  12442. });
  12443. if (!flipModifier) {
  12444. console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
  12445. }
  12446. }
  12447. var _getComputedStyle = getComputedStyle(popper), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft;
  12448. if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) {
  12449. return parseFloat(margin);
  12450. })) {
  12451. console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
  12452. }
  12453. }
  12454. runModifierEffects();
  12455. return instance4.update();
  12456. },
  12457. forceUpdate: function forceUpdate() {
  12458. if (isDestroyed) {
  12459. return;
  12460. }
  12461. var _state$elements = state.elements, reference2 = _state$elements.reference, popper2 = _state$elements.popper;
  12462. if (!areValidElements(reference2, popper2)) {
  12463. if (true) {
  12464. console.error(INVALID_ELEMENT_ERROR);
  12465. }
  12466. return;
  12467. }
  12468. state.rects = {
  12469. reference: getCompositeRect(reference2, getOffsetParent(popper2), state.options.strategy === "fixed"),
  12470. popper: getLayoutRect(popper2)
  12471. };
  12472. state.reset = false;
  12473. state.placement = state.options.placement;
  12474. state.orderedModifiers.forEach(function(modifier) {
  12475. return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
  12476. });
  12477. var __debug_loops__ = 0;
  12478. for (var index = 0; index < state.orderedModifiers.length; index++) {
  12479. if (true) {
  12480. __debug_loops__ += 1;
  12481. if (__debug_loops__ > 100) {
  12482. console.error(INFINITE_LOOP_ERROR);
  12483. break;
  12484. }
  12485. }
  12486. if (state.reset === true) {
  12487. state.reset = false;
  12488. index = -1;
  12489. continue;
  12490. }
  12491. var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name97 = _state$orderedModifie.name;
  12492. if (typeof fn2 === "function") {
  12493. state = fn2({
  12494. state,
  12495. options: _options,
  12496. name: name97,
  12497. instance: instance4
  12498. }) || state;
  12499. }
  12500. }
  12501. },
  12502. update: debounce(function() {
  12503. return new Promise(function(resolve) {
  12504. instance4.forceUpdate();
  12505. resolve(state);
  12506. });
  12507. }),
  12508. destroy: function destroy() {
  12509. cleanupModifierEffects();
  12510. isDestroyed = true;
  12511. }
  12512. };
  12513. if (!areValidElements(reference, popper)) {
  12514. if (true) {
  12515. console.error(INVALID_ELEMENT_ERROR);
  12516. }
  12517. return instance4;
  12518. }
  12519. instance4.setOptions(options).then(function(state2) {
  12520. if (!isDestroyed && options.onFirstUpdate) {
  12521. options.onFirstUpdate(state2);
  12522. }
  12523. });
  12524. function runModifierEffects() {
  12525. state.orderedModifiers.forEach(function(_ref3) {
  12526. var name97 = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect3 = _ref3.effect;
  12527. if (typeof effect3 === "function") {
  12528. var cleanupFn = effect3({
  12529. state,
  12530. name: name97,
  12531. instance: instance4,
  12532. options: options2
  12533. });
  12534. var noopFn = function noopFn2() {
  12535. };
  12536. effectCleanupFns.push(cleanupFn || noopFn);
  12537. }
  12538. });
  12539. }
  12540. function cleanupModifierEffects() {
  12541. effectCleanupFns.forEach(function(fn2) {
  12542. return fn2();
  12543. });
  12544. effectCleanupFns = [];
  12545. }
  12546. return instance4;
  12547. };
  12548. }
  12549. var passive = {
  12550. passive: true
  12551. };
  12552. function effect(_ref) {
  12553. var state = _ref.state, instance4 = _ref.instance, options = _ref.options;
  12554. var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;
  12555. var window2 = getWindow(state.elements.popper);
  12556. var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
  12557. if (scroll) {
  12558. scrollParents.forEach(function(scrollParent) {
  12559. scrollParent.addEventListener("scroll", instance4.update, passive);
  12560. });
  12561. }
  12562. if (resize) {
  12563. window2.addEventListener("resize", instance4.update, passive);
  12564. }
  12565. return function() {
  12566. if (scroll) {
  12567. scrollParents.forEach(function(scrollParent) {
  12568. scrollParent.removeEventListener("scroll", instance4.update, passive);
  12569. });
  12570. }
  12571. if (resize) {
  12572. window2.removeEventListener("resize", instance4.update, passive);
  12573. }
  12574. };
  12575. }
  12576. var eventListeners_default = {
  12577. name: "eventListeners",
  12578. enabled: true,
  12579. phase: "write",
  12580. fn: function fn() {
  12581. },
  12582. effect,
  12583. data: {}
  12584. };
  12585. function popperOffsets(_ref) {
  12586. var state = _ref.state, name97 = _ref.name;
  12587. state.modifiersData[name97] = computeOffsets({
  12588. reference: state.rects.reference,
  12589. element: state.rects.popper,
  12590. strategy: "absolute",
  12591. placement: state.placement
  12592. });
  12593. }
  12594. var popperOffsets_default = {
  12595. name: "popperOffsets",
  12596. enabled: true,
  12597. phase: "read",
  12598. fn: popperOffsets,
  12599. data: {}
  12600. };
  12601. var unsetSides = {
  12602. top: "auto",
  12603. right: "auto",
  12604. bottom: "auto",
  12605. left: "auto"
  12606. };
  12607. function roundOffsetsByDPR(_ref) {
  12608. var x = _ref.x, y = _ref.y;
  12609. var win = window;
  12610. var dpr = win.devicePixelRatio || 1;
  12611. return {
  12612. x: round(x * dpr) / dpr || 0,
  12613. y: round(y * dpr) / dpr || 0
  12614. };
  12615. }
  12616. function mapToStyles(_ref2) {
  12617. var _Object$assign2;
  12618. var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
  12619. var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y;
  12620. var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
  12621. x,
  12622. y
  12623. }) : {
  12624. x,
  12625. y
  12626. };
  12627. x = _ref3.x;
  12628. y = _ref3.y;
  12629. var hasX = offsets.hasOwnProperty("x");
  12630. var hasY = offsets.hasOwnProperty("y");
  12631. var sideX = left;
  12632. var sideY = top;
  12633. var win = window;
  12634. if (adaptive) {
  12635. var offsetParent = getOffsetParent(popper);
  12636. var heightProp = "clientHeight";
  12637. var widthProp = "clientWidth";
  12638. if (offsetParent === getWindow(popper)) {
  12639. offsetParent = getDocumentElement(popper);
  12640. if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") {
  12641. heightProp = "scrollHeight";
  12642. widthProp = "scrollWidth";
  12643. }
  12644. }
  12645. offsetParent = offsetParent;
  12646. if (placement === top || (placement === left || placement === right) && variation === end) {
  12647. sideY = bottom;
  12648. var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];
  12649. y -= offsetY - popperRect.height;
  12650. y *= gpuAcceleration ? 1 : -1;
  12651. }
  12652. if (placement === left || (placement === top || placement === bottom) && variation === end) {
  12653. sideX = right;
  12654. var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];
  12655. x -= offsetX - popperRect.width;
  12656. x *= gpuAcceleration ? 1 : -1;
  12657. }
  12658. }
  12659. var commonStyles = Object.assign({
  12660. position
  12661. }, adaptive && unsetSides);
  12662. var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
  12663. x,
  12664. y
  12665. }) : {
  12666. x,
  12667. y
  12668. };
  12669. x = _ref4.x;
  12670. y = _ref4.y;
  12671. if (gpuAcceleration) {
  12672. var _Object$assign;
  12673. return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
  12674. }
  12675. return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
  12676. }
  12677. function computeStyles(_ref5) {
  12678. var state = _ref5.state, options = _ref5.options;
  12679. var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
  12680. if (true) {
  12681. var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || "";
  12682. if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) {
  12683. return transitionProperty.indexOf(property) >= 0;
  12684. })) {
  12685. console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
  12686. }
  12687. }
  12688. var commonStyles = {
  12689. placement: getBasePlacement(state.placement),
  12690. variation: getVariation(state.placement),
  12691. popper: state.elements.popper,
  12692. popperRect: state.rects.popper,
  12693. gpuAcceleration,
  12694. isFixed: state.options.strategy === "fixed"
  12695. };
  12696. if (state.modifiersData.popperOffsets != null) {
  12697. state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
  12698. offsets: state.modifiersData.popperOffsets,
  12699. position: state.options.strategy,
  12700. adaptive,
  12701. roundOffsets
  12702. })));
  12703. }
  12704. if (state.modifiersData.arrow != null) {
  12705. state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
  12706. offsets: state.modifiersData.arrow,
  12707. position: "absolute",
  12708. adaptive: false,
  12709. roundOffsets
  12710. })));
  12711. }
  12712. state.attributes.popper = Object.assign({}, state.attributes.popper, {
  12713. "data-popper-placement": state.placement
  12714. });
  12715. }
  12716. var computeStyles_default = {
  12717. name: "computeStyles",
  12718. enabled: true,
  12719. phase: "beforeWrite",
  12720. fn: computeStyles,
  12721. data: {}
  12722. };
  12723. function applyStyles(_ref) {
  12724. var state = _ref.state;
  12725. Object.keys(state.elements).forEach(function(name97) {
  12726. var style = state.styles[name97] || {};
  12727. var attributes = state.attributes[name97] || {};
  12728. var element = state.elements[name97];
  12729. if (!isHTMLElement(element) || !getNodeName(element)) {
  12730. return;
  12731. }
  12732. Object.assign(element.style, style);
  12733. Object.keys(attributes).forEach(function(name210) {
  12734. var value = attributes[name210];
  12735. if (value === false) {
  12736. element.removeAttribute(name210);
  12737. } else {
  12738. element.setAttribute(name210, value === true ? "" : value);
  12739. }
  12740. });
  12741. });
  12742. }
  12743. function effect2(_ref2) {
  12744. var state = _ref2.state;
  12745. var initialStyles = {
  12746. popper: {
  12747. position: state.options.strategy,
  12748. left: "0",
  12749. top: "0",
  12750. margin: "0"
  12751. },
  12752. arrow: {
  12753. position: "absolute"
  12754. },
  12755. reference: {}
  12756. };
  12757. Object.assign(state.elements.popper.style, initialStyles.popper);
  12758. state.styles = initialStyles;
  12759. if (state.elements.arrow) {
  12760. Object.assign(state.elements.arrow.style, initialStyles.arrow);
  12761. }
  12762. return function() {
  12763. Object.keys(state.elements).forEach(function(name97) {
  12764. var element = state.elements[name97];
  12765. var attributes = state.attributes[name97] || {};
  12766. var styleProperties = Object.keys(state.styles.hasOwnProperty(name97) ? state.styles[name97] : initialStyles[name97]);
  12767. var style = styleProperties.reduce(function(style2, property) {
  12768. style2[property] = "";
  12769. return style2;
  12770. }, {});
  12771. if (!isHTMLElement(element) || !getNodeName(element)) {
  12772. return;
  12773. }
  12774. Object.assign(element.style, style);
  12775. Object.keys(attributes).forEach(function(attribute) {
  12776. element.removeAttribute(attribute);
  12777. });
  12778. });
  12779. };
  12780. }
  12781. var applyStyles_default = {
  12782. name: "applyStyles",
  12783. enabled: true,
  12784. phase: "write",
  12785. fn: applyStyles,
  12786. effect: effect2,
  12787. requires: ["computeStyles"]
  12788. };
  12789. var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default];
  12790. var createPopper = popperGenerator({
  12791. defaultModifiers
  12792. });
  12793. function distanceAndSkiddingToXY(placement, rects, offset2) {
  12794. var basePlacement = getBasePlacement(placement);
  12795. var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
  12796. var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
  12797. placement
  12798. })) : offset2, skidding = _ref[0], distance = _ref[1];
  12799. skidding = skidding || 0;
  12800. distance = (distance || 0) * invertDistance;
  12801. return [left, right].indexOf(basePlacement) >= 0 ? {
  12802. x: distance,
  12803. y: skidding
  12804. } : {
  12805. x: skidding,
  12806. y: distance
  12807. };
  12808. }
  12809. function offset(_ref2) {
  12810. var state = _ref2.state, options = _ref2.options, name97 = _ref2.name;
  12811. var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
  12812. var data = placements.reduce(function(acc, placement) {
  12813. acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
  12814. return acc;
  12815. }, {});
  12816. var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
  12817. if (state.modifiersData.popperOffsets != null) {
  12818. state.modifiersData.popperOffsets.x += x;
  12819. state.modifiersData.popperOffsets.y += y;
  12820. }
  12821. state.modifiersData[name97] = data;
  12822. }
  12823. var offset_default = {
  12824. name: "offset",
  12825. enabled: true,
  12826. phase: "main",
  12827. requires: ["popperOffsets"],
  12828. fn: offset
  12829. };
  12830. // node_modules/vant/es/popover/Popover.mjs
  12831. var [name77, bem73] = createNamespace("popover");
  12832. var popupProps3 = ["show", "overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
  12833. var popoverProps = {
  12834. show: Boolean,
  12835. theme: makeStringProp("light"),
  12836. overlay: Boolean,
  12837. actions: makeArrayProp(),
  12838. trigger: makeStringProp("click"),
  12839. duration: numericProp,
  12840. showArrow: truthProp,
  12841. placement: makeStringProp("bottom"),
  12842. iconPrefix: String,
  12843. overlayClass: unknownProp,
  12844. overlayStyle: Object,
  12845. closeOnClickAction: truthProp,
  12846. closeOnClickOverlay: truthProp,
  12847. closeOnClickOutside: truthProp,
  12848. offset: {
  12849. type: Array,
  12850. default: () => [0, 8]
  12851. },
  12852. teleport: {
  12853. type: [String, Object],
  12854. default: "body"
  12855. }
  12856. };
  12857. var stdin_default81 = defineComponent({
  12858. name: name77,
  12859. props: popoverProps,
  12860. emits: ["select", "touchstart", "update:show"],
  12861. setup(props, {
  12862. emit,
  12863. slots,
  12864. attrs
  12865. }) {
  12866. let popper;
  12867. const popupRef = ref();
  12868. const wrapperRef = ref();
  12869. const popoverRef = ref();
  12870. const getPopoverOptions = () => ({
  12871. placement: props.placement,
  12872. modifiers: [{
  12873. name: "computeStyles",
  12874. options: {
  12875. adaptive: false,
  12876. gpuAcceleration: false
  12877. }
  12878. }, extend({}, offset_default, {
  12879. options: {
  12880. offset: props.offset
  12881. }
  12882. })]
  12883. });
  12884. const createPopperInstance = () => {
  12885. if (wrapperRef.value && popoverRef.value) {
  12886. return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
  12887. }
  12888. return null;
  12889. };
  12890. const updateLocation = () => {
  12891. nextTick(() => {
  12892. if (!props.show) {
  12893. return;
  12894. }
  12895. if (!popper) {
  12896. popper = createPopperInstance();
  12897. } else {
  12898. popper.setOptions(getPopoverOptions());
  12899. }
  12900. });
  12901. };
  12902. const updateShow = (value) => emit("update:show", value);
  12903. const onClickWrapper = () => {
  12904. if (props.trigger === "click") {
  12905. updateShow(!props.show);
  12906. }
  12907. };
  12908. const onClickAction = (action, index) => {
  12909. if (action.disabled) {
  12910. return;
  12911. }
  12912. emit("select", action, index);
  12913. if (props.closeOnClickAction) {
  12914. updateShow(false);
  12915. }
  12916. };
  12917. const onClickAway = () => {
  12918. if (props.show && props.closeOnClickOutside && (!props.overlay || props.closeOnClickOverlay)) {
  12919. updateShow(false);
  12920. }
  12921. };
  12922. const renderActionContent = (action, index) => {
  12923. if (slots.action) {
  12924. return slots.action({
  12925. action,
  12926. index
  12927. });
  12928. }
  12929. return [action.icon && createVNode(Icon, {
  12930. "name": action.icon,
  12931. "classPrefix": props.iconPrefix,
  12932. "class": bem73("action-icon")
  12933. }, null), createVNode("div", {
  12934. "class": [bem73("action-text"), BORDER_BOTTOM]
  12935. }, [action.text])];
  12936. };
  12937. const renderAction = (action, index) => {
  12938. const {
  12939. icon,
  12940. color,
  12941. disabled,
  12942. className
  12943. } = action;
  12944. return createVNode("div", {
  12945. "role": "menuitem",
  12946. "class": [bem73("action", {
  12947. disabled,
  12948. "with-icon": icon
  12949. }), className],
  12950. "style": {
  12951. color
  12952. },
  12953. "tabindex": disabled ? void 0 : 0,
  12954. "aria-disabled": disabled || void 0,
  12955. "onClick": () => onClickAction(action, index)
  12956. }, [renderActionContent(action, index)]);
  12957. };
  12958. onMounted(() => {
  12959. updateLocation();
  12960. watchEffect(() => {
  12961. var _a;
  12962. popupRef.value = (_a = popoverRef.value) == null ? void 0 : _a.popupRef.value;
  12963. });
  12964. });
  12965. onBeforeUnmount(() => {
  12966. if (popper) {
  12967. popper.destroy();
  12968. popper = null;
  12969. }
  12970. });
  12971. watch(() => [props.show, props.offset, props.placement], updateLocation);
  12972. useClickAway([wrapperRef, popupRef], onClickAway, {
  12973. eventName: "touchstart"
  12974. });
  12975. return () => {
  12976. var _a;
  12977. return createVNode(Fragment, null, [createVNode("span", {
  12978. "ref": wrapperRef,
  12979. "class": bem73("wrapper"),
  12980. "onClick": onClickWrapper
  12981. }, [(_a = slots.reference) == null ? void 0 : _a.call(slots)]), createVNode(Popup, mergeProps({
  12982. "ref": popoverRef,
  12983. "class": bem73([props.theme]),
  12984. "position": "",
  12985. "transition": "van-popover-zoom",
  12986. "lockScroll": false,
  12987. "onUpdate:show": updateShow
  12988. }, attrs, pick(props, popupProps3)), {
  12989. default: () => [props.showArrow && createVNode("div", {
  12990. "class": bem73("arrow")
  12991. }, null), createVNode("div", {
  12992. "role": "menu",
  12993. "class": bem73("content")
  12994. }, [slots.default ? slots.default() : props.actions.map(renderAction)])]
  12995. })]);
  12996. };
  12997. }
  12998. });
  12999. // node_modules/vant/es/popover/index.mjs
  13000. var Popover = withInstall(stdin_default81);
  13001. // node_modules/vant/es/progress/Progress.mjs
  13002. var [name78, bem74] = createNamespace("progress");
  13003. var progressProps = {
  13004. color: String,
  13005. inactive: Boolean,
  13006. pivotText: String,
  13007. textColor: String,
  13008. showPivot: truthProp,
  13009. pivotColor: String,
  13010. trackColor: String,
  13011. strokeWidth: numericProp,
  13012. percentage: {
  13013. type: numericProp,
  13014. default: 0,
  13015. validator: (value) => value >= 0 && value <= 100
  13016. }
  13017. };
  13018. var stdin_default82 = defineComponent({
  13019. name: name78,
  13020. props: progressProps,
  13021. setup(props) {
  13022. const background = computed(() => props.inactive ? void 0 : props.color);
  13023. const renderPivot = () => {
  13024. const {
  13025. textColor,
  13026. pivotText,
  13027. pivotColor,
  13028. percentage
  13029. } = props;
  13030. const text = pivotText != null ? pivotText : `${percentage}%`;
  13031. if (props.showPivot && text) {
  13032. const style = {
  13033. color: textColor,
  13034. left: `${+percentage}%`,
  13035. transform: `translate(-${+percentage}%,-50%)`,
  13036. background: pivotColor || background.value
  13037. };
  13038. return createVNode("span", {
  13039. "style": style,
  13040. "class": bem74("pivot", {
  13041. inactive: props.inactive
  13042. })
  13043. }, [text]);
  13044. }
  13045. };
  13046. return () => {
  13047. const {
  13048. trackColor,
  13049. percentage,
  13050. strokeWidth
  13051. } = props;
  13052. const rootStyle = {
  13053. background: trackColor,
  13054. height: addUnit(strokeWidth)
  13055. };
  13056. const portionStyle = {
  13057. width: `${percentage}%`,
  13058. background: background.value
  13059. };
  13060. return createVNode("div", {
  13061. "class": bem74(),
  13062. "style": rootStyle
  13063. }, [createVNode("span", {
  13064. "class": bem74("portion", {
  13065. inactive: props.inactive
  13066. }),
  13067. "style": portionStyle
  13068. }, null), renderPivot()]);
  13069. };
  13070. }
  13071. });
  13072. // node_modules/vant/es/progress/index.mjs
  13073. var Progress = withInstall(stdin_default82);
  13074. // node_modules/vant/es/pull-refresh/PullRefresh.mjs
  13075. var [name79, bem75, t16] = createNamespace("pull-refresh");
  13076. var DEFAULT_HEAD_HEIGHT = 50;
  13077. var TEXT_STATUS = ["pulling", "loosing", "success"];
  13078. var pullRefreshProps = {
  13079. disabled: Boolean,
  13080. modelValue: Boolean,
  13081. headHeight: makeNumericProp(DEFAULT_HEAD_HEIGHT),
  13082. successText: String,
  13083. pullingText: String,
  13084. loosingText: String,
  13085. loadingText: String,
  13086. pullDistance: numericProp,
  13087. successDuration: makeNumericProp(500),
  13088. animationDuration: makeNumericProp(300)
  13089. };
  13090. var stdin_default83 = defineComponent({
  13091. name: name79,
  13092. props: pullRefreshProps,
  13093. emits: ["change", "refresh", "update:modelValue"],
  13094. setup(props, {
  13095. emit,
  13096. slots
  13097. }) {
  13098. let reachTop;
  13099. const root = ref();
  13100. const track = ref();
  13101. const scrollParent = useScrollParent(root);
  13102. const state = reactive({
  13103. status: "normal",
  13104. distance: 0,
  13105. duration: 0
  13106. });
  13107. const touch = useTouch();
  13108. const getHeadStyle = () => {
  13109. if (props.headHeight !== DEFAULT_HEAD_HEIGHT) {
  13110. return {
  13111. height: `${props.headHeight}px`
  13112. };
  13113. }
  13114. };
  13115. const isTouchable = () => state.status !== "loading" && state.status !== "success" && !props.disabled;
  13116. const ease = (distance) => {
  13117. const pullDistance = +(props.pullDistance || props.headHeight);
  13118. if (distance > pullDistance) {
  13119. if (distance < pullDistance * 2) {
  13120. distance = pullDistance + (distance - pullDistance) / 2;
  13121. } else {
  13122. distance = pullDistance * 1.5 + (distance - pullDistance * 2) / 4;
  13123. }
  13124. }
  13125. return Math.round(distance);
  13126. };
  13127. const setStatus = (distance, isLoading) => {
  13128. const pullDistance = +(props.pullDistance || props.headHeight);
  13129. state.distance = distance;
  13130. if (isLoading) {
  13131. state.status = "loading";
  13132. } else if (distance === 0) {
  13133. state.status = "normal";
  13134. } else if (distance < pullDistance) {
  13135. state.status = "pulling";
  13136. } else {
  13137. state.status = "loosing";
  13138. }
  13139. emit("change", {
  13140. status: state.status,
  13141. distance
  13142. });
  13143. };
  13144. const getStatusText = () => {
  13145. const {
  13146. status
  13147. } = state;
  13148. if (status === "normal") {
  13149. return "";
  13150. }
  13151. return props[`${status}Text`] || t16(status);
  13152. };
  13153. const renderStatus = () => {
  13154. const {
  13155. status,
  13156. distance
  13157. } = state;
  13158. if (slots[status]) {
  13159. return slots[status]({
  13160. distance
  13161. });
  13162. }
  13163. const nodes = [];
  13164. if (TEXT_STATUS.includes(status)) {
  13165. nodes.push(createVNode("div", {
  13166. "class": bem75("text")
  13167. }, [getStatusText()]));
  13168. }
  13169. if (status === "loading") {
  13170. nodes.push(createVNode(Loading, {
  13171. "class": bem75("loading")
  13172. }, {
  13173. default: getStatusText
  13174. }));
  13175. }
  13176. return nodes;
  13177. };
  13178. const showSuccessTip = () => {
  13179. state.status = "success";
  13180. setTimeout(() => {
  13181. setStatus(0);
  13182. }, +props.successDuration);
  13183. };
  13184. const checkPosition = (event) => {
  13185. reachTop = getScrollTop(scrollParent.value) === 0;
  13186. if (reachTop) {
  13187. state.duration = 0;
  13188. touch.start(event);
  13189. }
  13190. };
  13191. const onTouchStart = (event) => {
  13192. if (isTouchable()) {
  13193. checkPosition(event);
  13194. }
  13195. };
  13196. const onTouchMove = (event) => {
  13197. if (isTouchable()) {
  13198. if (!reachTop) {
  13199. checkPosition(event);
  13200. }
  13201. const {
  13202. deltaY
  13203. } = touch;
  13204. touch.move(event);
  13205. if (reachTop && deltaY.value >= 0 && touch.isVertical()) {
  13206. preventDefault(event);
  13207. setStatus(ease(deltaY.value));
  13208. }
  13209. }
  13210. };
  13211. const onTouchEnd = () => {
  13212. if (reachTop && touch.deltaY.value && isTouchable()) {
  13213. state.duration = +props.animationDuration;
  13214. if (state.status === "loosing") {
  13215. setStatus(+props.headHeight, true);
  13216. emit("update:modelValue", true);
  13217. nextTick(() => emit("refresh"));
  13218. } else {
  13219. setStatus(0);
  13220. }
  13221. }
  13222. };
  13223. watch(() => props.modelValue, (value) => {
  13224. state.duration = +props.animationDuration;
  13225. if (value) {
  13226. setStatus(+props.headHeight, true);
  13227. } else if (slots.success || props.successText) {
  13228. showSuccessTip();
  13229. } else {
  13230. setStatus(0, false);
  13231. }
  13232. });
  13233. useEventListener("touchmove", onTouchMove, {
  13234. target: track
  13235. });
  13236. return () => {
  13237. var _a;
  13238. const trackStyle = {
  13239. transitionDuration: `${state.duration}ms`,
  13240. transform: state.distance ? `translate3d(0,${state.distance}px, 0)` : ""
  13241. };
  13242. return createVNode("div", {
  13243. "ref": root,
  13244. "class": bem75()
  13245. }, [createVNode("div", {
  13246. "ref": track,
  13247. "class": bem75("track"),
  13248. "style": trackStyle,
  13249. "onTouchstartPassive": onTouchStart,
  13250. "onTouchend": onTouchEnd,
  13251. "onTouchcancel": onTouchEnd
  13252. }, [createVNode("div", {
  13253. "class": bem75("head"),
  13254. "style": getHeadStyle()
  13255. }, [renderStatus()]), (_a = slots.default) == null ? void 0 : _a.call(slots)])]);
  13256. };
  13257. }
  13258. });
  13259. // node_modules/vant/es/pull-refresh/index.mjs
  13260. var PullRefresh = withInstall(stdin_default83);
  13261. // node_modules/vant/es/rate/Rate.mjs
  13262. var [name80, bem76] = createNamespace("rate");
  13263. function getRateStatus(value, index, allowHalf, readonly) {
  13264. if (value >= index) {
  13265. return {
  13266. status: "full",
  13267. value: 1
  13268. };
  13269. }
  13270. if (value + 0.5 >= index && allowHalf && !readonly) {
  13271. return {
  13272. status: "half",
  13273. value: 0.5
  13274. };
  13275. }
  13276. if (value + 1 >= index && allowHalf && readonly) {
  13277. const cardinal = 10 ** 10;
  13278. return {
  13279. status: "half",
  13280. value: Math.round((value - index + 1) * cardinal) / cardinal
  13281. };
  13282. }
  13283. return {
  13284. status: "void",
  13285. value: 0
  13286. };
  13287. }
  13288. var rateProps = {
  13289. size: numericProp,
  13290. icon: makeStringProp("star"),
  13291. color: String,
  13292. count: makeNumericProp(5),
  13293. gutter: numericProp,
  13294. readonly: Boolean,
  13295. disabled: Boolean,
  13296. voidIcon: makeStringProp("star-o"),
  13297. allowHalf: Boolean,
  13298. voidColor: String,
  13299. touchable: truthProp,
  13300. iconPrefix: String,
  13301. modelValue: makeNumberProp(0),
  13302. disabledColor: String
  13303. };
  13304. var stdin_default84 = defineComponent({
  13305. name: name80,
  13306. props: rateProps,
  13307. emits: ["change", "update:modelValue"],
  13308. setup(props, {
  13309. emit
  13310. }) {
  13311. const touch = useTouch();
  13312. const [itemRefs, setItemRefs] = useRefs();
  13313. const groupRef = ref();
  13314. const untouchable = () => props.readonly || props.disabled || !props.touchable;
  13315. const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
  13316. let ranges;
  13317. let groupRefRect;
  13318. let minRectTop = Number.MAX_SAFE_INTEGER;
  13319. let maxRectTop = Number.MIN_SAFE_INTEGER;
  13320. const updateRanges = () => {
  13321. groupRefRect = useRect(groupRef);
  13322. const rects = itemRefs.value.map(useRect);
  13323. ranges = [];
  13324. rects.forEach((rect, index) => {
  13325. minRectTop = Math.min(rect.top, minRectTop);
  13326. maxRectTop = Math.max(rect.top, maxRectTop);
  13327. if (props.allowHalf) {
  13328. ranges.push({
  13329. score: index + 0.5,
  13330. left: rect.left,
  13331. top: rect.top,
  13332. height: rect.height
  13333. }, {
  13334. score: index + 1,
  13335. left: rect.left + rect.width / 2,
  13336. top: rect.top,
  13337. height: rect.height
  13338. });
  13339. } else {
  13340. ranges.push({
  13341. score: index + 1,
  13342. left: rect.left,
  13343. top: rect.top,
  13344. height: rect.height
  13345. });
  13346. }
  13347. });
  13348. };
  13349. const getScoreByPosition = (x, y) => {
  13350. for (let i = ranges.length - 1; i > 0; i--) {
  13351. if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
  13352. if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
  13353. return ranges[i].score;
  13354. }
  13355. } else {
  13356. const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
  13357. if (x > ranges[i].left && ranges[i].top === curTop) {
  13358. return ranges[i].score;
  13359. }
  13360. }
  13361. }
  13362. return props.allowHalf ? 0.5 : 1;
  13363. };
  13364. const select = (index) => {
  13365. if (!props.disabled && !props.readonly && index !== props.modelValue) {
  13366. emit("update:modelValue", index);
  13367. emit("change", index);
  13368. }
  13369. };
  13370. const onTouchStart = (event) => {
  13371. if (untouchable()) {
  13372. return;
  13373. }
  13374. touch.start(event);
  13375. updateRanges();
  13376. };
  13377. const onTouchMove = (event) => {
  13378. if (untouchable()) {
  13379. return;
  13380. }
  13381. touch.move(event);
  13382. if (touch.isHorizontal()) {
  13383. const {
  13384. clientX,
  13385. clientY
  13386. } = event.touches[0];
  13387. preventDefault(event);
  13388. select(getScoreByPosition(clientX, clientY));
  13389. }
  13390. };
  13391. const renderStar = (item, index) => {
  13392. const {
  13393. icon,
  13394. size,
  13395. color,
  13396. count,
  13397. gutter,
  13398. voidIcon,
  13399. disabled,
  13400. voidColor,
  13401. allowHalf,
  13402. iconPrefix,
  13403. disabledColor
  13404. } = props;
  13405. const score = index + 1;
  13406. const isFull = item.status === "full";
  13407. const isVoid = item.status === "void";
  13408. const renderHalf = allowHalf && item.value > 0 && item.value < 1;
  13409. let style;
  13410. if (gutter && score !== +count) {
  13411. style = {
  13412. paddingRight: addUnit(gutter)
  13413. };
  13414. }
  13415. const onClickItem = (event) => {
  13416. updateRanges();
  13417. select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
  13418. };
  13419. return createVNode("div", {
  13420. "key": index,
  13421. "ref": setItemRefs(index),
  13422. "role": "radio",
  13423. "style": style,
  13424. "class": bem76("item"),
  13425. "tabindex": disabled ? void 0 : 0,
  13426. "aria-setsize": count,
  13427. "aria-posinset": score,
  13428. "aria-checked": !isVoid,
  13429. "onClick": onClickItem
  13430. }, [createVNode(Icon, {
  13431. "size": size,
  13432. "name": isFull ? icon : voidIcon,
  13433. "class": bem76("icon", {
  13434. disabled,
  13435. full: isFull
  13436. }),
  13437. "color": disabled ? disabledColor : isFull ? color : voidColor,
  13438. "classPrefix": iconPrefix
  13439. }, null), renderHalf && createVNode(Icon, {
  13440. "size": size,
  13441. "style": {
  13442. width: item.value + "em"
  13443. },
  13444. "name": isVoid ? voidIcon : icon,
  13445. "class": bem76("icon", ["half", {
  13446. disabled,
  13447. full: !isVoid
  13448. }]),
  13449. "color": disabled ? disabledColor : isVoid ? voidColor : color,
  13450. "classPrefix": iconPrefix
  13451. }, null)]);
  13452. };
  13453. useCustomFieldValue(() => props.modelValue);
  13454. useEventListener("touchmove", onTouchMove, {
  13455. target: groupRef
  13456. });
  13457. return () => createVNode("div", {
  13458. "ref": groupRef,
  13459. "role": "radiogroup",
  13460. "class": bem76({
  13461. readonly: props.readonly,
  13462. disabled: props.disabled
  13463. }),
  13464. "tabindex": props.disabled ? void 0 : 0,
  13465. "aria-disabled": props.disabled,
  13466. "aria-readonly": props.readonly,
  13467. "onTouchstartPassive": onTouchStart
  13468. }, [list.value.map(renderStar)]);
  13469. }
  13470. });
  13471. // node_modules/vant/es/rate/index.mjs
  13472. var Rate = withInstall(stdin_default84);
  13473. // node_modules/vant/es/row/index.mjs
  13474. var Row = withInstall(stdin_default48);
  13475. // node_modules/vant/es/search/Search.mjs
  13476. var [name81, bem77, t17] = createNamespace("search");
  13477. var searchProps = extend({}, fieldSharedProps, {
  13478. label: String,
  13479. shape: makeStringProp("square"),
  13480. leftIcon: makeStringProp("search"),
  13481. clearable: truthProp,
  13482. actionText: String,
  13483. background: String,
  13484. showAction: Boolean
  13485. });
  13486. var stdin_default85 = defineComponent({
  13487. name: name81,
  13488. props: searchProps,
  13489. emits: ["blur", "focus", "clear", "search", "cancel", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
  13490. setup(props, {
  13491. emit,
  13492. slots,
  13493. attrs
  13494. }) {
  13495. const id = useId();
  13496. const filedRef = ref();
  13497. const onCancel = () => {
  13498. if (!slots.action) {
  13499. emit("update:modelValue", "");
  13500. emit("cancel");
  13501. }
  13502. };
  13503. const onKeypress = (event) => {
  13504. const ENTER_CODE = 13;
  13505. if (event.keyCode === ENTER_CODE) {
  13506. preventDefault(event);
  13507. emit("search", props.modelValue);
  13508. }
  13509. };
  13510. const getInputId = () => props.id || `${id}-input`;
  13511. const renderLabel = () => {
  13512. if (slots.label || props.label) {
  13513. return createVNode("label", {
  13514. "class": bem77("label"),
  13515. "for": getInputId()
  13516. }, [slots.label ? slots.label() : props.label]);
  13517. }
  13518. };
  13519. const renderAction = () => {
  13520. if (props.showAction) {
  13521. const text = props.actionText || t17("cancel");
  13522. return createVNode("div", {
  13523. "class": bem77("action"),
  13524. "role": "button",
  13525. "tabindex": 0,
  13526. "onClick": onCancel
  13527. }, [slots.action ? slots.action() : text]);
  13528. }
  13529. };
  13530. const blur = () => {
  13531. var _a;
  13532. return (_a = filedRef.value) == null ? void 0 : _a.blur();
  13533. };
  13534. const focus = () => {
  13535. var _a;
  13536. return (_a = filedRef.value) == null ? void 0 : _a.focus();
  13537. };
  13538. const onBlur = (event) => emit("blur", event);
  13539. const onFocus = (event) => emit("focus", event);
  13540. const onClear = (event) => emit("clear", event);
  13541. const onClickInput = (event) => emit("click-input", event);
  13542. const onClickLeftIcon = (event) => emit("click-left-icon", event);
  13543. const onClickRightIcon = (event) => emit("click-right-icon", event);
  13544. const fieldPropNames = Object.keys(fieldSharedProps);
  13545. const renderField = () => {
  13546. const fieldAttrs = extend({}, attrs, pick(props, fieldPropNames), {
  13547. id: getInputId()
  13548. });
  13549. const onInput = (value) => emit("update:modelValue", value);
  13550. return createVNode(Field, mergeProps({
  13551. "ref": filedRef,
  13552. "type": "search",
  13553. "class": bem77("field"),
  13554. "border": false,
  13555. "onBlur": onBlur,
  13556. "onFocus": onFocus,
  13557. "onClear": onClear,
  13558. "onKeypress": onKeypress,
  13559. "onClick-input": onClickInput,
  13560. "onClick-left-icon": onClickLeftIcon,
  13561. "onClick-right-icon": onClickRightIcon,
  13562. "onUpdate:modelValue": onInput
  13563. }, fieldAttrs), pick(slots, ["left-icon", "right-icon"]));
  13564. };
  13565. useExpose({
  13566. focus,
  13567. blur
  13568. });
  13569. return () => {
  13570. var _a;
  13571. return createVNode("div", {
  13572. "class": bem77({
  13573. "show-action": props.showAction
  13574. }),
  13575. "style": {
  13576. background: props.background
  13577. }
  13578. }, [(_a = slots.left) == null ? void 0 : _a.call(slots), createVNode("div", {
  13579. "class": bem77("content", props.shape)
  13580. }, [renderLabel(), renderField()]), renderAction()]);
  13581. };
  13582. }
  13583. });
  13584. // node_modules/vant/es/search/index.mjs
  13585. var Search = withInstall(stdin_default85);
  13586. // node_modules/vant/es/share-sheet/ShareSheet.mjs
  13587. var popupInheritKeys3 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
  13588. var iconMap = {
  13589. qq: "qq",
  13590. link: "link-o",
  13591. weibo: "weibo",
  13592. qrcode: "qr",
  13593. poster: "photo-o",
  13594. wechat: "wechat",
  13595. "weapp-qrcode": "miniprogram-o",
  13596. "wechat-moments": "wechat-moments"
  13597. };
  13598. var [name82, bem78, t18] = createNamespace("share-sheet");
  13599. var shareSheetProps = extend({}, popupSharedProps, {
  13600. title: String,
  13601. round: truthProp,
  13602. options: makeArrayProp(),
  13603. cancelText: String,
  13604. description: String,
  13605. closeOnPopstate: truthProp,
  13606. safeAreaInsetBottom: truthProp
  13607. });
  13608. var stdin_default86 = defineComponent({
  13609. name: name82,
  13610. props: shareSheetProps,
  13611. emits: ["cancel", "select", "update:show"],
  13612. setup(props, {
  13613. emit,
  13614. slots
  13615. }) {
  13616. const updateShow = (value) => emit("update:show", value);
  13617. const onCancel = () => {
  13618. updateShow(false);
  13619. emit("cancel");
  13620. };
  13621. const onSelect = (option, index) => emit("select", option, index);
  13622. const renderHeader = () => {
  13623. const title = slots.title ? slots.title() : props.title;
  13624. const description = slots.description ? slots.description() : props.description;
  13625. if (title || description) {
  13626. return createVNode("div", {
  13627. "class": bem78("header")
  13628. }, [title && createVNode("h2", {
  13629. "class": bem78("title")
  13630. }, [title]), description && createVNode("span", {
  13631. "class": bem78("description")
  13632. }, [description])]);
  13633. }
  13634. };
  13635. const renderIcon = (icon) => {
  13636. if (iconMap[icon]) {
  13637. return createVNode("div", {
  13638. "class": bem78("icon", [icon])
  13639. }, [createVNode(Icon, {
  13640. "name": iconMap[icon] || icon
  13641. }, null)]);
  13642. }
  13643. return createVNode("img", {
  13644. "src": icon,
  13645. "class": bem78("image-icon")
  13646. }, null);
  13647. };
  13648. const renderOption = (option, index) => {
  13649. const {
  13650. name: name210,
  13651. icon,
  13652. className,
  13653. description
  13654. } = option;
  13655. return createVNode("div", {
  13656. "role": "button",
  13657. "tabindex": 0,
  13658. "class": [bem78("option"), className, HAPTICS_FEEDBACK],
  13659. "onClick": () => onSelect(option, index)
  13660. }, [renderIcon(icon), name210 && createVNode("span", {
  13661. "class": bem78("name")
  13662. }, [name210]), description && createVNode("span", {
  13663. "class": bem78("option-description")
  13664. }, [description])]);
  13665. };
  13666. const renderOptions = (options, border) => createVNode("div", {
  13667. "class": bem78("options", {
  13668. border
  13669. })
  13670. }, [options.map(renderOption)]);
  13671. const renderRows = () => {
  13672. const {
  13673. options
  13674. } = props;
  13675. if (Array.isArray(options[0])) {
  13676. return options.map((item, index) => renderOptions(item, index !== 0));
  13677. }
  13678. return renderOptions(options);
  13679. };
  13680. const renderCancelButton = () => {
  13681. var _a;
  13682. const cancelText = (_a = props.cancelText) != null ? _a : t18("cancel");
  13683. if (slots.cancel || cancelText) {
  13684. return createVNode("button", {
  13685. "type": "button",
  13686. "class": bem78("cancel"),
  13687. "onClick": onCancel
  13688. }, [slots.cancel ? slots.cancel() : cancelText]);
  13689. }
  13690. };
  13691. return () => createVNode(Popup, mergeProps({
  13692. "class": bem78(),
  13693. "position": "bottom",
  13694. "onUpdate:show": updateShow
  13695. }, pick(props, popupInheritKeys3)), {
  13696. default: () => [renderHeader(), renderRows(), renderCancelButton()]
  13697. });
  13698. }
  13699. });
  13700. // node_modules/vant/es/share-sheet/index.mjs
  13701. var ShareSheet = withInstall(stdin_default86);
  13702. // node_modules/vant/es/sidebar/Sidebar.mjs
  13703. var [name83, bem79] = createNamespace("sidebar");
  13704. var SIDEBAR_KEY = Symbol(name83);
  13705. var sidebarProps = {
  13706. modelValue: makeNumericProp(0)
  13707. };
  13708. var stdin_default87 = defineComponent({
  13709. name: name83,
  13710. props: sidebarProps,
  13711. emits: ["change", "update:modelValue"],
  13712. setup(props, {
  13713. emit,
  13714. slots
  13715. }) {
  13716. const {
  13717. linkChildren
  13718. } = useChildren(SIDEBAR_KEY);
  13719. const getActive = () => +props.modelValue;
  13720. const setActive = (value) => {
  13721. if (value !== getActive()) {
  13722. emit("update:modelValue", value);
  13723. emit("change", value);
  13724. }
  13725. };
  13726. linkChildren({
  13727. getActive,
  13728. setActive
  13729. });
  13730. return () => {
  13731. var _a;
  13732. return createVNode("div", {
  13733. "role": "tablist",
  13734. "class": bem79()
  13735. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  13736. };
  13737. }
  13738. });
  13739. // node_modules/vant/es/sidebar/index.mjs
  13740. var Sidebar = withInstall(stdin_default87);
  13741. // node_modules/vant/es/sidebar-item/SidebarItem.mjs
  13742. var [name84, bem80] = createNamespace("sidebar-item");
  13743. var sidebarItemProps = extend({}, routeProps, {
  13744. dot: Boolean,
  13745. title: String,
  13746. badge: numericProp,
  13747. disabled: Boolean,
  13748. badgeProps: Object
  13749. });
  13750. var stdin_default88 = defineComponent({
  13751. name: name84,
  13752. props: sidebarItemProps,
  13753. emits: ["click"],
  13754. setup(props, {
  13755. emit,
  13756. slots
  13757. }) {
  13758. const route2 = useRoute();
  13759. const {
  13760. parent,
  13761. index
  13762. } = useParent(SIDEBAR_KEY);
  13763. if (!parent) {
  13764. if (true) {
  13765. console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
  13766. }
  13767. return;
  13768. }
  13769. const onClick = () => {
  13770. if (props.disabled) {
  13771. return;
  13772. }
  13773. emit("click", index.value);
  13774. parent.setActive(index.value);
  13775. route2();
  13776. };
  13777. return () => {
  13778. const {
  13779. dot,
  13780. badge,
  13781. title,
  13782. disabled
  13783. } = props;
  13784. const selected = index.value === parent.getActive();
  13785. return createVNode("div", {
  13786. "role": "tab",
  13787. "class": bem80({
  13788. select: selected,
  13789. disabled
  13790. }),
  13791. "tabindex": disabled ? void 0 : 0,
  13792. "aria-selected": selected,
  13793. "onClick": onClick
  13794. }, [createVNode(Badge, mergeProps({
  13795. "dot": dot,
  13796. "class": bem80("text"),
  13797. "content": badge
  13798. }, props.badgeProps), {
  13799. default: () => [slots.title ? slots.title() : title]
  13800. })]);
  13801. };
  13802. }
  13803. });
  13804. // node_modules/vant/es/sidebar-item/index.mjs
  13805. var SidebarItem = withInstall(stdin_default88);
  13806. // node_modules/vant/es/skeleton/Skeleton.mjs
  13807. var [name85, bem81] = createNamespace("skeleton");
  13808. var DEFAULT_ROW_WIDTH = "100%";
  13809. var DEFAULT_LAST_ROW_WIDTH = "60%";
  13810. var skeletonProps = {
  13811. row: makeNumericProp(0),
  13812. title: Boolean,
  13813. round: Boolean,
  13814. avatar: Boolean,
  13815. loading: truthProp,
  13816. animate: truthProp,
  13817. avatarSize: numericProp,
  13818. titleWidth: numericProp,
  13819. avatarShape: makeStringProp("round"),
  13820. rowWidth: {
  13821. type: [Number, String, Array],
  13822. default: DEFAULT_ROW_WIDTH
  13823. }
  13824. };
  13825. var stdin_default89 = defineComponent({
  13826. name: name85,
  13827. inheritAttrs: false,
  13828. props: skeletonProps,
  13829. setup(props, {
  13830. slots,
  13831. attrs
  13832. }) {
  13833. const renderAvatar = () => {
  13834. if (props.avatar) {
  13835. return createVNode("div", {
  13836. "class": bem81("avatar", props.avatarShape),
  13837. "style": getSizeStyle(props.avatarSize)
  13838. }, null);
  13839. }
  13840. };
  13841. const renderTitle = () => {
  13842. if (props.title) {
  13843. return createVNode("h3", {
  13844. "class": bem81("title"),
  13845. "style": {
  13846. width: addUnit(props.titleWidth)
  13847. }
  13848. }, null);
  13849. }
  13850. };
  13851. const getRowWidth = (index) => {
  13852. const {
  13853. rowWidth
  13854. } = props;
  13855. if (rowWidth === DEFAULT_ROW_WIDTH && index === +props.row - 1) {
  13856. return DEFAULT_LAST_ROW_WIDTH;
  13857. }
  13858. if (Array.isArray(rowWidth)) {
  13859. return rowWidth[index];
  13860. }
  13861. return rowWidth;
  13862. };
  13863. const renderRows = () => Array(+props.row).fill("").map((_, i) => createVNode("div", {
  13864. "class": bem81("row"),
  13865. "style": {
  13866. width: addUnit(getRowWidth(i))
  13867. }
  13868. }, null));
  13869. return () => {
  13870. var _a;
  13871. if (!props.loading) {
  13872. return (_a = slots.default) == null ? void 0 : _a.call(slots);
  13873. }
  13874. return createVNode("div", mergeProps({
  13875. "class": bem81({
  13876. animate: props.animate,
  13877. round: props.round
  13878. })
  13879. }, attrs), [renderAvatar(), createVNode("div", {
  13880. "class": bem81("content")
  13881. }, [renderTitle(), renderRows()])]);
  13882. };
  13883. }
  13884. });
  13885. // node_modules/vant/es/skeleton/index.mjs
  13886. var Skeleton = withInstall(stdin_default89);
  13887. // node_modules/vant/es/slider/Slider.mjs
  13888. var [name86, bem82] = createNamespace("slider");
  13889. var sliderProps = {
  13890. min: makeNumericProp(0),
  13891. max: makeNumericProp(100),
  13892. step: makeNumericProp(1),
  13893. range: Boolean,
  13894. reverse: Boolean,
  13895. disabled: Boolean,
  13896. readonly: Boolean,
  13897. vertical: Boolean,
  13898. barHeight: numericProp,
  13899. buttonSize: numericProp,
  13900. activeColor: String,
  13901. inactiveColor: String,
  13902. modelValue: {
  13903. type: [Number, Array],
  13904. default: 0
  13905. }
  13906. };
  13907. var stdin_default90 = defineComponent({
  13908. name: name86,
  13909. props: sliderProps,
  13910. emits: ["change", "drag-end", "drag-start", "update:modelValue"],
  13911. setup(props, {
  13912. emit,
  13913. slots
  13914. }) {
  13915. let buttonIndex;
  13916. let current2;
  13917. let startValue;
  13918. const root = ref();
  13919. const slider = ref();
  13920. const dragStatus = ref();
  13921. const touch = useTouch();
  13922. const scope = computed(() => Number(props.max) - Number(props.min));
  13923. const wrapperStyle = computed(() => {
  13924. const crossAxis = props.vertical ? "width" : "height";
  13925. return {
  13926. background: props.inactiveColor,
  13927. [crossAxis]: addUnit(props.barHeight)
  13928. };
  13929. });
  13930. const isRange = (val) => props.range && Array.isArray(val);
  13931. const calcMainAxis = () => {
  13932. const {
  13933. modelValue,
  13934. min
  13935. } = props;
  13936. if (isRange(modelValue)) {
  13937. return `${(modelValue[1] - modelValue[0]) * 100 / scope.value}%`;
  13938. }
  13939. return `${(modelValue - Number(min)) * 100 / scope.value}%`;
  13940. };
  13941. const calcOffset = () => {
  13942. const {
  13943. modelValue,
  13944. min
  13945. } = props;
  13946. if (isRange(modelValue)) {
  13947. return `${(modelValue[0] - Number(min)) * 100 / scope.value}%`;
  13948. }
  13949. return "0%";
  13950. };
  13951. const barStyle = computed(() => {
  13952. const mainAxis = props.vertical ? "height" : "width";
  13953. const style = {
  13954. [mainAxis]: calcMainAxis(),
  13955. background: props.activeColor
  13956. };
  13957. if (dragStatus.value) {
  13958. style.transition = "none";
  13959. }
  13960. const getPositionKey = () => {
  13961. if (props.vertical) {
  13962. return props.reverse ? "bottom" : "top";
  13963. }
  13964. return props.reverse ? "right" : "left";
  13965. };
  13966. style[getPositionKey()] = calcOffset();
  13967. return style;
  13968. });
  13969. const format3 = (value) => {
  13970. const min = +props.min;
  13971. const max = +props.max;
  13972. const step = +props.step;
  13973. value = clamp(value, min, max);
  13974. const diff = Math.round((value - min) / step) * step;
  13975. return addNumber(min, diff);
  13976. };
  13977. const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
  13978. const handleRangeValue = (value) => {
  13979. var _a, _b;
  13980. const left2 = (_a = value[0]) != null ? _a : Number(props.min);
  13981. const right2 = (_b = value[1]) != null ? _b : Number(props.max);
  13982. return left2 > right2 ? [right2, left2] : [left2, right2];
  13983. };
  13984. const updateValue = (value, end2) => {
  13985. if (isRange(value)) {
  13986. value = handleRangeValue(value).map(format3);
  13987. } else {
  13988. value = format3(value);
  13989. }
  13990. if (!isSameValue(value, props.modelValue)) {
  13991. emit("update:modelValue", value);
  13992. }
  13993. if (end2 && !isSameValue(value, startValue)) {
  13994. emit("change", value);
  13995. }
  13996. };
  13997. const onClick = (event) => {
  13998. event.stopPropagation();
  13999. if (props.disabled || props.readonly) {
  14000. return;
  14001. }
  14002. const {
  14003. min,
  14004. reverse,
  14005. vertical,
  14006. modelValue
  14007. } = props;
  14008. const rect = useRect(root);
  14009. const getDelta = () => {
  14010. if (vertical) {
  14011. if (reverse) {
  14012. return rect.bottom - event.clientY;
  14013. }
  14014. return event.clientY - rect.top;
  14015. }
  14016. if (reverse) {
  14017. return rect.right - event.clientX;
  14018. }
  14019. return event.clientX - rect.left;
  14020. };
  14021. const total = vertical ? rect.height : rect.width;
  14022. const value = Number(min) + getDelta() / total * scope.value;
  14023. if (isRange(modelValue)) {
  14024. const [left2, right2] = modelValue;
  14025. const middle = (left2 + right2) / 2;
  14026. if (value <= middle) {
  14027. updateValue([value, right2], true);
  14028. } else {
  14029. updateValue([left2, value], true);
  14030. }
  14031. } else {
  14032. updateValue(value, true);
  14033. }
  14034. };
  14035. const onTouchStart = (event) => {
  14036. if (props.disabled || props.readonly) {
  14037. return;
  14038. }
  14039. touch.start(event);
  14040. current2 = props.modelValue;
  14041. if (isRange(current2)) {
  14042. startValue = current2.map(format3);
  14043. } else {
  14044. startValue = format3(current2);
  14045. }
  14046. dragStatus.value = "start";
  14047. };
  14048. const onTouchMove = (event) => {
  14049. if (props.disabled || props.readonly) {
  14050. return;
  14051. }
  14052. if (dragStatus.value === "start") {
  14053. emit("drag-start", event);
  14054. }
  14055. preventDefault(event, true);
  14056. touch.move(event);
  14057. dragStatus.value = "dragging";
  14058. const rect = useRect(root);
  14059. const delta = props.vertical ? touch.deltaY.value : touch.deltaX.value;
  14060. const total = props.vertical ? rect.height : rect.width;
  14061. let diff = delta / total * scope.value;
  14062. if (props.reverse) {
  14063. diff = -diff;
  14064. }
  14065. if (isRange(startValue)) {
  14066. const index = props.reverse ? 1 - buttonIndex : buttonIndex;
  14067. current2[index] = startValue[index] + diff;
  14068. } else {
  14069. current2 = startValue + diff;
  14070. }
  14071. updateValue(current2);
  14072. };
  14073. const onTouchEnd = (event) => {
  14074. if (props.disabled || props.readonly) {
  14075. return;
  14076. }
  14077. if (dragStatus.value === "dragging") {
  14078. updateValue(current2, true);
  14079. emit("drag-end", event);
  14080. }
  14081. dragStatus.value = "";
  14082. };
  14083. const getButtonClassName = (index) => {
  14084. if (typeof index === "number") {
  14085. const position = ["left", "right"];
  14086. return bem82(`button-wrapper`, position[index]);
  14087. }
  14088. return bem82("button-wrapper", props.reverse ? "left" : "right");
  14089. };
  14090. const renderButtonContent = (value, index) => {
  14091. if (typeof index === "number") {
  14092. const slot = slots[index === 0 ? "left-button" : "right-button"];
  14093. if (slot) {
  14094. return slot({
  14095. value
  14096. });
  14097. }
  14098. }
  14099. if (slots.button) {
  14100. return slots.button({
  14101. value
  14102. });
  14103. }
  14104. return createVNode("div", {
  14105. "class": bem82("button"),
  14106. "style": getSizeStyle(props.buttonSize)
  14107. }, null);
  14108. };
  14109. const renderButton = (index) => {
  14110. const current22 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
  14111. return createVNode("div", {
  14112. "ref": slider,
  14113. "role": "slider",
  14114. "class": getButtonClassName(index),
  14115. "tabindex": props.disabled ? void 0 : 0,
  14116. "aria-valuemin": props.min,
  14117. "aria-valuenow": current22,
  14118. "aria-valuemax": props.max,
  14119. "aria-disabled": props.disabled || void 0,
  14120. "aria-readonly": props.readonly || void 0,
  14121. "aria-orientation": props.vertical ? "vertical" : "horizontal",
  14122. "onTouchstartPassive": (event) => {
  14123. if (typeof index === "number") {
  14124. buttonIndex = index;
  14125. }
  14126. onTouchStart(event);
  14127. },
  14128. "onTouchend": onTouchEnd,
  14129. "onTouchcancel": onTouchEnd,
  14130. "onClick": stopPropagation
  14131. }, [renderButtonContent(current22, index)]);
  14132. };
  14133. updateValue(props.modelValue);
  14134. useCustomFieldValue(() => props.modelValue);
  14135. useEventListener("touchmove", onTouchMove, {
  14136. target: slider
  14137. });
  14138. return () => createVNode("div", {
  14139. "ref": root,
  14140. "style": wrapperStyle.value,
  14141. "class": bem82({
  14142. vertical: props.vertical,
  14143. disabled: props.disabled
  14144. }),
  14145. "onClick": onClick
  14146. }, [createVNode("div", {
  14147. "class": bem82("bar"),
  14148. "style": barStyle.value
  14149. }, [props.range ? [renderButton(0), renderButton(1)] : renderButton()])]);
  14150. }
  14151. });
  14152. // node_modules/vant/es/slider/index.mjs
  14153. var Slider = withInstall(stdin_default90);
  14154. // node_modules/vant/es/space/Space.mjs
  14155. var [name87, bem83] = createNamespace("space");
  14156. var spaceProps = {
  14157. align: String,
  14158. direction: {
  14159. type: String,
  14160. default: "horizontal"
  14161. },
  14162. size: {
  14163. type: [Number, String, Array],
  14164. default: 8
  14165. },
  14166. wrap: Boolean,
  14167. fill: Boolean
  14168. };
  14169. function filterEmpty(children = []) {
  14170. const nodes = [];
  14171. children.forEach((child) => {
  14172. if (Array.isArray(child)) {
  14173. nodes.push(...child);
  14174. } else if (child.type === Fragment) {
  14175. nodes.push(...filterEmpty(child.children));
  14176. } else {
  14177. nodes.push(child);
  14178. }
  14179. });
  14180. return nodes.filter((c) => {
  14181. var _a;
  14182. return !(c && (typeof Comment !== "undefined" && c.type === Comment || c.type === Fragment && ((_a = c.children) == null ? void 0 : _a.length) === 0 || c.type === Text && c.children.trim() === ""));
  14183. });
  14184. }
  14185. var stdin_default91 = defineComponent({
  14186. name: name87,
  14187. props: spaceProps,
  14188. setup(props, {
  14189. slots
  14190. }) {
  14191. const mergedAlign = computed(() => {
  14192. var _a;
  14193. return (_a = props.align) != null ? _a : props.direction === "horizontal" ? "center" : "";
  14194. });
  14195. const getMargin = (size) => {
  14196. if (typeof size === "number") {
  14197. return size + "px";
  14198. }
  14199. return size;
  14200. };
  14201. const getMarginStyle = (isLast) => {
  14202. const style = {};
  14203. const marginRight = `${getMargin(Array.isArray(props.size) ? props.size[0] : props.size)}`;
  14204. const marginBottom = `${getMargin(Array.isArray(props.size) ? props.size[1] : props.size)}`;
  14205. if (isLast) {
  14206. return props.wrap ? {
  14207. marginBottom
  14208. } : {};
  14209. }
  14210. if (props.direction === "horizontal") {
  14211. style.marginRight = marginRight;
  14212. }
  14213. if (props.direction === "vertical" || props.wrap) {
  14214. style.marginBottom = marginBottom;
  14215. }
  14216. return style;
  14217. };
  14218. return () => {
  14219. var _a;
  14220. const children = filterEmpty((_a = slots.default) == null ? void 0 : _a.call(slots));
  14221. return createVNode("div", {
  14222. "class": [bem83({
  14223. [props.direction]: props.direction,
  14224. [`align-${mergedAlign.value}`]: mergedAlign.value,
  14225. wrap: props.wrap,
  14226. fill: props.fill
  14227. })]
  14228. }, [children.map((c, i) => createVNode("div", {
  14229. "key": `item-${i}`,
  14230. "class": `${name87}-item`,
  14231. "style": getMarginStyle(i === children.length - 1)
  14232. }, [c]))]);
  14233. };
  14234. }
  14235. });
  14236. // node_modules/vant/es/space/index.mjs
  14237. var Space = withInstall(stdin_default91);
  14238. // node_modules/vant/es/steps/Steps.mjs
  14239. var [name88, bem84] = createNamespace("steps");
  14240. var stepsProps = {
  14241. active: makeNumericProp(0),
  14242. direction: makeStringProp("horizontal"),
  14243. activeIcon: makeStringProp("checked"),
  14244. iconPrefix: String,
  14245. finishIcon: String,
  14246. activeColor: String,
  14247. inactiveIcon: String,
  14248. inactiveColor: String
  14249. };
  14250. var STEPS_KEY = Symbol(name88);
  14251. var stdin_default92 = defineComponent({
  14252. name: name88,
  14253. props: stepsProps,
  14254. emits: ["click-step"],
  14255. setup(props, {
  14256. emit,
  14257. slots
  14258. }) {
  14259. const {
  14260. linkChildren
  14261. } = useChildren(STEPS_KEY);
  14262. const onClickStep = (index) => emit("click-step", index);
  14263. linkChildren({
  14264. props,
  14265. onClickStep
  14266. });
  14267. return () => {
  14268. var _a;
  14269. return createVNode("div", {
  14270. "class": bem84([props.direction])
  14271. }, [createVNode("div", {
  14272. "class": bem84("items")
  14273. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
  14274. };
  14275. }
  14276. });
  14277. // node_modules/vant/es/step/Step.mjs
  14278. var [name89, bem85] = createNamespace("step");
  14279. var stdin_default93 = defineComponent({
  14280. name: name89,
  14281. setup(props, {
  14282. slots
  14283. }) {
  14284. const {
  14285. parent,
  14286. index
  14287. } = useParent(STEPS_KEY);
  14288. if (!parent) {
  14289. if (true) {
  14290. console.error("[Vant] <Step> must be a child component of <Steps>.");
  14291. }
  14292. return;
  14293. }
  14294. const parentProps = parent.props;
  14295. const getStatus = () => {
  14296. const active = +parentProps.active;
  14297. if (index.value < active) {
  14298. return "finish";
  14299. }
  14300. return index.value === active ? "process" : "waiting";
  14301. };
  14302. const isActive = () => getStatus() === "process";
  14303. const lineStyle = computed(() => ({
  14304. background: getStatus() === "finish" ? parentProps.activeColor : parentProps.inactiveColor
  14305. }));
  14306. const titleStyle = computed(() => {
  14307. if (isActive()) {
  14308. return {
  14309. color: parentProps.activeColor
  14310. };
  14311. }
  14312. if (getStatus() === "waiting") {
  14313. return {
  14314. color: parentProps.inactiveColor
  14315. };
  14316. }
  14317. });
  14318. const onClickStep = () => parent.onClickStep(index.value);
  14319. const renderCircle = () => {
  14320. const {
  14321. iconPrefix,
  14322. finishIcon,
  14323. activeIcon,
  14324. activeColor,
  14325. inactiveIcon
  14326. } = parentProps;
  14327. if (isActive()) {
  14328. if (slots["active-icon"]) {
  14329. return slots["active-icon"]();
  14330. }
  14331. return createVNode(Icon, {
  14332. "class": bem85("icon", "active"),
  14333. "name": activeIcon,
  14334. "color": activeColor,
  14335. "classPrefix": iconPrefix
  14336. }, null);
  14337. }
  14338. if (getStatus() === "finish" && (finishIcon || slots["finish-icon"])) {
  14339. if (slots["finish-icon"]) {
  14340. return slots["finish-icon"]();
  14341. }
  14342. return createVNode(Icon, {
  14343. "class": bem85("icon", "finish"),
  14344. "name": finishIcon,
  14345. "color": activeColor,
  14346. "classPrefix": iconPrefix
  14347. }, null);
  14348. }
  14349. if (slots["inactive-icon"]) {
  14350. return slots["inactive-icon"]();
  14351. }
  14352. if (inactiveIcon) {
  14353. return createVNode(Icon, {
  14354. "class": bem85("icon"),
  14355. "name": inactiveIcon,
  14356. "classPrefix": iconPrefix
  14357. }, null);
  14358. }
  14359. return createVNode("i", {
  14360. "class": bem85("circle"),
  14361. "style": lineStyle.value
  14362. }, null);
  14363. };
  14364. return () => {
  14365. var _a;
  14366. const status = getStatus();
  14367. return createVNode("div", {
  14368. "class": [BORDER, bem85([parentProps.direction, {
  14369. [status]: status
  14370. }])]
  14371. }, [createVNode("div", {
  14372. "class": bem85("title", {
  14373. active: isActive()
  14374. }),
  14375. "style": titleStyle.value,
  14376. "onClick": onClickStep
  14377. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), createVNode("div", {
  14378. "class": bem85("circle-container"),
  14379. "onClick": onClickStep
  14380. }, [renderCircle()]), createVNode("div", {
  14381. "class": bem85("line"),
  14382. "style": lineStyle.value
  14383. }, null)]);
  14384. };
  14385. }
  14386. });
  14387. // node_modules/vant/es/step/index.mjs
  14388. var Step = withInstall(stdin_default93);
  14389. // node_modules/vant/es/stepper/Stepper.mjs
  14390. var [name90, bem86] = createNamespace("stepper");
  14391. var LONG_PRESS_INTERVAL = 200;
  14392. var LONG_PRESS_START_TIME = 600;
  14393. var isEqual = (value1, value2) => String(value1) === String(value2);
  14394. var stepperProps = {
  14395. min: makeNumericProp(1),
  14396. max: makeNumericProp(Infinity),
  14397. name: makeNumericProp(""),
  14398. step: makeNumericProp(1),
  14399. theme: String,
  14400. integer: Boolean,
  14401. disabled: Boolean,
  14402. showPlus: truthProp,
  14403. showMinus: truthProp,
  14404. showInput: truthProp,
  14405. longPress: truthProp,
  14406. allowEmpty: Boolean,
  14407. modelValue: numericProp,
  14408. inputWidth: numericProp,
  14409. buttonSize: numericProp,
  14410. placeholder: String,
  14411. disablePlus: Boolean,
  14412. disableMinus: Boolean,
  14413. disableInput: Boolean,
  14414. beforeChange: Function,
  14415. defaultValue: makeNumericProp(1),
  14416. decimalLength: numericProp
  14417. };
  14418. var stdin_default94 = defineComponent({
  14419. name: name90,
  14420. props: stepperProps,
  14421. emits: ["plus", "blur", "minus", "focus", "change", "overlimit", "update:modelValue"],
  14422. setup(props, {
  14423. emit
  14424. }) {
  14425. const format3 = (value) => {
  14426. const {
  14427. min,
  14428. max,
  14429. allowEmpty,
  14430. decimalLength
  14431. } = props;
  14432. if (allowEmpty && value === "") {
  14433. return value;
  14434. }
  14435. value = formatNumber(String(value), !props.integer);
  14436. value = value === "" ? 0 : +value;
  14437. value = Number.isNaN(value) ? +min : value;
  14438. value = Math.max(Math.min(+max, value), +min);
  14439. if (isDef(decimalLength)) {
  14440. value = value.toFixed(+decimalLength);
  14441. }
  14442. return value;
  14443. };
  14444. const getInitialValue = () => {
  14445. var _a;
  14446. const defaultValue = (_a = props.modelValue) != null ? _a : props.defaultValue;
  14447. const value = format3(defaultValue);
  14448. if (!isEqual(value, props.modelValue)) {
  14449. emit("update:modelValue", value);
  14450. }
  14451. return value;
  14452. };
  14453. let actionType;
  14454. const inputRef = ref();
  14455. const current2 = ref(getInitialValue());
  14456. const minusDisabled = computed(() => props.disabled || props.disableMinus || current2.value <= +props.min);
  14457. const plusDisabled = computed(() => props.disabled || props.disablePlus || current2.value >= +props.max);
  14458. const inputStyle = computed(() => ({
  14459. width: addUnit(props.inputWidth),
  14460. height: addUnit(props.buttonSize)
  14461. }));
  14462. const buttonStyle = computed(() => getSizeStyle(props.buttonSize));
  14463. const check = () => {
  14464. const value = format3(current2.value);
  14465. if (!isEqual(value, current2.value)) {
  14466. current2.value = value;
  14467. }
  14468. };
  14469. const setValue = (value) => {
  14470. if (props.beforeChange) {
  14471. callInterceptor(props.beforeChange, {
  14472. args: [value],
  14473. done() {
  14474. current2.value = value;
  14475. }
  14476. });
  14477. } else {
  14478. current2.value = value;
  14479. }
  14480. };
  14481. const onChange = () => {
  14482. if (actionType === "plus" && plusDisabled.value || actionType === "minus" && minusDisabled.value) {
  14483. emit("overlimit", actionType);
  14484. return;
  14485. }
  14486. const diff = actionType === "minus" ? -props.step : +props.step;
  14487. const value = format3(addNumber(+current2.value, diff));
  14488. setValue(value);
  14489. emit(actionType);
  14490. };
  14491. const onInput = (event) => {
  14492. const input = event.target;
  14493. const {
  14494. value
  14495. } = input;
  14496. const {
  14497. decimalLength
  14498. } = props;
  14499. let formatted = formatNumber(String(value), !props.integer);
  14500. if (isDef(decimalLength) && formatted.includes(".")) {
  14501. const pair = formatted.split(".");
  14502. formatted = `${pair[0]}.${pair[1].slice(0, +decimalLength)}`;
  14503. }
  14504. if (props.beforeChange) {
  14505. input.value = String(current2.value);
  14506. } else if (!isEqual(value, formatted)) {
  14507. input.value = formatted;
  14508. }
  14509. const isNumeric2 = formatted === String(+formatted);
  14510. setValue(isNumeric2 ? +formatted : formatted);
  14511. };
  14512. const onFocus = (event) => {
  14513. var _a;
  14514. if (props.disableInput) {
  14515. (_a = inputRef.value) == null ? void 0 : _a.blur();
  14516. } else {
  14517. emit("focus", event);
  14518. }
  14519. };
  14520. const onBlur = (event) => {
  14521. const input = event.target;
  14522. const value = format3(input.value);
  14523. input.value = String(value);
  14524. current2.value = value;
  14525. nextTick(() => {
  14526. emit("blur", event);
  14527. resetScroll();
  14528. });
  14529. };
  14530. let isLongPress;
  14531. let longPressTimer;
  14532. const longPressStep = () => {
  14533. longPressTimer = setTimeout(() => {
  14534. onChange();
  14535. longPressStep();
  14536. }, LONG_PRESS_INTERVAL);
  14537. };
  14538. const onTouchStart = () => {
  14539. if (props.longPress) {
  14540. isLongPress = false;
  14541. clearTimeout(longPressTimer);
  14542. longPressTimer = setTimeout(() => {
  14543. isLongPress = true;
  14544. onChange();
  14545. longPressStep();
  14546. }, LONG_PRESS_START_TIME);
  14547. }
  14548. };
  14549. const onTouchEnd = (event) => {
  14550. if (props.longPress) {
  14551. clearTimeout(longPressTimer);
  14552. if (isLongPress) {
  14553. preventDefault(event);
  14554. }
  14555. }
  14556. };
  14557. const onMousedown = (event) => {
  14558. if (props.disableInput) {
  14559. preventDefault(event);
  14560. }
  14561. };
  14562. const createListeners = (type) => ({
  14563. onClick: (event) => {
  14564. preventDefault(event);
  14565. actionType = type;
  14566. onChange();
  14567. },
  14568. onTouchstartPassive: () => {
  14569. actionType = type;
  14570. onTouchStart();
  14571. },
  14572. onTouchend: onTouchEnd,
  14573. onTouchcancel: onTouchEnd
  14574. });
  14575. watch(() => [props.max, props.min, props.integer, props.decimalLength], check);
  14576. watch(() => props.modelValue, (value) => {
  14577. if (!isEqual(value, current2.value)) {
  14578. current2.value = format3(value);
  14579. }
  14580. });
  14581. watch(current2, (value) => {
  14582. emit("update:modelValue", value);
  14583. emit("change", value, {
  14584. name: props.name
  14585. });
  14586. });
  14587. useCustomFieldValue(() => props.modelValue);
  14588. return () => createVNode("div", {
  14589. "role": "group",
  14590. "class": bem86([props.theme])
  14591. }, [withDirectives(createVNode("button", mergeProps({
  14592. "type": "button",
  14593. "style": buttonStyle.value,
  14594. "class": [bem86("minus", {
  14595. disabled: minusDisabled.value
  14596. }), {
  14597. [HAPTICS_FEEDBACK]: !minusDisabled.value
  14598. }],
  14599. "aria-disabled": minusDisabled.value || void 0
  14600. }, createListeners("minus")), null), [[vShow, props.showMinus]]), withDirectives(createVNode("input", {
  14601. "ref": inputRef,
  14602. "type": props.integer ? "tel" : "text",
  14603. "role": "spinbutton",
  14604. "class": bem86("input"),
  14605. "value": current2.value,
  14606. "style": inputStyle.value,
  14607. "disabled": props.disabled,
  14608. "readonly": props.disableInput,
  14609. "inputmode": props.integer ? "numeric" : "decimal",
  14610. "placeholder": props.placeholder,
  14611. "aria-valuemax": props.max,
  14612. "aria-valuemin": props.min,
  14613. "aria-valuenow": current2.value,
  14614. "onBlur": onBlur,
  14615. "onInput": onInput,
  14616. "onFocus": onFocus,
  14617. "onMousedown": onMousedown
  14618. }, null), [[vShow, props.showInput]]), withDirectives(createVNode("button", mergeProps({
  14619. "type": "button",
  14620. "style": buttonStyle.value,
  14621. "class": [bem86("plus", {
  14622. disabled: plusDisabled.value
  14623. }), {
  14624. [HAPTICS_FEEDBACK]: !plusDisabled.value
  14625. }],
  14626. "aria-disabled": plusDisabled.value || void 0
  14627. }, createListeners("plus")), null), [[vShow, props.showPlus]])]);
  14628. }
  14629. });
  14630. // node_modules/vant/es/stepper/index.mjs
  14631. var Stepper = withInstall(stdin_default94);
  14632. // node_modules/vant/es/steps/index.mjs
  14633. var Steps = withInstall(stdin_default92);
  14634. // node_modules/vant/es/submit-bar/SubmitBar.mjs
  14635. var [name91, bem87, t19] = createNamespace("submit-bar");
  14636. var submitBarProps = {
  14637. tip: String,
  14638. label: String,
  14639. price: Number,
  14640. tipIcon: String,
  14641. loading: Boolean,
  14642. currency: makeStringProp("\xA5"),
  14643. disabled: Boolean,
  14644. textAlign: String,
  14645. buttonText: String,
  14646. buttonType: makeStringProp("danger"),
  14647. buttonColor: String,
  14648. suffixLabel: String,
  14649. placeholder: Boolean,
  14650. decimalLength: makeNumericProp(2),
  14651. safeAreaInsetBottom: truthProp
  14652. };
  14653. var stdin_default95 = defineComponent({
  14654. name: name91,
  14655. props: submitBarProps,
  14656. emits: ["submit"],
  14657. setup(props, {
  14658. emit,
  14659. slots
  14660. }) {
  14661. const root = ref();
  14662. const renderPlaceholder = usePlaceholder(root, bem87);
  14663. const renderText = () => {
  14664. const {
  14665. price,
  14666. label,
  14667. currency,
  14668. textAlign,
  14669. suffixLabel,
  14670. decimalLength
  14671. } = props;
  14672. if (typeof price === "number") {
  14673. const pricePair = (price / 100).toFixed(+decimalLength).split(".");
  14674. const decimal = decimalLength ? `.${pricePair[1]}` : "";
  14675. return createVNode("div", {
  14676. "class": bem87("text"),
  14677. "style": {
  14678. textAlign
  14679. }
  14680. }, [createVNode("span", null, [label || t19("label")]), createVNode("span", {
  14681. "class": bem87("price")
  14682. }, [currency, createVNode("span", {
  14683. "class": bem87("price-integer")
  14684. }, [pricePair[0]]), decimal]), suffixLabel && createVNode("span", {
  14685. "class": bem87("suffix-label")
  14686. }, [suffixLabel])]);
  14687. }
  14688. };
  14689. const renderTip = () => {
  14690. var _a;
  14691. const {
  14692. tip,
  14693. tipIcon
  14694. } = props;
  14695. if (slots.tip || tip) {
  14696. return createVNode("div", {
  14697. "class": bem87("tip")
  14698. }, [tipIcon && createVNode(Icon, {
  14699. "class": bem87("tip-icon"),
  14700. "name": tipIcon
  14701. }, null), tip && createVNode("span", {
  14702. "class": bem87("tip-text")
  14703. }, [tip]), (_a = slots.tip) == null ? void 0 : _a.call(slots)]);
  14704. }
  14705. };
  14706. const onClickButton = () => emit("submit");
  14707. const renderButton = () => {
  14708. if (slots.button) {
  14709. return slots.button();
  14710. }
  14711. return createVNode(Button, {
  14712. "round": true,
  14713. "type": props.buttonType,
  14714. "text": props.buttonText,
  14715. "class": bem87("button", props.buttonType),
  14716. "color": props.buttonColor,
  14717. "loading": props.loading,
  14718. "disabled": props.disabled,
  14719. "onClick": onClickButton
  14720. }, null);
  14721. };
  14722. const renderSubmitBar = () => {
  14723. var _a, _b;
  14724. return createVNode("div", {
  14725. "ref": root,
  14726. "class": [bem87(), {
  14727. "van-safe-area-bottom": props.safeAreaInsetBottom
  14728. }]
  14729. }, [(_a = slots.top) == null ? void 0 : _a.call(slots), renderTip(), createVNode("div", {
  14730. "class": bem87("bar")
  14731. }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
  14732. };
  14733. return () => {
  14734. if (props.placeholder) {
  14735. return renderPlaceholder(renderSubmitBar);
  14736. }
  14737. return renderSubmitBar();
  14738. };
  14739. }
  14740. });
  14741. // node_modules/vant/es/submit-bar/index.mjs
  14742. var SubmitBar = withInstall(stdin_default95);
  14743. // node_modules/vant/es/swipe-cell/SwipeCell.mjs
  14744. var [name92, bem88] = createNamespace("swipe-cell");
  14745. var swipeCellProps = {
  14746. name: makeNumericProp(""),
  14747. disabled: Boolean,
  14748. leftWidth: numericProp,
  14749. rightWidth: numericProp,
  14750. beforeClose: Function,
  14751. stopPropagation: Boolean
  14752. };
  14753. var stdin_default96 = defineComponent({
  14754. name: name92,
  14755. props: swipeCellProps,
  14756. emits: ["open", "close", "click"],
  14757. setup(props, {
  14758. emit,
  14759. slots
  14760. }) {
  14761. let opened;
  14762. let lockClick2;
  14763. let startOffset;
  14764. const root = ref();
  14765. const leftRef = ref();
  14766. const rightRef = ref();
  14767. const state = reactive({
  14768. offset: 0,
  14769. dragging: false
  14770. });
  14771. const touch = useTouch();
  14772. const getWidthByRef = (ref2) => ref2.value ? useRect(ref2).width : 0;
  14773. const leftWidth = computed(() => isDef(props.leftWidth) ? +props.leftWidth : getWidthByRef(leftRef));
  14774. const rightWidth = computed(() => isDef(props.rightWidth) ? +props.rightWidth : getWidthByRef(rightRef));
  14775. const open = (side) => {
  14776. state.offset = side === "left" ? leftWidth.value : -rightWidth.value;
  14777. if (!opened) {
  14778. opened = true;
  14779. emit("open", {
  14780. name: props.name,
  14781. position: side
  14782. });
  14783. }
  14784. };
  14785. const close = (position) => {
  14786. state.offset = 0;
  14787. if (opened) {
  14788. opened = false;
  14789. emit("close", {
  14790. name: props.name,
  14791. position
  14792. });
  14793. }
  14794. };
  14795. const toggle = (side) => {
  14796. const offset2 = Math.abs(state.offset);
  14797. const THRESHOLD = 0.15;
  14798. const threshold = opened ? 1 - THRESHOLD : THRESHOLD;
  14799. const width2 = side === "left" ? leftWidth.value : rightWidth.value;
  14800. if (width2 && offset2 > width2 * threshold) {
  14801. open(side);
  14802. } else {
  14803. close(side);
  14804. }
  14805. };
  14806. const onTouchStart = (event) => {
  14807. if (!props.disabled) {
  14808. startOffset = state.offset;
  14809. touch.start(event);
  14810. }
  14811. };
  14812. const onTouchMove = (event) => {
  14813. if (props.disabled) {
  14814. return;
  14815. }
  14816. const {
  14817. deltaX
  14818. } = touch;
  14819. touch.move(event);
  14820. if (touch.isHorizontal()) {
  14821. lockClick2 = true;
  14822. state.dragging = true;
  14823. const isEdge = !opened || deltaX.value * startOffset < 0;
  14824. if (isEdge) {
  14825. preventDefault(event, props.stopPropagation);
  14826. }
  14827. state.offset = clamp(deltaX.value + startOffset, -rightWidth.value, leftWidth.value);
  14828. }
  14829. };
  14830. const onTouchEnd = () => {
  14831. if (state.dragging) {
  14832. state.dragging = false;
  14833. toggle(state.offset > 0 ? "left" : "right");
  14834. setTimeout(() => {
  14835. lockClick2 = false;
  14836. }, 0);
  14837. }
  14838. };
  14839. const onClick = (position = "outside") => {
  14840. emit("click", position);
  14841. if (opened && !lockClick2) {
  14842. callInterceptor(props.beforeClose, {
  14843. args: [{
  14844. name: props.name,
  14845. position
  14846. }],
  14847. done: () => close(position)
  14848. });
  14849. }
  14850. };
  14851. const getClickHandler = (position, stop) => (event) => {
  14852. if (stop) {
  14853. event.stopPropagation();
  14854. }
  14855. onClick(position);
  14856. };
  14857. const renderSideContent = (side, ref2) => {
  14858. const contentSlot = slots[side];
  14859. if (contentSlot) {
  14860. return createVNode("div", {
  14861. "ref": ref2,
  14862. "class": bem88(side),
  14863. "onClick": getClickHandler(side, true)
  14864. }, [contentSlot()]);
  14865. }
  14866. };
  14867. useExpose({
  14868. open,
  14869. close
  14870. });
  14871. useClickAway(root, () => onClick("outside"), {
  14872. eventName: "touchstart"
  14873. });
  14874. useEventListener("touchmove", onTouchMove, {
  14875. target: root
  14876. });
  14877. return () => {
  14878. var _a;
  14879. const wrapperStyle = {
  14880. transform: `translate3d(${state.offset}px, 0, 0)`,
  14881. transitionDuration: state.dragging ? "0s" : ".6s"
  14882. };
  14883. return createVNode("div", {
  14884. "ref": root,
  14885. "class": bem88(),
  14886. "onClick": getClickHandler("cell", lockClick2),
  14887. "onTouchstartPassive": onTouchStart,
  14888. "onTouchend": onTouchEnd,
  14889. "onTouchcancel": onTouchEnd
  14890. }, [createVNode("div", {
  14891. "class": bem88("wrapper"),
  14892. "style": wrapperStyle
  14893. }, [renderSideContent("left", leftRef), (_a = slots.default) == null ? void 0 : _a.call(slots), renderSideContent("right", rightRef)])]);
  14894. };
  14895. }
  14896. });
  14897. // node_modules/vant/es/swipe-cell/index.mjs
  14898. var SwipeCell = withInstall(stdin_default96);
  14899. // node_modules/vant/es/tabbar/Tabbar.mjs
  14900. var [name93, bem89] = createNamespace("tabbar");
  14901. var tabbarProps = {
  14902. route: Boolean,
  14903. fixed: truthProp,
  14904. border: truthProp,
  14905. zIndex: numericProp,
  14906. placeholder: Boolean,
  14907. activeColor: String,
  14908. beforeChange: Function,
  14909. inactiveColor: String,
  14910. modelValue: makeNumericProp(0),
  14911. safeAreaInsetBottom: {
  14912. type: Boolean,
  14913. default: null
  14914. }
  14915. };
  14916. var TABBAR_KEY = Symbol(name93);
  14917. var stdin_default97 = defineComponent({
  14918. name: name93,
  14919. props: tabbarProps,
  14920. emits: ["change", "update:modelValue"],
  14921. setup(props, {
  14922. emit,
  14923. slots
  14924. }) {
  14925. const root = ref();
  14926. const {
  14927. linkChildren
  14928. } = useChildren(TABBAR_KEY);
  14929. const renderPlaceholder = usePlaceholder(root, bem89);
  14930. const enableSafeArea = () => {
  14931. var _a;
  14932. return (_a = props.safeAreaInsetBottom) != null ? _a : props.fixed;
  14933. };
  14934. const renderTabbar = () => {
  14935. var _a;
  14936. const {
  14937. fixed,
  14938. zIndex,
  14939. border
  14940. } = props;
  14941. return createVNode("div", {
  14942. "ref": root,
  14943. "role": "tablist",
  14944. "style": getZIndexStyle(zIndex),
  14945. "class": [bem89({
  14946. fixed
  14947. }), {
  14948. [BORDER_TOP_BOTTOM]: border,
  14949. "van-safe-area-bottom": enableSafeArea()
  14950. }]
  14951. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  14952. };
  14953. const setActive = (active, afterChange) => {
  14954. callInterceptor(props.beforeChange, {
  14955. args: [active],
  14956. done() {
  14957. emit("update:modelValue", active);
  14958. emit("change", active);
  14959. afterChange();
  14960. }
  14961. });
  14962. };
  14963. linkChildren({
  14964. props,
  14965. setActive
  14966. });
  14967. return () => {
  14968. if (props.fixed && props.placeholder) {
  14969. return renderPlaceholder(renderTabbar);
  14970. }
  14971. return renderTabbar();
  14972. };
  14973. }
  14974. });
  14975. // node_modules/vant/es/tabbar/index.mjs
  14976. var Tabbar = withInstall(stdin_default97);
  14977. // node_modules/vant/es/tabbar-item/TabbarItem.mjs
  14978. var [name94, bem90] = createNamespace("tabbar-item");
  14979. var tabbarItemProps = extend({}, routeProps, {
  14980. dot: Boolean,
  14981. icon: String,
  14982. name: numericProp,
  14983. badge: numericProp,
  14984. badgeProps: Object,
  14985. iconPrefix: String
  14986. });
  14987. var stdin_default98 = defineComponent({
  14988. name: name94,
  14989. props: tabbarItemProps,
  14990. emits: ["click"],
  14991. setup(props, {
  14992. emit,
  14993. slots
  14994. }) {
  14995. const route2 = useRoute();
  14996. const vm = getCurrentInstance().proxy;
  14997. const {
  14998. parent,
  14999. index
  15000. } = useParent(TABBAR_KEY);
  15001. if (!parent) {
  15002. if (true) {
  15003. console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
  15004. }
  15005. return;
  15006. }
  15007. const active = computed(() => {
  15008. var _a;
  15009. const {
  15010. route: route22,
  15011. modelValue
  15012. } = parent.props;
  15013. if (route22 && "$route" in vm) {
  15014. const {
  15015. $route
  15016. } = vm;
  15017. const {
  15018. to
  15019. } = props;
  15020. const config = isObject(to) ? to : {
  15021. path: to
  15022. };
  15023. return !!$route.matched.find((val) => {
  15024. const pathMatched = "path" in config && config.path === val.path;
  15025. const nameMatched = "name" in config && config.name === val.name;
  15026. return pathMatched || nameMatched;
  15027. });
  15028. }
  15029. return ((_a = props.name) != null ? _a : index.value) === modelValue;
  15030. });
  15031. const onClick = (event) => {
  15032. var _a;
  15033. if (!active.value) {
  15034. parent.setActive((_a = props.name) != null ? _a : index.value, route2);
  15035. }
  15036. emit("click", event);
  15037. };
  15038. const renderIcon = () => {
  15039. if (slots.icon) {
  15040. return slots.icon({
  15041. active: active.value
  15042. });
  15043. }
  15044. if (props.icon) {
  15045. return createVNode(Icon, {
  15046. "name": props.icon,
  15047. "classPrefix": props.iconPrefix
  15048. }, null);
  15049. }
  15050. };
  15051. return () => {
  15052. var _a;
  15053. const {
  15054. dot,
  15055. badge
  15056. } = props;
  15057. const {
  15058. activeColor,
  15059. inactiveColor
  15060. } = parent.props;
  15061. const color = active.value ? activeColor : inactiveColor;
  15062. return createVNode("div", {
  15063. "role": "tab",
  15064. "class": bem90({
  15065. active: active.value
  15066. }),
  15067. "style": {
  15068. color
  15069. },
  15070. "tabindex": 0,
  15071. "aria-selected": active.value,
  15072. "onClick": onClick
  15073. }, [createVNode(Badge, mergeProps({
  15074. "dot": dot,
  15075. "class": bem90("icon"),
  15076. "content": badge
  15077. }, props.badgeProps), {
  15078. default: renderIcon
  15079. }), createVNode("div", {
  15080. "class": bem90("text")
  15081. }, [(_a = slots.default) == null ? void 0 : _a.call(slots, {
  15082. active: active.value
  15083. })])]);
  15084. };
  15085. }
  15086. });
  15087. // node_modules/vant/es/tabbar-item/index.mjs
  15088. var TabbarItem = withInstall(stdin_default98);
  15089. // node_modules/vant/es/tree-select/TreeSelect.mjs
  15090. var [name95, bem91] = createNamespace("tree-select");
  15091. var treeSelectProps = {
  15092. max: makeNumericProp(Infinity),
  15093. items: makeArrayProp(),
  15094. height: makeNumericProp(300),
  15095. selectedIcon: makeStringProp("success"),
  15096. mainActiveIndex: makeNumericProp(0),
  15097. activeId: {
  15098. type: [Number, String, Array],
  15099. default: 0
  15100. }
  15101. };
  15102. var stdin_default99 = defineComponent({
  15103. name: name95,
  15104. props: treeSelectProps,
  15105. emits: ["click-nav", "click-item", "update:activeId", "update:mainActiveIndex"],
  15106. setup(props, {
  15107. emit,
  15108. slots
  15109. }) {
  15110. const isActiveItem = (id) => Array.isArray(props.activeId) ? props.activeId.includes(id) : props.activeId === id;
  15111. const renderSubItem = (item) => {
  15112. const onClick = () => {
  15113. if (item.disabled) {
  15114. return;
  15115. }
  15116. let activeId;
  15117. if (Array.isArray(props.activeId)) {
  15118. activeId = props.activeId.slice();
  15119. const index = activeId.indexOf(item.id);
  15120. if (index !== -1) {
  15121. activeId.splice(index, 1);
  15122. } else if (activeId.length < props.max) {
  15123. activeId.push(item.id);
  15124. }
  15125. } else {
  15126. activeId = item.id;
  15127. }
  15128. emit("update:activeId", activeId);
  15129. emit("click-item", item);
  15130. };
  15131. return createVNode("div", {
  15132. "key": item.id,
  15133. "class": ["van-ellipsis", bem91("item", {
  15134. active: isActiveItem(item.id),
  15135. disabled: item.disabled
  15136. })],
  15137. "onClick": onClick
  15138. }, [item.text, isActiveItem(item.id) && createVNode(Icon, {
  15139. "name": props.selectedIcon,
  15140. "class": bem91("selected")
  15141. }, null)]);
  15142. };
  15143. const onSidebarChange = (index) => {
  15144. emit("update:mainActiveIndex", index);
  15145. };
  15146. const onClickSidebarItem = (index) => emit("click-nav", index);
  15147. const renderSidebar = () => {
  15148. const Items = props.items.map((item) => createVNode(SidebarItem, {
  15149. "dot": item.dot,
  15150. "title": item.text,
  15151. "badge": item.badge,
  15152. "class": [bem91("nav-item"), item.className],
  15153. "disabled": item.disabled,
  15154. "onClick": onClickSidebarItem
  15155. }, null));
  15156. return createVNode(Sidebar, {
  15157. "class": bem91("nav"),
  15158. "modelValue": props.mainActiveIndex,
  15159. "onChange": onSidebarChange
  15160. }, {
  15161. default: () => [Items]
  15162. });
  15163. };
  15164. const renderContent = () => {
  15165. if (slots.content) {
  15166. return slots.content();
  15167. }
  15168. const selected = props.items[+props.mainActiveIndex] || {};
  15169. if (selected.children) {
  15170. return selected.children.map(renderSubItem);
  15171. }
  15172. };
  15173. return () => createVNode("div", {
  15174. "class": bem91(),
  15175. "style": {
  15176. height: addUnit(props.height)
  15177. }
  15178. }, [renderSidebar(), createVNode("div", {
  15179. "class": bem91("content")
  15180. }, [renderContent()])]);
  15181. }
  15182. });
  15183. // node_modules/vant/es/tree-select/index.mjs
  15184. var TreeSelect = withInstall(stdin_default99);
  15185. // node_modules/vant/es/uploader/utils.mjs
  15186. var [name96, bem92, t20] = createNamespace("uploader");
  15187. function readFileContent(file, resultType) {
  15188. return new Promise((resolve) => {
  15189. if (resultType === "file") {
  15190. resolve();
  15191. return;
  15192. }
  15193. const reader = new FileReader();
  15194. reader.onload = (event) => {
  15195. resolve(event.target.result);
  15196. };
  15197. if (resultType === "dataUrl") {
  15198. reader.readAsDataURL(file);
  15199. } else if (resultType === "text") {
  15200. reader.readAsText(file);
  15201. }
  15202. });
  15203. }
  15204. function isOversize(items, maxSize) {
  15205. return toArray(items).some((item) => {
  15206. if (item.file) {
  15207. if (isFunction(maxSize)) {
  15208. return maxSize(item.file);
  15209. }
  15210. return item.file.size > maxSize;
  15211. }
  15212. return false;
  15213. });
  15214. }
  15215. function filterFiles(items, maxSize) {
  15216. const valid = [];
  15217. const invalid = [];
  15218. items.forEach((item) => {
  15219. if (isOversize(item, maxSize)) {
  15220. invalid.push(item);
  15221. } else {
  15222. valid.push(item);
  15223. }
  15224. });
  15225. return { valid, invalid };
  15226. }
  15227. var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  15228. var isImageUrl = (url) => IMAGE_REGEXP.test(url);
  15229. function isImageFile(item) {
  15230. if (item.isImage) {
  15231. return true;
  15232. }
  15233. if (item.file && item.file.type) {
  15234. return item.file.type.indexOf("image") === 0;
  15235. }
  15236. if (item.url) {
  15237. return isImageUrl(item.url);
  15238. }
  15239. if (typeof item.content === "string") {
  15240. return item.content.indexOf("data:image") === 0;
  15241. }
  15242. return false;
  15243. }
  15244. // node_modules/vant/es/uploader/UploaderPreviewItem.mjs
  15245. var stdin_default100 = defineComponent({
  15246. props: {
  15247. name: numericProp,
  15248. item: makeRequiredProp(Object),
  15249. index: Number,
  15250. imageFit: String,
  15251. lazyLoad: Boolean,
  15252. deletable: Boolean,
  15253. previewSize: [Number, String, Array],
  15254. beforeDelete: Function
  15255. },
  15256. emits: ["delete", "preview"],
  15257. setup(props, {
  15258. emit,
  15259. slots
  15260. }) {
  15261. const renderMask = () => {
  15262. const {
  15263. status,
  15264. message
  15265. } = props.item;
  15266. if (status === "uploading" || status === "failed") {
  15267. const MaskIcon = status === "failed" ? createVNode(Icon, {
  15268. "name": "close",
  15269. "class": bem92("mask-icon")
  15270. }, null) : createVNode(Loading, {
  15271. "class": bem92("loading")
  15272. }, null);
  15273. const showMessage = isDef(message) && message !== "";
  15274. return createVNode("div", {
  15275. "class": bem92("mask")
  15276. }, [MaskIcon, showMessage && createVNode("div", {
  15277. "class": bem92("mask-message")
  15278. }, [message])]);
  15279. }
  15280. };
  15281. const onDelete = (event) => {
  15282. const {
  15283. name: name97,
  15284. item,
  15285. index,
  15286. beforeDelete
  15287. } = props;
  15288. event.stopPropagation();
  15289. callInterceptor(beforeDelete, {
  15290. args: [item, {
  15291. name: name97,
  15292. index
  15293. }],
  15294. done: () => emit("delete")
  15295. });
  15296. };
  15297. const onPreview = () => emit("preview");
  15298. const renderDeleteIcon = () => {
  15299. if (props.deletable && props.item.status !== "uploading") {
  15300. const slot = slots["preview-delete"];
  15301. return createVNode("div", {
  15302. "role": "button",
  15303. "class": bem92("preview-delete", {
  15304. shadow: !slot
  15305. }),
  15306. "tabindex": 0,
  15307. "aria-label": t20("delete"),
  15308. "onClick": onDelete
  15309. }, [slot ? slot() : createVNode(Icon, {
  15310. "name": "cross",
  15311. "class": bem92("preview-delete-icon")
  15312. }, null)]);
  15313. }
  15314. };
  15315. const renderCover = () => {
  15316. if (slots["preview-cover"]) {
  15317. const {
  15318. index,
  15319. item
  15320. } = props;
  15321. return createVNode("div", {
  15322. "class": bem92("preview-cover")
  15323. }, [slots["preview-cover"](extend({
  15324. index
  15325. }, item))]);
  15326. }
  15327. };
  15328. const renderPreview = () => {
  15329. const {
  15330. item,
  15331. lazyLoad,
  15332. imageFit,
  15333. previewSize
  15334. } = props;
  15335. if (isImageFile(item)) {
  15336. return createVNode(Image2, {
  15337. "fit": imageFit,
  15338. "src": item.content || item.url,
  15339. "class": bem92("preview-image"),
  15340. "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
  15341. "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
  15342. "lazyLoad": lazyLoad,
  15343. "onClick": onPreview
  15344. }, {
  15345. default: renderCover
  15346. });
  15347. }
  15348. return createVNode("div", {
  15349. "class": bem92("file"),
  15350. "style": getSizeStyle(props.previewSize)
  15351. }, [createVNode(Icon, {
  15352. "class": bem92("file-icon"),
  15353. "name": "description"
  15354. }, null), createVNode("div", {
  15355. "class": [bem92("file-name"), "van-ellipsis"]
  15356. }, [item.file ? item.file.name : item.url]), renderCover()]);
  15357. };
  15358. return () => createVNode("div", {
  15359. "class": bem92("preview")
  15360. }, [renderPreview(), renderMask(), renderDeleteIcon()]);
  15361. }
  15362. });
  15363. // node_modules/vant/es/uploader/Uploader.mjs
  15364. var uploaderProps = {
  15365. name: makeNumericProp(""),
  15366. accept: makeStringProp("image/*"),
  15367. capture: String,
  15368. multiple: Boolean,
  15369. disabled: Boolean,
  15370. readonly: Boolean,
  15371. lazyLoad: Boolean,
  15372. maxCount: makeNumericProp(Infinity),
  15373. imageFit: makeStringProp("cover"),
  15374. resultType: makeStringProp("dataUrl"),
  15375. uploadIcon: makeStringProp("photograph"),
  15376. uploadText: String,
  15377. deletable: truthProp,
  15378. afterRead: Function,
  15379. showUpload: truthProp,
  15380. modelValue: makeArrayProp(),
  15381. beforeRead: Function,
  15382. beforeDelete: Function,
  15383. previewSize: [Number, String, Array],
  15384. previewImage: truthProp,
  15385. previewOptions: Object,
  15386. previewFullImage: truthProp,
  15387. maxSize: {
  15388. type: [Number, String, Function],
  15389. default: Infinity
  15390. }
  15391. };
  15392. var stdin_default101 = defineComponent({
  15393. name: name96,
  15394. props: uploaderProps,
  15395. emits: ["delete", "oversize", "click-upload", "close-preview", "click-preview", "update:modelValue"],
  15396. setup(props, {
  15397. emit,
  15398. slots
  15399. }) {
  15400. const inputRef = ref();
  15401. const urls = [];
  15402. const getDetail = (index = props.modelValue.length) => ({
  15403. name: props.name,
  15404. index
  15405. });
  15406. const resetInput = () => {
  15407. if (inputRef.value) {
  15408. inputRef.value.value = "";
  15409. }
  15410. };
  15411. const onAfterRead = (items) => {
  15412. resetInput();
  15413. if (isOversize(items, props.maxSize)) {
  15414. if (Array.isArray(items)) {
  15415. const result = filterFiles(items, props.maxSize);
  15416. items = result.valid;
  15417. emit("oversize", result.invalid, getDetail());
  15418. if (!items.length) {
  15419. return;
  15420. }
  15421. } else {
  15422. emit("oversize", items, getDetail());
  15423. return;
  15424. }
  15425. }
  15426. items = reactive(items);
  15427. emit("update:modelValue", [...props.modelValue, ...toArray(items)]);
  15428. if (props.afterRead) {
  15429. props.afterRead(items, getDetail());
  15430. }
  15431. };
  15432. const readFile = (files) => {
  15433. const {
  15434. maxCount,
  15435. modelValue,
  15436. resultType
  15437. } = props;
  15438. if (Array.isArray(files)) {
  15439. const remainCount = +maxCount - modelValue.length;
  15440. if (files.length > remainCount) {
  15441. files = files.slice(0, remainCount);
  15442. }
  15443. Promise.all(files.map((file) => readFileContent(file, resultType))).then((contents) => {
  15444. const fileList = files.map((file, index) => {
  15445. const result = {
  15446. file,
  15447. status: "",
  15448. message: ""
  15449. };
  15450. if (contents[index]) {
  15451. result.content = contents[index];
  15452. }
  15453. return result;
  15454. });
  15455. onAfterRead(fileList);
  15456. });
  15457. } else {
  15458. readFileContent(files, resultType).then((content) => {
  15459. const result = {
  15460. file: files,
  15461. status: "",
  15462. message: ""
  15463. };
  15464. if (content) {
  15465. result.content = content;
  15466. }
  15467. onAfterRead(result);
  15468. });
  15469. }
  15470. };
  15471. const onChange = (event) => {
  15472. const {
  15473. files
  15474. } = event.target;
  15475. if (props.disabled || !files || !files.length) {
  15476. return;
  15477. }
  15478. const file = files.length === 1 ? files[0] : [].slice.call(files);
  15479. if (props.beforeRead) {
  15480. const response = props.beforeRead(file, getDetail());
  15481. if (!response) {
  15482. resetInput();
  15483. return;
  15484. }
  15485. if (isPromise(response)) {
  15486. response.then((data) => {
  15487. if (data) {
  15488. readFile(data);
  15489. } else {
  15490. readFile(file);
  15491. }
  15492. }).catch(resetInput);
  15493. return;
  15494. }
  15495. }
  15496. readFile(file);
  15497. };
  15498. let imagePreview;
  15499. const onClosePreview = () => emit("close-preview");
  15500. const previewImage = (item) => {
  15501. if (props.previewFullImage) {
  15502. const imageFiles = props.modelValue.filter(isImageFile);
  15503. const images = imageFiles.map((item2) => {
  15504. if (item2.file && !item2.url && item2.status !== "failed") {
  15505. item2.url = URL.createObjectURL(item2.file);
  15506. urls.push(item2.url);
  15507. }
  15508. return item2.url;
  15509. }).filter(Boolean);
  15510. imagePreview = ImagePreview(extend({
  15511. images,
  15512. startPosition: imageFiles.indexOf(item),
  15513. onClose: onClosePreview
  15514. }, props.previewOptions));
  15515. }
  15516. };
  15517. const closeImagePreview = () => {
  15518. if (imagePreview) {
  15519. imagePreview.close();
  15520. }
  15521. };
  15522. const deleteFile = (item, index) => {
  15523. const fileList = props.modelValue.slice(0);
  15524. fileList.splice(index, 1);
  15525. emit("update:modelValue", fileList);
  15526. emit("delete", item, getDetail(index));
  15527. };
  15528. const renderPreviewItem = (item, index) => {
  15529. const needPickData = ["imageFit", "deletable", "previewSize", "beforeDelete"];
  15530. const previewData = extend(pick(props, needPickData), pick(item, needPickData, true));
  15531. return createVNode(stdin_default100, mergeProps({
  15532. "item": item,
  15533. "index": index,
  15534. "onClick": () => emit("click-preview", item, getDetail(index)),
  15535. "onDelete": () => deleteFile(item, index),
  15536. "onPreview": () => previewImage(item)
  15537. }, pick(props, ["name", "lazyLoad"]), previewData), pick(slots, ["preview-cover", "preview-delete"]));
  15538. };
  15539. const renderPreviewList = () => {
  15540. if (props.previewImage) {
  15541. return props.modelValue.map(renderPreviewItem);
  15542. }
  15543. };
  15544. const onClickUpload = (event) => emit("click-upload", event);
  15545. const renderUpload = () => {
  15546. if (props.modelValue.length >= props.maxCount || !props.showUpload) {
  15547. return;
  15548. }
  15549. const Input = props.readonly ? null : createVNode("input", {
  15550. "ref": inputRef,
  15551. "type": "file",
  15552. "class": bem92("input"),
  15553. "accept": props.accept,
  15554. "capture": props.capture,
  15555. "multiple": props.multiple,
  15556. "disabled": props.disabled,
  15557. "onChange": onChange
  15558. }, null);
  15559. if (slots.default) {
  15560. return createVNode("div", {
  15561. "class": bem92("input-wrapper"),
  15562. "onClick": onClickUpload
  15563. }, [slots.default(), Input]);
  15564. }
  15565. return createVNode("div", {
  15566. "class": bem92("upload", {
  15567. readonly: props.readonly
  15568. }),
  15569. "style": getSizeStyle(props.previewSize),
  15570. "onClick": onClickUpload
  15571. }, [createVNode(Icon, {
  15572. "name": props.uploadIcon,
  15573. "class": bem92("upload-icon")
  15574. }, null), props.uploadText && createVNode("span", {
  15575. "class": bem92("upload-text")
  15576. }, [props.uploadText]), Input]);
  15577. };
  15578. const chooseFile = () => {
  15579. if (inputRef.value && !props.disabled) {
  15580. inputRef.value.click();
  15581. }
  15582. };
  15583. onBeforeUnmount(() => {
  15584. urls.forEach((url) => URL.revokeObjectURL(url));
  15585. });
  15586. useExpose({
  15587. chooseFile,
  15588. closeImagePreview
  15589. });
  15590. useCustomFieldValue(() => props.modelValue);
  15591. return () => createVNode("div", {
  15592. "class": bem92()
  15593. }, [createVNode("div", {
  15594. "class": bem92("wrapper", {
  15595. disabled: props.disabled
  15596. })
  15597. }, [renderPreviewList(), renderUpload()])]);
  15598. }
  15599. });
  15600. // node_modules/vant/es/uploader/index.mjs
  15601. var Uploader = withInstall(stdin_default101);
  15602. // node_modules/vant/es/lazyload/vue-lazyload/util.mjs
  15603. var hasIntersectionObserver = inBrowser2 && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
  15604. var modeType = {
  15605. event: "event",
  15606. observer: "observer"
  15607. };
  15608. function remove(arr, item) {
  15609. if (!arr.length)
  15610. return;
  15611. const index = arr.indexOf(item);
  15612. if (index > -1)
  15613. return arr.splice(index, 1);
  15614. }
  15615. function getBestSelectionFromSrcset(el, scale) {
  15616. if (el.tagName !== "IMG" || !el.getAttribute("data-srcset"))
  15617. return;
  15618. let options = el.getAttribute("data-srcset");
  15619. const container = el.parentNode;
  15620. const containerWidth = container.offsetWidth * scale;
  15621. let spaceIndex;
  15622. let tmpSrc;
  15623. let tmpWidth;
  15624. options = options.trim().split(",");
  15625. const result = options.map((item) => {
  15626. item = item.trim();
  15627. spaceIndex = item.lastIndexOf(" ");
  15628. if (spaceIndex === -1) {
  15629. tmpSrc = item;
  15630. tmpWidth = 999998;
  15631. } else {
  15632. tmpSrc = item.substr(0, spaceIndex);
  15633. tmpWidth = parseInt(
  15634. item.substr(spaceIndex + 1, item.length - spaceIndex - 2),
  15635. 10
  15636. );
  15637. }
  15638. return [tmpWidth, tmpSrc];
  15639. });
  15640. result.sort((a, b) => {
  15641. if (a[0] < b[0]) {
  15642. return 1;
  15643. }
  15644. if (a[0] > b[0]) {
  15645. return -1;
  15646. }
  15647. if (a[0] === b[0]) {
  15648. if (b[1].indexOf(".webp", b[1].length - 5) !== -1) {
  15649. return 1;
  15650. }
  15651. if (a[1].indexOf(".webp", a[1].length - 5) !== -1) {
  15652. return -1;
  15653. }
  15654. }
  15655. return 0;
  15656. });
  15657. let bestSelectedSrc = "";
  15658. let tmpOption;
  15659. for (let i = 0; i < result.length; i++) {
  15660. tmpOption = result[i];
  15661. bestSelectedSrc = tmpOption[1];
  15662. const next = result[i + 1];
  15663. if (next && next[0] < containerWidth) {
  15664. bestSelectedSrc = tmpOption[1];
  15665. break;
  15666. } else if (!next) {
  15667. bestSelectedSrc = tmpOption[1];
  15668. break;
  15669. }
  15670. }
  15671. return bestSelectedSrc;
  15672. }
  15673. var getDPR = (scale = 1) => inBrowser2 ? window.devicePixelRatio || scale : scale;
  15674. function supportWebp() {
  15675. if (!inBrowser2)
  15676. return false;
  15677. let support = true;
  15678. try {
  15679. const elem = document.createElement("canvas");
  15680. if (elem.getContext && elem.getContext("2d")) {
  15681. support = elem.toDataURL("image/webp").indexOf("data:image/webp") === 0;
  15682. }
  15683. } catch (err) {
  15684. support = false;
  15685. }
  15686. return support;
  15687. }
  15688. function throttle(action, delay) {
  15689. let timeout = null;
  15690. let lastRun = 0;
  15691. return function(...args) {
  15692. if (timeout) {
  15693. return;
  15694. }
  15695. const elapsed = Date.now() - lastRun;
  15696. const runCallback = () => {
  15697. lastRun = Date.now();
  15698. timeout = false;
  15699. action.apply(this, args);
  15700. };
  15701. if (elapsed >= delay) {
  15702. runCallback();
  15703. } else {
  15704. timeout = setTimeout(runCallback, delay);
  15705. }
  15706. };
  15707. }
  15708. function on(el, type, func) {
  15709. el.addEventListener(type, func, {
  15710. capture: false,
  15711. passive: true
  15712. });
  15713. }
  15714. function off(el, type, func) {
  15715. el.removeEventListener(type, func, false);
  15716. }
  15717. var loadImageAsync = (item, resolve, reject) => {
  15718. const image = new Image();
  15719. if (!item || !item.src) {
  15720. return reject(new Error("image src is required"));
  15721. }
  15722. image.src = item.src;
  15723. if (item.cors) {
  15724. image.crossOrigin = item.cors;
  15725. }
  15726. image.onload = () => resolve({
  15727. naturalHeight: image.naturalHeight,
  15728. naturalWidth: image.naturalWidth,
  15729. src: image.src
  15730. });
  15731. image.onerror = (e) => reject(e);
  15732. };
  15733. var ImageCache = class {
  15734. constructor({ max }) {
  15735. this.options = {
  15736. max: max || 100
  15737. };
  15738. this.caches = [];
  15739. }
  15740. has(key) {
  15741. return this.caches.indexOf(key) > -1;
  15742. }
  15743. add(key) {
  15744. if (this.has(key))
  15745. return;
  15746. this.caches.push(key);
  15747. if (this.caches.length > this.options.max) {
  15748. this.free();
  15749. }
  15750. }
  15751. free() {
  15752. this.caches.shift();
  15753. }
  15754. };
  15755. // node_modules/vant/es/lazyload/vue-lazyload/listener.mjs
  15756. var ReactiveListener = class {
  15757. constructor({
  15758. el,
  15759. src,
  15760. error,
  15761. loading,
  15762. bindType,
  15763. $parent,
  15764. options,
  15765. cors,
  15766. elRenderer,
  15767. imageCache
  15768. }) {
  15769. this.el = el;
  15770. this.src = src;
  15771. this.error = error;
  15772. this.loading = loading;
  15773. this.bindType = bindType;
  15774. this.attempt = 0;
  15775. this.cors = cors;
  15776. this.naturalHeight = 0;
  15777. this.naturalWidth = 0;
  15778. this.options = options;
  15779. this.$parent = $parent;
  15780. this.elRenderer = elRenderer;
  15781. this.imageCache = imageCache;
  15782. this.performanceData = {
  15783. loadStart: 0,
  15784. loadEnd: 0
  15785. };
  15786. this.filter();
  15787. this.initState();
  15788. this.render("loading", false);
  15789. }
  15790. initState() {
  15791. if ("dataset" in this.el) {
  15792. this.el.dataset.src = this.src;
  15793. } else {
  15794. this.el.setAttribute("data-src", this.src);
  15795. }
  15796. this.state = {
  15797. loading: false,
  15798. error: false,
  15799. loaded: false,
  15800. rendered: false
  15801. };
  15802. }
  15803. record(event) {
  15804. this.performanceData[event] = Date.now();
  15805. }
  15806. update({ src, loading, error }) {
  15807. const oldSrc = this.src;
  15808. this.src = src;
  15809. this.loading = loading;
  15810. this.error = error;
  15811. this.filter();
  15812. if (oldSrc !== this.src) {
  15813. this.attempt = 0;
  15814. this.initState();
  15815. }
  15816. }
  15817. checkInView() {
  15818. const rect = useRect(this.el);
  15819. return rect.top < window.innerHeight * this.options.preLoad && rect.bottom > this.options.preLoadTop && rect.left < window.innerWidth * this.options.preLoad && rect.right > 0;
  15820. }
  15821. filter() {
  15822. Object.keys(this.options.filter).forEach((key) => {
  15823. this.options.filter[key](this, this.options);
  15824. });
  15825. }
  15826. renderLoading(cb) {
  15827. this.state.loading = true;
  15828. loadImageAsync(
  15829. {
  15830. src: this.loading,
  15831. cors: this.cors
  15832. },
  15833. () => {
  15834. this.render("loading", false);
  15835. this.state.loading = false;
  15836. cb();
  15837. },
  15838. () => {
  15839. cb();
  15840. this.state.loading = false;
  15841. if (!this.options.silent)
  15842. console.warn(
  15843. `[@vant/lazyload] load failed with loading image(${this.loading})`
  15844. );
  15845. }
  15846. );
  15847. }
  15848. load(onFinish = noop) {
  15849. if (this.attempt > this.options.attempt - 1 && this.state.error) {
  15850. if (!this.options.silent) {
  15851. console.log(
  15852. `[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`
  15853. );
  15854. }
  15855. onFinish();
  15856. return;
  15857. }
  15858. if (this.state.rendered && this.state.loaded)
  15859. return;
  15860. if (this.imageCache.has(this.src)) {
  15861. this.state.loaded = true;
  15862. this.render("loaded", true);
  15863. this.state.rendered = true;
  15864. return onFinish();
  15865. }
  15866. this.renderLoading(() => {
  15867. var _a, _b;
  15868. this.attempt++;
  15869. (_b = (_a = this.options.adapter).beforeLoad) == null ? void 0 : _b.call(_a, this, this.options);
  15870. this.record("loadStart");
  15871. loadImageAsync(
  15872. {
  15873. src: this.src,
  15874. cors: this.cors
  15875. },
  15876. (data) => {
  15877. this.naturalHeight = data.naturalHeight;
  15878. this.naturalWidth = data.naturalWidth;
  15879. this.state.loaded = true;
  15880. this.state.error = false;
  15881. this.record("loadEnd");
  15882. this.render("loaded", false);
  15883. this.state.rendered = true;
  15884. this.imageCache.add(this.src);
  15885. onFinish();
  15886. },
  15887. (err) => {
  15888. !this.options.silent && console.error(err);
  15889. this.state.error = true;
  15890. this.state.loaded = false;
  15891. this.render("error", false);
  15892. }
  15893. );
  15894. });
  15895. }
  15896. render(state, cache) {
  15897. this.elRenderer(this, state, cache);
  15898. }
  15899. performance() {
  15900. let state = "loading";
  15901. let time = 0;
  15902. if (this.state.loaded) {
  15903. state = "loaded";
  15904. time = (this.performanceData.loadEnd - this.performanceData.loadStart) / 1e3;
  15905. }
  15906. if (this.state.error)
  15907. state = "error";
  15908. return {
  15909. src: this.src,
  15910. state,
  15911. time
  15912. };
  15913. }
  15914. $destroy() {
  15915. this.el = null;
  15916. this.src = null;
  15917. this.error = null;
  15918. this.loading = null;
  15919. this.bindType = null;
  15920. this.attempt = 0;
  15921. }
  15922. };
  15923. // node_modules/vant/es/lazyload/vue-lazyload/lazy.mjs
  15924. var DEFAULT_URL = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
  15925. var DEFAULT_EVENTS = [
  15926. "scroll",
  15927. "wheel",
  15928. "mousewheel",
  15929. "resize",
  15930. "animationend",
  15931. "transitionend",
  15932. "touchmove"
  15933. ];
  15934. var DEFAULT_OBSERVER_OPTIONS = {
  15935. rootMargin: "0px",
  15936. threshold: 0
  15937. };
  15938. function stdin_default102() {
  15939. return class Lazy {
  15940. constructor({
  15941. preLoad,
  15942. error,
  15943. throttleWait,
  15944. preLoadTop,
  15945. dispatchEvent,
  15946. loading,
  15947. attempt,
  15948. silent = true,
  15949. scale,
  15950. listenEvents,
  15951. filter,
  15952. adapter,
  15953. observer,
  15954. observerOptions
  15955. }) {
  15956. this.mode = modeType.event;
  15957. this.listeners = [];
  15958. this.targetIndex = 0;
  15959. this.targets = [];
  15960. this.options = {
  15961. silent,
  15962. dispatchEvent: !!dispatchEvent,
  15963. throttleWait: throttleWait || 200,
  15964. preLoad: preLoad || 1.3,
  15965. preLoadTop: preLoadTop || 0,
  15966. error: error || DEFAULT_URL,
  15967. loading: loading || DEFAULT_URL,
  15968. attempt: attempt || 3,
  15969. scale: scale || getDPR(scale),
  15970. ListenEvents: listenEvents || DEFAULT_EVENTS,
  15971. supportWebp: supportWebp(),
  15972. filter: filter || {},
  15973. adapter: adapter || {},
  15974. observer: !!observer,
  15975. observerOptions: observerOptions || DEFAULT_OBSERVER_OPTIONS
  15976. };
  15977. this.initEvent();
  15978. this.imageCache = new ImageCache({ max: 200 });
  15979. this.lazyLoadHandler = throttle(
  15980. this.lazyLoadHandler.bind(this),
  15981. this.options.throttleWait
  15982. );
  15983. this.setMode(this.options.observer ? modeType.observer : modeType.event);
  15984. }
  15985. config(options = {}) {
  15986. Object.assign(this.options, options);
  15987. }
  15988. performance() {
  15989. return this.listeners.map((item) => item.performance());
  15990. }
  15991. addLazyBox(vm) {
  15992. this.listeners.push(vm);
  15993. if (inBrowser2) {
  15994. this.addListenerTarget(window);
  15995. this.observer && this.observer.observe(vm.el);
  15996. if (vm.$el && vm.$el.parentNode) {
  15997. this.addListenerTarget(vm.$el.parentNode);
  15998. }
  15999. }
  16000. }
  16001. add(el, binding, vnode) {
  16002. if (this.listeners.some((item) => item.el === el)) {
  16003. this.update(el, binding);
  16004. return nextTick(this.lazyLoadHandler);
  16005. }
  16006. const value = this.valueFormatter(binding.value);
  16007. let { src } = value;
  16008. nextTick(() => {
  16009. src = getBestSelectionFromSrcset(el, this.options.scale) || src;
  16010. this.observer && this.observer.observe(el);
  16011. const container = Object.keys(binding.modifiers)[0];
  16012. let $parent;
  16013. if (container) {
  16014. $parent = vnode.context.$refs[container];
  16015. $parent = $parent ? $parent.$el || $parent : document.getElementById(container);
  16016. }
  16017. if (!$parent) {
  16018. $parent = getScrollParent(el);
  16019. }
  16020. const newListener = new ReactiveListener({
  16021. bindType: binding.arg,
  16022. $parent,
  16023. el,
  16024. src,
  16025. loading: value.loading,
  16026. error: value.error,
  16027. cors: value.cors,
  16028. elRenderer: this.elRenderer.bind(this),
  16029. options: this.options,
  16030. imageCache: this.imageCache
  16031. });
  16032. this.listeners.push(newListener);
  16033. if (inBrowser2) {
  16034. this.addListenerTarget(window);
  16035. this.addListenerTarget($parent);
  16036. }
  16037. this.lazyLoadHandler();
  16038. nextTick(() => this.lazyLoadHandler());
  16039. });
  16040. }
  16041. update(el, binding, vnode) {
  16042. const value = this.valueFormatter(binding.value);
  16043. let { src } = value;
  16044. src = getBestSelectionFromSrcset(el, this.options.scale) || src;
  16045. const exist = this.listeners.find((item) => item.el === el);
  16046. if (!exist) {
  16047. this.add(el, binding, vnode);
  16048. } else {
  16049. exist.update({
  16050. src,
  16051. error: value.error,
  16052. loading: value.loading
  16053. });
  16054. }
  16055. if (this.observer) {
  16056. this.observer.unobserve(el);
  16057. this.observer.observe(el);
  16058. }
  16059. this.lazyLoadHandler();
  16060. nextTick(() => this.lazyLoadHandler());
  16061. }
  16062. remove(el) {
  16063. if (!el)
  16064. return;
  16065. this.observer && this.observer.unobserve(el);
  16066. const existItem = this.listeners.find((item) => item.el === el);
  16067. if (existItem) {
  16068. this.removeListenerTarget(existItem.$parent);
  16069. this.removeListenerTarget(window);
  16070. remove(this.listeners, existItem);
  16071. existItem.$destroy();
  16072. }
  16073. }
  16074. removeComponent(vm) {
  16075. if (!vm)
  16076. return;
  16077. remove(this.listeners, vm);
  16078. this.observer && this.observer.unobserve(vm.el);
  16079. if (vm.$parent && vm.$el.parentNode) {
  16080. this.removeListenerTarget(vm.$el.parentNode);
  16081. }
  16082. this.removeListenerTarget(window);
  16083. }
  16084. setMode(mode) {
  16085. if (!hasIntersectionObserver && mode === modeType.observer) {
  16086. mode = modeType.event;
  16087. }
  16088. this.mode = mode;
  16089. if (mode === modeType.event) {
  16090. if (this.observer) {
  16091. this.listeners.forEach((listener) => {
  16092. this.observer.unobserve(listener.el);
  16093. });
  16094. this.observer = null;
  16095. }
  16096. this.targets.forEach((target) => {
  16097. this.initListen(target.el, true);
  16098. });
  16099. } else {
  16100. this.targets.forEach((target) => {
  16101. this.initListen(target.el, false);
  16102. });
  16103. this.initIntersectionObserver();
  16104. }
  16105. }
  16106. addListenerTarget(el) {
  16107. if (!el)
  16108. return;
  16109. let target = this.targets.find((target2) => target2.el === el);
  16110. if (!target) {
  16111. target = {
  16112. el,
  16113. id: ++this.targetIndex,
  16114. childrenCount: 1,
  16115. listened: true
  16116. };
  16117. this.mode === modeType.event && this.initListen(target.el, true);
  16118. this.targets.push(target);
  16119. } else {
  16120. target.childrenCount++;
  16121. }
  16122. return this.targetIndex;
  16123. }
  16124. removeListenerTarget(el) {
  16125. this.targets.forEach((target, index) => {
  16126. if (target.el === el) {
  16127. target.childrenCount--;
  16128. if (!target.childrenCount) {
  16129. this.initListen(target.el, false);
  16130. this.targets.splice(index, 1);
  16131. target = null;
  16132. }
  16133. }
  16134. });
  16135. }
  16136. initListen(el, start2) {
  16137. this.options.ListenEvents.forEach(
  16138. (evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler)
  16139. );
  16140. }
  16141. initEvent() {
  16142. this.Event = {
  16143. listeners: {
  16144. loading: [],
  16145. loaded: [],
  16146. error: []
  16147. }
  16148. };
  16149. this.$on = (event, func) => {
  16150. if (!this.Event.listeners[event])
  16151. this.Event.listeners[event] = [];
  16152. this.Event.listeners[event].push(func);
  16153. };
  16154. this.$once = (event, func) => {
  16155. const on2 = (...args) => {
  16156. this.$off(event, on2);
  16157. func.apply(this, args);
  16158. };
  16159. this.$on(event, on2);
  16160. };
  16161. this.$off = (event, func) => {
  16162. if (!func) {
  16163. if (!this.Event.listeners[event])
  16164. return;
  16165. this.Event.listeners[event].length = 0;
  16166. return;
  16167. }
  16168. remove(this.Event.listeners[event], func);
  16169. };
  16170. this.$emit = (event, context, inCache) => {
  16171. if (!this.Event.listeners[event])
  16172. return;
  16173. this.Event.listeners[event].forEach((func) => func(context, inCache));
  16174. };
  16175. }
  16176. lazyLoadHandler() {
  16177. const freeList = [];
  16178. this.listeners.forEach((listener) => {
  16179. if (!listener.el || !listener.el.parentNode) {
  16180. freeList.push(listener);
  16181. }
  16182. const catIn = listener.checkInView();
  16183. if (!catIn)
  16184. return;
  16185. listener.load();
  16186. });
  16187. freeList.forEach((item) => {
  16188. remove(this.listeners, item);
  16189. item.$destroy();
  16190. });
  16191. }
  16192. initIntersectionObserver() {
  16193. if (!hasIntersectionObserver) {
  16194. return;
  16195. }
  16196. this.observer = new IntersectionObserver(
  16197. this.observerHandler.bind(this),
  16198. this.options.observerOptions
  16199. );
  16200. if (this.listeners.length) {
  16201. this.listeners.forEach((listener) => {
  16202. this.observer.observe(listener.el);
  16203. });
  16204. }
  16205. }
  16206. observerHandler(entries) {
  16207. entries.forEach((entry) => {
  16208. if (entry.isIntersecting) {
  16209. this.listeners.forEach((listener) => {
  16210. if (listener.el === entry.target) {
  16211. if (listener.state.loaded)
  16212. return this.observer.unobserve(listener.el);
  16213. listener.load();
  16214. }
  16215. });
  16216. }
  16217. });
  16218. }
  16219. elRenderer(listener, state, cache) {
  16220. if (!listener.el)
  16221. return;
  16222. const { el, bindType } = listener;
  16223. let src;
  16224. switch (state) {
  16225. case "loading":
  16226. src = listener.loading;
  16227. break;
  16228. case "error":
  16229. src = listener.error;
  16230. break;
  16231. default:
  16232. ({ src } = listener);
  16233. break;
  16234. }
  16235. if (bindType) {
  16236. el.style[bindType] = 'url("' + src + '")';
  16237. } else if (el.getAttribute("src") !== src) {
  16238. el.setAttribute("src", src);
  16239. }
  16240. el.setAttribute("lazy", state);
  16241. this.$emit(state, listener, cache);
  16242. this.options.adapter[state] && this.options.adapter[state](listener, this.options);
  16243. if (this.options.dispatchEvent) {
  16244. const event = new CustomEvent(state, {
  16245. detail: listener
  16246. });
  16247. el.dispatchEvent(event);
  16248. }
  16249. }
  16250. valueFormatter(value) {
  16251. let src = value;
  16252. let { loading, error } = this.options;
  16253. if (isObject(value)) {
  16254. if (!value.src && !this.options.silent) {
  16255. console.error("[@vant/lazyload] miss src with " + value);
  16256. }
  16257. ({ src } = value);
  16258. loading = value.loading || this.options.loading;
  16259. error = value.error || this.options.error;
  16260. }
  16261. return {
  16262. src,
  16263. loading,
  16264. error
  16265. };
  16266. }
  16267. };
  16268. }
  16269. // node_modules/vant/es/lazyload/vue-lazyload/lazy-component.mjs
  16270. var stdin_default103 = (lazy) => ({
  16271. props: {
  16272. tag: {
  16273. type: String,
  16274. default: "div"
  16275. }
  16276. },
  16277. emits: ["show"],
  16278. render() {
  16279. return h(
  16280. this.tag,
  16281. this.show && this.$slots.default ? this.$slots.default() : null
  16282. );
  16283. },
  16284. data() {
  16285. return {
  16286. el: null,
  16287. state: {
  16288. loaded: false
  16289. },
  16290. show: false
  16291. };
  16292. },
  16293. mounted() {
  16294. this.el = this.$el;
  16295. lazy.addLazyBox(this);
  16296. lazy.lazyLoadHandler();
  16297. },
  16298. beforeUnmount() {
  16299. lazy.removeComponent(this);
  16300. },
  16301. methods: {
  16302. checkInView() {
  16303. const rect = useRect(this.$el);
  16304. return inBrowser2 && rect.top < window.innerHeight * lazy.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazy.options.preLoad && rect.right > 0;
  16305. },
  16306. load() {
  16307. this.show = true;
  16308. this.state.loaded = true;
  16309. this.$emit("show", this);
  16310. },
  16311. destroy() {
  16312. return this.$destroy;
  16313. }
  16314. }
  16315. });
  16316. // node_modules/vant/es/lazyload/vue-lazyload/lazy-container.mjs
  16317. var defaultOptions2 = {
  16318. selector: "img"
  16319. };
  16320. var LazyContainer = class {
  16321. constructor({ el, binding, vnode, lazy }) {
  16322. this.el = null;
  16323. this.vnode = vnode;
  16324. this.binding = binding;
  16325. this.options = {};
  16326. this.lazy = lazy;
  16327. this.queue = [];
  16328. this.update({ el, binding });
  16329. }
  16330. update({ el, binding }) {
  16331. this.el = el;
  16332. this.options = Object.assign({}, defaultOptions2, binding.value);
  16333. const imgs = this.getImgs();
  16334. imgs.forEach((el2) => {
  16335. this.lazy.add(
  16336. el2,
  16337. Object.assign({}, this.binding, {
  16338. value: {
  16339. src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
  16340. error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
  16341. loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
  16342. }
  16343. }),
  16344. this.vnode
  16345. );
  16346. });
  16347. }
  16348. getImgs() {
  16349. return Array.from(this.el.querySelectorAll(this.options.selector));
  16350. }
  16351. clear() {
  16352. const imgs = this.getImgs();
  16353. imgs.forEach((el) => this.lazy.remove(el));
  16354. this.vnode = null;
  16355. this.binding = null;
  16356. this.lazy = null;
  16357. }
  16358. };
  16359. var LazyContainerManager = class {
  16360. constructor({ lazy }) {
  16361. this.lazy = lazy;
  16362. this.queue = [];
  16363. }
  16364. bind(el, binding, vnode) {
  16365. const container = new LazyContainer({
  16366. el,
  16367. binding,
  16368. vnode,
  16369. lazy: this.lazy
  16370. });
  16371. this.queue.push(container);
  16372. }
  16373. update(el, binding, vnode) {
  16374. const container = this.queue.find((item) => item.el === el);
  16375. if (!container)
  16376. return;
  16377. container.update({ el, binding, vnode });
  16378. }
  16379. unbind(el) {
  16380. const container = this.queue.find((item) => item.el === el);
  16381. if (!container)
  16382. return;
  16383. container.clear();
  16384. remove(this.queue, container);
  16385. }
  16386. };
  16387. // node_modules/vant/es/lazyload/vue-lazyload/lazy-image.mjs
  16388. var stdin_default104 = (lazyManager) => ({
  16389. props: {
  16390. src: [String, Object],
  16391. tag: {
  16392. type: String,
  16393. default: "img"
  16394. }
  16395. },
  16396. render() {
  16397. var _a, _b;
  16398. return h(
  16399. this.tag,
  16400. {
  16401. src: this.renderSrc
  16402. },
  16403. (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
  16404. );
  16405. },
  16406. data() {
  16407. return {
  16408. el: null,
  16409. options: {
  16410. src: "",
  16411. error: "",
  16412. loading: "",
  16413. attempt: lazyManager.options.attempt
  16414. },
  16415. state: {
  16416. loaded: false,
  16417. error: false,
  16418. attempt: 0
  16419. },
  16420. renderSrc: ""
  16421. };
  16422. },
  16423. watch: {
  16424. src() {
  16425. this.init();
  16426. lazyManager.addLazyBox(this);
  16427. lazyManager.lazyLoadHandler();
  16428. }
  16429. },
  16430. created() {
  16431. this.init();
  16432. this.renderSrc = this.options.loading;
  16433. },
  16434. mounted() {
  16435. this.el = this.$el;
  16436. lazyManager.addLazyBox(this);
  16437. lazyManager.lazyLoadHandler();
  16438. },
  16439. beforeUnmount() {
  16440. lazyManager.removeComponent(this);
  16441. },
  16442. methods: {
  16443. init() {
  16444. const { src, loading, error } = lazyManager.valueFormatter(this.src);
  16445. this.state.loaded = false;
  16446. this.options.src = src;
  16447. this.options.error = error;
  16448. this.options.loading = loading;
  16449. this.renderSrc = this.options.loading;
  16450. },
  16451. checkInView() {
  16452. const rect = useRect(this.$el);
  16453. return rect.top < window.innerHeight * lazyManager.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazyManager.options.preLoad && rect.right > 0;
  16454. },
  16455. load(onFinish = noop) {
  16456. if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
  16457. if (!lazyManager.options.silent) {
  16458. console.log(
  16459. `[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`
  16460. );
  16461. }
  16462. onFinish();
  16463. return;
  16464. }
  16465. const { src } = this.options;
  16466. loadImageAsync(
  16467. { src },
  16468. ({ src: src2 }) => {
  16469. this.renderSrc = src2;
  16470. this.state.loaded = true;
  16471. },
  16472. () => {
  16473. this.state.attempt++;
  16474. this.renderSrc = this.options.error;
  16475. this.state.error = true;
  16476. }
  16477. );
  16478. }
  16479. }
  16480. });
  16481. // node_modules/vant/es/lazyload/vue-lazyload/index.mjs
  16482. var Lazyload = {
  16483. install(app, options = {}) {
  16484. const LazyClass = stdin_default102();
  16485. const lazy = new LazyClass(options);
  16486. const lazyContainer = new LazyContainerManager({ lazy });
  16487. app.config.globalProperties.$Lazyload = lazy;
  16488. if (options.lazyComponent) {
  16489. app.component("LazyComponent", stdin_default103(lazy));
  16490. }
  16491. if (options.lazyImage) {
  16492. app.component("LazyImage", stdin_default104(lazy));
  16493. }
  16494. app.directive("lazy", {
  16495. beforeMount: lazy.add.bind(lazy),
  16496. updated: lazy.update.bind(lazy),
  16497. unmounted: lazy.remove.bind(lazy)
  16498. });
  16499. app.directive("lazy-container", {
  16500. beforeMount: lazyContainer.bind.bind(lazyContainer),
  16501. updated: lazyContainer.update.bind(lazyContainer),
  16502. unmounted: lazyContainer.unbind.bind(lazyContainer)
  16503. });
  16504. }
  16505. };
  16506. // node_modules/vant/es/index.mjs
  16507. var version = "3.6.10";
  16508. function install(app) {
  16509. const components = [
  16510. ActionBar,
  16511. ActionBarButton,
  16512. ActionBarIcon,
  16513. ActionSheet,
  16514. AddressEdit,
  16515. AddressList,
  16516. Area,
  16517. Badge,
  16518. Button,
  16519. Calendar,
  16520. Card,
  16521. Cascader,
  16522. Cell,
  16523. CellGroup,
  16524. Checkbox,
  16525. CheckboxGroup,
  16526. Circle,
  16527. Col,
  16528. Collapse,
  16529. CollapseItem,
  16530. ConfigProvider,
  16531. ContactCard,
  16532. ContactEdit,
  16533. ContactList,
  16534. CountDown,
  16535. Coupon,
  16536. CouponCell,
  16537. CouponList,
  16538. DatetimePicker,
  16539. Dialog,
  16540. Divider,
  16541. DropdownItem,
  16542. DropdownMenu,
  16543. Empty,
  16544. Field,
  16545. Form,
  16546. Grid,
  16547. GridItem,
  16548. Icon,
  16549. Image2,
  16550. ImagePreview,
  16551. IndexAnchor,
  16552. IndexBar,
  16553. List,
  16554. Loading,
  16555. Locale,
  16556. NavBar,
  16557. NoticeBar,
  16558. Notify,
  16559. NumberKeyboard,
  16560. Overlay,
  16561. Pagination,
  16562. PasswordInput,
  16563. Picker,
  16564. Popover,
  16565. Popup,
  16566. Progress,
  16567. PullRefresh,
  16568. Radio,
  16569. RadioGroup,
  16570. Rate,
  16571. Row,
  16572. Search,
  16573. ShareSheet,
  16574. Sidebar,
  16575. SidebarItem,
  16576. Skeleton,
  16577. Slider,
  16578. Space,
  16579. Step,
  16580. Stepper,
  16581. Steps,
  16582. Sticky,
  16583. SubmitBar,
  16584. Swipe,
  16585. SwipeCell,
  16586. SwipeItem,
  16587. Switch,
  16588. Tab,
  16589. Tabbar,
  16590. TabbarItem,
  16591. Tabs,
  16592. Tag,
  16593. Toast,
  16594. TreeSelect,
  16595. Uploader
  16596. ];
  16597. components.forEach((item) => {
  16598. if (item.install) {
  16599. app.use(item);
  16600. } else if (item.name) {
  16601. app.component(item.name, item);
  16602. }
  16603. });
  16604. }
  16605. var stdin_default105 = {
  16606. install,
  16607. version
  16608. };
  16609. export {
  16610. Locale,
  16611. ActionBar,
  16612. Badge,
  16613. Icon,
  16614. Loading,
  16615. Button,
  16616. ActionBarButton,
  16617. ActionBarIcon,
  16618. Overlay,
  16619. Popup,
  16620. ActionSheet,
  16621. Picker,
  16622. Area,
  16623. Cell,
  16624. Form,
  16625. Field,
  16626. Toast,
  16627. Switch,
  16628. AddressEdit,
  16629. RadioGroup,
  16630. Tag,
  16631. Radio,
  16632. AddressList,
  16633. Calendar,
  16634. Image2 as Image,
  16635. Card,
  16636. Sticky,
  16637. Swipe,
  16638. SwipeItem,
  16639. Tab,
  16640. Tabs,
  16641. Cascader,
  16642. CellGroup,
  16643. Checkbox,
  16644. CheckboxGroup,
  16645. Circle,
  16646. Col,
  16647. Collapse,
  16648. CollapseItem,
  16649. ConfigProvider,
  16650. ContactCard,
  16651. ContactEdit,
  16652. ContactList,
  16653. CountDown,
  16654. Coupon,
  16655. CouponCell,
  16656. Empty,
  16657. CouponList,
  16658. DatetimePicker,
  16659. Dialog,
  16660. Divider,
  16661. DropdownItem,
  16662. DropdownMenu,
  16663. Grid,
  16664. GridItem,
  16665. ImagePreview,
  16666. IndexAnchor,
  16667. IndexBar,
  16668. List,
  16669. NavBar,
  16670. NoticeBar,
  16671. Notify,
  16672. NumberKeyboard,
  16673. Pagination,
  16674. PasswordInput,
  16675. Popover,
  16676. Progress,
  16677. PullRefresh,
  16678. Rate,
  16679. Row,
  16680. Search,
  16681. ShareSheet,
  16682. Sidebar,
  16683. SidebarItem,
  16684. Skeleton,
  16685. Slider,
  16686. Space,
  16687. Step,
  16688. Stepper,
  16689. Steps,
  16690. SubmitBar,
  16691. SwipeCell,
  16692. Tabbar,
  16693. TabbarItem,
  16694. TreeSelect,
  16695. Uploader,
  16696. Lazyload,
  16697. version,
  16698. install,
  16699. stdin_default105 as stdin_default
  16700. };
  16701. //# sourceMappingURL=chunk-UARXZWXR.js.map